@elyra/canvas 13.41.2 → 13.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-controller-40365e79.js +2 -0
- package/dist/canvas-controller-40365e79.js.map +1 -0
- package/dist/canvas-controller-6e8175f3.js +2 -0
- package/dist/canvas-controller-6e8175f3.js.map +1 -0
- package/dist/{common-canvas-f6aa2d68.js → common-canvas-60e6c495.js} +2 -2
- package/dist/common-canvas-60e6c495.js.map +1 -0
- package/dist/{common-canvas-76637856.js → common-canvas-c6a5094d.js} +2 -2
- package/dist/common-canvas-c6a5094d.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-properties-2010da23.js +2 -0
- package/dist/common-properties-2010da23.js.map +1 -0
- package/dist/common-properties-abcfd713.js +2 -0
- package/dist/common-properties-abcfd713.js.map +1 -0
- package/dist/lib/canvas-controller.es.js +1 -1
- package/dist/lib/canvas-controller.js +1 -1
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/package.json +2 -2
- package/src/command-actions/arrangeLayoutAction.js +4 -0
- package/src/common-canvas/svg-canvas-renderer.js +38 -1
- package/src/common-properties/components/wide-flyout/wide-flyout.jsx +10 -6
- package/src/object-model/api-pipeline.js +4 -0
- package/src/object-model/redux/reducers/canvasinfo.js +1 -0
- package/src/object-model/redux/reducers/comments.js +4 -0
- package/stats.html +1 -1
- package/types/common-properties.d.ts +1 -1
- package/dist/canvas-controller-73f1a168.js +0 -2
- package/dist/canvas-controller-73f1a168.js.map +0 -1
- package/dist/canvas-controller-8093b1c5.js +0 -2
- package/dist/canvas-controller-8093b1c5.js.map +0 -1
- package/dist/common-canvas-76637856.js.map +0 -1
- package/dist/common-canvas-f6aa2d68.js.map +0 -1
- package/dist/common-properties-2c1ae93f.js +0 -2
- package/dist/common-properties-2c1ae93f.js.map +0 -1
- package/dist/common-properties-44874063.js +0 -2
- package/dist/common-properties-44874063.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-controller-73f1a168.js","sources":["../node_modules/lodash/_castFunction.js","../node_modules/lodash/isMatch.js","../node_modules/lodash/isMatchWith.js","../src/object-model/layout-dimensions.js","../src/object-model/config-utils.js","../src/command-actions/arrangeLayoutAction.js","../src/command-actions/attachNodeToLinksAction.js","../src/command-actions/convertSuperNodeExternalToLocalAction.js","../src/command-actions/convertSuperNodeLocalToExternalAction.js","../src/command-actions/createAutoNodeAction.js","../src/command-actions/createCommentAction.js","../src/command-actions/createCommentLinkAction.js","../src/command-actions/createNodeAction.js","../src/command-actions/createNodeLinkAction.js","../src/command-actions/createNodeLinkDetachedAction.js","../src/command-actions/createNodeOnLinkAction.js","../src/command-actions/createNodeAttachLinksAction.js","../src/command-actions/createSuperNodeAction.js","../src/command-actions/collapseSuperNodeInPlaceAction.js","../src/command-actions/colorSelectedObjectsAction.js","../src/command-actions/deconstructSuperNodeAction.js","../src/command-actions/deleteLinkAction.js","../src/command-actions/deleteObjectsAction.js","../src/command-actions/disconnectObjectsAction.js","../src/command-actions/displayPreviousPipelineAction.js","../src/command-actions/displaySubPipelineAction.js","../src/command-actions/editCommentAction.js","../src/command-actions/editDecorationLabelAction.js","../src/command-actions/setNodeLabelAction.js","../src/command-actions/expandSuperNodeInPlaceAction.js","../src/command-actions/insertNodeIntoLinkAction.js","../src/command-actions/moveObjectsAction.js","../src/command-actions/pasteAction.js","../src/command-actions/saveToPaletteAction.js","../node_modules/lodash/forIn.js","../src/command-actions/setObjectsStyleAction.js","../src/command-actions/setLinksStyleAction.js","../src/command-actions/updateLinkAction.js","../src/common-canvas/label-util.js","../node_modules/lodash/differenceWith.js","../src/object-model/canvas-in-handler.js","../src/object-model/canvas-out-handler.js","../src/object-model/pipeline-in-handler.js","../src/object-model/pipeline-out-handler.js","../src/common-canvas/local-storage.js","../src/object-model/object-model-utils.js","../node_modules/dagre/dist/dagre.min.js","../src/object-model/api-pipeline.js","../src/object-model/redux/reducers/tooltip.js","../src/object-model/redux/reducers/nodetypes.js","../src/object-model/redux/reducers/categories.js","../src/object-model/redux/reducers/palette.js","../src/object-model/redux/reducers/ports.js","../src/object-model/redux/reducers/nodes.js","../src/object-model/redux/reducers/comments.js","../src/object-model/redux/reducers/links.js","../src/object-model/redux/reducers/canvasinfo.js","../src/object-model/redux/reducers/contextmenu.js","../src/object-model/redux/reducers/leftflyout.js","../src/object-model/redux/reducers/rightflyout.js","../src/object-model/redux/reducers/bottompanel.js","../src/object-model/redux/reducers/toppanel.js","../src/object-model/redux/reducers/breadcrumbs.js","../src/object-model/redux/reducers/canvasconfig.js","../src/object-model/redux/reducers/canvastoolbar.js","../src/object-model/redux/reducers/texttoolbar.js","../src/object-model/redux/reducers/notifications.js","../src/object-model/redux/reducers/selectioninfo.js","../src/object-model/redux/reducers/notificationpanel.js","../src/object-model/redux/reducers/externalpipelineflows.js","../src/object-model/redux/canvas-store.js","../src/object-model/schemas-utils/schema-validator.js","../src/object-model/schemas-utils/upgrade-palette.js","../src/object-model/object-model.js","../src/command-actions/sizeAndPositionObjectsAction.js","../src/common-canvas/canvas-controller-menu-utils.js","../src/common-canvas/canvas-controller.js"],"sourcesContent":["var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData');\n\n/**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\nfunction isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n}\n\nmodule.exports = isMatch;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData');\n\n/**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\nfunction isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n}\n\nmodule.exports = isMatchWith;\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneDeep } from \"lodash\";\nimport {\n\tLINK_METHOD_FREEFORM,\n\tLINK_METHOD_PORTS,\n\tLINK_TYPE_STRAIGHT,\n\tLINK_DIR_LEFT_RIGHT,\n\tNODE_FORMAT_VERTICAL\n} from \"../common-canvas/constants/canvas-constants\";\n\nconst horizontalDefaultLayout = {\n\tnodeLayout: {\n\t\t// Default node sizes. These dimensions might be overridden for nodes that have\n\t\t// more ports than will fit in the default size if inputPortAutoPosition is\n\t\t// set to true and outputPortAutoPosition is set to true. (See below).\n\t\tdefaultNodeWidth: 160,\n\t\tdefaultNodeHeight: 40,\n\n\t\t// A space separated list of classes that will be added to the group <g>\n\t\t// DOM element for the node.\n\t\tclassName: \"\",\n\n\t\t// Displays the node outline shape underneath the image and label.\n\t\tnodeShapeDisplay: true,\n\n\t\t// Default node shape. Can be \"rectangle\", \"port-arcs\" or\n\t\t// \"rectangle-rounded-corners\". Used when nodeShapeDisplay is true.\n\t\tnodeShape: \"port-arcs\",\n\n\t\t// An SVG path or a function that returns an SVG path. The paths define the node\n\t\t// shape and its selection highlighting respectively. If set to null, the paths\n\t\t// will be set by default based on the nodeShape setting.\n\t\t// If these fields are set to functions they will be called in real-time as the node\n\t\t// is being sized (provided the node is resizable).\n\t\tbodyPath: null,\n\t\tselectionPath: null,\n\n\t\t// Displays the external object specified, as the body of the node\n\t\tnodeExternalObject: false,\n\n\t\t// When set to true and the focus is being set on the node, the event\n\t\t// is allowed to perform the default action on the node.\n\t\tonFocusAllowDefaultAction: false,\n\n\t\t// Display image\n\t\timageDisplay: true,\n\n\t\t// Image dimensions\n\t\timageWidth: 26,\n\t\timageHeight: 26,\n\n\t\t// Image position\n\t\timagePosition: \"topLeft\",\n\t\timagePosX: 6,\n\t\timagePosY: 7,\n\n\t\t// Display label\n\t\tlabelDisplay: true,\n\n\t\t// Label dimensions\n\t\tlabelWidth: 112,\n\t\tlabelHeight: 19,\n\n\t\t// Label position\n\t\tlabelPosition: \"topLeft\",\n\t\tlabelPosX: 36,\n\t\tlabelPosY: 12,\n\n\t\t// Label appearance\n\t\tlabelEditable: false,\n\t\tlabelAlign: \"left\", // can be \"left\" or \"center\"\n\t\tlabelSingleLine: true, // false allow multi-line labels\n\t\tlabelOutline: false,\n\t\tlabelMaxCharacters: null, // null allows unlimited characters\n\t\tlabelAllowReturnKey: false, // true allows line feed to be inserted into label, \"save\" to make the return key save the label.\n\n\t\t// An array of decorations to be applied to the node. For details see:\n\t\t// https://elyra-ai.github.io/canvas/03.04.01-decorations/\n\t\t// These are added to the node at run time and will not be saved into\n\t\t// the pipeline flow.\n\t\tdecorations: [],\n\n\t\t// Positions and dimensions for 9 enumerated default decorator positions.\n\t\t// decoratorWidth and decoratorHeight are the dimensions of the outline\n\t\t// rectangle and decoratorPadding is the padding for the image within the\n\t\t// outline rectangle.\n\t\tdecoratorTopY: 2,\n\t\tdecoratorMiddleY: -8,\n\t\tdecoratorBottomY: -18,\n\n\t\tdecoratorLeftX: 2,\n\t\tdecoratorCenterX: -8,\n\t\tdecoratorRightX: -30,\n\n\t\t// Width, height and padding for image decorators\n\t\tdecoratorWidth: 16,\n\t\tdecoratorHeight: 16,\n\t\tdecoratorPadding: 2,\n\n\t\t// Width and height for label decorators\n\t\tdecoratorLabelWidth: 80,\n\t\tdecoratorLabelHeight: 30,\n\n\t\t// Display drop shadow under and round the nodes\n\t\tdropShadow: true,\n\n\t\t// The gap between a node and its selection highlight rectangle\n\t\tnodeHighlightGap: 1,\n\n\t\t// Allows the user to resize the node.\n\t\tnodeResizable: false,\n\n\t\t// Allows the user to move the node. Can be: true or false.\n\t\tnodeMovable: true,\n\n\t\t// The size of the node sizing area that extends around the node, over\n\t\t// which the mouse pointer will change to the sizing arrows.\n\t\tnodeSizingArea: 10,\n\n\t\t// Error indicator dimensions\n\t\terrorPosition: \"topLeft\",\n\t\terrorXPos: 24,\n\t\terrorYPos: 5,\n\t\terrorWidth: 10.5,\n\t\terrorHeight: 10.5,\n\n\t\t// When sizing a supernode this decides the size of the corner area for\n\t\t// diagonal sizing.\n\t\tnodeCornerResizeArea: 10,\n\n\t\t// What point to draw the data links from and to when enableLinkType is set\n\t\t// to \"Straight\" and enableLinkMethod is set to \"Freeform\".\n\t\t// Possible values are \"image_center\" or \"node_center\".\n\t\tdrawNodeLinkLineFromTo: \"node_center\",\n\n\t\t// What point to draw the comment to node link line to. Possible values\n\t\t// are \"image_center\" or \"node_center\".\n\t\tdrawCommentLinkLineTo: \"node_center\",\n\n\t\t// This is the size of the horizontal line protruding from the\n\t\t// port on the source node when drawing an elbow or straight connection line.\n\t\tminInitialLine: 30,\n\n\t\t// For the elbow connection type with nodes with multiple output ports,\n\t\t// this is used to increment the minInitialLine so that connection lines\n\t\t// do not overlap each other when they turn up or down after the elbow.\n\t\tminInitialLineIncrement: 8,\n\n\t\t// This is the minimum size of the horizontal line entering the\n\t\t// target port on the target node when drawing an Elbow connection line.\n\t\tminFinalLine: 30,\n\n\t\t// Display input ports.\n\t\tinputPortDisplay: true,\n\n\t\t// Specifies whether the input ports are focusable or not.\n\t\tinputPortFocusable: false,\n\n\t\t// An array of elements to control display of input ports. Each element\n\t\t// can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortDisplayObjects: [\n\t\t\t{ type: \"circleWithArrow\" }\n\t\t],\n\n\t\t// Indicates whether multiple input ports should be automatically\n\t\t// positioned (true) or positioned based on the contents of\n\t\t// inputPortPositions array (false).\n\t\tinputPortAutoPosition: true,\n\n\t\t// An array of input port positions. Each element is structured like\n\t\t// this: { x_pos: 5, y_pos: 10, pos: \"topLeft\" }. x_pos and y_pos are\n\t\t// offsets from the pos point on the node.\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortPositions: [\n\t\t\t{ x_pos: 0, y_pos: 20, pos: \"topLeft\" }\n\t\t],\n\n\t\t// An array of elements to control display of input port guide objects.\n\t\t// That is the object drawn at the end of a new link as it is being dragged.\n\t\t// Each element can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortGuideObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Display output ports.\n\t\toutputPortDisplay: true,\n\n\t\t// Specifies whether the output ports are focusable or not.\n\t\toutputPortFocusable: false,\n\n\t\t// An array of elements to control display of output ports. Each element\n\t\t// can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortDisplayObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Indicates whether multiple output ports should be automatically\n\t\t// positioned (true) or positioned based on the contents of\n\t\t// outputPortPositions array (false).\n\t\toutputPortAutoPosition: true,\n\n\t\t// An array of output port positions. Each element is structured like\n\t\t// this: { x_pos: 5, y_pos: 10, pos: \"topRight\" }. x_pos and y_pos are\n\t\t// offsets from the pos point on the node.\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortPositions: [\n\t\t\t{ x_pos: 0, y_pos: 20, pos: \"topRight\" }\n\t\t],\n\n\t\t// An array of elements to control display of output port guide objects.\n\t\t// That is the object drawn at the end of a new link as it is being dragged.\n\t\t// Each element can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortGuideObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Automatically increases the node size to accommodate its ports so both\n\t\t// input and output ports can be shown within the dimensions of\n\t\t// the node.\n\t\tautoSizeNode: true,\n\n\t\t// Radius of the either the input or output ports when they are set to \"circle\"\n\t\tportRadius: 3,\n\n\t\t// Size of an offset above and below the set of port arcs.\n\t\tportArcOffset: 3,\n\n\t\t// Radius of an imaginary circle around the port. This controls the\n\t\t// spacing of ports and the size of port arcs when nodeShape is set to\n\t\t// port-arcs.\n\t\tportArcRadius: 6,\n\n\t\t// Spacing between the port arcs around the ports.\n\t\tportArcSpacing: 3,\n\n\t\t// Position of the context toolbar relative to the node. Some adjustment\n\t\t// will be made to account for the width of the toolbar.\n\t\tcontextToolbarPosition: \"topRight\",\n\n\t\t// Display of vertical ellipsis to show context menu\n\t\tellipsisDisplay: true,\n\t\tellipsisPosition: \"topLeft\",\n\t\tellipsisWidth: 10,\n\t\tellipsisHeight: 22,\n\t\tellipsisPosX: 145,\n\t\tellipsisPosY: 9,\n\t\tellipsisHoverAreaPadding: 2\n\t},\n\n\tcanvasLayout: {\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for supernode in-place containment area\n\t\t// ---------------------------------------------------------------------------\n\t\tsupernodeLabelPosX: 30,\n\t\tsupernodeLabelPosY: 4,\n\t\tsupernodeLabelWidth: 50,\n\t\tsupernodeLabelHeight: 20,\n\n\t\tsupernodeImageWidth: 18,\n\t\tsupernodeImageHeight: 18,\n\t\tsupernodeImagePosX: 5,\n\t\tsupernodeImagePosY: 4,\n\n\t\tsupernodeEllipsisPosX: -34,\n\t\tsupernodeEllipsisPosY: 2,\n\t\tsupernodeEllipsisWidth: 10,\n\t\tsupernodeEllipsisHeight: 20,\n\n\t\tsupernodeExpansionIconPosX: -21,\n\t\tsupernodeExpansionIconPosY: 4,\n\t\tsupernodeExpansionIconHeight: 18,\n\t\tsupernodeExpansionIconWidth: 18,\n\t\tsupernodeExpansionIconHoverAreaPadding: 2,\n\n\t\tsupernodeErrorPosX: -50,\n\t\tsupernodeErrorPosY: 5,\n\t\tsupernodeErrorWidth: 14,\n\t\tsupernodeErrorHeight: 14,\n\n\t\tsupernodeDefaultWidth: 300,\n\t\tsupernodeDefaultHeight: 200,\n\t\tsupernodeMinWidth: 100,\n\t\tsupernodeMinHeight: 80,\n\t\tsupernodeTopAreaHeight: 25,\n\t\tsupernodeSVGAreaPadding: 3,\n\t\tsupernodeBindingPortRadius: 6,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for links\n\t\t// ---------------------------------------------------------------------------\n\t\t// Specifies which method the links will use. Either: \"Ports\" or \"Freeform\"\n\t\tlinkMethod: LINK_METHOD_PORTS,\n\n\t\t// TODO - this should be changed to be a node layout property called 'portPlacement'\n\t\t// in the next major release.\n\t\tlinkDirection: LINK_DIR_LEFT_RIGHT,\n\n\t\t// Whether to display a link line when linked node/comments overlap. For\n\t\t// straight links we don't want to show the link when objects overlap but\n\t\t// for ports we do.\n\t\tdisplayLinkOnOverlap: true,\n\n\t\t// The gap between node or comment and the link line.\n\t\tlinkGap: 7,\n\n\t\t// Link decoration dimensions\n\t\tlinkDecoratorHeight: 20,\n\t\tlinkDecoratorWidth: 20,\n\t\tlinkDecoratorPadding: 2,\n\n\t\t// Width and height for label decorators\n\t\tlinkDecoratorLabelWidth: 80,\n\t\tlinkDecoratorLabelHeight: 30,\n\n\t\t// Values for drawing connectors. wrapAroundSpacing and\n\t\t// wrapAroundNodePadding are used when curved connectors are drawn all the\n\t\t// way around a node. ie the target is to the right of the source.\n\t\telbowSize: 10,\n\t\twrapAroundSpacing: 20,\n\t\twrapAroundNodePadding: 10,\n\n\t\t// This is initialized by enableLinkType in the canvas config.\n\t\t// It can be \"Curve\", \"Elbow\", Angle\" or \"Straight\".\n\t\tlinkType: \"Curve\",\n\n\t\t// Display an arrow head on the comment-to-node links. May be set to true to\n\t\t// get a default arrow head or to an SVG string for a custom arrow head.\n\t\tcommentLinkArrowHead: false,\n\n\t\t// Controls display of an arrow head on the data links. May be set to null to\n\t\t// get default behavior which is that arrow heads are displayed on \"Freeform\"\n\t\t// links and not displayed on \"Ports\" links. Or, it can be set to a boolean, as\n\t\t// appropriate, or to an SVG string to display a custom arrow head.\n\t\tdataLinkArrowHead: null,\n\n\t\t// Offset amounts for the link's context toolbar from its default\n\t\t// position.\n\t\tlinkContextToolbarPosX: 0,\n\t\tlinkContextToolbarPosY: 0,\n\n\t\t// The distance in pixels between the start and end points of the link\n\t\t// below which the alternative decorations for the link will be displayed.\n\t\tlinkDistanceForAltDecorations: 150,\n\n\t\t// Alternative decorations for the link. If specified, this should be an\n\t\t// array of decoration objects.\n\t\tlinkAltDecorations: null,\n\n\t\t// Link handle for input port can be \"circle\" or \"image\".\n\t\tlinkStartHandleObject: \"circle\",\n\n\t\t// Link handle image to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleImage: \"\",\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleWidth: 12,\n\t\tlinkStartHandleHeight: 12,\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleRadius: 5,\n\n\t\t// Link handle for input port can be \"circle\" or \"image\".\n\t\tlinkEndHandleObject: \"circle\",\n\n\t\t// Link handle image to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleImage: \"\",\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleWidth: 12,\n\t\tlinkEndHandleHeight: 12,\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleRadius: 5,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for comments\n\t\t// ---------------------------------------------------------------------------\n\t\t// When sizing a comment this decides the size of the corner area for\n\t\t// diagonal sizing.\n\t\tcommentCornerResizeArea: 10,\n\n\t\t// The gap between a comment and its selection highlight rectangle\n\t\tcommentHighlightGap: 1,\n\n\t\t// The gap between a comment and its sizing area rectangle\n\t\tcommentSizingArea: 10,\n\n\t\t// The auto-size status of the comment.\n\t\t// true means the comment height will increase if necessary to show text as it is entered.\n\t\tcommentAutoSize: true,\n\n\t\t// Add comment toolbar action, default offset from viewport\n\t\taddCommentOffsetX: 30,\n\t\taddCommentOffsetY: 50,\n\n\t\t// Comment port (circle) radius\n\t\tcommentPortRadius: 5,\n\n\t\t// Position of the comment toolbar as an offset from the comment position\n\t\t// (which is the top left corner of the comment bounding box).\n\t\tcommentToolbarPosX: -2,\n\t\tcommentToolbarPosY: -36,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for operations\n\t\t// ---------------------------------------------------------------------------\n\t\t// A boolean that lets applications indicate they always want to display the\n\t\t// 'back to parent flow' button in the top left corner of the canvas.\n\t\talwaysDisplayBackToParentFlow: false,\n\n\t\t// The amount of padding added around the canvas objects when doing a\n\t\t// zoomToFit on the primary canvas. This may be overridden by common-canvas\n\t\t// when displaying sub-flows.\n\t\tzoomToFitPadding: 10,\n\n\t\t// Snap to grid type.\n\t\tsnapToGridType: \"None\",\n\n\t\t// Sizes of snap to grid as a percentage of default node height and width.\n\t\t// These can also specified as a number which is a size in pixels.\n\t\tsnapToGridX: \"20%\",\n\t\tsnapToGridY: \"33.33%\",\n\n\t\t// Display a grid under the canvas objects. This can be \"None\", \"Dots\",\n\t\t// \"DotsAndLines\", \"Boxes\", \"BoxesAndLines\".\n\t\tdisplayGridType: \"None\",\n\n\t\t// Sizes of the displayed grid as a percentage of default node height and width.\n\t\t// These can also specified as a number which is a size in pixels.\n\t\t// The major grid dimensions are used to draw lines when 'displayGridType' is set to\n\t\t// either \"DotsAndLines\" or \"BoxesAndLines\". The minor grid dimensions are used to\n\t\t// draw a grid of dots or boxes. For correct alignment, the major grid dimensions\n\t\t// should be an exact multiple of the minor grid sizes.\n\t\tdisplayGridMajorX: \"100%\",\n\t\tdisplayGridMajorY: \"100%\",\n\n\t\tdisplayGridMinorX: \"20%\",\n\t\tdisplayGridMinorY: \"33.33%\",\n\n\t\t// Indicates the proximity to a node, when dragging a new connection,\n\t\t// to switch the data-new-link-over attribute to \"yes\".\n\t\tnodeProximity: 20,\n\n\t\t// Adds additional area around the ghost area dragged from the palette\n\t\t// which can increase the possibility of detecting detached links.\n\t\tghostAreaPadding: 10,\n\n\t\t// Offsets the canvas objects within the canvas viewport area when the\n\t\t// canvas is first opened.\n\t\tinitialPanX: null,\n\t\tinitialPanY: null,\n\n\t\t// Values for AutoLayout and AutoNode function\n\t\tautoLayoutInitialMarginX: 50,\n\t\tautoLayoutInitialMarginY: 50,\n\t\tautoLayoutVerticalSpacing: 80,\n\t\tautoLayoutHorizontalSpacing: 80 // For horizontal layout, this may be overridden by space for connections\n\t}\n};\n\nconst verticalDefaultLayout = {\n\tnodeLayout: {\n\t\t// Default node sizes. These dimensions might be overridden for nodes that have\n\t\t// more ports than will fit in the default size if inputPortAutoPosition is\n\t\t// set to true and outputPortAutoPosition is set to true. (See below).\n\t\tdefaultNodeWidth: 70,\n\t\tdefaultNodeHeight: 75,\n\n\t\t// A space separated list of classes that will be added to the group <g>\n\t\t// DOM element for the node.\n\t\tclassName: \"\",\n\n\t\t// Displays the node outline shape underneath the image and label.\n\t\tnodeShapeDisplay: true,\n\n\t\t// Default node shape. Can be \"rectangle\", \"port-arcs\" or\n\t\t// \"rectangle-rounded-corners\". Used when nodeShapeDisplay is true.\n\t\tnodeShape: \"rectangle\",\n\n\t\t// An SVG path or a function that returns an SVG path. The paths define the node\n\t\t// shape and its selection highlighting respectively. If set to null, the paths\n\t\t// will be set by default based on the nodeShape setting.\n\t\t// If these fields are set to functions they will be called in real-time as the node\n\t\t// is being sized (provided the node is resizable).\n\t\tbodyPath: null,\n\t\tselectionPath: null,\n\n\t\t// Displays the external object specified, as the body of the node\n\t\tnodeExternalObject: false,\n\n\t\t// When set to true and the focus is being set on the node, the event\n\t\t// is allowed to perform the default action on the node.\n\t\tonFocusAllowDefaultAction: false,\n\n\t\t// Display image\n\t\timageDisplay: true,\n\n\t\t// Image dimensions\n\t\timageWidth: 48,\n\t\timageHeight: 48,\n\n\t\t// Image position\n\t\timagePosition: \"topLeft\",\n\t\timagePosX: 11,\n\t\timagePosY: 6,\n\n\t\t// Display label\n\t\tlabelDisplay: true,\n\n\t\t// Label dimensions\n\t\tlabelWidth: 72,\n\t\tlabelHeight: 19,\n\n\t\t// Label position\n\t\tlabelPosition: \"topLeft\",\n\t\tlabelPosX: 35,\n\t\tlabelPosY: 55,\n\n\t\t// Label appearance\n\t\tlabelEditable: false,\n\t\tlabelAlign: \"center\", // can be \"left\" or \"center\"\n\t\tlabelSingleLine: true, // false allow multi-line labels\n\t\tlabelOutline: false,\n\t\tlabelMaxCharacters: null, // null allows unlimited characters\n\t\tlabelAllowReturnKey: false, // true allows line feed to be inserted into label, \"save\" to make the return key save the label.\n\n\t\t// An array of decorations to be applied to the node. For details see:\n\t\t// https://elyra-ai.github.io/canvas/03.04.01-decorations/\n\t\t// These are added to the node at run time and will not be saved into\n\t\t// the pipeline flow.\n\t\tdecorations: [],\n\n\t\t// Positions and dimensions for 9 enumerated default decorator positions.\n\t\t// decoratorWidth and decoratorHeight are the dimensions of the outline\n\t\t// rectangle and decoratorPadding is the padding for the image within the\n\t\t// outline rectangle.\n\t\tdecoratorTopY: 5,\n\t\tdecoratorMiddleY: -8,\n\t\tdecoratorBottomY: -34,\n\n\t\tdecoratorLeftX: 10,\n\t\tdecoratorCenterX: -8,\n\t\tdecoratorRightX: -24,\n\n\t\t// Width, height and padding for image decorators\n\t\tdecoratorWidth: 16,\n\t\tdecoratorHeight: 16,\n\t\tdecoratorPadding: 2,\n\n\t\t// Width and height for label decorators\n\t\tdecoratorLabelWidth: 80,\n\t\tdecoratorLabelHeight: 30,\n\n\t\t// Display drop shadow under and round the nodes\n\t\tdropShadow: false,\n\n\t\t// The gap between a node and its selection highlight rectangle\n\t\tnodeHighlightGap: 4,\n\n\t\t// Allows the user to resize the node.\n\t\tnodeResizable: false,\n\n\t\t// Allows the user to move the node. Can be: true or false.\n\t\tnodeMovable: true,\n\n\t\t// The size of the node sizing area that extends around the node, over\n\t\t// which the mouse pointer will change to the sizing arrows.\n\t\tnodeSizingArea: 10,\n\n\t\t// Error indicator dimensions\n\t\terrorPosition: \"topLeft\",\n\t\terrorXPos: 45,\n\t\terrorYPos: 5,\n\t\terrorWidth: 14,\n\t\terrorHeight: 14,\n\n\t\t// When sizing a supernode this decides the size of the corner area for\n\t\t// diagonal sizing.\n\t\tnodeCornerResizeArea: 10,\n\n\t\t// What point to draw the data links from and to when enableLinkType is set\n\t\t// to \"Straight\" and enableLinkMethod is set to \"Freeform\".\n\t\t// Possible values are \"image_center\" or \"node_center\".\n\t\tdrawNodeLinkLineFromTo: \"node_center\",\n\n\t\t// What point to draw the comment to node link line to. Possible values\n\t\t// are \"image_center\" or \"node_center\".\n\t\tdrawCommentLinkLineTo: \"node_center\",\n\n\t\t// This is the size of the horizontal line protruding from the\n\t\t// port on the source node when drawing an elbow or straight connection line.\n\t\tminInitialLine: 30,\n\n\t\t// For the elbow connection type with nodes with multiple output ports,\n\t\t// this is used to increment the minInitialLine so that connection lines\n\t\t// do not overlap each other when they turn up or down after the elbow.\n\t\tminInitialLineIncrement: 8,\n\n\t\t// This is the minimum size of the horizontal line entering the\n\t\t// target port on the target node when drawing an Elbow connection line.\n\t\tminFinalLine: 30,\n\n\t\t// Display input ports.\n\t\tinputPortDisplay: true,\n\n\t\t// Specifies whether the input ports are focusable or not.\n\t\tinputPortFocusable: false,\n\n\t\t// An array of elements to control display of input ports. Each element\n\t\t// can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortDisplayObjects: [\n\t\t\t{ type: \"circleWithArrow\" }\n\t\t],\n\n\t\t// Indicates whether multiple input ports should be automatically\n\t\t// positioned (true) or positioned based on the contents of\n\t\t// inputPortPositions array (false).\n\t\tinputPortAutoPosition: true,\n\n\t\t// An array of input port positions. Each element is structured like\n\t\t// this: { x_pos: 5, y_pos: 10, pos: \"topLeft\" }. x_pos and y_pos are\n\t\t// offsets from the pos point on the node.\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortPositions: [\n\t\t\t{ x_pos: 0, y_pos: 29, pos: \"topLeft\" }\n\t\t],\n\n\t\t// An array of elements to control display of input port guide objects.\n\t\t// That is the object drawn at the end of a new link as it is being dragged.\n\t\t// Each element can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// inputs array for the node. If there are more input ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\tinputPortGuideObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Display output ports.\n\t\toutputPortDisplay: true,\n\n\t\t// Specifies whether the output ports are focusable or not.\n\t\toutputPortFocusable: false,\n\n\t\t// An array of elements to control display of output ports. Each element\n\t\t// can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortDisplayObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Indicates whether multiple output ports should be automatically\n\t\t// positioned (true) or positioned based on the contents of\n\t\t// outputPortPositions array (false).\n\t\toutputPortAutoPosition: true,\n\n\t\t// An array of output port positions. Each element is structured like\n\t\t// this: { x_pos: 5, y_pos: 10, pos: \"topRight\" }. x_pos and y_pos are\n\t\t// offsets from the pos point on the node.\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortPositions: [\n\t\t\t{ x_pos: 0, y_pos: 29, pos: \"topRight\" }\n\t\t],\n\n\t\t// An array of elements to control display of output port guide objects.\n\t\t// That is the object drawn at the end of a new link as it is being dragged.\n\t\t// Each element can have a number of different structures like this:\n\t\t// Either\n\t\t// { type: \"circle\" } // Can also be \"circleWithArrow\"\n\t\t// Or\n\t\t// { type: \"image\", src: \"path/picture.svg\", width: 10, height: 10 }\n\t\t// Or\n\t\t// { type: \"jsx\", src: (<FaceCool />), width: 16, height: 16 }\n\t\t//\n\t\t// The order of the elements corresponds to the order of ports in the\n\t\t// outputs array for the node. If there are more output ports than elements\n\t\t// in the array, the last element will be used for all remaining ports.\n\t\toutputPortGuideObjects: [\n\t\t\t{ type: \"circle\" }\n\t\t],\n\n\t\t// Automatically increases the node size to accommodate its ports so both\n\t\t// input and output ports can be shown within the dimensions of\n\t\t// the node.\n\t\tautoSizeNode: true,\n\n\t\t// Radius of the either the input or output ports when they are set to \"circle\"\n\t\tportRadius: 6,\n\n\t\t// Size of an offset above and below the set of port arcs.\n\t\tportArcOffset: 0,\n\n\t\t// Radius of an imaginary circle around the port. This controls the\n\t\t// spacing of ports and the size of port arcs when nodeShape is set to\n\t\t// port-arcs.\n\t\tportArcRadius: 10,\n\n\t\t// Spacing between the port arcs around the ports.\n\t\tportArcSpacing: 0,\n\n\t\t// Position of the context toolbar relative to the node. Some adjustment\n\t\t// will be made to account for the width of the toolbar.\n\t\tcontextToolbarPosition: \"topCenter\",\n\n\t\t// Display of vertical ellipsis to show context menu\n\t\tellipsisDisplay: true,\n\t\tellipsisPosition: \"topLeft\",\n\t\tellipsisWidth: 11,\n\t\tellipsisHeight: 21,\n\t\tellipsisPosX: 57,\n\t\tellipsisPosY: 4,\n\t\tellipsisHoverAreaPadding: 2\n\t},\n\n\tcanvasLayout: {\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for supernode in-place containment area\n\t\t// ---------------------------------------------------------------------------\n\t\tsupernodeLabelPosX: 30,\n\t\tsupernodeLabelPosY: 4,\n\t\tsupernodeLabelWidth: 50,\n\t\tsupernodeLabelHeight: 20,\n\n\t\tsupernodeImageWidth: 18,\n\t\tsupernodeImageHeight: 18,\n\t\tsupernodeImagePosX: 5,\n\t\tsupernodeImagePosY: 4,\n\n\t\tsupernodeEllipsisPosX: -34,\n\t\tsupernodeEllipsisPosY: 2,\n\t\tsupernodeEllipsisWidth: 10,\n\t\tsupernodeEllipsisHeight: 20,\n\n\t\tsupernodeExpansionIconPosX: -21,\n\t\tsupernodeExpansionIconPosY: 4,\n\t\tsupernodeExpansionIconHeight: 18,\n\t\tsupernodeExpansionIconWidth: 18,\n\t\tsupernodeExpansionIconHoverAreaPadding: 2,\n\n\t\tsupernodeErrorPosX: -50,\n\t\tsupernodeErrorPosY: 5,\n\t\tsupernodeErrorWidth: 14,\n\t\tsupernodeErrorHeight: 14,\n\n\t\tsupernodeDefaultWidth: 200,\n\t\tsupernodeDefaultHeight: 200,\n\t\tsupernodeMinWidth: 100,\n\t\tsupernodeMinHeight: 80,\n\t\tsupernodeTopAreaHeight: 25,\n\t\tsupernodeSVGAreaPadding: 3,\n\t\tsupernodeBindingPortRadius: 10,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for links\n\t\t// ---------------------------------------------------------------------------\n\t\t// Specifies which method the links will use. Either: \"Ports\" or \"Freeform\"\n\t\tlinkMethod: LINK_METHOD_PORTS,\n\n\t\t// Specifies the default placement of ports on a node.\n\t\t// TODO - this should be changed to be a node layout property called 'portPlacement'\n\t\t// in the next major release.\n\t\tlinkDirection: LINK_DIR_LEFT_RIGHT,\n\n\t\t// Whether to display a link line when linked node/comments overlap. For\n\t\t// straight links we don't want to show the link when objects overlap but\n\t\t// for ports we do.\n\t\tdisplayLinkOnOverlap: true,\n\n\t\t// The gap between node or comment and the link line.\n\t\tlinkGap: 7,\n\n\t\t// Link decoration dimensions\n\t\tlinkDecoratorHeight: 20,\n\t\tlinkDecoratorWidth: 20,\n\t\tlinkDecoratorPadding: 2,\n\n\t\t// Width and height for label decorators\n\t\tlinkDecoratorLabelWidth: 80,\n\t\tlinkDecoratorLabelHeight: 30,\n\n\t\t// Values for drawing connectors. wrapAroundSpacing and\n\t\t// wrapAroundNodePadding are used when curved connectors are drawn all the\n\t\t// way around a node. ie the target is to the right of the source.\n\t\telbowSize: 10,\n\t\twrapAroundSpacing: 20,\n\t\twrapAroundNodePadding: 10,\n\n\t\t// This is initialized by enableLinkType in the canvas config.\n\t\t// It can be \"Curve\", \"Elbow\", Angle\" or \"Straight\".\n\t\tlinkType: \"Curve\",\n\n\t\t// Display an arrow head on the comment-to-node links. May be set to true to\n\t\t// get a default arrow head or to an SVG string for a custom arrow head.\n\t\tcommentLinkArrowHead: false,\n\n\t\t// Controls display of an arrow head on the data links. May be set to null to\n\t\t// get default behavior which is that arrow heads are displayed on \"Freeform\"\n\t\t// links and not displayed on \"Ports\" links. Or, it can be set to a boolean, as\n\t\t// appropriate, or to an SVG string to display a custom arrow head.\n\t\tdataLinkArrowHead: null,\n\n\t\t// Offset amounts for the link's context toolbar from its default\n\t\t// position.\n\t\tlinkContextToolbarPosX: 0,\n\t\tlinkContextToolbarPosY: 0,\n\n\t\t// The distance in pixels between the start and end points of the link,\n\t\t// below which the alternative decorations for the link will be displayed.\n\t\tlinkDistanceForAltDecorations: 150,\n\n\t\t// Alternative decorations for the link. If specified, this should be an\n\t\t// array of decoration objects.\n\t\tlinkAltDecorations: null,\n\n\t\t// Link handle for input port can be \"circle\" or \"image\".\n\t\tlinkStartHandleObject: \"circle\",\n\n\t\t// Link handle image to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleImage: \"\",\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleWidth: 12,\n\t\tlinkStartHandleHeight: 12,\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkStartHandleRadius: 6,\n\n\t\t// Link handle for input port can be \"circle\" or \"image\".\n\t\tlinkEndHandleObject: \"circle\",\n\n\t\t// Link handle image to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleImage: \"\",\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleWidth: 12,\n\t\tlinkEndHandleHeight: 12,\n\n\t\t// Link handle dimensions to use when linkStartHandleObject is set to \"image\".\n\t\tlinkEndHandleRadius: 6,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for comments\n\t\t// ---------------------------------------------------------------------------\n\t\t// When sizing a comment this decides the size of the corner area for\n\t\t// diagonal sizing.\n\t\tcommentCornerResizeArea: 10,\n\n\t\t// The gap between a comment and its selection highlight rectangle\n\t\tcommentHighlightGap: 4,\n\n\t\t// The gap between a comment and its sizing area rectangle\n\t\tcommentSizingArea: 10,\n\n\t\t// The auto-size status of the comment.\n\t\t// true means the comment height will increase if necessary to show text as it is entered.\n\t\tcommentAutoSize: true,\n\n\t\t// Add comment toolbar action, default offset from viewport\n\t\taddCommentOffsetX: 30,\n\t\taddCommentOffsetY: 50,\n\n\t\t// Comment port (circle) radius\n\t\tcommentPortRadius: 5,\n\n\t\t// Position of the comment toolbar as an offset from the comment position\n\t\t// (which is the top left corner of the comment bounding box).\n\t\tcommentToolbarPosX: -2,\n\t\tcommentToolbarPosY: -36,\n\n\t\t// ---------------------------------------------------------------------------\n\t\t// Layout values for operations\n\t\t// ---------------------------------------------------------------------------\n\t\t// A boolean that lets applications indicate they always want to display the\n\t\t// 'back to parent flow' button in the top left corner of the canvas.\n\t\talwaysDisplayBackToParentFlow: false,\n\n\t\t// The amount of padding added around the canvas objects when doing a\n\t\t// zoomToFit on the primary canvas. This may be overridden by common-canvas\n\t\t// when displaying sub-flows.\n\t\tzoomToFitPadding: 10,\n\n\t\t// Snap to grid type.\n\t\tsnapToGridType: \"None\",\n\n\t\t// Sizes of snap to grid as a percentage of default node height and width.\n\t\t// These can also specified as a number which is a size in pixels.\n\t\tsnapToGridX: \"25%\",\n\t\tsnapToGridY: \"20%\",\n\n\t\t// Display a grid under the canvas objects. This can be \"None\", \"Dots\",\n\t\t// \"DotsAndLines\", \"Boxes\", \"BoxesAndLines\".\n\t\tdisplayGridType: \"None\",\n\n\t\t// Sizes of the displayed grid as a percentage of default node height and width.\n\t\t// These can also specified as a number which is a size in pixels.\n\t\t// The major grid dimensions are used to draw lines when 'displayGridType' is set to\n\t\t// either \"DotsAndLines\" or \"BoxesAndLines\". The minor grid dimensions are used to\n\t\t// draw a grid of dots or boxes. For correct alignment, the major grid dimensions\n\t\t// should be an exact multiple of the minor grid sizes.\n\t\tdisplayGridMajorX: \"100%\",\n\t\tdisplayGridMajorY: \"100%\",\n\n\t\tdisplayGridMinorX: \"25%\",\n\t\tdisplayGridMinorY: \"20%\",\n\n\t\t// Indicates the proximity to a node, when dragging a new connection,\n\t\t// to switch the data-new-link-over attribute to \"yes\".\n\t\tnodeProximity: 20,\n\n\t\t// Adds additional area around the ghost area dragged from the palette\n\t\t// which can increase the possibility of detecting detached links.\n\t\tghostAreaPadding: 10,\n\n\t\t// Offsets the canvas objects within the canvas viewport area when the\n\t\t// canvas is first opened.\n\t\tinitialPanX: null,\n\t\tinitialPanY: null,\n\n\t\t// Values for AutoLayout and AutoNode function\n\t\tautoLayoutInitialMarginX: 50,\n\t\tautoLayoutInitialMarginY: 50,\n\t\tautoLayoutVerticalSpacing: 80,\n\t\tautoLayoutHorizontalSpacing: 80 // For horizontal layout, this may be overridden by space for connections\n\t}\n};\n\n\nexport default class LayoutDimensions {\n\tstatic getLayout(config, overlayLayout = {}) {\n\t\tlet newLayout = this.getDefaultLayout(config);\n\n\t\tif (config) {\n\t\t\tnewLayout = this.overridePortPositions(newLayout, config); // Must do this before overrideNodeLayout\n\t\t\tnewLayout = this.overrideNodeResizable(newLayout, config);\n\t\t\tnewLayout = this.overrideNodeLayout(newLayout, overlayLayout); // Must do this before overrideSnapToGrid\n\t\t\tnewLayout = this.overrideCanvasLayout(newLayout, config, overlayLayout);\n\t\t\tnewLayout = this.overrideLinkType(newLayout, config);\n\t\t\tnewLayout = this.overrideSnapToGrid(newLayout, config);\n\t\t\tnewLayout = this.overrideDisplayGrid(newLayout, config);\n\t\t\tnewLayout = this.overrideAutoLayout(newLayout, config);\n\t\t\tnewLayout = this.overrideArrowHead(newLayout, config);\n\t\t}\n\t\treturn newLayout;\n\t}\n\n\tstatic getDefaultLayout(config) {\n\t\tconst defaultLayout = config && config.enableNodeFormatType === NODE_FORMAT_VERTICAL\n\t\t\t? verticalDefaultLayout\n\t\t\t: horizontalDefaultLayout;\n\n\t\treturn cloneDeep(defaultLayout);\n\t}\n\n\tstatic overrideNodeResizable(layout, config) {\n\t\tlayout.nodeLayout.nodeResizable = config.enableResizableNodes;\n\t\treturn layout;\n\t}\n\n\tstatic overrideNodeLayout(layout, overlayLayout) {\n\t\tlayout.nodeLayout = Object.assign({}, layout.nodeLayout, overlayLayout.nodeLayout || {});\n\n\t\treturn layout;\n\t}\n\n\tstatic overrideCanvasLayout(layout, config, overlayLayout) {\n\t\t// TODO - In a future major release the enableStraightLinksAsFreeform field should be\n\t\t// removed and this override code should be returned to its original behavior where\n\t\t// config.enableLinkMethod should directly override linkMethod in the canvasLayout.\n\t\tconst linkMethod = (config.enableLinkType === \"Straight\" && config.enableStraightLinksAsFreeform)\n\t\t\t? LINK_METHOD_FREEFORM\n\t\t\t: config.enableLinkMethod;\n\n\t\tconst linkDirection = config.enableLinkDirection;\n\n\t\tlayout.canvasLayout = Object.assign({}, layout.canvasLayout, { linkMethod, linkDirection }, overlayLayout.canvasLayout || {});\n\n\t\treturn layout;\n\t}\n\n\t// Overrides the input layout objects with any link type provided by the\n\t// config object.\n\tstatic overrideLinkType(layout, config) {\n\t\tlayout.canvasLayout.linkType = config.enableLinkType || layout.canvasLayout.linkType || \"Curve\";\n\n\t\treturn layout;\n\t}\n\n\t// Overrides the snap-to-grid values in the layout object with any\n\t// snap-to-grid values provided in the config object.\n\tstatic overrideSnapToGrid(layout, config) {\n\t\tif (config.enableSnapToGridType) {\n\t\t\tlayout.canvasLayout.snapToGridType = config.enableSnapToGridType;\n\t\t}\n\n\t\t// Snap to grid configuration. 25% for X and 20% for Y (of node width and\n\t\t// height) by default. It can be overridden by the config which can be either\n\t\t// a number or a percentage of the node width/height.\n\t\tlayout.canvasLayout.snapToGridX = config.enableSnapToGridX || layout.canvasLayout.snapToGridX || \"25%\";\n\t\tlayout.canvasLayout.snapToGridY = config.enableSnapToGridY || layout.canvasLayout.snapToGridY || \"20%\";\n\n\t\t// Set the snap-to-grid sizes in pixels.\n\t\tlayout.canvasLayout.snapToGridXPx = this.getGridSize(layout.canvasLayout.snapToGridX, layout.nodeLayout.defaultNodeWidth);\n\t\tlayout.canvasLayout.snapToGridYPx = this.getGridSize(layout.canvasLayout.snapToGridY, layout.nodeLayout.defaultNodeHeight);\n\n\t\treturn layout;\n\t}\n\n\t// Calculates the displayed grid values in pixels from the dimensions provided\n\t// in the layout object for the major and minor grid values.\n\tstatic overrideDisplayGrid(layout, config) {\n\t\tconst defaultCanvasLayout = config && config.enableNodeFormatType === NODE_FORMAT_VERTICAL\n\t\t\t? verticalDefaultLayout.canvasLayout\n\t\t\t: horizontalDefaultLayout.canvasLayout;\n\n\t\tconst defaultMajorX = defaultCanvasLayout.displayGridMajorX;\n\t\tconst defaultMajorY = defaultCanvasLayout.displayGridMajorY;\n\t\tconst defaultMinorX = defaultCanvasLayout.displayGridMinorX;\n\t\tconst defaultMinorY = defaultCanvasLayout.displayGridMinorY;\n\n\t\tlayout.canvasLayout.displayGridMajorX = layout.canvasLayout.displayGridMajorX || defaultMajorX;\n\t\tlayout.canvasLayout.displayGridMajorY = layout.canvasLayout.displayGridMajorY || defaultMajorY;\n\t\tlayout.canvasLayout.displayGridMinorX = layout.canvasLayout.displayGridMinorX || defaultMinorX;\n\t\tlayout.canvasLayout.displayGridMinorY = layout.canvasLayout.displayGridMinorY || defaultMinorY;\n\n\t\tlayout.canvasLayout.displayGridMajorPx = this.getGridSize(layout.canvasLayout.displayGridMajorX, layout.nodeLayout.defaultNodeWidth);\n\t\tlayout.canvasLayout.displayGridMajorPy = this.getGridSize(layout.canvasLayout.displayGridMajorY, layout.nodeLayout.defaultNodeHeight);\n\t\tlayout.canvasLayout.displayGridMinorPx = this.getGridSize(layout.canvasLayout.displayGridMinorX, layout.nodeLayout.defaultNodeWidth);\n\t\tlayout.canvasLayout.displayGridMinorPy = this.getGridSize(layout.canvasLayout.displayGridMinorY, layout.nodeLayout.defaultNodeHeight);\n\n\t\treturn layout;\n\t}\n\n\t// Overrides the auto-layout values in the layout object with any\n\t// auto-layout values provided in the config object.\n\tstatic overrideAutoLayout(layout, config) {\n\t\tlayout.canvasLayout.autoLayoutVerticalSpacing = this.getAutoLayoutSpacing(config.enableAutoLayoutVerticalSpacing, layout.canvasLayout.autoLayoutVerticalSpacing);\n\t\tlayout.canvasLayout.autoLayoutHorizontalSpacing = this.getAutoLayoutSpacing(config.enableAutoLayoutHorizontalSpacing, layout.canvasLayout.autoLayoutHorizontalSpacing);\n\n\t\treturn layout;\n\t}\n\n\tstatic getAutoLayoutSpacing(configAutoLayoutSpacing, layoutAutoLayoutSpacing) {\n\t\tlet spacing = 80;\n\t\tif (typeof configAutoLayoutSpacing !== \"undefined\" && configAutoLayoutSpacing !== null) {\n\t\t\tspacing = configAutoLayoutSpacing;\n\t\t} else if (typeof layoutAutoLayoutSpacing !== \"undefined\" && layoutAutoLayoutSpacing !== null) {\n\t\t\tspacing = layoutAutoLayoutSpacing;\n\t\t}\n\t\treturn spacing;\n\t}\n\n\t// Returns a grid size in pixels based on the gridSizeStr passed in\n\t// which can be either a numeric value (which is taken as the number of pixels)\n\t// or a numeric value with a % sign at the end which is taken as the percentage\n\t// of the defaultNodeSize passed in.\n\tstatic getGridSize(gridSizeStr, defaultNodeSize) {\n\t\tif (gridSizeStr.endsWith(\"%\")) {\n\t\t\treturn (Number.parseFloat(gridSizeStr) / 100) * defaultNodeSize;\n\t\t}\n\t\treturn Number.parseFloat(gridSizeStr);\n\t}\n\n\t// Overrides the port positioning fields in the layout based on the type of node\n\t// and the link direction.\n\tstatic overridePortPositions(layout, config) {\n\t\tif (config.enableLinkDirection === \"BottomTop\") {\n\t\t\tlayout.nodeLayout.inputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: 0, pos: \"bottomCenter\" }\n\t\t\t];\n\t\t\tlayout.nodeLayout.outputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: 0, pos: \"topCenter\" }\n\t\t\t];\n\n\t\t} else if (config.enableLinkDirection === \"TopBottom\") {\n\t\t\tlayout.nodeLayout.inputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: 0, pos: \"topCenter\" }\n\t\t\t];\n\t\t\tlayout.nodeLayout.outputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: 0, pos: \"bottomCenter\" }\n\t\t\t];\n\n\t\t} else if (config.enableLinkDirection === \"RightLeft\") {\n\t\t\tconst yPos = layout.nodeLayout.inputPortPositions[0].y_pos;\n\t\t\tlayout.nodeLayout.inputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: yPos, pos: \"topRight\" }\n\t\t\t];\n\t\t\tlayout.nodeLayout.outputPortPositions = [\n\t\t\t\t{ x_pos: 0, y_pos: yPos, pos: \"topLeft\" }\n\t\t\t];\n\t\t}\n\t\treturn layout;\n\t}\n\n\t// Sets the default arrow head for node (data) links if dataLinkArrowHead is null\n\t// otherwise it just uses the current dataLinkArrowHead setting.\n\tstatic overrideArrowHead(layout, config) {\n\t\tif (layout.canvasLayout.dataLinkArrowHead === null) {\n\t\t\t// TODO -- the second part of this if should be removed when enableStraightLinksAsFreeform\n\t\t\t// is removed in the next major release.\n\t\t\tif ((config.enableLinkMethod === LINK_METHOD_FREEFORM ||\n\t\t\t\t\t(config.enableStraightLinksAsFreeform && config.enableLinkType === LINK_TYPE_STRAIGHT))) {\n\t\t\t\tlayout.canvasLayout.dataLinkArrowHead = true;\n\t\t\t} else {\n\t\t\t\tlayout.canvasLayout.dataLinkArrowHead = false;\n\t\t\t}\n\t\t}\n\t\treturn layout;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This class contains utility functions that may be used for working with\n// the canvas config object.\n\nimport { isMatch, isMatchWith, omit } from \"lodash\";\nimport LayoutDimensions from \"./layout-dimensions.js\";\nimport {\n\tASSOC_STRAIGHT,\n\tLINK_SELECTION_NONE,\n\tNODE_FORMAT_HORIZONTAL,\n\tPALETTE_LAYOUT_FLYOUT\n} from \"../common-canvas/constants/canvas-constants\";\n\nexport default class ConfigUtils {\n\n\t// Returns a config object which is the result of merging config into\n\t// startConfig.\n\tstatic mergeCanvasConfigs(startConfig, config) {\n\t\tlet newConfig = Object.assign({}, startConfig, config || {});\n\n\t\tif (config) {\n\t\t\tconst newLayout = LayoutDimensions.getLayout(newConfig,\n\t\t\t\t{ nodeLayout: config.enableNodeLayout, canvasLayout: config.enableCanvasLayout });\n\t\t\tconst newTipConfig = Object.assign({}, startConfig.tipConfig, config.tipConfig);\n\n\t\t\tnewConfig = Object.assign({}, newConfig, {\n\t\t\t\tenableNodeLayout: newLayout.nodeLayout,\n\t\t\t\tenableCanvasLayout: newLayout.canvasLayout,\n\t\t\t\ttipConfig: newTipConfig\n\t\t\t});\n\t\t}\n\n\t\treturn newConfig;\n\t}\n\n\t// Returns the set of default config values.\n\tstatic getDefaultCanvasConfig() {\n\t\tconst config = {\n\t\t\t// Do not initialize paletteInitialState here. It needs to be undefined\n\t\t\t// for openPaletteIfNecessary to work.\n\t\t\t// TODO Remove this when paletteInitialState is removed from common-canvas.\n\t\t\t// paletteInitialState: false,\n\t\t\tenableInteractionType: \"Mouse\",\n\t\t\tenableNodeFormatType: NODE_FORMAT_HORIZONTAL,\n\t\t\tenableLinkType: \"Curve\",\n\t\t\tenableStraightLinksAsFreeform: true, // TODO - Remove in next major release.\n\t\t\tenableLinkMethod: \"Ports\",\n\t\t\tenableLinkDirection: \"LeftRight\",\n\t\t\tenableLinkSelection: LINK_SELECTION_NONE,\n\t\t\tenableLinkReplaceOnNewConnection: false,\n\t\t\tenableSplitLinkDroppedOnNode: false,\n\t\t\tenableRaiseLinksToTopOnHover: false,\n\t\t\tenableSelfRefLinks: false,\n\t\t\tenableAssocLinkCreation: false,\n\t\t\tenableAssocLinkType: ASSOC_STRAIGHT,\n\t\t\tenableDragWithoutSelect: false,\n\t\t\tenableInternalObjectModel: true,\n\t\t\tenablePaletteLayout: PALETTE_LAYOUT_FLYOUT,\n\t\t\tenablePaletteHeader: null,\n\t\t\tenableToolbarLayout: \"Top\",\n\t\t\tenableImageDisplay: \"SVGInline\",\n\t\t\tenableResizableNodes: false,\n\t\t\tenableInsertNodeDroppedOnLink: false,\n\t\t\tenableHighlightNodeOnNewLinkDrag: false,\n\t\t\tenableHighlightUnavailableNodes: false,\n\t\t\tenableMoveNodesOnSupernodeResize: true,\n\t\t\tenableRaiseNodesToTopOnHover: true,\n\t\t\tenableExternalPipelineFlows: true,\n\t\t\tenableEditingActions: true,\n\t\t\tenableDisplayFullLabelOnHover: false,\n\t\t\tenableDropZoneOnExternalDrag: false,\n\t\t\tenableLeftFlyoutUnderToolbar: false,\n\t\t\tenableRightFlyoutUnderToolbar: false,\n\t\t\tenableRightFlyoutDragToResize: false,\n\t\t\tenablePanIntoViewOnOpen: false,\n\t\t\tenableZoomIntoSubFlows: false,\n\t\t\tenableBrowserEditMenu: true,\n\t\t\tenableMarkdownInComments: false,\n\t\t\tenableMarkdownHTML: true,\n\t\t\tenableWYSIWYGComments: false,\n\t\t\tenableMoveNodesInComment: false,\n\t\t\tenableKeyboardNavigation: false,\n\t\t\tenableAutoLinkOnlyFromSelNodes: false,\n\t\t\tenableSingleClickAddFromPalette: false,\n\t\t\tenableContextToolbar: false,\n\t\t\tenableSaveZoom: \"None\",\n\t\t\tenableSnapToGridType: \"None\",\n\t\t\tenableSnapToGridX: null,\n\t\t\tenableSnapToGridY: null,\n\t\t\tenableAutoLayoutVerticalSpacing: null,\n\t\t\tenableAutoLayoutHorizontalSpacing: null,\n\t\t\tenableSingleOutputPortDisplay: false,\n\t\t\tenableNarrowPalette: true,\n\t\t\tschemaValidation: false,\n\t\t\tenableFocusOnMount: true,\n\t\t\tenableBoundingRectangles: false, // Not documented\n\t\t\tenableCanvasUnderlay: \"None\", // Not documented\n\t\t\tenableParentClass: \"\",\n\t\t\tenablePositionNodeOnRightFlyoutOpen: false, // May also be an object: { x: 5, y: 5 }\n\t\t\temptyCanvasContent: null,\n\t\t\tdropZoneCanvasContent: null,\n\t\t\tenableNodeLayout: {},\n\t\t\tenableCanvasLayout: {}, // Not documented\n\t\t\tenableUseCardFromOriginalPorts: false, // Not documented\n\t\t\ttipConfig: {\n\t\t\t\t\"palette\": {\n\t\t\t\t\tcategories: true,\n\t\t\t\t\tnodeTemplates: true\n\t\t\t\t},\n\t\t\t\t\"nodes\": true,\n\t\t\t\t\"ports\": true,\n\t\t\t\t\"decorations\": true,\n\t\t\t\t\"links\": true,\n\t\t\t\t\"stateTag\": true\n\t\t\t}\n\t\t};\n\n\t\tconst newLayout = LayoutDimensions.getLayout(config);\n\t\tconfig.enableNodeLayout = newLayout.nodeLayout;\n\t\tconfig.enableCanvasLayout = newLayout.canvasLayout;\n\n\t\treturn config;\n\t}\n\n\t// Returns true if the two canvas config object compare the same. This is\n\t// used to decide if a full refresh of the canvas is required. It omits\n\t// some fields that do not need to be taken into account when deciding\n\t// if a full refresh of the canvas is required.\n\tstatic compareCanvasConfigsOmitFields(c1, c2) {\n\t\tconst config1 = this.omitFields(c1);\n\t\tconst config2 = this.omitFields(c2);\n\t\treturn this.compareCanvasConfigs(config1, config2);\n\t}\n\n\t// Returns true if the two canvas config object compare the same.\n\tstatic compareCanvasConfigs(config1, config2) {\n\t\tlet state = false;\n\n\t\t// Check the two objects have the same number of fields before comparing\n\t\t// the details.\n\t\tif (Object.keys(config1).length === Object.keys(config2).length) {\n\t\t\tstate = isMatchWith(config1, config2, (objValue, srcValue, key) => {\n\t\t\t\tswitch (key) {\n\t\t\t\tcase \"enablePositionNodeOnRightFlyoutOpen\": {\n\t\t\t\t\treturn this.enableNodeRightFlyoutOpenExactlyMatches(objValue, srcValue);\n\t\t\t\t}\n\t\t\t\tcase \"enableCanvasLayout\": {\n\t\t\t\t\treturn this.enableCanvasLayoutExactlyMatches(objValue, srcValue);\n\t\t\t\t}\n\t\t\t\tcase \"enableNodeLayout\": {\n\t\t\t\t\treturn this.enableNodeLayoutExactlyMatches(objValue, srcValue);\n\t\t\t\t}\n\t\t\t\tcase \"tipConfig\": {\n\t\t\t\t\treturn this.enableTipConfigExactlyMatches(objValue, srcValue);\n\t\t\t\t}\n\t\t\t\t// All other config fields will be compared as values or object pointers\n\t\t\t\tdefault: {\n\t\t\t\t\treturn objValue === srcValue;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn state;\n\t}\n\n\t// Some fields can be omitted from the config comparison because they do not\n\t// need to cause a full canvas refresh.\n\t// TODO - It would probably be better to go through the config fields and\n\t// decide which require a full refresh of the canvas and only compare those\n\t// fields rather than omitting certain fields.\n\tstatic omitFields(config) {\n\t\treturn omit(config, [\n\t\t\t\"enableEditingActions\",\n\t\t\t\"enableDropZoneOnExternalDrag\",\n\t\t\t\"enableStateTag\",\n\t\t\t\"enablePaletteHeader\",\n\t\t\t\"enableKeyboardNavigation\",\n\t\t\t\"enableRightFlyoutDragToResize\"\n\t\t]);\n\t}\n\n\t// Returns true if the contents of enablePositionNode1 and enablePositionNode2 are\n\t// exactly the same.\n\tstatic enableNodeRightFlyoutOpenExactlyMatches(enablePositionNode1, enablePositionNode2) {\n\t\tif (typeof enablePositionNode1 === \"boolean\" &&\n\t\t\t\ttypeof enablePositionNode2 === \"boolean\") {\n\t\t\treturn enablePositionNode1 === enablePositionNode2;\n\n\t\t} else if (typeof enablePositionNode1 === \"object\" &&\n\t\t\t\t\t\t\t\ttypeof enablePositionNode2 === \"object\") {\n\t\t\tif (enablePositionNode1.x === enablePositionNode2.x &&\n\t\t\t\t\tenablePositionNode1.y === enablePositionNode2.y) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t// Returns true if the contents of enableLayout1 and enableLayout2 are\n\t// exactly the same.\n\tstatic enableCanvasLayoutExactlyMatches(enableLayout1, enableLayout2) {\n\t\tif (!enableLayout1 && !enableLayout2) {\n\t\t\treturn true;\n\n\t\t} else if (this.compareFieldCount(enableLayout1, enableLayout2) &&\n\t\t\t\t\t\t\t\tisMatch(enableLayout1, enableLayout2)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t// Returns true if the contents of enableLayout1 and enableLayout2 including\n\t// their decorations arrays are exactly the same.\n\tstatic enableNodeLayoutExactlyMatches(enableLayout1, enableLayout2) {\n\t\tif (!enableLayout1 && !enableLayout2) {\n\t\t\treturn true;\n\n\t\t} else if (this.compareFieldCount(enableLayout1, enableLayout2) &&\n\t\t\t\t\t\t\t\tisMatch(enableLayout1, enableLayout2) &&\n\t\t\t\t\t\t\t\tthis.decorationsArraysExactlyMatches(enableLayout1.decorations, enableLayout2.decorations)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t// Returns true if two decorations arrays passed in are identical or false\n\t// otherwise.\n\tstatic \tdecorationsArraysExactlyMatches(decorations1, decorations2) {\n\t\tif (!decorations1 && !decorations2) {\n\t\t\treturn true;\n\n\t\t} else if (!decorations1 || !decorations2) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet state = true;\n\t\tdecorations1.forEach((dec1, i) => {\n\t\t\tconst dec2 = decorations2[i];\n\t\t\tif (dec2) {\n\t\t\t\tif (!isMatch(dec1, dec2) || !isMatch(dec2, dec1)) {\n\t\t\t\t\tstate = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstate = false;\n\t\t\t}\n\t\t});\n\t\treturn state;\n\t}\n\n\t// Returns true if two tip config objects passed in are identical or false\n\t// otherwise.\n\tstatic enableTipConfigExactlyMatches(tipConfig1, tipConfig2) {\n\t\tif (!tipConfig1 && !tipConfig2) {\n\t\t\treturn true;\n\n\t\t} else if (!tipConfig1 || !tipConfig2) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (this.compareFieldCount(tipConfig1, tipConfig2) &&\n\t\t\t\t\t\tisMatch(tipConfig1, tipConfig2));\n\t}\n\n\tstatic compareFieldCount(obj1, obj2) {\n\t\treturn Object.keys(obj1).length === Object.keys(obj2).length;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class ArrangeLayoutAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper();\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.layoutDirection = data.layoutDirection; // \"horizontal\" or \"vertical\"\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline();\n\n\t\t// Copy the nodes to remember their original positions.\n\t\tthis.existingNodes = this.apiPipeline.getNodes().map((n) => ({ ...n }));\n\n\t\t// Copy the links (including detached links) to remember their original positions.\n\t\tthis.existingLinks = this.apiPipeline.getLinks().map((n) => ({ ...n }));\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.autoLayout(this.layoutDirection);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.replaceNodes(this.existingNodes);\n\t\tthis.apiPipeline.updateLinks(this.existingLinks);\n\t}\n\n\tredo() {\n\t\tthis.apiPipeline.autoLayout(this.layoutDirection);\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.arrangeLayout\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils.js\";\n\nexport default class AttachNodeToLinksAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.node = data.node;\n\t\tthis.linksToUpdateInfo = CanvasUtils.getDetachedLinksToUpdate(\n\t\t\tthis.node, this.data.detachedLinks, this.apiPipeline.getNodeDataLinks());\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.linksToUpdateInfo = this.linksToUpdateInfo;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.moveObjects({ nodes: [this.node.id], offsetX: this.data.offsetX, offsetY: this.data.offsetY });\n\t\tthis.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks);\n\t\tthis.apiPipeline.moveObjects({ nodes: [this.node.id], offsetX: -this.data.offsetX, offsetY: -this.data.offsetY });\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.attachNodeToLinks\", { node_label: this.node.label });\n\t}\n\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport { USE_DEFAULT_ICON, USE_DEFAULT_EXT_ICON }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class ConvertSuperNodeExternalToLocal extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\n\t\t// To do a complete conversion of the supernode's contents to local, we need\n\t\t// to make sure the pipeline is loaded. This will load the pipeline flow,\n\t\t// if it is not already loaded.\n\t\tthis.pipelineFlowLoaded = this.objectModel.ensurePipelineIsLoaded(this.data);\n\n\t\tthis.oldSupernode = this.apiPipeline.getNode(this.data.targetObject.id);\n\n\t\t// Find the pipelines and flows to remove. This will only return pipelines\n\t\t// that are NOT referenced by other supernodes on the canvas.\n\t\tthis.oldPipelines = this.objectModel.getDescPipelinesToDelete([this.oldSupernode], this.data.pipelineId);\n\t\tthis.oldPipelines = this.oldPipelines.filter((p) => p.parentUrl === this.data.externalUrl);\n\t\tthis.oldExtPipelineFlows = this.objectModel.getExternalPipelineFlowsForPipelines(this.oldPipelines);\n\n\t\t// Clone the supernode\n\t\tthis.newSupernode = Object.assign({}, this.oldSupernode, { subflow_ref: Object.assign({}, this.oldSupernode.subflow_ref) });\n\t\tthis.newSupernode.image =\n\t\t\tthis.newSupernode.image === USE_DEFAULT_EXT_ICON ? USE_DEFAULT_ICON : this.newSupernode.image;\n\t\tdelete this.newSupernode.subflow_ref.url;\n\n\t\t// Clone pipelines\n\t\tconst pipelinesToClone = this.objectModel.getDescendantPipelinesForSupernode(this.newSupernode)\n\t\t\t.filter((p) => p.parentUrl === this.data.externalUrl);\n\t\tthis.newPipelines = this.objectModel.cloneSupernodeContents(this.newSupernode, pipelinesToClone);\n\t\tthis.newPipelines = this.newPipelines.map((p) => {\n\t\t\tdelete p.parentUrl;\n\t\t\treturn p;\n\t\t});\n\t}\n\n\tdo() {\n\t\t// Replace the supernode, pipelines and external flows\n\t\tthis.objectModel.replaceSupernodeAndPipelines({\n\t\t\tpipelineId: this.data.pipelineId, // Used by canvasinfo reducer\n\t\t\ttopSupernode: this.newSupernode, // Used by nodes reducer\n\t\t\tpipelinesToAdd: this.newPipelines, // Used by canvasinfo reducer\n\t\t\tpipelinesToRemove: this.oldPipelines, // Used by canvasinfo reducer\n\t\t\textPipelineFlowsToAdd: [], // Used by externalpipelineflows reducer\n\t\t\textPipelineFlowsToDelete: this.oldExtPipelineFlows // Used by externalpipelineflows reducer\n\t\t});\n\t}\n\n\tundo() {\n\t\t// Replace the supernode, pipelines and external flows\n\t\tthis.objectModel.replaceSupernodeAndPipelines({\n\t\t\tpipelineId: this.data.pipelineId, // Used by canvasinfo reducer\n\t\t\ttopSupernode: this.oldSupernode, // Used by nodes reducer\n\t\t\tpipelinesToAdd: this.oldPipelines, // Used by canvasinfo reducer\n\t\t\tpipelinesToRemove: this.newPipelines, // Used by canvasinfo reducer\n\t\t\textPipelineFlowsToAdd: this.oldExtPipelineFlows, // Used by externalpipelineflows reducer\n\t\t\textPipelineFlowsToDelete: [] // Used by externalpipelineflows reducer\n\t\t});\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.convertSuperNodeExternalToLocal\", { node_label: this.oldSupernode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport { USE_DEFAULT_ICON, USE_DEFAULT_EXT_ICON }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class ConvertSuperNodeLocalToExternal extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\n\t\tthis.oldSupernode = this.apiPipeline.getNode(this.data.targetObject.id);\n\n\t\t// Clone the supernode\n\t\tthis.newSupernode = Object.assign({}, this.oldSupernode, { subflow_ref: Object.assign({}, this.oldSupernode.subflow_ref) });\n\t\tthis.newSupernode.image =\n\t\t\tthis.newSupernode.image === USE_DEFAULT_ICON ? USE_DEFAULT_EXT_ICON : this.newSupernode.image;\n\t\tthis.newSupernode.subflow_ref.url = this.data.externalUrl;\n\n\t\tconst descPipelines = this.objectModel.getDescendantPipelinesForSupernode(this.oldSupernode);\n\t\tthis.oldPipelines = descPipelines.filter((p) => !p.parentUrl); // Filter the local pipelines\n\n\t\t// Clone pipelines\n\t\tthis.newPipelines = this.objectModel.cloneSupernodeContents(this.newSupernode, this.oldPipelines);\n\t\tthis.newPipelines = this.newPipelines.map((p) => {\n\t\t\tp.parentUrl = this.data.externalUrl;\n\t\t\treturn p;\n\t\t});\n\n\t\tthis.newPipelineFlow =\n\t\t\tthis.objectModel.createExternalPipelineFlowTemplate(\n\t\t\t\tthis.data.pipelineFlowId, this.newSupernode.subflow_ref.pipeline_id_ref);\n\t\tthis.newPipelineFlow.pipelines = [];\n\t\tthis.newPipelineFlow.url = this.data.externalUrl;\n\t}\n\n\tdo() {\n\t\t// Replace the supernode, pipelines and external pipeline flow\n\t\tthis.objectModel.replaceSupernodeAndPipelines({\n\t\t\tpipelineId: this.data.pipelineId, // Used by canvasinfo reducer\n\t\t\ttopSupernode: this.newSupernode, // Used by nodes reducer\n\t\t\tpipelinesToAdd: this.newPipelines, // Used by canvasinfo reducer\n\t\t\tpipelinesToRemove: this.oldPipelines, // Used by canvasinfo reducer\n\t\t\textPipelineFlowsToAdd: [this.newPipelineFlow], // Used by externalpipelineflows reducer\n\t\t\textPipelineFlowsToDelete: [] // Used by externalpipelineflows reducer\n\n\t\t});\n\t}\n\n\tundo() {\n\t\t// Replace the supernode, pipelines and external pipeline flow\n\t\tthis.objectModel.replaceSupernodeAndPipelines({\n\t\t\tpipelineId: this.data.pipelineId, // Used by canvasinfo reducer\n\t\t\ttopSupernode: this.oldSupernode, // Used by nodes reducer\n\t\t\tpipelinesToAdd: this.oldPipelines, // Used by canvasinfo reducer\n\t\t\tpipelinesToRemove: this.newPipelines, // Used by canvasinfo reducer\n\t\t\textPipelineFlowsToAdd: [], // Used by externalpipelineflows reducer\n\t\t\textPipelineFlowsToDelete: [this.newPipelineFlow] // Used by externalpipelineflows reducer\n\t\t});\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.convertSuperNodeLocalToExternal\", { node_label: this.oldSupernode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateAutoNodeAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\t// If addLink is missing we default it to be true.\n\t\tthis.data.addLink = typeof this.data.addLink === \"undefined\" ? true : this.data.addLink;\n\n\t\tconst autoLinkOnlyFromSelNodes = canvasController.getCanvasConfig().enableAutoLinkOnlyFromSelNodes;\n\t\tthis.srcNode = this.apiPipeline.getAutoSourceNode(autoLinkOnlyFromSelNodes);\n\t\tthis.newNode = this.apiPipeline.createAutoNode(data, this.srcNode);\n\t\tthis.newLink = null;\n\t\tif (this.data.addLink && this.apiPipeline.isLinkNeededWithAutoNode(this.newNode, this.srcNode)) {\n\t\t\tthis.newLink = this.apiPipeline.createLink(this.newNode, this.srcNode);\n\t\t}\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.sourceNode = this.srcNode;\n\t\tthis.data.newNode = this.newNode;\n\t\tthis.data.newLink = this.newLink;\n\t\tthis.data.subPipeline = this.subPipelines;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.addNode(this.newNode);\n\n\t\tif (this.newLink) {\n\t\t\tthis.apiPipeline.addLink(this.newLink);\n\t\t}\n\n\t\tthis.objectModel.setSelections([this.newNode.id], this.data.pipelineId);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteNodes([this.newNode]);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNode\", { node_label: this.newNode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { CANVAS_FOCUS } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class CreateCommentAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\n\t\tthis.comment = this.apiPipeline.createComment(data);\n\t}\n\n\tgetData() {\n\t\tthis.data.comment = this.comment;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.addComment(this.comment);\n\t\tthis.focusObject = this.comment;\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteComment(this.comment.id);\n\t\tthis.focusObject = CANVAS_FOCUS;\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createComment\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateCommentLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.linkCommentList = this.apiPipeline.createCommentLinks(data);\n\t}\n\n\tgetData() {\n\t\tthis.data.linkIds = this.linkCommentList.map((link) => link.id);\n\t\tthis.data.linkType = \"comment\"; // Added for historical purposes - for WML Canvas support\n\t\treturn this.data;\n\t}\n\n\tdo() {\n\t\tthis.apiPipeline.addLinks(this.linkCommentList);\n\t}\n\n\tundo() {\n\t\tthis.linkCommentList.forEach((link) => {\n\t\t\tthis.apiPipeline.deleteLink(link);\n\t\t});\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createCommentLink\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateNodeAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.newNode = this.apiPipeline.createNode(data);\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.newNode = this.newNode;\n\t\tthis.data.subPipelines = this.subPipelines;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.addNode(this.newNode);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteNodes([this.newNode]);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNode\", { node_label: this.newNode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateNodeLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.actionLabel = this.createActionLabel();\n\t}\n\n\tgetData() {\n\t\tthis.data.linkIds = this.linkNodeList.map((link) => link.id);\n\t\tthis.data.linkType = \"data\"; // Added for historical purposes - for WML Canvas support\n\t\treturn this.data;\n\t}\n\n\tdo() {\n\t\tif (this.data.replaceLink) {\n\t\t\tthis.apiPipeline.deleteLink(this.data.replaceLink);\n\t\t}\n\t\t// Create links here because in a replace-link scenario we need to delete\n\t\t// the replaceLink before creating new links.\n\t\tthis.linkNodeList = this.apiPipeline.createNodeLinks(this.data);\n\t\tthis.apiPipeline.addLinks(this.linkNodeList);\n\t}\n\n\tundo() {\n\t\tthis.linkNodeList.forEach((link) => {\n\t\t\tthis.apiPipeline.deleteLink(link);\n\t\t});\n\t\tif (this.data.replaceLink) {\n\t\t\tthis.apiPipeline.addLinks([this.data.replaceLink]);\n\t\t}\n\t}\n\n\tredo() {\n\t\tif (this.data.replaceLink) {\n\t\t\tthis.apiPipeline.deleteLink(this.data.replaceLink);\n\t\t}\n\t\tthis.apiPipeline.addLinks(this.linkNodeList);\n\t}\n\n\tgetLabel() {\n\t\treturn this.actionLabel;\n\t}\n\n\tcreateActionLabel() {\n\t\tconst targetNodeLabel = this.getTargetNodeLabel();\n\t\tif (this.data.replaceLink) {\n\t\t\treturn this.labelUtil.getActionLabel(this, \"action.replaceNodeLink\", { node_label: targetNodeLabel });\n\t\t}\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNodeLink\", { node_label: targetNodeLabel });\n\t}\n\n\t// Returns the target node label. It makes sure the target node is there just\n\t// to be safe: it would be a bug if target node wasn't there. Also,\n\t// although targetNodes is an array this is a historical artifact and in\n\t// reality targetNodes will only even have one element.\n\tgetTargetNodeLabel() {\n\t\tconst targetNode = this.data.targetNodes && this.data.targetNodes.length > 0\n\t\t\t? this.apiPipeline.getNode(this.data.targetNodes[0].id)\n\t\t\t: {};\n\t\treturn targetNode.label;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateNodeLinkDetachedAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.detachedLink = this.apiPipeline.createNodeLinkDetached(data);\n\t}\n\n\tgetData() {\n\t\treturn this.data;\n\t}\n\n\tdo() {\n\t\tthis.apiPipeline.addLinks([this.detachedLink]);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteLink(this.detachedLink);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNodeLinkDetached\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class CreateNodeOnLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.newNode = this.apiPipeline.createNode(data);\n\n\t\tthis.firstLinkSrcInfo = {\n\t\t\tid: data.link.srcNodeId,\n\t\t\tportId: data.link.srcNodePortId\n\t\t};\n\n\t\tthis.firstLinkTrgInfo = {\n\t\t\tid: this.newNode.id\n\t\t};\n\n\t\tthis.secondLinkSrcInfo = {\n\t\t\tid: this.newNode.id\n\t\t};\n\n\t\tthis.secondLinkTrgInfo = {\n\t\t\tid: data.link.trgNodeId,\n\t\t\tportId: data.link.trgNodePortId\n\t\t};\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.newNode = this.newNode;\n\t\tthis.data.newFirstLink = this.firstLink;\n\t\tthis.data.newSecondLink = this.secondLink;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.deleteLink({ id: this.data.link.id });\n\t\tthis.apiPipeline.addNode(this.newNode);\n\t\t// The new node must be added to the canvas before trying to create the\n\t\t// links because the link creation code requires linked nodes to exist.\n\t\tthis.firstLink = this.apiPipeline.createNodeLink(this.firstLinkSrcInfo, this.firstLinkTrgInfo);\n\t\tthis.secondLink = this.apiPipeline.createNodeLink(this.secondLinkSrcInfo, this.secondLinkTrgInfo);\n\t\tthis.apiPipeline.addLinks([this.firstLink, this.secondLink]);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteLink({ id: this.firstLink.id });\n\t\tthis.apiPipeline.deleteLink({ id: this.secondLink.id });\n\t\tthis.apiPipeline.deleteNodes([this.newNode]);\n\t\tthis.apiPipeline.addLinks([this.data.link]);\n\t}\n\n\tredo() {\n\t\tthis.apiPipeline.deleteLink({ id: this.data.link.id });\n\t\tthis.apiPipeline.addNode(this.newNode);\n\t\tthis.apiPipeline.addLinks([this.firstLink, this.secondLink]);\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNodeOnLink\", { node_label: this.newNode.label });\n\t}\n\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils.js\";\n\nexport default class CreateNodeAttachLinksAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.newNode = this.apiPipeline.createNode(data);\n\t\tthis.linksToUpdateInfo = CanvasUtils.getDetachedLinksToUpdate(\n\t\t\tthis.newNode, this.data.detachedLinks, this.apiPipeline.getNodeDataLinks());\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.newNode = this.newNode;\n\t\tthis.data.linksToUpdateInfo = this.linksToUpdateInfo;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.addNode(this.newNode);\n\t\tthis.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks);\n\t\tthis.apiPipeline.deleteNodes([this.newNode]);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createNodeAttachLinks\", { node_label: this.newNode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\nimport { ASSOCIATION_LINK, COMMENT_LINK, NODE_LINK,\n\tSUPER_NODE, USE_DEFAULT_ICON, USE_DEFAULT_EXT_ICON }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nconst BOUNDING_RECT_PADDING = 80;\n\nexport default class CreateSuperNodeAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.data = data;\n\t\tthis.useCardFromOriginalPorts = canvasController.getCanvasConfig().enableUseCardFromOriginalPorts;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\n\t\tthis.subflowNodes = this.objectModel.getSelectedNodes();\n\t\tthis.subflowComments = this.objectModel.getSelectedComments();\n\t\tthis.subflowRect = this.apiPipeline.getBoundingRectForNodes(this.subflowNodes);\n\n\t\tthis.linksToDelete = [];\n\n\t\t// Get the subflow links - this is all links which go to and from the nodes\n\t\t// and comments that are to be included in the subflow. No link is repeated\n\t\t// in the arrays.\n\t\tconst uniqueSubflowLinks = this.getUniqueSubflowLinks(this.data.selectedObjectIds);\n\t\tthis.subflowNodeLinks = this.getSubflowNodeLinks(uniqueSubflowLinks);\n\t\tthis.subflowCommentLinks = this.getSubflowCommentLinks(uniqueSubflowLinks);\n\n\t\t// Filter comment links to remove any un-needed links\n\t\tthis.subflowCommentLinks = this.filterCommentLinks(this.subflowCommentLinks, this.subflowComments);\n\n\t\t// Create an array with both node and comment links\n\t\tthis.subflowLinks = this.subflowNodeLinks.concat(this.subflowCommentLinks);\n\n\t\t// Determine supernode input and output links. These functions will also\n\t\t// add links to this.subFlowLinks and this.linksToDelete arrays.\n\t\tthis.subflowInputLinks = this.createOrderedSubflowInputLinks(this.subflowNodeLinks);\n\t\tthis.subflowOutputLinks = this.createOrderedSubflowOutputLinks(this.subflowNodeLinks);\n\n\t\t// Create the new sub-pipeline which will be referenced by the supernode.\n\t\tthis.subPipeline = this.objectModel.createPipeline(this.subflowNodes, this.subflowComments, this.subflowLinks);\n\n\t\t// Create an API pipeline for the new pipeline so we can call helper functions on it.\n\t\tthis.subAPIPipeline = this.objectModel.getAPIPipeline(this.subPipeline.id);\n\n\t\t// Create binding input/output data objects containing port and link.\n\t\tthis.bindingInputData = this.getBindingInputData(this.subflowInputLinks, this.subflowRect);\n\t\tthis.bindingOutputData = this.getBindingOutputData(this.subflowOutputLinks, this.subflowRect);\n\n\t\t// Create Supernode using previously created input and output ports.\n\t\tthis.supernode = this.createSupernode(this.bindingInputData, this.bindingOutputData);\n\n\t\t// Create definitions for links to and from supernode.\n\t\tthis.supernodeLinkDefs = this.createSupernodeLinkDefs(this.bindingInputData, this.bindingOutputData, this.supernode);\n\n\t\t// Create links to and from subflow binding nodes.\n\t\tthis.bindingNodeLinkDefs = this.createBindingNodeLinkDefs(this.bindingInputData, this.bindingOutputData);\n\n\t\t// Handle external subflows in supernode\n\t\tif (this.data.externalUrl) {\n\t\t\tthis.handleExternalSubflow();\n\t\t}\n\t}\n\n\t// Returns an object containing two links arrays (node links and comment links)\n\t// for the selected nodes.\n\tgetUniqueSubflowLinks(selectedObjectIds) {\n\t\tconst uniqueSubflowLinks = [];\n\n\t\t// Separate the comment links and node links for each selected object.\n\t\tselectedObjectIds.forEach((id) => {\n\t\t\tconst objectLinks = this.apiPipeline.getLinksContainingId(id);\n\t\t\t// Ensure each link is only stored once.\n\t\t\tobjectLinks.forEach((objectLink) => {\n\t\t\t\tif (!uniqueSubflowLinks.find((link) => (link.id === objectLink.id))) {\n\t\t\t\t\tuniqueSubflowLinks.push(objectLink);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn uniqueSubflowLinks;\n\t}\n\n\n\t// Returns an object containing two links arrays (node links and comment links)\n\t// for the selected nodes.\n\tgetSubflowNodeLinks(uniqueSubflowLinks) {\n\t\treturn uniqueSubflowLinks.filter((link) => (link.type === NODE_LINK || link.type === ASSOCIATION_LINK));\n\t}\n\n\t// Returns an object containing two links arrays (node links and comment links)\n\t// for the selected nodes.\n\tgetSubflowCommentLinks(uniqueSubflowLinks) {\n\t\treturn uniqueSubflowLinks.filter((link) => (link.type === COMMENT_LINK));\n\t}\n\n\t// Filters the array of comment links passed in so that links that should\n\t// NOT be in the subflow are removed. This method may also adjust\n\t// this.subflowComments and this.linksToDelete.\n\tfilterCommentLinks(subflowCommentLinks, subflowComments) {\n\t\tlet filteredLinks = [];\n\n\t\t// Determine if the comment should be brought into the supernode.\n\t\tsubflowCommentLinks.forEach((link) => {\n\t\t\tconst comment = this.apiPipeline.getComment(link.srcNodeId);\n\n\t\t\t// Include links that are connected to selected comments.\n\t\t\tif (this.apiPipeline.isObjectIdInObjects(comment.id, this.subflowComments)) {\n\t\t\t\tfilteredLinks.push(link);\n\n\t\t\t// Include links that are connected to non-selected comments and connected\n\t\t\t// to selected nodes AND include their comment in the subflow as well.\n\t\t\t} else if (!this.apiPipeline.isCommentLinkedToNonSelectedNodes(comment.id)) {\n\t\t\t\tfilteredLinks.push(link);\n\t\t\t\tthis.subflowComments.push(comment); // Intrinsically, add non-selected comment.\n\n\t\t\t// Do not include any other links in the subflow. These will be links\n\t\t\t// from non-selected comments to non-selected nodes. Such links will have\n\t\t\t// been included in the comment links if the comment has another link\n\t\t\t// to a selected node. These links will be deleted from the main flow\n\t\t\t// instead.\n\t\t\t} else {\n\t\t\t\tthis.linksToDelete.push(link);\n\t\t\t}\n\t\t});\n\n\t\tfilteredLinks = this.removeCommentLinksToUnselectedNodes(filteredLinks, subflowComments);\n\n\t\treturn filteredLinks;\n\t}\n\n\t// Handles all instances where a subflow comment (that is being included in\n\t// the subflow) is also linked to a non-selected node (that is, a node that is\n\t// NOT being included in the subflow). This method will alter\n\t// this.subflowLinks and this.linkToDelete.\n\tremoveCommentLinksToUnselectedNodes(inSubflowCommentLinks, subflowComments) {\n\t\tlet subflowCommentLinks = inSubflowCommentLinks;\n\t\tconst commentsToUnlinkFromUnselectedNodes = [];\n\n\t\t// Do not move a selected comment to supernode if it is linked to an non-selected node or comment.\n\t\tfor (const comment of subflowComments) {\n\t\t\tif (this.apiPipeline.isCommentLinkedToNonSelectedNodes(comment.id)) {\n\t\t\t\tcommentsToUnlinkFromUnselectedNodes.push(comment);\n\t\t\t}\n\t\t}\n\n\t\t// If selected comments have links to non-selected nodes, break the links to non-selected nodes.\n\t\tcommentsToUnlinkFromUnselectedNodes.forEach((comment) => {\n\t\t\tconst commentLinks = this.apiPipeline.getLinksContainingId(comment.id);\n\t\t\tcommentLinks.forEach((link) => {\n\t\t\t\tif ((!this.apiPipeline.isObjectIdInObjects(link.trgNodeId, this.subflowNodes)) &&\n\t\t\t\t\t\t(!this.apiPipeline.isObjectIdInObjects(link.id, this.linksToDelete))) {\n\t\t\t\t\tsubflowCommentLinks = subflowCommentLinks.filter((superLink) => superLink.id !== link.id);\n\t\t\t\t\tthis.linksToDelete.push(link);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn subflowCommentLinks;\n\t}\n\n\t// Returns an array of ordered supernode input links. These are the links\n\t// on the original flow that input into the set of node selected for the\n\t// supernode. They are ordered by\n\tcreateOrderedSubflowInputLinks(subflowNodeLinks) {\n\t\tlet subflowInputLinks = [];\n\n\t\tsubflowNodeLinks.forEach((link) => {\n\t\t\tif ((!this.apiPipeline.isObjectIdInObjects(link.srcNodeId, this.subflowNodes)) &&\n\t\t\t\t\t(!subflowInputLinks.find((inLink) => (inLink.id === link.trgNodeId)))) {\n\t\t\t\tif (link.type === ASSOCIATION_LINK) { // Break off associationLink.\n\t\t\t\t\tthis.removeLinkFromSubflow(link, true);\n\t\t\t\t} else {\n\t\t\t\t\tsubflowInputLinks.push(link);\n\t\t\t\t\tthis.removeLinkFromSubflow(link, false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// Reorder the supernode input links to the correct order.\n\t\tsubflowInputLinks = this.reorderSubflowLinks(subflowInputLinks, \"input\");\n\t\treturn subflowInputLinks;\n\t}\n\n\t// Determine supernode output links.\n\tcreateOrderedSubflowOutputLinks(subflowNodeLinks) {\n\t\tlet subflowOutputLinks = [];\n\n\t\tsubflowNodeLinks.forEach((link) => {\n\t\t\tif ((!this.apiPipeline.isObjectIdInObjects(link.trgNodeId, this.subflowNodes)) &&\n\t\t\t\t\t(!subflowOutputLinks.find((outLink) => (outLink.id === link.srcNodeId)))) {\n\t\t\t\tif (link.type === ASSOCIATION_LINK) { // Break off associationLink.\n\t\t\t\t\tthis.removeLinkFromSubflow(link, true);\n\t\t\t\t} else {\n\t\t\t\t\tsubflowOutputLinks.push(link);\n\t\t\t\t\tthis.removeLinkFromSubflow(link, false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// Reorder the supernode output links to the correct order.\n\t\tsubflowOutputLinks = this.reorderSubflowLinks(subflowOutputLinks, \"output\");\n\t\treturn subflowOutputLinks;\n\t}\n\n\t// Handles the subflow when an external pipeline flow is required.\n\thandleExternalSubflow() {\n\t\tconst supernodes = CanvasUtils.filterSupernodes(this.subflowNodes);\n\t\tconst descPipelines = this.objectModel.getDescendantPipelinesForSupernodes(supernodes);\n\t\tthis.descPipelines = descPipelines.filter((p) => !p.parentUrl); // Filter the local pipelines\n\n\t\tthis.newPipelineFlow =\n\t\t\tthis.objectModel.createExternalPipelineFlowTemplate(\n\t\t\t\tthis.data.externalPipelineFlowId, this.supernode.subflow_ref.pipeline_id_ref);\n\t}\n\n\tcreateSupernode(bindingInputData, bindingOutputData) {\n\t\tconst supernodeInputPorts = bindingInputData.map((bnd) => bnd.supernodePort);\n\t\tconst supernodeOutputPorts = bindingOutputData.map((bnd) => bnd.supernodePort);\n\n\t\tconst supernodeTemplate = {\n\t\t\tlabel: this.labelUtil.getLabel(\"supernode.template.label\"),\n\t\t\tdescription: this.labelUtil.getLabel(\"supernode.template.description\"),\n\t\t\timage: this.data.externalUrl ? USE_DEFAULT_EXT_ICON : USE_DEFAULT_ICON,\n\t\t\tinputs: supernodeInputPorts,\n\t\t\toutputs: supernodeOutputPorts,\n\t\t\ttype: SUPER_NODE,\n\t\t\tsubflow_ref: {\n\t\t\t\tpipeline_id_ref: this.subPipeline.id\n\t\t\t},\n\t\t};\n\n\t\tif (this.data.externalUrl) {\n\t\t\tsupernodeTemplate.subflow_ref.url = this.data.externalUrl;\n\t\t}\n\n\t\tconst topLeftNode = this.getTopLeftNode(this.subflowNodes);\n\n\t\t// Place the new supernode at the same position as the node which is\n\t\t// closest to the top left corner of the rectangle surrounding the\n\t\t// selected nodes.\n\t\tconst supernodeData = {\n\t\t\tnodeTemplate: supernodeTemplate,\n\t\t\toffsetX: topLeftNode.x_pos,\n\t\t\toffsetY: topLeftNode.y_pos\n\t\t};\n\n\t\treturn this.apiPipeline.createNode(supernodeData);\n\t}\n\n\t// Reorder the links in the same vertical order as the connected nodes on\n\t// the canvas. This helps us position the ports in the supernode so they\n\t// will be created so the link lines do not cross.\n\treorderSubflowLinks(links, type) {\n\t\tif (links.length > 1) {\n\t\t\tconst supernodeLinks = [...links];\n\t\t\tconst nodeId = type === \"input\" ? \"srcNodeId\" : \"trgNodeId\";\n\t\t\tconst pos = type === \"input\" ? \"srcPos\" : \"trgPos\";\n\n\t\t\t// Sort the nodes in the order they appear on the screen from top to bottom.\n\t\t\tsupernodeLinks.sort((a, b) => {\n\t\t\t\tconst nodeA = this.apiPipeline.getNode(a[nodeId]);\n\t\t\t\tconst nodeB = this.apiPipeline.getNode(b[nodeId]);\n\n\t\t\t\tconst aYcoord = a[pos] ? a[pos].y_pos : nodeA.y_pos;\n\t\t\t\tconst bYcoord = b[pos] ? b[pos].y_pos : nodeB.y_pos;\n\n\t\t\t\tif (aYcoord < bYcoord) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tif (aYcoord > bYcoord) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t\treturn supernodeLinks;\n\n\t\t}\n\t\treturn links;\n\t}\n\n\t// Returns the node positioned closest to the top left corner of the\n\t// bounding rectangle for all selected nodes.\n\tgetTopLeftNode(listOfNodes) {\n\t\tlet closestNode = listOfNodes[0];\n\t\tlet shortestDistance = this.getDistanceFromPosition(this.subflowRect.x, this.subflowRect.y, listOfNodes[0]);\n\t\tlistOfNodes.forEach((node) => {\n\t\t\tconst distance = this.getDistanceFromPosition(this.subflowRect.x, this.subflowRect.y, node);\n\t\t\tif (distance < shortestDistance) {\n\t\t\t\tshortestDistance = distance;\n\t\t\t\tclosestNode = node;\n\t\t\t}\n\t\t});\n\n\t\treturn closestNode;\n\t}\n\n\t// Pythagorean Theorem.\n\tgetDistanceFromPosition(x, y, node) {\n\t\tconst a = node.x_pos - x;\n\t\tconst b = node.y_pos - y;\n\t\treturn Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n\t}\n\n\t// Returns an array of data objects used for binding the input links. That,\n\t// is for each input link a binding input data object is created that contains\n\t// the link and a new port that can be added to the supernode. The port will\n\t// have a unique ID within the scope of the input ports for the supernode.\n\tgetBindingInputData(subflowInputLinks, subflowRect) {\n\t\tconst bindingInputData = [];\n\n\t\t// Determine relative position of the binding nodes in the subflow.\n\t\tlet entryBindingYPos = subflowRect.y - BOUNDING_RECT_PADDING;\n\n\t\tsubflowInputLinks.forEach((link) => {\n\t\t\tconst trgNode = this.apiPipeline.getNode(link.trgNodeId);\n\n\t\t\tconst supernodePort = Object.assign({}, this.findPort(link.trgNodePortId, trgNode.inputs));\n\t\t\tsupernodePort.id = this.generateUniquePortId(supernodePort, link.trgNodeId, bindingInputData);\n\t\t\tsupernodePort.label = this.labelUtil.getLabel(\"supernode.new.port.label\");\n\t\t\tif (!this.useCardFromOriginalPorts) {\n\t\t\t\tsupernodePort.cardinality = {\n\t\t\t\t\tmin: 0,\n\t\t\t\t\tmax: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst bindingNodePort = Object.assign({}, supernodePort);\n\t\t\tconst pos = {\n\t\t\t\tx: subflowRect.x - (BOUNDING_RECT_PADDING * 2),\n\t\t\t\ty: entryBindingYPos += BOUNDING_RECT_PADDING\n\t\t\t};\n\t\t\tbindingNodePort.id = bindingNodePort.id ? \"output_\" + bindingNodePort.id : bindingNodePort.id;\n\t\t\tconst inputBindingNode = this.createBindingNode(link, { outputs: [bindingNodePort], isSupernodeInputBinding: true }, pos);\n\n\t\t\tbindingInputData.push({\n\t\t\t\tlink: link,\n\t\t\t\tsupernodePort: supernodePort,\n\t\t\t\tbindingNode: inputBindingNode\n\t\t\t});\n\t\t});\n\t\treturn bindingInputData;\n\t}\n\n\t// Returns an array of data objects used for binding the output links. That,\n\t// is for each output link a binding input data object is created that contains\n\t// the link and a new port that can be added to the supernode. The port will\n\t// have a unique ID within the scope of the output ports for the supernode.\n\tgetBindingOutputData(subflowOutputLinks, subflowRect) {\n\t\tconst bindingOutputData = [];\n\n\t\t// Determine relative position of the binding nodes in the subflow.\n\t\tlet exitBindingYPos = subflowRect.y - BOUNDING_RECT_PADDING;\n\n\t\tsubflowOutputLinks.forEach((link) => {\n\t\t\tconst srcNode = this.apiPipeline.getNode(link.srcNodeId);\n\n\t\t\tconst supernodePort = Object.assign({}, this.findPort(link.srcNodePortId, srcNode.outputs));\n\t\t\tsupernodePort.id = this.generateUniquePortId(supernodePort, link.srcNodeId, bindingOutputData);\n\t\t\tsupernodePort.label = this.labelUtil.getLabel(\"supernode.new.port.label\");\n\t\t\tif (!this.useCardFromOriginalPorts) {\n\t\t\t\tsupernodePort.cardinality = {\n\t\t\t\t\tmin: 0,\n\t\t\t\t\tmax: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst bindingNodePort = Object.assign({}, supernodePort);\n\t\t\tconst pos = {\n\t\t\t\tx: subflowRect.x + subflowRect.width + BOUNDING_RECT_PADDING,\n\t\t\t\ty: exitBindingYPos += BOUNDING_RECT_PADDING\n\t\t\t};\n\t\t\tbindingNodePort.id = bindingNodePort.id ? \"input_\" + bindingNodePort.id : bindingNodePort.id;\n\t\t\tconst outputBindingNode = this.createBindingNode(link, { inputs: [bindingNodePort], isSupernodeOutputBinding: true }, pos);\n\n\t\t\tbindingOutputData.push({\n\t\t\t\tlink: link,\n\t\t\t\tsupernodePort: supernodePort,\n\t\t\t\tbindingNode: outputBindingNode\n\t\t\t});\n\t\t});\n\t\treturn bindingOutputData;\n\t}\n\n\tfindPort(nodePortId, ports) {\n\t\tif (typeof nodePortId !== \"undefined\" && nodePortId !== null) {\n\t\t\tconst found = CanvasUtils.getPort(nodePortId, ports);\n\t\t\tif (found) {\n\t\t\t\treturn found;\n\t\t\t}\n\t\t}\n\t\treturn ports[0];\n\t}\n\n\tgenerateUniquePortId(port, nodeId, bindingNodeData) {\n\t\tlet newId = port.id ? nodeId + \"_\" + port.id : port.id;\n\t\tconst count = this.occurrencesStartingWith(newId, bindingNodeData);\n\t\tif (count > 0) {\n\t\t\tnewId += \"_\" + count;\n\t\t}\n\t\treturn newId;\n\t}\n\n\toccurrencesStartingWith(id, bindingNodeData) {\n\t\tconst foundIds = bindingNodeData.filter((bnd) => (bnd.supernodePort.id.startsWith(id)));\n\t\treturn foundIds.length;\n\t}\n\n\tcreateBindingNode(link, portsData, pos) {\n\t\tconst bindingNodeTemplate = {\n\t\t\tdescription: this.labelUtil.getLabel(\"supernode.binding.node.description\"),\n\t\t\tlabel: this.labelUtil.getLabel(\"supernode.binding.node.label\"),\n\t\t\ttype: \"binding\"\n\t\t};\n\n\t\tconst actionData = {\n\t\t\teditType: \"createNode\",\n\t\t\tnodeTemplate: Object.assign(bindingNodeTemplate, portsData),\n\t\t\toffsetX: pos.x,\n\t\t\toffsetY: pos.y\n\t\t};\n\n\t\treturn this.subAPIPipeline.createNode(actionData);\n\t}\n\n\tremoveLinkFromSubflow(link, deleteLink) {\n\t\tthis.subflowLinks = this.subflowLinks.filter((superLink) => superLink.id !== link.id);\n\t\tif (deleteLink) {\n\t\t\tthis.linksToDelete.push(link);\n\t\t}\n\t}\n\n\t// Create an array of link definitions that define the links between the\n\t// supernode in/out ports and surrounding input/output nodes.\n\tcreateSupernodeLinkDefs(bindingInputData, bindingOutputData, supernode) {\n\t\tconst linkDefs = [];\n\n\t\tbindingInputData.forEach((bnd) => {\n\t\t\tconst linkData = { srcInfo: {}, trgInfo: {} };\n\t\t\tif (bnd.link.srcPos) {\n\t\t\t\tlinkData.srcInfo.srcPos = bnd.link.srcPos;\n\t\t\t} else {\n\t\t\t\tlinkData.srcInfo.id = bnd.link.srcNodeId;\n\t\t\t\tlinkData.srcInfo.portId = bnd.link.srcNodePortId;\n\t\t\t}\n\n\t\t\tlinkData.trgInfo.id = supernode.id;\n\t\t\tlinkData.trgInfo.portId = bnd.supernodePort.id;\n\t\t\tlinkDefs.push(linkData);\n\t\t});\n\n\t\tbindingOutputData.forEach((bnd) => {\n\t\t\tconst linkData = { srcInfo: {}, trgInfo: {} };\n\t\t\tlinkData.srcInfo.id = supernode.id;\n\t\t\tlinkData.srcInfo.portId = bnd.supernodePort.id;\n\n\t\t\tif (bnd.link.trgPos) {\n\t\t\t\tlinkData.trgInfo.trgPos = bnd.link.trgPos;\n\t\t\t} else {\n\t\t\t\tlinkData.trgInfo.id = bnd.link.trgNodeId;\n\t\t\t\tlinkData.trgInfo.portId = bnd.link.trgNodePortId;\n\t\t\t}\n\t\t\tlinkDefs.push(linkData);\n\t\t});\n\n\t\treturn linkDefs;\n\t}\n\n\t// Create links to and from subflow binding nodes.\n\tcreateBindingNodeLinkDefs(bindingInputData, bindingOutputData) {\n\t\tconst linkDefs = [];\n\n\t\tbindingInputData.forEach((bnd) => {\n\t\t\tlinkDefs.push({\n\t\t\t\tsrcInfo: {\n\t\t\t\t\tid: bnd.bindingNode.id,\n\t\t\t\t\tportId: bnd.bindingNode.outputs[0].id\n\t\t\t\t},\n\t\t\t\ttrgInfo: {\n\t\t\t\t\tid: bnd.link.trgNodeId,\n\t\t\t\t\tportId: bnd.link.trgNodePortId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tbindingOutputData.forEach((bnd) => {\n\t\t\tlinkDefs.push({\n\t\t\t\tsrcInfo: {\n\t\t\t\t\tid: bnd.link.srcNodeId,\n\t\t\t\t\tportId: bnd.link.srcNodePortId\n\t\t\t\t},\n\t\t\t\ttrgInfo: {\n\t\t\t\t\tid: bnd.bindingNode.id,\n\t\t\t\t\tportId: bnd.bindingNode.inputs[0].id\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn linkDefs;\n\t}\n\n\t// Return augmented command object which will be passed to the client app.\n\tgetData() {\n\t\tthis.data.newNode = this.supernode;\n\t\tthis.data.newLinks = this.newLinks;\n\t\tthis.data.subPipelineId = this.subPipeline.id;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\t// Delete selected objects from main pipeline.\n\t\tthis.apiPipeline.deleteNodes(this.subflowNodes, false); // false => don't remove pipelines any supernodes refer to\n\t\tthis.apiPipeline.deleteComments(this.subflowComments);\n\n\t\t// Delete links from comments that are not in the sub-pipeline.\n\t\tthis.apiPipeline.deleteLinks(this.linksToDelete);\n\n\t\tthis.apiPipeline.addSupernode(this.supernode, [this.subPipeline]);\n\n\t\t// Add subflow_node_ref to supernode ports.\n\t\tthis.bindingInputData.forEach((bnd) => {\n\t\t\tthis.apiPipeline.setInputPortSubflowNodeRef(this.supernode.id, bnd.supernodePort.id, bnd.bindingNode.id);\n\t\t});\n\t\tthis.bindingOutputData.forEach((bnd) => {\n\t\t\tthis.apiPipeline.setOutputPortSubflowNodeRef(this.supernode.id, bnd.supernodePort.id, bnd.bindingNode.id);\n\t\t});\n\n\t\t// Create new links to and from supernode in the main flow. We can only\n\t\t// do this AFTER the supernode has been added to the canvas otherwise the\n\t\t// links cannot be created in the object model.\n\t\tthis.newLinks = [];\n\t\tthis.supernodeLinkDefs.forEach((linkDef) => {\n\t\t\tthis.newLinks.push(\n\t\t\t\tthis.apiPipeline.createNodeLink(linkDef.srcInfo, linkDef.trgInfo)\n\t\t\t);\n\t\t});\n\t\tthis.apiPipeline.addLinks(this.newLinks);\n\n\t\t// Add the binding nodes to the subflow.\n\t\tthis.bindingInputData.forEach((bnd) => {\n\t\t\tthis.subAPIPipeline.addNode(bnd.bindingNode);\n\t\t});\n\t\tthis.bindingOutputData.forEach((bnd) => {\n\t\t\tthis.subAPIPipeline.addNode(bnd.bindingNode);\n\t\t});\n\n\t\t// Create links to and from the subflow binding nodes.\n\t\tthis.subflowNewLinks = [];\n\t\tthis.bindingNodeLinkDefs.forEach((linkDef) => {\n\t\t\tthis.subflowNewLinks.push(\n\t\t\t\tthis.subAPIPipeline.createNodeLink(linkDef.srcInfo, linkDef.trgInfo)\n\t\t\t);\n\t\t});\n\t\tthis.subAPIPipeline.addLinks(this.subflowNewLinks);\n\n\t\t// If we are creating an external supernode create the external flow\n\t\t// header info and switch the parentUrls for descendant pipelines (including\n\t\t// the newly created pipeline for the newly created supernode).\n\t\tif (this.data.externalUrl) {\n\t\t\tthis.objectModel.addExternalPipelineFlow(this.newPipelineFlow, this.data.externalUrl, null, false);\n\t\t\tconst pipelines = [this.subPipeline].concat(this.descPipelines);\n\t\t\tthis.objectModel.setParentUrl(pipelines, this.data.externalUrl);\n\t\t}\n\t\tthis.focusObject = this.supernode;\n\t}\n\n\tundo() {\n\t\tif (this.data.externalUrl) {\n\t\t\t// Delete the parentUrl from the pipelines and make them local again.\n\t\t\tthis.objectModel.setParentUrl(this.descPipelines);\n\t\t\tthis.objectModel.removeExternalPipelineFlow(this.data.externalUrl);\n\t\t}\n\n\t\t// Delete the supernode and also the sub-pipeline it references. We do\n\t\t// not delete lower level sub-pipelines (i.e. ones that supernodes\n\t\t// in this sub-pipeline refer to) because any supernodes\n\t\t// added back in the next step will need them.\n\t\tthis.apiPipeline.deleteSupernodes([this.supernode], [this.subPipeline], []);\n\n\t\tthis.subflowNodes.forEach((node) => {\n\t\t\tthis.apiPipeline.addNode(node);\n\t\t});\n\n\t\tthis.subflowComments.forEach((comment) => {\n\t\t\tthis.apiPipeline.addComment(comment);\n\t\t});\n\n\t\tthis.apiPipeline.addLinks(this.subflowLinks);\n\t\tthis.apiPipeline.addLinks(this.subflowInputLinks);\n\t\tthis.apiPipeline.addLinks(this.subflowOutputLinks);\n\t\tthis.apiPipeline.addLinks(this.linksToDelete);\n\n\t\tthis.focusObject = this.data.selectedObjects[0];\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.createSuperNode\", { node_label: this.supernode.label });\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\n\nexport default class CollapseSuperNodeInPlaceAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.oldObjectPositions = [];\n\t\tthis.newObjectPositions = [];\n\t\tthis.oldLinkPositions = [];\n\t\tthis.newLinkPositions = [];\n\t\tthis.enableMoveNodesOnSupernodeResize = canvasController.getCanvasConfig().enableMoveNodesOnSupernodeResize;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\n\t\tif (this.enableMoveNodesOnSupernodeResize) {\n\t\t\tthis.supernode = this.apiPipeline.getNode(this.data.id);\n\n\t\t\tthis.oldObjectPositions = CanvasUtils.getObjectPositions(this.apiPipeline.getObjects());\n\t\t\tthis.oldLinkPositions = CanvasUtils.getLinkPositions(this.apiPipeline.getLinks());\n\n\t\t\tthis.newObjectPositions = CanvasUtils.moveSurroundingObjects(\n\t\t\t\tthis.supernode,\n\t\t\t\tthis.apiPipeline.getObjects(),\n\t\t\t\t\"se\",\n\t\t\t\tthis.supernode.layout.defaultNodeWidth,\n\t\t\t\tthis.supernode.layout.defaultNodeHeight,\n\t\t\t\tfalse); // Pass false to indicate that object positions should not be updated.\n\n\t\t\tthis.newLinkPositions = CanvasUtils.moveSurroundingDetachedLinks(\n\t\t\t\tthis.supernode,\n\t\t\t\tthis.apiPipeline.getLinks(),\n\t\t\t\t\"se\",\n\t\t\t\tthis.supernode.layout.defaultNodeWidth,\n\t\t\t\tthis.supernode.layout.defaultNodeHeight,\n\t\t\t\tfalse); // Pass false to indicate that link positions should not be updated.\n\t\t}\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.collapseSuperNodeInPlace(this.data.id, this.newObjectPositions, this.newLinkPositions);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.expandSuperNodeInPlace(this.data.id, this.oldObjectPositions, this.oldLinkPositions);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.collapseSuperNodeInPlace\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils.js\";\n\nexport default class ColorSelectedObjectsAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.oldIds = this.data.selectedObjects.map((o) => o.id); // Copy the IDs\n\t\tthis.oldColors = this.getOldColors();\n\t\tthis.actionLabel = this.createActionLabel();\n\t\tthis.newBackgroundColor = this.data.editParam.color;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.setObjectsColorClassName(this.oldIds, this.newBackgroundColor);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.setObjectsColorClassName(this.oldIds, this.oldColors);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.actionLabel;\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.data.selectedObjects[0];\n\t}\n\n\tcreateActionLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.colorComments\", {\n\t\t\tcomments_count: this.data.selectedObjectIds.length\n\t\t});\n\t}\n\n\tgetOldColors() {\n\t\tconst oldColors = [];\n\t\tthis.data.selectedObjects.forEach((o) => {\n\t\t\toldColors.push(this.getObjectColorClass(o));\n\t\t});\n\t\treturn oldColors;\n\t}\n\n\tgetObjectColorClass(o) {\n\t\tif (o.class_name) {\n\t\t\tconst classes = o.class_name.split(\" \");\n\t\t\tif (classes) {\n\t\t\t\tconst colorClass = classes.find((c) => CanvasUtils.getBkgColorClass(c));\n\t\t\t\treturn colorClass;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\nimport { CANVAS_FOCUS, NODE_LINK }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class DeconstructSuperNodeAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.enableMoveNodesOnSupernodeResize = canvasController.getCanvasConfig().enableMoveNodesOnSupernodeResize;\n\t\tthis.supernode = this.data.targetObject;\n\t\tthis.oldObjectPositions = [];\n\t\tthis.newObjectPositions = [];\n\t\tthis.oldLinkPositions = [];\n\t\tthis.newLinkPositions = [];\n\n\t\tthis.objectModel.ensurePipelineIsLoaded(this.data);\n\n\t\tthis.targetApiPipeline = this.objectModel.getAPIPipeline(this.supernode.subflow_ref.pipeline_id_ref);\n\t\tthis.targetPipeline = this.targetApiPipeline.getPipeline();\n\t\tthis.extPipelineFlowToDelete = this.targetPipeline.parentUrl\n\t\t\t? this.objectModel.getExternalPipelineFlow(this.targetPipeline.parentUrl) : [];\n\n\t\tconst linksToRemove = this.getLinksToRemove();\n\t\tconst bindingNodes = this.getBindingNodes();\n\t\tconst nodesToAdd = this.getNonBindingNodes(bindingNodes);\n\t\tconst commentsToAdd = this.getCommentsToAdd();\n\t\tconst linksToAdd = this.getLinksToAdd(bindingNodes, linksToRemove);\n\t\tlet expandedCanvasDims = { left: 0, top: 0 };\n\n\t\tif (this.enableMoveNodesOnSupernodeResize) {\n\t\t\tthis.oldObjectPositions = CanvasUtils.getObjectPositions(this.apiPipeline.getObjects());\n\t\t\tthis.oldLinkPositions = CanvasUtils.getLinkPositions(this.apiPipeline.getLinks());\n\n\t\t\texpandedCanvasDims =\n\t\t\t\tCanvasUtils.getCanvasDimensions(nodesToAdd, commentsToAdd,\n\t\t\t\t\tlinksToAdd, 0, 0);\n\n\t\t\tthis.newObjectPositions = CanvasUtils.moveSurroundingObjects(\n\t\t\t\tthis.data.targetObject,\n\t\t\t\tthis.apiPipeline.getObjects(),\n\t\t\t\t\"se\",\n\t\t\t\texpandedCanvasDims.width,\n\t\t\t\texpandedCanvasDims.height,\n\t\t\t\tfalse); // Pass false to indicate that node positions should not be updated.\n\n\t\t\tthis.newLinkPositions = CanvasUtils.moveSurroundingDetachedLinks(\n\t\t\t\tthis.data.targetObject,\n\t\t\t\tthis.apiPipeline.getLinks(),\n\t\t\t\t\"se\",\n\t\t\t\texpandedCanvasDims.width,\n\t\t\t\texpandedCanvasDims.height,\n\t\t\t\tfalse); // Pass false to indicate that node positions should not be updated.\n\t\t}\n\n\t\t// Add to newObjectPositions some new positions for the objects being\n\t\t// added to the pipeline from the supernode's sub-flow. This will\n\t\t// move them into the position where the supernode once stood. A space\n\t\t// for them will have been created by the code above if\n\t\t// enableMoveNodesOnSupernodeResize is switched on.\n\t\tnodesToAdd.forEach((n2a) => {\n\t\t\tthis.newObjectPositions[n2a.id] = {\n\t\t\t\tx_pos: this.supernode.x_pos + n2a.x_pos - expandedCanvasDims.left,\n\t\t\t\ty_pos: this.supernode.y_pos + n2a.y_pos - expandedCanvasDims.top\n\t\t\t};\n\t\t});\n\n\t\tcommentsToAdd.forEach((c2a) => {\n\t\t\tthis.newObjectPositions[c2a.id] = {\n\t\t\t\tx_pos: this.supernode.x_pos + c2a.x_pos - expandedCanvasDims.left,\n\t\t\t\ty_pos: this.supernode.y_pos + c2a.y_pos - expandedCanvasDims.top\n\t\t\t};\n\t\t});\n\n\t\tthis.info = {\n\t\t\tpipelineId: this.data.pipelineId,\n\t\t\tsupernodeToDelete: this.supernode,\n\t\t\tnodesToAdd: nodesToAdd,\n\t\t\tlinksToAdd: linksToAdd,\n\t\t\tlinksToRemove: linksToRemove,\n\t\t\tcommentsToAdd: commentsToAdd,\n\t\t\toldObjectPositions: this.oldObjectPositions,\n\t\t\tnewObjectPositions: this.newObjectPositions,\n\t\t\toldLinkPositions: this.oldLinkPositions,\n\t\t\tnewLinkPositions: this.newLinkPositions,\n\t\t\tpipelineToDelete: this.targetPipeline,\n\t\t\textPipelineFlowToDelete: this.extPipelineFlowToDelete\n\t\t};\n\t}\n\n\tgetNonBindingNodes(bindingNodes) {\n\t\tconst nodes = this.targetApiPipeline.getNodes();\n\t\tconst nonBindingNodes = nodes.filter((n) => !bindingNodes.some((bn) => bn.id === n.id));\n\t\treturn nonBindingNodes;\n\t}\n\n\tgetBindingNodes() {\n\t\tconst bindingNodes = [];\n\n\t\tif (this.data.targetObject.inputs) {\n\t\t\tthis.data.targetObject.inputs.forEach((input) => {\n\t\t\t\tconst bindingNode = this.targetApiPipeline.getNode(input.subflow_node_ref);\n\t\t\t\tif (bindingNode) {\n\t\t\t\t\tbindingNodes.push(bindingNode);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this.data.targetObject.outputs) {\n\t\t\tthis.data.targetObject.outputs.forEach((output) => {\n\t\t\t\tconst bindingNode = this.targetApiPipeline.getNode(output.subflow_node_ref);\n\t\t\t\tif (bindingNode) {\n\t\t\t\t\tbindingNodes.push(bindingNode);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn bindingNodes;\n\t}\n\n\tgetLinksToFromBindingNodes(bindingNodes) {\n\t\treturn this.targetApiPipeline.getLinksContainingIds(bindingNodes.map((bn) => bn.id));\n\t}\n\n\tgetLinksNotToFromBindingNodes(bindingNodes) {\n\t\tconst linksToFromBindingNodes = this.getLinksToFromBindingNodes(bindingNodes);\n\t\tconst links = this.targetApiPipeline.getLinks();\n\t\tconst linksNotToFromBindingNode = links.filter((l) =>\n\t\t\t!linksToFromBindingNodes.some((ltfbm) => ltfbm.id === l.id));\n\t\treturn linksNotToFromBindingNode;\n\t}\n\n\tgetCommentsToAdd() {\n\t\treturn this.targetApiPipeline.getComments();\n\t}\n\n\tgetLinksToRemove() {\n\t\treturn this.apiPipeline.getLinksContainingId(this.supernode.id);\n\t}\n\n\tgetLinksToAdd(bindingNodes, linksToRemove) {\n\t\tconst linksNotToFromBindingNodes = this.getLinksNotToFromBindingNodes(bindingNodes);\n\t\tconst newLinks = this.getNewLinks(linksToRemove);\n\t\treturn linksNotToFromBindingNodes.concat(newLinks);\n\t}\n\n\tgetNewLinks(linksToRemove) {\n\t\tlet newLinks = [];\n\t\tconst supernodeDataLinks = linksToRemove.filter((link) => link.type === NODE_LINK);\n\n\t\tif (this.supernode.inputs) {\n\t\t\tthis.supernode.inputs.forEach((input) => {\n\t\t\t\tnewLinks = newLinks.concat(this.getNewLinksForInput(input, supernodeDataLinks));\n\t\t\t});\n\t\t}\n\t\tif (this.supernode.outputs) {\n\t\t\tthis.supernode.outputs.forEach((output) => {\n\t\t\t\tnewLinks = newLinks.concat(this.getNewLinksForOutput(output, supernodeDataLinks));\n\t\t\t});\n\t\t}\n\n\t\treturn newLinks;\n\t}\n\n\tgetNewLinksForInput(input, supernodeDataLinks) {\n\t\tconst newLinks = [];\n\t\tconst inputLinks = this.getSupernodeInputLinks(this.supernode, input.id, supernodeDataLinks);\n\t\tconst inputBindingNode = this.getInputBindingNode(input);\n\t\tif (inputBindingNode) {\n\t\t\tconst inputBindingLinks = this.getInputBindingLinks(inputBindingNode);\n\n\t\t\tinputLinks.forEach((inputLink) => {\n\t\t\t\tinputBindingLinks.forEach((inputBindingLink) => {\n\t\t\t\t\tconst linkInfo = {};\n\t\t\t\t\tif (inputLink.srcPos) {\n\t\t\t\t\t\tlinkInfo.srcPos = inputLink.srcPos;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinkInfo.srcNodeId = inputLink.srcNodeId;\n\t\t\t\t\t\tlinkInfo.srcNodePortId = inputLink.srcNodePortId;\n\t\t\t\t\t}\n\t\t\t\t\tif (inputBindingLink.trgPos) {\n\t\t\t\t\t\tlinkInfo.trgPos = inputBindingLink.trgPos;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinkInfo.trgNodeId = inputBindingLink.trgNodeId;\n\t\t\t\t\t\tlinkInfo.trgNodePortId = inputBindingLink.trgNodePortId;\n\t\t\t\t\t}\n\t\t\t\t\tconst newLink = this.apiPipeline.createLinkFromInfo(linkInfo);\n\t\t\t\t\tnewLinks.push(newLink);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn newLinks;\n\t}\n\n\tgetNewLinksForOutput(output, supernodeDataLinks) {\n\t\tconst newLinks = [];\n\t\tconst outputLinks = this.getSupernodeOutputLinks(this.supernode, output.id, supernodeDataLinks);\n\t\tconst outputBindingNode = this.getOutputBindingNode(output);\n\t\tif (outputBindingNode) {\n\t\t\tconst outputBindingLinks = this.getOutputBindingLinks(outputBindingNode);\n\n\t\t\toutputLinks.forEach((outputLink) => {\n\t\t\t\toutputBindingLinks.forEach((outputBindingLink) => {\n\t\t\t\t\tconst linkInfo = {};\n\n\t\t\t\t\tif (outputBindingLink.srcPos) {\n\t\t\t\t\t\tlinkInfo.srcPos = outputBindingLink.srcPos;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinkInfo.srcNodeId = outputBindingLink.srcNodeId;\n\t\t\t\t\t\tlinkInfo.srcNodePortId = outputBindingLink.srcNodePortId;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (outputLink.trgPos) {\n\t\t\t\t\t\tlinkInfo.trgPos = outputLink.trgPos;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinkInfo.trgNodeId = outputLink.trgNodeId;\n\t\t\t\t\t\tlinkInfo.trgNodePortId = outputLink.trgNodePortId;\n\t\t\t\t\t}\n\t\t\t\t\tconst newLink = this.apiPipeline.createLinkFromInfo(linkInfo);\n\t\t\t\t\tnewLinks.push(newLink);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn newLinks;\n\t}\n\n\tgetSupernodeInputLinks(node, inputPortId, supernodeDataLinks) {\n\t\treturn supernodeDataLinks.filter((link) => {\n\t\t\tconst trgNodePortId = link.trgNodePortId || CanvasUtils.getDefaultInputPortId(node);\n\t\t\treturn (link.trgNodeId === node.id && trgNodePortId === inputPortId);\n\t\t});\n\t}\n\n\tgetInputBindingNode(input) {\n\t\treturn this.targetApiPipeline.getNodes().find((n) => n.id === input.subflow_node_ref);\n\t}\n\n\tgetInputBindingLinks(inputBindingNode) {\n\t\treturn this.targetApiPipeline.getLinksContainingSourceId(inputBindingNode.id)\n\t\t\t.filter((link) => link.type === NODE_LINK);\n\t}\n\n\tgetSupernodeOutputLinks(node, outputPortId, supernodeDataLinks) {\n\t\treturn supernodeDataLinks.filter((link) => {\n\t\t\tconst srcNodePortId = link.srcNodePortId || CanvasUtils.getDefaultOutputPortId(node);\n\t\t\treturn (link.srcNodeId === node.id && srcNodePortId === outputPortId);\n\t\t});\n\t}\n\n\tgetOutputBindingNode(output) {\n\t\treturn this.targetApiPipeline.getNodes().find((n) => n.id === output.subflow_node_ref);\n\t}\n\n\tgetOutputBindingLinks(outputBindingNode) {\n\t\treturn this.targetApiPipeline.getLinksContainingTargetId(outputBindingNode.id)\n\t\t\t.filter((link) => link.type === NODE_LINK);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.deconstructSupernode(this.info);\n\t\tthis.focusObject = this.info?.nodesToAdd?.length > 0 ? this.info.nodesToAdd[0] : CANVAS_FOCUS;\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.reconstructSupernode(this.info);\n\t\tthis.focusObject = this.supernode;\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.deconstructSuperNode\", { node_label: this.supernode.label });\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { CANVAS_FOCUS } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class DeleteLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.link = this.apiPipeline.getLink(this.data.id);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.deleteLink(this.link);\n\t\tthis.focusObject = CANVAS_FOCUS;\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.addLinks([this.link]);\n\t\tthis.focusObject = this.link;\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.deleteLink\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport CanvasUtils from \"../common-canvas/common-canvas-utils.js\";\nimport Action from \"../command-stack/action.js\";\nimport { CANVAS_FOCUS } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class DeleteObjectsAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.areDetachableLinksSupported = canvasController.areDetachableLinksInUse();\n\t\tthis.objectsInfo = [];\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.nodesToDelete = this.objectModel.getSelectedNodes();\n\t\tthis.commentsToDelete = this.objectModel.getSelectedComments();\n\t\tthis.linksToDelete = this.objectModel.getSelectedLinks(); // There'll only be selected links if enableLinkSelection is set\n\t\tthis.linksToUpdateInfo = {};\n\t\tthis.supernodesToDelete = [];\n\t\tthis.nodeAndCommentsToDelete = this.nodesToDelete.concat(this.commentsToDelete);\n\n\t\t// Handle links to update when detachable links are enabled. These are links\n\t\t// that will remain on the canvas as detached links when the nodes or\n\t\t// comments, they are connected to, are deleted. They need to be updated to\n\t\t// have their source and target IDs removed (as appropriate based on\n\t\t// whether the source and/or target object is being deleted) which will\n\t\t// indicate that the node is either partially or fully detached.\n\t\tif (this.areDetachableLinksSupported) {\n\t\t\tthis.linksToDelete = this.getConnectedLinksToDelete(this.linksToDelete, \"nodeLink\");\n\t\t\tthis.linksToUpdateInfo = this.getLinksToUpdateInfo();\n\n\t\t// Handle links to delete. When detachable links are not enabled we\n\t\t// implicitly delete links connected to nodes and comments being deleted.\n\t\t// This means we find any links connected to those nodes and comments\n\t\t// and add them to the array of links to delete.\n\t\t} else {\n\t\t\tthis.linksToDelete = this.getConnectedLinksToDelete(this.linksToDelete);\n\t\t}\n\n\t\t// Remember all the pipelines that are being deleted when any selected\n\t\t// supernodes are being deleted.\n\t\tthis.supernodesToDelete = CanvasUtils.filterSupernodes(this.nodesToDelete);\n\t\tthis.pipelinesToDelete = this.objectModel.getDescPipelinesToDelete(this.supernodesToDelete, this.data.pipelineId);\n\t\tthis.extPipelineFlowsToDelete =\n\t\t\tthis.objectModel.getExternalPipelineFlowsForPipelines(this.pipelinesToDelete);\n\n\t\t// Remove the supernode(s) from list of all nodes to avoid duplicating add/delete node.\n\t\tthis.nodesToDelete = this.nodesToDelete.filter((node) => !this.isSupernodeToBeDeleted(node));\n\n\t\tthis.actionLabel = this.createActionLabel();\n\t}\n\n\t// Returns an array of links to delete. This takes the current array of links\n\t// to delete, which will have been populated with any selected links (assuming\n\t// enableLinkSelection is set), and adds to it any links that are connected to\n\t// the nodes and comments being deleted.\n\tgetConnectedLinksToDelete(linksToDelete, excludeType) {\n\t\tthis.nodeAndCommentsToDelete.forEach((nc) => {\n\t\t\tconst connectedLinks = this.apiPipeline.getLinksContainingId(nc.id);\n\t\t\tconnectedLinks.forEach((conLink) => {\n\t\t\t\tif (!this.isLinkToBeDeleted(conLink, linksToDelete) &&\n\t\t\t\t\t\tconLink.type !== excludeType) {\n\t\t\t\t\tlinksToDelete.push(conLink);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn linksToDelete;\n\t}\n\n\t// Returns an array of 'link info' objects that indicate which links should\n\t// remain on the canvas as detached links when nodes they are connected to\n\t// are deleted. There is one linkInfo object for each link that needs to be\n\t// updated. This is only relevant when detachable links are enabled.\n\t// The linkInfo object contains:\n\t// newLinks - An array of new links to update existing links with detached info\n\t// oldLinks - A corresponding array of original links.\n\t// Note: when a link is detached, as the result of its source or target node\n\t// being deleted, the srcNodeId and/or trgNodeId in the link will be set to\n\t// undefined. This indicates which end of the link is detached. The srcPos\n\t// and trgPos coordinates will be set on the link to indicate where the line\n\t// is drawn to or from.\n\tgetLinksToUpdateInfo() {\n\t\tconst newLinks = [];\n\t\tconst oldLinks = [];\n\t\tconst allCurrentLinks = this.apiPipeline.getLinks();\n\n\t\tallCurrentLinks.forEach((link) => {\n\t\t\tif (!this.isLinkToBeDeleted(link, this.linksToDelete)) {\n\t\t\t\tconst src = this.isSourceToBeDeleted(link);\n\t\t\t\tconst trg = this.isTargetToBeDeleted(link);\n\n\t\t\t\tif (src || trg) {\n\t\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\t\tif (src) {\n\t\t\t\t\t\tdelete newLink.srcNodeId;\n\t\t\t\t\t\tdelete newLink.srcNodePortId;\n\t\t\t\t\t\tnewLink.srcPos = CanvasUtils.getSrcPos(link, this.apiPipeline);\n\t\t\t\t\t}\n\t\t\t\t\tif (trg) {\n\t\t\t\t\t\tdelete newLink.trgNodeId;\n\t\t\t\t\t\tdelete newLink.trgNodePortId;\n\t\t\t\t\t\tnewLink.trgPos = CanvasUtils.getTrgPos(link, this.apiPipeline);\n\t\t\t\t\t}\n\t\t\t\t\tnewLinks.push(newLink);\n\t\t\t\t\toldLinks.push(link);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn { newLinks, oldLinks };\n\t}\n\n\tisLinkToBeDeleted(link, linksToDelete) {\n\t\treturn linksToDelete.findIndex((l) => l.id === link.id) !== -1;\n\t}\n\n\tisSupernodeToBeDeleted(node) {\n\t\treturn this.supernodesToDelete.findIndex((sn) => node.id === sn.id) !== -1;\n\t}\n\n\tisSourceToBeDeleted(link) {\n\t\treturn this.nodeAndCommentsToDelete.findIndex((nc) => nc.id === link.srcNodeId) !== -1;\n\t}\n\n\tisTargetToBeDeleted(link) {\n\t\treturn this.nodesToDelete.findIndex((nc) => nc.id === link.trgNodeId) !== -1;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.deleteAndUpdateObjects({\n\t\t\tlinksToUpdate: this.linksToUpdateInfo.newLinks,\n\t\t\tlinksToDelete: this.linksToDelete,\n\t\t\tsupernodesToDelete: this.supernodesToDelete,\n\t\t\tpipelinesToDelete: this.pipelinesToDelete,\n\t\t\textPipelineFlowsToDelete: this.extPipelineFlowsToDelete,\n\t\t\tnodesToDelete: this.nodesToDelete,\n\t\t\tcommentsToDelete: this.commentsToDelete\n\t\t});\n\t\tthis.focusObject = CANVAS_FOCUS;\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.addAndUpdateObjects({\n\t\t\tlinksToUpdate: this.linksToUpdateInfo.oldLinks,\n\t\t\tlinksToAdd: this.linksToDelete,\n\t\t\tsupernodesToAdd: this.supernodesToDelete,\n\t\t\tpipelinesToAdd: this.pipelinesToDelete,\n\t\t\textPipelineFlowsToAdd: this.extPipelineFlowsToDelete,\n\t\t\tnodesToAdd: this.nodesToDelete,\n\t\t\tcommentsToAdd: this.commentsToDelete\n\t\t});\n\n\t\tthis.focusObject = this.data.selectedObjects[0];\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.actionLabel;\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n\n\tcreateActionLabel() {\n\t\tconst stringsList = [\n\t\t\t{ label: \"Nodes\", val: this.nodesToDelete.length + this.supernodesToDelete.length },\n\t\t\t{ label: \"Comments\", val: this.commentsToDelete.length },\n\t\t\t{ label: \"Links\", val: this.linksToDelete.length }\n\t\t];\n\t\tconst dynamicStringKey = \"action.delete\" + stringsList\n\t\t\t.filter((v) => v.val)\n\t\t\t.map((o) => o.label)\n\t\t\t.join(\"\");\n\n\t\treturn this.labelUtil.getActionLabel(this, dynamicStringKey,\n\t\t\t{\n\t\t\t\tnodes_count: this.nodesToDelete.length + this.supernodesToDelete.length,\n\t\t\t\tcomments_count: this.commentsToDelete.length,\n\t\t\t\tlinks_count: this.linksToDelete.length\n\t\t\t});\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport Action from \"../command-stack/action.js\";\n\nexport default class DisconnectObjectsAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.links = [];\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.links = this.apiPipeline.disconnectObjects(this.data.selectedObjectIds);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.addLinks(this.links);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.disconnectObjects\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.data.selectedObjects[0];\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class DisplayPreviousPipeline extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.oldBreadcrumbs = this.objectModel.getBreadcrumbs();\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.objectModel.setPreviousBreadcrumb();\n\t}\n\n\tundo() {\n\t\tthis.objectModel.setBreadcrumbs(this.oldBreadcrumbs);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.displayPreviousPipeline\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class DisplaySubPipeline extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.oldBreadcrumbs = this.objectModel.getBreadcrumbs();\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tif (this.data.addBreadcrumbs) {\n\t\t\t// Make sure pipeline is loaded in case it is part of an external pipeline flow.\n\t\t\tthis.objectModel.ensurePipelineIsLoaded(this.data);\n\t\t\tthis.objectModel.addBreadcrumbs(this.data);\n\n\t\t} else if (this.data.breadcrumbIndex === 0) {\n\t\t\t// Index 0 is the primary pipeline so no need to check pipeline is loaded.\n\t\t\tthis.objectModel.setIndexedBreadcrumb(this.data);\n\n\t\t} else if (this.data.breadcrumbIndex) {\n\t\t\t// Make sure pipeline is loaded in case it is part of an external pipeline flow.\n\t\t\tthis.objectModel.ensurePipelineIsLoaded(this.data);\n\t\t\tthis.objectModel.setIndexedBreadcrumb(this.data);\n\t\t}\n\t}\n\n\tundo() {\n\t\tthis.objectModel.setBreadcrumbs(this.oldBreadcrumbs);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.displaySubPipeline\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class EditCommentAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.previousComment = this.apiPipeline.getComment(this.data.id);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.editComment(this.data);\n\t\tthis.focusObject = this.data;\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.editComment(this.previousComment);\n\t\tthis.focusObject = this.previousComment;\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.editComment\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { DEC_LINK, DEC_NODE }\tfrom \"../common-canvas/constants/canvas-constants\";\n\nexport default class EditDecorationLabelAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(this.data.pipelineId);\n\t\tif (this.data.objType === DEC_LINK) {\n\t\t\tthis.previousDecorations = this.apiPipeline.getLinkDecorations(this.data.objId) || [];\n\t\t} else if (this.data.objType === DEC_NODE) {\n\t\t\tthis.previousDecorations = this.apiPipeline.getNodeDecorations(this.data.objId) || [];\n\t\t}\n\t\tthis.newDecorations = this.previousDecorations.map((dec) => {\n\t\t\tif (dec.id === this.data.decId) {\n\t\t\t\treturn Object.assign({}, dec, { label: this.data.label });\n\t\t\t}\n\t\t\treturn dec;\n\t\t});\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tif (this.data.objType === DEC_LINK) {\n\t\t\tthis.apiPipeline.setLinkDecorations(this.data.objId, this.newDecorations);\n\t\t} else if (this.data.objType === DEC_NODE) {\n\t\t\tthis.apiPipeline.setNodeDecorations(this.data.objId, this.newDecorations);\n\t\t}\n\t\tthis.focusObject = this.data.selectedObjects[0];\n\t}\n\n\tundo() {\n\t\tif (this.data.objType === DEC_LINK) {\n\t\t\tthis.apiPipeline.setLinkDecorations(this.data.objId, this.previousDecorations);\n\t\t} else if (this.data.objType === DEC_NODE) {\n\t\t\tthis.apiPipeline.setNodeDecorations(this.data.objId, this.previousDecorations);\n\t\t}\n\t\tthis.focusObject = this.data.selectedObjects[0];\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\tif (this.data.objType === DEC_LINK) {\n\t\t\treturn this.labelUtil.getActionLabel(this, \"action.editLinkDecorationLabel\");\n\t\t}\n\t\treturn this.labelUtil.getActionLabel(this, \"action.editNodeDecorationLabel\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class SetNodeLabelAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.node = this.apiPipeline.getNode(data.nodeId);\n\t\tthis.previousLabel = this.node.label;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.setNodeLabel(this.data.nodeId, this.data.label);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.setNodeLabel(this.data.nodeId, this.previousLabel);\n\t}\n\n\tredo() {\n\t\tthis.apiPipeline.setNodeLabel(this.data.nodeId, this.data.label);\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.setNodeLabel\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.node;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\n\nexport default class expandSuperNodeInPlaceAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.oldObjectPositions = [];\n\t\tthis.newObjectPositions = [];\n\t\tthis.oldLinkPositions = [];\n\t\tthis.newLinkPositions = [];\n\t\tthis.enableMoveNodesOnSupernodeResize = canvasController.getCanvasConfig().enableMoveNodesOnSupernodeResize;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.supernode = this.apiPipeline.getNode(this.data.id);\n\n\t\tif (this.enableMoveNodesOnSupernodeResize) {\n\t\t\tthis.oldObjectPositions = CanvasUtils.getObjectPositions(this.apiPipeline.getObjects());\n\t\t\tthis.oldLinkPositions = CanvasUtils.getLinkPositions(this.apiPipeline.getLinks());\n\n\t\t\tthis.newObjectPositions = CanvasUtils.moveSurroundingObjects(\n\t\t\t\tthis.supernode,\n\t\t\t\tthis.apiPipeline.getObjects(),\n\t\t\t\t\"se\",\n\t\t\t\tCanvasUtils.getSupernodeExpandedWidth(this.supernode, this.objectModel.getCanvasLayout()),\n\t\t\t\tCanvasUtils.getSupernodeExpandedHeight(this.supernode, this.objectModel.getCanvasLayout()),\n\t\t\t\tfalse); // Pass false to indicate that object positions should not be updated.\n\n\t\t\tthis.newLinkPositions = CanvasUtils.moveSurroundingDetachedLinks(\n\t\t\t\tthis.supernode,\n\t\t\t\tthis.apiPipeline.getLinks(),\n\t\t\t\t\"se\",\n\t\t\t\tCanvasUtils.getSupernodeExpandedWidth(this.supernode, this.objectModel.getCanvasLayout()),\n\t\t\t\tCanvasUtils.getSupernodeExpandedHeight(this.supernode, this.objectModel.getCanvasLayout()),\n\t\t\t\tfalse); // Pass false to indicate that link positions should not be updated.\n\t\t}\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\t// Make sure pipeline is loaded in case it is part of an external pipeline flow.\n\t\tthis.objectModel.ensurePipelineIsLoaded(this.data);\n\t\tthis.apiPipeline.expandSuperNodeInPlace(this.data.id, this.newObjectPositions, this.newLinkPositions);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.collapseSuperNodeInPlace(this.data.id, this.oldObjectPositions, this.oldLinkPositions);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.expandSuperNodeInPlace\", { node_label: this.supernode.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Action from \"../command-stack/action.js\";\n\n\nexport default class InsertNodeIntoLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.node = data.node;\n\n\t\tthis.firstLinkSrcInfo = {\n\t\t\tid: data.link.srcNodeId,\n\t\t\tportId: data.link.srcNodePortId\n\t\t};\n\n\t\tthis.firstLinkTrgInfo = {\n\t\t\tid: this.node.id\n\t\t};\n\n\t\tif (this.data.trgPort) {\n\t\t\tthis.firstLinkTrgInfo.portId = this.data.trgPort.id;\n\t\t}\n\n\t\tthis.secondLinkSrcInfo = {\n\t\t\tid: this.node.id\n\t\t};\n\n\t\tif (this.data.srcPort) {\n\t\t\tthis.secondLinkSrcInfo.portId = this.data.srcPort.id;\n\t\t}\n\n\t\tthis.secondLinkTrgInfo = {\n\t\t\tid: data.link.trgNodeId,\n\t\t\tportId: data.link.trgNodePortId\n\t\t};\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.newFirstLink = this.firstLink;\n\t\tthis.data.newSecondLink = this.secondLink;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.deleteLink({ id: this.data.link.id });\n\t\tthis.apiPipeline.moveObjects({ nodes: [this.node.id], offsetX: this.data.offsetX, offsetY: this.data.offsetY });\n\n\t\tthis.firstLink = this.apiPipeline.createNodeLink(this.firstLinkSrcInfo, this.firstLinkTrgInfo);\n\t\tthis.secondLink = this.apiPipeline.createNodeLink(this.secondLinkSrcInfo, this.secondLinkTrgInfo);\n\t\tthis.apiPipeline.addLinks([this.firstLink, this.secondLink]);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.deleteLink({ id: this.firstLink.id });\n\t\tthis.apiPipeline.deleteLink({ id: this.secondLink.id });\n\t\tthis.apiPipeline.moveObjects({ nodes: [this.node.id], offsetX: -this.data.offsetX, offsetY: -this.data.offsetY });\n\t\tthis.apiPipeline.addLinks([this.data.link]);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.insertNodeIntoLink\", { node_label: this.node.label });\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class MoveObjectsAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.moveObjects(this.data);\n\t}\n\n\tundo() {\n\t\tthis.data.offsetX = -(this.data.offsetX);\n\t\tthis.data.offsetY = -(this.data.offsetY);\n\t\tthis.apiPipeline.moveObjects(this.data);\n\t}\n\n\tredo() {\n\t\tthis.data.offsetX = -(this.data.offsetX);\n\t\tthis.data.offsetY = -(this.data.offsetY);\n\t\tthis.apiPipeline.moveObjects(this.data);\n\t}\n\n\tgetLabel() {\n\t\tif (this.data.nodes.length === 1) {\n\t\t\treturn this.labelUtil.getActionLabel(this, \"action.moveObject\");\n\t\t}\n\t\treturn this.labelUtil.getActionLabel(this, \"action.moveObjects\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/***************************************************************************/\n/* WARNING: */\n/* This class is exported from Common Canvas. This means host apps can */\n/* extend the class and add to, or alter, this class's member variables. */\n/* So, if the names of any internal this.xxxx variables are changed that */\n/* needs to be communicated clearly through the release notes, Slack, etc. */\n/***************************************************************************/\n\nimport Action from \"../command-stack/action.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils.js\";\nimport { CANVAS_FOCUS } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class PasteAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.viewportDimensions = canvasController.getViewPortDimensions();\n\t\tthis.areDetachableLinksInUse = canvasController.areDetachableLinksInUse();\n\t\tthis.isSnapToGridInUse = canvasController.isSnapToGridInUse();\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.oldFocusObject = canvasController.getFocusObject();\n\n\t\t// Make sure objects to be pasted are in an appropriate position for them\n\t\t// to appear within the viewport.\n\t\tthis.adjustObjectsPositions();\n\n\t\t// Clone the objects being pasted because we don't want any objects\n\t\t// with IDs the same as those already on the canvas.\n\t\tthis.clones = this.objectModel.cloneObjectsToPaste(\n\t\t\tdata.objects.nodes, data.objects.comments, data.objects.links);\n\n\t\tconst { nodes, pipelines } = this.objectModel.extractAddDataPipelines(this.clones.clonedNodes);\n\t\tthis.clones.clonedNodes = nodes;\n\t\tthis.pipelines = pipelines;\n\n\t\t// Get the IDs of the objects to be selected after they are pasted. We\n\t\t// automatically select pasted objects so they are easy to move by the user.\n\t\tthis.selectionIds = this.getSelectionIds(this.clones);\n\t}\n\n\t// Adjusts the positions of the cloned objects appropriately. If the data\n\t// object contains a mousePos property it will be the position on the canvas\n\t// where the paste was requested, using a context menu, and we will paste the\n\t// objects at that position. If no mousePos is specified then the user will\n\t// have pasted using the toolbar button or keyboard. In this case, we paste\n\t// the objects in their original coordinate positions or, if that position is\n\t// not visible in the viewport, we paste them in the center of the viewport.\n\tadjustObjectsPositions() {\n\t\tconst objects = this.data.objects;\n\t\tconst pastedObjDimensions = CanvasUtils.getCanvasDimensions(objects.nodes, objects.comments, objects.links, 0, 0);\n\t\tif (pastedObjDimensions) {\n\t\t\tif (this.data.mousePos && this.data.mousePos.x && this.data.mousePos.y) {\n\t\t\t\tconst xDelta = this.data.mousePos.x - pastedObjDimensions.left;\n\t\t\t\tconst yDelta = this.data.mousePos.y - pastedObjDimensions.top;\n\t\t\t\tthis.moveObjectsPositions(objects, xDelta, yDelta);\n\n\t\t\t} else {\n\t\t\t\tconst transRect = this.viewportDimensions;\n\t\t\t\tif (transRect.x < pastedObjDimensions.left &&\n\t\t\t\t\t\ttransRect.y < pastedObjDimensions.top &&\n\t\t\t\t\t\ttransRect.x + transRect.width > pastedObjDimensions.left &&\n\t\t\t\t\t\ttransRect.y + transRect.height > pastedObjDimensions.top) {\n\t\t\t\t\tthis.ensureNoOverlap(objects);\n\n\t\t\t\t} else {\n\t\t\t\t\tconst xDelta = transRect.x + (transRect.width / 2) - (pastedObjDimensions.width / 2) - pastedObjDimensions.left;\n\t\t\t\t\tconst yDelta = transRect.y + (transRect.height / 2) - (pastedObjDimensions.height / 2) - pastedObjDimensions.top;\n\t\t\t\t\tthis.moveObjectsPositions(objects, xDelta, yDelta);\n\t\t\t\t\tthis.ensureNoOverlap(objects);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Offsets the positions of the canvas objects (nodes, comments and links)\n\t// if they exactly overlap any existing nodes, comments and links.\n\t// Exact overlap can happen when pasting over the top of the canvas from\n\t// which the canvas objects were copied.\n\tensureNoOverlap(objects) {\n\t\tlet xInc = 10;\n\t\tlet yInc = 10;\n\t\tif (this.isSnapToGridInUse) {\n\t\t\tconst canvasLayout = this.objectModel.getCanvasLayout();\n\t\t\txInc = canvasLayout.snapToGridXPx;\n\t\t\tyInc = canvasLayout.snapToGridYPx;\n\t\t}\n\t\twhile (this.apiPipeline.exactlyOverlaps(objects.nodes, objects.comments, objects.links)) {\n\t\t\tthis.moveObjectsPositions(objects, xInc, yInc);\n\t\t}\n\t}\n\n\t// Moves the coordinate positions of the canvas objects specified by the\n\t// x and y amounts specified.\n\tmoveObjectsPositions(objects, xDelta, yDelta) {\n\t\tif (objects.nodes) {\n\t\t\tobjects.nodes.forEach((node) => {\n\t\t\t\tnode.x_pos += xDelta;\n\t\t\t\tnode.y_pos += yDelta;\n\t\t\t});\n\t\t}\n\t\tif (objects.comments) {\n\t\t\tobjects.comments.forEach((comment) => {\n\t\t\t\tcomment.x_pos += xDelta;\n\t\t\t\tcomment.y_pos += yDelta;\n\t\t\t\tcomment.selectedObjectIds = [];\n\t\t\t});\n\t\t}\n\t\t// Only semi-detached or fully-detached links (which will have srcPos or\n\t\t// trgPos properties) need to be moved. Other links will be moved due to\n\t\t// their relationship with their source and target node/comment.\n\t\tif (objects.links) {\n\t\t\tobjects.links.forEach((link) => {\n\t\t\t\tif (link.srcPos) {\n\t\t\t\t\tlink.srcPos.x_pos += xDelta;\n\t\t\t\t\tlink.srcPos.y_pos += yDelta;\n\t\t\t\t}\n\t\t\t\tif (link.trgPos) {\n\t\t\t\t\tlink.trgPos.x_pos += xDelta;\n\t\t\t\t\tlink.trgPos.y_pos += yDelta;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t// Return the IDs of the cloned objects to be selected after the\n\t// paste is complete.\n\tgetSelectionIds(clones) {\n\t\tconst selectionIds = [];\n\n\t\tclones.clonedNodes.forEach((cn) => {\n\t\t\tselectionIds.push(cn.id);\n\t\t});\n\n\t\tclones.clonedComments.forEach((cc) => {\n\t\t\tselectionIds.push(cc.id);\n\t\t});\n\n\t\tif (this.areDetachableLinksInUse) {\n\t\t\tclones.clonedLinks.forEach((cl) => selectionIds.push(cl.id));\n\t\t}\n\t\treturn selectionIds;\n\t}\n\n\t// Return augmented command object which will be passed to the\n\t// client app.\n\tgetData() {\n\t\tthis.data.clonedNodes = this.clones.clonedNodes;\n\t\tthis.data.clonedComments = this.clones.clonedComments;\n\t\tthis.data.clonedLinks = this.clones.clonedLinks;\n\t\treturn this.data;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.addPastedObjects({\n\t\t\tnodesToAdd: this.clones.clonedNodes,\n\t\t\tcommentsToAdd: this.clones.clonedComments,\n\t\t\tlinksToAdd: this.clones.clonedLinks,\n\t\t\tpipelinesToAdd: this.pipelines,\n\t\t\tselections: this.selectionIds\n\t\t});\n\t\tthis.focusObject = this.getDoFocusObject();\n\t}\n\n\tgetDoFocusObject() {\n\t\tif (this.clones?.clonedNodes?.length > 0) {\n\t\t\treturn this.clones.clonedNodes[0];\n\t\t}\n\t\tif (this.clones?.clonedComments?.length > 0) {\n\t\t\treturn this.clones.clonedComments[0];\n\t\t}\n\t\tif (this.clones?.clonedLinks?.length > 0) {\n\t\t\treturn this.clones.clonedLinks[0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tundo() {\n\t\t// External pipelines may have been loaded in the do() function so we\n\t\t// retrieve a full set of pipelines to delete from the object model.\n\t\tconst supernodes = CanvasUtils.filterSupernodes(this.clones.clonedNodes);\n\t\tconst pipelines = this.objectModel.getDescPipelinesToDelete(supernodes, this.data.pipelineId);\n\n\t\t// We can also retrieve any external pipeline flows that might have been\n\t\t// loaded while executing the do() method.\n\t\tconst oldExtPipelineFlows =\n\t\t\tthis.objectModel.getExternalPipelineFlowsForPipelines(pipelines);\n\n\t\tthis.apiPipeline.deletePastedObjects({\n\t\t\tnodesToDelete: this.clones.clonedNodes,\n\t\t\tcommentsToDelete: this.clones.clonedComments,\n\t\t\tlinksToDelete: this.clones.clonedLinks,\n\t\t\tpipelinesToDelete: pipelines,\n\t\t\textPipelineFlowsToDelete: oldExtPipelineFlows\n\t\t});\n\t\tthis.focusObject = this.oldFocusObject || CANVAS_FOCUS;\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.pasteObjects\");\n\t}\n\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { SAVED_NODES_CATEGORY_ID, SAVED_NODES_FOLDER_ICON }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class SaveToPaletteAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.data.addedNodeTypes = this.apiPipeline.createNodesForPalette(this.data.selectedObjectIds);\n\t}\n\n\tdo() {\n\t\t// The new category will only be created if it does not already exist.\n\t\t// TODO - Make these hardcoded values for name and image configurable\n\t\tthis.objectModel.addNodeTypesToPalette(\n\t\t\tthis.data.addedNodeTypes,\n\t\t\tSAVED_NODES_CATEGORY_ID,\n\t\t\tthis.labelUtil.getLabel(\"palette.saved.nodes.label\"),\n\t\t\tthis.labelUtil.getLabel(\"palette.saved.nodes.description\"),\n\t\t\tSAVED_NODES_FOLDER_ICON);\n\t}\n\n\tundo() {\n\t\tconst addedIds = this.data.addedNodeTypes.map((ant) => ant.id);\n\t\tthis.objectModel.removeNodesFromPalette(addedIds, SAVED_NODES_CATEGORY_ID);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.saveToPalette\");\n\t}\n}\n","var baseFor = require('./_baseFor'),\n castFunction = require('./_castFunction'),\n keysIn = require('./keysIn');\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nmodule.exports = forIn;\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { forIn } from \"lodash\";\n\nexport default class SetObjectsStyleAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.oldPipelineObjStyles = [];\n\t\tforIn(this.data.pipelineObjectIds, (objectIds, pipelineId) => {\n\t\t\tconst apiPipeline = this.objectModel.getAPIPipeline(pipelineId);\n\t\t\tthis.oldPipelineObjStyles = [];\n\t\t\tobjectIds.forEach((objId) => {\n\t\t\t\tthis.oldPipelineObjStyles.push({ pipelineId: pipelineId, objId: objId, style: apiPipeline.getObjectStyle(objId, this.data.temporary) });\n\t\t\t});\n\t\t});\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.objectModel.setObjectsStyle(this.data.pipelineObjectIds, this.data.style, this.data.temporary);\n\t}\n\n\tundo() {\n\t\tthis.objectModel.setObjectsMultiStyle(this.oldPipelineObjStyles, this.data.temporary);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.setObjectsStyle\");\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\nimport { forIn } from \"lodash\";\n\nexport default class SetLinksStyleAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.oldPipelineLinkStyles = [];\n\t\tforIn(this.data.pipelineLinkIds, (linkIds, pipelineId) => {\n\t\t\tconst apiPipeline = this.objectModel.getAPIPipeline(pipelineId);\n\t\t\tthis.oldPipelineLinkStyles = [];\n\t\t\tlinkIds.forEach((linkId) => {\n\t\t\t\tthis.oldPipelineLinkStyles.push({ pipelineId: pipelineId, objId: linkId, style: apiPipeline.getLinkStyle(linkId, this.data.temporary) });\n\t\t\t});\n\t\t});\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.objectModel.setLinksStyle(this.data.pipelineLinkIds, this.data.style, this.data.temporary);\n\t}\n\n\tundo() {\n\t\tthis.objectModel.setLinksMultiStyle(this.oldPipelineLinkStyles, this.data.temporary);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.setLinksStyle\");\n\t}\n}\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class UpdateLinkAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.oldLink = this.apiPipeline.getLink(data.newLink.id);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.updateLink(this.data.newLink);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.updateLink(this.oldLink);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\treturn this.labelUtil.getActionLabel(this, \"action.updateLink\");\n\t}\n\n\t// No need to return focus object\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport defaultMessages1 from \"../../locales/common-canvas/locales/en.json\";\nimport defaultMessages2 from \"../../locales/command-actions/locales/en.json\";\n\nexport default class LabelUtil {\n\tconstructor() {\n\t\tthis.intl = null;\n\t\tthis.actionLabelHandler = null;\n\t\tthis.defaultMessages = { ...defaultMessages1, ...defaultMessages2 };\n\t}\n\n\tsetIntl(intl) {\n\t\tthis.intl = intl;\n\t}\n\n\tgetIntl() {\n\t\treturn this.intl;\n\t}\n\n\tsetActionLabelHandler(handler) {\n\t\tthis.actionLabelHandler = handler;\n\t}\n\n\tgetActionLabel(action, key, substituteObj) {\n\t\tif (this.actionLabelHandler) {\n\t\t\tconst label = this.actionLabelHandler(action, substituteObj);\n\t\t\tif (label) {\n\t\t\t\treturn label;\n\t\t\t}\n\t\t}\n\t\treturn this.getLabel(key, substituteObj);\n\t}\n\n\tgetLabel(key, substituteObj) {\n\t\tlet formattedMessage;\n\t\tif (typeof this.intl !== \"undefined\" && this.intl !== null) {\n\t\t\tformattedMessage = this.intl.formatMessage({ id: key, defaultMessage: this.defaultMessages[key] }, substituteObj);\n\t\t} else {\n\t\t\tformattedMessage = this.defaultMessages[key];\n\t\t}\n\t\treturn formattedMessage;\n\t}\n\n}\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n last = require('./last');\n\n/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\nvar differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n});\n\nmodule.exports = differenceWith;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { has } from \"lodash\";\nimport { BINDING, EXECUTION_NODE,\n\tSUPER_NODE, MODEL_NODE } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class CanvasInHandler {\n\n\tstatic convertCanvasToCanvasInfo(canvas) {\n\t\t// There is only one pipeline in a canvas document contained in the\n\t\t// canvas.diagram field.\n\t\tconst canvasInfoPipeline = {\n\t\t\tid: canvas.diagram.id,\n\t\t\tnodes: this.getNodes(canvas.diagram.nodes),\n\t\t\tcomments: this.getComments(canvas.diagram.comments),\n\t\t\tlinks: this.getLinks(canvas.diagram.links, canvas.diagram.nodes, canvas.diagram.comments),\n\t\t\truntime_ref: \"\"\n\t\t};\n\n\t\t// The canvas zoom can be specified as a single number which needs to be\n\t\t// converted to our zoom object if it is not 100. If it is 100 we leave out\n\t\t// the zoom object because it will default to k = 1, x = 0, y = 0.\n\t\tif (canvas.zoom && typeof canvas.zoom === \"number\" && canvas.zoom !== 100) {\n\t\t\tcanvasInfoPipeline.zoom = {\n\t\t\t\tk: canvas.zoom / 100,\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tdoc_type: \"pipeline\",\n\t\t\tversion: \"3.0\",\n\t\t\tjson_schema: \"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json\",\n\t\t\tid: canvas.id,\n\t\t\tprimary_pipeline: canvas.diagram.id,\n\t\t\tpipelines: [canvasInfoPipeline]\n\t\t};\n\t}\n\n\tstatic getNodes(canvasNodes) {\n\t\treturn canvasNodes.map((canvasNode) => {\n\t\t\tconst nodeType = this.getType(canvasNode);\n\t\t\tvar newNode = {\n\t\t\t\tid: canvasNode.id,\n\t\t\t\timage: canvasNode.image,\n\t\t\t\tx_pos: typeof canvasNode.x_pos !== \"undefined\" ? canvasNode.x_pos : canvasNode.xPos, // Handle old field name xPos\n\t\t\t\ty_pos: typeof canvasNode.y_pos !== \"undefined\" ? canvasNode.y_pos : canvasNode.yPos, // Handle old field name yPos\n\t\t\t\tclass_name: canvasNode.className,\n\t\t\t\tlabel: canvasNode.objectData.label,\n\t\t\t\ttype: nodeType,\n\t\t\t\tstyle: canvasNode.style\n\t\t\t};\n\t\t\tif (canvasNode.objectData && canvasNode.objectData.description) {\n\t\t\t\tnewNode.description = canvasNode.objectData.description;\n\t\t\t}\n\t\t\tif (canvasNode.inputPorts) {\n\t\t\t\tnewNode.inputs = this.getInputPorts(canvasNode.inputPorts, 1);\n\t\t\t}\n\t\t\tif (canvasNode.outputPorts) {\n\t\t\t\tnewNode.outputs = this.getOutputPorts(canvasNode.outputPorts, -1);\n\t\t\t}\n\t\t\tif (canvasNode.decorations) {\n\t\t\t\tnewNode.decorations = this.getDecorations(canvasNode.decorations);\n\t\t\t}\n\t\t\tif (nodeType === SUPER_NODE) {\n\t\t\t\tnewNode.subflow_ref = { pipeline_id_ref: canvasNode.subDiagramId, url: \"app_defined\" };\n\t\t\t\tnewNode.open_with_tool = \"canvas\";\n\t\t\t\tnewNode.is_expanded = false;\n\t\t\t\t// WML Canvas doesn't use common-canvas expanded supernodes so just set some dummy values.\n\t\t\t\tnewNode.expanded_width = 200;\n\t\t\t\tnewNode.expanded_height = 200;\n\t\t\t}\n\n\t\t\tif (nodeType === MODEL_NODE) {\n\t\t\t\tnewNode.model_ref = \"\";\n\t\t\t}\n\n\t\t\tif (nodeType === EXECUTION_NODE || nodeType === BINDING || nodeType === MODEL_NODE) {\n\t\t\t\tif (canvasNode.userData && canvasNode.userData.typeId) {\n\t\t\t\t\tnewNode.op = canvasNode.userData.typeId;\n\t\t\t\t} else {\n\t\t\t\t\tnewNode.op = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newNode;\n\t\t});\n\t}\n\n\tstatic getType(canvasNode) {\n\t\tif (canvasNode.userData && canvasNode.userData.containsModel === true) {\n\t\t\treturn MODEL_NODE;\n\t\t}\n\t\tif (canvasNode.inputPorts && canvasNode.inputPorts.length > 0 &&\n\t\t\t\tcanvasNode.outputPorts && canvasNode.outputPorts.length > 0) {\n\t\t\tif (canvasNode.subDiagramId) {\n\t\t\t\treturn SUPER_NODE;\n\t\t\t}\n\t\t\treturn EXECUTION_NODE;\n\t\t}\n\t\treturn BINDING;\n\t}\n\n\tstatic getInputPorts(canvasInputPorts, defaultMaxCard) {\n\t\treturn canvasInputPorts.map((canvasInputPort) =>\n\t\t\t({\n\t\t\t\tid: canvasInputPort.name,\n\t\t\t\tlabel: canvasInputPort.label,\n\t\t\t\tcardinality: {\n\t\t\t\t\tmin: this.getMinCard(canvasInputPort.cardinality),\n\t\t\t\t\tmax: this.getMaxCard(canvasInputPort.cardinality, defaultMaxCard)\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tstatic getOutputPorts(canvasOutputPorts, defaultMaxCard) {\n\t\treturn canvasOutputPorts.map((canvasOutputPort) =>\n\t\t\t({\n\t\t\t\tid: canvasOutputPort.name,\n\t\t\t\tlabel: canvasOutputPort.label,\n\t\t\t\tcardinality: {\n\t\t\t\t\tmin: this.getMinCard(canvasOutputPort.cardinality),\n\t\t\t\t\tmax: this.getMaxCard(canvasOutputPort.cardinality, defaultMaxCard)\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tstatic getMinCard(card) {\n\t\tif (card) {\n\t\t\treturn Number(card.split(\":\")[0]);\n\t\t}\n\t\treturn 0;\n\t}\n\n\tstatic getMaxCard(card, defaultMaxCard) {\n\t\tif (card) {\n\t\t\treturn Number(card.split(\":\")[1]);\n\t\t}\n\t\treturn defaultMaxCard;\n\t}\n\n\tstatic getDecorations(decorations) {\n\t\treturn decorations.map((decoration) => ({\n\t\t\tposition: decoration.position,\n\t\t\tclass_name: decoration.className,\n\t\t\thotspot: decoration.hotspot,\n\t\t\tid: decoration.id,\n\t\t\timage: decoration.image,\n\t\t\toutline: decoration.outline,\n\t\t\tx_pos: decoration.x_pos,\n\t\t\ty_pos: decoration.y_pos,\n\t\t\twidth: decoration.width,\n\t\t\theight: decoration.height\n\t\t}));\n\t}\n\n\tstatic getComments(canvasComments) {\n\t\treturn canvasComments.map((canvasComment) =>\n\t\t\t({\n\t\t\t\tid: canvasComment.id,\n\t\t\t\tclass_name: canvasComment.className,\n\t\t\t\tcontent: canvasComment.content,\n\t\t\t\tx_pos: typeof canvasComment.x_pos !== \"undefined\" ? canvasComment.x_pos : canvasComment.xPos, // Handle old field name xPos\n\t\t\t\ty_pos: typeof canvasComment.y_pos !== \"undefined\" ? canvasComment.y_pos : canvasComment.yPos, // Handle old field name yPos\n\t\t\t\theight: canvasComment.height,\n\t\t\t\twidth: canvasComment.width,\n\t\t\t\tstyle: canvasComment.style\n\t\t\t})\n\t\t);\n\t}\n\n\tstatic getLinks(canvasLinks, nodes, comments) {\n\t\tconst newLinks = [];\n\t\tcanvasLinks.forEach((canvasLink) => {\n\t\t\tif (this.isValidLink(canvasLink, nodes, comments)) {\n\t\t\t\tvar newLink = {\n\t\t\t\t\tid: canvasLink.id,\n\t\t\t\t\tclass_name: canvasLink.className,\n\t\t\t\t\tsrcNodeId: canvasLink.source,\n\t\t\t\t\ttrgNodeId: canvasLink.target,\n\t\t\t\t\ttype: this.getLinkType(canvasLink),\n\t\t\t\t\tstyle: canvasLink.style\n\t\t\t\t};\n\t\t\t\tif (canvasLink.sourcePort) {\n\t\t\t\t\tnewLink.srcNodePortId = canvasLink.sourcePort;\n\t\t\t\t}\n\t\t\t\tif (canvasLink.targetPort) {\n\t\t\t\t\tnewLink.trgNodePortId = canvasLink.targetPort;\n\t\t\t\t}\n\t\t\t\tnewLinks.push(newLink);\n\t\t\t}\n\t\t});\n\t\treturn newLinks;\n\t}\n\n\tstatic isValidLink(canvasLink, nodes, comments) {\n\t\tlet isValid = false;\n\n\t\tif ((this.getLinkType(canvasLink) === \"nodeLink\" || this.getLinkType(canvasLink) === \"associationLink\") &&\n\t\t\t\t(nodes.findIndex((node) => node.id === canvasLink.source) > -1) &&\n\t\t\t\t(nodes.findIndex((node) => node.id === canvasLink.target) > -1)) {\n\t\t\tisValid = true;\n\t\t}\n\n\t\tif (this.getLinkType(canvasLink) === \"commentLink\" &&\n\t\t\t\t(comments.findIndex((comment) => comment.id === canvasLink.source) > -1) &&\n\t\t\t\t(nodes.findIndex((node) => node.id === canvasLink.target) > -1)) {\n\t\t\tisValid = true;\n\t\t}\n\n\t\treturn isValid;\n\t}\n\n\tstatic getLinkType(canvasLink) {\n\t\tif (has(canvasLink, \"userData.linkType\")) {\n\t\t\tswitch (canvasLink.userData.linkType) {\n\t\t\tcase \"comment\":\n\t\t\t\treturn \"commentLink\";\n\t\t\tcase \"object\":\n\t\t\t\treturn \"associationLink\";\n\t\t\tdefault:\n\t\t\t\treturn \"nodeLink\";\n\t\t\t}\n\t\t}\n\t\treturn \"nodeLink\";\n\t}\n\n\t// ==========================================================================\n\t// Functions below are for converting old palette data to new v1.0 palette\n\t// data used with pipeline flow. The upgrade-palette.js file will do all\n\t// necessary conversions from v1.0 to the latest version.\n\t// ==========================================================================\n\n\tstatic convertPaletteToPipelineFlowPalette(canvasPalette) {\n\t\treturn {\n\t\t\tversion: \"1.0\",\n\t\t\tcategories: this.getCategories(canvasPalette.categories)\n\t\t};\n\t}\n\n\tstatic getCategories(categories) {\n\t\treturn categories.map((cat) =>\n\t\t\t({\n\t\t\t\tcategory: cat.category,\n\t\t\t\tlabel: cat.label,\n\t\t\t\tdescription: cat.description,\n\t\t\t\timage: cat.image,\n\t\t\t\tis_open: cat.is_open,\n\t\t\t\tnodetypes: this.convertNodeTypes(cat.nodetypes)\n\t\t\t})\n\t\t);\n\t}\n\n\tstatic convertNodeTypes(nodetypes) {\n\t\treturn nodetypes.map((nodetype) => {\n\t\t\tvar newNodeType = {\n\t\t\t\ttype: this.getType(nodetype),\n\t\t\t\tlabel: nodetype.label,\n\t\t\t\tdescription: nodetype.description,\n\t\t\t\toperator_id_ref: nodetype.typeId,\n\t\t\t\timage: nodetype.image\n\t\t\t};\n\t\t\tif (nodetype.inputPorts) {\n\t\t\t\tnewNodeType.input_ports = this.convertPalettePorts(nodetype.inputPorts, 1);\n\t\t\t}\n\t\t\tif (nodetype.outputPorts) {\n\t\t\t\tnewNodeType.output_ports = this.convertPalettePorts(nodetype.outputPorts, -1);\n\t\t\t}\n\t\t\treturn newNodeType;\n\t\t});\n\t}\n\n\tstatic convertPalettePorts(ports, defaultMaxCard) {\n\t\treturn ports.map((port) =>\n\t\t\t({\n\t\t\t\tid: port.name,\n\t\t\t\tlabel: port.label,\n\t\t\t\tcardinality: this.convertPaletteCardinality(port.cardinality, defaultMaxCard)\n\t\t\t})\n\t\t);\n\t}\n\n\tstatic convertPaletteCardinality(cardinality, defaultMaxCard) {\n\t\treturn {\n\t\t\tmin: this.getMinCard(cardinality),\n\t\t\tmax: this.getMaxCard(cardinality, defaultMaxCard)\n\t\t};\n\t}\n\n\t// ==========================================================================\n\t// Functions below are for detecting if the palette data is version 0 or not.\n\t// ==========================================================================\n\n\t// Returns true if the palette passed in is version 0. Version 0 is indicated\n\t// if any node in the categories of the palette has a 'typeId' field.\n\tstatic isVersion0Palette(palette) {\n\t\tlet isVersion0Palette = false;\n\n\t\tfor (let idx = 0; idx < palette.categories.length; idx++) {\n\t\t\tif (this.isVersion0Category(palette.categories[idx])) {\n\t\t\t\tisVersion0Palette = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isVersion0Palette;\n\t}\n\n\t// If a category has a node that has a 'typeId' field then it indicates\n\t// a version 0 category.\n\tstatic isVersion0Category(category) {\n\t\tlet isVersion0Palette = false;\n\n\t\tif (category.nodetypes) {\n\t\t\tfor (let idx = 0; idx < category.nodetypes.length; idx++) {\n\t\t\t\tif (category.nodetypes[idx].typeId) {\n\t\t\t\t\tisVersion0Palette = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isVersion0Palette;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default class CanvasOutHandler {\n\n\t// ==========================================================================\n\t// Functions below are returning canvasinfo in the old deprecated canvas\n\t// format based on the initial canvas passed in.\n\t// ==========================================================================\n\n\tstatic getCanvasBasedOnCanvasInfo(oldCanvas, canvasinfo) {\n\t\treturn Object.assign({}, oldCanvas, { diagram: this.getDiagram(oldCanvas, canvasinfo.pipelines[0]) });\n\t}\n\n\tstatic getDiagram(oldCanvas, canvasinfoPipeline) {\n\t\treturn {\n\t\t\tid: canvasinfoPipeline.id,\n\t\t\tnodes: this.getCanvasNodes(canvasinfoPipeline.nodes, oldCanvas),\n\t\t\tcomments: this.getCanvasComments(canvasinfoPipeline.comments),\n\t\t\tlinks: this.getCanvasLinks(canvasinfoPipeline.links)\n\t\t};\n\t}\n\n\tstatic getCanvasNodes(canvasnodes, oldCanvas) {\n\t\treturn canvasnodes.map((canvasnode) => {\n\t\t\tvar newNode = {\n\t\t\t\tid: canvasnode.id\n\t\t\t};\n\t\t\tif (canvasnode.inputs) {\n\t\t\t\tnewNode.inputPorts = this.getCanvasPorts(canvasnode.inputs);\n\t\t\t}\n\t\t\tif (canvasnode.outputs) {\n\t\t\t\tnewNode.outputPorts = this.getCanvasPorts(canvasnode.outputs);\n\t\t\t}\n\t\t\tnewNode.image = canvasnode.image;\n\t\t\tnewNode.x_pos = canvasnode.x_pos;\n\t\t\tnewNode.y_pos = canvasnode.y_pos;\n\t\t\tnewNode.className = canvasnode.class_name;\n\t\t\tnewNode.objectData = {\n\t\t\t\tlabel: canvasnode.label,\n\t\t\t\tdescription: canvasnode.description || \"\"\n\t\t\t};\n\t\t\tnewNode.userData = {\n\t\t\t\ttypeId: canvasnode.op\n\t\t\t};\n\t\t\tif (canvasnode.decorations) {\n\t\t\t\tnewNode.decorations = this.getCanvasDecorations(canvasnode.decorations);\n\t\t\t}\n\t\t\tvar oldNode = this.getOldNode(canvasnode.id, oldCanvas);\n\t\t\tif (oldNode && oldNode.userData) {\n\t\t\t\tnewNode.userData = oldNode.userData;\n\t\t\t}\n\t\t\treturn newNode;\n\t\t});\n\t}\n\n\tstatic getCanvasPorts(canvasports) {\n\t\treturn canvasports.map((canvasport) => {\n\t\t\tvar newPort = {\n\t\t\t\tname: canvasport.id,\n\t\t\t\tlabel: canvasport.label\n\t\t\t};\n\t\t\tif (canvasport.cardinality) {\n\t\t\t\tnewPort.cardinality = canvasport.cardinality.min + \":\" + canvasport.cardinality.max;\n\t\t\t}\n\t\t\treturn newPort;\n\t\t});\n\t}\n\n\tstatic getCanvasDecorations(canvasdecorations) {\n\t\treturn canvasdecorations.map((decoration) => {\n\t\t\tvar newDecoration = {};\n\t\t\tif (decoration.position) {\n\t\t\t\tnewDecoration.position = decoration.position;\n\t\t\t}\n\t\t\tif (decoration.class_name) {\n\t\t\t\tnewDecoration.className = decoration.class_name;\n\t\t\t}\n\t\t\tif (decoration.image) {\n\t\t\t\tnewDecoration.image = decoration.image;\n\t\t\t}\n\t\t\tif (decoration.hotspot) {\n\t\t\t\tnewDecoration.hotspot = decoration.hotspot;\n\t\t\t}\n\t\t\tif (decoration.id) {\n\t\t\t\tnewDecoration.id = decoration.id;\n\t\t\t}\n\t\t\treturn newDecoration;\n\t\t});\n\t}\n\n\tstatic getOldNode(nodeId, oldCanvas) {\n\t\tif (oldCanvas && oldCanvas.diagram && oldCanvas.diagram.nodes) {\n\t\t\tvar index = oldCanvas.diagram.nodes.findIndex((node) => node.id === nodeId);\n\t\t\tif (index > -1) {\n\t\t\t\treturn oldCanvas.diagram.nodes[index];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tstatic getCanvasComments(canvascomments) {\n\t\treturn canvascomments.map((canvascomment) => {\n\t\t\tvar newCom = {\n\t\t\t\tid: canvascomment.id,\n\t\t\t\tclassName: canvascomment.class_name,\n\t\t\t\tcontent: canvascomment.content,\n\t\t\t\theight: canvascomment.height,\n\t\t\t\twidth: canvascomment.width,\n\t\t\t\tx_pos: canvascomment.x_pos,\n\t\t\t\ty_pos: canvascomment.y_pos\n\t\t\t};\n\t\t\treturn newCom;\n\t\t});\n\t}\n\n\tstatic getCanvasLinks(canvaslinks) {\n\t\treturn canvaslinks.map((canvaslink) => {\n\t\t\tvar newLink = {\n\t\t\t\tid: canvaslink.id,\n\t\t\t\tclassName: canvaslink.class_name,\n\t\t\t\tsource: canvaslink.srcNodeId\n\t\t\t};\n\t\t\tif (canvaslink.srcNodePortId) {\n\t\t\t\tnewLink.sourcePort = canvaslink.srcNodePortId;\n\t\t\t}\n\t\t\tnewLink.target = canvaslink.trgNodeId;\n\n\t\t\tif (canvaslink.trgNodePortId) {\n\t\t\t\tnewLink.targetPort = canvaslink.trgNodePortId;\n\t\t\t}\n\t\t\tlet linkTypeValue = \"\";\n\t\t\tswitch (canvaslink.type) {\n\t\t\tcase \"commentLink\":\n\t\t\t\tlinkTypeValue = \"comment\";\n\t\t\t\tbreak;\n\t\t\tcase \"associationLink\":\n\t\t\t\tlinkTypeValue = \"object\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlinkTypeValue = \"data\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnewLink.userData = { linkType: linkTypeValue };\n\n\t\t\treturn newLink;\n\t\t});\n\t}\n\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneDeep, isEmpty, isObject, has } from \"lodash\";\nimport { v4 as uuid4 } from \"uuid\";\nimport { BINDING, EXECUTION_NODE, SUPER_NODE, MODEL_NODE } from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class PipelineInHandler {\n\n\t// Returns the 'canvas info' pipeline, stored internally in the object model,\n\t// by extracting that info from the pipeline-flow provided.\n\tstatic convertPipelineFlowToCanvasInfo(pipelineFlow, canvasLayout) {\n\t\tconst canvasInfoPipelines = this.convertPipelinesToCanvasInfoPipelines(pipelineFlow.pipelines, canvasLayout);\n\t\tconst newPipelineFlow = Object.assign({}, pipelineFlow, { pipelines: canvasInfoPipelines });\n\t\treturn newPipelineFlow;\n\t}\n\n\t// Returns an array of pipelines that conform to the internal 'canvas info'\n\t// format based on the array of pipelines passed in that are expected to\n\t// conform to the pipeline-flow format'.\n\tstatic convertPipelinesToCanvasInfoPipelines(pipelines, canvasLayout) {\n\t\tlet canvasInfoPipelines = [];\n\t\tif (pipelines) {\n\t\t\tcanvasInfoPipelines = pipelines.map((pFlowPipeline) =>\n\t\t\t\tthis.convertPipelineToCanvasInfoPipeline(pFlowPipeline, canvasLayout)\n\t\t\t);\n\t\t}\n\t\treturn canvasInfoPipelines;\n\t}\n\n\t// Returns the 'canvas info' pipeline, stored internally in the object model,\n\t// by extracting that info from the pipeline-flow pipeline provided. A\n\t// 'canvas info' pipeline consists of an ID and three arrays: nodes,\n\t// comments and links.\n\tstatic convertPipelineToCanvasInfoPipeline(pipeline, canvasLayout) {\n\t\tconst nodes = has(pipeline, \"nodes\") ? pipeline.nodes : [];\n\t\tconst comments = has(pipeline, \"app_data.ui_data.comments\") ? pipeline.app_data.ui_data.comments : [];\n\t\tconst detachedLinks = has(pipeline, \"app_data.ui_data.detached_links\") ? pipeline.app_data.ui_data.detached_links : [];\n\n\t\tvar canvas = {\n\t\t\t\"id\": pipeline.id,\n\t\t\t\"name\": pipeline.name,\n\t\t\t\"nodes\": this.convertNodes(nodes, canvasLayout),\n\t\t\t\"comments\": this.convertComments(comments),\n\t\t\t\"links\": this.convertLinks(nodes, comments, detachedLinks),\n\t\t\t\"runtime_ref\": pipeline.runtime_ref,\n\t\t\t\"app_data\": pipeline.app_data,\n\t\t\t\"parameters\": pipeline.parameters\n\t\t};\n\n\t\tif (has(pipeline, \"app_data.ui_data.zoom\")) {\n\t\t\tif (typeof pipeline.app_data.ui_data.zoom === \"number\") {\n\t\t\t\tcanvas.zoom = { x: 0, y: 0, k: pipeline.app_data.ui_data.zoom / 100 };\n\t\t\t} else {\n\t\t\t\tcanvas.zoom = pipeline.app_data.ui_data.zoom;\n\t\t\t}\n\t\t}\n\n\t\t// Remove comments from app_data.ui_data as it's now stored in canvas obj.\n\t\tif (has(canvas, \"app_data.ui_data.comments\")) {\n\t\t\tdelete canvas.app_data.ui_data.comments;\n\t\t}\n\n\t\t// Remove detached_links from app_data.ui_data as it's now stored in canvas obj.\n\t\tif (has(canvas, \"app_data.ui_data.detached_links\")) {\n\t\t\tdelete canvas.app_data.ui_data.detached_links;\n\t\t}\n\t\treturn canvas;\n\t}\n\n\tstatic convertNodes(nodes, canvasLayout) {\n\t\treturn nodes.map((node) => this.convertNode(node, canvasLayout));\n\t}\n\n\tstatic convertNode(node, canvasLayout) {\n\t\tconst obj = {\n\t\t\t\"id\": node.id,\n\t\t\t\"type\": node.type,\n\t\t\t\"outputs\": this.convertOutputs(node),\n\t\t\t\"inputs\": this.convertInputs(node),\n\t\t\t\"label\": this.convertLabel(node),\n\t\t\t\"x_pos\": has(node, \"app_data.ui_data.x_pos\") ? node.app_data.ui_data.x_pos : 10,\n\t\t\t\"y_pos\": has(node, \"app_data.ui_data.y_pos\") ? node.app_data.ui_data.y_pos : 10,\n\t\t\t\"decorations\": has(node, \"app_data.ui_data.decorations\") ? this.convertDecorations(node.app_data.ui_data.decorations) : [],\n\t\t\t\"parameters\": has(node, \"parameters\") ? node.parameters : [],\n\t\t\t\"messages\": has(node, \"app_data.ui_data.messages\") ? node.app_data.ui_data.messages : [],\n\t\t\t\"ui_parameters\": has(node, \"app_data.ui_data.ui_parameters\") ? node.app_data.ui_data.ui_parameters : [],\n\t\t\t\"app_data\": has(node, \"app_data\") ? this.removeUiDataFromAppData(node.app_data) : []\n\t\t};\n\n\t\tif (node.type === EXECUTION_NODE ||\n\t\t\t\tnode.type === BINDING ||\n\t\t\t\tnode.type === MODEL_NODE) {\n\t\t\tobj.op = node.op;\n\t\t}\n\t\tif (node.type === SUPER_NODE) {\n\t\t\t// Separate initialization needed to ensure field is only created when present.\n\t\t\tif (has(node, \"open_with_tool\")) {\n\t\t\t\tobj.open_with_tool = node.open_with_tool;\n\t\t\t}\n\t\t\tobj.subflow_ref = has(node, \"subflow_ref\") ? this.convertSubFlowRef(node.subflow_ref) : {};\n\t\t\tobj.is_expanded = has(node, \"app_data.ui_data.is_expanded\") ? node.app_data.ui_data.is_expanded : false;\n\t\t\tobj.expanded_width = has(node, \"app_data.ui_data.expanded_width\") ? node.app_data.ui_data.expanded_width : canvasLayout.supernodeDefaultWidth;\n\t\t\tobj.expanded_height = has(node, \"app_data.ui_data.expanded_height\") ? node.app_data.ui_data.expanded_height : canvasLayout.supernodeDefaultHeight;\n\t\t}\n\t\tif (node.type === MODEL_NODE) {\n\t\t\tobj.model_ref = has(node, \"model_ref\") ? node.model_ref : \"\";\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.is_resized\")) {\n\t\t\tobj.isResized = node.app_data.ui_data.is_resized;\n\t\t\tobj.resizeHeight = node.app_data.ui_data.resize_height;\n\t\t\tobj.resizeWidth = node.app_data.ui_data.resize_width;\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.description\")) {\n\t\t\tobj.description = node.app_data.ui_data.description;\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.image\")) {\n\t\t\tobj.image = node.app_data.ui_data.image;\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.class_name\")) {\n\t\t\tobj.class_name = node.app_data.ui_data.class_name;\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.style\")) {\n\t\t\tobj.style = node.app_data.ui_data.style;\n\t\t}\n\t\tif (has(node, \"app_data.ui_data.sub_pipelines\")) {\n\t\t\tobj.sub_pipelines = node.app_data.ui_data.sub_pipelines;\n\t\t}\n\t\tif (has(node, \"isSupernodeInputBinding\")) {\n\t\t\tobj.isSupernodeInputBinding = true;\n\t\t}\n\t\tif (has(node, \"isSupernodeOutputBinding\")) {\n\t\t\tobj.isSupernodeOutputBinding = true;\n\t\t}\n\t\tif (has(node, \"connection\")) {\n\t\t\tobj.connection = node.connection;\n\t\t}\n\t\tif (has(node, \"data_asset\")) {\n\t\t\tobj.data_asset = node.data_asset;\n\t\t}\n\t\treturn obj;\n\t}\n\n\tstatic convertSubFlowRef(subFlowRef) {\n\t\tconst sfr = {\n\t\t\tpipeline_id_ref: subFlowRef.pipeline_id_ref\n\t\t};\n\t\tif (subFlowRef.url) {\n\t\t\tsfr.url = subFlowRef.url;\n\t\t}\n\t\treturn sfr;\n\t}\n\n\tstatic convertLabel(obj) {\n\t\t// node label in pipeline-flow-ui schema is not a resource_def anymore, but just a string\n\t\tconst label = has(obj, \"app_data.ui_data.label\") ? obj.app_data.ui_data.label : \"\";\n\t\tif (isObject(label) && label.default) {\n\t\t\treturn label.default;\n\t\t}\n\t\treturn label;\n\t}\n\n\tstatic convertOutputs(node) {\n\t\tif (node.outputs) {\n\t\t\treturn node.outputs.map((output) => this.convertPortObject(output));\n\t\t}\n\t\treturn node.outputs; // Return undefined if no outputs property\n\t}\n\n\tstatic convertInputs(node) {\n\t\tif (node.inputs) {\n\t\t\treturn node.inputs.map((input) => this.convertPortObject(input));\n\t\t}\n\t\treturn node.inputs; // Return undefined if no inputs property\n\t}\n\n\tstatic convertPortObject(port) {\n\t\tconst portObj = {\n\t\t\t\"id\": port.id,\n\t\t\t\"label\": this.convertLabel(port)\n\t\t};\n\n\t\tif (has(port, \"subflow_node_ref\")) {\n\t\t\tportObj.subflow_node_ref = port.subflow_node_ref;\n\t\t}\n\t\tif (has(port, \"schema_ref\")) {\n\t\t\tportObj.schema_ref = port.schema_ref;\n\t\t}\n\t\tif (has(port, \"app_data.ui_data.cardinality\")) {\n\t\t\tportObj.cardinality = {\n\t\t\t\t\"min\": port.app_data.ui_data.cardinality.min,\n\t\t\t\t\"max\": port.app_data.ui_data.cardinality.max\n\t\t\t};\n\t\t}\n\t\tif (has(port, \"app_data.ui_data.class_name\")) {\n\t\t\tportObj.class_name = port.app_data.ui_data.class_name;\n\t\t}\n\t\tif (has(port, \"parameters\")) {\n\t\t\tportObj.parameters = port.parameters;\n\t\t}\n\t\tif (port.app_data) {\n\t\t\tportObj.app_data = this.removeUiDataFromAppData(port.app_data);\n\t\t}\n\n\t\treturn portObj;\n\t}\n\n\tstatic convertDecorations(decorations) {\n\t\tvar newDecorations = [];\n\t\tif (decorations) {\n\t\t\tdecorations.forEach((decoration) => {\n\t\t\t\tvar newDecoration = Object.assign({}, decoration, { id: decoration.id || this.getUUID() });\n\t\t\t\tnewDecorations.push(newDecoration);\n\t\t\t});\n\t\t}\n\t\treturn newDecorations;\n\t}\n\n\tstatic convertComments(comments) {\n\t\treturn comments.map((comment) => {\n\t\t\tconst newComment = {\n\t\t\t\t\"id\": comment.id,\n\t\t\t\t\"content\": comment.content,\n\t\t\t\t\"height\": comment.height,\n\t\t\t\t\"width\": comment.width,\n\t\t\t\t\"x_pos\": comment.x_pos,\n\t\t\t\t\"y_pos\": comment.y_pos\n\t\t\t};\n\n\t\t\tif (has(comment, \"class_name\")) {\n\t\t\t\tnewComment.class_name = comment.class_name;\n\t\t\t}\n\n\t\t\tif (has(comment, \"content_type\")) {\n\t\t\t\tnewComment.contentType = comment.content_type;\n\t\t\t}\n\n\t\t\t// Some older pipeline flows may have this incorrect\n\t\t\t// field name, so read that here so they will still work.\n\t\t\tif (has(comment, \"contentType\")) {\n\t\t\t\tnewComment.contentType = comment.contentType;\n\t\t\t}\n\n\t\t\tif (has(comment, \"formats\")) {\n\t\t\t\tnewComment.formats = comment.formats;\n\t\t\t}\n\n\t\t\tif (has(comment, \"style\")) {\n\t\t\t\tnewComment.style = comment.style;\n\t\t\t}\n\n\t\t\treturn newComment;\n\t\t});\n\t}\n\n\tstatic convertLinks(nodes, comments, detachedLinks) {\n\t\tconst links = [];\n\n\t\tnodes.forEach((node) => {\n\t\t\tif (node.inputs) {\n\t\t\t\tnode.inputs.forEach((input) => {\n\t\t\t\t\tif (input.links) {\n\t\t\t\t\t\tinput.links.forEach((link) => {\n\t\t\t\t\t\t\tif (this.isNode(nodes, link.node_id_ref)) {\n\t\t\t\t\t\t\t\tconst newLink =\n\t\t\t\t\t\t\t\t\tthis.createDataLink(link, link.node_id_ref, link.port_id_ref, node.id, input.id);\n\t\t\t\t\t\t\t\tlinks.push(newLink);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Association links are defined in UI data\n\t\t\tif (has(node, \"app_data.ui_data.associations\") && !isEmpty(node.app_data.ui_data.associations)) {\n\t\t\t\tnode.app_data.ui_data.associations.forEach((association) => {\n\t\t\t\t\tif (this.isNode(nodes, association.node_ref)) {\n\t\t\t\t\t\tconst newLink = {\n\t\t\t\t\t\t\t\"id\": association.id ? association.id : this.getUUID(),\n\t\t\t\t\t\t\t\"srcNodeId\": node.id,\n\t\t\t\t\t\t\t\"trgNodeId\": association.node_ref,\n\t\t\t\t\t\t\t\"type\": \"associationLink\",\n\t\t\t\t\t\t\t\"decorations\": association.decorations\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (has(association, \"class_name\")) {\n\t\t\t\t\t\t\tnewLink.class_name = association.class_name;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlinks.push(newLink);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tcomments.forEach((comment) => {\n\t\t\tif (comment.associated_id_refs) {\n\t\t\t\tcomment.associated_id_refs.forEach((assocRef) => {\n\t\t\t\t\tif (this.isNode(nodes, assocRef.node_ref)) {\n\t\t\t\t\t\tconst newLink = {\n\t\t\t\t\t\t\t\"id\": assocRef.id ? assocRef.id : this.getUUID(),\n\t\t\t\t\t\t\t\"srcNodeId\": comment.id,\n\t\t\t\t\t\t\t\"trgNodeId\": assocRef.node_ref,\n\t\t\t\t\t\t\t\"type\": \"commentLink\"\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (has(assocRef, \"class_name\")) {\n\t\t\t\t\t\t\tnewLink.class_name = assocRef.class_name;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (assocRef.style) {\n\t\t\t\t\t\t\tnewLink.style = assocRef.style;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlinks.push(newLink);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t// Detached links are defined in the UI data\n\t\tdetachedLinks.forEach((detLink) => {\n\t\t\tconst newDetLink = this.createDataLink(detLink,\n\t\t\t\tdetLink.src_node_id, detLink.src_node_port_id,\n\t\t\t\tdetLink.trg_node_id, detLink.trg_node_port_id);\n\n\t\t\tif (detLink.src_pos) {\n\t\t\t\tnewDetLink.srcPos = detLink.src_pos;\n\t\t\t}\n\t\t\tif (detLink.trg_pos) {\n\t\t\t\tnewDetLink.trgPos = detLink.trg_pos;\n\t\t\t}\n\t\t\tlinks.push(newDetLink);\n\t\t});\n\n\t\treturn links;\n\t}\n\n\tstatic isNode(nodes, id) {\n\t\tconst index = nodes.findIndex((node) => node.id === id);\n\t\tif (index === -1) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tstatic getUUID() {\n\t\treturn uuid4();\n\t}\n\n\t// Creates a new internal link from the pipelineFlow link and node and port\n\t// info passed in. This is used for create a regular data link and also a\n\t// detached data link. For a detached data link the node and port info passed\n\t// in is undefined.\n\tstatic createDataLink(link, srcNodeId, srcNodePortId, trgNodeId, trgNodePortId) {\n\t\tconst newLink = {\n\t\t\t\"id\": has(link, \"id\") ? link.id : this.getUUID(),\n\t\t\t\"srcNodeId\": srcNodeId,\n\t\t\t\"trgNodeId\": trgNodeId,\n\t\t\t\"trgNodePortId\": trgNodePortId,\n\t\t\t\"type\": \"nodeLink\"\n\t\t};\n\t\tif (has(link, \"app_data.ui_data.class_name\")) {\n\t\t\tnewLink.class_name = link.app_data.ui_data.class_name;\n\t\t}\n\t\tif (has(link, \"app_data.ui_data.style\")) {\n\t\t\tnewLink.style = link.app_data.ui_data.style;\n\t\t}\n\t\tif (has(link, \"app_data.ui_data.decorations\")) {\n\t\t\tnewLink.decorations = link.app_data.ui_data.decorations;\n\t\t}\n\t\tif (link.app_data) {\n\t\t\tnewLink.app_data = this.removeUiDataFromAppData(link.app_data);\n\t\t}\n\t\tif (srcNodePortId) { // according to the spec, port_id_ref is optional for links\n\t\t\tnewLink.srcNodePortId = srcNodePortId;\n\t\t}\n\t\tif (link.link_name) { // link_name is also optional\n\t\t\tnewLink.linkName = link.link_name;\n\t\t}\n\t\tif (link.type_attr) { // type_attr is also optional\n\t\t\tnewLink.typeAttr = link.type_attr;\n\t\t}\n\t\tif (link.description) { // description is also optional\n\t\t\tnewLink.description = link.description;\n\t\t}\n\n\t\treturn newLink;\n\t}\n\n\t// Removes ui_data field from appData passed in and returns the resulting\n\t// object or returns undefined if no appData is provided.\n\tstatic removeUiDataFromAppData(appData) {\n\t\tlet newAppData;\n\t\tif (appData) {\n\t\t\tnewAppData = cloneDeep(appData);\n\t\t\tdelete newAppData.ui_data;\n\t\t}\n\t\treturn newAppData;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneDeep, isEmpty, set } from \"lodash\";\nimport { BINDING, EXECUTION_NODE,\n\tSUPER_NODE, MODEL_NODE } from \"../common-canvas/constants/canvas-constants.js\";\n\n\nexport default class PipelineOutHandler {\n\n\t// Creates a new pipeline flow using the canvasInfo. The top level fields\n\t// in the canvasInfo are the same as those for the pipelineFlow.\n\tstatic createPipelineFlow(canvasInfo) {\n\t\tconst copyCanvasInfo = cloneDeep(canvasInfo);\n\t\t// Remove these transitory fields before creating the pipelineFlow.\n\t\tdelete copyCanvasInfo.subdueStyle;\n\t\tdelete copyCanvasInfo.hideComments;\n\n\t\tconst pipelineFlow = Object.assign({}, copyCanvasInfo,\n\t\t\t{\n\t\t\t\t\"pipelines\": this.createPipelinesFromCanvasInfo(copyCanvasInfo)\n\t\t\t});\n\n\t\treturn pipelineFlow;\n\t}\n\n\tstatic createPipelinesFromCanvasInfo(canvasInfo) {\n\t\tif (canvasInfo) {\n\t\t\tconst filteredPipelines = this.filterOutExternalPipelines(canvasInfo.pipelines);\n\t\t\treturn filteredPipelines.map((canvasInfoPipeline) => this.createPipeline(canvasInfoPipeline));\n\t\t}\n\t\treturn {};\n\t}\n\n\t// Returns a subset of pipelines from the array passed in that are pipelines\n\t// that are local to the pipelineFlow i.e. those that are not for external\n\t// pipelines. External pipelines are those that have a parentUrl property.\n\tstatic filterOutExternalPipelines(pipelines) {\n\t\treturn pipelines.filter((canvasInfoPipeline) => !canvasInfoPipeline.parentUrl);\n\t}\n\n\tstatic createPipeline(canvasInfoPipeline) {\n\t\tconst newPipeline = {\n\t\t\tid: canvasInfoPipeline.id\n\t\t};\n\t\tif (canvasInfoPipeline.name) {\n\t\t\tnewPipeline.name = canvasInfoPipeline.name;\n\t\t}\n\t\tnewPipeline.nodes = this.createNodes(canvasInfoPipeline);\n\t\tnewPipeline.app_data = this.createPipelineAppData(canvasInfoPipeline);\n\t\tnewPipeline.runtime_ref = canvasInfoPipeline.runtime_ref;\n\n\t\tif (canvasInfoPipeline.parameters) {\n\t\t\tnewPipeline.parameters = canvasInfoPipeline.parameters;\n\t\t}\n\n\t\treturn newPipeline;\n\t}\n\n\tstatic createNodes(canvasInfoPipeline) {\n\t\treturn canvasInfoPipeline.nodes.map((canvasInfoNode) =>\n\t\t\tthis.createSchemaNode(canvasInfoNode, canvasInfoPipeline.links)\n\t\t);\n\t}\n\n\tstatic createSchemaNode(ciNode, ciLinks) {\n\t\tvar newNode = {\n\t\t\tid: ciNode.id,\n\t\t\ttype: ciNode.type\n\t\t};\n\n\t\tif (ciNode.type === EXECUTION_NODE ||\n\t\t\t\tciNode.type === BINDING ||\n\t\t\t\tciNode.type === MODEL_NODE) {\n\t\t\tif (ciNode.op || ciNode.op === \"\") {\n\t\t\t\tnewNode.op = ciNode.op; // Write out op even if it is \"\" to allow our tests to work.\n\t\t\t}\n\t\t}\n\n\t\tif (ciNode.type === SUPER_NODE) {\n\t\t\tif (ciNode.open_with_tool) {\n\t\t\t\tnewNode.open_with_tool = ciNode.open_with_tool;\n\t\t\t}\n\t\t\tnewNode.subflow_ref = ciNode.subflow_ref;\n\t\t}\n\n\t\tif (ciNode.type === MODEL_NODE) {\n\t\t\tnewNode.model_ref = ciNode.model_ref;\n\t\t}\n\n\t\tnewNode.app_data =\n\t\t\tObject.assign({}, ciNode.app_data, { ui_data: this.createNodeUiData(ciNode) });\n\n\t\tif (ciNode.inputs) {\n\t\t\tnewNode.inputs = this.createInputs(ciNode, ciLinks);\n\t\t}\n\n\t\tif (ciNode.outputs) {\n\t\t\tnewNode.outputs = this.createOutputs(ciNode);\n\t\t}\n\n\t\tif (ciNode.parameters && !isEmpty(ciNode.parameters)) {\n\t\t\tnewNode.parameters = ciNode.parameters;\n\t\t}\n\n\t\tif (ciNode.connection) {\n\t\t\tnewNode.connection = ciNode.connection;\n\t\t}\n\n\t\tif (ciNode.data_asset) {\n\t\t\tnewNode.data_asset = ciNode.data_asset;\n\t\t}\n\n\t\tconst associationLinks = this.createAssociationLinks(ciNode, ciLinks);\n\t\tif (!isEmpty(associationLinks)) {\n\t\t\tnewNode.app_data.ui_data.associations = associationLinks;\n\t\t}\n\n\t\treturn newNode;\n\t}\n\n\tstatic createNodeUiData(ciNode) {\n\t\tconst uiData = {\n\t\t\tlabel: ciNode.label,\n\t\t\timage: (typeof ciNode.image === \"object\" ? \"\" : ciNode.image),\n\t\t\tx_pos: ciNode.x_pos,\n\t\t\ty_pos: ciNode.y_pos\n\t\t};\n\n\t\tif (ciNode.class_name) {\n\t\t\tuiData.class_name = ciNode.class_name;\n\t\t}\n\n\t\tif (ciNode.style) {\n\t\t\tuiData.style = ciNode.style;\n\t\t}\n\n\t\tif (ciNode.description) {\n\t\t\tuiData.description = ciNode.description;\n\t\t}\n\n\t\tif (ciNode.type === SUPER_NODE) {\n\t\t\tuiData.is_expanded = ciNode.is_expanded;\n\t\t\tuiData.expanded_width = ciNode.expanded_width;\n\t\t\tuiData.expanded_height = ciNode.expanded_height;\n\n\t\t}\n\n\t\tif (ciNode.isResized) {\n\t\t\tuiData.is_resized = ciNode.isResized;\n\t\t\tuiData.resize_width = ciNode.resizeWidth;\n\t\t\tuiData.resize_height = ciNode.resizeHeight;\n\t\t}\n\n\t\tif (ciNode.messages && !isEmpty(ciNode.messages)) {\n\t\t\tuiData.messages = ciNode.messages;\n\t\t}\n\n\t\tif (ciNode.ui_parameters && !isEmpty(ciNode.ui_parameters)) {\n\t\t\tuiData.ui_parameters = ciNode.ui_parameters;\n\t\t}\n\n\t\tif (ciNode.decorations) {\n\t\t\tvar newDecorations = this.createDecorations(ciNode.decorations);\n\t\t\tif (newDecorations.length > 0) {\n\t\t\t\tuiData.decorations = newDecorations;\n\t\t\t}\n\t\t}\n\n\n\t\treturn uiData;\n\t}\n\n\tstatic createDecorations(decorations) {\n\t\tvar newDecorations = [];\n\t\tif (decorations) {\n\t\t\tdecorations.forEach((decoration) => {\n\t\t\t\tif (!decoration.temporary && !decoration.jsx) {\n\t\t\t\t\tconst dec = Object.assign({}, decoration); // This will only copy over set values and ignore undefined values\n\t\t\t\t\tnewDecorations.push(dec);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn newDecorations;\n\t}\n\n\tstatic createInputs(ciNode, canvasLinks) {\n\t\tvar newInputs = [];\n\t\tciNode.inputs.forEach((ciInputPort, portIndex) => {\n\t\t\tconst newInput = {\n\t\t\t\tid: ciInputPort.id\n\t\t\t};\n\n\t\t\tif (ciNode.type === SUPER_NODE) {\n\t\t\t\tif (ciInputPort.subflow_node_ref) {\n\t\t\t\t\tnewInput.subflow_node_ref = ciInputPort.subflow_node_ref;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ciInputPort.schema_ref) {\n\t\t\t\tnewInput.schema_ref = ciInputPort.schema_ref;\n\t\t\t}\n\n\t\t\tnewInput.app_data =\n\t\t\t\tObject.assign({}, ciInputPort.app_data, { ui_data: this.createPortUiData(ciInputPort) });\n\n\t\t\tvar newLinks = this.createLinks(canvasLinks, ciNode.id, ciInputPort.id, portIndex);\n\t\t\tif (newLinks.length > 0) {\n\t\t\t\tnewInput.links = newLinks;\n\t\t\t}\n\n\t\t\tif (ciInputPort.parameters) {\n\t\t\t\tnewInput.parameters = ciInputPort.parameters;\n\t\t\t}\n\n\t\t\tnewInputs.push(newInput);\n\t\t});\n\t\treturn newInputs;\n\t}\n\n\tstatic createOutputs(ciNode) {\n\t\tvar newOutputs = [];\n\t\tciNode.outputs.forEach((ciOutputPort) => {\n\t\t\tvar newOutput = {\n\t\t\t\tid: ciOutputPort.id\n\t\t\t};\n\n\t\t\tif (ciNode.type === SUPER_NODE) {\n\t\t\t\tif (ciOutputPort.subflow_node_ref) {\n\t\t\t\t\tnewOutput.subflow_node_ref = ciOutputPort.subflow_node_ref;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ciOutputPort.schema_ref) {\n\t\t\t\tnewOutput.schema_ref = ciOutputPort.schema_ref;\n\t\t\t}\n\n\t\t\tnewOutput.app_data =\n\t\t\t\tObject.assign({}, ciOutputPort.app_data, { ui_data: this.createPortUiData(ciOutputPort) });\n\n\t\t\tif (ciOutputPort.parameters) {\n\t\t\t\tnewOutput.parameters = ciOutputPort.parameters;\n\t\t\t}\n\n\t\t\tnewOutputs.push(newOutput);\n\t\t});\n\t\treturn newOutputs;\n\t}\n\n\tstatic createPortUiData(ciPort) {\n\t\tconst port = {};\n\t\tif (ciPort.cardinality) {\n\t\t\tport.cardinality = ciPort.cardinality;\n\t\t}\n\t\tif (ciPort.class_name) {\n\t\t\tport.class_name = ciPort.class_name;\n\t\t}\n\t\tport.label = ciPort.label;\n\t\treturn port;\n\t}\n\n\tstatic createLinks(ciLinks, ciNodeId, ciInputPortId, portIndex) {\n\t\tvar newLinks = [];\n\t\tif (ciLinks) {\n\t\t\t// Returns the canvas links that are applicable for the target node info passed in.\n\t\t\tvar filteredCanvasLinks = this.getFilteredCanvasLinks(ciLinks, ciNodeId, ciInputPortId, portIndex);\n\n\t\t\tfilteredCanvasLinks.forEach((link) => {\n\t\t\t\tif (typeof link.srcNodeId === \"undefined\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar newNodeLink = {\n\t\t\t\t\tid: link.id,\n\t\t\t\t\tnode_id_ref: link.srcNodeId\n\t\t\t\t};\n\n\t\t\t\tif (link.srcNodePortId) {\n\t\t\t\t\tnewNodeLink.port_id_ref = link.srcNodePortId;\n\t\t\t\t}\n\n\t\t\t\tnewNodeLink = this.addNodeLinkCommonAttrs(newNodeLink, link);\n\t\t\t\tnewLinks.push(newNodeLink);\n\t\t\t});\n\t\t}\n\t\treturn newLinks;\n\t}\n\n\t// Returns the canvas links that are applicable for the target node info passed in.\n\tstatic getFilteredCanvasLinks(ciLinks, ciNodeId, ciInputPortId, portIndex) {\n\t\treturn ciLinks.filter((canvasLink) => {\n\t\t\tif (canvasLink.type === \"nodeLink\" &&\n\t\t\t\t\tcanvasLink.trgNodeId === ciNodeId) {\n\t\t\t\tif (canvasLink.trgNodePortId) {\n\t\t\t\t\tif (canvasLink.trgNodePortId === ciInputPortId) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} else if (portIndex === 0) { // If port info is unknown, make this link only for the first port\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\tstatic createPipelineAppData(canvasInfoPipeline) {\n\t\tif (canvasInfoPipeline.app_data) {\n\t\t\treturn Object.assign({}, canvasInfoPipeline.app_data, { ui_data: this.createPipelineUiData(canvasInfoPipeline) });\n\t\t}\n\t\treturn { ui_data: this.createPipelineUiData(canvasInfoPipeline) };\n\t}\n\n\tstatic createPipelineUiData(canvasInfoPipeline) {\n\t\tlet uiData = null;\n\t\tif (canvasInfoPipeline.app_data && canvasInfoPipeline.app_data.ui_data) {\n\t\t\tuiData = Object.assign({}, canvasInfoPipeline.app_data.ui_data, {\n\t\t\t\tcomments: this.createComments(canvasInfoPipeline.comments, canvasInfoPipeline.links) });\n\t\t} else {\n\t\t\tuiData = { comments: this.createComments(canvasInfoPipeline.comments, canvasInfoPipeline.links) };\n\t\t}\n\n\t\tconst detLinks = this.createDetachedLinks(canvasInfoPipeline.links);\n\n\t\tif (detLinks.length > 0) {\n\t\t\tuiData.detached_links = detLinks;\n\t\t}\n\n\t\tif (canvasInfoPipeline.zoom) {\n\t\t\tuiData.zoom = canvasInfoPipeline.zoom;\n\t\t}\n\t\treturn uiData;\n\t}\n\n\tstatic createComments(canvasInfoComments, canvasInfoLinks) {\n\t\treturn canvasInfoComments.map((comment) => {\n\t\t\tconst newCom = {\n\t\t\t\tid: comment.id,\n\t\t\t\tx_pos: comment.x_pos,\n\t\t\t\ty_pos: comment.y_pos,\n\t\t\t\twidth: comment.width,\n\t\t\t\theight: comment.height,\n\t\t\t};\n\t\t\tif (comment.class_name) {\n\t\t\t\tnewCom.class_name = comment.class_name;\n\t\t\t}\n\t\t\tif (comment.contentType) {\n\t\t\t\tnewCom.content_type = comment.contentType;\n\t\t\t}\n\t\t\tif (comment.formats) {\n\t\t\t\tnewCom.formats = comment.formats;\n\t\t\t}\n\t\t\tnewCom.content = comment.content;\n\t\t\tnewCom.associated_id_refs = this.createCommentLinks(canvasInfoLinks, comment.id);\n\n\t\t\tif (comment.style) {\n\t\t\t\tnewCom.style = comment.style;\n\t\t\t}\n\t\t\treturn newCom;\n\t\t});\n\t}\n\n\tstatic createCommentLinks(canvasInfoLinks, commentId) {\n\t\tvar newLinks = [];\n\t\tcanvasInfoLinks.forEach((link) => {\n\t\t\tif (link.type === \"commentLink\" &&\n\t\t\t\t\tlink.srcNodeId === commentId) {\n\t\t\t\tconst newLink = { id: link.id, node_ref: link.trgNodeId };\n\t\t\t\tif (link.class_name) {\n\t\t\t\t\tnewLink.class_name = link.class_name;\n\t\t\t\t}\n\t\t\t\tif (link.style) {\n\t\t\t\t\tnewLink.style = link.style;\n\t\t\t\t}\n\t\t\t\tnewLinks.push(newLink);\n\t\t\t}\n\t\t});\n\t\treturn newLinks;\n\t}\n\n\tstatic createAssociationLinks(ciNode, ciLinks) {\n\t\tconst associationsLinks = [];\n\t\tciLinks.forEach((link) => {\n\t\t\tif (link.type === \"associationLink\" &&\n\t\t\t\t\tlink.srcNodeId === ciNode.id) {\n\t\t\t\tconst assoc = {\n\t\t\t\t\tid: link.id,\n\t\t\t\t\tnode_ref: link.trgNodeId\n\t\t\t\t};\n\t\t\t\tif (link.class_name) {\n\t\t\t\t\tassoc.class_name = link.class_name;\n\t\t\t\t}\n\t\t\t\tif (link.style) {\n\t\t\t\t\tassoc.style = link.style;\n\t\t\t\t}\n\t\t\t\tif (link.decorations) {\n\t\t\t\t\tvar newDecorations = this.createDecorations(link.decorations);\n\t\t\t\t\tif (newDecorations.length > 0) {\n\t\t\t\t\t\tassoc.decorations = newDecorations;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tassociationsLinks.push(assoc);\n\t\t\t}\n\t\t});\n\t\treturn associationsLinks;\n\t}\n\n\tstatic createDetachedLinks(ciLinks) {\n\t\tconst detachedLinks = [];\n\t\tciLinks.forEach((link) => {\n\t\t\tif (!link.srcNodeId ||\n\t\t\t\t\t!link.trgNodeId) {\n\t\t\t\tvar detachedLink = { id: link.id };\n\n\t\t\t\t// Detached links will either have a source node (object) or, if the\n\t\t\t\t// link is not attached to a source object, a source position object.\n\t\t\t\tif (link.srcNodeId) {\n\t\t\t\t\tdetachedLink.src_node_id = link.srcNodeId;\n\t\t\t\t\tif (link.srcNodePortId) {\n\t\t\t\t\t\tdetachedLink.src_node_port_id = link.srcNodePortId;\n\t\t\t\t\t}\n\t\t\t\t} else if (link.srcPos) {\n\t\t\t\t\tdetachedLink.src_pos = link.srcPos;\n\t\t\t\t}\n\n\t\t\t\t// Detached links will either have a source node (object) or, if the\n\t\t\t\t// link is not attached to a source object, a source position object.\n\t\t\t\tif (link.trgNodeId) {\n\t\t\t\t\tdetachedLink.trg_node_id = link.trgNodeId;\n\t\t\t\t\tif (link.trgNodePortId) {\n\t\t\t\t\t\tdetachedLink.trg_node_port_id = link.trgNodePortId;\n\t\t\t\t\t}\n\t\t\t\t} else if (link.trgPos) {\n\t\t\t\t\tdetachedLink.trg_pos = link.trgPos;\n\t\t\t\t}\n\n\t\t\t\tdetachedLink = this.addNodeLinkCommonAttrs(detachedLink, link);\n\t\t\t\tdetachedLinks.push(detachedLink);\n\t\t\t}\n\t\t});\n\t\treturn detachedLinks;\n\t}\n\n\tstatic addNodeLinkCommonAttrs(newLink, link) {\n\t\tif (link.app_data) {\n\t\t\tset(newLink, \"app_data\", link.app_data);\n\t\t}\n\n\t\tif (link.class_name) {\n\t\t\tset(newLink, \"app_data.ui_data.class_name\", link.class_name);\n\t\t}\n\n\t\tif (link.style) {\n\t\t\tset(newLink, \"app_data.ui_data.style\", link.style);\n\t\t}\n\n\t\tif (link.decorations) {\n\t\t\tvar newDecorations = this.createDecorations(link.decorations);\n\t\t\tif (newDecorations.length > 0) {\n\t\t\t\tset(newLink, \"app_data.ui_data.decorations\", newDecorations);\n\t\t\t}\n\t\t}\n\n\t\tif (link.linkName) {\n\t\t\tnewLink.link_name = link.linkName;\n\t\t}\n\n\t\tif (link.typeAttr) {\n\t\t\tnewLink.type_attr = link.typeAttr;\n\t\t}\n\n\t\tif (link.description) {\n\t\t\tnewLink.description = link.description;\n\t\t}\n\t\treturn newLink;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Logger from \"../logging/canvas-logger.js\";\n\n// WARNING: Some client apps (eg. Streams) runs Common Canvas within a webview\n// created through visual studio. In this environment localStorage is not\n// accessible (and will throw an exception if accessed) so in this class we\n// need to make sure it is always available before accessing it.\n\nexport default class LocalStorage {\n\tstatic set(attributeName, value) {\n\t\ttry {\n\t\t\tif (window.electronUtil && window.electronUtil.wsdStorage && window.electronUtil.wsdStorage.setItem) {\n\t\t\t\twindow.electronUtil.wsdStorage.setItem(attributeName, value);\n\n\t\t\t} else if (window.localStorage) {\n\t\t\t\twindow.localStorage[attributeName] = value;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLocalStorage.logger.warn(\"Local storage is not accessible: \" + err);\n\t\t}\n\t}\n\n\tstatic get(attributeName) {\n\t\ttry {\n\t\t\tif (window.electronUtil && window.electronUtil.wsdStorage && window.electronUtil.wsdStorage.getItem) {\n\t\t\t\treturn window.electronUtil.wsdStorage.getItem(attributeName);\n\n\t\t\t} else if (window.localStorage) {\n\t\t\t\treturn window.localStorage[attributeName];\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLocalStorage.logger.warn(\"Local storage is not accessible: \" + err);\n\t\t}\n\t\treturn null;\n\t}\n\n\tstatic delete(attributeName) {\n\t\ttry {\n\t\t\tif (window.electronUtil && window.electronUtil.wsdStorage && window.electronUtil.wsdStorage.removeItem) {\n\t\t\t\twindow.electronUtil.wsdStorage.removeItem(attributeName);\n\n\t\t\t} else if (window.localStorage) {\n\t\t\t\tdelete window.localStorage[attributeName];\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLocalStorage.logger.warn(\"Local storage is not accessible: \" + err);\n\t\t}\n\t}\n}\n\nLocalStorage.logger = new Logger([\"LocalStorage\"]);\n","/*\n * Copyright 2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\nimport { isEmpty } from \"lodash\";\n\nimport {\n\tSUPER_NODE,\n\tSNAP_TO_GRID_AFTER, SNAP_TO_GRID_DURING,\n} from \"../common-canvas/constants/canvas-constants.js\";\n\n// Does all preparation needed for nodes in all pipelines before they are saved into Redux. This includes:\n// * setting isSupernodeInputBinding and isSupernodeOutputBinding booleans if appropriate\n// * calculating snap-to-grid positions\n// * calculating the dimensions of nodes based on the space needed to accommodate the ports\nexport function prepareNodes(pipelines, nodeLayout, canvasLayout, layoutHandler, supernode) {\n\tconst newPipelines = setSupernodesBindingStatus(pipelines, supernode);\n\treturn newPipelines.map((pipeline) => setPipelineObjectAttributes(pipeline, nodeLayout, canvasLayout, layoutHandler));\n}\n\n// Loops through all the pipelines and adds the appropriate supernode binding\n// attribute to any binding nodes that are referenced by the ports of a supernode.\nfunction setSupernodesBindingStatus(pipelines, supernode) {\n\t// First, clear all supernode binding statuses from nodes\n\tpipelines.forEach((pipeline) => {\n\t\tif (pipeline.nodes) {\n\t\t\tpipeline.nodes.forEach((node) => {\n\t\t\t\tdelete node.isSupernodeInputBinding;\n\t\t\t\tdelete node.isSupernodeOutputBinding;\n\t\t\t});\n\t\t}\n\t});\n\n\tif (supernode) {\n\t\tsetSupernodesBindingStatusForNode(supernode, pipelines);\n\t}\n\n\t// Set the supernode binding statuses as appropriate.\n\tpipelines.forEach((pipeline) => {\n\t\tif (pipeline.nodes) {\n\t\t\tCanvasUtils.filterSupernodes(pipeline.nodes).forEach((node) => {\n\t\t\t\tsetSupernodesBindingStatusForNode(node, pipelines);\n\t\t\t});\n\t\t}\n\t});\n\treturn pipelines;\n}\n\n\nfunction setSupernodesBindingStatusForNode(node, pipelines) {\n\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(node);\n\tif (snPipelineId) {\n\t\tif (node.inputs) {\n\t\t\tnode.inputs.forEach((input) => {\n\t\t\t\tif (input.subflow_node_ref) {\n\t\t\t\t\tconst subNode = findNode(input.subflow_node_ref, snPipelineId, pipelines);\n\t\t\t\t\tif (subNode) {\n\t\t\t\t\t\tsubNode.isSupernodeInputBinding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (node.outputs) {\n\t\t\tnode.outputs.forEach((output) => {\n\t\t\t\tif (output.subflow_node_ref) {\n\t\t\t\t\tconst subNode = findNode(output.subflow_node_ref, snPipelineId, pipelines);\n\t\t\t\t\tif (subNode) {\n\t\t\t\t\t\tsubNode.isSupernodeOutputBinding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n\n\n// Sets the auto-calculated attributes for nodes and comments based on different layout\n// information for the pipeline passed in.\nfunction setPipelineObjectAttributes(inPipeline, nodeLayout, canvasLayout, layoutHandler) {\n\tconst pipeline = Object.assign({}, inPipeline);\n\tif (pipeline.nodes) {\n\t\tpipeline.nodes = pipeline.nodes.map((node) => setNodeAttributesWithLayout(node, nodeLayout, canvasLayout, layoutHandler));\n\t} else {\n\t\tpipeline.nodes = [];\n\t}\n\n\tif (pipeline.comments) {\n\t\tpipeline.comments = pipeline.comments.map((comment) => setCommentAttributesWithLayout(comment, canvasLayout));\n\t} else {\n\t\tpipeline.comments = [];\n\t}\n\n\treturn pipeline;\n}\n\n// Returns a copy of the node passed in using the layout info provided. The\n// returned node is augmented with additional fields which contain\n// layout, dimension and supernode binding status info.\nexport function setNodeAttributesWithLayout(node, nodeLayout, canvasLayout, layoutHandler) {\n\tlet newNode = Object.assign({}, node);\n\tnewNode = setNodeLayoutAttributes(newNode, nodeLayout, layoutHandler);\n\n\tif (canvasLayout.linkDirection === \"TopBottom\" ||\n\t\t\tcanvasLayout.linkDirection === \"BottomTop\") {\n\t\tnewNode = setNodeDimensionAttributesVertical(newNode, canvasLayout);\n\t} else {\n\t\tnewNode = setNodeDimensionAttributesHoriz(newNode, canvasLayout);\n\t}\n\tif (canvasLayout.snapToGridType === SNAP_TO_GRID_DURING ||\n\t\t\tcanvasLayout.snapToGridType === SNAP_TO_GRID_AFTER) {\n\t\tnewNode.x_pos = CanvasUtils.snapToGrid(newNode.x_pos, canvasLayout.snapToGridXPx);\n\t\tnewNode.y_pos = CanvasUtils.snapToGrid(newNode.y_pos, canvasLayout.snapToGridYPx);\n\t}\n\treturn newNode;\n}\n\n// Returns the node passed in with additional fields which contains\n// the layout info.\nfunction setNodeLayoutAttributes(node, nodeLayout, layoutHandler) {\n\tnode.layout = nodeLayout;\n\n\tif (layoutHandler) {\n\t\tlet customLayout = layoutHandler(node);\n\n\t\t// If using the layoutHandler we must make a copy of the layout info\n\t\t// for each node so the original single version of layout info attached\n\t\t// to the node doesn't get overwritten.\n\t\tif (customLayout && !isEmpty(customLayout)) {\n\t\t\t// TODO - This should be removed in a future major release.\n\t\t\t// This method converts now deprecated layout variables from customLayout\n\t\t\t// to the new port positions arrays for input and output ports.\n\t\t\tcustomLayout = CanvasUtils.convertPortPosInfo(customLayout);\n\n\t\t\t// TODO - This should be removed in a future major release.\n\t\t\t// This method converts now deprecated port object variables from customLayout\n\t\t\t// to the new port object info arrays for input and output ports.\n\t\t\tcustomLayout = CanvasUtils.convertPortDisplayInfo(customLayout);\n\n\t\t\tconst decs = CanvasUtils.getCombinedDecorations(node.layout.decorations, customLayout.decorations);\n\t\t\tnode.layout = Object.assign({}, node.layout, customLayout, { decorations: decs });\n\t\t}\n\t}\n\treturn node;\n}\n\n// Returns the node passed in with additional fields which contains\n// the height occupied by the input ports and output ports, based on the\n// layout info passed in, as well as the node width.\nfunction setNodeDimensionAttributesHoriz(node, canvasLayout) {\n\tnode.inputPortsHeight = node.inputs ? getInputPortsHeight(node) : 0;\n\tnode.outputPortsHeight = node.outputs ? getOutputPortsHeight(node) : 0;\n\n\tif (node.layout.autoSizeNode) {\n\t\tnode.height = Math.max(node.inputPortsHeight, node.outputPortsHeight, node.layout.defaultNodeHeight);\n\n\t} else {\n\t\tnode.height = node.layout.defaultNodeHeight;\n\t}\n\n\tnode.width = node.layout.defaultNodeWidth;\n\n\tif (node.type === SUPER_NODE && node.is_expanded) {\n\t\tnode.height += canvasLayout.supernodeTopAreaHeight + canvasLayout.supernodeSVGAreaPadding;\n\t\t// If an expanded height is provided make sure it is at least as big\n\t\t// as the node height.\n\t\tif (node.expanded_height) {\n\t\t\tnode.expanded_height = Math.max(node.expanded_height, node.height);\n\t\t}\n\n\t\tnode.width = CanvasUtils.getSupernodeExpandedWidth(node, canvasLayout);\n\t\tnode.height = CanvasUtils.getSupernodeExpandedHeight(node, canvasLayout);\n\n\t} else if (node.isResized) {\n\t\tnode.height = node.resizeHeight ? node.resizeHeight : node.height;\n\t\tnode.width = node.resizeWidth ? node.resizeWidth : node.width;\n\t}\n\n\treturn node;\n}\n\n// Returns the height of the input ports for the node if they are automatically\n// positioned by common-canvas.\nfunction getInputPortsHeight(node) {\n\treturn (node.inputs.length * (node.layout.portArcRadius * 2)) +\n\t\t((node.inputs.length - 1) * node.layout.portArcSpacing) + (node.layout.portArcOffset * 2);\n}\n\n// Returns the height of the output ports for the node if they are automatically\n// positioned by common-canvas.\nfunction getOutputPortsHeight(node) {\n\treturn (node.outputs.length * (node.layout.portArcRadius * 2)) +\n\t\t((node.outputs.length - 1) * node.layout.portArcSpacing) + (node.layout.portArcOffset * 2);\n}\n\n// Returns the node passed in with additional fields which contains\n// the width occupied by the input ports and output ports, based on the\n// layout info passed in, as well as the node height.\nfunction setNodeDimensionAttributesVertical(node, canvasLayout) {\n\tnode.inputPortsWidth = node.inputs ? getInputPortsWidth(node) : 0;\n\tnode.outputPortsWidth = node.outputs ? getOutputPortsWidth(node) : 0;\n\n\tnode.height = node.layout.defaultNodeHeight;\n\n\tif (node.layout.autoSizeNode) {\n\t\tnode.width = Math.max(node.inputPortsWidth, node.outputPortsWidth, node.layout.defaultNodeWidth);\n\n\t} else {\n\t\tnode.width = node.layout.defaultNodeWidth;\n\t}\n\n\tif (node.type === SUPER_NODE && node.is_expanded) {\n\t\tnode.width += (2 * canvasLayout.supernodeSVGAreaPadding);\n\t\t// If an expanded width is provided make sure it is at least as big\n\t\t// as the node width.\n\t\tif (node.expanded_width) {\n\t\t\tnode.expanded_width = Math.max(node.expanded_width, node.width);\n\t\t}\n\n\t\tnode.width = CanvasUtils.getSupernodeExpandedWidth(node, canvasLayout);\n\t\tnode.height = CanvasUtils.getSupernodeExpandedHeight(node, canvasLayout);\n\n\t} else if (node.isResized) {\n\t\tnode.height = node.resizeHeight ? node.resizeHeight : node.height;\n\t\tnode.width = node.resizeWidth ? node.resizeWidth : node.width;\n\t}\n\n\treturn node;\n}\n\n// Returns the width of the input ports for the node if they are automatically\n// positioned by common-canvas or zero if ports will be manually positioned..\nfunction getInputPortsWidth(node) {\n\treturn (node.inputs.length * (node.layout.portArcRadius * 2)) +\n\t\t((node.inputs.length - 1) * node.layout.portArcSpacing) + (node.layout.portArcOffset * 2);\n}\n\n// Returns the width of the output ports for the node if they are automatically\n// positioned by common-canvas or zero if ports will be manually positioned..\nfunction getOutputPortsWidth(node) {\n\treturn (node.outputs.length * (node.layout.portArcRadius * 2)) +\n\t\t((node.outputs.length - 1) * node.layout.portArcSpacing) + (node.layout.portArcOffset * 2);\n}\n\nfunction findNode(nodeId, pipelineId, pipelines) {\n\tconst targetPipeline = pipelines.find((p) => p.id === pipelineId);\n\n\tif (targetPipeline && targetPipeline.nodes) {\n\t\treturn targetPipeline.nodes.find((node) => node.id === nodeId);\n\t}\n\treturn null;\n}\n\n// Returns a copy of the comment passed using the layout info provided. The\n// returned comment has its position adjusted for snap to grid, if necessary.\nexport function setCommentAttributesWithLayout(comment, canvasLayout) {\n\tconst newComment = Object.assign({}, comment);\n\tif (canvasLayout.snapToGridType === SNAP_TO_GRID_DURING ||\n\t\t\tcanvasLayout.snapToGridType === SNAP_TO_GRID_AFTER) {\n\t\tnewComment.x_pos = CanvasUtils.snapToGrid(newComment.x_pos, canvasLayout.snapToGridXPx);\n\t\tnewComment.y_pos = CanvasUtils.snapToGrid(newComment.y_pos, canvasLayout.snapToGridYPx);\n\t}\n\treturn newComment;\n}\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.dagre=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){\n/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\nmodule.exports={graphlib:require(\"./lib/graphlib\"),layout:require(\"./lib/layout\"),debug:require(\"./lib/debug\"),util:{time:require(\"./lib/util\").time,notime:require(\"./lib/util\").notime},version:require(\"./lib/version\")}},{\"./lib/debug\":6,\"./lib/graphlib\":7,\"./lib/layout\":9,\"./lib/util\":29,\"./lib/version\":30}],2:[function(require,module,exports){\"use strict\";var _=require(\"./lodash\");var greedyFAS=require(\"./greedy-fas\");module.exports={run:run,undo:undo};function run(g){var fas=g.graph().acyclicer===\"greedy\"?greedyFAS(g,weightFn(g)):dfsFAS(g);_.forEach(fas,function(e){var label=g.edge(e);g.removeEdge(e);label.forwardName=e.name;label.reversed=true;g.setEdge(e.w,e.v,label,_.uniqueId(\"rev\"))});function weightFn(g){return function(e){return g.edge(e).weight}}}function dfsFAS(g){var fas=[];var stack={};var visited={};function dfs(v){if(_.has(visited,v)){return}visited[v]=true;stack[v]=true;_.forEach(g.outEdges(v),function(e){if(_.has(stack,e.w)){fas.push(e)}else{dfs(e.w)}});delete stack[v]}_.forEach(g.nodes(),dfs);return fas}function undo(g){_.forEach(g.edges(),function(e){var label=g.edge(e);if(label.reversed){g.removeEdge(e);var forwardName=label.forwardName;delete label.reversed;delete label.forwardName;g.setEdge(e.w,e.v,label,forwardName)}})}},{\"./greedy-fas\":8,\"./lodash\":10}],3:[function(require,module,exports){var _=require(\"./lodash\");var util=require(\"./util\");module.exports=addBorderSegments;function addBorderSegments(g){function dfs(v){var children=g.children(v);var node=g.node(v);if(children.length){_.forEach(children,dfs)}if(_.has(node,\"minRank\")){node.borderLeft=[];node.borderRight=[];for(var rank=node.minRank,maxRank=node.maxRank+1;rank<maxRank;++rank){addBorderNode(g,\"borderLeft\",\"_bl\",v,node,rank);addBorderNode(g,\"borderRight\",\"_br\",v,node,rank)}}}_.forEach(g.children(),dfs)}function addBorderNode(g,prop,prefix,sg,sgNode,rank){var label={width:0,height:0,rank:rank,borderType:prop};var prev=sgNode[prop][rank-1];var curr=util.addDummyNode(g,\"border\",label,prefix);sgNode[prop][rank]=curr;g.setParent(curr,sg);if(prev){g.setEdge(prev,curr,{weight:1})}}},{\"./lodash\":10,\"./util\":29}],4:[function(require,module,exports){\"use strict\";var _=require(\"./lodash\");module.exports={adjust:adjust,undo:undo};function adjust(g){var rankDir=g.graph().rankdir.toLowerCase();if(rankDir===\"lr\"||rankDir===\"rl\"){swapWidthHeight(g)}}function undo(g){var rankDir=g.graph().rankdir.toLowerCase();if(rankDir===\"bt\"||rankDir===\"rl\"){reverseY(g)}if(rankDir===\"lr\"||rankDir===\"rl\"){swapXY(g);swapWidthHeight(g)}}function swapWidthHeight(g){_.forEach(g.nodes(),function(v){swapWidthHeightOne(g.node(v))});_.forEach(g.edges(),function(e){swapWidthHeightOne(g.edge(e))})}function swapWidthHeightOne(attrs){var w=attrs.width;attrs.width=attrs.height;attrs.height=w}function reverseY(g){_.forEach(g.nodes(),function(v){reverseYOne(g.node(v))});_.forEach(g.edges(),function(e){var edge=g.edge(e);_.forEach(edge.points,reverseYOne);if(_.has(edge,\"y\")){reverseYOne(edge)}})}function reverseYOne(attrs){attrs.y=-attrs.y}function swapXY(g){_.forEach(g.nodes(),function(v){swapXYOne(g.node(v))});_.forEach(g.edges(),function(e){var edge=g.edge(e);_.forEach(edge.points,swapXYOne);if(_.has(edge,\"x\")){swapXYOne(edge)}})}function swapXYOne(attrs){var x=attrs.x;attrs.x=attrs.y;attrs.y=x}},{\"./lodash\":10}],5:[function(require,module,exports){\n/*\n * Simple doubly linked list implementation derived from Cormen, et al.,\n * \"Introduction to Algorithms\".\n */\nmodule.exports=List;function List(){var sentinel={};sentinel._next=sentinel._prev=sentinel;this._sentinel=sentinel}List.prototype.dequeue=function(){var sentinel=this._sentinel;var entry=sentinel._prev;if(entry!==sentinel){unlink(entry);return entry}};List.prototype.enqueue=function(entry){var sentinel=this._sentinel;if(entry._prev&&entry._next){unlink(entry)}entry._next=sentinel._next;sentinel._next._prev=entry;sentinel._next=entry;entry._prev=sentinel};List.prototype.toString=function(){var strs=[];var sentinel=this._sentinel;var curr=sentinel._prev;while(curr!==sentinel){strs.push(JSON.stringify(curr,filterOutLinks));curr=curr._prev}return\"[\"+strs.join(\", \")+\"]\"};function unlink(entry){entry._prev._next=entry._next;entry._next._prev=entry._prev;delete entry._next;delete entry._prev}function filterOutLinks(k,v){if(k!==\"_next\"&&k!==\"_prev\"){return v}}},{}],6:[function(require,module,exports){var _=require(\"./lodash\");var util=require(\"./util\");var Graph=require(\"./graphlib\").Graph;module.exports={debugOrdering:debugOrdering};\n/* istanbul ignore next */function debugOrdering(g){var layerMatrix=util.buildLayerMatrix(g);var h=new Graph({compound:true,multigraph:true}).setGraph({});_.forEach(g.nodes(),function(v){h.setNode(v,{label:v});h.setParent(v,\"layer\"+g.node(v).rank)});_.forEach(g.edges(),function(e){h.setEdge(e.v,e.w,{},e.name)});_.forEach(layerMatrix,function(layer,i){var layerV=\"layer\"+i;h.setNode(layerV,{rank:\"same\"});_.reduce(layer,function(u,v){h.setEdge(u,v,{style:\"invis\"});return v})});return h}},{\"./graphlib\":7,\"./lodash\":10,\"./util\":29}],7:[function(require,module,exports){\n/* global window */\nvar graphlib;if(typeof require===\"function\"){try{graphlib=require(\"graphlib\")}catch(e){\n// continue regardless of error\n}}if(!graphlib){graphlib=window.graphlib}module.exports=graphlib},{graphlib:31}],8:[function(require,module,exports){var _=require(\"./lodash\");var Graph=require(\"./graphlib\").Graph;var List=require(\"./data/list\");\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */module.exports=greedyFAS;var DEFAULT_WEIGHT_FN=_.constant(1);function greedyFAS(g,weightFn){if(g.nodeCount()<=1){return[]}var state=buildState(g,weightFn||DEFAULT_WEIGHT_FN);var results=doGreedyFAS(state.graph,state.buckets,state.zeroIdx);\n// Expand multi-edges\nreturn _.flatten(_.map(results,function(e){return g.outEdges(e.v,e.w)}),true)}function doGreedyFAS(g,buckets,zeroIdx){var results=[];var sources=buckets[buckets.length-1];var sinks=buckets[0];var entry;while(g.nodeCount()){while(entry=sinks.dequeue()){removeNode(g,buckets,zeroIdx,entry)}while(entry=sources.dequeue()){removeNode(g,buckets,zeroIdx,entry)}if(g.nodeCount()){for(var i=buckets.length-2;i>0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.forEach(g.inEdges(entry.v),function(edge){var weight=g.edge(edge);var uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.forEach(g.outEdges(entry.v),function(edge){var weight=g.edge(edge);var w=edge.w;var wEntry=g.node(w);wEntry[\"in\"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph;var maxIn=0;var maxOut=0;_.forEach(g.nodes(),function(v){fasGraph.setNode(v,{v:v,in:0,out:0})});\n// Aggregate weights on nodes, but also sum the weights across multi-edges\n// into a single edge for the fasGraph.\n_.forEach(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0;var weight=weightFn(e);var edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)[\"in\"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.forEach(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry[\"in\"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry[\"in\"]+zeroIdx].enqueue(entry)}}},{\"./data/list\":5,\"./graphlib\":7,\"./lodash\":10}],9:[function(require,module,exports){\"use strict\";var _=require(\"./lodash\");var acyclic=require(\"./acyclic\");var normalize=require(\"./normalize\");var rank=require(\"./rank\");var normalizeRanks=require(\"./util\").normalizeRanks;var parentDummyChains=require(\"./parent-dummy-chains\");var removeEmptyRanks=require(\"./util\").removeEmptyRanks;var nestingGraph=require(\"./nesting-graph\");var addBorderSegments=require(\"./add-border-segments\");var coordinateSystem=require(\"./coordinate-system\");var order=require(\"./order\");var position=require(\"./position\");var util=require(\"./util\");var Graph=require(\"./graphlib\").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time(\"layout\",function(){var layoutGraph=time(\" buildLayoutGraph\",function(){return buildLayoutGraph(g)});time(\" runLayout\",function(){runLayout(layoutGraph,time)});time(\" updateInputGraph\",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(\" makeSpaceForEdgeLabels\",function(){makeSpaceForEdgeLabels(g)});time(\" removeSelfEdges\",function(){removeSelfEdges(g)});time(\" acyclic\",function(){acyclic.run(g)});time(\" nestingGraph.run\",function(){nestingGraph.run(g)});time(\" rank\",function(){rank(util.asNonCompoundGraph(g))});time(\" injectEdgeLabelProxies\",function(){injectEdgeLabelProxies(g)});time(\" removeEmptyRanks\",function(){removeEmptyRanks(g)});time(\" nestingGraph.cleanup\",function(){nestingGraph.cleanup(g)});time(\" normalizeRanks\",function(){normalizeRanks(g)});time(\" assignRankMinMax\",function(){assignRankMinMax(g)});time(\" removeEdgeLabelProxies\",function(){removeEdgeLabelProxies(g)});time(\" normalize.run\",function(){normalize.run(g)});time(\" parentDummyChains\",function(){parentDummyChains(g)});time(\" addBorderSegments\",function(){addBorderSegments(g)});time(\" order\",function(){order(g)});time(\" insertSelfEdges\",function(){insertSelfEdges(g)});time(\" adjustCoordinateSystem\",function(){coordinateSystem.adjust(g)});time(\" position\",function(){position(g)});time(\" positionSelfEdges\",function(){positionSelfEdges(g)});time(\" removeBorderNodes\",function(){removeBorderNodes(g)});time(\" normalize.undo\",function(){normalize.undo(g)});time(\" fixupEdgeLabelCoords\",function(){fixupEdgeLabelCoords(g)});time(\" undoCoordinateSystem\",function(){coordinateSystem.undo(g)});time(\" translateGraph\",function(){translateGraph(g)});time(\" assignNodeIntersects\",function(){assignNodeIntersects(g)});time(\" reversePoints\",function(){reversePointsForReversedEdges(g)});time(\" acyclic.undo\",function(){acyclic.undo(g)})}\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */function updateInputGraph(inputGraph,layoutGraph){_.forEach(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v);var layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.forEach(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e);var layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,\"x\")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=[\"nodesep\",\"edgesep\",\"ranksep\",\"marginx\",\"marginy\"];var graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:\"tb\"};var graphAttrs=[\"acyclicer\",\"ranker\",\"rankdir\",\"align\"];var nodeNumAttrs=[\"width\",\"height\"];var nodeDefaults={width:0,height:0};var edgeNumAttrs=[\"minlen\",\"weight\",\"width\",\"height\",\"labeloffset\"];var edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:\"r\"};var edgeAttrs=[\"labelpos\"];\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true});var graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.forEach(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.forEach(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.forEach(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!==\"c\"){if(graph.rankdir===\"TB\"||graph.rankdir===\"BT\"){edge.width+=edge.labeloffset}else{edge.height+=edge.labeloffset}}})}\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */function injectEdgeLabelProxies(g){_.forEach(g.edges(),function(e){var edge=g.edge(e);if(edge.width&&edge.height){var v=g.node(e.v);var w=g.node(e.w);var label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,\"edge-proxy\",label,\"_ep\")}})}function assignRankMinMax(g){var maxRank=0;_.forEach(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.forEach(g.nodes(),function(v){var node=g.node(v);if(node.dummy===\"edge-proxy\"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY;var maxX=0;var minY=Number.POSITIVE_INFINITY;var maxY=0;var graphLabel=g.graph();var marginX=graphLabel.marginx||0;var marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x;var y=attrs.y;var w=attrs.width;var h=attrs.height;minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.forEach(g.nodes(),function(v){getExtremes(g.node(v))});_.forEach(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,\"x\")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.forEach(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.forEach(g.edges(),function(e){var edge=g.edge(e);_.forEach(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,\"x\")){edge.x-=minX}if(_.has(edge,\"y\")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.forEach(g.edges(),function(e){var edge=g.edge(e);var nodeV=g.node(e.v);var nodeW=g.node(e.w);var p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.forEach(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,\"x\")){if(edge.labelpos===\"l\"||edge.labelpos===\"r\"){edge.width-=edge.labeloffset}switch(edge.labelpos){case\"l\":edge.x-=edge.width/2+edge.labeloffset;break;case\"r\":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.forEach(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.forEach(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v);var t=g.node(node.borderTop);var b=g.node(node.borderBottom);var l=g.node(_.last(node.borderLeft));var r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.forEach(g.nodes(),function(v){if(g.node(v).dummy===\"border\"){g.removeNode(v)}})}function removeSelfEdges(g){_.forEach(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.forEach(layers,function(layer){var orderShift=0;_.forEach(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.forEach(node.selfEdges,function(selfEdge){util.addDummyNode(g,\"selfedge\",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},\"_se\")});delete node.selfEdges})})}function positionSelfEdges(g){_.forEach(g.nodes(),function(v){var node=g.node(v);if(node.dummy===\"selfedge\"){var selfNode=g.node(node.e.v);var x=selfNode.x+selfNode.width/2;var y=selfNode.y;var dx=node.x-x;var dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.forEach(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{\"./acyclic\":2,\"./add-border-segments\":3,\"./coordinate-system\":4,\"./graphlib\":7,\"./lodash\":10,\"./nesting-graph\":11,\"./normalize\":12,\"./order\":17,\"./parent-dummy-chains\":22,\"./position\":24,\"./rank\":26,\"./util\":29}],10:[function(require,module,exports){\n/* global window */\nvar lodash;if(typeof require===\"function\"){try{lodash={cloneDeep:require(\"lodash/cloneDeep\"),constant:require(\"lodash/constant\"),defaults:require(\"lodash/defaults\"),each:require(\"lodash/each\"),filter:require(\"lodash/filter\"),find:require(\"lodash/find\"),flatten:require(\"lodash/flatten\"),forEach:require(\"lodash/forEach\"),forIn:require(\"lodash/forIn\"),has:require(\"lodash/has\"),isUndefined:require(\"lodash/isUndefined\"),last:require(\"lodash/last\"),map:require(\"lodash/map\"),mapValues:require(\"lodash/mapValues\"),max:require(\"lodash/max\"),merge:require(\"lodash/merge\"),min:require(\"lodash/min\"),minBy:require(\"lodash/minBy\"),now:require(\"lodash/now\"),pick:require(\"lodash/pick\"),range:require(\"lodash/range\"),reduce:require(\"lodash/reduce\"),sortBy:require(\"lodash/sortBy\"),uniqueId:require(\"lodash/uniqueId\"),values:require(\"lodash/values\"),zipObject:require(\"lodash/zipObject\")}}catch(e){\n// continue regardless of error\n}}if(!lodash){lodash=window._}module.exports=lodash},{\"lodash/cloneDeep\":227,\"lodash/constant\":228,\"lodash/defaults\":229,\"lodash/each\":230,\"lodash/filter\":232,\"lodash/find\":233,\"lodash/flatten\":235,\"lodash/forEach\":236,\"lodash/forIn\":237,\"lodash/has\":239,\"lodash/isUndefined\":258,\"lodash/last\":261,\"lodash/map\":262,\"lodash/mapValues\":263,\"lodash/max\":264,\"lodash/merge\":266,\"lodash/min\":267,\"lodash/minBy\":268,\"lodash/now\":270,\"lodash/pick\":271,\"lodash/range\":273,\"lodash/reduce\":274,\"lodash/sortBy\":276,\"lodash/uniqueId\":286,\"lodash/values\":287,\"lodash/zipObject\":288}],11:[function(require,module,exports){var _=require(\"./lodash\");var util=require(\"./util\");module.exports={run:run,cleanup:cleanup};\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */function run(g){var root=util.addDummyNode(g,\"root\",{},\"_root\");var depths=treeDepths(g);var height=_.max(_.values(depths))-1;// Note: depths is an Object not an array\nvar nodeSep=2*height+1;g.graph().nestingRoot=root;\n// Multiply minlen by nodeSep to align nodes on non-border ranks.\n_.forEach(g.edges(),function(e){g.edge(e).minlen*=nodeSep});\n// Calculate a weight that is sufficient to keep subgraphs vertically compact\nvar weight=sumWeights(g)+1;\n// Create border nodes and link them up\n_.forEach(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});\n// Save the multiplier for node layers for later removal of empty border\n// layers.\ng.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,\"_bt\");var bottom=util.addBorderNode(g,\"_bb\");var label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.forEach(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child);var childTop=childNode.borderTop?childNode.borderTop:child;var childBottom=childNode.borderBottom?childNode.borderBottom:child;var thisWeight=childNode.borderTop?weight:2*weight;var minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.forEach(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.forEach(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.forEach(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{\"./lodash\":10,\"./util\":29}],12:[function(require,module,exports){\"use strict\";var _=require(\"./lodash\");var util=require(\"./util\");module.exports={run:run,undo:undo};\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */function run(g){g.graph().dummyChains=[];_.forEach(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v;var vRank=g.node(v).rank;var w=e.w;var wRank=g.node(w).rank;var name=e.name;var edgeLabel=g.edge(e);var labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank<wRank;++i,++vRank){edgeLabel.points=[];attrs={width:0,height:0,edgeLabel:edgeLabel,edgeObj:e,rank:vRank};dummy=util.addDummyNode(g,\"edge\",attrs,\"_d\");if(vRank===labelRank){attrs.width=edgeLabel.width;attrs.height=edgeLabel.height;attrs.dummy=\"edge-label\";attrs.labelpos=edgeLabel.labelpos}g.setEdge(v,dummy,{weight:edgeLabel.weight},name);if(i===0){g.graph().dummyChains.push(dummy)}v=dummy}g.setEdge(v,w,{weight:edgeLabel.weight},name)}function undo(g){_.forEach(g.graph().dummyChains,function(v){var node=g.node(v);var origLabel=node.edgeLabel;var w;g.setEdge(node.edgeObj,origLabel);while(node.dummy){w=g.successors(v)[0];g.removeNode(v);origLabel.points.push({x:node.x,y:node.y});if(node.dummy===\"edge-label\"){origLabel.x=node.x;origLabel.y=node.y;origLabel.width=node.width;origLabel.height=node.height}v=w;node=g.node(v)}})}},{\"./lodash\":10,\"./util\":29}],13:[function(require,module,exports){var _=require(\"../lodash\");module.exports=addSubgraphConstraints;function addSubgraphConstraints(g,cg,vs){var prev={},rootPrev;_.forEach(vs,function(v){var child=g.parent(v),parent,prevChild;while(child){parent=g.parent(child);if(parent){prevChild=prev[parent];prev[parent]=child}else{prevChild=rootPrev;rootPrev=child}if(prevChild&&prevChild!==child){cg.setEdge(prevChild,child);return}child=parent}});\n/*\n function dfs(v) {\n var children = v ? g.children(v) : g.children();\n if (children.length) {\n var min = Number.POSITIVE_INFINITY,\n subgraphs = [];\n _.each(children, function(child) {\n var childMin = dfs(child);\n if (g.children(child).length) {\n subgraphs.push({ v: child, order: childMin });\n }\n min = Math.min(min, childMin);\n });\n _.reduce(_.sortBy(subgraphs, \"order\"), function(prev, curr) {\n cg.setEdge(prev.v, curr.v);\n return curr;\n });\n return min;\n }\n return g.node(v).order;\n }\n dfs(undefined);\n */}},{\"../lodash\":10}],14:[function(require,module,exports){var _=require(\"../lodash\");module.exports=barycenter;function barycenter(g,movable){return _.map(movable,function(v){var inV=g.inEdges(v);if(!inV.length){return{v:v}}else{var result=_.reduce(inV,function(acc,e){var edge=g.edge(e),nodeU=g.node(e.v);return{sum:acc.sum+edge.weight*nodeU.order,weight:acc.weight+edge.weight}},{sum:0,weight:0});return{v:v,barycenter:result.sum/result.weight,weight:result.weight}}})}},{\"../lodash\":10}],15:[function(require,module,exports){var _=require(\"../lodash\");var Graph=require(\"../graphlib\").Graph;module.exports=buildLayerGraph;\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */function buildLayerGraph(g,rank,relationship){var root=createRootNode(g),result=new Graph({compound:true}).setGraph({root:root}).setDefaultNodeLabel(function(v){return g.node(v)});_.forEach(g.nodes(),function(v){var node=g.node(v),parent=g.parent(v);if(node.rank===rank||node.minRank<=rank&&rank<=node.maxRank){result.setNode(v);result.setParent(v,parent||root);\n// This assumes we have only short edges!\n_.forEach(g[relationship](v),function(e){var u=e.v===v?e.w:e.v,edge=result.edge(u,v),weight=!_.isUndefined(edge)?edge.weight:0;result.setEdge(u,v,{weight:g.edge(e).weight+weight})});if(_.has(node,\"minRank\")){result.setNode(v,{borderLeft:node.borderLeft[rank],borderRight:node.borderRight[rank]})}}});return result}function createRootNode(g){var v;while(g.hasNode(v=_.uniqueId(\"_root\")));return v}},{\"../graphlib\":7,\"../lodash\":10}],16:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");module.exports=crossCount;\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */function crossCount(g,layering){var cc=0;for(var i=1;i<layering.length;++i){cc+=twoLayerCrossCount(g,layering[i-1],layering[i])}return cc}function twoLayerCrossCount(g,northLayer,southLayer){\n// Sort all of the edges between the north and south layers by their position\n// in the north layer and then the south. Map these edges to the position of\n// their head in the south layer.\nvar southPos=_.zipObject(southLayer,_.map(southLayer,function(v,i){return i}));var southEntries=_.flatten(_.map(northLayer,function(v){return _.sortBy(_.map(g.outEdges(v),function(e){return{pos:southPos[e.w],weight:g.edge(e).weight}}),\"pos\")}),true);\n// Build the accumulator tree\nvar firstIndex=1;while(firstIndex<southLayer.length)firstIndex<<=1;var treeSize=2*firstIndex-1;firstIndex-=1;var tree=_.map(new Array(treeSize),function(){return 0});\n// Calculate the weighted crossings\nvar cc=0;_.forEach(southEntries.forEach(function(entry){var index=entry.pos+firstIndex;tree[index]+=entry.weight;var weightSum=0;while(index>0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{\"../lodash\":10}],17:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");var initOrder=require(\"./init-order\");var crossCount=require(\"./cross-count\");var sortSubgraph=require(\"./sort-subgraph\");var buildLayerGraph=require(\"./build-layer-graph\");var addSubgraphConstraints=require(\"./add-subgraph-constraints\");var Graph=require(\"../graphlib\").Graph;var util=require(\"../util\");module.exports=order;\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),\"inEdges\"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),\"outEdges\");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc<bestCC){lastBest=0;best=_.cloneDeep(layering);bestCC=cc}}assignOrder(g,best)}function buildLayerGraphs(g,ranks,relationship){return _.map(ranks,function(rank){return buildLayerGraph(g,rank,relationship)})}function sweepLayerGraphs(layerGraphs,biasRight){var cg=new Graph;_.forEach(layerGraphs,function(lg){var root=lg.graph().root;var sorted=sortSubgraph(lg,root,cg,biasRight);_.forEach(sorted.vs,function(v,i){lg.node(v).order=i});addSubgraphConstraints(lg,cg,sorted.vs)})}function assignOrder(g,layering){_.forEach(layering,function(layer){_.forEach(layer,function(v,i){g.node(v).order=i})})}},{\"../graphlib\":7,\"../lodash\":10,\"../util\":29,\"./add-subgraph-constraints\":13,\"./build-layer-graph\":15,\"./cross-count\":16,\"./init-order\":18,\"./sort-subgraph\":20}],18:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");module.exports=initOrder;\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */function initOrder(g){var visited={};var simpleNodes=_.filter(g.nodes(),function(v){return!g.children(v).length});var maxRank=_.max(_.map(simpleNodes,function(v){return g.node(v).rank}));var layers=_.map(_.range(maxRank+1),function(){return[]});function dfs(v){if(_.has(visited,v))return;visited[v]=true;var node=g.node(v);layers[node.rank].push(v);_.forEach(g.successors(v),dfs)}var orderedVs=_.sortBy(simpleNodes,function(v){return g.node(v).rank});_.forEach(orderedVs,dfs);return layers}},{\"../lodash\":10}],19:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");module.exports=resolveConflicts;\n/*\n * Given a list of entries of the form {v, barycenter, weight} and a\n * constraint graph this function will resolve any conflicts between the\n * constraint graph and the barycenters for the entries. If the barycenters for\n * an entry would violate a constraint in the constraint graph then we coalesce\n * the nodes in the conflict into a new node that respects the contraint and\n * aggregates barycenter and weight information.\n *\n * This implementation is based on the description in Forster, \"A Fast and\n * Simple Hueristic for Constrained Two-Level Crossing Reduction,\" thought it\n * differs in some specific details.\n *\n * Pre-conditions:\n *\n * 1. Each entry has the form {v, barycenter, weight}, or if the node has\n * no barycenter, then {v}.\n *\n * Returns:\n *\n * A new list of entries of the form {vs, i, barycenter, weight}. The list\n * `vs` may either be a singleton or it may be an aggregation of nodes\n * ordered such that they do not violate constraints from the constraint\n * graph. The property `i` is the lowest original index of any of the\n * elements in `vs`.\n */function resolveConflicts(entries,cg){var mappedEntries={};_.forEach(entries,function(entry,i){var tmp=mappedEntries[entry.v]={indegree:0,in:[],out:[],vs:[entry.v],i:i};if(!_.isUndefined(entry.barycenter)){tmp.barycenter=entry.barycenter;tmp.weight=entry.weight}});_.forEach(cg.edges(),function(e){var entryV=mappedEntries[e.v];var entryW=mappedEntries[e.w];if(!_.isUndefined(entryV)&&!_.isUndefined(entryW)){entryW.indegree++;entryV.out.push(mappedEntries[e.w])}});var sourceSet=_.filter(mappedEntries,function(entry){return!entry.indegree});return doResolveConflicts(sourceSet)}function doResolveConflicts(sourceSet){var entries=[];function handleIn(vEntry){return function(uEntry){if(uEntry.merged){return}if(_.isUndefined(uEntry.barycenter)||_.isUndefined(vEntry.barycenter)||uEntry.barycenter>=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry[\"in\"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.forEach(entry[\"in\"].reverse(),handleIn(entry));_.forEach(entry.out,handleOut(entry))}return _.map(_.filter(entries,function(entry){return!entry.merged}),function(entry){return _.pick(entry,[\"vs\",\"i\",\"barycenter\",\"weight\"])})}function mergeEntries(target,source){var sum=0;var weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{\"../lodash\":10}],20:[function(require,module,exports){var _=require(\"../lodash\");var barycenter=require(\"./barycenter\");var resolveConflicts=require(\"./resolve-conflicts\");var sort=require(\"./sort\");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v);var node=g.node(v);var bl=node?node.borderLeft:undefined;var br=node?node.borderRight:undefined;var subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.forEach(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,\"barycenter\")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,\"barycenter\")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.forEach(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{\"../lodash\":10,\"./barycenter\":14,\"./resolve-conflicts\":19,\"./sort\":21}],21:[function(require,module,exports){var _=require(\"../lodash\");var util=require(\"../util\");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,\"barycenter\")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.forEach(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenter<entryW.barycenter){return-1}else if(entryV.barycenter>entryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{\"../lodash\":10,\"../util\":29}],22:[function(require,module,exports){var _=require(\"./lodash\");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.forEach(g.graph().dummyChains,function(v){var node=g.node(v);var edgeObj=node.edgeObj;var pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w);var path=pathData.path;var lca=pathData.lca;var pathIdx=0;var pathV=path[pathIdx];var ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRank<node.rank){pathIdx++}if(pathV===lca){ascending=false}}if(!ascending){while(pathIdx<path.length-1&&g.node(pathV=path[pathIdx+1]).minRank<=node.rank){pathIdx++}pathV=path[pathIdx]}g.setParent(v,pathV);v=g.successors(v)[0]}})}\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nfunction findPath(g,postorderNums,v,w){var vPath=[];var wPath=[];var low=Math.min(postorderNums[v].low,postorderNums[w].low);var lim=Math.max(postorderNums[v].lim,postorderNums[w].lim);var parent;var lca;\n// Traverse up from v to find the LCA\nparent=v;do{parent=g.parent(parent);vPath.push(parent)}while(parent&&(postorderNums[parent].low>low||lim>postorderNums[parent].lim));lca=parent;\n// Traverse from w to LCA\nparent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={};var lim=0;function dfs(v){var low=lim;_.forEach(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.forEach(g.children(),dfs);return result}},{\"./lodash\":10}],23:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");var Graph=require(\"../graphlib\").Graph;var util=require(\"../util\");\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var\n// last visited node in the previous layer that is incident on an inner\n// segment.\nk0=0,\n// Tracks the last node in this layer scanned for crossings with a type-1\n// segment.\nscanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.forEach(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.forEach(layer.slice(scanPos,i+1),function(scanNode){_.forEach(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPos<k0||k1<uPos)&&!(uLabel.dummy&&g.node(scanNode).dummy)){addConflict(conflicts,u,scanNode)}})});scanPos=i+1;k0=k1}});return layer}_.reduce(layering,visitLayer);return conflicts}function findType2Conflicts(g,layering){var conflicts={};function scan(south,southPos,southEnd,prevNorthBorder,nextNorthBorder){var v;_.forEach(_.range(southPos,southEnd),function(i){v=south[i];if(g.node(v).dummy){_.forEach(g.predecessors(v),function(u){var uNode=g.node(u);if(uNode.dummy&&(uNode.order<prevNorthBorder||uNode.order>nextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.forEach(south,function(v,southLookahead){if(g.node(v).dummy===\"border\"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};\n// We cache the position here based on the layering because the graph and\n// layering may be out of sync. The layering matrix is manipulated to\n// generate different extreme alignments.\n_.forEach(layering,function(layer){_.forEach(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.forEach(layering,function(layer){var prevIdx=-1;_.forEach(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdx<pos[w]&&!hasConflict(conflicts,v,w)){align[w]=v;align[v]=root[v]=root[w];prevIdx=pos[w]}}}})});return{root:root,align:align}}function horizontalCompaction(g,layering,root,align,reverseSep){\n// This portion of the algorithm differs from BK due to a number of problems.\n// Instead of their algorithm we construct a new block graph and do two\n// sweeps. The first sweep places blocks with the smallest possible\n// coordinates. The second sweep removes unused space by moving blocks to the\n// greatest coordinates without violating separation.\nvar xs={},blockG=buildBlockGraph(g,layering,root,reverseSep),borderType=reverseSep?\"borderLeft\":\"borderRight\";function iterate(setXsFunc,nextNodesFunc){var stack=blockG.nodes();var elem=stack.pop();var visited={};while(elem){if(visited[elem]){setXsFunc(elem)}else{visited[elem]=true;stack.push(elem);stack=stack.concat(nextNodesFunc(elem))}elem=stack.pop()}}\n// First pass, assign smallest coordinates\nfunction pass1(elem){xs[elem]=blockG.inEdges(elem).reduce(function(acc,e){return Math.max(acc,xs[e.v]+blockG.edge(e))},0)}\n// Second pass, assign greatest coordinates\nfunction pass2(elem){var min=blockG.outEdges(elem).reduce(function(acc,e){return Math.min(acc,xs[e.w]-blockG.edge(e))},Number.POSITIVE_INFINITY);var node=g.node(elem);if(min!==Number.POSITIVE_INFINITY&&node.borderType!==borderType){xs[elem]=Math.max(xs[elem],min)}}iterate(pass1,blockG.predecessors.bind(blockG));iterate(pass2,blockG.successors.bind(blockG));\n// Assign x coordinates to all nodes\n_.forEach(align,function(v){xs[v]=xs[root[v]]});return xs}function buildBlockGraph(g,layering,root,reverseSep){var blockGraph=new Graph,graphLabel=g.graph(),sepFn=sep(graphLabel.nodesep,graphLabel.edgesep,reverseSep);_.forEach(layering,function(layer){var u;_.forEach(layer,function(v){var vRoot=root[v];blockGraph.setNode(vRoot);if(u){var uRoot=root[u],prevMax=blockGraph.edge(uRoot,vRoot);blockGraph.setEdge(uRoot,vRoot,Math.max(sepFn(g,v,u),prevMax||0))}u=v})});return blockGraph}\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */function findSmallestWidthAlignment(g,xss){return _.minBy(_.values(xss),function(xs){var max=Number.NEGATIVE_INFINITY;var min=Number.POSITIVE_INFINITY;_.forIn(xs,function(x,v){var halfWidth=width(g,v)/2;max=Math.max(x+halfWidth,max);min=Math.min(x-halfWidth,min)});return max-min})}\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */function alignCoordinates(xss,alignTo){var alignToVals=_.values(alignTo),alignToMin=_.min(alignToVals),alignToMax=_.max(alignToVals);_.forEach([\"u\",\"d\"],function(vert){_.forEach([\"l\",\"r\"],function(horiz){var alignment=vert+horiz,xs=xss[alignment],delta;if(xs===alignTo)return;var xsVals=_.values(xs);delta=horiz===\"l\"?alignToMin-_.min(xsVals):alignToMax-_.max(xsVals);if(delta){xss[alignment]=_.mapValues(xs,function(x){return x+delta})}})})}function balance(xss,align){return _.mapValues(xss.ul,function(ignore,v){if(align){return xss[align.toLowerCase()][v]}else{var xs=_.sortBy(_.map(xss,v));return(xs[1]+xs[2])/2}})}function positionX(g){var layering=util.buildLayerMatrix(g);var conflicts=_.merge(findType1Conflicts(g,layering),findType2Conflicts(g,layering));var xss={};var adjustedLayering;_.forEach([\"u\",\"d\"],function(vert){adjustedLayering=vert===\"u\"?layering:_.values(layering).reverse();_.forEach([\"l\",\"r\"],function(horiz){if(horiz===\"r\"){adjustedLayering=_.map(adjustedLayering,function(inner){return _.values(inner).reverse()})}var neighborFn=(vert===\"u\"?g.predecessors:g.successors).bind(g);var align=verticalAlignment(g,adjustedLayering,conflicts,neighborFn);var xs=horizontalCompaction(g,adjustedLayering,align.root,align.align,horiz===\"r\");if(horiz===\"r\"){xs=_.mapValues(xs,function(x){return-x})}xss[vert+horiz]=xs})});var smallestWidth=findSmallestWidthAlignment(g,xss);alignCoordinates(xss,smallestWidth);return balance(xss,g.graph().align)}function sep(nodeSep,edgeSep,reverseSep){return function(g,v,w){var vLabel=g.node(v);var wLabel=g.node(w);var sum=0;var delta;sum+=vLabel.width/2;if(_.has(vLabel,\"labelpos\")){switch(vLabel.labelpos.toLowerCase()){case\"l\":delta=-vLabel.width/2;break;case\"r\":delta=vLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;sum+=(vLabel.dummy?edgeSep:nodeSep)/2;sum+=(wLabel.dummy?edgeSep:nodeSep)/2;sum+=wLabel.width/2;if(_.has(wLabel,\"labelpos\")){switch(wLabel.labelpos.toLowerCase()){case\"l\":delta=wLabel.width/2;break;case\"r\":delta=-wLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;return sum}}function width(g,v){return g.node(v).width}},{\"../graphlib\":7,\"../lodash\":10,\"../util\":29}],24:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");var util=require(\"../util\");var positionX=require(\"./bk\").positionX;module.exports=position;function position(g){g=util.asNonCompoundGraph(g);positionY(g);_.forEach(positionX(g),function(x,v){g.node(v).x=x})}function positionY(g){var layering=util.buildLayerMatrix(g);var rankSep=g.graph().ranksep;var prevY=0;_.forEach(layering,function(layer){var maxHeight=_.max(_.map(layer,function(v){return g.node(v).height}));_.forEach(layer,function(v){g.node(v).y=prevY+maxHeight/2});prevY+=maxHeight+rankSep})}},{\"../lodash\":10,\"../util\":29,\"./bk\":23}],25:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");var Graph=require(\"../graphlib\").Graph;var slack=require(\"./util\").slack;module.exports=feasibleTree;\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */function feasibleTree(g){var t=new Graph({directed:false});\n// Choose arbitrary node from which to start our tree\nvar start=g.nodes()[0];var size=g.nodeCount();t.setNode(start,{});var edge,delta;while(tightTree(t,g)<size){edge=findMinSlackEdge(t,g);delta=t.hasNode(edge.v)?slack(g,edge):-slack(g,edge);shiftRanks(t,g,delta)}return t}\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */function tightTree(t,g){function dfs(v){_.forEach(g.nodeEdges(v),function(e){var edgeV=e.v,w=v===edgeV?e.w:edgeV;if(!t.hasNode(w)&&!slack(g,e)){t.setNode(w,{});t.setEdge(v,w,{});dfs(w)}})}_.forEach(t.nodes(),dfs);return t.nodeCount()}\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */function findMinSlackEdge(t,g){return _.minBy(g.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w)){return slack(g,e)}})}function shiftRanks(t,g,delta){_.forEach(t.nodes(),function(v){g.node(v).rank+=delta})}},{\"../graphlib\":7,\"../lodash\":10,\"./util\":28}],26:[function(require,module,exports){\"use strict\";var rankUtil=require(\"./util\");var longestPath=rankUtil.longestPath;var feasibleTree=require(\"./feasible-tree\");var networkSimplex=require(\"./network-simplex\");module.exports=rank;\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */function rank(g){switch(g.graph().ranker){case\"network-simplex\":networkSimplexRanker(g);break;case\"tight-tree\":tightTreeRanker(g);break;case\"longest-path\":longestPathRanker(g);break;default:networkSimplexRanker(g)}}\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker=longestPath;function tightTreeRanker(g){longestPath(g);feasibleTree(g)}function networkSimplexRanker(g){networkSimplex(g)}},{\"./feasible-tree\":25,\"./network-simplex\":27,\"./util\":28}],27:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");var feasibleTree=require(\"./feasible-tree\");var slack=require(\"./util\").slack;var initRank=require(\"./util\").longestPath;var preorder=require(\"../graphlib\").alg.preorder;var postorder=require(\"../graphlib\").alg.postorder;var simplify=require(\"../util\").simplify;module.exports=networkSimplex;\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues=initLowLimValues;networkSimplex.initCutValues=initCutValues;networkSimplex.calcCutValue=calcCutValue;networkSimplex.leaveEdge=leaveEdge;networkSimplex.enterEdge=enterEdge;networkSimplex.exchangeEdges=exchangeEdges;\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */function networkSimplex(g){g=simplify(g);initRank(g);var t=feasibleTree(g);initLowLimValues(t);initCutValues(t,g);var e,f;while(e=leaveEdge(t)){f=enterEdge(t,g,e);exchangeEdges(t,g,e,f)}}\n/*\n * Initializes cut values for all edges in the tree.\n */function initCutValues(t,g){var vs=postorder(t,t.nodes());vs=vs.slice(0,vs.length-1);_.forEach(vs,function(v){assignCutValue(t,g,v)})}function assignCutValue(t,g,child){var childLab=t.node(child);var parent=childLab.parent;t.edge(child,parent).cutvalue=calcCutValue(t,g,child)}\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */function calcCutValue(t,g,child){var childLab=t.node(child);var parent=childLab.parent;\n// True if the child is on the tail end of the edge in the directed graph\nvar childIsTail=true;\n// The graph's view of the tree edge we're inspecting\nvar graphEdge=g.edge(child,parent);\n// The accumulated cut value for the edge between this node and its parent\nvar cutValue=0;if(!graphEdge){childIsTail=false;graphEdge=g.edge(parent,child)}cutValue=graphEdge.weight;_.forEach(g.nodeEdges(child),function(e){var isOutEdge=e.v===child,other=isOutEdge?e.w:e.v;if(other!==parent){var pointsToHead=isOutEdge===childIsTail,otherWeight=g.edge(e).weight;cutValue+=pointsToHead?otherWeight:-otherWeight;if(isTreeEdge(t,child,other)){var otherCutValue=t.edge(child,other).cutvalue;cutValue+=pointsToHead?-otherCutValue:otherCutValue}}});return cutValue}function initLowLimValues(tree,root){if(arguments.length<2){root=tree.nodes()[0]}dfsAssignLowLim(tree,{},1,root)}function dfsAssignLowLim(tree,visited,nextLim,v,parent){var low=nextLim;var label=tree.node(v);visited[v]=true;_.forEach(tree.neighbors(v),function(w){if(!_.has(visited,w)){nextLim=dfsAssignLowLim(tree,visited,nextLim,w,v)}});label.low=low;label.lim=nextLim++;if(parent){label.parent=parent}else{\n// TODO should be able to remove this when we incrementally update low lim\ndelete label.parent}return nextLim}function leaveEdge(tree){return _.find(tree.edges(),function(e){return tree.edge(e).cutvalue<0})}function enterEdge(t,g,edge){var v=edge.v;var w=edge.w;\n// For the rest of this function we assume that v is the tail and w is the\n// head, so if we don't have this edge in the graph we should flip it to\n// match the correct orientation.\nif(!g.hasEdge(v,w)){v=edge.w;w=edge.v}var vLabel=t.node(v);var wLabel=t.node(w);var tailLabel=vLabel;var flip=false;\n// If the root is in the tail of the edge then we need to flip the logic that\n// checks for the head and tail nodes in the candidates function below.\nif(vLabel.lim>wLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.minBy(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v;var w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent});var vs=preorder(t,root);vs=vs.slice(1);_.forEach(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}\n/*\n * Returns true if the edge is in the tree.\n */function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{\"../graphlib\":7,\"../lodash\":10,\"../util\":29,\"./feasible-tree\":25,\"./util\":28}],28:[function(require,module,exports){\"use strict\";var _=require(\"../lodash\");module.exports={longestPath:longestPath,slack:slack};\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY||// return value of _.map([]) for Lodash 3\nrank===undefined||// return value of _.map([]) for Lodash 4\nrank===null){// return value of _.map([null])\nrank=0}return label.rank=rank}_.forEach(g.sources(),dfs)}\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{\"../lodash\":10}],29:[function(require,module,exports){\n/* eslint \"no-console\": off */\n\"use strict\";var _=require(\"./lodash\");var Graph=require(\"./graphlib\").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};\n/*\n * Adds a dummy node to the graph and return v.\n */function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.forEach(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.forEach(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1};var label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.forEach(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v))}});_.forEach(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={};_.forEach(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.forEach(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */function intersectRect(rect,point){var x=rect.x;var y=rect.y;\n// Rectangle intersection algorithm from:\n// http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\nvar dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error(\"Not possible to find intersection inside of the rectangle\")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){\n// Intersection is top or bottom of rect.\nif(dy<0){h=-h}sx=h*dx/dy;sy=h}else{\n// Intersection is left or right of rect.\nif(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * function will produce a matrix with the ids of each node.\n */function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[]});_.forEach(g.nodes(),function(v){var node=g.node(v);var rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.forEach(g.nodes(),function(v){var node=g.node(v);if(_.has(node,\"rank\")){node.rank-=min}})}function removeEmptyRanks(g){\n// Ranks may not start at 0, so we need to offset them\nvar offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.forEach(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!layers[rank]){layers[rank]=[]}layers[rank].push(v)});var delta=0;var nodeRankFactor=g.graph().nodeRankFactor;_.forEach(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.forEach(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,\"border\",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * function returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */function partition(collection,fn){var result={lhs:[],rhs:[]};_.forEach(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}\n/*\n * Returns a new function that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+\" time: \"+(_.now()-start)+\"ms\")}}function notime(name,fn){return fn()}},{\"./graphlib\":7,\"./lodash\":10}],30:[function(require,module,exports){module.exports=\"0.8.5\"},{}],31:[function(require,module,exports){\n/**\n * Copyright (c) 2014, Chris Pettitt\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors\n * may be used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar lib=require(\"./lib\");module.exports={Graph:lib.Graph,json:require(\"./lib/json\"),alg:require(\"./lib/alg\"),version:lib.version}},{\"./lib\":47,\"./lib/alg\":38,\"./lib/json\":48}],32:[function(require,module,exports){var _=require(\"../lodash\");module.exports=components;function components(g){var visited={};var cmpts=[];var cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{\"../lodash\":49}],33:[function(require,module,exports){var _=require(\"../lodash\");module.exports=dfs;\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var navigation=(g.isDirected()?g.successors:g.neighbors).bind(g);var acc=[];var visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error(\"Graph does not have node: \"+v)}doDfs(g,v,order===\"post\",visited,navigation,acc)});return acc}function doDfs(g,v,postorder,visited,navigation,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(navigation(v),function(w){doDfs(g,w,postorder,visited,navigation,acc)});if(postorder){acc.push(v)}}}},{\"../lodash\":49}],34:[function(require,module,exports){var dijkstra=require(\"./dijkstra\");var _=require(\"../lodash\");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{\"../lodash\":49,\"./dijkstra\":35}],35:[function(require,module,exports){var _=require(\"../lodash\");var PriorityQueue=require(\"../data/priority-queue\");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={};var pq=new PriorityQueue;var v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w;var wEntry=results[w];var weight=weightFn(edge);var distance=vEntry.distance+weight;if(weight<0){throw new Error(\"dijkstra does not allow negative edge weights. \"+\"Bad edge: \"+edge+\" Weight: \"+weight)}if(distance<wEntry.distance){wEntry.distance=distance;wEntry.predecessor=v;pq.decrease(w,distance)}};g.nodes().forEach(function(v){var distance=v===source?0:Number.POSITIVE_INFINITY;results[v]={distance:distance};pq.add(v,distance)});while(pq.size()>0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{\"../data/priority-queue\":45,\"../lodash\":49}],36:[function(require,module,exports){var _=require(\"../lodash\");var tarjan=require(\"./tarjan\");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1||cmpt.length===1&&g.hasEdge(cmpt[0],cmpt[0])})}},{\"../lodash\":49,\"./tarjan\":43}],37:[function(require,module,exports){var _=require(\"../lodash\");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={};var nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v;var d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance<ij.distance){ij.distance=altDistance;ij.predecessor=kj.predecessor}})})});return results}},{\"../lodash\":49}],38:[function(require,module,exports){module.exports={components:require(\"./components\"),dijkstra:require(\"./dijkstra\"),dijkstraAll:require(\"./dijkstra-all\"),findCycles:require(\"./find-cycles\"),floydWarshall:require(\"./floyd-warshall\"),isAcyclic:require(\"./is-acyclic\"),postorder:require(\"./postorder\"),preorder:require(\"./preorder\"),prim:require(\"./prim\"),tarjan:require(\"./tarjan\"),topsort:require(\"./topsort\")}},{\"./components\":32,\"./dijkstra\":35,\"./dijkstra-all\":34,\"./find-cycles\":36,\"./floyd-warshall\":37,\"./is-acyclic\":39,\"./postorder\":40,\"./preorder\":41,\"./prim\":42,\"./tarjan\":43,\"./topsort\":44}],39:[function(require,module,exports){var topsort=require(\"./topsort\");module.exports=isAcyclic;function isAcyclic(g){try{topsort(g)}catch(e){if(e instanceof topsort.CycleException){return false}throw e}return true}},{\"./topsort\":44}],40:[function(require,module,exports){var dfs=require(\"./dfs\");module.exports=postorder;function postorder(g,vs){return dfs(g,vs,\"post\")}},{\"./dfs\":33}],41:[function(require,module,exports){var dfs=require(\"./dfs\");module.exports=preorder;function preorder(g,vs){return dfs(g,vs,\"pre\")}},{\"./dfs\":33}],42:[function(require,module,exports){var _=require(\"../lodash\");var Graph=require(\"../graph\");var PriorityQueue=require(\"../data/priority-queue\");module.exports=prim;function prim(g,weightFunc){var result=new Graph;var parents={};var pq=new PriorityQueue;var v;function updateNeighbors(edge){var w=edge.v===v?edge.w:edge.v;var pri=pq.priority(w);if(pri!==undefined){var edgeWeight=weightFunc(edge);if(edgeWeight<pri){parents[w]=v;pq.decrease(w,edgeWeight)}}}if(g.nodeCount()===0){return result}_.each(g.nodes(),function(v){pq.add(v,Number.POSITIVE_INFINITY);result.setNode(v)});\n// Start from an arbitrary node\npq.decrease(g.nodes()[0],0);var init=false;while(pq.size()>0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error(\"Input graph is not connected: \"+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{\"../data/priority-queue\":45,\"../graph\":46,\"../lodash\":49}],43:[function(require,module,exports){var _=require(\"../lodash\");module.exports=tarjan;function tarjan(g){var index=0;var stack=[];var visited={};// node id -> { onStack, lowlink, index }\nvar results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[];var w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{\"../lodash\":49}],44:[function(require,module,exports){var _=require(\"../lodash\");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={};var stack={};var results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}CycleException.prototype=new Error;// must be an instance of Error to pass testing\n},{\"../lodash\":49}],45:[function(require,module,exports){var _=require(\"../lodash\");module.exports=PriorityQueue;\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */function PriorityQueue(){this._arr=[];this._keyIndices={}}\n/**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */PriorityQueue.prototype.size=function(){return this._arr.length};\n/**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};\n/**\n * Returns `true` if **key** is in the queue and `false` if not.\n */PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};\n/**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};\n/**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error(\"Queue underflow\")}return this._arr[0].key};\n/**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};\n/**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};\n/**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error(\"New priority is greater than current priority. \"+\"Key: \"+key+\" Old: \"+this._arr[index].priority+\" New: \"+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i;var r=l+1;var largest=i;if(l<arr.length){largest=arr[l].priority<arr[largest].priority?l:largest;if(r<arr.length){largest=arr[r].priority<arr[largest].priority?r:largest}if(largest!==i){this._swap(i,largest);this._heapify(largest)}}};PriorityQueue.prototype._decrease=function(index){var arr=this._arr;var priority=arr[index].priority;var parent;while(index!==0){parent=index>>1;if(arr[parent].priority<priority){break}this._swap(index,parent);index=parent}};PriorityQueue.prototype._swap=function(i,j){var arr=this._arr;var keyIndices=this._keyIndices;var origArrI=arr[i];var origArrJ=arr[j];arr[i]=origArrJ;arr[j]=origArrI;keyIndices[origArrJ.key]=i;keyIndices[origArrI.key]=j}},{\"../lodash\":49}],46:[function(require,module,exports){\"use strict\";var _=require(\"./lodash\");module.exports=Graph;var DEFAULT_EDGE_NAME=\"\\0\";var GRAPH_NODE=\"\\0\";var EDGE_KEY_DELIM=\"\u0001\";\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\nfunction Graph(opts){this._isDirected=_.has(opts,\"directed\")?opts.directed:true;this._isMultigraph=_.has(opts,\"multigraph\")?opts.multigraph:false;this._isCompound=_.has(opts,\"compound\")?opts.compound:false;\n// Label for the graph itself\nthis._label=undefined;\n// Defaults to be set when creating a new node\nthis._defaultNodeLabelFn=_.constant(undefined);\n// Defaults to be set when creating a new edge\nthis._defaultEdgeLabelFn=_.constant(undefined);\n// v -> label\nthis._nodes={};if(this._isCompound){\n// v -> parent\nthis._parent={};\n// v -> children\nthis._children={};this._children[GRAPH_NODE]={}}\n// v -> edgeObj\nthis._in={};\n// u -> v -> Number\nthis._preds={};\n// v -> edgeObj\nthis._out={};\n// v -> w -> Number\nthis._sucs={};\n// e -> edgeObj\nthis._edgeObjs={};\n// e -> label\nthis._edgeLabels={}}\n/* Number of nodes in the graph. Should only be changed by the implementation. */Graph.prototype._nodeCount=0;\n/* Number of edges in the graph. Should only be changed by the implementation. */Graph.prototype._edgeCount=0;\n/* === Graph functions ========= */Graph.prototype.isDirected=function(){return this._isDirected};Graph.prototype.isMultigraph=function(){return this._isMultigraph};Graph.prototype.isCompound=function(){return this._isCompound};Graph.prototype.setGraph=function(label){this._label=label;return this};Graph.prototype.graph=function(){return this._label};\n/* === Node functions ========== */Graph.prototype.setDefaultNodeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultNodeLabelFn=newDefault;return this};Graph.prototype.nodeCount=function(){return this._nodeCount};Graph.prototype.nodes=function(){return _.keys(this._nodes)};Graph.prototype.sources=function(){var self=this;return _.filter(this.nodes(),function(v){return _.isEmpty(self._in[v])})};Graph.prototype.sinks=function(){var self=this;return _.filter(this.nodes(),function(v){return _.isEmpty(self._out[v])})};Graph.prototype.setNodes=function(vs,value){var args=arguments;var self=this;_.each(vs,function(v){if(args.length>1){self.setNode(v,value)}else{self.setNode(v)}});return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){self.setParent(child)});delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error(\"Cannot set parent in a non-compound graph\")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{\n// Coerce parent to string\nparent+=\"\";for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error(\"Setting \"+parent+\" as parent of \"+v+\" would create a cycle\")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.isLeaf=function(v){var neighbors;if(this.isDirected()){neighbors=this.successors(v)}else{neighbors=this.neighbors(v)}return neighbors.length===0};Graph.prototype.filterNodes=function(filter){var copy=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});copy.setGraph(this.graph());var self=this;_.each(this._nodes,function(value,v){if(filter(v)){copy.setNode(v,value)}});_.each(this._edgeObjs,function(e){if(copy.hasNode(e.v)&©.hasNode(e.w)){copy.setEdge(e,self.edge(e))}});var parents={};function findParent(v){var parent=self.parent(v);if(parent===undefined||copy.hasNode(parent)){parents[v]=parent;return parent}else if(parent in parents){return parents[parent]}else{return findParent(parent)}}if(this._isCompound){_.each(copy.nodes(),function(v){copy.setParent(v,findParent(v))})}return copy};\n/* === Edge functions ========== */Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this;var args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};\n/*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */Graph.prototype.setEdge=function(){var v,w,name,value;var valueSpecified=false;var arg0=arguments[0];if(typeof arg0===\"object\"&&arg0!==null&&\"v\"in arg0){v=arg0.v;w=arg0.w;name=arg0.name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arg0;w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=\"\"+v;w=\"\"+w;if(!_.isUndefined(name)){name=\"\"+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error(\"Cannot set a named edge when isMultigraph = false\")}\n// It didn't exist, so we need to create it.\n// First ensure the nodes exist.\nthis.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);\n// Ensure we add undirected edges in a consistent way.\nv=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);var edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(map[k]){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v_,w_,name){var v=\"\"+v_;var w=\"\"+w_;if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v_,w_,name){var v=\"\"+v_;var w=\"\"+w_;if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{\"./lodash\":49}],47:[function(require,module,exports){\n// Includes only the \"core\" of graphlib\nmodule.exports={Graph:require(\"./graph\"),version:require(\"./version\")}},{\"./graph\":46,\"./version\":50}],48:[function(require,module,exports){var _=require(\"./lodash\");var Graph=require(\"./graph\");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v);var parent=g.parent(v);var node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e);var edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{\"./graph\":46,\"./lodash\":49}],49:[function(require,module,exports){\n/* global window */\nvar lodash;if(typeof require===\"function\"){try{lodash={clone:require(\"lodash/clone\"),constant:require(\"lodash/constant\"),each:require(\"lodash/each\"),filter:require(\"lodash/filter\"),has:require(\"lodash/has\"),isArray:require(\"lodash/isArray\"),isEmpty:require(\"lodash/isEmpty\"),isFunction:require(\"lodash/isFunction\"),isUndefined:require(\"lodash/isUndefined\"),keys:require(\"lodash/keys\"),map:require(\"lodash/map\"),reduce:require(\"lodash/reduce\"),size:require(\"lodash/size\"),transform:require(\"lodash/transform\"),union:require(\"lodash/union\"),values:require(\"lodash/values\")}}catch(e){\n// continue regardless of error\n}}if(!lodash){lodash=window._}module.exports=lodash},{\"lodash/clone\":226,\"lodash/constant\":228,\"lodash/each\":230,\"lodash/filter\":232,\"lodash/has\":239,\"lodash/isArray\":243,\"lodash/isEmpty\":247,\"lodash/isFunction\":248,\"lodash/isUndefined\":258,\"lodash/keys\":259,\"lodash/map\":262,\"lodash/reduce\":274,\"lodash/size\":275,\"lodash/transform\":284,\"lodash/union\":285,\"lodash/values\":287}],50:[function(require,module,exports){module.exports=\"2.1.8\"},{}],51:[function(require,module,exports){var getNative=require(\"./_getNative\"),root=require(\"./_root\");\n/* Built-in method references that are verified to be native. */var DataView=getNative(root,\"DataView\");module.exports=DataView},{\"./_getNative\":163,\"./_root\":208}],52:[function(require,module,exports){var hashClear=require(\"./_hashClear\"),hashDelete=require(\"./_hashDelete\"),hashGet=require(\"./_hashGet\"),hashHas=require(\"./_hashHas\"),hashSet=require(\"./_hashSet\");\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}\n// Add methods to `Hash`.\nHash.prototype.clear=hashClear;Hash.prototype[\"delete\"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;module.exports=Hash},{\"./_hashClear\":172,\"./_hashDelete\":173,\"./_hashGet\":174,\"./_hashHas\":175,\"./_hashSet\":176}],53:[function(require,module,exports){var listCacheClear=require(\"./_listCacheClear\"),listCacheDelete=require(\"./_listCacheDelete\"),listCacheGet=require(\"./_listCacheGet\"),listCacheHas=require(\"./_listCacheHas\"),listCacheSet=require(\"./_listCacheSet\");\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}\n// Add methods to `ListCache`.\nListCache.prototype.clear=listCacheClear;ListCache.prototype[\"delete\"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;module.exports=ListCache},{\"./_listCacheClear\":188,\"./_listCacheDelete\":189,\"./_listCacheGet\":190,\"./_listCacheHas\":191,\"./_listCacheSet\":192}],54:[function(require,module,exports){var getNative=require(\"./_getNative\"),root=require(\"./_root\");\n/* Built-in method references that are verified to be native. */var Map=getNative(root,\"Map\");module.exports=Map},{\"./_getNative\":163,\"./_root\":208}],55:[function(require,module,exports){var mapCacheClear=require(\"./_mapCacheClear\"),mapCacheDelete=require(\"./_mapCacheDelete\"),mapCacheGet=require(\"./_mapCacheGet\"),mapCacheHas=require(\"./_mapCacheHas\"),mapCacheSet=require(\"./_mapCacheSet\");\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}\n// Add methods to `MapCache`.\nMapCache.prototype.clear=mapCacheClear;MapCache.prototype[\"delete\"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;module.exports=MapCache},{\"./_mapCacheClear\":193,\"./_mapCacheDelete\":194,\"./_mapCacheGet\":195,\"./_mapCacheHas\":196,\"./_mapCacheSet\":197}],56:[function(require,module,exports){var getNative=require(\"./_getNative\"),root=require(\"./_root\");\n/* Built-in method references that are verified to be native. */var Promise=getNative(root,\"Promise\");module.exports=Promise},{\"./_getNative\":163,\"./_root\":208}],57:[function(require,module,exports){var getNative=require(\"./_getNative\"),root=require(\"./_root\");\n/* Built-in method references that are verified to be native. */var Set=getNative(root,\"Set\");module.exports=Set},{\"./_getNative\":163,\"./_root\":208}],58:[function(require,module,exports){var MapCache=require(\"./_MapCache\"),setCacheAdd=require(\"./_setCacheAdd\"),setCacheHas=require(\"./_setCacheHas\");\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache;while(++index<length){this.add(values[index])}}\n// Add methods to `SetCache`.\nSetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;module.exports=SetCache},{\"./_MapCache\":55,\"./_setCacheAdd\":210,\"./_setCacheHas\":211}],59:[function(require,module,exports){var ListCache=require(\"./_ListCache\"),stackClear=require(\"./_stackClear\"),stackDelete=require(\"./_stackDelete\"),stackGet=require(\"./_stackGet\"),stackHas=require(\"./_stackHas\"),stackSet=require(\"./_stackSet\");\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}\n// Add methods to `Stack`.\nStack.prototype.clear=stackClear;Stack.prototype[\"delete\"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;module.exports=Stack},{\"./_ListCache\":53,\"./_stackClear\":215,\"./_stackDelete\":216,\"./_stackGet\":217,\"./_stackHas\":218,\"./_stackSet\":219}],60:[function(require,module,exports){var root=require(\"./_root\");\n/** Built-in value references. */var Symbol=root.Symbol;module.exports=Symbol},{\"./_root\":208}],61:[function(require,module,exports){var root=require(\"./_root\");\n/** Built-in value references. */var Uint8Array=root.Uint8Array;module.exports=Uint8Array},{\"./_root\":208}],62:[function(require,module,exports){var getNative=require(\"./_getNative\"),root=require(\"./_root\");\n/* Built-in method references that are verified to be native. */var WeakMap=getNative(root,\"WeakMap\");module.exports=WeakMap},{\"./_getNative\":163,\"./_root\":208}],63:[function(require,module,exports){\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}module.exports=apply},{}],64:[function(require,module,exports){\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}module.exports=arrayEach},{}],65:[function(require,module,exports){\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value}}return result}module.exports=arrayFilter},{}],66:[function(require,module,exports){var baseIndexOf=require(\"./_baseIndexOf\");\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}module.exports=arrayIncludes},{\"./_baseIndexOf\":95}],67:[function(require,module,exports){\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index<length){if(comparator(value,array[index])){return true}}return false}module.exports=arrayIncludesWith},{}],68:[function(require,module,exports){var baseTimes=require(\"./_baseTimes\"),isArguments=require(\"./isArguments\"),isArray=require(\"./isArray\"),isBuffer=require(\"./isBuffer\"),isIndex=require(\"./_isIndex\"),isTypedArray=require(\"./isTypedArray\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(\n// Safari 9 has enumerable `arguments.length` in strict mode.\nkey==\"length\"||\n// Node.js 0.10 has enumerable non-index properties on buffers.\nisBuff&&(key==\"offset\"||key==\"parent\")||\n// PhantomJS 2 has enumerable non-index properties on typed arrays.\nisType&&(key==\"buffer\"||key==\"byteLength\"||key==\"byteOffset\")||\n// Skip index properties.\nisIndex(key,length)))){result.push(key)}}return result}module.exports=arrayLikeKeys},{\"./_baseTimes\":125,\"./_isIndex\":181,\"./isArguments\":242,\"./isArray\":243,\"./isBuffer\":246,\"./isTypedArray\":257}],69:[function(require,module,exports){\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}module.exports=arrayMap},{}],70:[function(require,module,exports){\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}module.exports=arrayPush},{}],71:[function(require,module,exports){\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array==null?0:array.length;if(initAccum&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}module.exports=arrayReduce},{}],72:[function(require,module,exports){\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}module.exports=arraySome},{}],73:[function(require,module,exports){var baseProperty=require(\"./_baseProperty\");\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */var asciiSize=baseProperty(\"length\");module.exports=asciiSize},{\"./_baseProperty\":117}],74:[function(require,module,exports){var baseAssignValue=require(\"./_baseAssignValue\"),eq=require(\"./eq\");\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */function assignMergeValue(object,key,value){if(value!==undefined&&!eq(object[key],value)||value===undefined&&!(key in object)){baseAssignValue(object,key,value)}}module.exports=assignMergeValue},{\"./_baseAssignValue\":79,\"./eq\":231}],75:[function(require,module,exports){var baseAssignValue=require(\"./_baseAssignValue\"),eq=require(\"./eq\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){baseAssignValue(object,key,value)}}module.exports=assignValue},{\"./_baseAssignValue\":79,\"./eq\":231}],76:[function(require,module,exports){var eq=require(\"./eq\");\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}module.exports=assocIndexOf},{\"./eq\":231}],77:[function(require,module,exports){var copyObject=require(\"./_copyObject\"),keys=require(\"./keys\");\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */function baseAssign(object,source){return object&©Object(source,keys(source),object)}module.exports=baseAssign},{\"./_copyObject\":143,\"./keys\":259}],78:[function(require,module,exports){var copyObject=require(\"./_copyObject\"),keysIn=require(\"./keysIn\");\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */function baseAssignIn(object,source){return object&©Object(source,keysIn(source),object)}module.exports=baseAssignIn},{\"./_copyObject\":143,\"./keysIn\":260}],79:[function(require,module,exports){var defineProperty=require(\"./_defineProperty\");\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */function baseAssignValue(object,key,value){if(key==\"__proto__\"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}module.exports=baseAssignValue},{\"./_defineProperty\":153}],80:[function(require,module,exports){var Stack=require(\"./_Stack\"),arrayEach=require(\"./_arrayEach\"),assignValue=require(\"./_assignValue\"),baseAssign=require(\"./_baseAssign\"),baseAssignIn=require(\"./_baseAssignIn\"),cloneBuffer=require(\"./_cloneBuffer\"),copyArray=require(\"./_copyArray\"),copySymbols=require(\"./_copySymbols\"),copySymbolsIn=require(\"./_copySymbolsIn\"),getAllKeys=require(\"./_getAllKeys\"),getAllKeysIn=require(\"./_getAllKeysIn\"),getTag=require(\"./_getTag\"),initCloneArray=require(\"./_initCloneArray\"),initCloneByTag=require(\"./_initCloneByTag\"),initCloneObject=require(\"./_initCloneObject\"),isArray=require(\"./isArray\"),isBuffer=require(\"./isBuffer\"),isMap=require(\"./isMap\"),isObject=require(\"./isObject\"),isSet=require(\"./isSet\"),keys=require(\"./keys\");\n/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;\n/** `Object#toString` result references. */var argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",symbolTag=\"[object Symbol]\",weakMapTag=\"[object WeakMap]\";var arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\";\n/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,isDeep)}}\n// Check for circular references and return its corresponding clone.\nstack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))})}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key]}\n// Recursively populate clone (susceptible to call stack limits).\nassignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))});return result}module.exports=baseClone},{\"./_Stack\":59,\"./_arrayEach\":64,\"./_assignValue\":75,\"./_baseAssign\":77,\"./_baseAssignIn\":78,\"./_cloneBuffer\":135,\"./_copyArray\":142,\"./_copySymbols\":144,\"./_copySymbolsIn\":145,\"./_getAllKeys\":159,\"./_getAllKeysIn\":160,\"./_getTag\":168,\"./_initCloneArray\":177,\"./_initCloneByTag\":178,\"./_initCloneObject\":179,\"./isArray\":243,\"./isBuffer\":246,\"./isMap\":250,\"./isObject\":251,\"./isSet\":254,\"./keys\":259}],81:[function(require,module,exports){var isObject=require(\"./isObject\");\n/** Built-in value references. */var objectCreate=Object.create;\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{}}if(objectCreate){return objectCreate(proto)}object.prototype=proto;var result=new object;object.prototype=undefined;return result}}();module.exports=baseCreate},{\"./isObject\":251}],82:[function(require,module,exports){var baseForOwn=require(\"./_baseForOwn\"),createBaseEach=require(\"./_createBaseEach\");\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */var baseEach=createBaseEach(baseForOwn);module.exports=baseEach},{\"./_baseForOwn\":88,\"./_createBaseEach\":148}],83:[function(require,module,exports){var isSymbol=require(\"./isSymbol\");\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */function baseExtremum(array,iteratee,comparator){var index=-1,length=array.length;while(++index<length){var value=array[index],current=iteratee(value);if(current!=null&&(computed===undefined?current===current&&!isSymbol(current):comparator(current,computed))){var computed=current,result=value}}return result}module.exports=baseExtremum},{\"./isSymbol\":256}],84:[function(require,module,exports){var baseEach=require(\"./_baseEach\");\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value)}});return result}module.exports=baseFilter},{\"./_baseEach\":82}],85:[function(require,module,exports){\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?1:-1);while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}module.exports=baseFindIndex},{}],86:[function(require,module,exports){var arrayPush=require(\"./_arrayPush\"),isFlattenable=require(\"./_isFlattenable\");\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(depth>0&&predicate(value)){if(depth>1){\n// Recursively flatten arrays (susceptible to call stack limits).\nbaseFlatten(value,depth-1,predicate,isStrict,result)}else{arrayPush(result,value)}}else if(!isStrict){result[result.length]=value}}return result}module.exports=baseFlatten},{\"./_arrayPush\":70,\"./_isFlattenable\":180}],87:[function(require,module,exports){var createBaseFor=require(\"./_createBaseFor\");\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */var baseFor=createBaseFor();module.exports=baseFor},{\"./_createBaseFor\":149}],88:[function(require,module,exports){var baseFor=require(\"./_baseFor\"),keys=require(\"./keys\");\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}module.exports=baseForOwn},{\"./_baseFor\":87,\"./keys\":259}],89:[function(require,module,exports){var castPath=require(\"./_castPath\"),toKey=require(\"./_toKey\");\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:undefined}module.exports=baseGet},{\"./_castPath\":133,\"./_toKey\":223}],90:[function(require,module,exports){var arrayPush=require(\"./_arrayPush\"),isArray=require(\"./isArray\");\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}module.exports=baseGetAllKeys},{\"./_arrayPush\":70,\"./isArray\":243}],91:[function(require,module,exports){var Symbol=require(\"./_Symbol\"),getRawTag=require(\"./_getRawTag\"),objectToString=require(\"./_objectToString\");\n/** `Object#toString` result references. */var nullTag=\"[object Null]\",undefinedTag=\"[object Undefined]\";\n/** Built-in value references. */var symToStringTag=Symbol?Symbol.toStringTag:undefined;\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module.exports=baseGetTag},{\"./_Symbol\":60,\"./_getRawTag\":165,\"./_objectToString\":205}],92:[function(require,module,exports){\n/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value,other){return value>other}module.exports=baseGt},{}],93:[function(require,module,exports){\n/** Used for built-in method references. */\nvar objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key)}module.exports=baseHas},{}],94:[function(require,module,exports){\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object,key){return object!=null&&key in Object(object)}module.exports=baseHasIn},{}],95:[function(require,module,exports){var baseFindIndex=require(\"./_baseFindIndex\"),baseIsNaN=require(\"./_baseIsNaN\"),strictIndexOf=require(\"./_strictIndexOf\");\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}module.exports=baseIndexOf},{\"./_baseFindIndex\":85,\"./_baseIsNaN\":101,\"./_strictIndexOf\":220}],96:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var argsTag=\"[object Arguments]\";\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}module.exports=baseIsArguments},{\"./_baseGetTag\":91,\"./isObjectLike\":252}],97:[function(require,module,exports){var baseIsEqualDeep=require(\"./_baseIsEqualDeep\"),isObjectLike=require(\"./isObjectLike\");\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack)}module.exports=baseIsEqual},{\"./_baseIsEqualDeep\":98,\"./isObjectLike\":252}],98:[function(require,module,exports){var Stack=require(\"./_Stack\"),equalArrays=require(\"./_equalArrays\"),equalByTag=require(\"./_equalByTag\"),equalObjects=require(\"./_equalObjects\"),getTag=require(\"./_getTag\"),isArray=require(\"./isArray\"),isBuffer=require(\"./isBuffer\"),isTypedArray=require(\"./isTypedArray\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1;\n/** `Object#toString` result references. */var argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",objectTag=\"[object Object]\";\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false}objIsArr=true;objIsObj=false}if(isSameTag&&!objIsObj){stack||(stack=new Stack);return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack)}if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,\"__wrapped__\"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,\"__wrapped__\");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack);return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag){return false}stack||(stack=new Stack);return equalObjects(object,other,bitmask,customizer,equalFunc,stack)}module.exports=baseIsEqualDeep},{\"./_Stack\":59,\"./_equalArrays\":154,\"./_equalByTag\":155,\"./_equalObjects\":156,\"./_getTag\":168,\"./isArray\":243,\"./isBuffer\":246,\"./isTypedArray\":257}],99:[function(require,module,exports){var getTag=require(\"./_getTag\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var mapTag=\"[object Map]\";\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}module.exports=baseIsMap},{\"./_getTag\":168,\"./isObjectLike\":252}],100:[function(require,module,exports){var Stack=require(\"./_Stack\"),baseIsEqual=require(\"./_baseIsEqual\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=Object(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false}}else{var stack=new Stack;if(customizer){var result=customizer(objValue,srcValue,key,object,source,stack)}if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result)){return false}}}return true}module.exports=baseIsMatch},{\"./_Stack\":59,\"./_baseIsEqual\":97}],101:[function(require,module,exports){\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value){return value!==value}module.exports=baseIsNaN},{}],102:[function(require,module,exports){var isFunction=require(\"./isFunction\"),isMasked=require(\"./_isMasked\"),isObject=require(\"./isObject\"),toSource=require(\"./_toSource\");\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */var reRegExpChar=/[\\\\^$.*+?()[\\]{}|]/g;\n/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\\[object .+?Constructor\\]$/;\n/** Used for built-in method references. */var funcProto=Function.prototype,objectProto=Object.prototype;\n/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/** Used to detect if a method is native. */var reIsNative=RegExp(\"^\"+funcToString.call(hasOwnProperty).replace(reRegExpChar,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}module.exports=baseIsNative},{\"./_isMasked\":185,\"./_toSource\":224,\"./isFunction\":248,\"./isObject\":251}],103:[function(require,module,exports){var getTag=require(\"./_getTag\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var setTag=\"[object Set]\";\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}module.exports=baseIsSet},{\"./_getTag\":168,\"./isObjectLike\":252}],104:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),isLength=require(\"./isLength\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\";var arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\";\n/** Used to identify `toStringTag` values of typed arrays. */var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}module.exports=baseIsTypedArray},{\"./_baseGetTag\":91,\"./isLength\":249,\"./isObjectLike\":252}],105:[function(require,module,exports){var baseMatches=require(\"./_baseMatches\"),baseMatchesProperty=require(\"./_baseMatchesProperty\"),identity=require(\"./identity\"),isArray=require(\"./isArray\"),property=require(\"./property\");\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */function baseIteratee(value){\n// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\nif(typeof value==\"function\"){return value}if(value==null){return identity}if(typeof value==\"object\"){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value)}return property(value)}module.exports=baseIteratee},{\"./_baseMatches\":110,\"./_baseMatchesProperty\":111,\"./identity\":241,\"./isArray\":243,\"./property\":272}],106:[function(require,module,exports){var isPrototype=require(\"./_isPrototype\"),nativeKeys=require(\"./_nativeKeys\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!=\"constructor\"){result.push(key)}}return result}module.exports=baseKeys},{\"./_isPrototype\":186,\"./_nativeKeys\":202}],107:[function(require,module,exports){var isObject=require(\"./isObject\"),isPrototype=require(\"./_isPrototype\"),nativeKeysIn=require(\"./_nativeKeysIn\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object)}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key==\"constructor\"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}module.exports=baseKeysIn},{\"./_isPrototype\":186,\"./_nativeKeysIn\":203,\"./isObject\":251}],108:[function(require,module,exports){\n/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value,other){return value<other}module.exports=baseLt},{}],109:[function(require,module,exports){var baseEach=require(\"./_baseEach\"),isArrayLike=require(\"./isArrayLike\");\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)});return result}module.exports=baseMap},{\"./_baseEach\":82,\"./isArrayLike\":244}],110:[function(require,module,exports){var baseIsMatch=require(\"./_baseIsMatch\"),getMatchData=require(\"./_getMatchData\"),matchesStrictComparable=require(\"./_matchesStrictComparable\");\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1])}return function(object){return object===source||baseIsMatch(object,source,matchData)}}module.exports=baseMatches},{\"./_baseIsMatch\":100,\"./_getMatchData\":162,\"./_matchesStrictComparable\":199}],111:[function(require,module,exports){var baseIsEqual=require(\"./_baseIsEqual\"),get=require(\"./get\"),hasIn=require(\"./hasIn\"),isKey=require(\"./_isKey\"),isStrictComparable=require(\"./_isStrictComparable\"),matchesStrictComparable=require(\"./_matchesStrictComparable\"),toKey=require(\"./_toKey\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue)}return function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}module.exports=baseMatchesProperty},{\"./_baseIsEqual\":97,\"./_isKey\":183,\"./_isStrictComparable\":187,\"./_matchesStrictComparable\":199,\"./_toKey\":223,\"./get\":238,\"./hasIn\":240}],112:[function(require,module,exports){var Stack=require(\"./_Stack\"),assignMergeValue=require(\"./_assignMergeValue\"),baseFor=require(\"./_baseFor\"),baseMergeDeep=require(\"./_baseMergeDeep\"),isObject=require(\"./isObject\"),keysIn=require(\"./keysIn\"),safeGet=require(\"./_safeGet\");\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return}baseFor(source,function(srcValue,key){stack||(stack=new Stack);if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack)}else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+\"\",object,source,stack):undefined;if(newValue===undefined){newValue=srcValue}assignMergeValue(object,key,newValue)}},keysIn)}module.exports=baseMerge},{\"./_Stack\":59,\"./_assignMergeValue\":74,\"./_baseFor\":87,\"./_baseMergeDeep\":113,\"./_safeGet\":209,\"./isObject\":251,\"./keysIn\":260}],113:[function(require,module,exports){var assignMergeValue=require(\"./_assignMergeValue\"),cloneBuffer=require(\"./_cloneBuffer\"),cloneTypedArray=require(\"./_cloneTypedArray\"),copyArray=require(\"./_copyArray\"),initCloneObject=require(\"./_initCloneObject\"),isArguments=require(\"./isArguments\"),isArray=require(\"./isArray\"),isArrayLikeObject=require(\"./isArrayLikeObject\"),isBuffer=require(\"./isBuffer\"),isFunction=require(\"./isFunction\"),isObject=require(\"./isObject\"),isPlainObject=require(\"./isPlainObject\"),isTypedArray=require(\"./isTypedArray\"),safeGet=require(\"./_safeGet\"),toPlainObject=require(\"./toPlainObject\");\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return}var newValue=customizer?customizer(objValue,srcValue,key+\"\",object,source,stack):undefined;var isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue)}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true)}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true)}else{newValue=[]}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue)}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue)}}else{isCommon=false}}if(isCommon){\n// Recursively merge objects and arrays (susceptible to call stack limits).\nstack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack[\"delete\"](srcValue)}assignMergeValue(object,key,newValue)}module.exports=baseMergeDeep},{\"./_assignMergeValue\":74,\"./_cloneBuffer\":135,\"./_cloneTypedArray\":139,\"./_copyArray\":142,\"./_initCloneObject\":179,\"./_safeGet\":209,\"./isArguments\":242,\"./isArray\":243,\"./isArrayLikeObject\":245,\"./isBuffer\":246,\"./isFunction\":248,\"./isObject\":251,\"./isPlainObject\":253,\"./isTypedArray\":257,\"./toPlainObject\":282}],114:[function(require,module,exports){var arrayMap=require(\"./_arrayMap\"),baseIteratee=require(\"./_baseIteratee\"),baseMap=require(\"./_baseMap\"),baseSortBy=require(\"./_baseSortBy\"),baseUnary=require(\"./_baseUnary\"),compareMultiple=require(\"./_compareMultiple\"),identity=require(\"./identity\");\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */function baseOrderBy(collection,iteratees,orders){var index=-1;iteratees=arrayMap(iteratees.length?iteratees:[identity],baseUnary(baseIteratee));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}module.exports=baseOrderBy},{\"./_arrayMap\":69,\"./_baseIteratee\":105,\"./_baseMap\":109,\"./_baseSortBy\":124,\"./_baseUnary\":127,\"./_compareMultiple\":141,\"./identity\":241}],115:[function(require,module,exports){var basePickBy=require(\"./_basePickBy\"),hasIn=require(\"./hasIn\");\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path)})}module.exports=basePick},{\"./_basePickBy\":116,\"./hasIn\":240}],116:[function(require,module,exports){var baseGet=require(\"./_baseGet\"),baseSet=require(\"./_baseSet\"),castPath=require(\"./_castPath\");\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value)}}return result}module.exports=basePickBy},{\"./_baseGet\":89,\"./_baseSet\":122,\"./_castPath\":133}],117:[function(require,module,exports){\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key){return function(object){return object==null?undefined:object[key]}}module.exports=baseProperty},{}],118:[function(require,module,exports){var baseGet=require(\"./_baseGet\");\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */function basePropertyDeep(path){return function(object){return baseGet(object,path)}}module.exports=basePropertyDeep},{\"./_baseGet\":89}],119:[function(require,module,exports){\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil=Math.ceil,nativeMax=Math.max;\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(length--){result[fromRight?length:++index]=start;start+=step}return result}module.exports=baseRange},{}],120:[function(require,module,exports){\n/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index,collection)});return accumulator}module.exports=baseReduce},{}],121:[function(require,module,exports){var identity=require(\"./identity\"),overRest=require(\"./_overRest\"),setToString=require(\"./_setToString\");\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */function baseRest(func,start){return setToString(overRest(func,start,identity),func+\"\")}module.exports=baseRest},{\"./_overRest\":207,\"./_setToString\":213,\"./identity\":241}],122:[function(require,module,exports){var assignValue=require(\"./_assignValue\"),castPath=require(\"./_castPath\"),isIndex=require(\"./_isIndex\"),isObject=require(\"./isObject\"),toKey=require(\"./_toKey\");\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */function baseSet(object,path,value,customizer){if(!isObject(object)){return object}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined;if(newValue===undefined){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{}}}assignValue(nested,key,newValue);nested=nested[key]}return object}module.exports=baseSet},{\"./_assignValue\":75,\"./_castPath\":133,\"./_isIndex\":181,\"./_toKey\":223,\"./isObject\":251}],123:[function(require,module,exports){var constant=require(\"./constant\"),defineProperty=require(\"./_defineProperty\"),identity=require(\"./identity\");\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,\"toString\",{configurable:true,enumerable:false,value:constant(string),writable:true})};module.exports=baseSetToString},{\"./_defineProperty\":153,\"./constant\":228,\"./identity\":241}],124:[function(require,module,exports){\n/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}module.exports=baseSortBy},{}],125:[function(require,module,exports){\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}module.exports=baseTimes},{}],126:[function(require,module,exports){var Symbol=require(\"./_Symbol\"),arrayMap=require(\"./_arrayMap\"),isArray=require(\"./isArray\"),isSymbol=require(\"./isSymbol\");\n/** Used as references for various `Number` constants. */var INFINITY=1/0;\n/** Used to convert symbols to primitives and strings. */var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */function baseToString(value){\n// Exit early for strings to avoid a performance hit in some environments.\nif(typeof value==\"string\"){return value}if(isArray(value)){\n// Recursively convert values (susceptible to call stack limits).\nreturn arrayMap(value,baseToString)+\"\"}if(isSymbol(value)){return symbolToString?symbolToString.call(value):\"\"}var result=value+\"\";return result==\"0\"&&1/value==-INFINITY?\"-0\":result}module.exports=baseToString},{\"./_Symbol\":60,\"./_arrayMap\":69,\"./isArray\":243,\"./isSymbol\":256}],127:[function(require,module,exports){\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func){return function(value){return func(value)}}module.exports=baseUnary},{}],128:[function(require,module,exports){var SetCache=require(\"./_SetCache\"),arrayIncludes=require(\"./_arrayIncludes\"),arrayIncludesWith=require(\"./_arrayIncludesWith\"),cacheHas=require(\"./_cacheHas\"),createSet=require(\"./_createSet\"),setToArray=require(\"./_setToArray\");\n/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=true,result=[],seen=result;if(comparator){isCommon=false;includes=arrayIncludesWith}else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set)}isCommon=false;includes=cacheHas;seen=new SetCache}else{seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(!includes(seen,computed,comparator)){if(seen!==result){seen.push(computed)}result.push(value)}}return result}module.exports=baseUniq},{\"./_SetCache\":58,\"./_arrayIncludes\":66,\"./_arrayIncludesWith\":67,\"./_cacheHas\":131,\"./_createSet\":152,\"./_setToArray\":212}],129:[function(require,module,exports){var arrayMap=require(\"./_arrayMap\");\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */function baseValues(object,props){return arrayMap(props,function(key){return object[key]})}module.exports=baseValues},{\"./_arrayMap\":69}],130:[function(require,module,exports){\n/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props,values,assignFunc){var index=-1,length=props.length,valsLength=values.length,result={};while(++index<length){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}module.exports=baseZipObject},{}],131:[function(require,module,exports){\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache,key){return cache.has(key)}module.exports=cacheHas},{}],132:[function(require,module,exports){var identity=require(\"./identity\");\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */function castFunction(value){return typeof value==\"function\"?value:identity}module.exports=castFunction},{\"./identity\":241}],133:[function(require,module,exports){var isArray=require(\"./isArray\"),isKey=require(\"./_isKey\"),stringToPath=require(\"./_stringToPath\"),toString=require(\"./toString\");\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}module.exports=castPath},{\"./_isKey\":183,\"./_stringToPath\":222,\"./isArray\":243,\"./toString\":283}],134:[function(require,module,exports){var Uint8Array=require(\"./_Uint8Array\");\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}module.exports=cloneArrayBuffer},{\"./_Uint8Array\":61}],135:[function(require,module,exports){var root=require(\"./_root\");\n/** Detect free variable `exports`. */var freeExports=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;\n/** Detect free variable `module`. */var freeModule=freeExports&&typeof module==\"object\"&&module&&!module.nodeType&&module;\n/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;\n/** Built-in value references. */var Buffer=moduleExports?root.Buffer:undefined,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined;\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result}module.exports=cloneBuffer},{\"./_root\":208}],136:[function(require,module,exports){var cloneArrayBuffer=require(\"./_cloneArrayBuffer\");\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}module.exports=cloneDataView},{\"./_cloneArrayBuffer\":134}],137:[function(require,module,exports){\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags=/\\w*$/;\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}module.exports=cloneRegExp},{}],138:[function(require,module,exports){var Symbol=require(\"./_Symbol\");\n/** Used to convert symbols to primitives and strings. */var symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}module.exports=cloneSymbol},{\"./_Symbol\":60}],139:[function(require,module,exports){var cloneArrayBuffer=require(\"./_cloneArrayBuffer\");\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}module.exports=cloneTypedArray},{\"./_cloneArrayBuffer\":134}],140:[function(require,module,exports){var isSymbol=require(\"./isSymbol\");\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=value===null,valIsReflexive=value===value,valIsSymbol=isSymbol(value);var othIsDefined=other!==undefined,othIsNull=other===null,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive){return 1}if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive){return-1}}return 0}module.exports=compareAscending},{\"./isSymbol\":256}],141:[function(require,module,exports){var compareAscending=require(\"./_compareAscending\");\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result}var order=orders[index];return result*(order==\"desc\"?-1:1)}}\n// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n// that causes it, under certain circumstances, to provide the same value for\n// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n// for more details.\n//\n// This also ensures a stable sort in V8 and other engines.\n// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\nreturn object.index-other.index}module.exports=compareMultiple},{\"./_compareAscending\":140}],142:[function(require,module,exports){\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}module.exports=copyArray},{}],143:[function(require,module,exports){var assignValue=require(\"./_assignValue\"),baseAssignValue=require(\"./_baseAssignValue\");\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;if(newValue===undefined){newValue=source[key]}if(isNew){baseAssignValue(object,key,newValue)}else{assignValue(object,key,newValue)}}return object}module.exports=copyObject},{\"./_assignValue\":75,\"./_baseAssignValue\":79}],144:[function(require,module,exports){var copyObject=require(\"./_copyObject\"),getSymbols=require(\"./_getSymbols\");\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}module.exports=copySymbols},{\"./_copyObject\":143,\"./_getSymbols\":166}],145:[function(require,module,exports){var copyObject=require(\"./_copyObject\"),getSymbolsIn=require(\"./_getSymbolsIn\");\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}module.exports=copySymbolsIn},{\"./_copyObject\":143,\"./_getSymbolsIn\":167}],146:[function(require,module,exports){var root=require(\"./_root\");\n/** Used to detect overreaching core-js shims. */var coreJsData=root[\"__core-js_shared__\"];module.exports=coreJsData},{\"./_root\":208}],147:[function(require,module,exports){var baseRest=require(\"./_baseRest\"),isIterateeCall=require(\"./_isIterateeCall\");\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;customizer=assigner.length>3&&typeof customizer==\"function\"?(length--,customizer):undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer)}}return object})}module.exports=createAssigner},{\"./_baseRest\":121,\"./_isIterateeCall\":182}],148:[function(require,module,exports){var isArrayLike=require(\"./isArrayLike\");\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection}if(!isArrayLike(collection)){return eachFunc(collection,iteratee)}var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}module.exports=createBaseEach},{\"./isArrayLike\":244}],149:[function(require,module,exports){\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}module.exports=createBaseFor},{}],150:[function(require,module,exports){var baseIteratee=require(\"./_baseIteratee\"),isArrayLike=require(\"./isArrayLike\"),keys=require(\"./keys\");\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=baseIteratee(predicate,3);collection=keys(collection);predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined}}module.exports=createFind},{\"./_baseIteratee\":105,\"./isArrayLike\":244,\"./keys\":259}],151:[function(require,module,exports){var baseRange=require(\"./_baseRange\"),isIterateeCall=require(\"./_isIterateeCall\"),toFinite=require(\"./toFinite\");\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */function createRange(fromRight){return function(start,end,step){if(step&&typeof step!=\"number\"&&isIterateeCall(start,end,step)){end=step=undefined}\n// Ensure the sign of `-0` is preserved.\nstart=toFinite(start);if(end===undefined){end=start;start=0}else{end=toFinite(end)}step=step===undefined?start<end?1:-1:toFinite(step);return baseRange(start,end,step,fromRight)}}module.exports=createRange},{\"./_baseRange\":119,\"./_isIterateeCall\":182,\"./toFinite\":279}],152:[function(require,module,exports){var Set=require(\"./_Set\"),noop=require(\"./noop\"),setToArray=require(\"./_setToArray\");\n/** Used as references for various `Number` constants. */var INFINITY=1/0;\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */var createSet=!(Set&&1/setToArray(new Set([,-0]))[1]==INFINITY)?noop:function(values){return new Set(values)};module.exports=createSet},{\"./_Set\":57,\"./_setToArray\":212,\"./noop\":269}],153:[function(require,module,exports){var getNative=require(\"./_getNative\");var defineProperty=function(){try{var func=getNative(Object,\"defineProperty\");func({},\"\",{});return func}catch(e){}}();module.exports=defineProperty},{\"./_getNative\":163}],154:[function(require,module,exports){var SetCache=require(\"./_SetCache\"),arraySome=require(\"./_arraySome\"),cacheHas=require(\"./_cacheHas\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false}\n// Assume cyclic values are equal.\nvar stacked=stack.get(array);if(stacked&&stack.get(other)){return stacked==other}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined;stack.set(array,other);stack.set(other,array);\n// Ignore non-index properties.\nwhile(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack)}if(compared!==undefined){if(compared){continue}result=false;break}\n// Recursively compare arrays (susceptible to call stack limits).\nif(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){return seen.push(othIndex)}})){result=false;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break}}stack[\"delete\"](array);stack[\"delete\"](other);return result}module.exports=equalArrays},{\"./_SetCache\":58,\"./_arraySome\":72,\"./_cacheHas\":131}],155:[function(require,module,exports){var Symbol=require(\"./_Symbol\"),Uint8Array=require(\"./_Uint8Array\"),eq=require(\"./eq\"),equalArrays=require(\"./_equalArrays\"),mapToArray=require(\"./_mapToArray\"),setToArray=require(\"./_setToArray\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;\n/** `Object#toString` result references. */var boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",symbolTag=\"[object Symbol]\";var arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\";\n/** Used to convert symbols to primitives and strings. */var symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false}return true;case boolTag:case dateTag:case numberTag:\n// Coerce booleans to `1` or `0` and dates to milliseconds.\n// Invalid dates are coerced to `NaN`.\nreturn eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:\n// Coerce regexes to strings and treat strings, primitives and objects,\n// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n// for more details.\nreturn object==other+\"\";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false}\n// Assume cyclic values are equal.\nvar stacked=stack.get(object);if(stacked){return stacked==other}bitmask|=COMPARE_UNORDERED_FLAG;\n// Recursively compare objects (susceptible to call stack limits).\nstack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack[\"delete\"](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other)}}return false}module.exports=equalByTag},{\"./_Symbol\":60,\"./_Uint8Array\":61,\"./_equalArrays\":154,\"./_mapToArray\":198,\"./_setToArray\":212,\"./eq\":231}],156:[function(require,module,exports){var getAllKeys=require(\"./_getAllKeys\");\n/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1;\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key))){return false}}\n// Assume cyclic values are equal.\nvar stacked=stack.get(object);if(stacked&&stack.get(other)){return stacked==other}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack)}\n// Recursively compare objects (susceptible to call stack limits).\nif(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break}skipCtor||(skipCtor=key==\"constructor\")}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;\n// Non `Object` object instances with different constructors are not equal.\nif(objCtor!=othCtor&&(\"constructor\"in object&&\"constructor\"in other)&&!(typeof objCtor==\"function\"&&objCtor instanceof objCtor&&typeof othCtor==\"function\"&&othCtor instanceof othCtor)){result=false}}stack[\"delete\"](object);stack[\"delete\"](other);return result}module.exports=equalObjects},{\"./_getAllKeys\":159}],157:[function(require,module,exports){var flatten=require(\"./flatten\"),overRest=require(\"./_overRest\"),setToString=require(\"./_setToString\");\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */function flatRest(func){return setToString(overRest(func,undefined,flatten),func+\"\")}module.exports=flatRest},{\"./_overRest\":207,\"./_setToString\":213,\"./flatten\":235}],158:[function(require,module,exports){(function(global){\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal=typeof global==\"object\"&&global&&global.Object===Object&&global;module.exports=freeGlobal}).call(this,typeof global!==\"undefined\"?global:typeof self!==\"undefined\"?self:typeof window!==\"undefined\"?window:{})},{}],159:[function(require,module,exports){var baseGetAllKeys=require(\"./_baseGetAllKeys\"),getSymbols=require(\"./_getSymbols\"),keys=require(\"./keys\");\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}module.exports=getAllKeys},{\"./_baseGetAllKeys\":90,\"./_getSymbols\":166,\"./keys\":259}],160:[function(require,module,exports){var baseGetAllKeys=require(\"./_baseGetAllKeys\"),getSymbolsIn=require(\"./_getSymbolsIn\"),keysIn=require(\"./keysIn\");\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}module.exports=getAllKeysIn},{\"./_baseGetAllKeys\":90,\"./_getSymbolsIn\":167,\"./keysIn\":260}],161:[function(require,module,exports){var isKeyable=require(\"./_isKeyable\");\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key==\"string\"?\"string\":\"hash\"]:data.map}module.exports=getMapData},{\"./_isKeyable\":184}],162:[function(require,module,exports){var isStrictComparable=require(\"./_isStrictComparable\"),keys=require(\"./keys\");\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}module.exports=getMatchData},{\"./_isStrictComparable\":187,\"./keys\":259}],163:[function(require,module,exports){var baseIsNative=require(\"./_baseIsNative\"),getValue=require(\"./_getValue\");\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}module.exports=getNative},{\"./_baseIsNative\":102,\"./_getValue\":169}],164:[function(require,module,exports){var overArg=require(\"./_overArg\");\n/** Built-in value references. */var getPrototype=overArg(Object.getPrototypeOf,Object);module.exports=getPrototype},{\"./_overArg\":206}],165:[function(require,module,exports){var Symbol=require(\"./_Symbol\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */var nativeObjectToString=objectProto.toString;\n/** Built-in value references. */var symToStringTag=Symbol?Symbol.toStringTag:undefined;\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}module.exports=getRawTag},{\"./_Symbol\":60}],166:[function(require,module,exports){var arrayFilter=require(\"./_arrayFilter\"),stubArray=require(\"./stubArray\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Built-in value references. */var propertyIsEnumerable=objectProto.propertyIsEnumerable;\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeGetSymbols=Object.getOwnPropertySymbols;\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */var getSymbols=!nativeGetSymbols?stubArray:function(object){if(object==null){return[]}object=Object(object);return arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol)})};module.exports=getSymbols},{\"./_arrayFilter\":65,\"./stubArray\":277}],167:[function(require,module,exports){var arrayPush=require(\"./_arrayPush\"),getPrototype=require(\"./_getPrototype\"),getSymbols=require(\"./_getSymbols\"),stubArray=require(\"./stubArray\");\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeGetSymbols=Object.getOwnPropertySymbols;\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object)}return result};module.exports=getSymbolsIn},{\"./_arrayPush\":70,\"./_getPrototype\":164,\"./_getSymbols\":166,\"./stubArray\":277}],168:[function(require,module,exports){var DataView=require(\"./_DataView\"),Map=require(\"./_Map\"),Promise=require(\"./_Promise\"),Set=require(\"./_Set\"),WeakMap=require(\"./_WeakMap\"),baseGetTag=require(\"./_baseGetTag\"),toSource=require(\"./_toSource\");\n/** `Object#toString` result references. */var mapTag=\"[object Map]\",objectTag=\"[object Object]\",promiseTag=\"[object Promise]\",setTag=\"[object Set]\",weakMapTag=\"[object WeakMap]\";var dataViewTag=\"[object DataView]\";\n/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */var getTag=baseGetTag;\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):\"\";if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}}return result}}module.exports=getTag},{\"./_DataView\":51,\"./_Map\":54,\"./_Promise\":56,\"./_Set\":57,\"./_WeakMap\":62,\"./_baseGetTag\":91,\"./_toSource\":224}],169:[function(require,module,exports){\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object,key){return object==null?undefined:object[key]}module.exports=getValue},{}],170:[function(require,module,exports){var castPath=require(\"./_castPath\"),isArguments=require(\"./isArguments\"),isArray=require(\"./isArray\"),isIndex=require(\"./_isIndex\"),isLength=require(\"./isLength\"),toKey=require(\"./_toKey\");\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result||++index!=length){return result}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}module.exports=hasPath},{\"./_castPath\":133,\"./_isIndex\":181,\"./_toKey\":223,\"./isArguments\":242,\"./isArray\":243,\"./isLength\":249}],171:[function(require,module,exports){\n/** Used to compose unicode character classes. */\nvar rsAstralRange=\"\\\\ud800-\\\\udfff\",rsComboMarksRange=\"\\\\u0300-\\\\u036f\",reComboHalfMarksRange=\"\\\\ufe20-\\\\ufe2f\",rsComboSymbolsRange=\"\\\\u20d0-\\\\u20ff\",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange=\"\\\\ufe0e\\\\ufe0f\";\n/** Used to compose unicode capture groups. */var rsZWJ=\"\\\\u200d\";\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */var reHasUnicode=RegExp(\"[\"+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+\"]\");\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */function hasUnicode(string){return reHasUnicode.test(string)}module.exports=hasUnicode},{}],172:[function(require,module,exports){var nativeCreate=require(\"./_nativeCreate\");\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}module.exports=hashClear},{\"./_nativeCreate\":201}],173:[function(require,module,exports){\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}module.exports=hashDelete},{}],174:[function(require,module,exports){var nativeCreate=require(\"./_nativeCreate\");\n/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED=\"__lodash_hash_undefined__\";\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}module.exports=hashGet},{\"./_nativeCreate\":201}],175:[function(require,module,exports){var nativeCreate=require(\"./_nativeCreate\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}module.exports=hashHas},{\"./_nativeCreate\":201}],176:[function(require,module,exports){var nativeCreate=require(\"./_nativeCreate\");\n/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED=\"__lodash_hash_undefined__\";\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}module.exports=hashSet},{\"./_nativeCreate\":201}],177:[function(require,module,exports){\n/** Used for built-in method references. */\nvar objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */function initCloneArray(array){var length=array.length,result=new array.constructor(length);\n// Add properties assigned by `RegExp#exec`.\nif(length&&typeof array[0]==\"string\"&&hasOwnProperty.call(array,\"index\")){result.index=array.index;result.input=array.input}return result}module.exports=initCloneArray},{}],178:[function(require,module,exports){var cloneArrayBuffer=require(\"./_cloneArrayBuffer\"),cloneDataView=require(\"./_cloneDataView\"),cloneRegExp=require(\"./_cloneRegExp\"),cloneSymbol=require(\"./_cloneSymbol\"),cloneTypedArray=require(\"./_cloneTypedArray\");\n/** `Object#toString` result references. */var boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",symbolTag=\"[object Symbol]\";var arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\";\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return new Ctor;case symbolTag:return cloneSymbol(object)}}module.exports=initCloneByTag},{\"./_cloneArrayBuffer\":134,\"./_cloneDataView\":136,\"./_cloneRegExp\":137,\"./_cloneSymbol\":138,\"./_cloneTypedArray\":139}],179:[function(require,module,exports){var baseCreate=require(\"./_baseCreate\"),getPrototype=require(\"./_getPrototype\"),isPrototype=require(\"./_isPrototype\");\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */function initCloneObject(object){return typeof object.constructor==\"function\"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}module.exports=initCloneObject},{\"./_baseCreate\":81,\"./_getPrototype\":164,\"./_isPrototype\":186}],180:[function(require,module,exports){var Symbol=require(\"./_Symbol\"),isArguments=require(\"./isArguments\"),isArray=require(\"./isArray\");\n/** Built-in value references. */var spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined;\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}module.exports=isFlattenable},{\"./_Symbol\":60,\"./isArguments\":242,\"./isArray\":243}],181:[function(require,module,exports){\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER=9007199254740991;\n/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\\d*)$/;\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type==\"number\"||type!=\"symbol\"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}module.exports=isIndex},{}],182:[function(require,module,exports){var eq=require(\"./eq\"),isArrayLike=require(\"./isArrayLike\"),isIndex=require(\"./_isIndex\"),isObject=require(\"./isObject\");\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type==\"number\"?isArrayLike(object)&&isIndex(index,object.length):type==\"string\"&&index in object){return eq(object[index],value)}return false}module.exports=isIterateeCall},{\"./_isIndex\":181,\"./eq\":231,\"./isArrayLike\":244,\"./isObject\":251}],183:[function(require,module,exports){var isArray=require(\"./isArray\"),isSymbol=require(\"./isSymbol\");\n/** Used to match property names within property paths. */var reIsDeepProp=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,reIsPlainProp=/^\\w*$/;\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type==\"number\"||type==\"symbol\"||type==\"boolean\"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}module.exports=isKey},{\"./isArray\":243,\"./isSymbol\":256}],184:[function(require,module,exports){\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value){var type=typeof value;return type==\"string\"||type==\"number\"||type==\"symbol\"||type==\"boolean\"?value!==\"__proto__\":value===null}module.exports=isKeyable},{}],185:[function(require,module,exports){var coreJsData=require(\"./_coreJsData\");\n/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||\"\");return uid?\"Symbol(src)_1.\"+uid:\"\"}();\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}module.exports=isMasked},{\"./_coreJsData\":146}],186:[function(require,module,exports){\n/** Used for built-in method references. */\nvar objectProto=Object.prototype;\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor==\"function\"&&Ctor.prototype||objectProto;return value===proto}module.exports=isPrototype},{}],187:[function(require,module,exports){var isObject=require(\"./isObject\");\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */function isStrictComparable(value){return value===value&&!isObject(value)}module.exports=isStrictComparable},{\"./isObject\":251}],188:[function(require,module,exports){\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear(){this.__data__=[];this.size=0}module.exports=listCacheClear},{}],189:[function(require,module,exports){var assocIndexOf=require(\"./_assocIndexOf\");\n/** Used for built-in method references. */var arrayProto=Array.prototype;\n/** Built-in value references. */var splice=arrayProto.splice;\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}module.exports=listCacheDelete},{\"./_assocIndexOf\":76}],190:[function(require,module,exports){var assocIndexOf=require(\"./_assocIndexOf\");\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}module.exports=listCacheGet},{\"./_assocIndexOf\":76}],191:[function(require,module,exports){var assocIndexOf=require(\"./_assocIndexOf\");\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}module.exports=listCacheHas},{\"./_assocIndexOf\":76}],192:[function(require,module,exports){var assocIndexOf=require(\"./_assocIndexOf\");\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}module.exports=listCacheSet},{\"./_assocIndexOf\":76}],193:[function(require,module,exports){var Hash=require(\"./_Hash\"),ListCache=require(\"./_ListCache\"),Map=require(\"./_Map\");\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}module.exports=mapCacheClear},{\"./_Hash\":52,\"./_ListCache\":53,\"./_Map\":54}],194:[function(require,module,exports){var getMapData=require(\"./_getMapData\");\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */function mapCacheDelete(key){var result=getMapData(this,key)[\"delete\"](key);this.size-=result?1:0;return result}module.exports=mapCacheDelete},{\"./_getMapData\":161}],195:[function(require,module,exports){var getMapData=require(\"./_getMapData\");\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */function mapCacheGet(key){return getMapData(this,key).get(key)}module.exports=mapCacheGet},{\"./_getMapData\":161}],196:[function(require,module,exports){var getMapData=require(\"./_getMapData\");\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */function mapCacheHas(key){return getMapData(this,key).has(key)}module.exports=mapCacheHas},{\"./_getMapData\":161}],197:[function(require,module,exports){var getMapData=require(\"./_getMapData\");\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}module.exports=mapCacheSet},{\"./_getMapData\":161}],198:[function(require,module,exports){\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value]});return result}module.exports=mapToArray},{}],199:[function(require,module,exports){\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false}return object[key]===srcValue&&(srcValue!==undefined||key in Object(object))}}module.exports=matchesStrictComparable},{}],200:[function(require,module,exports){var memoize=require(\"./memoize\");\n/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */function memoizeCapped(func){var result=memoize(func,function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key});var cache=result.cache;return result}module.exports=memoizeCapped},{\"./memoize\":265}],201:[function(require,module,exports){var getNative=require(\"./_getNative\");\n/* Built-in method references that are verified to be native. */var nativeCreate=getNative(Object,\"create\");module.exports=nativeCreate},{\"./_getNative\":163}],202:[function(require,module,exports){var overArg=require(\"./_overArg\");\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeKeys=overArg(Object.keys,Object);module.exports=nativeKeys},{\"./_overArg\":206}],203:[function(require,module,exports){\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key)}}return result}module.exports=nativeKeysIn},{}],204:[function(require,module,exports){var freeGlobal=require(\"./_freeGlobal\");\n/** Detect free variable `exports`. */var freeExports=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;\n/** Detect free variable `module`. */var freeModule=freeExports&&typeof module==\"object\"&&module&&!module.nodeType&&module;\n/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;\n/** Detect free variable `process` from Node.js. */var freeProcess=moduleExports&&freeGlobal.process;\n/** Used to access faster Node.js helpers. */var nodeUtil=function(){try{\n// Use `util.types` for Node.js 10+.\nvar types=freeModule&&freeModule.require&&freeModule.require(\"util\").types;if(types){return types}\n// Legacy `process.binding('util')` for Node.js < 10.\nreturn freeProcess&&freeProcess.binding&&freeProcess.binding(\"util\")}catch(e){}}();module.exports=nodeUtil},{\"./_freeGlobal\":158}],205:[function(require,module,exports){\n/** Used for built-in method references. */\nvar objectProto=Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */var nativeObjectToString=objectProto.toString;\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */function objectToString(value){return nativeObjectToString.call(value)}module.exports=objectToString},{}],206:[function(require,module,exports){\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func,transform){return function(arg){return func(transform(arg))}}module.exports=overArg},{}],207:[function(require,module,exports){var apply=require(\"./_apply\");\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeMax=Math.max;\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */function overRest(func,start,transform){start=nativeMax(start===undefined?func.length-1:start,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);while(++index<length){array[index]=args[start+index]}index=-1;var otherArgs=Array(start+1);while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=transform(array);return apply(func,this,otherArgs)}}module.exports=overRest},{\"./_apply\":63}],208:[function(require,module,exports){var freeGlobal=require(\"./_freeGlobal\");\n/** Detect free variable `self`. */var freeSelf=typeof self==\"object\"&&self&&self.Object===Object&&self;\n/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function(\"return this\")();module.exports=root},{\"./_freeGlobal\":158}],209:[function(require,module,exports){\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object,key){if(key===\"constructor\"&&typeof object[key]===\"function\"){return}if(key==\"__proto__\"){return}return object[key]}module.exports=safeGet},{}],210:[function(require,module,exports){\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED=\"__lodash_hash_undefined__\";\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this}module.exports=setCacheAdd},{}],211:[function(require,module,exports){\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value){return this.__data__.has(value)}module.exports=setCacheHas},{}],212:[function(require,module,exports){\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value});return result}module.exports=setToArray},{}],213:[function(require,module,exports){var baseSetToString=require(\"./_baseSetToString\"),shortOut=require(\"./_shortOut\");\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */var setToString=shortOut(baseSetToString);module.exports=setToString},{\"./_baseSetToString\":123,\"./_shortOut\":214}],214:[function(require,module,exports){\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT=800,HOT_SPAN=16;\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeNow=Date.now;\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(undefined,arguments)}}module.exports=shortOut},{}],215:[function(require,module,exports){var ListCache=require(\"./_ListCache\");\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */function stackClear(){this.__data__=new ListCache;this.size=0}module.exports=stackClear},{\"./_ListCache\":53}],216:[function(require,module,exports){\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key){var data=this.__data__,result=data[\"delete\"](key);this.size=data.size;return result}module.exports=stackDelete},{}],217:[function(require,module,exports){\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key){return this.__data__.get(key)}module.exports=stackGet},{}],218:[function(require,module,exports){\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key){return this.__data__.has(key)}module.exports=stackHas},{}],219:[function(require,module,exports){var ListCache=require(\"./_ListCache\"),Map=require(\"./_Map\"),MapCache=require(\"./_MapCache\");\n/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this}data=this.__data__=new MapCache(pairs)}data.set(key,value);this.size=data.size;return this}module.exports=stackSet},{\"./_ListCache\":53,\"./_Map\":54,\"./_MapCache\":55}],220:[function(require,module,exports){\n/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}module.exports=strictIndexOf},{}],221:[function(require,module,exports){var asciiSize=require(\"./_asciiSize\"),hasUnicode=require(\"./_hasUnicode\"),unicodeSize=require(\"./_unicodeSize\");\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string)}module.exports=stringSize},{\"./_asciiSize\":73,\"./_hasUnicode\":171,\"./_unicodeSize\":225}],222:[function(require,module,exports){var memoizeCapped=require(\"./_memoizeCapped\");\n/** Used to match property names within property paths. */var rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n/** Used to match backslashes in property paths. */var reEscapeChar=/\\\\(\\\\)?/g;\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46/* . */){result.push(\"\")}string.replace(rePropName,function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,\"$1\"):number||match)});return result});module.exports=stringToPath},{\"./_memoizeCapped\":200}],223:[function(require,module,exports){var isSymbol=require(\"./isSymbol\");\n/** Used as references for various `Number` constants. */var INFINITY=1/0;\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */function toKey(value){if(typeof value==\"string\"||isSymbol(value)){return value}var result=value+\"\";return result==\"0\"&&1/value==-INFINITY?\"-0\":result}module.exports=toKey},{\"./isSymbol\":256}],224:[function(require,module,exports){\n/** Used for built-in method references. */\nvar funcProto=Function.prototype;\n/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+\"\"}catch(e){}}return\"\"}module.exports=toSource},{}],225:[function(require,module,exports){\n/** Used to compose unicode character classes. */\nvar rsAstralRange=\"\\\\ud800-\\\\udfff\",rsComboMarksRange=\"\\\\u0300-\\\\u036f\",reComboHalfMarksRange=\"\\\\ufe20-\\\\ufe2f\",rsComboSymbolsRange=\"\\\\u20d0-\\\\u20ff\",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange=\"\\\\ufe0e\\\\ufe0f\";\n/** Used to compose unicode capture groups. */var rsAstral=\"[\"+rsAstralRange+\"]\",rsCombo=\"[\"+rsComboRange+\"]\",rsFitz=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",rsModifier=\"(?:\"+rsCombo+\"|\"+rsFitz+\")\",rsNonAstral=\"[^\"+rsAstralRange+\"]\",rsRegional=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",rsSurrPair=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",rsZWJ=\"\\\\u200d\";\n/** Used to compose unicode regexes. */var reOptMod=rsModifier+\"?\",rsOptVar=\"[\"+rsVarRange+\"]?\",rsOptJoin=\"(?:\"+rsZWJ+\"(?:\"+[rsNonAstral,rsRegional,rsSurrPair].join(\"|\")+\")\"+rsOptVar+reOptMod+\")*\",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol=\"(?:\"+[rsNonAstral+rsCombo+\"?\",rsCombo,rsRegional,rsSurrPair,rsAstral].join(\"|\")+\")\";\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */var reUnicode=RegExp(rsFitz+\"(?=\"+rsFitz+\")|\"+rsSymbol+rsSeq,\"g\");\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */function unicodeSize(string){var result=reUnicode.lastIndex=0;while(reUnicode.test(string)){++result}return result}module.exports=unicodeSize},{}],226:[function(require,module,exports){var baseClone=require(\"./_baseClone\");\n/** Used to compose bitmasks for cloning. */var CLONE_SYMBOLS_FLAG=4;\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG)}module.exports=clone},{\"./_baseClone\":80}],227:[function(require,module,exports){var baseClone=require(\"./_baseClone\");\n/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}module.exports=cloneDeep},{\"./_baseClone\":80}],228:[function(require,module,exports){\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value){return function(){return value}}module.exports=constant},{}],229:[function(require,module,exports){var baseRest=require(\"./_baseRest\"),eq=require(\"./eq\"),isIterateeCall=require(\"./_isIterateeCall\"),keysIn=require(\"./keysIn\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1}while(++index<length){var source=sources[index];var props=keysIn(source);var propsIndex=-1;var propsLength=props.length;while(++propsIndex<propsLength){var key=props[propsIndex];var value=object[key];if(value===undefined||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key)){object[key]=source[key]}}}return object});module.exports=defaults},{\"./_baseRest\":121,\"./_isIterateeCall\":182,\"./eq\":231,\"./keysIn\":260}],230:[function(require,module,exports){module.exports=require(\"./forEach\")},{\"./forEach\":236}],231:[function(require,module,exports){\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value,other){return value===other||value!==value&&other!==other}module.exports=eq},{}],232:[function(require,module,exports){var arrayFilter=require(\"./_arrayFilter\"),baseFilter=require(\"./_baseFilter\"),baseIteratee=require(\"./_baseIteratee\"),isArray=require(\"./isArray\");\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,baseIteratee(predicate,3))}module.exports=filter},{\"./_arrayFilter\":65,\"./_baseFilter\":84,\"./_baseIteratee\":105,\"./isArray\":243}],233:[function(require,module,exports){var createFind=require(\"./_createFind\"),findIndex=require(\"./findIndex\");\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */var find=createFind(findIndex);module.exports=find},{\"./_createFind\":150,\"./findIndex\":234}],234:[function(require,module,exports){var baseFindIndex=require(\"./_baseFindIndex\"),baseIteratee=require(\"./_baseIteratee\"),toInteger=require(\"./toInteger\");\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeMax=Math.max;\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0)}return baseFindIndex(array,baseIteratee(predicate,3),index)}module.exports=findIndex},{\"./_baseFindIndex\":85,\"./_baseIteratee\":105,\"./toInteger\":280}],235:[function(require,module,exports){var baseFlatten=require(\"./_baseFlatten\");\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[]}module.exports=flatten},{\"./_baseFlatten\":86}],236:[function(require,module,exports){var arrayEach=require(\"./_arrayEach\"),baseEach=require(\"./_baseEach\"),castFunction=require(\"./_castFunction\"),isArray=require(\"./isArray\");\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,castFunction(iteratee))}module.exports=forEach},{\"./_arrayEach\":64,\"./_baseEach\":82,\"./_castFunction\":132,\"./isArray\":243}],237:[function(require,module,exports){var baseFor=require(\"./_baseFor\"),castFunction=require(\"./_castFunction\"),keysIn=require(\"./keysIn\");\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */function forIn(object,iteratee){return object==null?object:baseFor(object,castFunction(iteratee),keysIn)}module.exports=forIn},{\"./_baseFor\":87,\"./_castFunction\":132,\"./keysIn\":260}],238:[function(require,module,exports){var baseGet=require(\"./_baseGet\");\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,path);return result===undefined?defaultValue:result}module.exports=get},{\"./_baseGet\":89}],239:[function(require,module,exports){var baseHas=require(\"./_baseHas\"),hasPath=require(\"./_hasPath\");\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */function has(object,path){return object!=null&&hasPath(object,path,baseHas)}module.exports=has},{\"./_baseHas\":93,\"./_hasPath\":170}],240:[function(require,module,exports){var baseHasIn=require(\"./_baseHasIn\"),hasPath=require(\"./_hasPath\");\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn)}module.exports=hasIn},{\"./_baseHasIn\":94,\"./_hasPath\":170}],241:[function(require,module,exports){\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value){return value}module.exports=identity},{}],242:[function(require,module,exports){var baseIsArguments=require(\"./_baseIsArguments\"),isObjectLike=require(\"./isObjectLike\");\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/** Built-in value references. */var propertyIsEnumerable=objectProto.propertyIsEnumerable;\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,\"callee\")&&!propertyIsEnumerable.call(value,\"callee\")};module.exports=isArguments},{\"./_baseIsArguments\":96,\"./isObjectLike\":252}],243:[function(require,module,exports){\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray=Array.isArray;module.exports=isArray},{}],244:[function(require,module,exports){var isFunction=require(\"./isFunction\"),isLength=require(\"./isLength\");\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}module.exports=isArrayLike},{\"./isFunction\":248,\"./isLength\":249}],245:[function(require,module,exports){var isArrayLike=require(\"./isArrayLike\"),isObjectLike=require(\"./isObjectLike\");\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}module.exports=isArrayLikeObject},{\"./isArrayLike\":244,\"./isObjectLike\":252}],246:[function(require,module,exports){var root=require(\"./_root\"),stubFalse=require(\"./stubFalse\");\n/** Detect free variable `exports`. */var freeExports=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports;\n/** Detect free variable `module`. */var freeModule=freeExports&&typeof module==\"object\"&&module&&!module.nodeType&&module;\n/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;\n/** Built-in value references. */var Buffer=moduleExports?root.Buffer:undefined;\n/* Built-in method references for those with the same name as other `lodash` methods. */var nativeIsBuffer=Buffer?Buffer.isBuffer:undefined;\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */var isBuffer=nativeIsBuffer||stubFalse;module.exports=isBuffer},{\"./_root\":208,\"./stubFalse\":278}],247:[function(require,module,exports){var baseKeys=require(\"./_baseKeys\"),getTag=require(\"./_getTag\"),isArguments=require(\"./isArguments\"),isArray=require(\"./isArray\"),isArrayLike=require(\"./isArrayLike\"),isBuffer=require(\"./isBuffer\"),isPrototype=require(\"./_isPrototype\"),isTypedArray=require(\"./isTypedArray\");\n/** `Object#toString` result references. */var mapTag=\"[object Map]\",setTag=\"[object Set]\";\n/** Used for built-in method references. */var objectProto=Object.prototype;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||typeof value==\"string\"||typeof value.splice==\"function\"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size}if(isPrototype(value)){return!baseKeys(value).length}for(var key in value){if(hasOwnProperty.call(value,key)){return false}}return true}module.exports=isEmpty},{\"./_baseKeys\":106,\"./_getTag\":168,\"./_isPrototype\":186,\"./isArguments\":242,\"./isArray\":243,\"./isArrayLike\":244,\"./isBuffer\":246,\"./isTypedArray\":257}],248:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),isObject=require(\"./isObject\");\n/** `Object#toString` result references. */var asyncTag=\"[object AsyncFunction]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",proxyTag=\"[object Proxy]\";\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */function isFunction(value){if(!isObject(value)){return false}\n// The use of `Object#toString` avoids issues with the `typeof` operator\n// in Safari 9 which returns 'object' for typed arrays and other constructors.\nvar tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}module.exports=isFunction},{\"./_baseGetTag\":91,\"./isObject\":251}],249:[function(require,module,exports){\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER=9007199254740991;\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */function isLength(value){return typeof value==\"number\"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],250:[function(require,module,exports){var baseIsMap=require(\"./_baseIsMap\"),baseUnary=require(\"./_baseUnary\"),nodeUtil=require(\"./_nodeUtil\");\n/* Node.js helper references. */var nodeIsMap=nodeUtil&&nodeUtil.isMap;\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;module.exports=isMap},{\"./_baseIsMap\":99,\"./_baseUnary\":127,\"./_nodeUtil\":204}],251:[function(require,module,exports){\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value){var type=typeof value;return value!=null&&(type==\"object\"||type==\"function\")}module.exports=isObject},{}],252:[function(require,module,exports){\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value){return value!=null&&typeof value==\"object\"}module.exports=isObjectLike},{}],253:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),getPrototype=require(\"./_getPrototype\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var objectTag=\"[object Object]\";\n/** Used for built-in method references. */var funcProto=Function.prototype,objectProto=Object.prototype;\n/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;\n/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;\n/** Used to infer the `Object` constructor. */var objectCtorString=funcToString.call(Object);\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false}var proto=getPrototype(value);if(proto===null){return true}var Ctor=hasOwnProperty.call(proto,\"constructor\")&&proto.constructor;return typeof Ctor==\"function\"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}module.exports=isPlainObject},{\"./_baseGetTag\":91,\"./_getPrototype\":164,\"./isObjectLike\":252}],254:[function(require,module,exports){var baseIsSet=require(\"./_baseIsSet\"),baseUnary=require(\"./_baseUnary\"),nodeUtil=require(\"./_nodeUtil\");\n/* Node.js helper references. */var nodeIsSet=nodeUtil&&nodeUtil.isSet;\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;module.exports=isSet},{\"./_baseIsSet\":103,\"./_baseUnary\":127,\"./_nodeUtil\":204}],255:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),isArray=require(\"./isArray\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var stringTag=\"[object String]\";\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */function isString(value){return typeof value==\"string\"||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}module.exports=isString},{\"./_baseGetTag\":91,\"./isArray\":243,\"./isObjectLike\":252}],256:[function(require,module,exports){var baseGetTag=require(\"./_baseGetTag\"),isObjectLike=require(\"./isObjectLike\");\n/** `Object#toString` result references. */var symbolTag=\"[object Symbol]\";\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */function isSymbol(value){return typeof value==\"symbol\"||isObjectLike(value)&&baseGetTag(value)==symbolTag}module.exports=isSymbol},{\"./_baseGetTag\":91,\"./isObjectLike\":252}],257:[function(require,module,exports){var baseIsTypedArray=require(\"./_baseIsTypedArray\"),baseUnary=require(\"./_baseUnary\"),nodeUtil=require(\"./_nodeUtil\");\n/* Node.js helper references. */var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=isTypedArray},{\"./_baseIsTypedArray\":104,\"./_baseUnary\":127,\"./_nodeUtil\":204}],258:[function(require,module,exports){\n/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value){return value===undefined}module.exports=isUndefined},{}],259:[function(require,module,exports){var arrayLikeKeys=require(\"./_arrayLikeKeys\"),baseKeys=require(\"./_baseKeys\"),isArrayLike=require(\"./isArrayLike\");\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}module.exports=keys},{\"./_arrayLikeKeys\":68,\"./_baseKeys\":106,\"./isArrayLike\":244}],260:[function(require,module,exports){var arrayLikeKeys=require(\"./_arrayLikeKeys\"),baseKeysIn=require(\"./_baseKeysIn\"),isArrayLike=require(\"./isArrayLike\");\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object)}module.exports=keysIn},{\"./_arrayLikeKeys\":68,\"./_baseKeysIn\":107,\"./isArrayLike\":244}],261:[function(require,module,exports){\n/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array){var length=array==null?0:array.length;return length?array[length-1]:undefined}module.exports=last},{}],262:[function(require,module,exports){var arrayMap=require(\"./_arrayMap\"),baseIteratee=require(\"./_baseIteratee\"),baseMap=require(\"./_baseMap\"),isArray=require(\"./isArray\");\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee,3))}module.exports=map},{\"./_arrayMap\":69,\"./_baseIteratee\":105,\"./_baseMap\":109,\"./isArray\":243}],263:[function(require,module,exports){var baseAssignValue=require(\"./_baseAssignValue\"),baseForOwn=require(\"./_baseForOwn\"),baseIteratee=require(\"./_baseIteratee\");\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */function mapValues(object,iteratee){var result={};iteratee=baseIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object))});return result}module.exports=mapValues},{\"./_baseAssignValue\":79,\"./_baseForOwn\":88,\"./_baseIteratee\":105}],264:[function(require,module,exports){var baseExtremum=require(\"./_baseExtremum\"),baseGt=require(\"./_baseGt\"),identity=require(\"./identity\");\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined}module.exports=max},{\"./_baseExtremum\":83,\"./_baseGt\":92,\"./identity\":241}],265:[function(require,module,exports){var MapCache=require(\"./_MapCache\");\n/** Error message constants. */var FUNC_ERROR_TEXT=\"Expected a function\";\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */function memoize(func,resolver){if(typeof func!=\"function\"||resolver!=null&&typeof resolver!=\"function\"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}\n// Expose `MapCache`.\nmemoize.Cache=MapCache;module.exports=memoize},{\"./_MapCache\":55}],266:[function(require,module,exports){var baseMerge=require(\"./_baseMerge\"),createAssigner=require(\"./_createAssigner\");\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)});module.exports=merge},{\"./_baseMerge\":112,\"./_createAssigner\":147}],267:[function(require,module,exports){var baseExtremum=require(\"./_baseExtremum\"),baseLt=require(\"./_baseLt\"),identity=require(\"./identity\");\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined}module.exports=min},{\"./_baseExtremum\":83,\"./_baseLt\":108,\"./identity\":241}],268:[function(require,module,exports){var baseExtremum=require(\"./_baseExtremum\"),baseIteratee=require(\"./_baseIteratee\"),baseLt=require(\"./_baseLt\");\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */function minBy(array,iteratee){return array&&array.length?baseExtremum(array,baseIteratee(iteratee,2),baseLt):undefined}module.exports=minBy},{\"./_baseExtremum\":83,\"./_baseIteratee\":105,\"./_baseLt\":108}],269:[function(require,module,exports){\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop(){\n// No operation performed.\n}module.exports=noop},{}],270:[function(require,module,exports){var root=require(\"./_root\");\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */var now=function(){return root.Date.now()};module.exports=now},{\"./_root\":208}],271:[function(require,module,exports){var basePick=require(\"./_basePick\"),flatRest=require(\"./_flatRest\");\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */var pick=flatRest(function(object,paths){return object==null?{}:basePick(object,paths)});module.exports=pick},{\"./_basePick\":115,\"./_flatRest\":157}],272:[function(require,module,exports){var baseProperty=require(\"./_baseProperty\"),basePropertyDeep=require(\"./_basePropertyDeep\"),isKey=require(\"./_isKey\"),toKey=require(\"./_toKey\");\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}module.exports=property},{\"./_baseProperty\":117,\"./_basePropertyDeep\":118,\"./_isKey\":183,\"./_toKey\":223}],273:[function(require,module,exports){var createRange=require(\"./_createRange\");\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */var range=createRange();module.exports=range},{\"./_createRange\":151}],274:[function(require,module,exports){var arrayReduce=require(\"./_arrayReduce\"),baseEach=require(\"./_baseEach\"),baseIteratee=require(\"./_baseIteratee\"),baseReduce=require(\"./_baseReduce\"),isArray=require(\"./isArray\");\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,baseIteratee(iteratee,4),accumulator,initAccum,baseEach)}module.exports=reduce},{\"./_arrayReduce\":71,\"./_baseEach\":82,\"./_baseIteratee\":105,\"./_baseReduce\":120,\"./isArray\":243}],275:[function(require,module,exports){var baseKeys=require(\"./_baseKeys\"),getTag=require(\"./_getTag\"),isArrayLike=require(\"./isArrayLike\"),isString=require(\"./isString\"),stringSize=require(\"./_stringSize\");\n/** `Object#toString` result references. */var mapTag=\"[object Map]\",setTag=\"[object Set]\";\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */function size(collection){if(collection==null){return 0}if(isArrayLike(collection)){return isString(collection)?stringSize(collection):collection.length}var tag=getTag(collection);if(tag==mapTag||tag==setTag){return collection.size}return baseKeys(collection).length}module.exports=size},{\"./_baseKeys\":106,\"./_getTag\":168,\"./_stringSize\":221,\"./isArrayLike\":244,\"./isString\":255}],276:[function(require,module,exports){var baseFlatten=require(\"./_baseFlatten\"),baseOrderBy=require(\"./_baseOrderBy\"),baseRest=require(\"./_baseRest\"),isIterateeCall=require(\"./_isIterateeCall\");\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */var sortBy=baseRest(function(collection,iteratees){if(collection==null){return[]}var length=iteratees.length;if(length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])){iteratees=[]}else if(length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])){iteratees=[iteratees[0]]}return baseOrderBy(collection,baseFlatten(iteratees,1),[])});module.exports=sortBy},{\"./_baseFlatten\":86,\"./_baseOrderBy\":114,\"./_baseRest\":121,\"./_isIterateeCall\":182}],277:[function(require,module,exports){\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray(){return[]}module.exports=stubArray},{}],278:[function(require,module,exports){\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse(){return false}module.exports=stubFalse},{}],279:[function(require,module,exports){var toNumber=require(\"./toNumber\");\n/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_INTEGER=17976931348623157e292;\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */function toFinite(value){if(!value){return value===0?value:0}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===value?value:0}module.exports=toFinite},{\"./toNumber\":281}],280:[function(require,module,exports){var toFinite=require(\"./toFinite\");\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0}module.exports=toInteger},{\"./toFinite\":279}],281:[function(require,module,exports){var isObject=require(\"./isObject\"),isSymbol=require(\"./isSymbol\");\n/** Used as references for various `Number` constants. */var NAN=0/0;\n/** Used to match leading and trailing whitespace. */var reTrim=/^\\s+|\\s+$/g;\n/** Used to detect bad signed hexadecimal string values. */var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;\n/** Used to detect binary string values. */var reIsBinary=/^0b[01]+$/i;\n/** Used to detect octal string values. */var reIsOctal=/^0o[0-7]+$/i;\n/** Built-in method references without a dependency on `root`. */var freeParseInt=parseInt;\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */function toNumber(value){if(typeof value==\"number\"){return value}if(isSymbol(value)){return NAN}if(isObject(value)){var other=typeof value.valueOf==\"function\"?value.valueOf():value;value=isObject(other)?other+\"\":other}if(typeof value!=\"string\"){return value===0?value:+value}value=value.replace(reTrim,\"\");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}module.exports=toNumber},{\"./isObject\":251,\"./isSymbol\":256}],282:[function(require,module,exports){var copyObject=require(\"./_copyObject\"),keysIn=require(\"./keysIn\");\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */function toPlainObject(value){return copyObject(value,keysIn(value))}module.exports=toPlainObject},{\"./_copyObject\":143,\"./keysIn\":260}],283:[function(require,module,exports){var baseToString=require(\"./_baseToString\");\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */function toString(value){return value==null?\"\":baseToString(value)}module.exports=toString},{\"./_baseToString\":126}],284:[function(require,module,exports){var arrayEach=require(\"./_arrayEach\"),baseCreate=require(\"./_baseCreate\"),baseForOwn=require(\"./_baseForOwn\"),baseIteratee=require(\"./_baseIteratee\"),getPrototype=require(\"./_getPrototype\"),isArray=require(\"./isArray\"),isBuffer=require(\"./isBuffer\"),isFunction=require(\"./isFunction\"),isObject=require(\"./isObject\"),isTypedArray=require(\"./isTypedArray\");\n/**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);iteratee=baseIteratee(iteratee,4);if(accumulator==null){var Ctor=object&&object.constructor;if(isArrLike){accumulator=isArr?new Ctor:[]}else if(isObject(object)){accumulator=isFunction(Ctor)?baseCreate(getPrototype(object)):{}}else{accumulator={}}}(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)});return accumulator}module.exports=transform},{\"./_arrayEach\":64,\"./_baseCreate\":81,\"./_baseForOwn\":88,\"./_baseIteratee\":105,\"./_getPrototype\":164,\"./isArray\":243,\"./isBuffer\":246,\"./isFunction\":248,\"./isObject\":251,\"./isTypedArray\":257}],285:[function(require,module,exports){var baseFlatten=require(\"./_baseFlatten\"),baseRest=require(\"./_baseRest\"),baseUniq=require(\"./_baseUniq\"),isArrayLikeObject=require(\"./isArrayLikeObject\");\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */var union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true))});module.exports=union},{\"./_baseFlatten\":86,\"./_baseRest\":121,\"./_baseUniq\":128,\"./isArrayLikeObject\":245}],286:[function(require,module,exports){var toString=require(\"./toString\");\n/** Used to generate unique IDs. */var idCounter=0;\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}module.exports=uniqueId},{\"./toString\":283}],287:[function(require,module,exports){var baseValues=require(\"./_baseValues\"),keys=require(\"./keys\");\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */function values(object){return object==null?[]:baseValues(object,keys(object))}module.exports=values},{\"./_baseValues\":129,\"./keys\":259}],288:[function(require,module,exports){var assignValue=require(\"./_assignValue\"),baseZipObject=require(\"./_baseZipObject\");\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)}module.exports=zipObject},{\"./_assignValue\":75,\"./_baseZipObject\":130}]},{},[1])(1)});\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\n// ---------------------------------------------------------------------------\n// This API Pipeline Class wrappers the pipeline specific methods which result\n// in a change to the object model. It is used internally by the object-model\n// and canvas-controller.\n// ---------------------------------------------------------------------------\n\nimport PipelineOutHandler from \"./pipeline-out-handler.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\n\nimport dagre from \"dagre/dist/dagre.min.js\";\nimport { cloneDeep, get, has, set } from \"lodash\";\n\nimport { ASSOCIATION_LINK, NODE_LINK, COMMENT_LINK, VERTICAL,\n\tDAGRE_HORIZONTAL, DAGRE_VERTICAL,\n\tCREATE_NODE, CREATE_COMMENT, CREATE_NODE_LINK, CREATE_COMMENT_LINK,\n\tSNAP_TO_GRID_AFTER, SNAP_TO_GRID_DURING,\n\tBINDING, SUPER_NODE }\n\tfrom \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class APIPipeline {\n\tconstructor(pipelineId, objectModel) {\n\t\tthis.pipelineId = pipelineId;\n\t\tthis.objectModel = objectModel;\n\t\tthis.store = objectModel.store;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Pipeline methods\n\t// ---------------------------------------------------------------------------\n\tgetPipeline() {\n\t\treturn this.objectModel.getCanvasInfoPipeline(this.pipelineId);\n\t}\n\n\tisPipelineExternal() {\n\t\treturn this.objectModel.getCanvasInfoPipeline(this.pipelineId).parentUrl;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Node AND comment methods\n\t// ---------------------------------------------------------------------------\n\n\tgetObjects() {\n\t\tconst pipeline = this.objectModel.getCanvasInfoPipeline(this.pipelineId);\n\t\tif (pipeline) {\n\t\t\treturn pipeline.nodes.concat(pipeline.comments);\n\t\t}\n\t\treturn [];\n\n\t}\n\n\tmoveObjects(data) {\n\t\tthis.store.dispatch({ type: \"MOVE_OBJECTS\", data: data, pipelineId: this.pipelineId });\n\t}\n\n\t// Deletes the object (which can be a node or a comment) identified\n\t// by the objId passed in.\n\tdeleteObject(objId) {\n\t\tthis.deleteObjects([objId]);\n\t}\n\n\t// Deletes the objects (which can be a mix of nodes and comments) identified\n\t// by the array of IDs passed in and calls the selection changed handler.\n\tdeleteObjects(objectIds) {\n\t\tthis.objectModel.executeWithSelectionChange((inObjectIds) => {\n\t\t\tconst { nodes, comments } = this.filterNodesAndComments(inObjectIds);\n\t\t\tthis.deleteNodesInternal(nodes);\n\t\t\tthis.deleteCommentsInternal(comments);\n\t\t}, objectIds);\n\t}\n\n\taddAndUpdateObjects(data) {\n\t\tthis.objectModel.executeWithSelectionChange((inData) => {\n\t\t\tthis.store.dispatch({ type: \"ADD_AND_UPDATE_OBJECTS\", data: inData, pipelineId: this.pipelineId });\n\t\t}, data);\n\t}\n\n\tdeleteAndUpdateObjects(data) {\n\t\tthis.objectModel.executeWithSelectionChange((inData) => {\n\t\t\tthis.store.dispatch({ type: \"DELETE_AND_UPDATE_OBJECTS\", data: inData, pipelineId: this.pipelineId });\n\t\t}, data);\n\t}\n\n\taddPastedObjects(data) {\n\t\tthis.objectModel.executeWithSelectionChange((inData) => {\n\t\t\tthis.store.dispatch({ type: \"ADD_PASTED_OBJECTS\", data: inData, pipelineId: this.pipelineId });\n\t\t}, data);\n\t}\n\n\tdeletePastedObjects(data) {\n\t\tthis.objectModel.executeWithSelectionChange((inData) => {\n\t\t\tthis.store.dispatch({ type: \"DELETE_PASTED_OBJECTS\", data: inData, pipelineId: this.pipelineId });\n\t\t}, data);\n\t}\n\n\t// Returns an object containing and array of nodes and an array of comments\n\t// that match the array of objectIds passed in.\n\tfilterNodesAndComments(objectIds) {\n\t\tconst nodes = [];\n\t\tconst comments = [];\n\t\tobjectIds.forEach((oId) => {\n\t\t\tconst comment = this.getComment(oId);\n\t\t\tif (comment) {\n\t\t\t\tcomments.push(comment);\n\t\t\t} else {\n\t\t\t\tnodes.push(this.getNode(oId));\n\t\t\t}\n\t\t});\n\t\treturn { nodes, comments };\n\t}\n\n\tgetObjectStyle(objId, temporary) {\n\t\tconst obj = this.getObject(objId);\n\t\tif (temporary) {\n\t\t\treturn (obj && obj.style_temp ? obj.style_temp : null);\n\t\t}\n\t\treturn (obj && obj.style ? obj.style : null);\n\t}\n\n\tsetObjectsClassName(objectIds, newClassName) {\n\t\tthis.store.dispatch({ type: \"SET_OBJECTS_CLASS_NAME\", data: { objIds: objectIds, newClassName: newClassName }, pipelineId: this.pipelineId });\n\t}\n\n\tsetObjectsColorClassName(objectIds, newColorClass) {\n\t\tthis.store.dispatch({ type: \"SET_OBJECTS_COLOR_CLASS_NAME\", data: { objIds: objectIds, newColorClass: newColorClass }, pipelineId: this.pipelineId });\n\t}\n\n\tdisconnectObjects(objectIds) {\n\t\tlet linksToDelete = [];\n\t\tobjectIds.forEach((id) => {\n\t\t\t// save all the links associated with each node, but don't store duplicate links\n\t\t\tconst objectLinks = this.getLinksContainingId(id);\n\t\t\tobjectLinks.forEach((objectLink) => {\n\t\t\t\tlinksToDelete = this.pushUniqueLinks(objectLink, linksToDelete);\n\t\t\t});\n\t\t});\n\t\tthis.store.dispatch({ type: \"DELETE_LINKS\", data: { linksToDelete: linksToDelete }, pipelineId: this.pipelineId });\n\t\treturn linksToDelete;\n\t}\n\n\tisEmpty() {\n\t\treturn this.store.isEmpty(this.pipelineId);\n\t}\n\n\tgetObject(objId) {\n\t\tconst node = this.getNode(objId);\n\t\tif (node) {\n\t\t\treturn node;\n\t\t}\n\t\tconst com = this.getComment(objId);\n\t\tif (com) {\n\t\t\treturn com;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Returns true if any of the node, comment or link definitions passed in\n\t// exactly overlap any of the existing nodes, comments or links. This is used\n\t// by the paste-from-clipboard code to detect if nodes, comments and links\n\t// being pasted overlap existing nodes, comments and links.\n\texactlyOverlaps(nodeDefs, commentDefs, linkDefs) {\n\t\tvar overlaps = false;\n\n\t\tif (nodeDefs && nodeDefs.length > 0) {\n\t\t\tconst index = nodeDefs.findIndex((nodeDef) => {\n\t\t\t\treturn this.exactlyOverlapsNodes(nodeDef);\n\t\t\t});\n\t\t\tif (index > -1) {\n\t\t\t\toverlaps = true;\n\t\t\t}\n\t\t}\n\t\tif (overlaps === false && commentDefs && commentDefs.length > 0) {\n\t\t\tconst index = commentDefs.findIndex((commentDef) => {\n\t\t\t\treturn this.exactlyOverlapsComments(commentDef);\n\t\t\t});\n\t\t\tif (index > -1) {\n\t\t\t\toverlaps = true;\n\t\t\t}\n\t\t}\n\t\tif (overlaps === false && linkDefs && linkDefs.length > 0) {\n\t\t\tconst index = linkDefs.findIndex((linkDef) => {\n\t\t\t\treturn this.exactlyOverlapsLinks(linkDef);\n\t\t\t});\n\t\t\tif (index > -1) {\n\t\t\t\toverlaps = true;\n\t\t\t}\n\t\t}\n\n\t\treturn overlaps;\n\t}\n\n\t// Return true if the new node definition passed in exactly overlaps any\n\t// of the existing nodes.\n\texactlyOverlapsNodes(nodeDef) {\n\t\tvar overlap = false;\n\t\tthis.getNodes().forEach((canvasNode) => {\n\t\t\tif (canvasNode.x_pos === nodeDef.x_pos &&\n\t\t\t\t\tcanvasNode.y_pos === nodeDef.y_pos) {\n\t\t\t\toverlap = true;\n\t\t\t}\n\t\t});\n\t\treturn overlap;\n\t}\n\n\t// Returns true if any corner of the node passed in overlaps any inNodes.\n\t// If list of inNodes is not passed in, return true if the node passed in is\n\t// on top of any existing nodes.\n\toverlapsNodes(node, inNodes) {\n\t\tlet overlap = false;\n\t\tconst surroundingNodes = inNodes ? inNodes : this.getNodes();\n\t\tsurroundingNodes.forEach((canvasNode) => {\n\t\t\tconst canvasNodeWidthX = canvasNode.x_pos + canvasNode.width;\n\t\t\tconst canvasNodeHeightY = canvasNode.y_pos + canvasNode.height;\n\t\t\tif (node.id !== canvasNode.id &&\n\t\t\t\t(\n\t\t\t\t\t(node.x_pos === canvasNode.x_pos && node.y_pos === canvasNode.y_pos) || // Exactly overlaps.\n\t\t\t\t\t(node.x_pos >= canvasNode.x_pos && node.x_pos <= canvasNodeWidthX && // Top left corner of node.\n\t\t\t\t\t\tnode.y_pos >= canvasNode.y_pos && node.y_pos <= canvasNodeHeightY) ||\n\t\t\t\t\t(node.x_pos + node.width > canvasNode.x_pos && node.x_pos + node.width < canvasNodeWidthX && // Top right corner of node\n\t\t\t\t\t\tnode.y_pos > canvasNode.y_pos && node.y_pos < canvasNodeHeightY) ||\n\t\t\t\t\t(node.x_pos > canvasNode.x_pos && node.x_pos < canvasNodeWidthX && // Bottom left corner of node.\n\t\t\t\t\t\tnode.y_pos + node.height > canvasNode.y_pos && node.y_pos + node.height < canvasNodeHeightY) ||\n\t\t\t\t\t(node.x_pos + node.width > canvasNode.x_pos && node.x_pos + node.width < canvasNodeWidthX && // Bottom right corner of node\n\t\t\t\t\t\tnode.y_pos + node.height > canvasNode.y_pos && node.y_pos + node.height < canvasNodeHeightY)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\toverlap = true;\n\t\t\t}\n\t\t});\n\t\treturn overlap;\n\t}\n\n\t// Return true if the comment definition passed in exactly overlaps any\n\t// of the existing comments.\n\texactlyOverlapsComments(comment) {\n\t\tvar overlap = false;\n\t\tthis.getComments().forEach((canvasComment) => {\n\t\t\tif (canvasComment.x_pos === comment.x_pos &&\n\t\t\t\t\tcanvasComment.y_pos === comment.y_pos) {\n\t\t\t\toverlap = true;\n\t\t\t}\n\t\t});\n\t\treturn overlap;\n\t}\n\n\t// Return true if the link definition passed in exactly overlaps any\n\t// of the existing links in its coordinate positions (if any) identified by\n\t// the srcPos and trgPos properties.\n\texactlyOverlapsLinks(link) {\n\t\tvar overlap = false;\n\t\tthis.getLinks().forEach((canvasLink) => {\n\t\t\tif (canvasLink.srcPos &&\n\t\t\t\t\tlink.srcPos &&\n\t\t\t\t\tcanvasLink.srcPos.x_pos === link.srcPos.x_pos &&\n\t\t\t\t\tcanvasLink.srcPos.y_pos === link.srcPos.y_pos) {\n\t\t\t\toverlap = true;\n\t\t\t}\n\t\t\tif (canvasLink.trgPos &&\n\t\t\t\t\tlink.trgPos &&\n\t\t\t\t\tcanvasLink.trgPos.x_pos === link.trgPos.x_pos &&\n\t\t\t\t\tcanvasLink.trgPos.y_pos === link.trgPos.y_pos) {\n\t\t\t\toverlap = true;\n\t\t\t}\n\t\t});\n\t\treturn overlap;\n\t}\n\n\t// Returns true if the object ID passed in exists in the array of objects\n\t// passed in.\n\tisObjectIdInObjects(objId, inObjects) {\n\t\tif (inObjects) {\n\t\t\treturn inObjects.findIndex((object) => {\n\t\t\t\treturn object.id === objId;\n\t\t\t}) > -1;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Node methods\n\t// ---------------------------------------------------------------------------\n\n\tcreateNode(data) {\n\t\tlet nodeTemplate = data.nodeTemplate;\n\t\t// If the nodeTemplate has app_data.ui_data field then it will be a\n\t\t// template that conforms to the pipelineFlow schema and needs to be\n\t\t// converted to the internal format for a node.\n\t\tif (has(data.nodeTemplate, \"app_data.ui_data\")) {\n\t\t\tnodeTemplate = this.objectModel.convertNodeTemplate(nodeTemplate);\n\t\t}\n\t\tlet node = {};\n\t\tif (nodeTemplate !== null) {\n\t\t\tnode = Object.assign({}, nodeTemplate, {\n\t\t\t\t\"id\": this.objectModel.getUniqueId(CREATE_NODE, { nodeType: nodeTemplate, pipelineId: this.pipelineId }),\n\t\t\t\t\"x_pos\": data.offsetX,\n\t\t\t\t\"y_pos\": data.offsetY\n\t\t\t});\n\n\t\t\t// Add node height and width and, if appropriate, inputPortsHeight\n\t\t\t// and outputPortsHeight and layout info.\n\t\t\tnode = this.objectModel.setNodeAttributes(node);\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t// Returns a source node for auto completion or null if no source node can be\n\t// detected. The source node is either:\n\t// 1. The selected node, if only *one* node is currently selected or\n\t// 2. The most recently added node, provided it has one or more output ports or\n\t// 3. The most-recent-but-one added node, provided it has one or more output ports\n\tgetAutoSourceNode(autoLinkOnlyFromSelNodes) {\n\t\tvar sourceNode = null;\n\t\tvar selectedNodes = this.objectModel.getSelectedNodes();\n\n\t\tif (selectedNodes.length === 1 &&\n\t\t\t\tthis.isViableAutoSourceNode(selectedNodes[0])) {\n\t\t\tsourceNode = selectedNodes[0];\n\n\t\t} else if (!autoLinkOnlyFromSelNodes) {\n\t\t\tvar nodesArray = this.getNodes();\n\t\t\tif (nodesArray.length > 0) {\n\t\t\t\tvar lastNodeAdded = nodesArray[nodesArray.length - 1];\n\t\t\t\tif (lastNodeAdded.outputs) {\n\t\t\t\t\tsourceNode = lastNodeAdded;\n\t\t\t\t} else if (nodesArray.length > 1) {\n\t\t\t\t\tvar lastButOneNodeAdded = nodesArray[nodesArray.length - 2];\n\t\t\t\t\tif (lastButOneNodeAdded.outputs) {\n\t\t\t\t\t\tsourceNode = lastButOneNodeAdded;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sourceNode;\n\t}\n\n\t// Returns true if the node passed in is OK to be used as a source node\n\t// for a node which is to be auto-added to the canvas.\n\tisViableAutoSourceNode(node) {\n\t\treturn node.outputs &&\n\t\t\tnode.outputs.length > 0 &&\n\t\t\t!CanvasUtils.isSrcCardinalityAtMax(node.outputs[0].id, node, this.getLinks());\n\t}\n\n\t// Returns a newly created 'auto node' whose position is based on the\n\t// source node (if one is provided) and the the other nodes on the canvas.\n\tcreateAutoNode(data, sourceNode) {\n\t\tconst initialMarginX = this.objectModel.getCanvasLayout().autoLayoutInitialMarginX;\n\t\tconst initialMarginY = this.objectModel.getCanvasLayout().autoLayoutInitialMarginY;\n\t\tconst horizontalSpacing = this.objectModel.getCanvasLayout().autoLayoutHorizontalSpacing;\n\t\tconst verticalSpacing = this.objectModel.getCanvasLayout().autoLayoutVerticalSpacing;\n\n\t\tvar x = 0;\n\t\tvar y = 0;\n\n\t\tif (sourceNode === null) {\n\t\t\tx = initialMarginX;\n\t\t\ty = initialMarginY;\n\t\t} else {\n\t\t\tx = sourceNode.x_pos + sourceNode.width + horizontalSpacing;\n\t\t\ty = sourceNode.y_pos;\n\t\t}\n\n\t\tdata.offsetX = x;\n\t\tdata.offsetY = y;\n\n\t\tconst newNode = this.createNode(data);\n\n\t\tif (this.getNodes().length > 0) {\n\t\t\tif (this.isEntryBindingNode(newNode)) {\n\t\t\t\tnewNode.x_pos = initialMarginX;\n\t\t\t\tnewNode.y_pos += newNode.height + verticalSpacing;\n\t\t\t}\n\t\t}\n\n\t\tvar newNodeOverLapping = true;\n\n\t\twhile (newNodeOverLapping) {\n\t\t\tnewNodeOverLapping = this.isNodeOverlappingOthers(newNode);\n\t\t\tif (newNodeOverLapping) {\n\t\t\t\tnewNode.y_pos += newNode.height + verticalSpacing;\n\t\t\t}\n\t\t}\n\n\t\treturn newNode;\n\t}\n\n\t// Returns an array of nodes (that are in a format that conforms to the\n\t// schema) that can be added to a palette category. Each node is given\n\t// a new ID to make it unique within the palette.\n\tcreateNodesForPalette(selectedObjectIds) {\n\t\tconst newNodes = [];\n\t\tselectedObjectIds.forEach((selObjId) => {\n\t\t\tlet node = this.getNode(selObjId);\n\t\t\tif (node) {\n\t\t\t\tnode = cloneDeep(node);\n\t\t\t\tnode.id = this.objectModel.getUUID();\n\t\t\t\tnode.x_pos = 0;\n\t\t\t\tnode.y_pos = 0;\n\t\t\t\tnode = PipelineOutHandler.createSchemaNode(node, []);\n\t\t\t\tif (node.type === SUPER_NODE) {\n\t\t\t\t\tconst pData = this.objectModel.getSchemaPipelinesForSupernode(node);\n\t\t\t\t\tset(node, \"app_data.ui_data.sub_pipelines\", pData);\n\t\t\t\t}\n\t\t\t\tnewNodes.push(node);\n\t\t\t}\n\t\t});\n\t\treturn newNodes;\n\t}\n\n\treplaceNodes(replacementNodes) {\n\t\tthis.store.dispatch({ type: \"REPLACE_NODES\", data: replacementNodes, pipelineId: this.pipelineId });\n\t}\n\n\t// Returns true if a new link needs to be created with the newly created\n\t// auto node. A link is required when there IS a source node and the source\n\t// and target nodes each have a single port and the cardinality is not\n\t// exceeded for the ports.\n\tisLinkNeededWithAutoNode(newNode, srcNode) {\n\t\tlet isLinkNeededWithAutoNode = false;\n\n\t\tif (newNode &&\n\t\t\t\tsrcNode &&\n\t\t\t\tnewNode.inputs &&\n\t\t\t\tsrcNode.outputs &&\n\t\t\t\tnewNode.inputs.length === 1 &&\n\t\t\t\tsrcNode.outputs.length === 1 &&\n\t\t\t\t!CanvasUtils.isCardinalityAtMax(srcNode.outputs[0].id, newNode.inputs[0].id, srcNode, newNode, this.getLinks())) {\n\t\t\tisLinkNeededWithAutoNode = true;\n\t\t}\n\n\t\treturn isLinkNeededWithAutoNode;\n\t}\n\n\t// Returns true if the node passed in is an entry binding node. We detect\n\t// this by checking that there are no inputs.\n\tisEntryBindingNode(node) {\n\t\tif (node.type === BINDING && (!node.inputs || node.inputs.length === 0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Returns true if the node passed in is an exit binding node. We detect\n\t// this by checking that the node *has* inputs because an exit binding node\n\t// might have outputs.\n\tisExitBindingNode(node) {\n\t\tif (node.type === BINDING && node.inputs && node.inputs.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tisNodeOverlappingOthers(node) {\n\t\tvar index = this.getNodes().findIndex((arrayNode) => {\n\t\t\treturn this.isSourceOverlappingTarget(arrayNode, node);\n\t\t});\n\n\t\tif (index === -1) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tisSourceOverlappingTarget(srcNode, trgNode) {\n\t\tconst srcHighlightGap = srcNode.layout.nodeHighlightGap;\n\t\tconst trgHighlightGap = trgNode.layout.nodeHighlightGap;\n\t\tif (((srcNode.x_pos + srcNode.width + srcHighlightGap >= trgNode.x_pos - trgHighlightGap &&\n\t\t\t\t\ttrgNode.x_pos + trgNode.width + trgHighlightGap >= srcNode.x_pos - srcHighlightGap) &&\n\t\t\t\t\t(srcNode.y_pos + srcNode.height + srcHighlightGap >= trgNode.y_pos - trgHighlightGap &&\n\t\t\t\t\t\ttrgNode.y_pos + trgNode.height + trgHighlightGap >= srcNode.y_pos - srcHighlightGap))) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\taddNode(newNode) {\n\t\tif (newNode) {\n\t\t\tif (newNode.type === SUPER_NODE) {\n\t\t\t\tthis.addSupernode(newNode, get(newNode, \"sub_pipelines\"));\n\t\t\t} else {\n\t\t\t\tthis.store.dispatch({ type: \"ADD_NODE\", data: { newNode: newNode }, pipelineId: this.pipelineId });\n\t\t\t}\n\t\t}\n\t}\n\n\taddSupernodes(supernodesToAdd, pipelinesToAdd, extPipelineFlowsToAdd) {\n\t\tthis.store.dispatch({ type: \"ADD_SUPERNODES\", data: {\n\t\t\tsupernodesToAdd: supernodesToAdd,\n\t\t\tpipelinesToAdd: pipelinesToAdd,\n\t\t\textPipelineFlowsToAdd: extPipelineFlowsToAdd,\n\t\t\tpipelineId: this.pipelineId\n\t\t} });\n\t}\n\n\t// Add the newSupernode to canvasInfo and an array of newSubPipelines that\n\t// it references. Optionally, a link may also be added.\n\taddSupernode(newSupernode, newSubPipelines) {\n\t\tconst canvasInfo = this.objectModel.getCanvasInfo();\n\t\tlet canvasInfoPipelines = this.objectModel.getCanvasInfo().pipelines.concat(newSubPipelines || []);\n\n\t\tcanvasInfoPipelines = canvasInfoPipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === this.pipelineId) {\n\t\t\t\tconst newNodes = [\n\t\t\t\t\t...pipeline.nodes,\n\t\t\t\t\tthis.cloneSupernodeRemovePipelineData(newSupernode)\n\t\t\t\t];\n\t\t\t\treturn Object.assign({}, pipeline, { nodes: newNodes });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\tconst newCanvasInfo = Object.assign({}, canvasInfo, { pipelines: canvasInfoPipelines });\n\t\tthis.objectModel.setCanvasInfo(newCanvasInfo);\n\t}\n\n\tcloneSupernodeRemovePipelineData(supernode) {\n\t\tconst sn = Object.assign({}, supernode);\n\t\tif (sn.app_data) {\n\t\t\tsn.app_data = Object.assign({}, sn.app_data);\n\t\t\tif (sn.app_data.ui_data) {\n\t\t\t\tdelete sn.app_data.ui_data.sub_pipelines;\n\t\t\t}\n\t\t}\n\t\treturn sn;\n\t}\n\n\t// Deletes the node identified by the nodeId. If the node is a Supernode, the\n\t// relevant pipelines and external pipeline flows will be deleted.\n\tdeleteNode(nodeId) {\n\t\tconst node = this.getNode(nodeId);\n\t\tif (node) {\n\t\t\tthis.deleteNodes([node]);\n\t\t}\n\t}\n\n\t// Deletes the nodes identified by the nodes array. If any of the the nodes\n\t// are supernodes, the relevant pipelines and external pipeline flows will\n\t// be deleted if removePipelines is true. It also calls the selection changed\n\t// handler.\n\tdeleteNodes(nodes, removePipelines = true) {\n\t\tif (nodes && nodes.length > 0) {\n\t\t\tthis.objectModel.executeWithSelectionChange((obj) => {\n\t\t\t\tthis.deleteNodesInternal(obj.nodes, obj.removePipelines);\n\t\t\t}, { nodes, removePipelines });\n\t\t}\n\t}\n\n\t// Deletes the nodes identified by the nodes array. If any of the the nodes\n\t// are supernodes, the relevant pipelines and external pipeline flows will\n\t// be deleted if removePipelines is true. It does not call the selection\n\t// changed handler.\n\tdeleteNodesInternal(nodes, removePipelines) {\n\t\t// Handle regular nodes\n\t\tconst regularNodes = nodes.filter((n) => n.type !== SUPER_NODE);\n\t\tregularNodes.forEach((n) => {\n\t\t\tthis.store.dispatch({ type: \"DELETE_OBJECT\", data: { id: n.id }, pipelineId: this.pipelineId });\n\t\t});\n\n\t\t// Handle supernodes\n\t\tconst supernodes = nodes.filter((n) => n.type === SUPER_NODE);\n\t\tif (removePipelines) {\n\t\t\tthis.deleteSupernodesAndDescPipelines(supernodes);\n\t\t} else {\n\t\t\tthis.deleteSupernodes(supernodes, [], []);\n\t\t}\n\t}\n\n\t// Deletes the supernodes passed in and also any descending pipelines. It\n\t// makes sure it doesn't delete any external pipelines that are referenced by\n\t// other supernodes in the canvas info.\n\tdeleteSupernodesAndDescPipelines(supernodes) {\n\t\tconst pipelinesToDelete = this.objectModel.getDescPipelinesToDelete(supernodes, this.pipelineId);\n\t\tconst extPipelineFlowsToDelete =\n\t\t\tthis.objectModel.getExternalPipelineFlowsForPipelines(pipelinesToDelete);\n\t\tthis.deleteSupernodes(supernodes, pipelinesToDelete, extPipelineFlowsToDelete);\n\t}\n\n\t// Deletes the supernodes passed in along with any pipelines and external flows.\n\tdeleteSupernodes(supernodesToDelete, pipelinesToDelete, extPipelineFlowsToDelete) {\n\t\tthis.store.dispatch({\n\t\t\ttype: \"DELETE_SUPERNODES\",\n\t\t\tdata: {\n\t\t\t\tsupernodesToDelete: supernodesToDelete,\n\t\t\t\tpipelinesToDelete: pipelinesToDelete,\n\t\t\t\textPipelineFlowsToDelete: extPipelineFlowsToDelete,\n\t\t\t\tpipelineId: this.pipelineId\n\t\t\t}\n\t\t});\n\t}\n\n\tdeconstructSupernode(data) {\n\t\tthis.store.dispatch({ type: \"DECONSTRUCT_SUPERNODE\", data: data });\n\t}\n\n\treconstructSupernode(data) {\n\t\tthis.store.dispatch({ type: \"RECONSTRUCT_SUPERNODE\", data: data });\n\t}\n\n\tgetNodes() {\n\t\treturn this.store.getNodes(this.pipelineId);\n\t}\n\n\t// Returns the IDs of all nodes in the pipeline.\n\tgetNodeIds() {\n\t\treturn this.getNodes().map((n) => n.id);\n\t}\n\n\tgetNode(nodeId) {\n\t\treturn this.store.getNode(nodeId, this.pipelineId);\n\t}\n\n\tgetSupernodes() {\n\t\treturn CanvasUtils.filterSupernodes(this.getNodes());\n\t}\n\n\tisDataNode(objId) {\n\t\treturn this.getNode(objId);\n\t}\n\n\tsizeAndPositionObjects(objectsInfo, linksInfo) {\n\t\tthis.store.dispatch({ type: \"SIZE_AND_POSITION_OBJECTS\",\n\t\t\tdata: { objectsInfo, linksInfo }, pipelineId: this.pipelineId });\n\t}\n\n\t// Filters data node IDs from the list of IDs passed in and returns them\n\t// in a new array. That is, the result array doesn't contain any comment IDs.\n\tfilterDataNodes(objectIds) {\n\t\treturn objectIds.filter((objId) => {\n\t\t\treturn this.isDataNode(objId);\n\t\t});\n\t}\n\n\texpandSuperNodeInPlace(nodeId, objectPositions, linkPositions) {\n\t\tlet node = Object.assign({}, this.getNode(nodeId), { is_expanded: true });\n\t\tnode = this.objectModel.setNodeAttributes(node);\n\t\tthis.store.dispatch({\n\t\t\ttype: \"SET_SUPERNODE_EXPAND_STATE\",\n\t\t\tdata: { node, objectPositions, linkPositions },\n\t\t\tpipelineId: this.pipelineId\n\t\t});\n\t}\n\n\tcollapseSuperNodeInPlace(nodeId, objectPositions, linkPositions) {\n\t\tlet node = Object.assign({}, this.getNode(nodeId), { is_expanded: false });\n\t\tnode = this.objectModel.setNodeAttributes(node);\n\t\tthis.store.dispatch({\n\t\t\ttype: \"SET_SUPERNODE_EXPAND_STATE\",\n\t\t\tdata: { node, objectPositions, linkPositions },\n\t\t\tpipelineId: this.pipelineId\n\t\t});\n\t}\n\n\tisSuperNodeExpandedInPlace(nodeId) {\n\t\treturn this.getNode(nodeId).is_expanded === true;\n\t}\n\n\tisSupernode(nodeId) {\n\t\treturn this.getNode(nodeId).type === SUPER_NODE;\n\t}\n\n\tgetNodeParameters(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn (node ? node.parameters : null);\n\t}\n\n\tgetNodeUiParameters(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn (node ? node.ui_parameters : null);\n\t}\n\n\tsetNodeLabel(nodeId, newLabel) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_LABEL\", data: { nodeId: nodeId, label: newLabel }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeDecorations(nodeId, newDecorations) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_DECORATIONS\", data: { nodeId: nodeId, decorations: this.ensureDecorationsHaveIds(newDecorations) }, pipelineId: this.pipelineId });\n\t}\n\n\tsetInputPortLabel(nodeId, portId, newLabel) {\n\t\tthis.store.dispatch({ type: \"SET_INPUT_PORT_LABEL\", data: { nodeId: nodeId, portId: portId, label: newLabel }, pipelineId: this.pipelineId });\n\t}\n\n\tsetOutputPortLabel(nodeId, portId, newLabel) {\n\t\tthis.store.dispatch({ type: \"SET_OUTPUT_PORT_LABEL\", data: { nodeId: nodeId, portId: portId, label: newLabel }, pipelineId: this.pipelineId });\n\t}\n\n\tsetInputPortSubflowNodeRef(nodeId, portId, subflowNodeRef) {\n\t\tthis.store.dispatch({ type: \"SET_INPUT_PORT_SUBFLOW_NODE_REF\", data: { nodeId: nodeId, portId: portId, subflowNodeRef: subflowNodeRef }, pipelineId: this.pipelineId });\n\t}\n\n\tsetOutputPortSubflowNodeRef(nodeId, portId, subflowNodeRef) {\n\t\tthis.store.dispatch({ type: \"SET_OUTPUT_PORT_SUBFLOW_NODE_REF\", data: { nodeId: nodeId, portId: portId, subflowNodeRef: subflowNodeRef }, pipelineId: this.pipelineId });\n\t}\n\n\tsetOutputPortConnectFromStatus(nodeId, portId, connectFrom) {\n\t\tthis.store.dispatch({ type: \"UPDATE_CONNECT_FROM_STATUS\", data: { nodeId: nodeId, portId: portId, connectFrom: connectFrom }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeProperties(nodeId, properties) {\n\t\tthis.setNodesProperties([{ ...properties, id: nodeId }]);\n\t}\n\n\tsetNodesProperties(nodesProperties) {\n\t\tconst updatedNodes = [];\n\n\t\tnodesProperties.forEach((node) => {\n\t\t\tconst existingNode = this.getNode(node.id);\n\t\t\tif (existingNode) {\n\t\t\t\tlet updatedNode = cloneDeep(existingNode);\n\t\t\t\tupdatedNode = Object.assign(updatedNode, node);\n\t\t\t\tupdatedNode = this.objectModel.setNodeAttributes(updatedNode);\n\t\t\t\tupdatedNodes.push(updatedNode);\n\t\t\t}\n\t\t});\n\n\t\tthis.store.dispatch({ type: \"UPDATE_NODES\", data: updatedNodes, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeMessage(nodeId, message) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_MESSAGE\", data: { nodeId: nodeId, message: message }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeMessages(nodeId, messages) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_MESSAGES\", data: { nodeId: nodeId, messages: messages }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeUiParameters(nodeId, uiParameters) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_UI_PARAMETERS\", data: { nodeId: nodeId, ui_parameters: uiParameters }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeParameters(nodeId, parameters) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_PARAMETERS\", data: { nodeId: nodeId, parameters: parameters }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeInputPorts(nodeId, inputs) {\n\t\tthis.setNodeProperties(nodeId, { inputs });\n\t}\n\n\tsetNodeOutputPorts(nodeId, outputs) {\n\t\tthis.setNodeProperties(nodeId, { outputs });\n\t}\n\n\tsetSubObjectFocusFunction(nodeId, focusFunction) {\n\t\tthis.store.dispatch({ type: \"SET_NODE_SUB_OBJECT_FOCUS_FN\", data: { nodeId, focusFunction }, pipelineId: this.pipelineId });\n\t}\n\n\taddCustomAttrToNodes(nodeIds, attrName, attrValue) {\n\t\tthis.store.dispatch({ type: \"ADD_NODE_ATTR\", data: { objIds: nodeIds, attrName: attrName, attrValue: attrValue }, pipelineId: this.pipelineId });\n\t}\n\n\tremoveCustomAttrFromNodes(nodeIds, attrName, attrValue) {\n\t\tthis.store.dispatch({ type: \"REMOVE_NODE_ATTR\", data: { objIds: nodeIds, attrName: attrName }, pipelineId: this.pipelineId });\n\t}\n\n\tgetNodeDecorations(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn (node ? node.decorations : null);\n\t}\n\n\tgetNodeMessages(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn (node ? node.messages : null);\n\t}\n\n\tgetNodeMessage(nodeId, controlName) {\n\t\tvar messages = this.getNodeMessages(nodeId);\n\t\tif (messages) {\n\t\t\tfor (const message of messages) {\n\t\t\t\tif (message.id_ref === controlName) {\n\t\t\t\t\treturn message;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetNodeInputPorts(nodeId) {\n\t\tconst node = this.getNode(nodeId);\n\t\treturn node ? node.inputs : null;\n\t}\n\n\tgetNodeOutputPorts(nodeId) {\n\t\tconst node = this.getNode(nodeId);\n\t\treturn node ? node.outputs : null;\n\t}\n\n\tgetNodeClassName(nodeId) {\n\t\tconst node = this.getNode(nodeId);\n\t\treturn node ? node.class_name : null;\n\t}\n\n\tgetNodeStyle(nodeId, temporary) {\n\t\tconst node = this.getNode(nodeId);\n\t\tif (temporary) {\n\t\t\treturn (node ? node.style_temp : null);\n\t\t}\n\t\treturn (node ? node.style : null);\n\t}\n\n\thasErrorMessage(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn this.objectModel.hasErrorMessage(node);\n\t}\n\n\thasWarningMessage(nodeId) {\n\t\tvar node = this.getNode(nodeId);\n\t\treturn this.objectModel.hasWarningMessage(node);\n\t}\n\n\tisFlowValid(includeMsgTypes) {\n\t\tlet validFlow = true;\n\t\tconst flowNodes = this.getNodes();\n\t\tfor (const node of flowNodes) {\n\t\t\tif (validFlow) {\n\t\t\t\tvalidFlow = this.isNodeValid(node, includeMsgTypes);\n\t\t\t}\n\t\t}\n\t\treturn validFlow;\n\t}\n\n\tisNodeValid(node, includeMsgTypes) {\n\t\tlet validNode = true;\n\t\tif (includeMsgTypes && Array.isArray(includeMsgTypes) && includeMsgTypes.length > 0) {\n\t\t\tfor (const msg of node.messages) {\n\t\t\t\tif (includeMsgTypes.indexOf(msg.type) !== -1) {\n\t\t\t\t\tvalidNode = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (node.messages && node.messages.length > 0) {\n\t\t\tvalidNode = false;\n\t\t}\n\t\treturn validNode;\n\t}\n\n\tgetFlowMessages() {\n\t\tconst flowNodes = this.getNodes();\n\t\tconst nodeMsgs = {};\n\t\tflowNodes.forEach((node) => {\n\t\t\tif (node.messages && node.messages.length > 0) {\n\t\t\t\tnodeMsgs[node.id] = node.messages;\n\t\t\t}\n\t\t});\n\t\treturn nodeMsgs;\n\t}\n\n\tautoLayout(layoutDirection) {\n\t\tconst canvasInfoPipeline = this.objectModel.getCanvasInfoPipeline(this.pipelineId);\n\t\tlet movedNodesInfo = {};\n\t\tlet movedLinksInfo = {};\n\t\tif (layoutDirection === VERTICAL) {\n\t\t\t[movedNodesInfo, movedLinksInfo] = this.dagreAutoLayout(DAGRE_VERTICAL, canvasInfoPipeline);\n\t\t} else {\n\t\t\t[movedNodesInfo, movedLinksInfo] = this.dagreAutoLayout(DAGRE_HORIZONTAL, canvasInfoPipeline);\n\t\t}\n\n\t\tthis.sizeAndPositionObjects(movedNodesInfo, movedLinksInfo);\n\t}\n\n\t// Returns two arrays containing info to indicate new auto-layout\n\t// positions for nodes and, if present, fully-detached and semi-detached\n\t// links. Uses the Dagre library to calculate the new positions.\n\tdagreAutoLayout(direction, canvasInfoPipeline) {\n\t\tconst canvasLayout = this.objectModel.getCanvasLayout();\n\n\t\tvar nodeLinks = canvasInfoPipeline.links.filter((link) => {\n\t\t\treturn link.type === NODE_LINK || link.type === ASSOCIATION_LINK;\n\t\t});\n\n\t\tlet nodesData = [];\n\n\t\t// Calculate some default dimensions for nodes.\n\t\tconst layout = this.objectModel.getCanvasConfig()?.enableNodeLayout;\n\t\tconst defaultWidth = layout?.defaultNodeWidth ? layout.defaultNodeWidth : 150;\n\t\tconst defaultHeight = layout?.defaultNodeHeight ? layout.defaultNodeHeight : 80;\n\n\t\t// Create an array of edges, from the node links, to be passed to Dagre.\n\t\t// At the same time, for any semi-detached or fully-detached links we\n\t\t// create a temporary node so Dagre will also auto layout the ends of\n\t\t// detached links.\n\t\tvar edges = nodeLinks.map((link) => {\n\t\t\tlet srcNodeId = link.srcNodeId;\n\t\t\tlet trgNodeId = link.trgNodeId;\n\n\t\t\tif (link.srcPos) {\n\t\t\t\tsrcNodeId = \"temp-src-node-\" + link.id;\n\t\t\t\tnodesData.push({ \"v\": srcNodeId, \"value\": { width: defaultWidth, height: defaultHeight } });\n\t\t\t}\n\n\t\t\tif (link.trgPos) {\n\t\t\t\ttrgNodeId = \"temp-trg-node-\" + link.id;\n\t\t\t\tnodesData.push({ \"v\": trgNodeId, \"value\": { width: defaultWidth, height: defaultHeight } });\n\t\t\t}\n\t\t\treturn { \"v\": srcNodeId, \"w\": trgNodeId, \"value\": { \"points\": [] } };\n\t\t});\n\n\t\t// Add actual nodes to nodesData and adjust width if necessary\n\t\tnodesData = nodesData.concat(canvasInfoPipeline.nodes.map((node) => {\n\t\t\tlet newWidth = node.width;\n\t\t\tif (direction === DAGRE_HORIZONTAL) {\n\t\t\t\tconst padding = this.getPaddingForNode(node, canvasLayout, canvasInfoPipeline);\n\t\t\t\tnewWidth = node.width +\n\t\t\t\t\tMath.max(padding, canvasLayout.autoLayoutHorizontalSpacing);\n\t\t\t}\n\n\t\t\treturn { \"v\": node.id, \"value\": { width: newWidth, height: node.height } };\n\t\t}));\n\n\t\t// Possible values: TB, BT, LR, or RL, where T = top, B = bottom, L = left, and R = right.\n\t\t// default TB for vertical layout\n\t\t// set to LR for horizontal layout\n\t\tvar value = { };\n\t\tvar directionList = [\"TB\", \"BT\", \"LR\", \"RL\"];\n\t\tif (directionList.indexOf(direction) >= 0) {\n\t\t\tvalue = { \"rankDir\": direction };\n\t\t}\n\n\t\tvar inputGraph = { nodes: nodesData, edges: edges, value: value };\n\n\t\tconst initialMarginX = canvasLayout.autoLayoutInitialMarginX;\n\t\tconst initialMarginY = canvasLayout.autoLayoutInitialMarginY;\n\t\tconst verticalSpacing = canvasLayout.autoLayoutVerticalSpacing;\n\t\tlet horizontalSpacing = canvasLayout.autoLayoutHorizontalSpacing;\n\t\tif (direction === DAGRE_HORIZONTAL) {\n\t\t\thorizontalSpacing = 0;\n\t\t}\n\n\t\tvar g = dagre.graphlib.json.read(inputGraph);\n\t\tg.graph().marginx = initialMarginX;\n\t\tg.graph().marginy = initialMarginY;\n\t\tif (direction === \"TB\") {\n\t\t\tg.graph().nodesep = horizontalSpacing; // distance to separate the nodes horizontally\n\t\t\tg.graph().ranksep = verticalSpacing; // distance to separate the ranks vertically\n\t\t} else {\n\t\t\tg.graph().nodesep = verticalSpacing; // distance to separate the nodes vertically\n\t\t\tg.graph().ranksep = horizontalSpacing; // distance to separate the ranks horizontally\n\t\t}\n\t\tdagre.layout(g);\n\n\t\tconst outputGraph = dagre.graphlib.json.write(g);\n\t\tconst movedNodesInfo = this.convertGraphToMovedNodes(outputGraph, canvasInfoPipeline.nodes);\n\t\tconst movedLinksInfo = this.convertGraphToMovedLinks(outputGraph);\n\n\t\treturn [movedNodesInfo, movedLinksInfo];\n\t}\n\n\t// Returns an array of move node actions that can be used to reposition the\n\t// nodes based on the provided Dagre output graph. (The node width and height\n\t// are included in the output because the move nodes action expects them).\n\tconvertGraphToMovedNodes(outputGraph, canvasInfoPipelineNodes) {\n\t\tconst movedNodesInfo = {};\n\t\tconst lookup = {};\n\n\t\tfor (var i = 0, len = outputGraph.nodes.length; i < len; i++) {\n\t\t\tlookup[outputGraph.nodes[i].v] = outputGraph.nodes[i];\n\t\t}\n\n\t\t// When calculating the new x_pos and y_pos of the node use the width (and\n\t\t// height) specified in the output graph. This will be the 'newWidth' which\n\t\t// includes the space for the connecting lines calculated earlier.\n\t\tcanvasInfoPipelineNodes.forEach((node) => {\n\t\t\tmovedNodesInfo[node.id] = {\n\t\t\t\tid: node.id,\n\t\t\t\tx_pos: lookup[node.id].value.x - (lookup[node.id].value.width / 2),\n\t\t\t\ty_pos: lookup[node.id].value.y - (lookup[node.id].value.height / 2),\n\t\t\t\twidth: node.width,\n\t\t\t\theight: node.height\n\t\t\t};\n\t\t});\n\t\treturn movedNodesInfo;\n\t}\n\n\t// Returns an array of move link actions that can be used to reposition the\n\t// links based on the provided Dagre output graph.\n\t// Iterate nodes and check if there are any temporary nodes and if so,\n\t// use the x/y coordinates of those nodes as the start/end of the\n\t// corresponding detached link.\n\tconvertGraphToMovedLinks(outputGraph) {\n\t\tconst movedLinksInfo = [];\n\n\t\tconst outNodes = outputGraph.nodes;\n\n\t\t// Record the x and y position of temporary node to be assigned to the detached link.\n\t\t// A fully detached link can have both temp-src-node and temp-trg-node\n\t\toutNodes.forEach((node) => {\n\t\t\tif (node.v.startsWith(\"temp-src-node-\")) {\n\t\t\t\tconst linkId = node.v.split(\"temp-src-node-\")[1];\n\n\t\t\t\tmovedLinksInfo[linkId] = {\n\t\t\t\t\tsrcPos: {\n\t\t\t\t\t\tx_pos: node.value.x - (node.value.width / 2),\n\t\t\t\t\t\ty_pos: node.value.y\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (node.v.startsWith(\"temp-trg-node-\")) {\n\t\t\t\tconst linkId = node.v.split(\"temp-trg-node-\")[1];\n\n\t\t\t\tmovedLinksInfo[linkId] = {\n\t\t\t\t\t// If it is a fully detached link include srcPos coordinates.\n\t\t\t\t\t...movedLinksInfo[linkId],\n\t\t\t\t\ttrgPos: {\n\t\t\t\t\t\tx_pos: node.value.x - (node.value.width / 2),\n\t\t\t\t\t\ty_pos: node.value.y\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t\treturn movedLinksInfo;\n\t}\n\n\t// Returns a width that can be added to the node width for auto-layout.\n\t// This extra width is what is needed to display the connection lines\n\t// without then doubling back on themselves.\n\tgetPaddingForNode(node, layoutInfo, canvasInfoPipeline) {\n\t\treturn CanvasUtils.getNodePaddingToTargetNodes(node,\n\t\t\tcanvasInfoPipeline.nodes, canvasInfoPipeline.links, layoutInfo.linkType);\n\t}\n\n\t// Return the dimensions of the bounding rectangle for the listOfNodes.\n\tgetBoundingRectForNodes(listOfNodes) {\n\t\tlet xLeft = listOfNodes[0].x_pos;\n\t\tlet yTop = listOfNodes[0].y_pos;\n\t\tlet xRight = listOfNodes[0].width + xLeft;\n\t\tlet yBot = listOfNodes[0].height + yTop;\n\n\t\tlistOfNodes.forEach((node) => {\n\t\t\txLeft = Math.min(xLeft, node.x_pos);\n\t\t\tyTop = Math.min(yTop, node.y_pos);\n\t\t\txRight = Math.max(xRight, node.x_pos + node.width);\n\t\t\tyBot = Math.max(yBot, node.y_pos + node.height);\n\t\t});\n\n\t\treturn {\n\t\t\tx: xLeft,\n\t\t\ty: yTop,\n\t\t\twidth: xRight - xLeft,\n\t\t\theight: yBot - yTop\n\t\t};\n\t}\n\n\tensureDecorationsHaveIds(newDecorations) {\n\t\tif (newDecorations) {\n\t\t\treturn newDecorations.map((dec) => Object.assign({}, dec, { id: dec.id || this.objectModel.getUUID() }));\n\t\t}\n\t\treturn newDecorations;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Comment methods\n\t// ---------------------------------------------------------------------------\n\n\tcreateComment(source) {\n\t\tlet comment = {\n\t\t\tid: this.objectModel.getUniqueId(CREATE_COMMENT),\n\t\t\tcontent: \"\",\n\t\t\theight: 42,\n\t\t\twidth: 175,\n\t\t\tx_pos: source.pos.x,\n\t\t\ty_pos: source.pos.y,\n\t\t\tlinkIds: [],\n\t\t\tselectedObjectIds: []\n\t\t};\n\t\tif (source.contentType) {\n\t\t\tcomment.contentType = source.contentType;\n\t\t}\n\n\t\tif (source.formats) {\n\t\t\tcomment.formats = source.formats;\n\t\t}\n\n\t\t// Adjust for snap to grid, if necessary.\n\t\tcomment = this.objectModel.setCommentAttributes(comment);\n\n\t\tsource.selectedObjectIds.forEach((objId) => {\n\t\t\tif (this.isDataNode(objId)) { // Only add links to data nodes, not comments\n\t\t\t\tcomment.selectedObjectIds.push(objId);\n\t\t\t\tcomment.linkIds.push(this.objectModel.getUniqueId(CREATE_COMMENT_LINK, { \"comment\": comment, \"targetNode\": this.getNode(objId) }));\n\t\t\t}\n\t\t});\n\n\t\treturn comment;\n\t}\n\n\taddComment(data) {\n\t\tthis.store.dispatch({ type: \"ADD_COMMENT\", data: data, pipelineId: this.pipelineId });\n\t\tthis.store.dispatch({ type: \"SHOW_COMMENTS\" });\n\t}\n\n\t// Returns a position for a new comment added by clicking the 'add comment'\n\t// button on the toolbar. It searches for a position that is not already\n\t// occupied by an existing comment.\n\tgetAdjustedCommentPosition(comPos) {\n\t\tconst stgType = this.objectModel.getCanvasConfig().enableSnapToGridType;\n\t\tconst pos = { x_pos: comPos.x, y_pos: comPos.y };\n\n\t\twhile (this.exactlyOverlaps(null, [pos], null)) {\n\t\t\tif (stgType === SNAP_TO_GRID_DURING || stgType === SNAP_TO_GRID_AFTER) {\n\t\t\t\tpos.x_pos += this.objectModel.getCanvasLayout().snapToGridXPx;\n\t\t\t\tpos.y_pos += this.objectModel.getCanvasLayout().snapToGridYPx;\n\t\t\t} else {\n\t\t\t\tpos.x_pos += 10;\n\t\t\t\tpos.y_pos += 10;\n\t\t\t}\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t// Deletes the comment specified by the id passed in.\n\tdeleteComment(id) {\n\t\tconst comment = this.getComment(id);\n\t\tif (comment) {\n\t\t\tthis.deleteComments([comment]);\n\t\t}\n\t}\n\n\t// Deletes the comments in the array passed in and calls the selection\n\t// changed handler.\n\tdeleteComments(comments) {\n\t\tif (comments && comments.length > 0) {\n\t\t\tthis.objectModel.executeWithSelectionChange((inComments) => {\n\t\t\t\tthis.deleteCommentsInternal(inComments);\n\t\t\t}, comments);\n\t\t}\n\t}\n\n\t// Deletes the comments in the array passed in. It does not call the\n\t// selection changed handler.\n\tdeleteCommentsInternal(inComments) {\n\t\tinComments.forEach((n) => {\n\t\t\tthis.store.dispatch({ type: \"DELETE_OBJECT\", data: { id: n.id }, pipelineId: this.pipelineId });\n\t\t});\n\t}\n\n\tgetComments() {\n\t\treturn this.store.getComments(this.pipelineId);\n\t}\n\n\tgetComment(commentId) {\n\t\treturn this.store.getComment(commentId, this.pipelineId);\n\t}\n\n\teditComment(data) {\n\t\tthis.store.dispatch({ type: \"EDIT_COMMENT\", data: data, pipelineId: this.pipelineId });\n\t}\n\n\taddCustomAttrToComments(comIds, attrName, attrValue) {\n\t\tthis.store.dispatch({ type: \"ADD_COMMENT_ATTR\", data: { objIds: comIds, attrName: attrName, attrValue: attrValue }, pipelineId: this.pipelineId });\n\t}\n\n\tremoveCustomAttrFromComments(comIds, attrName) {\n\t\tthis.store.dispatch({ type: \"REMOVE_COMMENT_ATTR\", data: { objIds: comIds, attrName: attrName }, pipelineId: this.pipelineId });\n\t}\n\n\tgetCommentClassName(commentId) {\n\t\tconst comment = this.getComment(commentId);\n\t\treturn (comment ? comment.class_name : null);\n\t}\n\n\tgetCommentStyle(commentId, temporary) {\n\t\tconst comment = this.getComment(commentId);\n\t\tif (temporary) {\n\t\t\treturn (comment ? comment.style_temp : null);\n\t\t}\n\t\treturn (comment ? comment.style : null);\n\t}\n\n\tsetCommentHighlighText(commentIds, highlightText) {\n\t\tthis.store.dispatch({ type: \"SET_COMMENT_HIGHLIGHT_TEXT\", data: { commentIds, highlightText }, pipelineId: this.pipelineId });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Link methods\n\t// ---------------------------------------------------------------------------\n\n\tcreateLink(trgNode, srcNode) {\n\t\tconst linkId = this.objectModel.getUniqueId(CREATE_NODE_LINK, { \"sourceNode\": srcNode, \"targetNode\": trgNode });\n\t\tlet newLink = {\n\t\t\tid: linkId,\n\t\t\tsrcNodeId: srcNode.id,\n\t\t\ttrgNodeId: trgNode.id,\n\t\t\ttype: NODE_LINK\n\t\t};\n\n\t\tif (srcNode.outputs && srcNode.outputs.length > 0) {\n\t\t\tnewLink = Object.assign(newLink, { \"srcNodePortId\": srcNode.outputs[0].id });\n\t\t}\n\t\tif (trgNode.inputs && trgNode.inputs.length > 0) {\n\t\t\tnewLink = Object.assign(newLink, { \"trgNodePortId\": trgNode.inputs[0].id });\n\t\t}\n\n\t\treturn newLink;\n\t}\n\n\tcreateLinkFromInfo(linkInfo) {\n\t\tconst linkId = this.objectModel.getUniqueId(CREATE_NODE_LINK, { \"sourceNodeId\": linkInfo.srcNodeId, \"targetNodeId\": linkInfo.trgNodeId });\n\t\treturn Object.assign({ id: linkId, type: NODE_LINK }, linkInfo);\n\t}\n\n\tdeleteLink(link) {\n\t\tthis.store.dispatch({ type: \"DELETE_LINK\", data: link, pipelineId: this.pipelineId });\n\t}\n\n\tdeleteLinks(linksToDelete) {\n\t\tthis.store.dispatch({ type: \"DELETE_LINKS\", data: { linksToDelete: linksToDelete }, pipelineId: this.pipelineId });\n\t}\n\n\tupdateLinks(links) {\n\t\tthis.store.dispatch({ type: \"UPDATE_LINKS\", data: { linksToUpdate: links }, pipelineId: this.pipelineId });\n\t}\n\n\tupdateLink(link) {\n\t\tthis.updateLinks([link]);\n\t}\n\n\tcreateNodeLinks(data) {\n\t\tconst linkNodeList = [];\n\t\tdata.nodes.forEach((srcInfo) => {\n\t\t\tdata.targetNodes.forEach((trgInfo) => {\n\t\t\t\tconst link = this.createNodeLink(srcInfo, trgInfo, data);\n\t\t\t\tif (link) {\n\t\t\t\t\tlinkNodeList.push(link);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn linkNodeList;\n\t}\n\n\t// Creates a node link from the srcInfo and trgInfo and other link 'data'\n\t// passed in.\n\tcreateNodeLink(srcInfo, trgInfo, data = { type: NODE_LINK }) {\n\t\tconst srcNode = this.getNode(srcInfo.id);\n\t\tconst trgNode = this.getNode(trgInfo.id);\n\t\tconst links = this.getLinks();\n\t\tconst selfRefLinks = this.objectModel.getCanvasConfig().enableSelfRefLinks;\n\n\t\tif ((srcInfo.srcPos && trgInfo.trgPos) || // Fully detached\n\t\t\t\t(srcInfo.srcPos && CanvasUtils.isTrgConnectionAllowedWithDetachedLinks(trgInfo.portId, trgNode, links)) || // Semi-detached\n\t\t\t\t(trgInfo.trgPos && CanvasUtils.isSrcConnectionAllowedWithDetachedLinks(srcInfo.portId, srcNode, links)) || // Semi-detached\n\t\t\t\t(CanvasUtils.isConnectionAllowed(srcInfo.portId, trgInfo.portId, srcNode, trgNode, links, data.type, selfRefLinks))) { // Fully attached\n\t\t\tconst link = {};\n\t\t\tlink.id = data.id ? data.id : this.objectModel.getUniqueId(CREATE_NODE_LINK, { \"sourceNode\": srcNode, \"targetNode\": trgNode });\n\t\t\tlink.type = data.type;\n\t\t\tif (srcInfo.srcPos) {\n\t\t\t\tlink.srcPos = srcInfo.srcPos;\n\t\t\t} else {\n\t\t\t\tlink.srcNodeId = srcInfo.id;\n\t\t\t\tlink.srcNodePortId = srcInfo.portId;\n\t\t\t}\n\t\t\tif (trgInfo.trgPos) {\n\t\t\t\tlink.trgPos = trgInfo.trgPos;\n\t\t\t} else {\n\t\t\t\tlink.trgNodeId = trgInfo.id;\n\t\t\t\tlink.trgNodePortId = trgInfo.portId;\n\t\t\t}\n\t\t\tif (data.class_name) {\n\t\t\t\tlink.class_name = data.class_name;\n\t\t\t}\n\t\t\tif (data.linkName) {\n\t\t\t\tlink.linkName = data.linkName;\n\t\t\t}\n\t\t\treturn link;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Creates a new link object which is attached to a source node but detached\n\t// at the target end. The input data object may contain some or all of the\n\t// link properties because they may be populated by the host application\n\t// in the beforeEditActionHandler.\n\tcreateNodeLinkDetached(data = {}) {\n\t\tconst link = {};\n\t\tlink.id = data.id ? data.id : this.objectModel.getUniqueId(CREATE_NODE_LINK, { \"sourceNode\": this.getNode(data.srcNodeId) });\n\t\tlink.type = NODE_LINK;\n\t\tlink.srcNodeId = data.srcNodeId;\n\t\tlink.srcNodePortId = data.srcNodePortId;\n\t\tlink.trgPos = { x_pos: data.trgPos.x, y_pos: data.trgPos.y };\n\n\t\tif (data.class_name) {\n\t\t\tlink.class_name = data.class_name;\n\t\t}\n\t\tif (data.linkName) {\n\t\t\tlink.linkName = data.linkName;\n\t\t}\n\t\tif (data.typeAttr) {\n\t\t\tlink.typeAttr = data.typeAttr;\n\t\t}\n\t\tif (data.description) {\n\t\t\tlink.description = data.description;\n\t\t}\n\t\treturn link;\n\t}\n\n\tcreateCommentLinks(data = {}) {\n\t\tconst linkCommentList = [];\n\t\tdata.nodes.forEach((srcNodeId) => {\n\t\t\tdata.targetNodes.forEach((trgNodeId) => {\n\t\t\t\tif (CanvasUtils.isCommentLinkConnectionAllowed(srcNodeId, trgNodeId, this.getLinks())) {\n\t\t\t\t\tconst info = {};\n\t\t\t\t\tinfo.id = this.objectModel.getUniqueId(CREATE_COMMENT_LINK, { \"comment\": this.getComment(srcNodeId), \"targetNode\": this.getNode(trgNodeId) });\n\t\t\t\t\tinfo.type = COMMENT_LINK;\n\t\t\t\t\tinfo.srcNodeId = srcNodeId;\n\t\t\t\t\tinfo.trgNodeId = trgNodeId;\n\t\t\t\t\tlinkCommentList.push(info);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn linkCommentList;\n\t}\n\n\taddLinks(linkList) {\n\t\tlinkList.forEach((link) => {\n\t\t\tthis.addLink(link);\n\t\t});\n\t}\n\n\taddLink(link) {\n\t\tthis.store.dispatch({ type: \"ADD_LINK\", data: link, pipelineId: this.pipelineId });\n\t}\n\n\tsetLinks(linkList) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS\", data: linkList, pipelineId: this.pipelineId });\n\t}\n\n\tgetLinks() {\n\t\treturn this.store.getLinks(this.pipelineId);\n\t}\n\n\t// Returns the IDs of all links in the pipeline.\n\tgetLinkIds() {\n\t\treturn this.getLinks().map((l) => l.id);\n\t}\n\n\t// Returns an array of links from canvas info links which link\n\t// any of the nodes or comments passed in.\n\tgetLinksBetween(inNodes, inComments) {\n\t\tconst linksList = this.getLinks();\n\t\tconst filteredLinks = linksList.filter((link) => {\n\t\t\t// All links must point to a node so look for target node first\n\t\t\tif (this.isObjectIdInObjects(link.trgNodeId, inNodes)) {\n\t\t\t\t// Next look for any node or comment as the source object.\n\t\t\t\tif (this.isObjectIdInObjects(link.srcNodeId, inNodes) ||\n\t\t\t\t\t\tthis.isObjectIdInObjects(link.srcNodeId, inComments)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t\treturn filteredLinks;\n\t}\n\n\t// Returns an array of cloned links that refer to the id passed in as either\n\t// the source node or the target node.\n\tgetLinksContainingId(id) {\n\t\treturn this.getLinks()\n\t\t\t.filter((link) => link.srcNodeId === id || link.trgNodeId === id)\n\t\t\t.map((link) => Object.assign({}, link));\n\t}\n\n\t// Returns an array of cloned links that reference one of the objects (nodes\n\t// and/or comments) identified by the array of object IDs passed in. The links\n\t// returned may be of any type.\n\tgetLinksContainingIds(objIdArray) {\n\t\tlet linksArray = [];\n\t\tobjIdArray.forEach((objId) => {\n\t\t\tconst linksForId = this.getLinksContainingId(objId);\n\t\t\tif (linksForId.length > 0) {\n\t\t\t\tlinksArray = CanvasUtils.concatUniqueBasedOnId(linksForId, linksArray);\n\t\t\t}\n\t\t});\n\t\treturn linksArray;\n\t}\n\n\t// Returns an array of cloned node data links that reference one of the\n\t// objects (nodes and/or comments) identified by the array of object IDs\n\t// passed in. The links returned may be of any type.\n\tgetNodeDataLinksContainingIds(objIdArray) {\n\t\treturn this.getLinksContainingIds(objIdArray)\n\t\t\t.filter((link) => link.type === NODE_LINK);\n\t}\n\n\t// Returns an array of links with id as the source ID.\n\tgetLinksContainingSourceId(id) {\n\t\treturn this.getLinks().filter((link) => {\n\t\t\treturn (link.srcNodeId === id);\n\t\t});\n\t}\n\n\t// Returns an array of links with id as the target ID.\n\tgetLinksContainingTargetId(id) {\n\t\treturn this.getLinks().filter((link) => {\n\t\t\treturn (link.trgNodeId === id);\n\t\t});\n\t}\n\n\t// Returns an array of 'attached' links with id as the source ID.\n\t// Note If the link has a srcNodeId and trgNodeId it is attached.\n\tgetAttachedLinksContainingSourceId(id) {\n\t\treturn this.getLinks().filter((link) => {\n\t\t\treturn (link.srcNodeId === id && link.trgNodeId);\n\t\t});\n\t}\n\n\t// Returns an array of 'attached' links with id as the target ID.\n\t// Note: If the link has a trgNodeId and srcNodeId it is attached.\n\tgetAttachedLinksContainingTargetId(id) {\n\t\treturn this.getLinks().filter((link) => {\n\t\t\treturn (link.trgNodeId === id && link.srcNodeId);\n\t\t});\n\t}\n\n\t// Returns an array of node links for the array of nodes passed in.\n\tgetNodeLinks(inNodes) {\n\t\tconst nodeLinks = [];\n\t\tinNodes.forEach((node) => {\n\t\t\tconst allNodeLinks = this.getLinksContainingId(node.id);\n\t\t\tallNodeLinks.forEach((link) => {\n\t\t\t\tif (link.type === NODE_LINK || link.type === ASSOCIATION_LINK) {\n\t\t\t\t\tnodeLinks.push(link);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn nodeLinks;\n\t}\n\n\t// Returns an array of current data links.\n\tgetNodeDataLinks() {\n\t\treturn this.getLinks().filter((l) => l.type === NODE_LINK);\n\t}\n\n\tgetNodeDataLinkFromInfo(srcNodeId, srcPortId, trgNodeId, trgPortId) {\n\t\tconst srcNodePortId = this.getDefaultSrcPortId(srcNodeId, srcPortId);\n\t\tconst trgNodePortId = this.getDefaultTrgPortId(trgNodeId, trgPortId);\n\t\tif (!srcNodePortId || !trgNodePortId) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.getLinks().find((link) => {\n\t\t\tif (link.type === NODE_LINK) {\n\t\t\t\tconst linkSrcNodePortId = this.getDefaultSrcPortId(link.srcNodeId, link.srcNodePortId);\n\t\t\t\tconst linkTrgNodePortId = this.getDefaultTrgPortId(link.trgNodeId, link.trgNodePortId);\n\t\t\t\treturn (link.srcNodeId === srcNodeId &&\n\t\t\t\t\t\t\t\tlinkSrcNodePortId === srcNodePortId &&\n\t\t\t\t\t\t\t\tlink.trgNodeId === trgNodeId &&\n\t\t\t\t\t\t\t\tlinkTrgNodePortId === trgNodePortId);\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\tgetCommentLinkFromInfo(id1, id2) {\n\t\treturn this.getLinks().find((link) => {\n\t\t\tif (link.type === COMMENT_LINK) {\n\t\t\t\treturn (link.srcNodeId === id1 &&\n\t\t\t\t\t\t\t\tlink.trgNodeId === id2) ||\n\t\t\t\t\t\t\t\t(link.srcNodeId === id2 &&\n\t\t\t\t\t\t\t\tlink.trgNodeId === id1);\n\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\tsetCommentProperties(commentId, commentProperties) {\n\t\tthis.store.dispatch({ type: \"SET_COMMENT_PROPERTIES\", data: { commentId: commentId, commentProperties: commentProperties }, pipelineId: this.pipelineId });\n\t}\n\n\tgetNodeAssocLinkFromInfo(id1, id2) {\n\t\treturn this.getLinks().find((link) => {\n\t\t\tif (link.type === ASSOCIATION_LINK) {\n\t\t\t\treturn (link.srcNodeId === id1 &&\n\t\t\t\t\t\t\t\tlink.trgNodeId === id2) ||\n\t\t\t\t\t\t\t\t(link.srcNodeId === id2 &&\n\t\t\t\t\t\t\t\tlink.trgNodeId === id1);\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t// Returns the source port ID for the source node passed in.\n\tgetDefaultSrcPortId(srcNodeId, srcNodePortId) {\n\t\tif (!srcNodePortId) {\n\t\t\tconst srcNode = this.getNode(srcNodeId);\n\t\t\tif (srcNode && srcNode.outputs && srcNode.outputs.length > 0) {\n\t\t\t\treturn srcNode.outputs[0].id;\n\t\t\t}\n\t\t}\n\t\treturn srcNodePortId;\n\t}\n\n\t// Returns the target port ID for the target node passed in.\n\tgetDefaultTrgPortId(trgNodeId, trgNodePortId) {\n\t\tif (!trgNodePortId) {\n\t\t\tconst trgNode = this.getNode(trgNodeId);\n\t\t\tif (trgNode && trgNode.inputs && trgNode.inputs.length > 0) {\n\t\t\t\treturn trgNode.inputs[0].id;\n\t\t\t}\n\t\t}\n\t\treturn trgNodePortId;\n\t}\n\n\tgetLink(linkId) {\n\t\treturn this.store.getLink(linkId, this.pipelineId);\n\t}\n\n\tsetLinkProperties(linkId, linkProperties) {\n\t\tthis.store.dispatch({ type: \"SET_LINK_PROPERTIES\", data: { linkId: linkId, linkProperties: linkProperties }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeDataLinkSrcInfo(linkId, srcNodeId, srcNodePortId) {\n\t\tthis.store.dispatch({ type: \"SET_LINK_SRC_INFO\", data: { linkId: linkId, srcNodeId: srcNodeId, srcNodePortId: srcNodePortId }, pipelineId: this.pipelineId });\n\t}\n\n\tsetNodeDataLinkTrgInfo(linkId, trgNodeId, trgNodePortId) {\n\t\tthis.store.dispatch({ type: \"SET_LINK_TRG_INFO\", data: { linkId: linkId, trgNodeId: trgNodeId, trgNodePortId: trgNodePortId }, pipelineId: this.pipelineId });\n\t}\n\n\tgetLinkClassName(linkId) {\n\t\tconst obj = this.getLink(linkId);\n\t\treturn (obj && obj.class_name ? obj.class_name : null);\n\t}\n\n\tgetLinkStyle(linkId, temporary) {\n\t\tconst obj = this.getLink(linkId);\n\t\tif (temporary) {\n\t\t\treturn (obj && obj.style_temp ? obj.style_temp : null);\n\t\t}\n\t\treturn (obj && obj.style ? obj.style : null);\n\t}\n\n\tsetLinksClassName(linkIds, newClassName) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS_CLASS_NAME\", data: { linkIds: linkIds, newClassName: newClassName }, pipelineId: this.pipelineId });\n\t}\n\n\tsetLinkDecorations(linkId, newDecorations) {\n\t\tthis.store.dispatch({ type: \"SET_LINK_DECORATIONS\", data: { linkId: linkId, decorations: this.ensureDecorationsHaveIds(newDecorations) }, pipelineId: this.pipelineId });\n\t}\n\n\tgetLinkDecorations(linkId) {\n\t\tvar link = this.getLink(linkId);\n\t\treturn (link ? link.decorations : null);\n\t}\n\n\t// Returns true if the comment with the commentId passed in\n\t// is linked to non-selected nodes.\n\tisCommentLinkedToNonSelectedNodes(commentId) {\n\t\tconst commentLinks = this.getLinksContainingId(commentId);\n\t\tconst selectedIds = this.objectModel.getSelectedObjectIds();\n\n\t\tlet linkedToNonSelectedNodes = false;\n\t\tfor (const commentLink of commentLinks) {\n\t\t\tlinkedToNonSelectedNodes = !selectedIds.includes(commentLink.trgNodeId);\n\t\t\tif (linkedToNonSelectedNodes) {\n\t\t\t\treturn linkedToNonSelectedNodes;\n\t\t\t}\n\t\t}\n\t\treturn linkedToNonSelectedNodes;\n\t}\n\n\tpushUniqueLinks(objectLink, linksToDelete) {\n\t\tif (linksToDelete.findIndex((linkToDelete) => linkToDelete.id === objectLink.id) === -1) {\n\t\t\tlinksToDelete.push(objectLink);\n\t\t}\n\t\treturn linksToDelete;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_TOOLTIP_DEF\": {\n\t\tif (action.data.tooltipDef) {\n\t\t\treturn action.data.tooltipDef;\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\n\tcase \"ADD_NODE_TYPES_TO_PALETTE\":\n\t\tif (action.data.nodeTypes) {\n\t\t\treturn [\n\t\t\t\t...state,\n\t\t\t\t...action.data.nodeTypes\n\t\t\t];\n\t\t}\n\t\treturn state;\n\n\tcase \"REMOVE_NODE_TYPES_FROM_PALETTE\": {\n\t\treturn state.filter((nodeType) => {\n\t\t\treturn action.data.selObjectIds.findIndex((objId) => objId === nodeType.id) === -1;\n\t\t});\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport nodetypes from \"./nodetypes.js\";\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\n\tcase \"ADD_NODE_TYPES_TO_PALETTE\": {\n\t\tlet category = state.find((cat) => cat.id === action.data.categoryId);\n\n\t\tif (category) {\n\t\t\treturn state.map((cat) => {\n\t\t\t\tif (action.data.categoryId === cat.id) {\n\t\t\t\t\treturn Object.assign({}, cat, { node_types: nodetypes(cat.node_types, action) });\n\t\t\t\t}\n\t\t\t\treturn cat;\n\t\t\t});\n\t\t}\n\n\t\t// If a category was not found, we create a new one using the ID and label\n\t\t// provided.\n\t\tcategory = {\n\t\t\t\"id\": action.data.categoryId,\n\t\t\t\"label\": action.data.categoryLabel ? action.data.categoryLabel : action.data.categoryId\n\t\t};\n\t\tif (action.data.categoryDescription) {\n\t\t\tcategory.description = action.data.categoryDescription;\n\t\t}\n\t\tif (action.data.categoryImage) {\n\t\t\tcategory.image = action.data.categoryImage;\n\t\t}\n\t\tcategory.node_types = [];\n\n\t\treturn [\n\t\t\t...state,\n\t\t\tObject.assign({}, category, { node_types: nodetypes(category.node_types, action) })\n\t\t];\n\t}\n\n\tcase \"REMOVE_NODE_TYPES_FROM_PALETTE\": {\n\t\treturn state.map((category) => {\n\t\t\tif (category.id === action.data.categoryId) {\n\t\t\t\treturn Object.assign({}, category, { node_types: nodetypes(category.node_types, action) });\n\t\t\t}\n\t\t\treturn category;\n\t\t});\n\t}\n\n\tcase \"SET_CATEGORY_LOADING_TEXT\": {\n\t\treturn state.map((category) => {\n\t\t\tif (category.id === action.data.categoryId) {\n\t\t\t\treturn Object.assign({}, category, { loading_text: action.data.loadingText });\n\t\t\t}\n\t\t\treturn category;\n\t\t});\n\t}\n\n\tcase \"SET_CATEGORY_EMPTY_TEXT\": {\n\t\treturn state.map((category) => {\n\t\t\tif (category.id === action.data.categoryId) {\n\t\t\t\treturn Object.assign({}, category, { empty_text: action.data.emptyText });\n\t\t\t}\n\t\t\treturn category;\n\t\t});\n\t}\n\n\tcase \"SET_IS_OPEN_CATEGORY\": {\n\t\treturn state.map((category) => {\n\t\t\tif (category.id === action.data.categoryId) {\n\t\t\t\treturn Object.assign({}, category, { is_open: action.data.isOpen });\n\t\t\t}\n\t\t\treturn category;\n\t\t});\n\t}\n\n\tcase \"SET_IS_OPEN_ALL_CATEGORIES\": {\n\t\treturn state.map((category) => Object.assign({}, category, { is_open: action.data.isOpen }));\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport categories from \"./categories.js\";\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"CLEAR_PALETTE_DATA\":\n\t\treturn { content: {} };\n\n\tcase \"SET_PALETTE_DATA\": {\n\t\tconst newContent = Object.assign({}, action.data.content);\n\t\treturn Object.assign({}, state, { content: newContent });\n\t}\n\n\tcase \"ADD_NODE_TYPES_TO_PALETTE\":\n\tcase \"REMOVE_NODE_TYPES_FROM_PALETTE\":\n\tcase \"SET_IS_OPEN_CATEGORY\":\n\tcase \"SET_IS_OPEN_ALL_CATEGORIES\":\n\tcase \"SET_CATEGORY_LOADING_TEXT\":\n\tcase \"SET_CATEGORY_EMPTY_TEXT\": {\n\t\tconst newContent = Object.assign({}, state.content, { categories: categories(state.content.categories, action) });\n\t\t// Save version for the palette in case this is the first action performed on an empty palette.\n\t\treturn Object.assign({}, state, { content: newContent, version: \"3.0\" });\n\t}\n\n\tcase \"SET_PALETTE_OPEN_STATE\":\n\t\treturn Object.assign({}, state, { isOpen: action.data.isOpen });\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"SET_INPUT_PORT_LABEL\":\n\tcase \"SET_OUTPUT_PORT_LABEL\":\n\t\treturn state.map((port, index) => {\n\t\t\tif (action.data.portId === port.id) {\n\t\t\t\tconst newPort = Object.assign({}, port);\n\t\t\t\tnewPort.label = action.data.label;\n\t\t\t\treturn newPort;\n\t\t\t}\n\t\t\treturn port;\n\t\t});\n\tcase \"SET_INPUT_PORT_SUBFLOW_NODE_REF\":\n\tcase \"SET_OUTPUT_PORT_SUBFLOW_NODE_REF\":\n\t\treturn state.map((port, index) => {\n\t\t\tif (action.data.portId === port.id) {\n\t\t\t\tconst newPort = Object.assign({}, port);\n\t\t\t\tnewPort.subflow_node_ref = action.data.subflowNodeRef;\n\t\t\t\treturn newPort;\n\t\t\t}\n\t\t\treturn port;\n\t\t});\n\tcase \"UPDATE_CONNECT_FROM_STATUS\":\n\t\treturn state.map((port, index) => {\n\t\t\tif (action.data.portId === port.id) {\n\t\t\t\tconst newPort = Object.assign({}, port);\n\t\t\t\t// Toggle: if already true, make it false; otherwise use the provided value\n\t\t\t\tnewPort.connectFrom = port.connectFrom ? false : action.data.connectFrom;\n\t\t\t\treturn newPort;\n\t\t\t}\n\t\t\treturn port;\n\t\t});\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\nimport { SUPER_NODE }\n\tfrom \"../../../common-canvas/constants/canvas-constants.js\";\nimport ports from \"./ports.js\";\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"ADD_NODE\": {\n\t\treturn [\n\t\t\t...state,\n\t\t\tObject.assign({}, action.data.newNode)\n\t\t];\n\t}\n\n\tcase \"ADD_NODES\": {\n\t\treturn [\n\t\t\t...state,\n\t\t\t...action.data.nodesToAdd\n\t\t];\n\t}\n\n\tcase \"UPDATE_NODES\": {\n\t\treturn state.map((node) => {\n\t\t\tconst updatedNode = action.data.find((newNode) => newNode.id === node.id);\n\t\t\treturn updatedNode || node;\n\t\t});\n\t}\n\n\tcase \"REPLACE_NODES\": {\n\t\treturn action.data;\n\t}\n\n\tcase \"REPLACE_NODE\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.node.id === node.id) {\n\t\t\t\treturn action.data.node;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"MOVE_OBJECTS\":\n\t\t// action.data.nodes contains an array of node and comment Ids\n\t\tif (action.data.nodes) {\n\t\t\treturn state.map((node, index) => {\n\t\t\t\tif (action.data.nodes.indexOf(node.id) > -1) {\n\t\t\t\t\tconst xPos = node.x_pos + action.data.offsetX;\n\t\t\t\t\tconst yPos = node.y_pos + action.data.offsetY;\n\t\t\t\t\treturn Object.assign({}, node, { x_pos: xPos, y_pos: yPos });\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t});\n\t\t}\n\t\treturn state;\n\n\tcase \"SIZE_AND_POSITION_OBJECTS\":\n\t\treturn state.map((node, index) => {\n\t\t\tconst nodeObj = action.data.objectsInfo[node.id];\n\t\t\tif (typeof nodeObj !== \"undefined\") {\n\t\t\t\tconst newNode = Object.assign({}, node, {\n\t\t\t\t\theight: nodeObj.height,\n\t\t\t\t\twidth: nodeObj.width,\n\t\t\t\t\tx_pos: nodeObj.x_pos,\n\t\t\t\t\ty_pos: nodeObj.y_pos\n\t\t\t\t});\n\n\t\t\t\tif (newNode.type === SUPER_NODE && newNode.is_expanded) {\n\t\t\t\t\tnewNode.expanded_width = nodeObj.width;\n\t\t\t\t\tnewNode.expanded_height = nodeObj.height;\n\n\t\t\t\t} else if (nodeObj.isResized) {\n\t\t\t\t\tnewNode.isResized = nodeObj.isResized;\n\t\t\t\t\tnewNode.resizeWidth = nodeObj.resizeWidth;\n\t\t\t\t\tnewNode.resizeHeight = nodeObj.resizeHeight;\n\n\t\t\t\t} else {\n\t\t\t\t\tdelete newNode.isResized;\n\t\t\t\t\tdelete newNode.resizeWidth;\n\t\t\t\t\tdelete newNode.resizeHeight;\n\t\t\t\t}\n\n\t\t\t\treturn newNode;\n\t\t\t}\n\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_POSITIONS\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodePositions && typeof action.data.nodePositions[node.id] !== \"undefined\") {\n\t\t\t\tconst newPosition = action.data.nodePositions[node.id];\n\t\t\t\treturn Object.assign({}, node, { x_pos: newPosition.x_pos, y_pos: newPosition.y_pos });\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\n\tcase \"ADD_SUPERNODES\":\n\t\treturn [...state, ...action.data.supernodesToAdd];\n\n\tcase \"DELETE_SUPERNODES\":\n\t\treturn state.filter((node) => {\n\t\t\tconst removeNode = action.data.supernodesToDelete.some((n) => n.id === node.id);\n\t\t\treturn !removeNode;\n\t\t});\n\n\tcase \"DELETE_OBJECT\":\n\t\treturn state.filter((node) => {\n\t\t\treturn node.id !== action.data.id; // filter will return all objects NOT found\n\t\t});\n\n\tcase \"DELETE_NODES\":\n\t\treturn state.filter((node) => {\n\t\t\tconst nodeFound = action.data.nodesToDelete.some((n) => n.id === node.id);\n\t\t\treturn !nodeFound;\n\t\t});\n\n\tcase \"SET_NODE_PARAMETERS\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.parameters = action.data.parameters;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_UI_PARAMETERS\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.ui_parameters = action.data.ui_parameters;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_MESSAGE\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tif (newNode.messages) {\n\t\t\t\t\tconst controlNameIndex = newNode.messages.findIndex((message) => {\n\t\t\t\t\t\treturn (message.id_ref === action.data.message.id_ref);\n\t\t\t\t\t});\n\t\t\t\t\tif (controlNameIndex > -1) {\n\t\t\t\t\t\tnewNode.messages[controlNameIndex] = action.data.message;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewNode.messages.push(action.data.message);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewNode.messages = [action.data.message];\n\t\t\t\t}\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_MESSAGES\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.messages = action.data.messages;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_SUB_OBJECT_FOCUS_FN\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\treturn { ...node, focusFunction: action.data.focusFunction };\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"ADD_NODE_ATTR\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.objIds.indexOf(node.id) > -1) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.customAttrs = newNode.customAttrs || [];\n\t\t\t\tnewNode.customAttrs.push(action.data.attrName);\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"REMOVE_NODE_ATTR\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.objIds.indexOf(node.id) > -1) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tif (newNode.customAttrs) {\n\t\t\t\t\tnewNode.customAttrs = newNode.customAttrs.filter((a) => {\n\t\t\t\t\t\treturn a !== action.data.attrName;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_LABEL\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.label = action.data.label;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODE_DECORATIONS\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.decorations = action.data.decorations;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_NODES_MULTI_DECORATIONS\":\n\t\treturn state.map((node) => {\n\t\t\tconst pipelineNodeDec =\n\t\t\t\taction.data.pipelineNodeDecorations.find((entry) => entry.pipelineId === action.data.pipelineId && entry.nodeId === node.id);\n\t\t\tif (pipelineNodeDec) {\n\t\t\t\tconst newNode = Object.assign({}, node, { decorations: pipelineNodeDec.decorations });\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_OBJECTS_CLASS_NAME\":\n\t\treturn state.map((node) => {\n\t\t\tconst idx = action.data.objIds.indexOf(node.id);\n\t\t\tif (idx > -1) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tnewNode.class_name =\n\t\t\t\t\tArray.isArray(action.data.newClassName) ? (action.data.newClassName[idx] || null) : action.data.newClassName;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_OBJECTS_STYLE\":\n\t\treturn state.map((node) => {\n\t\t\tif (action.data.objIds.indexOf(node.id) > -1) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewNode.style_temp = action.data.newStyle;\n\t\t\t\t} else {\n\t\t\t\t\tnewNode.style = action.data.newStyle;\n\t\t\t\t}\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_OBJECTS_MULTI_STYLE\":\n\t\treturn state.map((node) => {\n\t\t\tconst pipelineObjStyle =\n\t\t\t\taction.data.pipelineObjStyles.find((entry) => entry.pipelineId === action.data.pipelineId && entry.objId === node.id);\n\t\t\tif (pipelineObjStyle) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tconst style = pipelineObjStyle && pipelineObjStyle.style ? pipelineObjStyle.style : null;\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewNode.style_temp = style;\n\t\t\t\t} else {\n\t\t\t\t\tnewNode.style = style;\n\t\t\t\t}\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"REMOVE_ALL_STYLES\":\n\t\treturn state.map((node) => {\n\t\t\tif (action.data.temporary && node.style_temp) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tdelete newNode.style_temp;\n\t\t\t\treturn newNode;\n\t\t\t} else if (!action.data.temporary && node.style) {\n\t\t\t\tconst newNode = Object.assign({}, node);\n\t\t\t\tdelete newNode.style;\n\t\t\t\treturn newNode;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_OBJECTS_BRANCH_HIGHLIGHT\":\n\t\treturn state.map((node) => {\n\t\t\tif (action.data.objIds.indexOf(node.id) > -1) {\n\t\t\t\treturn Object.assign({}, node, { branchHighlight: true });\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"UNSET_OBJECTS_BRANCH_HIGHLIGHT\":\n\t\treturn state.map((node) => {\n\t\t\tif (node.branchHighlight) {\n\t\t\t\treturn Object.assign({}, node, { branchHighlight: false });\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_INPUT_PORT_LABEL\":\n\tcase \"SET_INPUT_PORT_SUBFLOW_NODE_REF\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\treturn Object.assign({}, node, { inputs: ports(node.inputs, action) });\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_OUTPUT_PORT_LABEL\":\n\tcase \"SET_OUTPUT_PORT_SUBFLOW_NODE_REF\":\n\tcase \"UPDATE_CONNECT_FROM_STATUS\":\n\t\treturn state.map((node, index) => {\n\t\t\tif (action.data.nodeId === node.id) {\n\t\t\t\treturn Object.assign({}, node, { outputs: ports(node.outputs, action) });\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"SET_SUPERNODE_EXPAND_STATE\":\n\t\treturn state.map((node) => {\n\t\t\tif (action.data.node.id === node.id) {\n\t\t\t\treturn action.data.node;\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\n\tcase \"REPLACE_SN_AND_PIPELINES\": {\n\t\treturn state.map((node, index) => {\n\t\t\tif (node.id === action.data.topSupernode.id) {\n\t\t\t\treturn Object.assign({}, action.data.topSupernode);\n\t\t\t}\n\t\t\treturn node;\n\t\t});\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\n\nimport CanvasUtils from \"../../../common-canvas/common-canvas-utils.js\";\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"MOVE_OBJECTS\":\n\t\t// action.data.nodes contains an array of node and comment Ids\n\t\tif (action.data.nodes) {\n\t\t\treturn state.map((comment, index) => {\n\t\t\t\tif (action.data.nodes.indexOf(comment.id) > -1) {\n\t\t\t\t\tconst xPos = comment.x_pos + action.data.offsetX;\n\t\t\t\t\tconst yPos = comment.y_pos + action.data.offsetY;\n\t\t\t\t\treturn Object.assign({}, comment, { x_pos: xPos, y_pos: yPos });\n\t\t\t\t}\n\t\t\t\treturn comment;\n\t\t\t});\n\t\t}\n\t\treturn state;\n\n\tcase \"SET_COMMENT_POSITIONS\":\n\t\treturn state.map((comment, index) => {\n\t\t\tif (action.data.commentPositions && typeof action.data.commentPositions[comment.id] !== \"undefined\") {\n\t\t\t\tconst newPosition = action.data.commentPositions[comment.id];\n\t\t\t\treturn Object.assign({}, comment, { x_pos: newPosition.x_pos, y_pos: newPosition.y_pos });\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"DELETE_OBJECT\":\n\t\treturn state.filter((node) => {\n\t\t\treturn node.id !== action.data.id; // filter will return all objects NOT found\n\t\t});\n\n\tcase \"DELETE_COMMENTS\":\n\t\treturn state.filter((com) => {\n\t\t\tconst comFound = action.data.commentsToDelete.some((c) => c.id === com.id);\n\t\t\treturn !comFound;\n\t\t});\n\n\n\tcase \"ADD_COMMENT\": {\n\t\tconst newComment = getCommentFromData(action.data);\n\t\treturn [\n\t\t\t...state,\n\t\t\tnewComment\n\t\t];\n\t}\n\n\tcase \"ADD_COMMENTS\": {\n\t\tconst comments = action.data.commentsToAdd.map((cd) => getCommentFromData(cd));\n\t\treturn [\n\t\t\t...state,\n\t\t\t...comments\n\t\t];\n\t}\n\n\tcase \"EDIT_COMMENT\":\n\t\treturn state.map((comment, index) => {\n\t\t\tif (action.data.id === comment.id) {\n\t\t\t\tconst newComment = Object.assign({}, comment, {\n\t\t\t\t\tcontent: action.data.content,\n\t\t\t\t\theight: action.data.height,\n\t\t\t\t\twidth: action.data.width,\n\t\t\t\t\tx_pos: action.data.x_pos ? action.data.x_pos : comment.x_pos,\n\t\t\t\t\ty_pos: action.data.y_pos ? action.data.y_pos : comment.y_pos,\n\t\t\t\t\tcontentType: action.data.contentType,\n\t\t\t\t\tformats: action.data.formats\n\t\t\t\t});\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SET_COMMENT_PROPERTIES\":\n\t\treturn state.map((comment) => {\n\t\t\tif (comment.id === action.data.commentId) {\n\t\t\t\treturn Object.assign({}, comment, action.data.commentProperties);\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SIZE_AND_POSITION_OBJECTS\":\n\t\treturn state.map((com, index) => {\n\t\t\tconst comObj = action.data.objectsInfo[com.id];\n\t\t\tif (typeof comObj !== \"undefined\") {\n\t\t\t\tconst newCom = Object.assign({}, com, {\n\t\t\t\t\theight: comObj.height,\n\t\t\t\t\twidth: comObj.width,\n\t\t\t\t\tx_pos: comObj.x_pos,\n\t\t\t\t\ty_pos: comObj.y_pos\n\t\t\t\t});\n\t\t\t\treturn newCom;\n\t\t\t}\n\n\t\t\treturn com;\n\t\t});\n\n\tcase \"ADD_COMMENT_ATTR\":\n\t\treturn state.map((comment, index) => {\n\t\t\tif (action.data.objIds.indexOf(comment.id) > -1) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tnewComment.customAttrs = newComment.customAttrs || [];\n\t\t\t\tnewComment.customAttrs.push(action.data.attrName);\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"REMOVE_COMMENT_ATTR\":\n\t\treturn state.map((comment, index) => {\n\t\t\tif (action.data.objIds.indexOf(comment.id) > -1) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tif (newComment.customAttrs) {\n\t\t\t\t\tnewComment.customAttrs = newComment.customAttrs.filter((a) => {\n\t\t\t\t\t\treturn a !== action.data.attrName;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SET_OBJECTS_COLOR_CLASS_NAME\":\n\t\treturn state.map((comment) => {\n\t\t\tconst idx = action.data.objIds.indexOf(comment.id);\n\t\t\tif (idx > -1) {\n\t\t\t\tconst newColorClass =\n\t\t\t\t\tArray.isArray(action.data.newColorClass) ? (action.data.newColorClass[idx] || null) : action.data.newColorClass;\n\t\t\t\tconst className = replaceColorClass(comment.class_name, newColorClass);\n\t\t\t\tconst newComment = Object.assign({}, comment, { class_name: className });\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\n\tcase \"SET_OBJECTS_CLASS_NAME\":\n\t\treturn state.map((comment) => {\n\t\t\tconst idx = action.data.objIds.indexOf(comment.id);\n\t\t\tif (idx > -1) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tnewComment.class_name =\n\t\t\t\t\tArray.isArray(action.data.newClassName) ? (action.data.newClassName[idx] || null) : action.data.newClassName;\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SET_COMMENT_HIGHLIGHT_TEXT\":\n\t\treturn state.map((comment) => {\n\t\t\tif (!action.data.commentIds || action.data.commentIds.indexOf(comment.id) > -1) {\n\t\t\t\tconst newComment = { ...comment };\n\t\t\t\tif (action.data.highlightText) {\n\t\t\t\t\tnewComment.highlightText = action.data.highlightText;\n\t\t\t\t} else {\n\t\t\t\t\tdelete newComment.highlightText;\n\t\t\t\t}\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SET_OBJECTS_STYLE\":\n\t\treturn state.map((comment) => {\n\t\t\tif (action.data.objIds.indexOf(comment.id) > -1) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewComment.style_temp = action.data.newStyle;\n\t\t\t\t} else {\n\t\t\t\t\tnewComment.style = action.data.newStyle;\n\t\t\t\t}\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"SET_OBJECTS_MULTI_STYLE\":\n\t\treturn state.map((comment) => {\n\t\t\tconst pipelineObjStyle =\n\t\t\t\taction.data.pipelineObjStyles.find((entry) => entry.pipelineId === action.data.pipelineId && entry.objId === comment.id);\n\t\t\tif (pipelineObjStyle) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tconst style = pipelineObjStyle && pipelineObjStyle.style ? pipelineObjStyle.style : null;\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewComment.style_temp = style;\n\t\t\t\t} else {\n\t\t\t\t\tnewComment.style = style;\n\t\t\t\t}\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tcase \"REMOVE_ALL_STYLES\":\n\t\treturn state.map((comment) => {\n\t\t\tif (action.data.temporary && comment.style_temp) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tdelete newComment.style_temp;\n\t\t\t\treturn newComment;\n\t\t\t} else if (!action.data.temporary && comment.style) {\n\t\t\t\tconst newComment = Object.assign({}, comment);\n\t\t\t\tdelete newComment.style;\n\t\t\t\treturn newComment;\n\t\t\t}\n\t\t\treturn comment;\n\t\t});\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nfunction replaceColorClass(className, newColorClass) {\n\tlet cn = \"\";\n\tif (className) {\n\t\tcn = removeCurrentColorClass(className);\n\t\tcn = addNewColorClass(cn, newColorClass);\n\t} else {\n\t\tcn = newColorClass;\n\t}\n\treturn cn;\n}\n\nfunction removeCurrentColorClass(className) {\n\tconst cn = className\n\t\t.split(\" \")\n\t\t.filter((tok) => !CanvasUtils.getBkgColorClass(tok))\n\t\t.join(\" \");\n\treturn cn;\n}\n\nfunction addNewColorClass(className, newColorClass) {\n\treturn className ? className + \" \" + newColorClass : newColorClass;\n}\n\nfunction getCommentFromData(data) {\n\tconst newComment = {\n\t\tid: data.id,\n\t\tcontent: data.content,\n\t\theight: data.height,\n\t\twidth: data.width,\n\t\tx_pos: data.x_pos,\n\t\ty_pos: data.y_pos\n\t};\n\tif (typeof data.class_name !== \"undefined\") {\n\t\tnewComment.class_name = data.class_name;\n\t}\n\tif (typeof data.contentType !== \"undefined\") {\n\t\tnewComment.contentType = data.contentType;\n\t}\n\tif (typeof data.formats !== \"undefined\") {\n\t\tnewComment.formats = data.formats;\n\t}\n\treturn newComment;\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\nimport { COMMENT_LINK } from \"../../../common-canvas/constants/canvas-constants.js\";\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"DELETE_SUPERNODES\":\n\t\treturn state.filter((link) => {\n\t\t\tconst removeLink = action.data.supernodesToDelete.some((sn) => {\n\t\t\t\treturn (link.srcNodeId === sn.id || // If node being deleted is either source or target of link remove this link\n\t\t\t\t\tlink.trgNodeId === sn.id);\n\t\t\t});\n\t\t\treturn !removeLink;\n\t\t});\n\n\tcase \"DELETE_OBJECT\":\n\t\treturn state.filter((link) => {\n\t\t\treturn (link.srcNodeId !== action.data.id && // If node being deleted is either source or target of link remove this link\n\t\t\t\tlink.trgNodeId !== action.data.id);\n\t\t});\n\n\tcase \"REMOVE_LINKS\":\n\t\treturn state.filter((link) => {\n\t\t\tconst linkFound = action.data.linksToDelete.some((l) => l.id === link.id);\n\t\t\treturn !linkFound;\n\t\t});\n\n\n\tcase \"ADD_LINK\": {\n\t\tconst newLink = {\n\t\t\tid: action.data.id\n\t\t};\n\t\taddAttr(newLink, \"type\", action.data.type);\n\t\taddAttr(newLink, \"class_name\", action.data.class_name);\n\t\taddAttr(newLink, \"srcPos\", action.data.srcPos);\n\t\taddAttr(newLink, \"srcNodeId\", action.data.srcNodeId);\n\t\taddAttr(newLink, \"srcNodePortId\", action.data.srcNodePortId);\n\t\taddAttr(newLink, \"trgPos\", action.data.trgPos);\n\t\taddAttr(newLink, \"trgNodeId\", action.data.trgNodeId);\n\t\taddAttr(newLink, \"trgNodePortId\", action.data.trgNodePortId);\n\t\taddAttr(newLink, \"decorations\", action.data.decorations);\n\t\taddAttr(newLink, \"style\", action.data.style);\n\t\taddAttr(newLink, \"style_temp\", action.data.style_temp);\n\t\taddAttr(newLink, \"linkName\", action.data.linkName);\n\t\taddAttr(newLink, \"typeAttr\", action.data.typeAttr);\n\t\taddAttr(newLink, \"description\", action.data.description);\n\t\taddAttr(newLink, \"app_data\", action.data.app_data);\n\n\t\treturn [\n\t\t\t...state,\n\t\t\tnewLink\n\t\t];\n\t}\n\n\tcase \"ADD_LINKS\":\n\t\treturn [\n\t\t\t...state,\n\t\t\t...action.data.linksToAdd\n\t\t];\n\n\tcase \"SET_LINKS\":\n\t\treturn [\n\t\t\t...action.data,\n\t\t];\n\n\tcase \"MOVE_OBJECTS\":\n\t\treturn state.map((link) => {\n\t\t\tif (action.data.links) {\n\t\t\t\tconst index = action.data.links.findIndex((l) => l.id === link.id);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\t\tif (newLink.srcPos) {\n\t\t\t\t\t\tnewLink.srcPos.x_pos += action.data.offsetX;\n\t\t\t\t\t\tnewLink.srcPos.y_pos += action.data.offsetY;\n\t\t\t\t\t}\n\t\t\t\t\tif (newLink.trgPos) {\n\t\t\t\t\t\tnewLink.trgPos.x_pos += action.data.offsetX;\n\t\t\t\t\t\tnewLink.trgPos.y_pos += action.data.offsetY;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINK_POSITIONS\":\n\t\treturn state.map((link, index) => {\n\t\t\tif (action.data.linkPositions && typeof action.data.linkPositions[link.id] !== \"undefined\") {\n\t\t\t\tlet newLink = Object.assign({}, link);\n\t\t\t\tif (action.data.linkPositions[link.id].srcPos) {\n\t\t\t\t\tnewLink = Object.assign(newLink, { srcPos: action.data.linkPositions[link.id].srcPos });\n\t\t\t\t}\n\t\t\t\tif (action.data.linkPositions[link.id].trgPos) {\n\t\t\t\t\tnewLink = Object.assign(newLink, { trgPos: action.data.linkPositions[link.id].trgPos });\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SIZE_AND_POSITION_OBJECTS\":\n\t\treturn state.map((link, index) => {\n\t\t\tif (action.data.linksInfo && typeof action.data.linksInfo[link.id] !== \"undefined\") {\n\t\t\t\tlet newLink = Object.assign({}, link);\n\t\t\t\tif (action.data.linksInfo[link.id].srcPos) {\n\t\t\t\t\tnewLink = Object.assign(newLink, { srcPos: action.data.linksInfo[link.id].srcPos });\n\t\t\t\t}\n\t\t\t\tif (action.data.linksInfo[link.id].trgPos) {\n\t\t\t\t\tnewLink = Object.assign(newLink, { trgPos: action.data.linksInfo[link.id].trgPos });\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINK_PROPERTIES\":\n\t\treturn state.map((link) => {\n\t\t\tif (link.id === action.data.linkId) {\n\t\t\t\treturn Object.assign({}, link, action.data.linkProperties);\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINK_SRC_INFO\":\n\t\treturn state.map((link) => {\n\t\t\tif (link.id === action.data.linkId) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tdelete newLink.srcNodeId;\n\t\t\t\tdelete newLink.srcNodePortId;\n\t\t\t\tdelete newLink.srcPos;\n\t\t\t\tnewLink.srcNodeId = action.data.srcNodeId;\n\t\t\t\tif (action.data.srcNodePortId) {\n\t\t\t\t\tnewLink.srcNodePortId = action.data.srcNodePortId;\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINK_TRG_INFO\":\n\t\treturn state.map((link) => {\n\t\t\tif (link.id === action.data.linkId) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tdelete newLink.trgNodeId;\n\t\t\t\tdelete newLink.trgNodePortId;\n\t\t\t\tdelete newLink.trgPos;\n\t\t\t\tnewLink.trgNodeId = action.data.trgNodeId;\n\t\t\t\tif (action.data.trgNodePortId) {\n\t\t\t\t\tnewLink.trgNodePortId = action.data.trgNodePortId;\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"DELETE_LINK\":\n\t\treturn state.filter((link) => {\n\t\t\treturn link.id !== action.data.id;\n\t\t});\n\n\tcase \"DELETE_LINKS\": {\n\t\treturn state.filter((link) => {\n\t\t\treturn action.data.linksToDelete.findIndex((delLnk) => link.id === delLnk.id) === -1;\n\t\t});\n\t}\n\n\tcase \"UPDATE_LINKS\": {\n\t\tif (action.data.linksToUpdate) {\n\t\t\treturn state.map((link) => {\n\t\t\t\tconst linkToUpdate = action.data.linksToUpdate.find((l) => l.id === link.id);\n\t\t\t\tif (linkToUpdate) {\n\t\t\t\t\tconst newLink = Object.assign({}, link, linkToUpdate);\n\t\t\t\t\t// Each link can only have either srcNodeId/srcNodePortId or srcPos so\n\t\t\t\t\t// ensure the one is deleted in the presence of the other.\n\t\t\t\t\tif (linkToUpdate.srcPos) {\n\t\t\t\t\t\tdelete newLink.srcNodeId;\n\t\t\t\t\t\tdelete newLink.srcNodePortId;\n\t\t\t\t\t} else if (linkToUpdate.srcNodeId) {\n\t\t\t\t\t\tdelete newLink.srcPos;\n\t\t\t\t\t}\n\t\t\t\t\t// Each link can only have either trgNodeId/trgNodePortId or trgPos so\n\t\t\t\t\t// ensure the one is deleted in the presence of the other.\n\t\t\t\t\tif (linkToUpdate.trgPos) {\n\t\t\t\t\t\tdelete newLink.trgNodeId;\n\t\t\t\t\t\tdelete newLink.trgNodePortId;\n\t\t\t\t\t} else if (linkToUpdate.trgNodeId) {\n\t\t\t\t\t\tdelete newLink.trgPos;\n\t\t\t\t\t}\n\t\t\t\t\treturn newLink;\n\t\t\t\t}\n\t\t\t\treturn link;\n\t\t\t});\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"SET_LINKS_CLASS_NAME\":\n\t\treturn state.map((link) => {\n\t\t\tconst idx = action.data.linkIds.indexOf(link.id);\n\t\t\tif (idx > -1) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tnewLink.class_name =\n\t\t\t\t\tArray.isArray(action.data.newClassName) ? action.data.newClassName[idx] : action.data.newClassName;\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINKS_STYLE\":\n\t\treturn state.map((link) => {\n\t\t\tif (action.data.objIds.indexOf(link.id) > -1) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewLink.style_temp = action.data.newStyle;\n\t\t\t\t} else {\n\t\t\t\t\tnewLink.style = action.data.newStyle;\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINKS_MULTI_STYLE\":\n\t\treturn state.map((link) => {\n\t\t\tconst pipelineObjStyle =\n\t\t\t\taction.data.pipelineObjStyles.find((entry) => entry.pipelineId === action.data.pipelineId && entry.objId === link.id);\n\t\t\tif (pipelineObjStyle) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tconst style = pipelineObjStyle && pipelineObjStyle.style ? pipelineObjStyle.style : null;\n\t\t\t\tif (action.data.temporary) {\n\t\t\t\t\tnewLink.style_temp = style;\n\t\t\t\t} else {\n\t\t\t\t\tnewLink.style = style;\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINKS_BRANCH_HIGHLIGHT\":\n\t\treturn state.map((link) => {\n\t\t\tif (action.data.objIds.indexOf(link.id) > -1) {\n\t\t\t\treturn Object.assign({}, link, { branchHighlight: true });\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"UNSET_OBJECTS_BRANCH_HIGHLIGHT\":\n\t\treturn state.map((link) => {\n\t\t\tif (link.branchHighlight) {\n\t\t\t\treturn Object.assign({}, link, { branchHighlight: false });\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINK_DECORATIONS\":\n\t\treturn state.map((link, index) => {\n\t\t\tif (action.data.linkId === link.id) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tnewLink.decorations = action.data.decorations;\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"SET_LINKS_MULTI_DECORATIONS\":\n\t\treturn state.map((link) => {\n\t\t\tconst pipelineLinkDec =\n\t\t\t\taction.data.pipelineLinkDecorations.find((entry) => entry.pipelineId === action.data.pipelineId && entry.linkId === link.id);\n\t\t\tif (pipelineLinkDec) {\n\t\t\t\tconst newLink = Object.assign({}, link, { decorations: pipelineLinkDec.decorations });\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\tcase \"REMOVE_ALL_STYLES\":\n\t\treturn state.map((link) => {\n\t\t\tif (action.data.temporary && link.style_temp) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tdelete newLink.style_temp;\n\t\t\t\treturn newLink;\n\t\t\t} else if (!action.data.temporary && link.style) {\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\tdelete newLink.style;\n\t\t\t\treturn newLink;\n\t\t\t}\n\t\t\treturn link;\n\t\t});\n\n\n\t// When a comment is added, links have to be created from the comment\n\t// to each of the selected nodes.\n\tcase \"ADD_COMMENT\": {\n\t\tconst createdLinks = [];\n\t\tif (action.data.selectedObjectIds) {\n\t\t\taction.data.selectedObjectIds.forEach((objId, i) => {\n\t\t\t\tcreatedLinks.push({\n\t\t\t\t\tid: action.data.linkIds[i],\n\t\t\t\t\tsrcNodeId: action.data.id,\n\t\t\t\t\ttrgNodeId: action.data.selectedObjectIds[i],\n\t\t\t\t\ttype: COMMENT_LINK\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn [\n\t\t\t...state,\n\t\t\t...createdLinks\n\t\t];\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n\n// Assigns the value, if it is not undefined, to the object using the key.\nfunction addAttr(obj, key, value) {\n\tif (typeof value !== \"undefined\") {\n\t\tobj[key] = value;\n\t}\n}\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint arrow-body-style: [\"off\"] */\n\nimport nodes from \"./nodes.js\";\nimport comments from \"./comments.js\";\nimport links from \"./links.js\";\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\n\tcase \"SET_CANVAS_INFO\": {\n\t\tif (action.canvasInfo) {\n\t\t\treturn Object.assign({}, action.canvasInfo);\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"SET_CANVAS_CONFIG_INFO\":\n\tcase \"REPLACE_PIPELINES\": {\n\t\treturn Object.assign({}, state, { pipelines: action.data.pipelines });\n\t}\n\n\t// Add pipelines from the external pipeline flow into the canvas info pipelines array\n\tcase \"ADD_EXTERNAL_PIPELINE_FLOW\": {\n\t\tconst pipelines = action.newPipelines.map((p) => Object.assign({}, p));\n\t\tconst canvasInfoPipelines = state.pipelines.concat(pipelines);\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"REMOVE_EXTERNAL_PIPELINE_FLOW\": {\n\t\tconst canvasInfoPipelines = state.pipelines.filter((pipeline) => {\n\t\t\tif (pipeline.parentUrl) {\n\t\t\t\treturn pipeline.parentUrl !== action.externalUrl;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"REPLACE_SN_AND_PIPELINES\": {\n\t\t// First filter out all the old pipelines.\n\t\tlet canvasInfoPipelines = state.pipelines.filter((pipeline) => {\n\t\t\tconst removePipeline = action.data.pipelinesToRemove.some((p) => p.id === pipeline.id);\n\t\t\treturn !removePipeline;\n\t\t});\n\n\t\t// Next change the topSupernode because that will have been altered\n\t\tcanvasInfoPipelines = canvasInfoPipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === action.data.pipelineId) {\n\t\t\t\treturn Object.assign({}, pipeline, { nodes: nodes(pipeline.nodes, action) });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\n\t\t// Then add the new pipelines\n\t\tcanvasInfoPipelines = canvasInfoPipelines.concat(action.data.pipelinesToAdd);\n\n\t\t// Finally, add the pipelines into the canvas info.\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_PIPELINE_PARENT_URL\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (action.data.pipelines.some((p) => p.id === pipeline.id)) {\n\t\t\t\tconst newPipeline = Object.assign({}, pipeline);\n\t\t\t\tif (action.data.url) {\n\t\t\t\t\tnewPipeline.parentUrl = action.data.url;\n\t\t\t\t} else {\n\t\t\t\t\tdelete newPipeline.parentUrl;\n\t\t\t\t}\n\t\t\t\treturn newPipeline;\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\t// Delete a pipeline from the pipeline flow pipelines array.\n\tcase \"DELETE_PIPELINE\": {\n\t\tconst canvasInfoPipelines = state.pipelines.filter((pipeline) => {\n\t\t\treturn pipeline.id !== action.data.id;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_ZOOM\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === action.pipelineId) {\n\t\t\t\treturn Object.assign({}, pipeline, { zoom: { \"k\": action.data.zoom.k, \"x\": action.data.zoom.x, \"y\": action.data.zoom.y } });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"ADD_SUPERNODES\": {\n\t\tlet canvasInfoPipelines = [\n\t\t\t...state.pipelines,\n\t\t\t...action.data.pipelinesToAdd\n\t\t];\n\n\t\tcanvasInfoPipelines = canvasInfoPipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === action.data.pipelineId) {\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action)\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"DELETE_SUPERNODES\": {\n\t\tlet canvasInfoPipelines = state.pipelines.filter((pipeline) => {\n\t\t\tconst removePipeline = action.data.pipelinesToDelete.some((p) => p.id === pipeline.id);\n\t\t\treturn !removePipeline;\n\t\t});\n\n\t\tcanvasInfoPipelines = canvasInfoPipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === action.data.pipelineId) {\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\t\tlinks: links(pipeline.links, action)\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_SUBDUE_STYLE\":\n\t\treturn Object.assign({}, state, { subdueStyle: action.data.subdueStyle });\n\n\tcase \"HIDE_COMMENTS\": {\n\t\treturn { ...state, hideComments: true };\n\t}\n\n\tcase \"SHOW_COMMENTS\": {\n\t\treturn { ...state, hideComments: false };\n\t}\n\n\tcase \"ADD_NODE\":\n\tcase \"UPDATE_NODES\":\n\tcase \"REPLACE_NODES\":\n\tcase \"REPLACE_NODE\":\n\tcase \"SIZE_AND_POSITION_OBJECTS\":\n\tcase \"SET_NODE_PARAMETERS\":\n\tcase \"SET_NODE_UI_PARAMETERS\":\n\tcase \"SET_NODE_MESSAGE\":\n\tcase \"SET_NODE_MESSAGES\":\n\tcase \"SET_NODE_DECORATIONS\":\n\tcase \"SET_LINK_DECORATIONS\":\n\tcase \"ADD_NODE_ATTR\":\n\tcase \"REMOVE_NODE_ATTR\":\n\tcase \"SET_NODE_LABEL\":\n\tcase \"SET_OBJECTS_CLASS_NAME\":\n\tcase \"SET_OBJECTS_COLOR_CLASS_NAME\":\n\tcase \"SET_INPUT_PORT_LABEL\":\n\tcase \"SET_OUTPUT_PORT_LABEL\":\n\tcase \"SET_INPUT_PORT_SUBFLOW_NODE_REF\":\n\tcase \"SET_OUTPUT_PORT_SUBFLOW_NODE_REF\":\n\tcase \"UPDATE_CONNECT_FROM_STATUS\":\n\tcase \"SET_NODE_SUB_OBJECT_FOCUS_FN\":\n\tcase \"SET_COMMENT_HIGHLIGHT_TEXT\":\n\tcase \"MOVE_OBJECTS\":\n\tcase \"DELETE_OBJECT\":\n\tcase \"ADD_LINK\":\n\tcase \"SET_LINKS\":\n\tcase \"SET_LINK_PROPERTIES\":\n\tcase \"SET_LINK_SRC_INFO\":\n\tcase \"SET_LINK_TRG_INFO\":\n\tcase \"SET_LINKS_CLASS_NAME\":\n\tcase \"DELETE_LINK\":\n\tcase \"DELETE_LINKS\":\n\tcase \"UPDATE_LINKS\":\n\tcase \"ADD_COMMENT\":\n\tcase \"EDIT_COMMENT\":\n\tcase \"SET_COMMENT_PROPERTIES\":\n\tcase \"ADD_COMMENT_ATTR\":\n\tcase \"REMOVE_COMMENT_ATTR\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (pipeline.id === action.pipelineId) {\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\t\tcomments: comments(pipeline.comments, action),\n\t\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"DELETE_AND_UPDATE_OBJECTS\": {\n\t\tlet canvasInfoPipelines = state.pipelines\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.pipelineId) {\n\t\t\t\t\t// Update Links\n\t\t\t\t\tlet newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"UPDATE_LINKS\", data: { linksToUpdate: action.data.linksToUpdate || [] } });\n\n\t\t\t\t\t// Delete Links\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"DELETE_LINKS\", data: { linksToDelete: action.data.linksToDelete || [] } });\n\n\t\t\t\t\t// Delete Supernodes\n\t\t\t\t\tlet newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"DELETE_SUPERNODES\", data: { supernodesToDelete: action.data.supernodesToDelete || [] } });\n\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"DELETE_SUPERNODES\", data: { supernodesToDelete: action.data.supernodesToDelete || [] } });\n\n\t\t\t\t\t// Delete Nodes\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"DELETE_NODES\", data: { nodesToDelete: action.data.nodesToDelete || [] } });\n\n\t\t\t\t\t// Delete Comments\n\t\t\t\t\tconst newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"DELETE_COMMENTS\", data: { commentsToDelete: action.data.commentsToDelete || [] } });\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\n\t\tcanvasInfoPipelines = canvasInfoPipelines.filter((pipeline) => {\n\t\t\tconst removePipeline = action.data.pipelinesToDelete.some((p) => p.id === pipeline.id);\n\t\t\treturn !removePipeline;\n\t\t});\n\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"ADD_PASTED_OBJECTS\":\n\tcase \"ADD_AND_UPDATE_OBJECTS\": {\n\t\tlet canvasInfoPipelines = state.pipelines\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.pipelineId) {\n\n\t\t\t\t\t// Add Supernodes\n\t\t\t\t\tlet newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"ADD_SUPERNODES\", data: { supernodesToAdd: action.data.supernodesToAdd || [] } });\n\n\t\t\t\t\t// Add Nodes\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"ADD_NODES\", data: { nodesToAdd: action.data.nodesToAdd || [] } });\n\n\t\t\t\t\t// Add Comments\n\t\t\t\t\tconst newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"ADD_COMMENTS\", data: { commentsToAdd: action.data.commentsToAdd || [] } });\n\n\t\t\t\t\t// Add Links\n\t\t\t\t\tlet newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"ADD_LINKS\", data: { linksToAdd: action.data.linksToAdd || [] } });\n\n\t\t\t\t\t// Update Links\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"UPDATE_LINKS\", data: { linksToUpdate: action.data.linksToUpdate || [] } });\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\n\t\tcanvasInfoPipelines = [\n\t\t\t...canvasInfoPipelines,\n\t\t\t...action.data.pipelinesToAdd\n\t\t];\n\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"DELETE_PASTED_OBJECTS\": {\n\t\tconst canvasInfoPipelines = state.pipelines\n\t\t\t// Filter out the pipelines to delete\n\t\t\t.filter((pipeline) => (!isPipelineToDelete(pipeline, action.data.pipelinesToDelete)))\n\t\t\t// Modify the pipeline to remove nodes, comments and links\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.pipelineId) {\n\t\t\t\t\t// Remove pasted nodes\n\t\t\t\t\tconst newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"DELETE_NODES\", data: action.data });\n\n\t\t\t\t\t// Remove pasted comments\n\t\t\t\t\tconst newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"DELETE_COMMENTS\", data: action.data });\n\n\t\t\t\t\t// Remove pasted links\n\t\t\t\t\tconst newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"REMOVE_LINKS\", data: action.data });\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_SUPERNODE_EXPAND_STATE\": {\n\t\tconst canvasInfoPipelines = state.pipelines\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.pipelineId) {\n\t\t\t\t\t// Add nodes, comments and links to main pipeline\n\t\t\t\t\tlet newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"SET_SUPERNODE_EXPAND_STATE\", data: action.data });\n\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"SET_NODE_POSITIONS\", data: { nodePositions: action.data.objectPositions } });\n\n\t\t\t\t\tconst newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"SET_COMMENT_POSITIONS\", data: { commentPositions: action.data.objectPositions } });\n\n\t\t\t\t\tconst newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"SET_LINK_POSITIONS\", data: action.data });\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"DECONSTRUCT_SUPERNODE\": {\n\t\tconst canvasInfoPipelines = state.pipelines\n\t\t\t// Filter out the pipeline to delete\n\t\t\t.filter((p) => p.id !== action.data.pipelineToDelete.id)\n\t\t\t// Modify the pipeline where the supernode exists\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.data.pipelineId) {\n\t\t\t\t\t// Add nodes, comments and links to main pipeline\n\t\t\t\t\tlet newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"ADD_NODES\", data: action.data });\n\n\t\t\t\t\tlet newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"ADD_COMMENTS\", data: action.data });\n\n\t\t\t\t\tlet newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"ADD_LINKS\", data: action.data });\n\n\t\t\t\t\t// Delete supernode\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"DELETE_SUPERNODES\", data: { supernodesToDelete: [action.data.supernodeToDelete] } });\n\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"DELETE_SUPERNODES\", data: { supernodesToDelete: [action.data.supernodeToDelete] } });\n\n\t\t\t\t\t// Set object positions to their expanded positions\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"SET_NODE_POSITIONS\", data: { nodePositions: action.data.newObjectPositions } });\n\n\t\t\t\t\tnewComments = comments(newComments,\n\t\t\t\t\t\t{ type: \"SET_COMMENT_POSITIONS\", data: { commentPositions: action.data.newObjectPositions } });\n\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"SET_LINK_POSITIONS\", data: { linkPositions: action.data.newLinkPositions } });\n\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"RECONSTRUCT_SUPERNODE\": {\n\t\t// Add back the pipeline that was deleted.\n\t\tlet canvasInfoPipelines = [\n\t\t\t...state.pipelines,\n\t\t\taction.data.pipelineToDelete\n\t\t];\n\n\t\tcanvasInfoPipelines = canvasInfoPipelines\n\t\t\t.map((pipeline) => {\n\t\t\t\tif (pipeline.id === action.data.pipelineId) {\n\t\t\t\t\t// Remove nodes, comments and links from main pipeline that were previously added\n\t\t\t\t\tlet newNodes = nodes(pipeline.nodes,\n\t\t\t\t\t\t{ type: \"DELETE_NODES\", data: { nodesToDelete: action.data.nodesToAdd } });\n\n\t\t\t\t\tlet newComments = comments(pipeline.comments,\n\t\t\t\t\t\t{ type: \"DELETE_COMMENTS\", data: { commentsToDelete: action.data.commentsToAdd } });\n\n\t\t\t\t\tlet newLinks = links(pipeline.links,\n\t\t\t\t\t\t{ type: \"REMOVE_LINKS\", data: { linksToDelete: action.data.linksToAdd } });\n\n\t\t\t\t\t// Add back the supernode\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"ADD_SUPERNODES\", data: { supernodesToAdd: [action.data.supernodeToDelete] } });\n\n\t\t\t\t\t// Add back removed links\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"ADD_LINKS\", data: { linksToAdd: action.data.linksToRemove } });\n\n\t\t\t\t\t// newLinks = links(newLinks,\n\t\t\t\t\t// \t{ type: \"DELETE_SUPERNODES\", data: { supernodesToDelete: [action.data.supernodeToDelete] } });\n\n\t\t\t\t\t// Set object positions to their expanded positions\n\t\t\t\t\tnewNodes = nodes(newNodes,\n\t\t\t\t\t\t{ type: \"SET_NODE_POSITIONS\", data: { nodePositions: action.data.oldObjectPositions } });\n\n\t\t\t\t\tnewComments = comments(newComments,\n\t\t\t\t\t\t{ type: \"SET_COMMENT_POSITIONS\", data: { commentPositions: action.data.oldObjectPositions } });\n\n\t\t\t\t\tnewLinks = links(newLinks,\n\t\t\t\t\t\t{ type: \"SET_LINK_POSITIONS\", data: { linkPositions: action.data.oldLinkPositions } });\n\n\t\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\t\tnodes: newNodes,\n\t\t\t\t\t\tcomments: newComments,\n\t\t\t\t\t\tlinks: newLinks });\n\t\t\t\t}\n\t\t\t\treturn pipeline;\n\t\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_OBJECTS_STYLE\":\n\tcase \"SET_LINKS_STYLE\":\n\tcase \"SET_OBJECTS_BRANCH_HIGHLIGHT\":\n\tcase \"SET_LINKS_BRANCH_HIGHLIGHT\": {\n\t\tconst pipelineIds = Object.keys(action.data.pipelineObjIds);\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (pipelineIds.indexOf(pipeline.id) > -1) {\n\t\t\t\taction.data.objIds = action.data.pipelineObjIds[pipeline.id];\n\t\t\t\taction.data.pipelineId = pipeline.id;\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\t\tcomments: comments(pipeline.comments, action),\n\t\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"UNSET_OBJECTS_BRANCH_HIGHLIGHT\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\tcomments: comments(pipeline.comments, action),\n\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\n\tcase \"SET_OBJECTS_MULTI_STYLE\":\n\tcase \"SET_LINKS_MULTI_STYLE\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (action.data.pipelineObjStyles.findIndex((entry) => entry.pipelineId === pipeline.id) > -1) {\n\t\t\t\taction.data.pipelineId = pipeline.id;\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\t\tcomments: comments(pipeline.comments, action),\n\t\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\n\t}\n\n\tcase \"SET_NODES_MULTI_DECORATIONS\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (action.data.pipelineNodeDecorations.findIndex((entry) => entry.pipelineId === pipeline.id) > -1) {\n\t\t\t\taction.data.pipelineId = pipeline.id;\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\t\tcomments: pipeline.comments,\n\t\t\t\t\tlinks: pipeline.links });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\n\t}\n\n\tcase \"SET_LINKS_MULTI_DECORATIONS\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\tif (action.data.pipelineLinkDecorations.findIndex((entry) => entry.pipelineId === pipeline.id) > -1) {\n\t\t\t\taction.data.pipelineId = pipeline.id;\n\t\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\t\tnodes: pipeline.nodes,\n\t\t\t\t\tcomments: pipeline.comments,\n\t\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t\t}\n\t\t\treturn pipeline;\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\n\t}\n\n\tcase \"REMOVE_ALL_STYLES\": {\n\t\tconst canvasInfoPipelines = state.pipelines.map((pipeline) => {\n\t\t\treturn Object.assign({}, pipeline, {\n\t\t\t\tnodes: nodes(pipeline.nodes, action),\n\t\t\t\tcomments: comments(pipeline.comments, action),\n\t\t\t\tlinks: links(pipeline.links, action) });\n\t\t});\n\t\treturn Object.assign({}, state, { pipelines: canvasInfoPipelines });\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nfunction isPipelineToDelete(pipeline, pipelinesToDelete) {\n\treturn (pipelinesToDelete.some((p) => p.id === pipeline.id));\n}\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"OPEN_CONTEXT_MENU\": {\n\t\tconst menuDef = action.data.menuDef.map((m) => Object.assign({}, m));\n\t\tif (menuDef.length > 0) {\n\t\t\treturn Object.assign({}, state, { isOpen: true, menuDef, source: action.data.source });\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"CLOSE_CONTEXT_MENU\": {\n\t\treturn Object.assign({}, state, { isOpen: false });\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_LEFT_FLYOUT_CONFIG\": {\n\t\tif (action.data.config) {\n\t\t\treturn {\n\t\t\t\tcontent: action.data.config.content,\n\t\t\t\tisOpen: action.data.config.isOpen };\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_RIGHT_FLYOUT_CONFIG\": {\n\t\tif (action.data.config) {\n\t\t\treturn Object.assign({}, state, action.data.config);\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_BOTTOM_PANEL_CONFIG\": {\n\t\tif (action.data.config) {\n\t\t\treturn Object.assign({}, state, action.data.config);\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_TOP_PANEL_CONFIG\": {\n\t\tif (action.data.config) {\n\t\t\treturn Object.assign({}, state, action.data.config);\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"SET_CANVAS_INFO\": {\n\t\t// In some instances, with an external object model, the same canvas may\n\t\t// be set multiple times. Consequently, we only reset the breadcrumbs if\n\t\t// we're given a completely new canvas OR the primary pipeline ID has changed\n\t\t// OR the current breadcrumb does not reference a pipeline Id in the incoming\n\t\t// pipelineFlow, which might happen if the pipeline has been removed.\n\t\tif (action.canvasInfoIdChanged ||\n\t\t\t\taction.primaryPipelineIdChanged ||\n\t\t\t\t!isCurrentBreadcrumbInPipelineFlow(state, action.canvasInfo)) {\n\t\t\treturn [{ pipelineId: action.canvasInfo.primary_pipeline, pipelineFlowId: action.canvasInfo.id }];\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"SET_BREADCRUMBS\":\n\t\treturn action.data.breadcrumbs.map((a) => Object.assign({}, a));\n\n\tcase \"ADD_BREADCRUMB\":\n\t\treturn [\n\t\t\t...state,\n\t\t\t{\n\t\t\t\tpipelineId: action.data.pipelineId,\n\t\t\t\tsupernodeId: action.data.supernodeId,\n\t\t\t\tsupernodeParentPipelineId: action.data.supernodeParentPipelineId,\n\t\t\t\texternalUrl: action.data.externalUrl,\n\t\t\t\tlabel: action.data.label\n\t\t\t}\n\t\t];\n\n\tcase \"ADD_BREADCRUMBS\":\n\t\treturn [\n\t\t\t...state,\n\t\t\t...action.data.addBreadcrumbs\n\t\t];\n\n\tcase \"SET_TO_INDEXED_BREADCRUMB\":\n\t\treturn action.data.breadcrumbIndex >= 0 && action.data.breadcrumbIndex < state.length\n\t\t\t? state.slice(0, action.data.breadcrumbIndex + 1)\n\t\t\t: state;\n\n\tcase \"SET_TO_PREVIOUS_BREADCRUMB\":\n\t\treturn state.length > 1 ? state.slice(0, state.length - 1) : state;\n\n\tcase \"RESET_BREADCRUMB\":\n\t\treturn [\n\t\t\t{ pipelineId: action.data.pipelineId }\n\t\t];\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n\n// Returns true if the 'current' breadcrumb from the breadcrumbs\n// passed in is in the pipelineFlow's set of pipelines.\nconst isCurrentBreadcrumbInPipelineFlow = (breadcrumbs, pipelineFlow) => {\n\tif (pipelineFlow &&\n\t\t\tpipelineFlow.pipelines &&\n\t\t\tArray.isArray(breadcrumbs) &&\n\t\t\tbreadcrumbs.length > 0 &&\n\t\t\tbreadcrumbs[breadcrumbs.length - 1].pipelineId) {\n\t\tconst piId = breadcrumbs[breadcrumbs.length - 1].pipelineId;\n\t\tconst idx = pipelineFlow.pipelines.findIndex((pipeline) => pipeline.id === piId);\n\t\treturn idx > -1;\n\t}\n\treturn false;\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"SET_CANVAS_CONFIG_INFO\": {\n\t\treturn action.data.canvasConfig;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_TOOLBAR_CONFIG\": {\n\t\treturn Object.assign({}, state, { config: action.data.toolbarConfig });\n\t}\n\n\tcase \"REFRESH_TOOLBAR\": {\n\t\treturn Object.assign({}, state);\n\t}\n\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_TEXT_TOOLBAR_DEF\": {\n\t\tif (action.data.textToolbarDef) {\n\t\t\treturn Object.assign({}, state, action.data.textToolbarDef);\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"CLEAR_NOTIFICATION_MESSAGES\":\n\t\treturn [];\n\n\tcase \"SET_NOTIFICATION_MESSAGES\": {\n\t\taction.data.messages.forEach((msg) => convertMsgType(msg));\n\t\treturn action.data.messages;\n\t}\n\n\tcase \"DELETE_NOTIFICATION_MESSAGES\": {\n\t\tconst filterIds = Array.isArray(action.data.ids) ? action.data.ids : [action.data.ids];\n\t\tconst messages = state.filter((message) => !filterIds.includes(message.id));\n\t\treturn messages;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nfunction convertMsgType(msg) {\n\tif (msg.type === null || msg.type === \"\" || typeof msg.type === \"undefined\") {\n\t\tmsg.type = \"unspecified\";\n\t}\n\treturn msg;\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_CANVAS_INFO\": {\n\t\t// In some instances, with an external object model, the same canvas info may\n\t\t// be set multiple times. Consequently, we only clear the selections if\n\t\t// we're given a completely new canvas.\n\t\tif (action.canvasInfoIdChanged) {\n\t\t\treturn {};\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"CLEAR_SELECTIONS\":\n\t\treturn {};\n\n\tcase \"ADD_PASTED_OBJECTS\":\n\tcase \"SET_SELECTIONS\":\n\t\treturn {\n\t\t\tpipelineId: action.pipelineId,\n\t\t\tselections: [...action.data.selections]\n\t\t};\n\n\tcase \"DELETE_OBJECT\": {\n\t\tif (state.selections) {\n\t\t\tconst newSelections = state.selections.filter((objId) => action.data.id !== objId);\n\t\t\treturn {\n\t\t\t\tpipelineId: state.pipelineId,\n\t\t\t\tselections: newSelections\n\t\t\t};\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"DELETE_AND_UPDATE_OBJECTS\": {\n\t\tif (state.selections) {\n\t\t\tconst objsToDelete = [\n\t\t\t\t...action.data.linksToDelete,\n\t\t\t\t...action.data.supernodesToDelete,\n\t\t\t\t...action.data.nodesToDelete,\n\t\t\t\t...action.data.commentsToDelete\n\t\t\t];\n\t\t\tconst newSelections = state.selections.filter((objId) =>\n\t\t\t\t!objsToDelete.some((obj) => obj.id === objId));\n\n\t\t\treturn {\n\t\t\t\tpipelineId: state.pipelineId,\n\t\t\t\tselections: newSelections\n\t\t\t};\n\t\t}\n\t\treturn state;\n\t}\n\n\tcase \"SET_BREADCRUMBS\":\n\tcase \"ADD_BREADCRUMB\":\n\tcase \"ADD_BREADCRUMBS\":\n\tcase \"SET_TO_INDEXED_BREADCRUMB\":\n\tcase \"SET_TO_PREVIOUS_BREADCRUMB\":\n\tcase \"RESET_BREADCRUMB\": {\n\t\treturn {};\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (state = {}, action) => {\n\tswitch (action.type) {\n\tcase \"SET_NOTIFICATION_PANEL_CONFIG\": {\n\t\t// If action.data.notificationPanelConfig is missing config will be undefined\n\t\treturn Object.assign({}, state, { config: action.data.notificationPanelConfig });\n\t}\n\n\tcase \"SET_NOTIFICATION_PANEL_OPEN_STATE\":\n\t\treturn Object.assign({}, state, { isOpen: action.data.isOpen });\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// This reducer handles external pipeline flows. In this reducer pipeline flows\n// are the pipeline flows WITHOUT their pipelines. The pipelines are stored in\n// the pipelines array of the canvas info (handed by the canvasinfo reducer)\n// and are glued back into the pipeline flow whenever the host app makes a\n// getExternalPipelineFlow(url) call to the canvas controller API.\n\nexport default (state = [], action) => {\n\tswitch (action.type) {\n\tcase \"ADD_EXTERNAL_PIPELINE_FLOW\": {\n\t\tconst newPipelineFlow = Object.assign({}, action.newPipelineFlow);\n\t\treturn [...state, newPipelineFlow];\n\t}\n\n\tcase \"REMOVE_EXTERNAL_PIPELINE_FLOW\": {\n\t\treturn state.filter((epf) => epf.url !== action.externalUrl);\n\t}\n\n\tcase \"REPLACE_SN_AND_PIPELINES\": {\n\t\tconst subset = state.filter((epf) => {\n\t\t\tconst remove = action.data.extPipelineFlowsToDelete.some((efd) => efd.url === epf.url);\n\t\t\treturn !remove;\n\t\t});\n\n\t\tconst newSet = [...subset, ...action.data.extPipelineFlowsToAdd];\n\t\treturn newSet;\n\t}\n\n\tcase \"ADD_OBJECTS_AND_UPDATE\":\n\tcase \"ADD_SUPERNODES\": {\n\t\treturn [...state, ...action.data.extPipelineFlowsToAdd];\n\t}\n\n\tcase \"DELETE_PASTED_OBJECTS\":\n\tcase \"DELETE_OBJECTS_AND_UPDATE\":\n\tcase \"DELETE_SUPERNODES\": {\n\t\treturn state.filter((epf) => {\n\t\t\tconst removePFlow = action.data.extPipelineFlowsToDelete.some((pf) => epf.url === pf.url);\n\t\t\treturn !removePFlow;\n\t\t});\n\t}\n\n\tcase \"DECONSTRUCT_SUPERNODE\": {\n\t\treturn state.filter((epf) => epf.id !== action.data.extPipelineFlowToDelete.id);\n\t}\n\n\tcase \"RECONSTRUCT_SUPERNODE\": {\n\t\treturn [...state, action.data.extPipelineFlowToDelete];\n\t}\n\n\tcase \"SET_CANVAS_INFO\": {\n\t\t// If we are handling new canvasInfo we need to clear out any old\n\t\t// external pipeline flows.\n\t\tif (action.canvasInfoIdChanged) {\n\t\t\treturn [];\n\t\t}\n\t\treturn state;\n\t}\n\n\tdefault:\n\t\treturn state;\n\t}\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { combineReducers, createStore } from \"redux\";\nimport { cloneDeep, isEmpty } from \"lodash\";\n\nimport ConfigUtils from \"../config-utils.js\";\n\nimport tooltip from \"./reducers/tooltip.js\";\nimport palette from \"./reducers/palette.js\";\nimport canvasinfo from \"./reducers/canvasinfo.js\";\nimport contextmenu from \"./reducers/contextmenu.js\";\nimport leftflyout from \"./reducers/leftflyout.js\";\nimport rightflyout from \"./reducers/rightflyout.js\";\nimport bottompanel from \"./reducers/bottompanel.js\";\nimport toppanel from \"./reducers/toppanel.js\";\nimport breadcrumbs from \"./reducers/breadcrumbs.js\";\nimport canvasconfig from \"./reducers/canvasconfig.js\";\nimport canvastoolbar from \"./reducers/canvastoolbar.js\";\nimport texttoolbar from \"./reducers/texttoolbar.js\";\nimport notifications from \"./reducers/notifications.js\";\nimport selectioninfo from \"./reducers/selectioninfo.js\";\nimport notificationpanel from \"./reducers/notificationpanel.js\";\nimport externalpipelineflows from \"./reducers/externalpipelineflows.js\";\n\nexport default class CanvasStore {\n\tconstructor(emptyCanvasInfo) {\n\t\t// Put selectioninfo reducer first so selections are handled before\n\t\t// canvasinfo actions. Also, put canvasconfig reducer before canvasinfo\n\t\t// because node heights and widths are calculated based on the node\n\t\t// layout info contained in the canvas config object's enableNodeLayout field.\n\t\tvar combinedReducer = combineReducers({\n\t\t\tselectioninfo,\n\t\t\tcanvasconfig,\n\t\t\tcanvasinfo,\n\t\t\tbreadcrumbs,\n\t\t\tpalette,\n\t\t\tnotifications,\n\t\t\tnotificationpanel,\n\t\t\texternalpipelineflows,\n\t\t\ttooltip,\n\t\t\tcanvastoolbar,\n\t\t\ttexttoolbar,\n\t\t\tcontextmenu,\n\t\t\tleftflyout,\n\t\t\trightflyout,\n\t\t\tbottompanel,\n\t\t\ttoppanel\n\t\t});\n\n\t\tconst initialState = {\n\t\t\tselectioninfo: {},\n\t\t\tcanvasinfo: emptyCanvasInfo,\n\t\t\tcanvasconfig: ConfigUtils.getDefaultCanvasConfig(),\n\t\t\tbreadcrumbs: [{ pipelineId: emptyCanvasInfo.primary_pipeline, pipelineFlowId: emptyCanvasInfo.id }],\n\t\t\tpalette: { content: {} }, // Don't initialize isOpen here, it must be done in CanvasController.setCanvasConfig based on paletteInitialState\n\t\t\tnotifications: [],\n\t\t\tnotificationpanel: { isOpen: false, config: {} },\n\t\t\texternalpipelineflows: [],\n\t\t\ttooltip: {},\n\t\t\tcanvastoolbar: {},\n\t\t\ttexttoolbar: { isOpen: false },\n\t\t\tcontextmenu: { isOpen: false, menuDef: [], source: {} },\n\t\t\tleftflyout: {},\n\t\t\trightflyout: {},\n\t\t\tbottompanel: { panelHeight: 393 },\n\t\t\ttoppanel: {}\n\t\t};\n\n\t\t// This code removed because it was causing slowdown in the test harness with the\n\t\t// debugger open in the latest version of Chrome.\n\t\t// if (typeof window !== \"undefined\") {\n\t\t// \tconst enableDevTools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();\n\t\t// \tthis.store = createStore(combinedReducer, initialState, enableDevTools);\n\t\t// } else {\n\t\tthis.store = createStore(combinedReducer, initialState);\n\t\t// }\n\n\t\tthis.dispatch = this.dispatch.bind(this);\n\t}\n\n\tdispatch(action) {\n\t\tthis.store.dispatch(action);\n\t}\n\n\tsubscribe(callback) {\n\t\treturn this.store.subscribe(callback);\n\t}\n\n\t// Returns the redux store\n\tgetStore() {\n\t\treturn this.store;\n\t}\n\n\tgetPalette() {\n\t\treturn cloneDeep(this.store.getState().palette);\n\t}\n\n\tgetPaletteData() {\n\t\treturn cloneDeep(this.store.getState().palette.content);\n\t}\n\n\tgetPaletteCategory(categoryId) {\n\t\treturn cloneDeep(this.store.getState().palette.content.categories.find((c) => c.id === categoryId));\n\t}\n\n\tgetCanvasInfo() {\n\t\treturn cloneDeep(this.store.getState().canvasinfo);\n\t}\n\n\tgetPipelineFlowId() {\n\t\treturn this.store.getState().canvasinfo.id;\n\t}\n\n\tgetPrimaryPipelineId() {\n\t\treturn this.store.getState().canvasinfo.primary_pipeline;\n\t}\n\n\tgetZoom(pipelineId) {\n\t\tconst p = this.getNonClonedPipeline(pipelineId);\n\t\tif (p) {\n\t\t\treturn cloneDeep(p.zoom);\n\t\t}\n\t\treturn null;\n\t}\n\n\tisEmpty(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\n\t\tif (pipeline.nodes && pipeline.nodes.length === 0 &&\n\t\t\t\tpipeline.comments && pipeline.comments.length === 0 &&\n\t\t\t\tpipeline.links && pipeline.links.length === 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tgetCountNodes(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\treturn pipeline?.nodes?.length || 0;\n\t}\n\n\tgetCountComments(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\treturn pipeline?.comments?.length || 0;\n\t}\n\n\tgetCountLinks(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\treturn pipeline?.links?.length || 0;\n\t}\n\n\t// This is a service method for retrieving the internal pipeline. It does NOT\n\t// clone the pipeline therefore it should NOT be called from outside this\n\t// class because we don't want to surface the internal data in redux to\n\t// the outside world.\n\tgetNonClonedPipeline(pipelineId) {\n\t\treturn this.store.getState().canvasinfo.pipelines.find((p) => p.id === pipelineId);\n\t}\n\n\t// This is a service method for retrieving selected objects of the type passed\n\t// in which can be \"nodes\", \"comments\" or \"links\". It does NOT clone the\n\t// resultant array therefore it should NOT be called from outside this\n\t// class because we don't want to surface the internal data in redux to\n\t// the outside world.\n\tgetNonClonedSelectedObjs(type) {\n\t\tconst selectedPipelineId = this.getSelectedPipelineId();\n\t\tif (selectedPipelineId) {\n\t\t\tconst pipeline = this.getNonClonedPipeline(selectedPipelineId);\n\t\t\tif (pipeline && pipeline[type]) {\n\t\t\t\tconst selectedObjIds = this.getSelectedObjectIds();\n\t\t\t\treturn pipeline[type].filter((o) => selectedObjIds.includes(o.id));\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\tgetNodes(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tif (pipeline && pipeline.nodes) {\n\t\t\treturn cloneDeep(pipeline.nodes);\n\t\t}\n\t\treturn [];\n\t}\n\n\tgetNode(nodeId, pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tlet node = null;\n\t\tif (pipeline && pipeline.nodes) {\n\t\t\tconst internalNode = pipeline.nodes.find((n) => (n.id === nodeId));\n\t\t\tif (internalNode) {\n\t\t\t\tnode = cloneDeep(internalNode);\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetComments(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tif (pipeline && pipeline.comments) {\n\t\t\treturn cloneDeep(pipeline.comments);\n\t\t}\n\t\treturn [];\n\t}\n\n\tgetComment(commentId, pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tlet com = null;\n\t\tif (pipeline && pipeline.comments) {\n\t\t\tconst internalCom = pipeline.comments.find((c) => (c.id === commentId));\n\t\t\tif (internalCom) {\n\t\t\t\tcom = cloneDeep(internalCom);\n\t\t\t}\n\t\t}\n\t\treturn com;\n\t}\n\n\tgetLinks(pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tif (pipeline && pipeline.links) {\n\t\t\treturn cloneDeep(pipeline.links);\n\t\t}\n\t\treturn [];\n\t}\n\n\tgetLink(linkId, pipelineId) {\n\t\tconst pipeline = this.getNonClonedPipeline(pipelineId);\n\t\tlet link = null;\n\t\tif (pipeline && pipeline.links) {\n\t\t\tconst internalLink = pipeline.links.find((l) => (l.id === linkId));\n\t\t\tif (internalLink) {\n\t\t\t\tlink = cloneDeep(internalLink);\n\t\t\t}\n\t\t}\n\t\treturn link;\n\t}\n\n\tgetBreadcrumbs() {\n\t\treturn cloneDeep(this.store.getState().breadcrumbs);\n\t}\n\n\tgetCanvasConfig() {\n\t\t// Canvas config cannot be cloned because it may contain JSX objects\n\t\t// so create copy using Object.assign.\n\t\treturn Object.assign({}, this.store.getState().canvasconfig);\n\t}\n\n\tgetNodeLayout() {\n\t\treturn this.cloneData(this.store.getState().canvasconfig.enableNodeLayout);\n\t}\n\n\tgetCanvasLayout() {\n\t\treturn this.cloneData(this.store.getState().canvasconfig.enableCanvasLayout);\n\t}\n\n\tisTooltipOpen() {\n\t\treturn !isEmpty(this.store.getState().tooltip);\n\t}\n\n\tgetTooltip() {\n\t\treturn this.cloneData(this.store.getState().tooltip);\n\t}\n\n\tisLeftFlyoutOpen() {\n\t\treturn this.store.getState().leftflyout.isOpen;\n\t}\n\n\tisRightFlyoutOpen() {\n\t\treturn this.store.getState().rightflyout.isOpen;\n\t}\n\n\tisBottomPanelOpen() {\n\t\treturn this.store.getState().bottompanel.isOpen;\n\t}\n\n\tisTopPanelOpen() {\n\t\treturn this.store.getState().toppanel.isOpen;\n\t}\n\n\tgetNotificationPanel() {\n\t\treturn this.cloneData(this.store.getState().notificationpanel);\n\t}\n\n\tgetNotifications() {\n\t\t// Notification messages may contain JSX objects and a callback function\n\t\t// so create copy using Object.assign instead of this.cloneData method.\n\t\treturn this.store.getState().notifications.map((n, i) => Object.assign({}, n));\n\t}\n\n\tisNotificationPanelOpen() {\n\t\treturn this.getNotificationPanel().isOpen;\n\t}\n\n\tgetContextMenuSource() {\n\t\treturn this.cloneData(this.store.getState().contextmenu.source);\n\t}\n\n\tisContextMenuDisplayed() {\n\t\treturn this.store.getState().contextmenu.isOpen;\n\t}\n\n\tgetSelectionInfo() {\n\t\treturn this.cloneData(this.store.getState().selectioninfo);\n\t}\n\n\tgetSelectedPipelineId() {\n\t\treturn this.getSelectionInfo().pipelineId;\n\t}\n\n\tgetCountSelectedObjects() {\n\t\treturn this.store.getState().selectioninfo?.selections?.length || 0;\n\t}\n\n\tgetSelectedObjectIds() {\n\t\tconst selectedObjIds = this.store.getState().selectioninfo.selections || [];\n\t\treturn this.cloneData(selectedObjIds);\n\t}\n\n\tgetSelectedNodes() {\n\t\treturn cloneDeep(this.getNonClonedSelectedObjs(\"nodes\"));\n\t}\n\n\tgetSelectedComments() {\n\t\treturn cloneDeep(this.getNonClonedSelectedObjs(\"comments\"));\n\t}\n\n\tgetSelectedLinks() {\n\t\treturn cloneDeep(this.getNonClonedSelectedObjs(\"links\"));\n\t}\n\n\tareAllObjectsSelected(includeLinks) {\n\t\tconst pId = this.getSelectedPipelineId();\n\t\tlet countObjs = this.getCountNodes(pId) + this.getCountComments(pId);\n\t\tif (includeLinks) {\n\t\t\tcountObjs += this.getCountLinks(pId);\n\t\t}\n\t\tconst selObjs = this.getCountSelectedObjects();\n\t\treturn selObjs > 0 && countObjs === selObjs; // Only return true if at ast one object is selected.\n\t}\n\n\t// Returns true if all the selected objects are links. That is, if the\n\t// number of selected links is the same as the number of selected objects.\n\tareAllSelectedObjectsLinks() {\n\t\treturn this.getNonClonedSelectedObjs(\"links\").length === this.getSelectedObjectIds().length;\n\t}\n\n\tgetExternalPipelineFlows() {\n\t\treturn this.cloneData(this.store.getState().externalpipelineflows);\n\t}\n\n\tgetExternalPipelineFlow(url) {\n\t\tconst epf = this.store.getState().externalpipelineflows.find((pf) => pf.url === url);\n\t\tif (epf) {\n\t\t\treturn this.cloneData(epf);\n\t\t}\n\t\treturn null;\n\t}\n\n\tcloneData(data) {\n\t\treturn cloneDeep(data);\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport pipelineFlowV1Schema from \"../schemas/v1/pipeline-flow-v1-schema.json\";\nimport pipelineFlowUIV1Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json\";\nimport pipelineConnectionV1Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json\";\nimport dataRecordMetadataV1Schema from \"@elyra/pipeline-schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json\";\nimport paletteV1Schema from \"../schemas/v1/palette-v1-schema.json\";\n\nimport pipelineFlowV2Schema from \"../schemas/v2/pipeline-flow-v2-schema.json\";\nimport pipelineFlowUIV2Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json\";\nimport pipelineConnectionV2Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json\";\nimport dataRecordMetadataV2Schema from \"@elyra/pipeline-schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json\";\nimport paletteV2Schema from \"../schemas/v2/palette-v2-schema.json\";\n\nimport pipelineFlowV3Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json\";\nimport pipelineFlowUIV3Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json\";\nimport pipelineConnectionV3Schema from \"@elyra/pipeline-schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json\";\nimport dataRecordMetadataV3Schema from \"@elyra/pipeline-schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json\";\nimport paletteV3Schema from \"@elyra/pipeline-schemas/common-canvas/palette/palette-v3-schema.json\";\n\nimport Logger from \"../../logging/canvas-logger.js\";\n\nconst logger = new Logger(\"SchemaValidator\");\n\nimport { Validator as SchemaValidator } from \"jsonschema\";\n\nfunction validatePipelineFlowAgainstSchema(pipelineFlow, version) {\n\tswitch (version) {\n\tcase 1: {\n\t\tconst validator1 = getV1Validator();\n\t\tvalidateAgainstSchema(pipelineFlow, pipelineFlowV1Schema, \"pipelineFlow\", validator1);\n\t\tbreak;\n\t}\n\tcase 2: {\n\t\tconst validator2 = getV2Validator();\n\t\tvalidateAgainstSchema(pipelineFlow, pipelineFlowV2Schema, \"pipelineFlow\", validator2);\n\t\tbreak;\n\t}\n\n\tcase 3:\n\tdefault: {\n\t\tconst validator3 = getV3Validator();\n\t\tvalidateAgainstSchema(pipelineFlow, pipelineFlowV3Schema, \"pipelineFlow\", validator3);\n\t}\n\t}\n}\n\nfunction validatePaletteAgainstSchema(paletteData, version) {\n\tswitch (version) {\n\tcase 1:\n\t\tvalidateAgainstSchema(paletteData, paletteV1Schema, \"palette\", new SchemaValidator());\n\t\tbreak;\n\tcase 2:\n\t\tvalidateAgainstSchema(paletteData, paletteV2Schema, \"palette\", new SchemaValidator());\n\t\tbreak;\n\tcase 3:\n\tdefault: {\n\t\tconst validator3 = getV3Validator();\n\t\tvalidateAgainstSchema(paletteData, paletteV3Schema, \"palette\", validator3);\n\t}\n\t}\n}\n\n// Validates the data provided, against the schema provided, using the validator\n// provided and throws an error if any schema validation errors are found.\nfunction validateAgainstSchema(data, schema, type, validator) {\n\tlogger.logStartTimer(\"Schema validation\");\n\tconst valResult = validator.validate(data, schema, { \"nestedErrors\": true });\n\tlogger.logEndTimer(\"Schema validation\");\n\n\tlogger.log(\"Schema \" + type + \" - validation result:\");\n\tlogger.log(valResult);\n\tif (valResult && valResult.errors && valResult.errors.length > 0) {\n\t\tlogger.error(valResult);\n\t\tthrow valResult;\n\t}\n}\n\nfunction getV1Validator() {\n\tconst validator1 = new SchemaValidator();\n\tconst prefix = \"http://api.dataplatform.ibm.com/schemas/common-pipeline/\";\n\tvalidator1.addSchema(pipelineFlowUIV1Schema, prefix + \"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_overview_def\");\n\tvalidator1.addSchema(pipelineFlowUIV1Schema, prefix + \"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_def\");\n\tvalidator1.addSchema(pipelineFlowUIV1Schema, prefix + \"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/port_info_def\");\n\tvalidator1.addSchema(pipelineFlowUIV1Schema, prefix + \"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/node_info_def\");\n\tvalidator1.addSchema(pipelineConnectionV1Schema, prefix + \"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def\");\n\tvalidator1.addSchema(pipelineConnectionV1Schema, prefix + \"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def\");\n\tvalidator1.addSchema(dataRecordMetadataV1Schema, prefix + \"datarecord-metadata/datarecord-metadata-v1-schema.json#/definitions/record_schema\");\n\treturn validator1;\n}\n\nfunction getV2Validator() {\n\tconst validator2 = new SchemaValidator();\n\tconst prefix = \"http://api.dataplatform.ibm.com/schemas/common-pipeline/\";\n\tvalidator2.addSchema(pipelineFlowV2Schema, prefix + \"pipeline-flow/pipeline-flow-v2-schema.json\");\n\tvalidator2.addSchema(pipelineFlowUIV2Schema, prefix + \"pipeline-flow/pipeline-flow-ui-v2-schema.json\");\n\tvalidator2.addSchema(pipelineConnectionV2Schema, prefix + \"pipeline-connection/pipeline-connection-v2-schema.json\");\n\tvalidator2.addSchema(dataRecordMetadataV2Schema, prefix + \"datarecord-metadata/datarecord-metadata-v2-schema.json\");\n\treturn validator2;\n}\n\nfunction getV3Validator() {\n\tconst validator3 = new SchemaValidator();\n\tconst prefix = \"http://api.dataplatform.ibm.com/schemas/common-pipeline/\";\n\tvalidator3.addSchema(pipelineFlowV3Schema, prefix + \"pipeline-flow/pipeline-flow-v3-schema.json\");\n\tvalidator3.addSchema(pipelineFlowUIV3Schema, prefix + \"pipeline-flow/pipeline-flow-ui-v3-schema.json\");\n\tvalidator3.addSchema(pipelineConnectionV3Schema, prefix + \"pipeline-connection/pipeline-connection-v3-schema.json\");\n\tvalidator3.addSchema(dataRecordMetadataV3Schema, prefix + \"datarecord-metadata/datarecord-metadata-v3-schema.json\");\n\treturn validator3;\n}\n\nexport {\n\tvalidatePipelineFlowAgainstSchema,\n\tvalidatePaletteAgainstSchema\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneDeep } from \"lodash\";\n\n// Globals -------------------------------------------------------------------->\n\n// The lowest version accepted\nconst FIRST_PALETTE_VERSION = 1;\n\n// The latest palette version - update as new versions are developed\nconst LATEST_PALETTE_VERSION = 3;\n\n// Array of major version upgrade functions\nconst updateFuncs = [\n\t_update0to1,\n\t_update1to2,\n\t_update2to3\n];\n\n// Private Methods ------------------------------------------------------------>\n\n/**\n * Extracts the version from the given palette.\n *\n * @param {Object} palette: A palette JSON object\n *\n * @return {integer} An integer version number\n *\n * @throws {Error} If the version number cannot be extracted\n */\nfunction _extractPaletteVersion(palette) {\n\tlet baseVersion;\n\t// Validate the incoming palette\n\tif (!palette) {\n\t\tthrow new Error(\"Invalid palette document\");\n\n\t// Neither version 1 did not have a version number\n\t} else if (!palette.version) {\n\t\tbaseVersion = 1;\n\n\t} else if (!(typeof palette.version === \"string\") ||\n\t\t\t\t\t\t\tpalette.version.length === 0) {\n\t\tthrow new Error(\"Invalid palette document: The 'version' attribute is missing or invalid\");\n\t} else {\n\t\tbaseVersion = parseInt(palette.version, 10);\n\t\tif (!baseVersion) {\n\t\t\tthrow new Error(\"Invalid palette document: The 'version' attribute cannot be parsed\");\n\t\t}\n\t}\n\treturn baseVersion;\n}\n\n// Version 1 methods ------------------------>\n\n/**\n * Updates version 0 to version 1. This is done by\n * CanvasInHandler.convertPaletteToPipelineFlowPalette() so there is\n * nothing to do here. This method should never be called so it is only\n * here for consistency with upgrade-flow.js.\n *\n * @param {object} palette: A palette JSON object\n *\n * @return A palette object that has been upgraded to version 1\n */\nfunction _update0to1(palette) {\n\treturn palette;\n}\n\n// Version 2 methods ------------------------>\n\n/**\n * Updates version 1 to version 2.\n *\n * @param {object} palette: A palette JSON object\n *\n * @return A palette object that has been upgraded to version 2\n */\nfunction _update1to2(palette) {\n\tconst newPalette = Object.assign({}, { version: \"2.0\" }, palette);\n\n\treturn newPalette;\n}\n\n// Version 3 methods ------------------------>\n\n\n/**\n * Updates version 2 to version 3.\n *\n * @param {object} palette: A palette JSON object\n *\n * @return A palette object that has been upgraded to version 3\n */\nfunction _update2to3(palette) {\n\tpalette.version = \"3.0\";\n\tfor (const category of palette.categories) {\n\t\tcategory.id = category.category;\n\t\tdelete category.category;\n\t\t// Category fields: label, image and description, all\n\t\t// remain the same, if present.\n\t\tcategory.node_types = [];\n\t\tfor (let idx = 0; idx < category.nodetypes.length; idx++) {\n\t\t\tconst oldNode = category.nodetypes[idx];\n\t\t\tconst node = {};\n\t\t\tnode.id = \"\";\n\t\t\tnode.type = oldNode.type;\n\t\t\tif (oldNode.type === \"execution_node\" ||\n\t\t\t\t\toldNode.type === \"binding\") {\n\t\t\t\tnode.op = oldNode.operator_id_ref;\n\t\t\t} else if (oldNode.type === \"super_node\") {\n\t\t\t\tif (oldNode.open_with_tool) {\n\t\t\t\t\tnode.open_with_tool = oldNode.open_with_tool;\n\t\t\t\t}\n\t\t\t\tnode.subflow_ref = { \"pipeline_id_ref\": oldNode.subDiagramId };\n\t\t\t}\n\t\t\tif (oldNode.input_ports && oldNode.input_ports.length > 0) {\n\t\t\t\tnode.inputs = _readPorts(oldNode.input_ports);\n\t\t\t}\n\t\t\tif (oldNode.output_ports && oldNode.output_ports.length > 0) {\n\t\t\t\tnode.outputs = _readPorts(oldNode.output_ports);\n\t\t\t}\n\t\t\tnode.parameters = {};\n\t\t\tnode.app_data = {};\n\t\t\tnode.app_data.ui_data = {};\n\t\t\tnode.app_data.ui_data.label = oldNode.label;\n\t\t\tnode.app_data.ui_data.description = oldNode.description;\n\t\t\tnode.app_data.ui_data.image = oldNode.image;\n\t\t\tnode.app_data.ui_data.x_pos = 0;\n\t\t\tnode.app_data.ui_data.y_pos = 0;\n\t\t\tcategory.node_types.push(node);\n\t\t}\n\t\tdelete category.nodetypes;\n\t}\n\treturn palette;\n}\n\nfunction _readPorts(portsArray) {\n\tconst retArray = [];\n\tfor (const port of portsArray) {\n\t\tconst newPort = {};\n\t\tnewPort.id = port.id;\n\t\tnewPort.app_data = {};\n\t\tnewPort.app_data.ui_data = {};\n\t\tif (port.cardinality) {\n\t\t\tnewPort.app_data.ui_data.cardinality = port.cardinality;\n\t\t}\n\t\tnewPort.app_data.ui_data.label = port.label;\n\t\tretArray.push(newPort);\n\t}\n\treturn retArray;\n}\n\n// Public Methods ------------------------------------------------------------->\n\n/**\n * Upgrades the given palette object to the current version.\n *\n * @param {Object} palette: A palette JSON object\n *\n * @returns A palette object that has been upgraded to the latest version\n */\nfunction upgradePalette(palette) {\n\tconst baseVersion = Math.max(_extractPaletteVersion(palette), FIRST_PALETTE_VERSION);\n\tlet pal = cloneDeep(palette);\n\tfor (let idx = baseVersion; idx < LATEST_PALETTE_VERSION; idx++) {\n\t\tpal = updateFuncs[idx](pal);\n\t}\n\treturn pal;\n}\n\n\nexport {\n\tupgradePalette,\n\t_extractPaletteVersion as extractPaletteVersion,\n\tLATEST_PALETTE_VERSION\n};\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CanvasInHandler from \"./canvas-in-handler.js\"; // TODO - Remove this when WML supports PipelineFlow\nimport CanvasOutHandler from \"./canvas-out-handler.js\"; // TODO - Remove this when WML supports PipelineFlow\nimport PipelineInHandler from \"./pipeline-in-handler.js\";\nimport PipelineOutHandler from \"./pipeline-out-handler.js\";\nimport CanvasUtils from \"../common-canvas/common-canvas-utils\";\nimport ConfigUtils from \"./config-utils.js\";\nimport LocalStorage from \"../common-canvas/local-storage.js\";\nimport { prepareNodes, setNodeAttributesWithLayout, setCommentAttributesWithLayout } from \"./object-model-utils.js\";\nimport APIPipeline from \"./api-pipeline.js\";\nimport CanvasStore from \"./redux/canvas-store.js\";\nimport Logger from \"../logging/canvas-logger.js\";\n\nimport { cloneDeep, differenceWith, get, has, isEmpty, set, union } from \"lodash\";\nimport { v4 as uuid4 } from \"uuid\";\nimport { validatePipelineFlowAgainstSchema, validatePaletteAgainstSchema } from \"./schemas-utils/schema-validator.js\";\nimport { upgradePipelineFlow, extractVersion, LATEST_VERSION } from \"@elyra/pipeline-schemas\";\nimport { upgradePalette, extractPaletteVersion, LATEST_PALETTE_VERSION } from \"./schemas-utils/upgrade-palette.js\";\n\n\nimport { ASSOCIATION_LINK, NODE_LINK, ERROR, WARNING, SUCCESS, INFO, CREATE_PIPELINE,\n\tCLONE_COMMENT, CLONE_COMMENT_LINK, CLONE_NODE, CLONE_NODE_LINK, CLONE_PIPELINE, SUPER_NODE,\n\tCONNECTED_BRANCH, CONNECTED_UPSTREAM, CONNECTED_DOWNSTREAM,\n\tSAVE_ZOOM_LOCAL_STORAGE, SAVE_ZOOM_PIPELINE_FLOW\n} from \"../common-canvas/constants/canvas-constants.js\";\n\nexport default class ObjectModel {\n\n\tconstructor() {\n\t\tthis.logger = new Logger(\"Object Model\");\n\n\t\t// Create a store defaulting to an empty canvas.\n\t\tconst emptyCanvasInfo = this.getEmptyCanvasInfo();\n\t\tthis.store = new CanvasStore(emptyCanvasInfo);\n\n\t\t// TODO - Remove this global variable when WML Canvas supports pipelineFlow\n\t\tthis.oldCanvas = null;\n\n\t\t// Optional handler to generate the id of object model objects\n\t\tthis.idGeneratorHandler = null;\n\n\t\t// Optional callback for notification of selection changes\n\t\tthis.selectionChangeHandler = null;\n\n\t\t// Optional callback for layout of the canvas\n\t\tthis.layoutHandler = null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Standard methods\n\t// ---------------------------------------------------------------------------\n\n\t// Only used for testing\n\tdispatch(action) {\n\t\tthis.store.dispatch(action);\n\t}\n\n\tsubscribe(callback) {\n\t\treturn this.store.subscribe(callback);\n\t}\n\n\tsetSchemaValidation(schemaValidation) {\n\t\tthis.setCanvasConfig({ schemaValidation });\n\t}\n\n\tsetSelectionChangeHandler(selectionChangeHandler) {\n\t\tthis.selectionChangeHandler = selectionChangeHandler;\n\t}\n\n\tsetLayoutHandler(layoutHandler) {\n\t\tif (layoutHandler !== this.layoutHandler) {\n\t\t\tthis.layoutHandler = layoutHandler;\n\t\t\tconst newPipelines =\n\t\t\t\tprepareNodes(this.getCanvasInfo().pipelines, this.getNodeLayout(), this.getCanvasLayout(), this.layoutHandler);\n\t\t\tthis.store.dispatch({ type: \"REPLACE_PIPELINES\", data: { pipelines: newPipelines } });\n\t\t}\n\t}\n\n\t// Returns the redux store\n\tgetStore() {\n\t\treturn this.store.getStore();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Unique ID generation\n\t// ---------------------------------------------------------------------------\n\n\tgetUUID() {\n\t\treturn uuid4();\n\t}\n\n\tsetIdGeneratorHandler(idGeneratorHandler) {\n\t\tthis.idGeneratorHandler = idGeneratorHandler;\n\t}\n\n\tgetUniqueId(action, data) {\n\t\tlet uniqueId;\n\t\tif (this.idGeneratorHandler) {\n\t\t\tuniqueId = this.idGeneratorHandler(action, data);\n\t\t}\n\t\t// generate v4 uuid if no custom id was generated\n\t\treturn uniqueId ? uniqueId : this.getUUID();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Palette methods\n\t// ---------------------------------------------------------------------------\n\n\tclearPaletteData() {\n\t\tthis.store.dispatch({ type: \"CLEAR_PALETTE_DATA\" });\n\t}\n\n\t// Deprecated TODO - Remove this method when WML Canvas migrates to setPipelineFlowPalette() method\n\tsetPaletteData(paletteData) {\n\t\tvar newPalData = CanvasInHandler.convertPaletteToPipelineFlowPalette(paletteData);\n\t\tthis.setPipelineFlowPalette(newPalData);\n\t}\n\n\tsetPipelineFlowPalette(paletteData) {\n\t\tif (!paletteData || isEmpty(paletteData)) {\n\t\t\tthis.clearPaletteData();\n\t\t\treturn;\n\t\t}\n\t\t// TODO - this method is called by App.js test harness. Remove this check and\n\t\t// code when we remove the x-* example palette files after WML Canvas migrates to use v2.0 palette.\n\t\tlet palData = paletteData;\n\t\tif (CanvasInHandler.isVersion0Palette(palData)) {\n\t\t\tpalData = CanvasInHandler.convertPaletteToPipelineFlowPalette(palData);\n\t\t}\n\n\t\tconst newPalData = this.validateAndUpgradePalette(palData);\n\t\tthis.store.dispatch({ type: \"SET_PALETTE_DATA\", data: { content: newPalData } });\n\t}\n\n\tgetPaletteData() {\n\t\treturn this.store.getPaletteData();\n\t}\n\n\ttogglePalette() {\n\t\tif (this.isPaletteOpen()) {\n\t\t\tthis.closePalette();\n\t\t} else {\n\t\t\tthis.openPalette();\n\t\t}\n\t}\n\n\topenPalette() {\n\t\tthis.store.dispatch({ type: \"SET_PALETTE_OPEN_STATE\", data: { isOpen: true } });\n\t}\n\n\t// Initializes the palette state based on paletteInitialState.\n\t// TODO - Remove this when paletteInitialState is removed from common-canvas.\n\topenPaletteIfNecessary(canvasConfig) {\n\t\tif (canvasConfig &&\n\t\t\t\ttypeof this.store.getPalette().isOpen === \"undefined\" &&\n\t\t\t\ttypeof canvasConfig.paletteInitialState !== \"undefined\") {\n\t\t\tif (canvasConfig.paletteInitialState) {\n\t\t\t\tthis.openPalette();\n\t\t\t} else {\n\t\t\t\tthis.closePalette();\n\t\t\t}\n\t\t}\n\t}\n\n\tclosePalette() {\n\t\tthis.store.dispatch({ type: \"SET_PALETTE_OPEN_STATE\", data: { isOpen: false } });\n\t}\n\n\tisPaletteOpen() {\n\t\t// TODO - We can just return isOpen directly from here when\n\t\t// paletteInitialState is removed from common-canvas and isOpen can be\n\t\t// initialized correctly in canvas-store.\n\t\tconst isOpen = this.store.getPalette().isOpen;\n\t\treturn (typeof isOpen === \"undefined\" ? false : isOpen);\n\t}\n\n\tsetCategoryLoadingText(categoryId, loadingText) {\n\t\tthis.store.dispatch({ type: \"SET_CATEGORY_LOADING_TEXT\", data: { categoryId: categoryId, loadingText: loadingText } });\n\t}\n\n\tsetCategoryEmptyText(categoryId, emptyText) {\n\t\tthis.store.dispatch({ type: \"SET_CATEGORY_EMPTY_TEXT\", data: { categoryId: categoryId, emptyText: emptyText } });\n\t}\n\n\taddNodeTypeToPalette(nodeTypeObj, categoryId, categoryLabel, categoryDescription, categoryImage) {\n\t\tthis.addNodeTypesToPalette([nodeTypeObj], categoryId, categoryLabel, categoryDescription, categoryImage);\n\t}\n\n\taddNodeTypesToPalette(nodeTypeObjs, categoryId, categoryLabel, categoryDescription, categoryImage) {\n\t\tconst nodeTypePaletteData = {\n\t\t\t\"nodeTypes\": nodeTypeObjs,\n\t\t\t\"categoryId\": categoryId,\n\t\t\t\"categoryLabel\": categoryLabel,\n\t\t\t\"categoryDescription\": categoryDescription,\n\t\t\t\"categoryImage\": categoryImage\n\t\t};\n\n\t\tthis.store.dispatch({ type: \"ADD_NODE_TYPES_TO_PALETTE\", data: nodeTypePaletteData });\n\n\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\tvalidatePaletteAgainstSchema(this.getPaletteData(), LATEST_PALETTE_VERSION);\n\t\t}\n\t}\n\n\tremoveNodesFromPalette(selObjectIds, categoryId) {\n\t\tthis.store.dispatch({ type: \"REMOVE_NODE_TYPES_FROM_PALETTE\", data: { selObjectIds: selObjectIds, categoryId: categoryId } });\n\t}\n\n\t// Converts a nodeTemplate from the palette (which will be in the pipelineFlow\n\t// format) to a nodeTemplate compatible with the internal format stored in the\n\t// object model.\n\tconvertNodeTemplate(nodeTemplate) {\n\t\tlet node = null;\n\t\tif (nodeTemplate) {\n\t\t\tnode = PipelineInHandler.convertNode(nodeTemplate, this.getCanvasLayout());\n\n\t\t\t// PipelineInHandler will not handle the conversion of sub_pipelines\n\t\t\t// in supernodes to internal format so...\n\t\t\tif (node.type === SUPER_NODE) {\n\t\t\t\tnode = this.convertPipelineData(node);\n\t\t\t}\n\t\t\treturn node;\n\t\t}\n\t\treturn null;\n\t}\n\n\tconvertPipelineData(supernode) {\n\t\tconst pd = get(supernode, \"sub_pipelines\");\n\t\tlet newPd;\n\t\tif (pd) {\n\t\t\tnewPd = supernode.subflow_ref.url\n\t\t\t\t? []\n\t\t\t\t: PipelineInHandler.convertPipelinesToCanvasInfoPipelines(pd, this.getCanvasLayout());\n\t\t\t// Need to make sure pipeline IDs are unique.\n\t\t\tnewPd = this.cloneSupernodeContents(supernode, newPd);\n\t\t\tnewPd = prepareNodes(newPd, this.getNodeLayout(), this.getCanvasLayout(), this.layoutHandler, supernode);\n\n\t\t} else {\n\t\t\tconst newPipeline = this.createEmptyPipeline();\n\t\t\tnewPd = [newPipeline];\n\t\t\tset(supernode, \"subflow_ref.pipeline_id_ref\", newPipeline.id);\n\t\t}\n\t\tsupernode.sub_pipelines = newPd;\n\t\treturn supernode;\n\t}\n\n\t// Returns an object containing nodes and pipelines. The nodes are the\n\t// same as the array of nodes passed in except that, any supernodes within\n\t// the array will have their app_data.ui_data.sub_pipelines fields removed. The\n\t// pipelines returned will be any pipelines that were contained within the\n\t// app_data.ui_data.sub_pipelines fields.\n\textractAddDataPipelines(inNodes) {\n\t\tconst pipelines = [];\n\t\tconst nodes = [];\n\t\tinNodes.forEach((n) => {\n\t\t\tif (CanvasUtils.isSupernode(n)) {\n\t\t\t\tconst pDataArray = get(n, \"sub_pipelines\");\n\t\t\t\tif (pDataArray) {\n\t\t\t\t\tpipelines.push(...pDataArray);\n\t\t\t\t\tif (n.sub_pipelines) {\n\t\t\t\t\t\tdelete n.sub_pipelines;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tnodes.push(n);\n\t\t});\n\n\t\treturn { nodes, pipelines };\n\t}\n\n\tgetPaletteNode(nodeOpIdRef) {\n\t\tlet outNodeType = null;\n\t\tif (nodeOpIdRef && !isEmpty(this.getPaletteData())) {\n\t\t\tthis.getPaletteData().categories.forEach((category) => {\n\t\t\t\tcategory.node_types.forEach((nodeType) => {\n\t\t\t\t\tif (nodeType.op === nodeOpIdRef) {\n\t\t\t\t\t\toutNodeType = nodeType;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn outNodeType;\n\t}\n\n\tgetPaletteNodeById(nodeId) {\n\t\tlet outNodeType = null;\n\t\tif (!isEmpty(this.getPaletteData())) {\n\t\t\tthis.getPaletteData().categories.forEach((category) => {\n\t\t\t\tcategory.node_types.forEach((nodeType) => {\n\t\t\t\t\tif (nodeType.id === nodeId) {\n\t\t\t\t\t\toutNodeType = nodeType;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn outNodeType;\n\t}\n\n\tgetCategoryForNode(operatorId) {\n\t\tlet result = null;\n\t\tthis.getPaletteData().categories.forEach((category) => {\n\t\t\tcategory.node_types.forEach((nodeType) => {\n\t\t\t\tif (nodeType.op === operatorId) {\n\t\t\t\t\tresult = category;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn result;\n\t}\n\n\tvalidateAndUpgradePalette(newPalette) {\n\t\t// Clone the palette to ensure we don't modify the incoming parameter.\n\t\tlet pal = cloneDeep(newPalette);\n\n\t\tconst version = extractPaletteVersion(pal);\n\n\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\tvalidatePaletteAgainstSchema(pal, version);\n\t\t}\n\n\t\tif (version !== LATEST_PALETTE_VERSION) {\n\t\t\tpal = upgradePalette(pal);\n\n\t\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\t\tvalidatePaletteAgainstSchema(pal, LATEST_PALETTE_VERSION);\n\t\t\t}\n\t\t}\n\t\treturn pal;\n\t}\n\n\tsetIsOpenCategory(categoryId, isOpen) {\n\t\tthis.store.dispatch({ type: \"SET_IS_OPEN_CATEGORY\", data: { categoryId: categoryId, isOpen } });\n\t}\n\n\tsetIsOpenAllCategories(isOpen) {\n\t\tthis.store.dispatch({ type: \"SET_IS_OPEN_ALL_CATEGORIES\", data: { isOpen } });\n\t}\n\n\tisPaletteCategoryOpen(categoryId) {\n\t\tconst category = this.store.getPaletteCategory(categoryId);\n\t\tif (category) {\n\t\t\treturn category.is_open;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Pipeline Flow and Canvas methods\n\t// ---------------------------------------------------------------------------\n\n\tgetAPIPipeline(pipelineId) {\n\t\tif (pipelineId) {\n\t\t\treturn new APIPipeline(pipelineId, this);\n\t\t}\n\t\treturn new APIPipeline(this.getCurrentBreadcrumb().pipelineId, this);\n\t}\n\n\tgetSelectionAPIPipeline() {\n\t\tconst id = this.getSelectedPipelineId();\n\t\tif (id) {\n\t\t\treturn this.getAPIPipeline(id);\n\t\t}\n\t\treturn null;\n\t}\n\n\tclearPipelineFlow() {\n\t\tthis.setCanvasInfo(this.getEmptyCanvasInfo());\n\t}\n\n\t// Deprecated TODO - Remove this method when WML Canvas supports pipeline Flow\n\t// TODO - Remember to also remove declaration of ObjectModel.oldCanvas from above\n\tsetCanvas(canvas) {\n\t\tthis.oldCanvas = canvas; // TODO - Remember to remove the declaration of this global when WML Canvas UI supports pipeline flow.\n\t\tvar canvasInfo = CanvasInHandler.convertCanvasToCanvasInfo(canvas);\n\t\tthis.setCanvasInfo(canvasInfo);\n\t}\n\n\t// Deprecated TODO - Remove this method when WML Canvas supports pipeline Flow\n\tgetCanvas() {\n\t\tif (this.oldCanvas) {\n\t\t\treturn CanvasOutHandler.getCanvasBasedOnCanvasInfo(this.oldCanvas, this.getCanvasInfo());\n\t\t}\n\t\treturn {};\n\t}\n\n\tgetEmptyCanvasInfo() {\n\t\tconst newFlowId = this.getUUID();\n\t\tconst newPipelineId = this.getUUID();\n\n\t\treturn {\n\t\t\t\"doc_type\": \"pipeline\",\n\t\t\t\"version\": \"3.0\",\n\t\t\t\"json_schema\": \"http://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json\",\n\t\t\t\"id\": newFlowId,\n\t\t\t\"primary_pipeline\": newPipelineId,\n\t\t\t\"pipelines\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": newPipelineId,\n\t\t\t\t\t\"runtime_ref\": \"\",\n\t\t\t\t\t\"nodes\": [],\n\t\t\t\t\t\"comments\": [],\n\t\t\t\t\t\"links\": []\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"schemas\": []\n\t\t};\n\t}\n\n\tsetPipelineFlow(newPipelineFlow) {\n\t\t// TODO - Remove this if clause when we remove x-* test files.\n\t\tif (newPipelineFlow.objectData) { // Old canvas docs will have an 'objectData' field\n\t\t\tthis.setCanvas(newPipelineFlow);\n\t\t\treturn;\n\t\t}\n\n\t\tconst canvasInfo = this.preparePipelineFlow(newPipelineFlow);\n\n\t\tthis.executeWithSelectionChange(this.store.dispatch, {\n\t\t\ttype: \"SET_CANVAS_INFO\",\n\t\t\tcanvasInfo: canvasInfo,\n\t\t\tcanvasInfoIdChanged: this.hasCanvasInfoIdChanged(canvasInfo),\n\t\t\tprimaryPipelineIdChanged: this.hasPrimaryPipelineIdChanged(canvasInfo)\n\t\t});\n\t}\n\n\t// Ensures the pipelines being handled is loaded in memory which might not\n\t// be the case if it is an external pipeline. The data parameter is expected\n\t// to contain targetObject (which is the supernode) and externalPipelineFlow\n\t// which is the pipeline flow referenced by the supernode's URL. Returns\n\t// true if a pipeline flow was loaded and false if not.\n\tensurePipelineIsLoaded(data) {\n\t\tconst snPipelineUrl = this.getSupernodePipelineUrl(data.targetObject);\n\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(data.targetObject);\n\n\t\t// If the pipeline isn't loaded check to make sure the external pipeline\n\t\t// flow provided contains the target pipeline and, if so, load the pipeline\n\t\t// flow into memory.\n\t\tif (!this.isPipelineLoaded(snPipelineId, snPipelineUrl)) {\n\t\t\t// If no pipeline flow is provided from beforeEditActionHandler we cannot\n\t\t\t// continue otherwise an endless loop will occur. So throw and exception.\n\t\t\tif (!data.externalPipelineFlow) {\n\t\t\t\tconst msg = \"The external pipeline flow at '\" + data.externalUrl +\n\t\t\t\t\t\"' was not provided. Make sure you have implemented beforeEditActionHandler to support external pipeline flows.\";\n\t\t\t\tthis.logger.error(msg);\n\t\t\t\tthrow msg;\n\t\t\t}\n\n\t\t\t// If the flow doesn't contain the pipeline we're looking for.\n\t\t\tif (!this.flowContainsPipeline(data.externalPipelineFlow, snPipelineId)) {\n\t\t\t\tconst msg = \"The external pipeline flow '\" + data.externalPipelineFlow.id +\n\t\t\t\t\t\"' does not contain a pipeline with ID: \" + snPipelineId;\n\t\t\t\tthis.logger.error(msg);\n\t\t\t\tthrow msg;\n\t\t\t}\n\n\t\t\tthis.addExternalPipelineFlow(data.externalPipelineFlow, snPipelineUrl, data.targetObject, true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Returns an array of 'visible' supernodes that refer to external pipelines\n\t// which are not currently loaded into memory. 'Visible' in this context means\n\t// they are either in the primary pipeline flow or are within the sub-flow\n\t// of an expanded supernode.\n\tgetVisibleExpandedExternalSupernodes() {\n\t\tconst pipeline = this.getCurrentPipeline();\n\t\tconst supernodes = this.getVisibleExpandedExternalSupernodesForPipeline(pipeline, this.getPipelines());\n\t\treturn supernodes;\n\t}\n\n\t// Returns an array of 'visible' expanded supernodes for the pipeline passed\n\t// in given the current set of pipelines that are in memory.\n\tgetVisibleExpandedExternalSupernodesForPipeline(pipeline, pipelines) {\n\t\tlet supernodes = [];\n\t\tpipeline.nodes.forEach((n) => {\n\t\t\tif (n.type === SUPER_NODE && n.is_expanded) {\n\t\t\t\tconst subFlowPipeline = pipelines.find((p) => p.id === CanvasUtils.getSupernodePipelineId(n));\n\n\t\t\t\t// If this expanded supernode refers to an external pipeline that is\n\t\t\t\t// not yet loaded then save to our output.\n\t\t\t\tif (n.subflow_ref.url && !subFlowPipeline) {\n\t\t\t\t\tsupernodes.push(n);\n\t\t\t\t}\n\t\t\t\t// For expanded supernodes, check the referenced pipeline to see if\n\t\t\t\t// it has any nested expanded supernodes.\n\t\t\t\tif (subFlowPipeline) {\n\t\t\t\t\tconst sns = this.getVisibleExpandedExternalSupernodesForPipeline(subFlowPipeline, pipelines);\n\t\t\t\t\tsupernodes = supernodes.concat(sns);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn supernodes;\n\t}\n\n\t// Returns true if the pipelineFlow passed in contains the pipeline identified\n\t// by the pipelineId passed in.\n\tflowContainsPipeline(pipelineFlow, pipelineId) {\n\t\tif (pipelineFlow.pipelines) {\n\t\t\treturn pipelineFlow.pipelines.some((p) => p.id === pipelineId);\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Adds the external pipeline flow, which has been retrieved using the url,\n\t// into memory. This means adding the pipelines into the set of\n\t// pipelines in the canvas info and saving the pipeline flow properties\n\t// (except for the pipelines property) using the externalpipelineflows\n\t// reducer. shouldAddPipelines is a boolean that controls whether pipelines\n\t// are added or not.\n\taddExternalPipelineFlow(externalPipelineFlow, url, supernode, shouldAddPipelines = true) {\n\t\tconst convertedPf = this.preparePipelineFlow(externalPipelineFlow, supernode);\n\t\tconvertedPf.pipelines.forEach((p) => (p.parentUrl = url));\n\n\t\t// Make a copy and remove the pipelines from the pipeline flow\n\t\tconst newPipelineFlow = Object.assign({}, convertedPf);\n\t\tnewPipelineFlow.pipelines = [];\n\t\tnewPipelineFlow.url = url;\n\n\t\tthis.store.dispatch({\n\t\t\ttype: \"ADD_EXTERNAL_PIPELINE_FLOW\",\n\t\t\tnewPipelineFlow: newPipelineFlow,\n\t\t\tnewPipelines: shouldAddPipelines ? convertedPf.pipelines : []\n\t\t});\n\t}\n\n\t// Removes the external pipeline flow specified by the url passed in.\n\tremoveExternalPipelineFlow(url) {\n\t\tthis.store.dispatch({\n\t\t\ttype: \"REMOVE_EXTERNAL_PIPELINE_FLOW\",\n\t\t\texternalUrl: url\n\t\t});\n\t}\n\n\t// Returns a new header object for the external pipeline flow. A dummy\n\t// pipeline will be added to the pipeline flow. This will be replaced by\n\t// the actual pipelines when the pipeline flow is retrieved using\n\t// CommonCanvas.getExternalPipelineFlow.\n\tcreateExternalPipelineFlowTemplate(pipelineFlowId, pipelineId) {\n\t\treturn {\n\t\t\t\"doc_type\": \"pipeline\",\n\t\t\t\"version\": \"3.0\",\n\t\t\t\"json_schema\": \"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json\",\n\t\t\t\"id\": pipelineFlowId,\n\t\t\t\"primary_pipeline\": pipelineId,\n\t\t\t\"pipelines\": [{ \"id\": \"\", \"runtime_ref\": \"\", \"nodes\": [] }],\n\t\t\t\"schemas\": [],\n\t\t\t\"runtimes\": []\n\t\t};\n\t}\n\n\t// Used by Cypress tests\n\tgetExternalPipelineFlows() {\n\t\treturn this.store.getExternalPipelineFlows();\n\t}\n\n\t// Returns a unique set of external pipeline flows corresponding\n\t// to the the set of pipelines passed in.\n\tgetExternalPipelineFlowsForPipelines(pipelines) {\n\t\tconst urls = this.getUniqueUrls(pipelines);\n\t\treturn this.getExternalPipelineFlowsForUrls(urls);\n\t}\n\n\t// Returns a unique array of URLS from the array of pipelines passed in.\n\tgetUniqueUrls(pipelines) {\n\t\tconst urls = [];\n\t\tpipelines.forEach((p) => {\n\t\t\tif (p.parentUrl && !urls.includes(p.parentUrl)) {\n\t\t\t\turls.push(p.parentUrl);\n\t\t\t}\n\t\t});\n\t\treturn urls;\n\t}\n\n\t// Returns an array of external pipeline flows corresponding to the\n\t// array of URLs passed in.\n\tgetExternalPipelineFlowsForUrls(urls) {\n\t\tconst extPipelineFlows = [];\n\t\turls.forEach((url) => {\n\t\t\tconst extFlow = this.getExternalPipelineFlow(url);\n\t\t\textFlow.url = url;\n\t\t\textPipelineFlows.push(extFlow);\n\t\t});\n\t\treturn extPipelineFlows;\n\t}\n\n\tgetExternalPipelineFlow(url) {\n\t\t// Get the external pipeline flow\n\t\tlet pipelineFlow = this.store.getExternalPipelineFlow(url);\n\n\t\tif (pipelineFlow) {\n\t\t\t// Remove the url field because it is not part of the pipeline flow specification\n\t\t\tdelete pipelineFlow.url;\n\n\t\t\t// Extract the pipelines from the canvas info that correspond to the url\n\t\t\t// and add them to the pipeline flow.\n\t\t\tconst canvasInfo = this.getCanvasInfo();\n\t\t\tpipelineFlow.pipelines = canvasInfo.pipelines.filter((p) => p.parentUrl === url);\n\n\t\t\t// Remove the parentUrl property because it is not part of the pipeline flow schema.\n\t\t\tpipelineFlow.pipelines.forEach((p) => delete p.parentUrl);\n\n\t\t\tpipelineFlow =\n\t\t\t\tPipelineOutHandler.createPipelineFlow(pipelineFlow);\n\n\t\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\t\tvalidatePipelineFlowAgainstSchema(pipelineFlow);\n\t\t\t}\n\t\t}\n\n\t\treturn pipelineFlow;\n\t}\n\n\tsetParentUrl(pipelines, url) {\n\t\tthis.store.dispatch({ type: \"SET_PIPELINE_PARENT_URL\", data: { pipelines: pipelines, url: url } });\n\t}\n\n\treplaceSupernodeAndPipelines(data) {\n\t\tthis.store.dispatch({ type: \"REPLACE_SN_AND_PIPELINES\", data: data });\n\t}\n\n\t// Prepares a pipelineFlow to be loaded into memory in the canvas info. This\n\t// involves flattening the pipeline flow hierarchy and adding layout info\n\t// to the nodes in the pipelines.\n\tpreparePipelineFlow(newPipelineFlow, supernode) {\n\t\tconst pipelineFlow = this.validateAndUpgrade(newPipelineFlow);\n\t\tconst canvasInfo = PipelineInHandler.convertPipelineFlowToCanvasInfo(pipelineFlow, this.getCanvasLayout());\n\t\tcanvasInfo.pipelines =\n\t\t\tprepareNodes(canvasInfo.pipelines, this.getNodeLayout(), this.getCanvasLayout(), this.layoutHandler, supernode);\n\t\treturn canvasInfo;\n\t}\n\n\t// Returns a copy of the node passed in with additional fields which contain\n\t// layout, dimension and supernode binding status info. This uses the redux\n\t// layout information.\n\tsetNodeAttributes(node) {\n\t\treturn setNodeAttributesWithLayout(node, this.getNodeLayout(), this.getCanvasLayout(), this.layoutHandler);\n\t}\n\n\t// Returns a copy of the comment passed in with position adjusted for\n\t// snap to grid, if necessary. This is called from the api-pipeline class.\n\tsetCommentAttributes(comment) {\n\t\treturn setCommentAttributesWithLayout(comment, this.getCanvasLayout());\n\t}\n\n\tvalidateAndUpgrade(newPipelineFlow) {\n\t\t// Clone the pipelineFlow to ensure we don't modify the incoming parameter.\n\t\tlet pipelineFlow = cloneDeep(newPipelineFlow);\n\n\t\tconst version = extractVersion(pipelineFlow);\n\n\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\tvalidatePipelineFlowAgainstSchema(pipelineFlow, version);\n\t\t}\n\n\t\tif (version !== LATEST_VERSION) {\n\t\t\tpipelineFlow = upgradePipelineFlow(pipelineFlow);\n\n\t\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\t\tvalidatePipelineFlowAgainstSchema(pipelineFlow, LATEST_VERSION);\n\t\t\t}\n\t\t}\n\t\treturn pipelineFlow;\n\t}\n\n\t// Returns the pipeline for the ID passed or the primary pipeline if no\n\t// pipeline ID was provided otherwise null.\n\tgetCanvasInfoPipeline(pipelineId) {\n\t\tconst canvasInfo = this.getCanvasInfo();\n\t\tif (!canvasInfo) {\n\t\t\treturn null;\n\t\t}\n\t\tlet pId = pipelineId;\n\t\tif (!pId) {\n\t\t\tpId = this.getPrimaryPipelineId();\n\t\t}\n\n\t\tconst pipeline = canvasInfo.pipelines.find((p) => p.id === pId);\n\n\t\treturn (typeof pipeline === \"undefined\") ? null : pipeline;\n\t}\n\n\tgetDescendantPipelineIds(pipelineId) {\n\t\tlet pipelineIds = [];\n\t\tthis.getAPIPipeline(pipelineId).getSupernodes()\n\t\t\t.forEach((supernode) => {\n\t\t\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(supernode);\n\t\t\t\tif (snPipelineId) {\n\t\t\t\t\tpipelineIds.push(snPipelineId);\n\t\t\t\t\tpipelineIds = pipelineIds.concat(this.getDescendantPipelineIds(snPipelineId));\n\t\t\t\t}\n\t\t\t});\n\t\treturn pipelineIds;\n\t}\n\n\tgetDescendantPipelinesForSupernodes(supernodes) {\n\t\tlet pipelines = [];\n\t\tsupernodes.forEach((sn) => {\n\t\t\tpipelines = pipelines.concat(this.getDescendantPipelinesForSupernode(sn));\n\t\t});\n\t\treturn pipelines;\n\t}\n\n\tgetDescendantPipelinesForSupernode(supernode) {\n\t\tlet pipelines = [];\n\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(supernode);\n\t\tif (snPipelineId) {\n\t\t\tconst subPipeline = this.getCanvasInfoPipeline(snPipelineId);\n\t\t\tif (subPipeline) {\n\t\t\t\tpipelines.push(subPipeline);\n\n\t\t\t\tthis.getAPIPipeline(snPipelineId).getSupernodes()\n\t\t\t\t\t.forEach((supernode2) => {\n\t\t\t\t\t\tpipelines = pipelines.concat(this.getDescendantPipelinesForSupernode(supernode2));\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn pipelines;\n\t}\n\n\t// Returns an array of descendant pipelines, that conform to the schema, for\n\t// the supernode passed in or an empty array if the supernode doesn't\n\t// reference a pipeline. Only 'local' pipelines are returned not external\n\t// ones.\n\tgetSchemaPipelinesForSupernode(supernode) {\n\t\tconst pipelines = this.getDescendantPipelinesForSupernode(supernode)\n\t\t\t.filter((p) => !p.parentUrl);\n\n\t\treturn pipelines.map((p) => PipelineOutHandler.createPipeline(p));\n\t}\n\n\t// Returns an array of pipelines to delete if all the supernodes passed in\n\t// were to be deleted. That is the set of descendant pipelines referenced by\n\t// the supernodes passed in, minus any external pipelines that are also\n\t// referenced by other supernodes/pipelines outside of the array passed in.\n\t// This situation may occur when two supernodes reference the same\n\t// external pipeline and one is to be deleted but the other is to remain.\n\tgetDescPipelinesToDelete(supernodesToDel, parentPipelineId) {\n\t\tconst supernodeInfosToDel = this.getDescendantSupernodeInfos(supernodesToDel, parentPipelineId);\n\t\tconst otherSupernodeInfos = this.getOtherSupernodeInfos(supernodesToDel, parentPipelineId);\n\n\t\tconst pipelinesToDelete = [];\n\t\tsupernodeInfosToDel.forEach((sid) => {\n\t\t\tif (this.shouldBeDeleted(sid, otherSupernodeInfos)) {\n\t\t\t\tconst p = this.getCanvasInfoPipeline(sid.pipelineId);\n\t\t\t\tpipelinesToDelete.push(p);\n\t\t\t}\n\t\t});\n\t\treturn pipelinesToDelete;\n\t}\n\n\t// Returns true if the supernode info object indicates a pipeline that\n\t// should be deleted because it is not referenced by any of the\n\t// otherSupernodeInfos passed in.\n\tshouldBeDeleted(supernodeInfo, otherSupernodeInfos) {\n\t\tlet state = true;\n\t\totherSupernodeInfos.forEach((osi) => {\n\t\t\tif (osi.pipelineId === supernodeInfo.pipelineId) {\n\t\t\t\tstate = false;\n\t\t\t}\n\t\t});\n\t\treturn state;\n\t}\n\n\t// Returns an array of all pipelines from the entire canvas info, minus any\n\t// pipelines that are descendants of the supernodes passed in (which all must\n\t// be in the pipeline identified by parentPipelineId)\n\tgetOtherSupernodeInfos(supernodesToIgnore, parentPipelineId) {\n\t\tconst primaryPipelineId = this.getPrimaryPipelineId();\n\t\tconst primaryPipeline = this.getCanvasInfoPipeline(primaryPipelineId);\n\t\tconst supernodes = CanvasUtils.filterSupernodes(primaryPipeline.nodes);\n\t\treturn this.getDescendantSupernodeInfos(supernodes, primaryPipelineId,\n\t\t\t{ supernodesToIgnore: supernodesToIgnore, parentPipelineId: parentPipelineId });\n\t}\n\n\t// Returns an array of pipelines that are the descendants of the array of\n\t// supernodes passed in (which must all be in the pipeline identified by the\n\t// parentPipelineId passed in) minus any descendant pipelines of the\n\t// supernodes identified by the ignoreInfo object. This has these fields:\n\t// supernodesToIgnore - an array of supernodes whose descendant pipelines\n\t// should be ignored.\n\t// parentPipelineId - the ID of the pipeline the supernodes are in.\n\tgetDescendantSupernodeInfos(supernodes, parentPipelineId, ignoreInfo) {\n\t\tconst outSupernodeInfos = [];\n\t\tsupernodes.forEach((sn) => {\n\t\t\tconst descInfo = this.getDescendantSupernodeInfosForSupernode(sn, parentPipelineId, ignoreInfo);\n\t\t\t// Only insert new supernode infos into the array.\n\t\t\tdescInfo.forEach((di) => {\n\t\t\t\tif (!this.isSupernodeInfoInArray(di, outSupernodeInfos)) {\n\t\t\t\t\toutSupernodeInfos.push(di);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn outSupernodeInfos;\n\t}\n\n\t// Returns an array of pipelines that are the descendants of the\n\t// supernode passed in (which must all be in the pipeline identified by the\n\t// parentPipelineId passed in) minus any descendant pipelines of the\n\t// supernodes identified by the ignoreInfo object. This has these fields:\n\t// supernodesToIgnore - an array of supernodes whose descendant pipelines\n\t// should be ignored.\n\t// parentPipelineId - the ID of the pipeline the supernodes are in.\n\tgetDescendantSupernodeInfosForSupernode(supernode, parentPipelineId, ignoreInfo) {\n\t\tlet supernodeInfos = [];\n\t\tif (this.continueNavigation(supernode, parentPipelineId, ignoreInfo)) {\n\t\t\tconst pipelineId = CanvasUtils.getSupernodePipelineId(supernode);\n\t\t\tconst pipeline = this.getCanvasInfoPipeline(pipelineId);\n\t\t\t// An external pipeline might not be loaded if the supernode is collapsed.\n\t\t\tif (pipeline) {\n\t\t\t\tsupernodeInfos.push({ pipelineId: pipelineId, supernode: supernode, parentPipelineId: parentPipelineId });\n\t\t\t\tconst supernodes = CanvasUtils.filterSupernodes(pipeline.nodes);\n\t\t\t\tsupernodes.forEach((sn) => {\n\t\t\t\t\tsupernodeInfos = supernodeInfos.concat(this.getDescendantSupernodeInfosForSupernode(sn, pipelineId, ignoreInfo));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn supernodeInfos;\n\t}\n\n\t// Returns true if the code should continue navigating down the supernode\n\t// hierarchy from the supernode (in parentPipelineId) passed based on the\n\t// ignoreInfo object.\n\tcontinueNavigation(sn, parentPipelineId, ignoreInfo) {\n\t\tif (ignoreInfo &&\n\t\t\t\tignoreInfo.parentPipelineId === parentPipelineId &&\n\t\t\t\tignoreInfo.supernodesToIgnore.some((sn2d) => sn2d.id === sn.id)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Returns true if the supernode info object passed in is in the\n\t// supernodeInfos array passed in.\n\tisSupernodeInfoInArray(di, supernodeInfos) {\n\t\tlet found = false;\n\t\tsupernodeInfos.forEach((si) => {\n\t\t\tif (this.isSupernodeInfoEqual(si, di)) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t});\n\t\treturn found;\n\t}\n\n\t// Returns true if the two supernode info objects are the same.\n\tisSupernodeInfoEqual(si1, si2) {\n\t\treturn si1.supernode.id === si2.supernode.id &&\n\t\t\tsi1.parentPipelineId === si2.parentPipelineId;\n\t}\n\n\t// Returns a list of the given pipelineId ancestors, from \"oldest\" to \"youngest\".\n\t// This is a list of objects containing the pipeline id and its corresponding supernode label and id.\n\t// Includes itself.\n\tgetAncestorPipelineIds(pipelineId) {\n\t\tconst primaryPipelineId = this.getPrimaryPipelineId();\n\t\tif (primaryPipelineId === pipelineId) {\n\t\t\treturn [{ pipelineId: primaryPipelineId }];\n\t\t}\n\t\tconst ancestors = [{ pipelineId: primaryPipelineId }];\n\t\treturn ancestors.concat(this.getAncestorsBetween(primaryPipelineId, pipelineId));\n\t}\n\n\tgetAncestorsBetween(upperPipelineId, lowerPipelineId) {\n\t\tlet ancestors = [];\n\t\tthis.getAPIPipeline(upperPipelineId).getSupernodes()\n\t\t\t.forEach((supernode) => {\n\t\t\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(supernode);\n\t\t\t\tif (snPipelineId) {\n\t\t\t\t\tif (this.isAncestorOfPipeline(snPipelineId, lowerPipelineId) || snPipelineId === lowerPipelineId) {\n\t\t\t\t\t\tancestors.push({ pipelineId: snPipelineId, label: supernode.label, supernodeId: supernode.id, parentPipelineId: upperPipelineId });\n\t\t\t\t\t}\n\t\t\t\t\tancestors = ancestors.concat(this.getAncestorsBetween(snPipelineId, lowerPipelineId));\n\t\t\t\t}\n\t\t\t});\n\t\treturn ancestors;\n\t}\n\n\t// Returns true if ancestorId is an ancestor pipeline of pipelineId.\n\tisAncestorOfPipeline(ancestorId, pipelineId) {\n\t\treturn this.getDescendantPipelineIds(ancestorId).includes(pipelineId);\n\t}\n\n\tgetSupernodePipelineUrl(supernode) {\n\t\tif (supernode.type === SUPER_NODE &&\n\t\t\t\thas(supernode, \"subflow_ref.url\")) {\n\t\t\treturn supernode.subflow_ref.url;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Return the supernode object that has a subflow_ref to the given pipelineId.\n\t// There should only be one supernode referencing the pipeline.\n\tgetSupernodeObjReferencing(pipelineId) {\n\t\tlet supernodeRef;\n\t\tif (pipelineId === this.getPrimaryPipelineId()) {\n\t\t\tconst supernodes = this.getAPIPipeline(pipelineId).getSupernodes();\n\t\t\tsupernodeRef = supernodes.find((supernode) => CanvasUtils.getSupernodePipelineId(supernode) === pipelineId).id;\n\t\t} else {\n\t\t\tconst ancestorPipelines = this.getAncestorPipelineIds(pipelineId);\n\t\t\tconst supernodePipelineObj = ancestorPipelines.find((pipelineObj) => pipelineObj.pipelineId === pipelineId && has(pipelineObj, \"supernodeId\"));\n\t\t\tsupernodeRef = supernodePipelineObj;\n\t\t}\n\t\treturn supernodeRef;\n\t}\n\n\tsetCanvasInfo(inCanvasInfo) {\n\t\tconst canvasInfo = Object.assign({}, inCanvasInfo);\n\t\tcanvasInfo.pipelines =\n\t\t\tprepareNodes(canvasInfo.pipelines, this.getNodeLayout(), this.getCanvasLayout(), this.layoutHandler);\n\t\tthis.store.dispatch({ type: \"SET_CANVAS_INFO\", canvasInfo: canvasInfo, canvasInfoIdChanged: this.hasCanvasInfoIdChanged(canvasInfo) });\n\t}\n\n\t// Returns a pipeline flow based on the initial pipeline flow we were given\n\t// with the changes to canvasinfo made by the user. We don't do this in the\n\t// redux code because that would result is continuous update of the pipelineflow\n\t// as the consuming app makes getPipelineFlow() calls which are difficult to\n\t// handle when testing.\n\tgetPipelineFlow() {\n\t\tconst pipelineFlow =\n\t\t\tPipelineOutHandler.createPipelineFlow(this.getCanvasInfo());\n\n\t\tif (this.store.getCanvasConfig().schemaValidation) {\n\t\t\tvalidatePipelineFlowAgainstSchema(pipelineFlow);\n\t\t}\n\n\t\treturn pipelineFlow;\n\t}\n\n\tgetPipelines() {\n\t\treturn this.getCanvasInfo().pipelines;\n\t}\n\n\tgetPipelineFlowId() {\n\t\treturn this.store.getPipelineFlowId();\n\t}\n\n\tgetPrimaryPipelineId() {\n\t\treturn this.store.getPrimaryPipelineId();\n\t}\n\n\tgetPrimaryPipeline() {\n\t\treturn this.getCanvasInfoPipeline(this.getPrimaryPipelineId());\n\t}\n\n\tgetCurrentPipeline() {\n\t\treturn this.getCanvasInfoPipeline(this.getCurrentPipelineId());\n\t}\n\n\tgetCurrentPipelineId() {\n\t\treturn this.getCurrentBreadcrumb().pipelineId;\n\t}\n\n\tisPrimaryPipelineEmpty() {\n\t\treturn this.getAPIPipeline(this.getPrimaryPipelineId()).isEmpty();\n\t}\n\n\tdeletePipeline(pipelineId) {\n\t\tthis.store.dispatch({ type: \"DELETE_PIPELINE\", data: { id: pipelineId } });\n\t}\n\n\t// Returns true if the pipeline is loaded into memory. It may not be in\n\t// memory if it is an external pipeline.\n\tisPipelineLoaded(pipelineId, url) {\n\t\tconst canvasInfo = this.getCanvasInfo();\n\t\tif (!canvasInfo) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn canvasInfo.pipelines.some((p) => this.isPipeline(p, pipelineId, url));\n\t}\n\n\t// Returns true if the pipeline passed in is the same as that specified by the\n\t// pipelineId and url parameters passed in. If url is not defined then only\n\t// the pipeline ID is used for comparison. A url will only be specified for\n\t// external pipelines.\n\tisPipeline(p, pipelineId, url) {\n\t\tif (p.id === pipelineId) {\n\t\t\tif (!p.parentUrl && !url) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn p.parentUrl === url;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Clones the contents of the input node (which is expected to be a supernode\n\t// with a reference to one of the pipelines passed in) and returns an array\n\t// of cloned pipelines from the inPipelines array that correspond to\n\t// descendants of the supernode passed in.\n\tcloneSupernodeContents(node, inPipelines) {\n\t\tlet subPipelines = [];\n\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(node);\n\t\tif (snPipelineId) {\n\t\t\tconst targetPipeline = inPipelines.find((p) => p.id === snPipelineId);\n\t\t\t// A target pipeline may not exist if the supernode is external. In which\n\t\t\t// case, its pipelines will not be in the inPipelines array.\n\t\t\tif (targetPipeline) {\n\t\t\t\tconst clonedPipeline = this.clonePipelineWithNewId(targetPipeline);\n\t\t\t\tnode.subflow_ref.pipeline_id_ref = clonedPipeline.id;\n\n\t\t\t\tsubPipelines.push(clonedPipeline);\n\n\t\t\t\tclonedPipeline.nodes.forEach((clonedNode) => {\n\t\t\t\t\tif (clonedNode.type === SUPER_NODE) {\n\t\t\t\t\t\tconst extraPipelines = this.cloneSupernodeContents(clonedNode, inPipelines);\n\t\t\t\t\t\tsubPipelines = subPipelines.concat(extraPipelines);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn subPipelines;\n\t}\n\n\t// Clone the pipeline and assigns it a new id.\n\tclonePipelineWithNewId(pipeline) {\n\t\tconst clonedPipeline = cloneDeep(pipeline);\n\t\treturn Object.assign({}, clonedPipeline, { id: this.getUniqueId(CLONE_PIPELINE, { \"pipeline\": clonedPipeline }) });\n\t}\n\n\tcreateCanvasInfoPipeline(pipelineInfo) {\n\t\tconst newPipelineId = this.getUniqueId(CREATE_PIPELINE, { pipeline: pipelineInfo });\n\t\treturn Object.assign({}, pipelineInfo, { id: newPipelineId });\n\t}\n\n\tgetCanvasInfo() {\n\t\treturn this.store.getCanvasInfo();\n\t}\n\n\t// Returns true if the ID of the canvasInfo passed in is different to the\n\t// current canvasInfo ID.\n\thasCanvasInfoIdChanged(canvasInfo) {\n\t\treturn canvasInfo.id !== this.getCanvasInfo().id;\n\t}\n\n\thasPrimaryPipelineIdChanged(canvasInfo) {\n\t\treturn canvasInfo.primary_pipeline !== this.getCanvasInfo().primary_pipeline;\n\t}\n\n\tsetSubdueStyle(newStyle) {\n\t\tthis.store.dispatch({ type: \"SET_SUBDUE_STYLE\", data: { subdueStyle: newStyle } });\n\t}\n\n\tremoveAllStyles(temporary) {\n\t\tthis.store.dispatch({ type: \"REMOVE_ALL_STYLES\", data: { temporary: temporary } });\n\t}\n\n\thideComments() {\n\t\tthis.store.dispatch({ type: \"HIDE_COMMENTS\" });\n\t}\n\n\tshowComments() {\n\t\tthis.store.dispatch({ type: \"SHOW_COMMENTS\" });\n\t}\n\n\tisHidingComments() {\n\t\treturn this.store.getCanvasInfo().hideComments;\n\t}\n\n\tfindNode(nodeId, pipelineId, pipelines) {\n\t\tconst targetPipeline = pipelines.find((p) => p.id === pipelineId);\n\n\t\tif (targetPipeline && targetPipeline.nodes) {\n\t\t\treturn targetPipeline.nodes.find((node) => node.id === nodeId);\n\t\t}\n\t\treturn null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Breadcrumbs methods\n\t// ---------------------------------------------------------------------------\n\n\tcreateBreadcrumb(supernodeDatum, parentPipelineId) {\n\t\treturn {\n\t\t\tpipelineId: supernodeDatum.subflow_ref.pipeline_id_ref,\n\t\t\tsupernodeId: supernodeDatum.id,\n\t\t\tsupernodeParentPipelineId: parentPipelineId,\n\t\t\texternalUrl: supernodeDatum.subflow_ref.url,\n\t\t\tlabel: supernodeDatum.label\n\t\t};\n\t}\n\n\taddBreadcrumb(data) {\n\t\tif (data && data.pipelineId !== this.getPrimaryPipelineId()) {\n\t\t\tthis.store.dispatch({ type: \"ADD_BREADCRUMB\", data: data });\n\t\t} else {\n\t\t\tthis.resetBreadcrumb();\n\t\t}\n\t}\n\n\taddBreadcrumbs(data) {\n\t\tthis.store.dispatch({ type: \"ADD_BREADCRUMBS\", data: data });\n\t}\n\n\tsetIndexedBreadcrumb(data) {\n\t\tthis.store.dispatch({ type: \"SET_TO_INDEXED_BREADCRUMB\", data: data });\n\t}\n\n\tsetBreadcrumbs(breadcrumbs) {\n\t\tthis.store.dispatch({ type: \"SET_BREADCRUMBS\", data: { breadcrumbs: breadcrumbs } });\n\t}\n\n\t// Sets the breadcrumbs to the previous breadcrumb in the breadcrumbs array.\n\tsetPreviousBreadcrumb() {\n\t\tthis.store.dispatch({ type: \"SET_TO_PREVIOUS_BREADCRUMB\" });\n\t}\n\n\t// Sets the breadcrumbs to the primary pipeline in the breadcrumbs array.\n\tresetBreadcrumb() {\n\t\tthis.store.dispatch({ type: \"RESET_BREADCRUMB\", data: { pipelineId: this.getPrimaryPipelineId() } });\n\t}\n\n\tgetBreadcrumbs() {\n\t\treturn this.store.getBreadcrumbs();\n\t}\n\n\tgetCurrentBreadcrumb() {\n\t\tconst crumbs = this.getBreadcrumbs();\n\t\treturn crumbs[crumbs.length - 1];\n\t}\n\n\tgetPreviousBreadcrumb() {\n\t\tconst crumbs = this.getBreadcrumbs();\n\t\tif (crumbs.length < 2) {\n\t\t\treturn null;\n\t\t}\n\t\treturn crumbs[crumbs.length - 2];\n\t}\n\n\t// Returns true if the pipelineId passed in is not the primary pipeline\n\t// breadcrumb. In other words, we are showing a sub-flow full screen.\n\tisInSubFlowBreadcrumb(pipelineId) {\n\t\tconst idx = this.getBreadcrumbs().findIndex((crumb) => crumb.pipelineId === pipelineId);\n\t\treturn (idx > 0); // Return true if index is not the parent\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Config methods\n\t// ---------------------------------------------------------------------------\n\tsetCanvasConfig(config) {\n\t\tconst oldConfig = this.getCanvasConfig();\n\t\tconst newConfig = ConfigUtils.mergeCanvasConfigs(oldConfig, config);\n\n\t\tif (!ConfigUtils.compareCanvasConfigs(oldConfig, newConfig)) {\n\t\t\tconst newPipelines = prepareNodes(\n\t\t\t\tthis.getCanvasInfo().pipelines, newConfig.enableNodeLayout, newConfig.enableCanvasLayout, this.layoutHandler);\n\n\t\t\tthis.store.dispatch({ type: \"SET_CANVAS_CONFIG_INFO\", data: {\n\t\t\t\tcanvasConfig: newConfig,\n\t\t\t\tpipelines: newPipelines\n\t\t\t} });\n\t\t}\n\t}\n\n\tsetToolbarConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_TOOLBAR_CONFIG\", data: { toolbarConfig: config } });\n\t}\n\n\t// The toolbar.jsx React object retrieves some display attributes from the\n\t// canvas-controller, not from Redux. This method will refresh the toolbar\n\t// config which causes mapStateToProps to run in toolbar.jsx and that\n\t// will cause the toolbar to retrieve those attributes from canvas-controller.\n\trefreshToolbar() {\n\t\tthis.store.dispatch({ type: \"REFRESH_TOOLBAR\" });\n\t}\n\n\tsetNotificationPanelConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_NOTIFICATION_PANEL_CONFIG\", data: { notificationPanelConfig: config } });\n\t}\n\n\tgetCanvasConfig() {\n\t\treturn this.store.getCanvasConfig();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Layout Info methods\n\t// ---------------------------------------------------------------------------\n\n\tgetNodeLayout() {\n\t\treturn this.store.getNodeLayout();\n\t}\n\n\tgetCanvasLayout() {\n\t\treturn this.store.getCanvasLayout();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Notification Messages methods\n\t// ---------------------------------------------------------------------------\n\n\tclearNotificationMessages() {\n\t\tthis.store.dispatch({ type: \"CLEAR_NOTIFICATION_MESSAGES\" });\n\t}\n\n\tsetNotificationMessages(messages) {\n\t\tthis.store.dispatch({ type: \"SET_NOTIFICATION_MESSAGES\", data: { messages: messages } });\n\t}\n\n\tgetNotificationMessages(messageType) {\n\t\tconst notificationMessages = this.store.getNotifications();\n\t\tif (messageType) {\n\t\t\treturn notificationMessages.filter((message) => message.type === messageType);\n\t\t}\n\t\treturn notificationMessages;\n\t}\n\n\tdeleteNotificationMessages(ids) {\n\t\tthis.store.dispatch({ type: \"DELETE_NOTIFICATION_MESSAGES\", data: { ids: ids } });\n\t}\n\n\ttoggleNotificationPanel() {\n\t\tif (this.isNotificationPanelOpen()) {\n\t\t\tthis.closeNotificationPanel();\n\t\t} else {\n\t\t\tthis.openNotificationPanel();\n\t\t}\n\t}\n\n\topenNotificationPanel() {\n\t\tthis.store.dispatch({ type: \"SET_NOTIFICATION_PANEL_OPEN_STATE\", data: { isOpen: true } });\n\t}\n\n\tcloseNotificationPanel() {\n\t\tthis.store.dispatch({ type: \"SET_NOTIFICATION_PANEL_OPEN_STATE\", data: { isOpen: false } });\n\t}\n\n\tisNotificationPanelOpen() {\n\t\treturn this.store.isNotificationPanelOpen();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Context menu methods\n\t// ---------------------------------------------------------------------------\n\n\topenContextMenu(menuDef, source) {\n\t\tthis.store.dispatch({ type: \"OPEN_CONTEXT_MENU\", data: { menuDef, source } });\n\t}\n\n\tcloseContextMenu() {\n\t\tthis.store.dispatch({ type: \"CLOSE_CONTEXT_MENU\" });\n\t}\n\n\tisContextMenuDisplayed() {\n\t\treturn this.store.isContextMenuDisplayed();\n\t}\n\n\tgetContextMenuSource() {\n\t\treturn this.store.getContextMenuSource();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Left flyout methods\n\t// ---------------------------------------------------------------------------\n\n\tsetLeftFlyoutConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_LEFT_FLYOUT_CONFIG\", data: { config: config } });\n\t}\n\n\tisLeftFlyoutOpen() {\n\t\treturn this.store.isLeftFlyoutOpen();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Right flyout methods\n\t// ---------------------------------------------------------------------------\n\n\tsetRightFlyoutConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_RIGHT_FLYOUT_CONFIG\", data: { config: config } });\n\t}\n\n\tisRightFlyoutOpen() {\n\t\treturn this.store.isRightFlyoutOpen();\n\t}\n\n\tsetRightFlyoutWidth(wd) {\n\t\tthis.store.dispatch({ type: \"SET_RIGHT_FLYOUT_CONFIG\", data: { config: { panelWidth: wd } } });\n\t}\n\n\tsetRightFlyoutMinWidth(wd) {\n\t\tthis.store.dispatch({ type: \"SET_RIGHT_FLYOUT_CONFIG\", data: { config: { panelMinWidth: wd } } });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Bottom panel methods\n\t// ---------------------------------------------------------------------------\n\n\tsetBottomPanelConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_BOTTOM_PANEL_CONFIG\", data: { config: config } });\n\t}\n\n\tisBottomPanelOpen() {\n\t\treturn this.store.isBottomPanelOpen();\n\t}\n\n\tsetBottomPanelHeight(ht) {\n\t\tthis.store.dispatch({ type: \"SET_BOTTOM_PANEL_CONFIG\", data: { config: { panelHeight: ht } } });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Top panel methods\n\t// ---------------------------------------------------------------------------\n\n\tsetTopPanelConfig(config) {\n\t\tthis.store.dispatch({ type: \"SET_TOP_PANEL_CONFIG\", data: { config: config } });\n\t}\n\n\tisTopPanelOpen() {\n\t\treturn this.store.isTopPanelOpen();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Clone methods\n\t// ---------------------------------------------------------------------------\n\tcloneObjectsToPaste(nodes, comments, links) {\n\t\tconst clonedNodesInfo = [];\n\t\tconst clonedCommentsInfo = [];\n\t\tconst clonedLinks = [];\n\n\t\tif (nodes) {\n\t\t\tnodes.forEach((node) => {\n\t\t\t\tlet clonedNode = this.cloneNode(node);\n\t\t\t\t// Pipelines in app_data.ui_data.sub_pipelines in supernodes will be in schema\n\t\t\t\t// format (conforming to the pipeline flow schema) so they must be converted.\n\t\t\t\tif (clonedNode.type === SUPER_NODE) {\n\t\t\t\t\tclonedNode = this.convertPipelineData(clonedNode);\n\t\t\t\t}\n\t\t\t\tclonedNodesInfo.push({ originalId: node.id, node: clonedNode });\n\t\t\t});\n\t\t}\n\n\t\tif (comments) {\n\t\t\tcomments.forEach((comment) => {\n\t\t\t\tclonedCommentsInfo.push({ originalId: comment.id, comment: this.cloneComment(comment) });\n\t\t\t});\n\t\t}\n\n\t\tif (links) {\n\t\t\tlinks.forEach((link) => {\n\t\t\t\tif (link.type === \"nodeLink\" || link.type === \"associationLink\") {\n\t\t\t\t\tconst srcClonedNode = this.findClonedNode(link.srcNodeId, clonedNodesInfo);\n\t\t\t\t\tconst trgClonedNode = this.findClonedNode(link.trgNodeId, clonedNodesInfo);\n\t\t\t\t\tconst newLink = this.cloneNodeLink(link, srcClonedNode, trgClonedNode);\n\t\t\t\t\tclonedLinks.push(newLink);\n\t\t\t\t} else {\n\t\t\t\t\tconst srcClonedComment = this.findClonedComment(link.srcNodeId, clonedCommentsInfo);\n\t\t\t\t\tconst trgClonedNode = this.findClonedNode(link.trgNodeId, clonedNodesInfo);\n\t\t\t\t\tif (srcClonedComment && trgClonedNode) {\n\t\t\t\t\t\tconst newLink = this.cloneCommentLink(link, srcClonedComment.id, trgClonedNode.id);\n\t\t\t\t\t\tclonedLinks.push(newLink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tconst clonedNodes = clonedNodesInfo.map((cni) => cni.node);\n\t\tconst clonedComments = clonedCommentsInfo.map((cci) => cci.comment);\n\n\t\treturn { clonedNodes, clonedComments, clonedLinks };\n\t}\n\n\t// Returns the cloned node from the array of cloned nodes, identified\n\t// by the node ID passed in which is the ID of the original node.\n\tfindClonedNode(nodeId, clonedNodesInfo) {\n\t\tconst clonedNodeInfo = clonedNodesInfo.find((cni) => cni.originalId === nodeId);\n\t\tif (clonedNodeInfo) {\n\t\t\treturn clonedNodeInfo.node;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Returns the cloned comment from the array of cloned comments, identified\n\t// by the comment ID passed in which is the ID of the original comment.\n\tfindClonedComment(commentId, clonedCommentsInfo) {\n\t\tconst clonedCommentInfo = clonedCommentsInfo.find((cci) => cci.originalId === commentId);\n\t\tif (clonedCommentInfo) {\n\t\t\treturn clonedCommentInfo.comment;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Clone the node provided, with a new unique ID.\n\tcloneNode(inNode) {\n\t\tlet node = Object.assign({}, inNode, { id: this.getUniqueId(CLONE_NODE, { \"node\": inNode }) });\n\n\t\t// Add node height and width and, if appropriate, inputPortsHeight\n\t\t// and outputPortsHeight\n\t\tnode = this.setNodeAttributes(node);\n\t\treturn node;\n\t}\n\n\t// Clone the comment provided, with a new unique ID.\n\tcloneComment(inComment) {\n\t\t// Adjust for snap to grid, if necessary.\n\t\tconst comment = this.setCommentAttributes(inComment);\n\n\t\treturn Object.assign({}, comment, { id: this.getUniqueId(CLONE_COMMENT, { \"comment\": comment }) });\n\t}\n\n\t// Returns a clone of the link passed in using the source and target nodes\n\t// passed in. If a semi-detached or fully-detached link is being cloned the\n\t// srcNode and/or trgNode may be null.\n\tcloneNodeLink(link, srcNode, trgNode) {\n\t\tconst id = this.getUniqueId(CLONE_NODE_LINK, { \"link\": link, \"sourceNodeId\": srcNode ? srcNode.id : null, \"targetNodeId\": trgNode ? trgNode.id : null });\n\t\tconst clonedLink = Object.assign({}, link, { id: id });\n\n\t\tif (srcNode) {\n\t\t\tclonedLink.srcNodeId = srcNode.id;\n\t\t\tclonedLink.srcNodePortId = link.srcNodePortId;\n\t\t} else {\n\t\t\tclonedLink.srcPos = link.srcPos;\n\t\t}\n\t\tif (trgNode) {\n\t\t\tclonedLink.trgNodeId = trgNode.id;\n\t\t\tclonedLink.trgNodePortId = link.trgNodePortId;\n\t\t} else {\n\t\t\tclonedLink.trgPos = link.trgPos;\n\t\t}\n\t\treturn clonedLink;\n\t}\n\n\t// Returns a clone of the link passed in with the source and targets set to\n\t// the IDs passed in.\n\tcloneCommentLink(link, srcNodeId, trgNodeId) {\n\t\treturn {\n\t\t\tid: this.getUniqueId(CLONE_COMMENT_LINK, { \"link\": link, \"commentId\": srcNodeId, \"targetNodeId\": trgNodeId }),\n\t\t\ttype: link.type,\n\t\t\tclass_name: link.class_name,\n\t\t\tsrcNodeId: srcNodeId,\n\t\t\ttrgNodeId: trgNodeId\n\t\t};\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Selection methods\n\t// ---------------------------------------------------------------------------\n\n\tgetSelectedObjectIds() {\n\t\treturn this.store.getSelectedObjectIds();\n\t}\n\n\tgetSelectedNodesIds() {\n\t\treturn this.getSelectedNodes().map((n) => n.id);\n\t}\n\n\tgetSelectedNodes() {\n\t\treturn this.store.getSelectedNodes();\n\t}\n\n\tgetSelectedComments() {\n\t\treturn this.store.getSelectedComments();\n\t}\n\n\tgetSelectedLinks() {\n\t\treturn this.store.getSelectedLinks();\n\t}\n\n\tgetSelectedObjects() {\n\t\treturn this.getSelectedNodes()\n\t\t\t.concat(this.getSelectedComments())\n\t\t\t.concat(this.getSelectedLinks());\n\t}\n\n\tgetSelectionInfo() {\n\t\treturn this.store.getSelectionInfo();\n\t}\n\n\tgetSelectedPipeline() {\n\t\treturn this.getAPIPipeline(this.getSelectedPipelineId());\n\t}\n\n\tgetSelectedPipelineId() {\n\t\treturn this.store.getSelectedPipelineId();\n\t}\n\n\tclearSelections() {\n\t\tthis.executeWithSelectionChange(this.store.dispatch, { type: \"CLEAR_SELECTIONS\" });\n\t}\n\n\t// Simulates the selection of an object (identified by objId) in the\n\t// pipeline identified by pipelineId with the range and augment\n\t// parameters that indicate whether the user has requested a range\n\t// (shift key pressed) or an augmented selected (meta key pressed).\n\tselectObject(objId, range, augment, pipelineId) {\n\t\tif (!this.isSelected(objId, pipelineId)) {\n\t\t\tif (range) {\n\t\t\t\tthis.selectSubGraph(objId, pipelineId);\n\t\t\t} else {\n\t\t\t\tthis.toggleSelection(objId, augment, pipelineId);\n\t\t\t}\n\t\t} else if (augment || range) {\n\t\t\tthis.toggleSelection(objId, augment || range, pipelineId);\n\t\t}\n\t}\n\n\tisSelected(objectId, pipelineId) {\n\t\treturn pipelineId === this.getSelectedPipelineId() &&\n\t\t\tthis.getSelectedObjectIds().indexOf(objectId) >= 0;\n\t}\n\n\ttoggleSelection(objectId, toggleRequested, pipelineId) {\n\t\tlet newSelections = [objectId];\n\n\t\tif (pipelineId === this.getSelectedPipelineId() &&\n\t\t\t\ttoggleRequested) {\n\t\t\t// If already selected then remove otherwise add\n\t\t\tif (this.isSelected(objectId, pipelineId)) {\n\t\t\t\tnewSelections = this.getSelectedObjectIds().slice();\n\t\t\t\tconst index = newSelections.indexOf(objectId);\n\t\t\t\tnewSelections.splice(index, 1);\n\t\t\t}\telse {\n\t\t\t\tnewSelections = this.getSelectedObjectIds().concat(objectId);\n\t\t\t}\n\t\t}\n\t\tthis.setSelections(newSelections, pipelineId);\n\t}\n\n\tsetSelections(newSelections, pipelineId) {\n\t\t// This will return the default API pipeline if a pipelineId is not provided.\n\t\tconst selPipelineId = this.getAPIPipeline(pipelineId).pipelineId;\n\t\tthis.executeWithSelectionChange(\n\t\t\tthis.store.dispatch, { type: \"SET_SELECTIONS\", data: { selections: newSelections }, pipelineId: selPipelineId }\n\t\t);\n\t}\n\n\tdeleteSelectedObjects() {\n\t\tconst apiPipeline = this.getSelectedPipeline();\n\t\tapiPipeline.deleteObjects(this.getSelectedObjectIds());\n\t}\n\n\tselectAll(includeLinks, pipelineId) {\n\t\tconst selected = [];\n\t\tconst apiPipeline = this.getAPIPipeline(pipelineId);\n\t\tfor (const node of apiPipeline.getNodes()) {\n\t\t\tif (!CanvasUtils.isSuperBindingNode(node)) { // Don't allow supernode binding nodes to be selected\n\t\t\t\tselected.push(node.id);\n\t\t\t}\n\t\t}\n\t\tfor (const comment of apiPipeline.getComments()) {\n\t\t\tselected.push(comment.id);\n\t\t}\n\t\tif (includeLinks) {\n\t\t\tfor (const link of apiPipeline.getLinks()) {\n\t\t\t\tselected.push(link.id);\n\t\t\t}\n\t\t}\n\t\tthis.setSelections(selected, apiPipeline.pipelineId);\n\t}\n\n\tdeselectAll(pipelineId) {\n\t\tconst apiPipeline = this.getAPIPipeline(pipelineId);\n\t\tthis.setSelections([], apiPipeline.pipelineId);\n\t}\n\n\t// Selects a set of nodes which represents all connected nodes from the\n\t// current set of selected nodes to the end node passed in. If no\n\t// connecting nodes are found, the set of selected nodes remains the same.\n\tselectSubGraph(endNodeId, pipelineId) {\n\t\tconst selectedObjectIds = this.getSubGraphNodes(endNodeId, pipelineId);\n\t\tthis.setSelections(selectedObjectIds, pipelineId);\n\t}\n\n\t// Returns an array of node IDs that represent all connected nodes from the\n\t// current set of selected nodes to the end node passed in.\n\tgetSubGraphNodes(endNodeId, pipelineId) {\n\t\tconst selectedObjectIds = this.getSelectedObjectIds();\n\n\t\tif (pipelineId === this.getSelectedPipelineId()) {\n\t\t\tconst pipeline = this.getAPIPipeline(pipelineId);\n\t\t\tconst links = pipeline.getLinks();\n\t\t\tconst allPaths = [];\n\n\t\t\t// Loop through all the currently selected nodes which will be\n\t\t\t// our start nodes.\n\t\t\tfor (const startNodeId of selectedObjectIds) {\n\t\t\t\tconst paths = this.getGraphPaths(startNodeId, endNodeId, links);\n\t\t\t\tallPaths.push(...paths);\n\t\t\t}\n\n\t\t\t// Add to the set of currently selected object IDs any nodes\n\t\t\t// found that connect from them to the end node.\n\t\t\tfor (const path of allPaths) {\n\t\t\t\tfor (const nodeId of path) {\n\t\t\t\t\tif (!selectedObjectIds.includes(nodeId)) {\n\t\t\t\t\t\tselectedObjectIds.push(nodeId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Make sure the end node is included in the list of selected nodes.\n\t\tif (!selectedObjectIds.includes(endNodeId)) {\n\t\t\tselectedObjectIds.push(endNodeId);\n\t\t}\n\n\t\treturn selectedObjectIds;\n\t}\n\n\t// Returns an array of paths where each path is an array of nodes from\n\t// the start node to the end node.\n\tgetGraphPaths(startNodeId, endNodeId, links) {\n\t\tconst visited = new Set();\n\t\tconst path = [];\n\t\tconst paths = [];\n\n\t\tthis.getGraphPathForNode(startNodeId, endNodeId, path, visited, paths, links);\n\n\t\treturn paths;\n\t}\n\n\t// Updates the paths array with any new path found where a path is an array\n\t// of node IDs that connect the node passed in to the end node. To do this it uses\n\t// the path and visited arrays as working arrays.\n\tgetGraphPathForNode(nodeId, endNodeId, path, visited, paths, links) {\n\t\tif (nodeId === endNodeId) {\n\t\t\tpaths.push([...path, endNodeId]);\n\t\t\treturn;\n\t\t}\n\n\t\tif (visited.has(nodeId)) {\n\t\t\t// If we've visited this node before, and the node ID is in one of the\n\t\t\t// currently saved paths, we make the path to this node an additional\n\t\t\t// path even though it doesn't end at the end node. All nodes in paths\n\t\t\t// will get consolidated by our caller so that is not a problem.\n\t\t\tif (this.isInSavedPath(nodeId, paths)) {\n\t\t\t\tpaths.push([...path, endNodeId]);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tvisited.add(nodeId);\n\t\tpath.push(nodeId);\n\n\t\tconst neighbors = this.getNeighborNodeIDs(nodeId, links);\n\n\t\tfor (const neighbor of neighbors) {\n\t\t\tthis.getGraphPathForNode(neighbor, endNodeId, path, visited, paths, links);\n\t\t}\n\n\t\tpath.pop();\n\t}\n\n\t// Returns true if the node ID passed in is in one of the\n\t// paths stored in the paths array.\n\tisInSavedPath(nodeId, paths) {\n\t\tfor (const path of paths) {\n\t\t\tif (path.includes(nodeId)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Returns an array of neighbor nodes for the node identified\n\t// by the ID passed in.\n\tgetNeighborNodeIDs(nodeId, links) {\n\t\tconst neighbors = [];\n\n\t\tlinks.forEach((l) => {\n\t\t\tif (l.srcNodeId === nodeId && l.trgNodeId && l.type !== ASSOCIATION_LINK) {\n\t\t\t\tneighbors.push(l.trgNodeId);\n\t\t\t}\n\t\t});\n\t\treturn neighbors;\n\t}\n\n\t// Return true is nodeIds are contiguous.\n\t// Depth-first search algorithm to determine if selected nodes ids all belong\n\t// in one group. If selected nodes does not belong in the same group, then\n\t// nodeIds are not contiguous.\n\tareSelectedNodesContiguous() {\n\t\tconst nodeIds = this.getSelectedNodesIds();\n\t\tconst connectedNodesIdsGroup = [nodeIds[0]];\n\t\tconst apiPipeline = this.getSelectedPipeline();\n\t\tfor (const nodeId of nodeIds) {\n\t\t\tthis.addConnectedNodeIdToGroup(nodeId, connectedNodesIdsGroup, nodeIds, apiPipeline);\n\t\t}\n\t\treturn connectedNodesIdsGroup.length === nodeIds.length;\n\t}\n\n\tareAllObjectsSelected(includeLinks) {\n\t\treturn this.store.areAllObjectsSelected(includeLinks);\n\t}\n\n\t// Returns true if all the selected objects are links.\n\tareAllSelectedObjectsLinks() {\n\t\treturn this.store.areAllSelectedObjectsLinks();\n\t}\n\n\t// Recursive function to add all connected nodes into the group.\n\taddConnectedNodeIdToGroup(nodeId, connectedNodesIdsGroup, nodeIds, apiPipeline) {\n\t\tif (connectedNodesIdsGroup.includes(nodeId)) {\n\t\t\tconst nodeLinks = apiPipeline.getLinksContainingId(nodeId)\n\t\t\t\t.filter((link) => link.type === NODE_LINK || link.type === ASSOCIATION_LINK);\n\n\t\t\tfor (const link of nodeLinks) {\n\t\t\t\tif (nodeIds.includes(link.trgNodeId) && nodeIds.includes(link.srcNodeId)) {\n\t\t\t\t\tif (!connectedNodesIdsGroup.includes(link.trgNodeId)) {\n\t\t\t\t\t\tconnectedNodesIdsGroup.push(link.trgNodeId);\n\t\t\t\t\t\tthis.addConnectedNodeIdToGroup(link.trgNodeId, connectedNodesIdsGroup, nodeIds, apiPipeline);\n\t\t\t\t\t}\n\t\t\t\t\tif (!connectedNodesIdsGroup.includes(link.srcNodeId)) {\n\t\t\t\t\t\tconnectedNodesIdsGroup.push(link.srcNodeId);\n\t\t\t\t\t\tthis.addConnectedNodeIdToGroup(link.srcNodeId, connectedNodesIdsGroup, nodeIds, apiPipeline);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Creates an empty pipeline. Used for supernodes without sub pipeline defined\n\tcreateEmptyPipeline() {\n\t\tconst primaryPipeline = this.getCanvasInfoPipeline(this.getPrimaryPipelineId());\n\t\tconst subPipelineInfo = {\n\t\t\t\"runtime_ref\": primaryPipeline.runtime_ref,\n\t\t\t\"nodes\": [],\n\t\t\t\"comments\": [],\n\t\t\t\"links\": []\n\t\t};\n\t\treturn this.createCanvasInfoPipeline(subPipelineInfo);\n\t}\n\n\t// Creates a pipeline from the parameters passed in. Used for supernodes without sub-pipeline defined.\n\tcreatePipeline(subflowNodes, subflowComments, subflowLinks) {\n\t\tconst primaryPipeline = this.getCanvasInfoPipeline(this.getPrimaryPipelineId());\n\t\tconst subPipelineInfo = {\n\t\t\t\"runtime_ref\": primaryPipeline.runtime_ref,\n\t\t\t\"nodes\": subflowNodes,\n\t\t\t\"comments\": subflowComments,\n\t\t\t\"links\": subflowLinks\n\t\t};\n\n\t\treturn this.createCanvasInfoPipeline(subPipelineInfo);\n\t}\n\n\texecuteWithSelectionChange(func, arg) {\n\t\tlet previousSelection = {\n\t\t\tnodes: [],\n\t\t\tcomments: [],\n\t\t\tpipelineId: \"\"\n\t\t};\n\n\t\tif (this.selectionChangeHandler) {\n\t\t\tpreviousSelection = {\n\t\t\t\tlinks: this.getSelectedLinks(),\n\t\t\t\tnodes: this.getSelectedNodes(),\n\t\t\t\tcomments: this.getSelectedComments(),\n\t\t\t\tpipelineId: this.getSelectedPipelineId()\n\t\t\t};\n\t\t}\n\n\t\tfunc(arg);\n\n\t\tif (this.selectionChangeHandler) {\n\n\t\t\t// Determine delta in selected nodes, comments and links\n\t\t\tconst selectedLinks = this.getSelectedLinks();\n\t\t\tconst selectedNodes = this.getSelectedNodes();\n\t\t\tconst selectedComments = this.getSelectedComments();\n\t\t\tconst newSelection = {\n\t\t\t\tselection: this.getSelectedObjectIds(),\n\t\t\t\tselectedLinks: selectedLinks,\n\t\t\t\tselectedNodes: selectedNodes,\n\t\t\t\tselectedComments: selectedComments,\n\t\t\t\taddedLinks: differenceWith(selectedLinks, previousSelection.links, (s, p) => s.id === p.id),\n\t\t\t\taddedNodes: differenceWith(selectedNodes, previousSelection.nodes, (s, p) => s.id === p.id),\n\t\t\t\taddedComments: differenceWith(selectedComments, previousSelection.comments, (s, p) => s.id === p.id),\n\t\t\t\tdeselectedLinks: differenceWith(previousSelection.links, selectedLinks, (s, p) => s.id === p.id),\n\t\t\t\tdeselectedNodes: differenceWith(previousSelection.nodes, selectedNodes, (s, p) => s.id === p.id),\n\t\t\t\tdeselectedComments: differenceWith(previousSelection.comments, selectedComments, (s, p) => s.id === p.id),\n\t\t\t\tpreviousPipelineId: previousSelection.pipelineId,\n\t\t\t\tselectedPipelineId: this.getSelectedPipelineId()\n\t\t\t};\n\n\t\t\t// only trigger event if selection has changed\n\t\t\tif (!isEmpty(newSelection.addedLinks) ||\n\t\t\t\t\t!isEmpty(newSelection.addedNodes) ||\n\t\t\t\t\t!isEmpty(newSelection.addedComments) ||\n\t\t\t\t\t!isEmpty(newSelection.deselectedLinks) ||\n\t\t\t\t\t!isEmpty(newSelection.deselectedNodes) ||\n\t\t\t\t\t!isEmpty(newSelection.deselectedComments)) {\n\t\t\t\tthis.selectionChangeHandler(newSelection);\n\t\t\t}\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Utility methods\n\t// ---------------------------------------------------------------------------\n\n\thasErrorMessage(node) {\n\t\tconst messages = this.getNodeMessages(node);\n\t\tif (messages) {\n\t\t\treturn messages.some((msg) => msg.type === ERROR);\n\t\t}\n\t\treturn false;\n\t}\n\n\thasWarningMessage(node) {\n\t\tconst messages = this.getNodeMessages(node);\n\t\tif (messages) {\n\t\t\treturn messages.some((msg) => msg.type === WARNING);\n\t\t}\n\t\treturn false;\n\t}\n\n\tgetNodeMessages(node) {\n\t\treturn node ? node.messages : null;\n\t}\n\n\t// Returns the maximum message type from all notification messages.\n\tgetNotificationMessagesMaxType() {\n\t\tconst notificationMessages = this.getNotificationMessages();\n\t\tconst errorMessages = this.getNotificationMessages(ERROR);\n\t\tconst warningMessages = this.getNotificationMessages(WARNING);\n\t\tconst successMessages = this.getNotificationMessages(SUCCESS);\n\t\tconst infoMessages = this.getNotificationMessages(INFO);\n\n\t\tlet maxMessageType = null;\n\t\tif (notificationMessages.length > 0) {\n\t\t\tif (errorMessages.length > 0) {\n\t\t\t\tmaxMessageType = ERROR;\n\t\t\t} else if (warningMessages.length > 0) {\n\t\t\t\tmaxMessageType = WARNING;\n\t\t\t} else if (successMessages.length > 0) {\n\t\t\t\tmaxMessageType = SUCCESS;\n\t\t\t} else if (infoMessages.length > 0) {\n\t\t\t\tmaxMessageType = INFO;\n\t\t\t}\n\t\t}\n\t\treturn maxMessageType;\n\t}\n\n\tsetZoom(zoom, pipelineId) {\n\t\tconst enableSaveZoom = this.getCanvasConfig().enableSaveZoom;\n\n\t\tif (enableSaveZoom === SAVE_ZOOM_PIPELINE_FLOW) {\n\t\t\tthis.store.dispatch({ type: \"SET_ZOOM\", data: { zoom: zoom, enableSaveZoom }, pipelineId });\n\n\t\t} else if (enableSaveZoom === SAVE_ZOOM_LOCAL_STORAGE) {\n\t\t\tthis.setSavedZoomLocal(zoom, pipelineId);\n\t\t}\n\t\t// This will cause the toolbar to be updated so zoom icons can\n\t\t// be enabled/disabled.\n\t\tthis.refreshToolbar();\n\t}\n\n\t// Returns the saved zoom based on the enableSaveZoom config parameter.\n\tgetSavedZoom(pipelineId) {\n\t\tconst enableSaveZoom = this.getCanvasConfig().enableSaveZoom;\n\t\tif (enableSaveZoom === SAVE_ZOOM_PIPELINE_FLOW) {\n\t\t\treturn this.store.getZoom(pipelineId);\n\n\t\t} else if (enableSaveZoom === SAVE_ZOOM_LOCAL_STORAGE) {\n\t\t\treturn this.getSavedZoomLocal(pipelineId);\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Clears any saved zoom values in Local Storage\n\tclearSavedZoomValues() {\n\t\tLocalStorage.delete(\"canvasSavedZoomValues\");\n\t}\n\n\t// Saves the zoom object passed in for this pipeline in local storage.\n\t// The pipeline is identified by the pipelineFlowId and pipelineId passed in.\n\tsetSavedZoomLocal(zoom, pipelineId) {\n\t\tconst canvasSavedZoomValues = LocalStorage.get(\"canvasSavedZoomValues\");\n\t\tconst savedZooms = canvasSavedZoomValues ? JSON.parse(canvasSavedZoomValues) : {};\n\t\tset(savedZooms, [this.getPipelineFlowId(), pipelineId], zoom);\n\t\tLocalStorage.set(\"canvasSavedZoomValues\", JSON.stringify(savedZooms));\n\t}\n\n\t// Returns the zoom for this pipeline saved in local storage. The pipeline is\n\t// identified by the pipelineFlowId and pipelineId passed in.\n\tgetSavedZoomLocal(pipelineId) {\n\t\tconst canvasSavedZoomValues = LocalStorage.get(\"canvasSavedZoomValues\");\n\t\tif (canvasSavedZoomValues) {\n\t\t\tconst savedZoom = JSON.parse(canvasSavedZoomValues);\n\t\t\treturn get(savedZoom, [this.getPipelineFlowId(), pipelineId]);\n\t\t}\n\t\treturn null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Add decorations in batch\n\t// ---------------------------------------------------------------------------\n\n\tsetNodesMultiDecorations(pipelineNodeDecorations) {\n\t\tthis.store.dispatch({ type: \"SET_NODES_MULTI_DECORATIONS\", data: { pipelineNodeDecorations: pipelineNodeDecorations } });\n\t}\n\n\tsetLinksMultiDecorations(pipelineLinkDecorations) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS_MULTI_DECORATIONS\", data: { pipelineLinkDecorations: pipelineLinkDecorations } });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Styling methods\n\t// ---------------------------------------------------------------------------\n\n\tsetObjectsStyle(pipelineObjIds, newStyle, temporary) {\n\t\tthis.store.dispatch({ type: \"SET_OBJECTS_STYLE\", data: { pipelineObjIds: pipelineObjIds, newStyle: newStyle, temporary: temporary } });\n\t}\n\n\tsetObjectsMultiStyle(pipelineObjStyles, temporary) {\n\t\tthis.store.dispatch({ type: \"SET_OBJECTS_MULTI_STYLE\", data: { pipelineObjStyles: pipelineObjStyles, temporary: temporary } });\n\t}\n\n\tsetLinksStyle(pipelineLinkIds, newStyle, temporary) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS_STYLE\", data: { pipelineObjIds: pipelineLinkIds, newStyle: newStyle, temporary: temporary } });\n\t}\n\n\tsetLinksMultiStyle(pipelineLinkStyles, temporary) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS_MULTI_STYLE\", data: { pipelineObjStyles: pipelineLinkStyles, temporary: temporary } });\n\t}\n\n\tgetObjectStyle(objectId, temporary) {\n\t\tconst obj = this.getObject(objectId);\n\t\tif (temporary) {\n\t\t\treturn (obj && obj.style_temp ? obj.style_temp : null);\n\t\t}\n\t\treturn (obj && obj.style ? obj.style : null);\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Connected objects methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns an object containing nodes and links that are connected based on the\n\t// array of nodeIds passed in (which corresponds to the set of selected\n\t// nodes on the canvas when this method is called through a context menu\n\t// highlight option).\n\t// The nodes and links info returned are in the form of associative arrays\n\t// indexed by pipeline ID.\n\tgetConnectedObjects(pipelineId, nodeIds, operator) {\n\t\tconst connectedNodeIds = {};\n\t\tconst connectedLinkIds = {};\n\n\t\tconnectedNodeIds[pipelineId] = [];\n\t\tconnectedLinkIds[pipelineId] = [];\n\n\t\tnodeIds.forEach((nodeId) => {\n\t\t\t// Automatically include the selected node\n\t\t\tconnectedNodeIds[pipelineId].push(nodeId);\n\n\t\t\tswitch (operator) {\n\t\t\tcase CONNECTED_BRANCH:\n\t\t\t\tthis.getUpstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\tthis.getDownstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\tbreak;\n\t\t\tcase CONNECTED_UPSTREAM: {\n\t\t\t\tthis.getUpstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CONNECTED_DOWNSTREAM:\n\t\t\t\tthis.getDownstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t}\n\n\t\t\t// Finally, if the selected node is a supernode, make sure to include all\n\t\t\t// the nodes and links within it.\n\t\t\tif (this.getAPIPipeline(pipelineId).isSupernode(nodeId)) {\n\t\t\t\tthis.getSupernodeNodeIds(nodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tnodes: connectedNodeIds,\n\t\t\tlinks: connectedLinkIds\n\t\t};\n\t}\n\n\t// If nodeId and pipelineId specify a supernode, this method populates the\n\t// connectedNodeIds and connectedLinkIds arrays with all the nodes and links\n\t// that are in the supernode and any of its descendant supernodes.\n\tgetSupernodeNodeIds(nodeId, pipelineId, connectedNodeIds, connectedLinkIds) {\n\t\tconst node = this.getAPIPipeline(pipelineId).getNode(nodeId);\n\t\tif (node.type === SUPER_NODE) {\n\t\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(node);\n\n\t\t\tconnectedNodeIds[snPipelineId] = connectedNodeIds[snPipelineId] || [];\n\t\t\tconnectedLinkIds[snPipelineId] = connectedLinkIds[snPipelineId] || [];\n\n\t\t\tconst nodeIds = this.getAPIPipeline(snPipelineId).getNodeIds();\n\t\t\tconst linkIds = this.getAPIPipeline(snPipelineId).getLinkIds();\n\n\t\t\tconnectedNodeIds[snPipelineId] = union(connectedNodeIds[snPipelineId], nodeIds);\n\t\t\tconnectedLinkIds[snPipelineId] = union(connectedLinkIds[snPipelineId], linkIds);\n\n\t\t\tnodeIds.forEach((nId) => {\n\t\t\t\tthis.getSupernodeNodeIds(nId, snPipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t});\n\t\t}\n\t}\n\n\tgetUpstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds) {\n\t\tconnectedNodeIds[pipelineId] = connectedNodeIds[pipelineId] || [];\n\t\tconnectedLinkIds[pipelineId] = connectedLinkIds[pipelineId] || [];\n\n\t\tconst currentPipeline = this.getAPIPipeline(pipelineId);\n\t\tconst node = currentPipeline.getNode(nodeId);\n\t\tconst nodeLinks = currentPipeline\n\t\t\t.getAttachedLinksContainingTargetId(nodeId)\n\t\t\t.filter((l) => l.type === NODE_LINK);\n\n\t\tif (nodeLinks.length > 0) {\n\t\t\tnodeLinks.forEach((link) => {\n\t\t\t\t// Prevent endless looping with circular graphs by detecting if we\n\t\t\t\t// have encountered this link before.\n\t\t\t\tif (!connectedLinkIds[pipelineId].includes(link.id)) {\n\t\t\t\t\tconst srcNode = currentPipeline.getNode(link.srcNodeId);\n\n\t\t\t\t\tconnectedLinkIds[pipelineId] = union(connectedLinkIds[pipelineId], [link.id]);\n\t\t\t\t\tconnectedNodeIds[pipelineId] = union(connectedNodeIds[pipelineId], [link.srcNodeId]);\n\n\t\t\t\t\tconst srcNodeOutputPort = this.getSupernodeOutputPortForLink(srcNode, link);\n\t\t\t\t\tif (srcNodeOutputPort) {\n\t\t\t\t\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(srcNode);\n\t\t\t\t\t\tconst bindingNode = this.getAPIPipeline(snPipelineId).getNode(srcNodeOutputPort.subflow_node_ref);\n\n\t\t\t\t\t\tif (bindingNode) {\n\t\t\t\t\t\t\tconnectedLinkIds[snPipelineId] = connectedLinkIds[snPipelineId] || [];\n\t\t\t\t\t\t\tconnectedNodeIds[snPipelineId] = connectedNodeIds[snPipelineId] || [];\n\t\t\t\t\t\t\tconnectedNodeIds[snPipelineId] = union(connectedNodeIds[snPipelineId], [bindingNode.id]);\n\n\t\t\t\t\t\t\tthis.getUpstreamObjIdsFrom(bindingNode.id, snPipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.getUpstreamObjIdsFrom(link.srcNodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (currentPipeline.isEntryBindingNode(node) &&\n\t\t\t\t\t\t\t\tCanvasUtils.isSuperBindingNode(node)) {\n\t\t\tconst supernodeObj = this.getSupernodeObjReferencing(pipelineId);\n\t\t\tconst parentPipelineId = supernodeObj.parentPipelineId;\n\t\t\tconst parentPipeline = this.getAPIPipeline(parentPipelineId);\n\t\t\tconst supernode = parentPipeline.getNode(supernodeObj.supernodeId);\n\n\t\t\tsupernode.inputs.forEach((inputPort) => {\n\t\t\t\tif (inputPort.subflow_node_ref === nodeId) {\n\t\t\t\t\tconst supernodeLinks = parentPipeline.getAttachedLinksContainingTargetId(supernode.id);\n\t\t\t\t\tsupernodeLinks.forEach((supernodeLink) => {\n\t\t\t\t\t\tif (supernodeLink.trgNodePortId === inputPort.id) {\n\t\t\t\t\t\t\tconnectedNodeIds[parentPipelineId] = connectedNodeIds[parentPipelineId] || [];\n\t\t\t\t\t\t\tconnectedLinkIds[parentPipelineId] = connectedLinkIds[parentPipelineId] || [];\n\n\t\t\t\t\t\t\tconnectedNodeIds[parentPipelineId] = union(connectedNodeIds[parentPipelineId], [supernodeLink.srcNodeId]);\n\t\t\t\t\t\t\tconnectedLinkIds[parentPipelineId] = union(connectedLinkIds[parentPipelineId], [supernodeLink.id]);\n\n\t\t\t\t\t\t\t// If srcNodeId is supernode, need to find the corresponding exit binding node.\n\t\t\t\t\t\t\tif (parentPipeline.isSupernode(supernodeLink.srcNodeId)) {\n\t\t\t\t\t\t\t\tconst upstreamSupernode = parentPipeline.getNode(supernodeLink.srcNodeId);\n\t\t\t\t\t\t\t\tconst upstreamSupernodeOutputPort = this.getSupernodeOutputPortForLink(upstreamSupernode, supernodeLink);\n\t\t\t\t\t\t\t\tif (upstreamSupernodeOutputPort) {\n\t\t\t\t\t\t\t\t\tconst bindingNodeId = upstreamSupernodeOutputPort.subflow_node_ref;\n\t\t\t\t\t\t\t\t\tthis.getUpstreamObjIdsFrom(bindingNodeId, CanvasUtils.getSupernodePipelineId(upstreamSupernode), connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.getUpstreamObjIdsFrom(supernodeLink.srcNodeId, parentPipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tgetDownstreamObjIdsFrom(nodeId, pipelineId, connectedNodeIds, connectedLinkIds) {\n\t\tconnectedNodeIds[pipelineId] = connectedNodeIds[pipelineId] || [];\n\t\tconnectedLinkIds[pipelineId] = connectedLinkIds[pipelineId] || [];\n\n\t\tconst currentPipeline = this.getAPIPipeline(pipelineId);\n\t\tconst node = currentPipeline.getNode(nodeId);\n\t\tconst nodeLinks = currentPipeline\n\t\t\t.getAttachedLinksContainingSourceId(nodeId)\n\t\t\t.filter((l) => l.type === NODE_LINK);\n\n\t\tif (nodeLinks.length > 0) {\n\t\t\tnodeLinks.forEach((link) => {\n\t\t\t\t// Prevent endless looping with circular graphs by detecting if we\n\t\t\t\t// have encountered this link before.\n\t\t\t\tif (!connectedLinkIds[pipelineId].includes(link.id)) {\n\t\t\t\t\tconst trgNode = currentPipeline.getNode(link.trgNodeId);\n\n\t\t\t\t\tconnectedLinkIds[pipelineId] = union(connectedLinkIds[pipelineId], [link.id]);\n\t\t\t\t\tconnectedNodeIds[pipelineId] = union(connectedNodeIds[pipelineId], [link.trgNodeId]);\n\n\t\t\t\t\tconst trgNodeInputPort = this.getSupernodeInputPortForLink(trgNode, link);\n\t\t\t\t\tif (trgNodeInputPort) {\n\t\t\t\t\t\tconst snPipelineId = CanvasUtils.getSupernodePipelineId(trgNode);\n\t\t\t\t\t\tconst bindingNode = this.getAPIPipeline(snPipelineId).getNode(trgNodeInputPort.subflow_node_ref);\n\n\t\t\t\t\t\tif (bindingNode) {\n\t\t\t\t\t\t\tconnectedLinkIds[snPipelineId] = connectedLinkIds[snPipelineId] || [];\n\t\t\t\t\t\t\tconnectedNodeIds[snPipelineId] = connectedNodeIds[snPipelineId] || [];\n\t\t\t\t\t\t\tconnectedNodeIds[snPipelineId] = union(connectedNodeIds[snPipelineId], [bindingNode.id]);\n\n\t\t\t\t\t\t\tthis.getDownstreamObjIdsFrom(bindingNode.id, snPipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.getDownstreamObjIdsFrom(link.trgNodeId, pipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (currentPipeline.isExitBindingNode(node)) {\n\t\t\tif (CanvasUtils.isSuperBindingNode(node)) {\n\t\t\t\tconst supernodeObj = this.getSupernodeObjReferencing(pipelineId);\n\t\t\t\tconst parentPipelineId = supernodeObj.parentPipelineId;\n\t\t\t\tconst parentPipeline = this.getAPIPipeline(parentPipelineId);\n\t\t\t\tconst supernode = parentPipeline.getNode(supernodeObj.supernodeId);\n\n\t\t\t\tsupernode.outputs.forEach((outputPort) => {\n\t\t\t\t\tif (outputPort.subflow_node_ref === nodeId) {\n\t\t\t\t\t\tconst supernodeLinks = parentPipeline.getAttachedLinksContainingSourceId(supernode.id);\n\t\t\t\t\t\tsupernodeLinks.forEach((supernodeLink) => {\n\t\t\t\t\t\t\tif (supernodeLink.srcNodePortId === outputPort.id) {\n\t\t\t\t\t\t\t\tconnectedNodeIds[parentPipelineId] = connectedNodeIds[parentPipelineId] || [];\n\t\t\t\t\t\t\t\tconnectedLinkIds[parentPipelineId] = connectedLinkIds[parentPipelineId] || [];\n\n\t\t\t\t\t\t\t\tconnectedNodeIds[parentPipelineId] = union(connectedNodeIds[parentPipelineId], [supernodeLink.trgNodeId]);\n\t\t\t\t\t\t\t\tconnectedLinkIds[parentPipelineId] = union(connectedLinkIds[parentPipelineId], [supernodeLink.id]);\n\n\t\t\t\t\t\t\t\t// If trgNodeId is supernode, need to find the corresponding entry binding node.\n\t\t\t\t\t\t\t\tif (parentPipeline.isSupernode(supernodeLink.trgNodeId)) {\n\t\t\t\t\t\t\t\t\tconst downstreamSupernode = parentPipeline.getNode(supernodeLink.trgNodeId);\n\t\t\t\t\t\t\t\t\tconst downstreamSupernodeInputPort = this.getSupernodeInputPortForLink(downstreamSupernode, supernodeLink);\n\t\t\t\t\t\t\t\t\tif (downstreamSupernodeInputPort) {\n\t\t\t\t\t\t\t\t\t\tconst bindingNodeId = downstreamSupernodeInputPort.subflow_node_ref;\n\t\t\t\t\t\t\t\t\t\tthis.getDownstreamObjIdsFrom(bindingNodeId, CanvasUtils.getSupernodePipelineId(downstreamSupernode), connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.getDownstreamObjIdsFrom(supernodeLink.trgNodeId, parentPipelineId, connectedNodeIds, connectedLinkIds);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t// Returns an input port from the node passed in (provided it is a supernode) which is\n\t// referenced by the link passed in. Returns null if the node is not a supernode or the link\n\t// does not have a reference to one of the node's input ports.\n\tgetSupernodeInputPortForLink(trgNode, link) {\n\t\tlet port = null;\n\t\tif (CanvasUtils.getSupernodePipelineId(trgNode) && link.trgNodePortId) {\n\t\t\ttrgNode.inputs.forEach((inputPort) => {\n\t\t\t\tif (inputPort.id === link.trgNodePortId) {\n\t\t\t\t\tport = inputPort;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn port;\n\t}\n\n\t// Returns an output port from the node passed in (provided it is a supernode) which is\n\t// referenced by the link passed in. Returns null if the node is not a supernode or the link\n\t// does not have a reference to one of the node's output ports.\n\tgetSupernodeOutputPortForLink(srcNode, link) {\n\t\tlet port = null;\n\t\tif (CanvasUtils.getSupernodePipelineId(srcNode) && link.srcNodePortId) {\n\t\t\tsrcNode.outputs.forEach((outputPort) => {\n\t\t\t\tif (outputPort.id === link.srcNodePortId) {\n\t\t\t\t\tport = outputPort;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn port;\n\t}\n\n\tsetObjectsBranchHighlight(pipelineObjIds) {\n\t\tthis.store.dispatch({ type: \"SET_OBJECTS_BRANCH_HIGHLIGHT\", data: { pipelineObjIds: pipelineObjIds } });\n\t}\n\n\tsetLinksBranchHighlight(pipelineLinkIds) {\n\t\tthis.store.dispatch({ type: \"SET_LINKS_BRANCH_HIGHLIGHT\", data: { pipelineObjIds: pipelineLinkIds } });\n\t}\n\n\tunsetAllBranchHighlight() {\n\t\tthis.store.dispatch({ type: \"UNSET_OBJECTS_BRANCH_HIGHLIGHT\" });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Clipboard methods\n\t// ---------------------------------------------------------------------------\n\n\t// Copies the currently selected objects to the internal clipboard and\n\t// returns true if successful. Returns false if there is nothing to copy to\n\t// the clipboard.\n\tcopyToClipboard(areDetachableLinksInUse) {\n\t\tvar copyData = {};\n\n\t\tconst apiPipeline = this.getSelectionAPIPipeline();\n\t\tif (!apiPipeline) {\n\t\t\treturn false;\n\t\t}\n\t\tconst nodes = this.getSelectedNodes();\n\t\tconst comments = this.getSelectedComments();\n\t\tlet links = apiPipeline.getLinksBetween(nodes, comments);\n\n\t\t// If detachable links are in use, we need to also add any links that\n\t\t// emanate from the selected nodes AND any links that are currently\n\t\t// selected, making sure we don't have any duplicates in the final\n\t\t// links array.\n\t\tif (areDetachableLinksInUse) {\n\t\t\tconst emanatingLinks = apiPipeline.getNodeDataLinksContainingIds(nodes.map((n) => n.id));\n\t\t\tlinks = CanvasUtils.concatUniqueBasedOnId(emanatingLinks, links);\n\t\t\tlinks = CanvasUtils.concatUniqueBasedOnId(this.getSelectedLinks(), links);\n\t\t}\n\n\t\tif (nodes.length === 0 && comments.length === 0 && links.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (nodes && nodes.length > 0) {\n\t\t\tcopyData.nodes = nodes;\n\t\t\tlet pipelines = [];\n\t\t\tconst supernodes = CanvasUtils.filterSupernodes(nodes);\n\t\t\tsupernodes.forEach((supernode) => {\n\t\t\t\tpipelines = pipelines.concat(this.getSchemaPipelinesForSupernode(supernode));\n\t\t\t\tsupernode.sub_pipelines = pipelines;\n\t\t\t});\n\t\t}\n\n\t\tif (comments && comments.length > 0) {\n\t\t\tcopyData.comments = comments;\n\t\t}\n\n\t\tif (links && links.length > 0) {\n\t\t\tcopyData.links = links.map((link) => {\n\t\t\t\t// To handle attached or semi-detached links (where the attached node\n\t\t\t\t// is not one of the nodes to be copied to the clipboard) we will need\n\t\t\t\t// to alter the source and/or target info so make a copy of the link\n\t\t\t\t// first.\n\t\t\t\tconst newLink = Object.assign({}, link);\n\t\t\t\t// If the link is a node-node data link and it is attached to a source\n\t\t\t\t// node and that node is not to be put on the clipboard, set the srcPos\n\t\t\t\t// coordinates and remove the source node info.\n\t\t\t\tif (link.type === NODE_LINK &&\n\t\t\t\t\t\tlink.srcNodeId &&\n\t\t\t\t\t\tnodes.findIndex((n) => n.id === link.srcNodeId) === -1) {\n\t\t\t\t\tdelete newLink.srcNodeId;\n\t\t\t\t\tdelete newLink.srcNodePortId;\n\t\t\t\t\tnewLink.srcPos = CanvasUtils.getSrcPos(link, apiPipeline);\n\t\t\t\t}\n\t\t\t\t// If the link is a node-node data link and it is attached to a target\n\t\t\t\t// node and that node is not to be put on the clipboard, set the trgPos\n\t\t\t\t// coordinates and remove the target node info.\n\t\t\t\tif (link.type === NODE_LINK &&\n\t\t\t\t\t\tlink.trgNodeId &&\n\t\t\t\t\t\tnodes.findIndex((n) => n.id === link.trgNodeId) === -1) {\n\t\t\t\t\tdelete newLink.trgNodeId;\n\t\t\t\t\tdelete newLink.trgNodePortId;\n\t\t\t\t\tnewLink.trgPos = CanvasUtils.getTrgPos(link, apiPipeline);\n\t\t\t\t}\n\t\t\t\treturn newLink;\n\t\t\t});\n\t\t}\n\n\t\tvar clipboardData = JSON.stringify(copyData);\n\t\tLocalStorage.set(\"canvasClipboard\", clipboardData);\n\n\t\treturn true;\n\t}\n\n\tisClipboardEmpty() {\n\t\tconst value = LocalStorage.get(\"canvasClipboard\");\n\t\tif (value && value !== \"\") {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Returns an object containing arrays of canvas objects (node, comments and\n\t// links) that are currently on the clipboard.\n\tgetObjectsToPaste() {\n\t\tconst textToPaste = LocalStorage.get(\"canvasClipboard\");\n\n\t\tif (!textToPaste) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst objects = JSON.parse(textToPaste);\n\n\t\t// If there are no nodes and no comments there's nothing to paste so just\n\t\t// return null.\n\t\tif (!objects.nodes && !objects.comments && !objects.links) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn objects;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Tooltip methods\n\t// ---------------------------------------------------------------------------\n\tsetTooltipDef(tipDef) {\n\t\tthis.store.dispatch({ type: \"SET_TOOLTIP_DEF\", data: { tooltipDef: tipDef } });\n\t}\n\n\tgetTooltip() {\n\t\treturn this.store.getTooltip();\n\t}\n\n\tisTooltipOpen() {\n\t\treturn this.store.isTooltipOpen();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Text Toolbar methods\n\t// ---------------------------------------------------------------------------\n\tsetTextToolbarDef(textToolbarDef) {\n\t\tthis.store.dispatch({ type: \"SET_TEXT_TOOLBAR_DEF\", data: { textToolbarDef: textToolbarDef } });\n\t}\n\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class SizeAndPositionObjectsAction extends Action {\n\tconstructor(data, canvasController) {\n\t\tsuper(data);\n\t\tthis.data = data;\n\t\tthis.labelUtil = canvasController.labelUtil;\n\t\tthis.objectModel = canvasController.objectModel;\n\t\tthis.apiPipeline = this.objectModel.getAPIPipeline(data.pipelineId);\n\t\tthis.previousObjectsInfo = this.getPreviousObjectsInfo(data);\n\t\tthis.previousDetLinksInfo = this.getPreviousDetachedLinksInfo(data);\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tthis.apiPipeline.sizeAndPositionObjects(this.data.objectsInfo, this.data.linksInfo);\n\t}\n\n\tundo() {\n\t\tthis.apiPipeline.sizeAndPositionObjects(this.previousObjectsInfo, this.previousDetLinksInfo);\n\t}\n\n\tredo() {\n\t\tthis.do();\n\t}\n\n\tgetLabel() {\n\t\tconst com = this.apiPipeline.getComment(this.data.selectedObjectIds[0]);\n\t\tif (com) {\n\t\t\treturn this.labelUtil.getActionLabel(this, \"action.sizeComment\");\n\t\t}\n\t\treturn this.labelUtil.getActionLabel(this, \"action.sizeAndPositionObjects\");\n\t}\n\n\tgetPreviousObjectsInfo(data) {\n\t\tconst previousObjectsInfo = [];\n\t\tObject.keys(data.objectsInfo).forEach((objId) => {\n\t\t\tconst obj = this.apiPipeline.getObject(objId);\n\t\t\tif (obj) {\n\t\t\t\tpreviousObjectsInfo[objId] = {\n\t\t\t\t\tid: obj.id,\n\t\t\t\t\tx_pos: obj.x_pos,\n\t\t\t\t\ty_pos: obj.y_pos,\n\t\t\t\t\twidth: obj.width,\n\t\t\t\t\theight: obj.height\n\t\t\t\t};\n\t\t\t\tif (obj.isResized) {\n\t\t\t\t\tpreviousObjectsInfo[objId].isResized = obj.isResized;\n\t\t\t\t\tpreviousObjectsInfo[objId].resizeWidth = obj.resizeWidth;\n\t\t\t\t\tpreviousObjectsInfo[objId].resizeHeight = obj.resizeHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn previousObjectsInfo;\n\t}\n\n\tgetPreviousDetachedLinksInfo(data) {\n\t\tconst previousLinksInfo = [];\n\t\tObject.keys(data.detachedLinksInfo).forEach((linkId) => {\n\t\t\tconst obj = this.apiPipeline.getLink(linkId);\n\t\t\tif (obj) {\n\t\t\t\tif (obj.srcPos || obj.trgPos) {\n\t\t\t\t\tpreviousLinksInfo[linkId] = {};\n\t\t\t\t\tif (obj.srcPos) {\n\t\t\t\t\t\tpreviousLinksInfo[linkId].srcPos = {\n\t\t\t\t\t\t\tx_pos: obj.srcPos.x_pos,\n\t\t\t\t\t\t\ty_pos: obj.srcPos.y_pos\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tif (obj.trgPos) {\n\t\t\t\t\t\tpreviousLinksInfo[linkId].trgPos = {\n\t\t\t\t\t\t\tx_pos: obj.trgPos.x_pos,\n\t\t\t\t\t\t\ty_pos: obj.trgPos.y_pos\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn previousLinksInfo;\n\t}\n\n}\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { get } from \"lodash\";\nimport { LINK_SELECTION_NONE, SUPER_NODE, WYSIWYG } from \"./constants/canvas-constants\";\nimport CanvasUtils from \"./common-canvas-utils\";\n\n// Global temporary variable to handle the canvas controller.\nlet cc = null;\n\n// Returns a context menu definition for the source object passed in which\n// is either the default menu or a customized one provided by the host app.\nexport default function getContextMenuDefinition(source, canvasController) {\n\tcc = canvasController;\n\n\tconst defMenu = createDefaultContextMenu(source, cc);\n\tlet menuDefinition;\n\n\tif (typeof cc.handlers.contextMenuHandler === \"function\") {\n\t\tconst menuCustom = cc.handlers.contextMenuHandler(source, defMenu);\n\t\tif (menuCustom && menuCustom.length > 0) {\n\t\t\tmenuDefinition = menuCustom;\n\t\t}\n\t} else {\n\t\tmenuDefinition = defMenu;\n\t}\n\n\t// If we are NOT allowing editing actions (perhaps because we are showing a\n\t// read-only canvas), remove any actions from the context menu that might\n\t// alter the canvas objects.\n\tif (menuDefinition && menuDefinition.length > 0 &&\n\t\t\tcc.getCanvasConfig().enableEditingActions === false) {\n\t\tmenuDefinition = filterOutEditingActions(menuDefinition);\n\t}\n\n\t// We need to remove any unwanted dividers. These might be dividers at\n\t// the top of the array that are there after editing actions have been\n\t// removed or doubled-up dividers in the menu which might be there after\n\t// removing editing actions or in the menu def returned by the host app.\n\tif (menuDefinition && menuDefinition.length > 0) {\n\t\tmenuDefinition = filterOutUnwantedDividers(menuDefinition);\n\t}\n\n\treturn menuDefinition;\n}\n\n// Returns a new menu based, on the menu passed in, where all actions that\n// might alter the canvas have been removed.\nconst filterOutEditingActions = (menuDefinition) => {\n\tconst newMenuDefinition = [];\n\tmenuDefinition.forEach((menuEntry) => {\n\t\tif (menuEntry.submenu) {\n\t\t\tconst newSubMenu = filterOutEditingActions(menuEntry.menu);\n\t\t\tif (newSubMenu && newSubMenu.length > 0) {\n\t\t\t\tmenuEntry.menu = newSubMenu;\n\t\t\t\tnewMenuDefinition.push(menuEntry);\n\t\t\t}\n\n\t\t} else if (!isEditingAction(menuEntry.action)) {\n\t\t\tnewMenuDefinition.push(menuEntry);\n\t\t}\n\t});\n\treturn newMenuDefinition;\n};\n\n// Remove any doubled-up or leading dividers in the array.\nconst filterOutUnwantedDividers = (menuDef) => {\n\tconst newMenuDef = [];\n\tlet previousDivider = true;\n\tmenuDef.forEach((item) => {\n\t\tif (item.divider) {\n\t\t\tif (!previousDivider) {\n\t\t\t\tnewMenuDef.push(item);\n\t\t\t\tpreviousDivider = true;\n\t\t\t}\n\t\t} else {\n\t\t\tnewMenuDef.push(item);\n\t\t\tpreviousDivider = false;\n\t\t}\n\t});\n\treturn newMenuDef;\n};\n\n// Returns true if the action string passed in is one of the actions\n// that would alter the canvas objects. This is useful for filtering\n// out editing actions that should be unavailable with a read-only canvas.\nconst isEditingAction = (action) =>\n\taction === \"createComment\" ||\n\taction === \"createWYSIWYGComment\" ||\n\taction === \"colorBackground\" ||\n\taction === \"disconnectNode\" ||\n\taction === \"setCommentEditingMode\" ||\n\taction === \"setNodeLabelEditingMode\" ||\n\taction === \"setNodeDecorationLabelEditingMode\" ||\n\taction === \"setLinkDecorationLabelEditingMode\" ||\n\taction === \"cut\" ||\n\taction === \"copy\" ||\n\taction === \"paste\" ||\n\taction === \"undo\" ||\n\taction === \"redo\" ||\n\taction === \"deleteSelectedObjects\" ||\n\taction === \"createSuperNode\" ||\n\taction === \"createSuperNodeExternal\" ||\n\taction === \"deconstructSuperNode\" ||\n\taction === \"collapseSuperNodeInPlace\" ||\n\taction === \"expandSuperNodeInPlace\" ||\n\taction === \"convertSuperNodeExternalToLocal\" ||\n\taction === \"convertSuperNodeLocalToExternal\" ||\n\taction === \"deleteLink\" ||\n\taction === \"saveToPalette\" ||\n\taction === \"connectFromPort\" ||\n\taction === \"connectToPort\"\n;\n\n// Returns a default context menu definition for the source object and canvas\n// controller passed in.\nconst createDefaultContextMenu = (source) => {\n\tlet menuDefinition = [];\n\tconst menuForNonSelectedObj = cc.isContextToolbarForNonSelectedObj(source);\n\n\t// Select all & add comment: canvas only\n\tif (source.type === \"canvas\") {\n\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\tcreateCommentMenu(),\n\t\t\tcreateSelectAllMenu()\n\t\t);\n\t}\n\t// Rename node\n\tif (source.type === \"node\" && get(source, \"targetObject.layout.labelEditable\", false)) {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"setNodeLabelEditingMode\", label: getLabel(\"node.renameNode\"), toolbarItem: true }\n\t\t);\n\t}\n\t// Edit comment\n\tif (source.type === \"comment\") {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"setCommentEditingMode\", label: getLabel(\"comment.editComment\"), toolbarItem: true }\n\t\t);\n\t}\n\t// Color objects\n\tif (source.type === \"comment\" &&\n\t\t\tsource.targetObject?.contentType !== WYSIWYG &&\n\t\t\tget(cc, \"contextMenuConfig.defaultMenuEntries.colorBackground\", true)) {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"colorBackground\", label: getLabel(\"comment.colorBackground\") },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\t// Disconnect node\n\tif (source.type === \"node\" || source.type === \"comment\") {\n\t\tconst objectAry = menuForNonSelectedObj ? [source.targetObject.id] : source.selectedObjectIds;\n\t\tconst linksFound = cc.objectModel.getAPIPipeline(source.pipelineId).getLinksContainingIds(objectAry);\n\t\tif (linksFound.length > 0) {\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ action: \"disconnectNode\", label: getLabel(\"node.disconnectNode\") },\n\t\t\t\t{ divider: true }\n\t\t\t);\n\t\t}\n\t}\n\t// Edit submenu (cut, copy, paste)\n\tif (source.type === \"node\" ||\n\t\t\tsource.type === \"comment\" ||\n\t\t\t(source.type === \"link\" && cc.areDetachableLinksInUse()) ||\n\t\t\tsource.type === \"canvas\") {\n\t\tconst editSubMenu = createEditMenu(source, source.type === \"canvas\");\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"clipboard\", submenu: true, menu: editSubMenu, label: getLabel(\"node.editMenu\") },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\t// Undo and redo\n\tif (source.type === \"canvas\") {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"undo\", label: getLabel(\"canvas.undo\"), enable: cc.canUndo() },\n\t\t\t{ action: \"redo\", label: getLabel(\"canvas.redo\"), enable: cc.canRedo() },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\t// Delete objects\n\tif (source.type === \"node\" || source.type === \"comment\" ||\n\t\t\t(cc.getCanvasConfig().enableLinkSelection !== LINK_SELECTION_NONE && source.type === \"link\")) {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"deleteSelectedObjects\", label: getLabel(\"canvas.deleteObject\"), toolbarItem: true },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\t// Create supernode\n\tif (source.type === \"node\" || source.type === \"comment\") {\n\t\tif (get(cc, \"contextMenuConfig.defaultMenuEntries.createSupernode\", false) &&\n\t\t\t\t(cc.areSelectedNodesContiguous() ||\n\t\t\t\t\tget(cc, \"contextMenuConfig.enableCreateSupernodeNonContiguous\", false) ||\n\t\t\t\t\t(menuForNonSelectedObj && source.type === \"node\"))) {\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ action: \"createSuperNode\", label: getLabel(\"node.createSupernode\") }\n\t\t\t);\n\t\t\tif (cc.getCanvasConfig().enableExternalPipelineFlows) {\n\t\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t\t{ action: \"createSuperNodeExternal\", label: getLabel(\"node.createSupernodeExternal\") }\n\t\t\t\t);\n\t\t\t}\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ divider: true }\n\t\t\t);\n\t\t}\n\t}\n\t// Supernode options - only applicable with a single supernode selected\n\t// which is opened by the \"canvas\" (default) editor.\n\tif (source.type === \"node\" &&\n\t\t\tsource.targetObject.type === SUPER_NODE &&\n\t\t\t(source.selectedObjectIds.length === 1 || menuForNonSelectedObj) &&\n\t\t\t\t(source.targetObject.open_with_tool === \"canvas\" || typeof source.targetObject.open_with_tool === \"undefined\")) {\n\t\t// Deconstruct supernode\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"deconstructSuperNode\", label: getLabel(\"node.deconstructSupernode\") },\n\t\t\t{ divider: true }\n\t\t);\n\n\t\t// Collapse supernode\n\t\tif (cc.isSuperNodeExpandedInPlace(source.targetObject.id, source.pipelineId)) {\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ action: \"collapseSuperNodeInPlace\", label: getLabel(\"node.collapseSupernodeInPlace\") }\n\t\t\t);\n\t\t// Expand supernode\n\t\t} else {\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ action: \"expandSuperNodeInPlace\", label: getLabel(\"node.expandSupernode\") }\n\t\t\t);\n\t\t}\n\n\t\t// Expand supernode to full page display\n\t\tif (get(cc, \"contextMenuConfig.defaultMenuEntries.displaySupernodeFullPage\")) {\n\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t{ action: \"displaySubPipeline\", label: getLabel(\"node.displaySupernodeFullPage\"), toolbarItem: true }\n\t\t\t);\n\t\t}\n\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ divider: true }\n\t\t);\n\n\t\t// Convert supernode\n\t\tif (cc.getCanvasConfig().enableExternalPipelineFlows) {\n\t\t\t// Convert External to Local\n\t\t\tif (source.targetObject.subflow_ref.url) {\n\t\t\t\t// Supernodes inside an external sub-flow cannot be made local.\n\t\t\t\tif (!cc.isPipelineExternal(source.pipelineId)) {\n\t\t\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t\t\t{ action: \"convertSuperNodeExternalToLocal\", label: getLabel(\"node.convertSupernodeExternalToLocal\") },\n\t\t\t\t\t\t{ divider: true }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t// Convert Local to External\n\t\t\t} else {\n\t\t\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t\t\t{ action: \"convertSuperNodeLocalToExternal\", label: getLabel(\"node.convertSupernodeLocalToExternal\") },\n\t\t\t\t\t{ divider: true }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t// Delete link\n\tif (source.type === \"link\" &&\n\t\t\tcc.getCanvasConfig().enableLinkSelection === LINK_SELECTION_NONE) {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"deleteLink\", label: getLabel(\"canvas.deleteObject\"), toolbarItem: true }\n\t\t);\n\t}\n\t// Highlight submenu (Highlight Branch | Upstream | Downstream, Unhighlight)\n\tif (source.type === \"node\") {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"highlight\", submenu: true, menu: createHighlightSubMenu(source), label: getLabel(\"menu.highlight\") }\n\t\t);\n\t}\n\tif (source.type === \"canvas\") {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"unhighlight\", label: getLabel(\"menu.unhighlight\"), enable: cc.isBranchHighlighted() }\n\t\t);\n\t}\n\tif (source.type === \"node\" &&\n\t\t\tget(cc, \"contextMenuConfig.defaultMenuEntries.saveToPalette\", false)) {\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ divider: true },\n\t\t\t{ action: \"saveToPalette\", label: getLabel(\"node.saveToPalette\") }\n\t\t);\n\t}\n\t// Mark output port for creating links\n\tif (source.type === \"output_port\") {\n\t\t// Check if the port can accept more connections based on cardinality\n\t\tconst node = cc.getNode(source.id, source.pipelineId);\n\t\tconst links = cc.getLinks(source.pipelineId);\n\t\tconst isCardinalityAtMax = CanvasUtils.isSrcCardinalityAtMax(source.port.id, node, links);\n\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"connectFromPort\", label: getLabel(\"port.markForOutput\"), enable: !isCardinalityAtMax, toolbarItem: true }\n\t\t);\n\t}\n\t// Connect to input port from marked output port\n\tif (source.type === \"input_port\") {\n\t\tconst connectFromInfo = cc.getConnectFromInfo(source.pipelineId);\n\t\tconst hasMarkedPort = connectFromInfo !== null;\n\n\t\t// Check if the input port can accept more connections based on cardinality\n\t\tconst node = cc.getNode(source.id, source.pipelineId);\n\t\tconst links = cc.getLinks(source.pipelineId);\n\t\tconst isCardinalityAtMax = CanvasUtils.isTrgCardinalityAtMax(source.port.id, node, links);\n\n\t\t// Enable only if there's a marked port AND this port can accept more connections\n\t\tconst isEnabled = hasMarkedPort && !isCardinalityAtMax;\n\n\t\tmenuDefinition = menuDefinition.concat(\n\t\t\t{ action: \"connectToPort\", label: getLabel(\"port.connectTo\"), enable: isEnabled, toolbarItem: true }\n\t\t);\n\t}\n\n\treturn menuDefinition;\n};\n\nconst createCommentMenu = () => {\n\tif (cc.getCanvasConfig().enableWYSIWYGComments) {\n\t\treturn [\n\t\t\t{ action: \"createComment\", label: getLabel(\"canvas.addComment\"), toolbarItem: true },\n\t\t\t{ action: \"createWYSIWYGComment\", label: getLabel(\"canvas.addWysiwygComment\"), toolbarItem: true }\n\t\t];\n\t}\n\treturn { action: \"createComment\", label: getLabel(\"canvas.addComment\"), toolbarItem: true };\n};\n\nconst createSelectAllMenu = () => {\n\tconst menu = [];\n\tif (!cc.isPrimaryPipelineEmpty() && !cc.areAllObjectsSelected()) {\n\t\tmenu.push(\n\t\t\t{ action: \"selectAll\", label: getLabel(\"canvas.selectAll\") },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\tif (cc.getSelectedObjectIds().length > 0) {\n\t\tmenu.push(\n\t\t\t{ action: \"deselectAll\", label: getLabel(\"canvas.deselectAll\") },\n\t\t\t{ divider: true }\n\t\t);\n\t}\n\treturn menu;\n};\n\nconst createEditMenu = (source, includePaste) => {\n\tconst editSubMenu = [\n\t\t{ action: \"cut\", label: getLabel(\"edit.cutSelection\"), enable: source.type === \"canvas\" ? source.selectedObjectIds.length > 0 : true },\n\t\t{ action: \"copy\", label: getLabel(\"edit.copySelection\"), enable: source.type === \"canvas\" ? source.selectedObjectIds.length > 0 : true }\n\t];\n\tif (includePaste) {\n\t\teditSubMenu.push({ action: \"paste\", label: getLabel(\"edit.pasteSelection\"), enable: !cc.isClipboardEmpty() });\n\t}\n\treturn editSubMenu;\n};\n\nconst createHighlightSubMenu = (source) => {\n\tlet highlightSubMenuDef = [\n\t\t{ action: \"highlightBranch\", label: getLabel(\"menu.highlightBranch\") },\n\t\t{ action: \"highlightUpstream\", label: getLabel(\"menu.highlightUpstream\") },\n\t\t{ action: \"highlightDownstream\", label: getLabel(\"menu.highlightDownstream\") }\n\t];\n\thighlightSubMenuDef.push({ divider: true });\n\thighlightSubMenuDef = highlightSubMenuDef.concat(createUnhighlightMenu(source));\n\treturn highlightSubMenuDef;\n};\n\n// This should only appear in menu if highlight is true.\nconst createUnhighlightMenu = (source) => {\n\tconst unhighlightSubMenu = [\n\t\t{ action: \"unhighlight\", label: getLabel(\"menu.unhighlight\"), enable: cc.isBranchHighlighted() }\n\t];\n\treturn unhighlightSubMenu;\n};\n\n// Returns a label index by the key from the canvas controller.\nconst getLabel = (key) => cc.labelUtil.getLabel(key);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ArrangeLayoutAction from \"../command-actions/arrangeLayoutAction.js\";\nimport AttachNodeToLinksAction from \"../command-actions/attachNodeToLinksAction.js\";\nimport CommandStack from \"../command-stack/command-stack.js\";\nimport ConvertSuperNodeExternalToLocal from \"../command-actions/convertSuperNodeExternalToLocalAction.js\";\nimport ConvertSuperNodeLocalToExternal from \"../command-actions/convertSuperNodeLocalToExternalAction.js\";\nimport * as constants from \"./constants/canvas-constants\";\nimport CreateAutoNodeAction from \"../command-actions/createAutoNodeAction.js\";\nimport CreateCommentAction from \"../command-actions/createCommentAction.js\";\nimport CreateCommentLinkAction from \"../command-actions/createCommentLinkAction.js\";\nimport CreateNodeAction from \"../command-actions/createNodeAction.js\";\nimport CreateNodeLinkAction from \"../command-actions/createNodeLinkAction.js\";\nimport CreateNodeLinkDetachedAction from \"../command-actions/createNodeLinkDetachedAction.js\";\nimport CreateNodeOnLinkAction from \"../command-actions/createNodeOnLinkAction.js\";\nimport CreateNodeAttachLinksAction from \"../command-actions/createNodeAttachLinksAction.js\";\nimport CreateSuperNodeAction from \"../command-actions/createSuperNodeAction.js\";\nimport CollapseSuperNodeInPlaceAction from \"../command-actions/collapseSuperNodeInPlaceAction.js\";\nimport ColorSelectedObjectsAction from \"../command-actions/colorSelectedObjectsAction.js\";\nimport DeconstructSuperNodeAction from \"../command-actions/deconstructSuperNodeAction.js\";\nimport DeleteLinkAction from \"../command-actions/deleteLinkAction.js\";\nimport DeleteObjectsAction from \"../command-actions/deleteObjectsAction.js\";\nimport DisconnectObjectsAction from \"../command-actions/disconnectObjectsAction.js\";\nimport DisplayPreviousPipelineAction from \"../command-actions/displayPreviousPipelineAction.js\";\nimport DisplaySubPipelineAction from \"../command-actions/displaySubPipelineAction.js\";\nimport EditCommentAction from \"../command-actions/editCommentAction.js\";\nimport EditDecorationLabelAction from \"../command-actions/editDecorationLabelAction.js\";\nimport SetNodeLabelAction from \"../command-actions/setNodeLabelAction.js\";\nimport ExpandSuperNodeInPlaceAction from \"../command-actions/expandSuperNodeInPlaceAction.js\";\nimport InsertNodeIntoLinkAction from \"../command-actions/insertNodeIntoLinkAction.js\";\nimport MoveObjectsAction from \"../command-actions/moveObjectsAction.js\";\nimport PasteAction from \"../command-actions/pasteAction.js\";\nimport SaveToPaletteAction from \"../command-actions/saveToPaletteAction.js\";\nimport SetObjectsStyleAction from \"../command-actions/setObjectsStyleAction.js\";\nimport SetLinksStyleAction from \"../command-actions/setLinksStyleAction.js\";\nimport UpdateLinkAction from \"../command-actions/updateLinkAction.js\";\nimport LabelUtil from \"./label-util.js\";\nimport Logger from \"../logging/canvas-logger.js\";\nimport CanvasUtils from \"./common-canvas-utils\";\nimport ObjectModel from \"../object-model/object-model.js\";\nimport SizeAndPositionObjectsAction from \"../command-actions/sizeAndPositionObjectsAction.js\";\nimport getContextMenuDefinition from \"./canvas-controller-menu-utils.js\";\nimport { get, isEmpty } from \"lodash\";\nimport { CANVAS_FOCUS,\n\tSINGLE_CLICK,\n\tLINK_SELECTION_NONE, LINK_SELECTION_DETACHABLE,\n\tSNAP_TO_GRID_NONE, SUPER_NODE, WYSIWYG, CAUSE_MOUSE, CAUSE_KEYBOARD\n} from \"./constants/canvas-constants\";\n\nimport { cloneDeep } from \"lodash\";\n\n// Global instance ID counter\nvar commonCanvasControllerInstanceId = 0;\n\nexport default class CanvasController {\n\n\tconstructor(instanceId = commonCanvasControllerInstanceId++) {\n\t\tthis.logger = new Logger(\"CanvasController\");\n\n\t\tthis.contextMenuConfig = {\n\t\t\tenableCreateSupernodeNonContiguous: false,\n\t\t\tdefaultMenuEntries: {\n\t\t\t\tsaveToPalette: false,\n\t\t\t\tcreateSupernode: true,\n\t\t\t\tdisplaySupernodeFullPage: true,\n\t\t\t\tcolorBackground: true\n\t\t\t}\n\t\t};\n\n\t\tthis.keyboardConfig = {\n\t\t\tactions: {\n\t\t\t\tdelete: true,\n\t\t\t\tundo: true,\n\t\t\t\tredo: true,\n\t\t\t\tselectAll: true,\n\t\t\t\tdeselectAll: true,\n\t\t\t\tcopyToClipboard: true,\n\t\t\t\tcutToClipboard: true,\n\t\t\t\tpasteFromClipboard: true\n\t\t\t}\n\t\t};\n\n\t\tthis.handlers = {\n\t\t\tcontextMenuHandler: null,\n\t\t\tbeforeEditActionHandler: null,\n\t\t\teditActionHandler: null,\n\t\t\tclickActionHandler: null,\n\t\t\tdecorationActionHandler: null,\n\t\t\ttipHandler: null,\n\t\t\tlayoutHandler: null,\n\t\t\tidGeneratorHandler: null,\n\t\t\tselectionChangeHandler: null,\n\t\t\tactionLabelHandler: null\n\t\t};\n\n\t\tthis.objectModel = new ObjectModel();\n\t\tthis.commandStack = new CommandStack();\n\n\t\t// Create a util object to serve up translated messages when needed.\n\t\t// The intl object will be provided to labelUtil when we get it from\n\t\t// common-canvas.jsx.\n\t\tthis.labelUtil = new LabelUtil();\n\n\t\t// The following two functions must bind to this so that the correct canvas\n\t\t// controller context can be accessed in context menu wrapper component.\n\t\tthis.contextMenuActionHandler = this.contextMenuActionHandler.bind(this);\n\t\tthis.closeContextMenu = this.closeContextMenu.bind(this);\n\n\t\tthis.isContextToolbarForNonSelectedObj = this.isContextToolbarForNonSelectedObj.bind(this);\n\n\t\t// Use provided instanceId or auto-generated ID.\n\t\tthis.instanceId = instanceId;\n\n\t\t// Global variable to track whether branch highlighting is displayed or not.\n\t\tthis.branchHighlighted = false;\n\n\t\t// Stores the object that is currently focused. This can be a node, comment\n\t\t// or link OR the string stored in the constant CANVAS_FOCUS. The focusObject\n\t\t// is maintained even if the focus goes outside the canvas. This helps in the\n\t\t// situation where focus goes to a context menu (outside the canvas) and then,\n\t\t// when the menu is closed, we want the focus to go back to the originally\n\t\t// focused object.\n\t\tthis.focusObject = null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Config methods\n\t// ---------------------------------------------------------------------------\n\n\tsetCanvasConfig(config) {\n\t\tthis.logger.log(\"Setting Canvas Config\");\n\t\tif (config) {\n\t\t\t// TODO - Remove these next four lines in next major release.\n\t\t\tconst correctConfig = this.correctTypo(config);\n\t\t\tcorrectConfig.enableNodeLayout =\n\t\t\t\tCanvasUtils.convertPortPosInfo(correctConfig.enableNodeLayout);\n\t\t\tcorrectConfig.enableNodeLayout =\n\t\t\t\tCanvasUtils.convertPortDisplayInfo(correctConfig.enableNodeLayout);\n\t\t\tthis.objectModel.openPaletteIfNecessary(config);\n\t\t\tthis.objectModel.setCanvasConfig(correctConfig);\n\t\t}\n\t}\n\n\t// cSpell:disable\n\t// Converts the config option 'enableHightlightNodeOnNewLinkDrag' (which has\n\t// a typo with a 't' in the middle of 'Highlight') if present, to the correct\n\t// name.\n\t// TODO -- remove this at the next major version change.\n\tcorrectTypo(config) {\n\t\tif (!isEmpty(config) && typeof config.enableHightlightNodeOnNewLinkDrag === \"boolean\") {\n\t\t\tconfig.enableHighlightNodeOnNewLinkDrag = config.enableHightlightNodeOnNewLinkDrag;\n\t\t\tdelete config.enableHightlightNodeOnNewLinkDrag; // Delete it so it doesn't cause debugging confusion\n\t\t}\n\t\treturn config;\n\t}\n\t// cSpell:enable\n\n\tgetCanvasConfig() {\n\t\treturn this.objectModel.getCanvasConfig();\n\t}\n\n\tsetIntl(intl) {\n\t\tthis.labelUtil.setIntl(intl);\n\t}\n\n\tgetIntl() {\n\t\treturn this.labelUtil.getIntl();\n\t}\n\n\tsetToolbarConfig(config) {\n\t\tthis.logger.log(\"Setting Toolbar Config\");\n\t\tthis.objectModel.setToolbarConfig(config);\n\t}\n\n\tsetNotificationPanelConfig(config) {\n\t\tthis.logger.log(\"Setting Notif Panel Config\");\n\t\tthis.objectModel.setNotificationPanelConfig(config);\n\t}\n\n\tsetLeftFlyoutConfig(config) {\n\t\tthis.logger.log(\"Setting Left Flyout Config\");\n\t\tthis.objectModel.setLeftFlyoutConfig(config);\n\t}\n\n\tsetRightFlyoutConfig(config) {\n\t\tthis.logger.log(\"Setting Right Flyout Config\");\n\t\tthis.objectModel.setRightFlyoutConfig(config);\n\t}\n\n\tsetBottomPanelConfig(config) {\n\t\tthis.logger.log(\"Setting Bottom Panel Config\");\n\t\tthis.objectModel.setBottomPanelConfig(config);\n\t}\n\n\tsetTopPanelConfig(config) {\n\t\tthis.logger.log(\"Setting Top Panel Config\");\n\t\tthis.objectModel.setTopPanelConfig(config);\n\t}\n\n\tsetContextMenuConfig(contextMenuConfig) {\n\t\tthis.logger.log(\"Setting Context Menu Config\");\n\t\tif (contextMenuConfig) {\n\t\t\tconst defaultMenuEntries = Object.assign(this.contextMenuConfig.defaultMenuEntries, contextMenuConfig.defaultMenuEntries);\n\t\t\tthis.contextMenuConfig = Object.assign(this.contextMenuConfig, contextMenuConfig, { defaultMenuEntries });\n\t\t}\n\t}\n\n\tsetKeyboardConfig(keyboardConfig) {\n\t\tthis.logger.log(\"Setting Keyboard Config\");\n\t\tif (keyboardConfig && keyboardConfig.actions) {\n\t\t\tthis.keyboardConfig.actions = Object.assign({}, this.keyboardConfig.actions, keyboardConfig.actions);\n\t\t}\n\t}\n\n\tgetKeyboardConfig() {\n\t\treturn this.keyboardConfig;\n\t}\n\n\tsetHandlers(inHandlers) {\n\t\tthis.logger.log(\"Setting Handlers\");\n\t\tthis.handlers = Object.assign(this.handlers, inHandlers);\n\t\tthis.objectModel.setIdGeneratorHandler(inHandlers.idGeneratorHandler);\n\t\tthis.objectModel.setSelectionChangeHandler(inHandlers.selectionChangeHandler);\n\t\tthis.objectModel.setLayoutHandler(inHandlers.layoutHandler);\n\t\tthis.labelUtil.setActionLabelHandler(inHandlers.actionLabelHandler);\n\t}\n\n\tsetCanvasContents(canvasContents) {\n\t\tthis.canvasContents = canvasContents;\n\t}\n\n\t// Returns a reference to the 'top-level' D3 rendering object\n\tgetSVGCanvasD3() {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.canvasContents.getSVGCanvasD3();\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Allow application to set instanceId. Needed for server side rendering to prevent\n\t// new instanceId from being created on page refreshes.\n\t// @deprecated Use the constructor parameter instead: new CanvasController(instanceId)\n\tsetInstanceId(instanceId) {\n\t\tthis.instanceId = instanceId;\n\t}\n\n\t// Return a unique identifier for this instance of Common Canvas.\n\t// The instanceId can be set via the constructor parameter or will be auto-generated.\n\tgetInstanceId() {\n\t\treturn this.instanceId;\n\t}\n\n\tgetObjectModel() {\n\t\treturn this.objectModel;\n\t}\n\n\tisInternalObjectModelEnabled() {\n\t\treturn this.getCanvasConfig().enableInternalObjectModel;\n\t}\n\n\t// Returns the redux store\n\tgetStore() {\n\t\treturn this.getObjectModel().getStore();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Pipeline flow methods\n\t// ---------------------------------------------------------------------------\n\n\t// Loads the pipelineFlow document provided into Common Canvas and displays it.\n\t// The document must conform to the pipelineFlow schema as documented in the\n\t// elyra-ai pipeline-schemas repo. Documents conforming to older versions may be\n\t// provided but they will be upgraded to the most recent version.\n\tsetPipelineFlow(flow) {\n\t\tthis.logger.logStartTimer(\"setPipelineFlow\");\n\t\tthis.objectModel.setPipelineFlow(flow);\n\t\t// When a pipeline flow is loaded it may have expanded supernodes which\n\t\t// refer to external pipelines and these need to be loaded for the\n\t\t// pipeline to display correctly.\n\t\tthis.ensureVisibleExpandedPipelinesAreLoaded();\n\t\tthis.logger.logEndTimer(\"setPipelineFlow\");\n\t}\n\n\t// Clears the pipeline flow and displays an empty canvas.\n\tclearPipelineFlow() {\n\t\tthis.objectModel.clearPipelineFlow();\n\t}\n\n\t// Returns the current pipelineFlow document in the latest version of the\n\t// pipelineFlow schema as documented in the elyra-ai pipeline-schemas repo.\n\tgetPipelineFlow() {\n\t\treturn this.objectModel.getPipelineFlow();\n\t}\n\n\t// Returns the current pipelineFlow document ID.\n\tgetPipelineFlowId() {\n\t\treturn this.objectModel.getPipelineFlowId();\n\t}\n\n\t// Returns the ID of the primary pipeline from the pipelineFlow.\n\tgetPrimaryPipelineId() {\n\t\treturn this.objectModel.getPrimaryPipelineId();\n\t}\n\n\t// Returns the external pipeline flow for the url passed in. The external\n\t// flow must have been loaded through some common-canvas action for this\n\t// method to be able to return anything.\n\tgetExternalPipelineFlow(url) {\n\t\treturn this.objectModel.getExternalPipelineFlow(url);\n\t}\n\n\t// Returns the internal format of all canvas data stored in memory by\n\t// Common Canvas. Nodes, comments and links are returned in the internal\n\t// format.\n\tgetCanvasInfo() {\n\t\treturn this.objectModel.getCanvasInfo();\n\t}\n\n\t// Returns the IDs of the ancestor pipeline of the pipeline ID passed in.\n\tgetAncestorPipelineIds(pipelineId) {\n\t\treturn this.objectModel.getAncestorPipelineIds(pipelineId);\n\t}\n\n\t// Removes all styles from nodes, comments and links. See the setObjectsStyle\n\t// and setLinkStyle methods for details on setting styles.\n\t// temporary - is a boolean that indicates whether temporary or permanent\n\t// styles should be removed.\n\tremoveAllStyles(temporary) {\n\t\tthis.objectModel.removeAllStyles(temporary);\n\t}\n\n\t// Specifies the new styles for objects that are not highlighted during\n\t// branch highlighting.\n\t// newStyle - is a style specification object.\n\tsetSubdueStyle(newStyle) {\n\t\tthis.objectModel.setSubdueStyle(newStyle);\n\t}\n\n\t// Unsets all branch highlight flags from all nodes and links in the pipeline flow.\n\tunsetAllBranchHighlight() {\n\t\tthis.objectModel.unsetAllBranchHighlight();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Pipeline methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns the pipeline object for the pipeline Id passed in.\n\tgetPipeline(pipelineId) {\n\t\treturn this.objectModel.getCanvasInfoPipeline(pipelineId);\n\t}\n\n\t// Returns the ID of the pipeline object which is currently on display\n\t// in the canvas. Typically, this is the primary pipeline but will be\n\t// different if the user has navigated into one or more supernodes; in\n\t// which case it will be the ID of the pipeline at the level in the\n\t// supernode hierarchy that is currently on display.\n\tgetCurrentPipelineId() {\n\t\treturn this.objectModel.getCurrentPipelineId();\n\t}\n\n\t// Returns truthy if the pipeline is external (that is it is part of an\n\t// external pipeline flow). Otherwise, return falsy to indicate the pipeline\n\t// is local.\n\tisPipelineExternal(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).isPipelineExternal();\n\t}\n\n\t// Returns the flow validation messages for the pipeline ID passed in.\n\tgetFlowMessages(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getFlowMessages();\n\t}\n\n\t// Returns a boolean to indicate whether there are any messages of\n\t// includeMsgsType in the pipeline identified by the pipeline ID passed in.\n\t// includeMsgsType - can be either \"error\" or \"warning\"\n\tisFlowValid(includeMsgTypes, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).isFlowValid(includeMsgTypes);\n\t}\n\n\t// Rearranges the nodes in the canvas in the direction specified for the\n\t// pipeline ID passed in.\n\t// layoutDirection - can be \"horizontal\" or \"vertical\"\n\tautoLayout(layoutDirection, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).autoLayout(layoutDirection);\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Deprecated methods\n\t// ---------------------------------------------------------------------------\n\n\t// Loads a canvas document (in the format used by WML Canvas) into\n\t// Common Canvas and displays it.\n\tsetCanvas(canvas) {\n\t\tthis.objectModel.setCanvas(canvas); // TODO - Remove this method when WML Canvas moves to pipeline flow\n\t}\n\n\t// Loads a canvas palette document (in the format used by WML Canvas) into\n\t// Common Canvas and displays it in the palette.\n\tsetPaletteData(paletteData) {\n\t\tthis.objectModel.setPaletteData(paletteData); // TODO - Remove this method when WML Canvas moves to pipeline flow\n\t}\n\n\t// Returns a canvas document (in the format used by WML Canvas).\n\tgetCanvas() {\n\t\treturn this.objectModel.getCanvas(); // TODO - Remove this method when WML Canvas moves to pipeline flow\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Palette methods\n\t// ---------------------------------------------------------------------------\n\n\t// Loads the palette data as described in the palette schema in\n\t// elyra-ai pipeline-schemas repo. Any version can be loaded and it will be\n\t// upgraded to the latest version.\n\tsetPipelineFlowPalette(palette) {\n\t\tthis.objectModel.setPipelineFlowPalette(palette);\n\t}\n\n\t// Clears the palette data from Common Canvas.\n\tclearPaletteData() {\n\t\tthis.objectModel.clearPaletteData();\n\t}\n\n\t// Sets the loading text of the category. If set to a non-empty string the\n\t// category will show an InlineLoading control in the palette category div\n\t// with this text as the label. If set to falsy the palette category\n\t// will display as normal.\n\tsetCategoryLoadingText(categoryId, loadingText) {\n\t\tthis.objectModel.setCategoryLoadingText(categoryId, loadingText);\n\t}\n\n\t// Sets the empty text of the category. If set to a non-empty string and the\n\t// category does not have any nodes the palette will show a dummy node with\n\t// this text as the displayed text. If set to falsy no dummy node will be displayed.\n\tsetCategoryEmptyText(categoryId, emptyText) {\n\t\tthis.objectModel.setCategoryEmptyText(categoryId, emptyText);\n\t}\n\n\t// Adds a new node into the palette:\n\t// nodeTypeObj - must conform to the style of node used by the palette as\n\t// described in the palette schema. See objects in nodeTypes array in the\n\t// palette schema:\n\t// https://github.com/elyra-ai/pipeline-schemas/blob/main/common-canvas/palette/palette-v3-schema.json\n\t// category - is the name of the palette category where the node will be\n\t// added. If the category doesn't exist it will be created.\n\t// categoryLabel - Is an optional param. If a new category is created it will\n\t// be displayed with this label.\n\t// categoryDescription - Is an optional param. If a new category is created\n\t// it will be displayed with this description.\n\t// categoryImage - Is an optional param. The image displayed for the category provided as a\n\t// reference to an image or the image itself.\n\taddNodeTypeToPalette(nodeTypeObj, categoryId, categoryLabel, categoryDescription, categoryImage) {\n\t\tthis.objectModel.addNodeTypeToPalette(nodeTypeObj, categoryId, categoryLabel, categoryDescription, categoryImage);\n\t}\n\n\t// Adds an array of new node into the palette:\n\t// nodeTypeObjs - an array of nodetypes that must conform to the style of\n\t// nodes used by the palette as described in the palette schema. See objects\n\t// in nodeTypes array in the palette schema:\n\t// https://github.com/elyra-ai/pipeline-schemas/blob/main/common-canvas/palette/palette-v3-schema.json\n\t// category - is the name of the palette category where the node will be\n\t// added. If the category doesn't exist it will be created.\n\t// categoryLabel - is an optional param. If a new category is created it will\n\t// be displayed with this label.\n\t// categoryImage - the image displayed for the category provided as a\n\t// reference to an image or the image itself.\n\t// categoryDescription - Is an optional param. If a new category is created\n\t// it will be displayed with this description.\n\t// categoryImage - Is an optional param. The image displayed for the category provided as a\n\t// reference to an image or the image itself.\n\taddNodeTypesToPalette(nodeTypeObjs, categoryId, categoryLabel, categoryDescription, categoryImage) {\n\t\tthis.objectModel.addNodeTypesToPalette(nodeTypeObjs, categoryId, categoryLabel, categoryDescription, categoryImage);\n\t}\n\n\t// Removes nodetypes from a palette category\n\t// selObjectIds - an array of object IDs to identify the nodetypes to be\n\t// removed\n\t// categoryId - the ID of the category from which the nodes will be removed\n\tremoveNodesFromPalette(selObjectIds, categoryId) {\n\t\tthis.objectModel.addNodeTypesToPalette(selObjectIds, categoryId);\n\t}\n\n\t// Returns the palette data document which will conform to the latest version\n\t// of the palette schema.\n\tgetPaletteData() {\n\t\treturn this.objectModel.getPaletteData();\n\t}\n\n\t// Returns the palette node identified by the operator ID passed in.\n\tgetPaletteNode(operatorId) {\n\t\treturn this.objectModel.getPaletteNode(operatorId);\n\t}\n\n\t// Returns the palette node identified by the node ID passed in.\n\tgetPaletteNodeById(nodeId) {\n\t\treturn this.objectModel.getPaletteNodeById(nodeId);\n\t}\n\n\t// Returns the category of the palette node identified by the operator passed in\n\tgetCategoryForNode(operatorId) {\n\t\treturn this.objectModel.getCategoryForNode(operatorId);\n\t}\n\n\t// Converts a node template from the format used in the palette (that conforms\n\t// to the schema) to the internal node format.\n\tconvertNodeTemplate(nodeTemplate) {\n\t\treturn this.objectModel.convertNodeTemplate(nodeTemplate);\n\t}\n\n\t// Opens the palette category identified by the category ID passed in.\n\topenPaletteCategory(categoryId) {\n\t\tthis.objectModel.setIsOpenCategory(categoryId, true);\n\t}\n\n\t// Closes the palette category identified by the category ID passed in.\n\tclosePaletteCategory(categoryId) {\n\t\tthis.objectModel.setIsOpenCategory(categoryId, false);\n\t}\n\n\t// Opens all the palette categories.\n\topenAllPaletteCategories() {\n\t\tthis.objectModel.setIsOpenAllCategories(true);\n\t}\n\n\t// Closes all the palette categories.\n\tcloseAllPaletteCategories() {\n\t\tthis.objectModel.setIsOpenAllCategories(false);\n\t}\n\n\t// Returns true or false to indicate whether a palette category is open or not.\n\tisPaletteCategoryOpen(categoryId) {\n\t\treturn this.objectModel.isPaletteCategoryOpen(categoryId);\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Selections methods\n\t// ---------------------------------------------------------------------------\n\n\t// Sets the currently selected objects replacing any current selections.\n\t// newSelection - An array of object IDs for nodes and/or comments\n\t// pipelineId - Optional. The ID of the pipeline where the objects exist.\n\t// Selected objects can only be in one pipeline. If this parameter is omitted\n\t// it is assumed the selections will be for objects in the 'top-level' pipeline\n\t// being displayed.\n\tsetSelections(newSelections, pipelineId) {\n\t\tthis.objectModel.setSelections(newSelections, pipelineId);\n\t}\n\n\t// Clears all the current selections from the canvas.\n\tclearSelections() {\n\t\tthis.objectModel.clearSelections();\n\t}\n\n\t// Selects all the objects on the canvas.\n\tselectAll(pipelineId) {\n\t\t// Include links in selectAll unless LinkSelection is \"None\"\n\t\tconst includeLinks = this.getCanvasConfig().enableLinkSelection !== LINK_SELECTION_NONE;\n\t\tthis.objectModel.selectAll(includeLinks, pipelineId);\n\t}\n\n\t// De-selects all the objects on the canvas.\n\tdeselectAll(pipelineId) {\n\t\tthis.objectModel.deselectAll(pipelineId);\n\t}\n\n\tisPrimaryPipelineEmpty() {\n\t\treturn this.objectModel.isPrimaryPipelineEmpty();\n\t}\n\n\t// Returns an array of the IDs of the currently selected objects.\n\tgetSelectedObjectIds() {\n\t\treturn this.objectModel.getSelectedObjectIds();\n\t}\n\n\t// Returns the currently selected Nodes.\n\tgetSelectedNodes() {\n\t\treturn this.objectModel.getSelectedNodes();\n\t}\n\n\t// Returns the currently selected Comments.\n\tgetSelectedComments() {\n\t\treturn this.objectModel.getSelectedComments();\n\t}\n\n\t// Returns the currently selected Links.\n\tgetSelectedLinks() {\n\t\treturn this.objectModel.getSelectedLinks();\n\t}\n\n\t// Returns the currently selected objects (Nodes and Comments and Links).\n\tgetSelectedObjects() {\n\t\treturn this.objectModel.getSelectedObjects();\n\t}\n\n\t// Returns the ID of the pipeline in which the currently selected objects\n\t// exist. Only one pipeline may contain selected objects.\n\tgetSelectedPipelineId() {\n\t\treturn this.objectModel.getSelectedPipelineId();\n\t}\n\n\t// Deletes all currently selected objects.\n\tdeleteSelectedObjects() {\n\t\tthis.objectModel.deleteSelectedObjects();\n\t}\n\n\t// Returns true if the currently selected objects are all linked together.\n\t// This is used when deciding to creating a supernode.\n\tareSelectedNodesContiguous() {\n\t\treturn this.objectModel.areSelectedNodesContiguous();\n\t}\n\n\tareAllObjectsSelected() {\n\t\tconst includeLinks = this.areDetachableLinksInUse();\n\t\treturn this.objectModel.areAllObjectsSelected(includeLinks);\n\t}\n\n\t// Returns true if all the selected objects are links.\n\tareAllSelectedObjectsLinks() {\n\t\treturn this.objectModel.areAllSelectedObjectsLinks();\n\t}\n\n\tareDetachableLinksInUse() {\n\t\treturn this.getCanvasConfig().enableLinkSelection === LINK_SELECTION_DETACHABLE;\n\t}\n\n\tisSnapToGridInUse() {\n\t\treturn this.getCanvasConfig().enableSnapToGridType !== SNAP_TO_GRID_NONE;\n\t}\n\n\tisSelected(objectId, pipelineId) {\n\t\treturn this.objectModel.isSelected(objectId, pipelineId);\n\t}\n\n\tselectObject(objId, range, augment, pipelineId) {\n\t\tthis.objectModel.selectObject(objId, range, augment, pipelineId);\n\t}\n\n\t// Internal helper method.\n\t// Performs required selection action for when either a comment, node or\n\t// link is clicked (note: this may also apply when a keyboard shortcut\n\t// simulates a click). This may mean: simply selecting the object; or adding\n\t// the object to the currently selected set of objects; or even toggling\n\t// the object's selection off, depending on the value for range or augment.\n\t// This method also sends the appropriate clickType value to the\n\t// clickActionHandler callback in the host application.\n\tselectObjectWithClick(obj, clickType, pipelineId, range = false, augment = false) {\n\t\tthis.selectObject(obj.id, range, augment, pipelineId);\n\n\t\tconst objectType = CanvasUtils.getObjectTypeName(obj);\n\t\tthis.clickActionHandler({\n\t\t\tclickType,\n\t\t\tobjectType,\n\t\t\tid: obj.id,\n\t\t\tselectedObjectIds: this.getSelectedObjectIds(),\n\t\t\tpipelineId: pipelineId });\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Notification messages methods\n\t// ---------------------------------------------------------------------------\n\n\t// Overwrites the array of notification messages shown in the notification\n\t// panel.\n\t// newMessage - An array of messages (see getNotificationMessages)\n\tsetNotificationMessages(newMessages) {\n\t\tthis.objectModel.setNotificationMessages(newMessages);\n\t}\n\n\t// Deletes all notification messages shown in the notification panel.\n\tclearNotificationMessages() {\n\t\tthis.objectModel.clearNotificationMessages();\n\t}\n\n\t// Removes the notification messages from the given array of ids\n\tdeleteNotificationMessages(ids) {\n\t\tthis.objectModel.deleteNotificationMessages(ids);\n\t}\n\n\t// Returns the array of current notification messages. If the messageType is\n\t// provided only messages of that type will be returned. If messageType is\n\t// not provided, all messages will be returned. The format of a notification\n\t// message is an object with these fields:\n\t// {\n\t// \"id\": string (Required),\n\t// \"type\" : enum, oneOf [\"info\", \"success\", \"warning\", \"error\"] (Required),\n\t// \"callback\": function, the callback function when a message is clicked (Required),\n\t// \"title\": string (Optional),\n\t// \"content\": string, html, JSX Object (Optional),\n\t// \"timestamp\": string (Optional),\n\t// \"closeMessage\": string (Optional)\n\t// }\n\tgetNotificationMessages(messageType) {\n\t\treturn this.objectModel.getNotificationMessages(messageType);\n\t}\n\n\t// Returns the maximum notification message type present in the current set\n\t// of notification messages. For this: (\"error\" > \"warning\" > \"success\" > \"info\")\n\tgetNotificationMessagesMaxType() {\n\t\treturn this.objectModel.getNotificationMessagesMaxType();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Objects (nodes and comments) methods\n\t// ---------------------------------------------------------------------------\n\n\t// Moves the objects identified in the data object which must be in the\n\t// pipeline identified by the pipeline ID.\n\t// data - A javascript object like this:\n\t// {\n\t// nodes: [] // An array of node and comment IDs\n\t// offsetX: number // Offset in pixels the objects will move in the X dir\n\t// offsetY: number // Offset in pixels the objects will move in the Y dir\n\t// }\n\tmoveObjects(data, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).moveObjects(data);\n\t}\n\n\t// Deletes the objects specified in objectIds array.\n\t// objectIds - An array of node and comment IDs\n\tdeleteObjects(objectIds, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).deleteObjects(objectIds);\n\t}\n\n\t// Removes the links to and from the objects specified in the objectIds array.\n\t// objectIds - An array of node and comment IDs\n\tdisconnectObjects(objectIds, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).disconnectObjects(objectIds);\n\t}\n\n\t// Deletes the object specified by the id in the pipeline specified by\n\t// pipeline ID.\n\t// @Deprecated Use deleteNode or deleteComment as appropriate instead.\n\tdeleteObject(id, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).deleteObject(id);\n\t}\n\n\t// Sets the style of the objects specified by pipelineObjectIds to be\n\t// the newStyle which will be either temporary or permanent.\n\t// pipelineObjectIds: This identified the objects to be styles. It is a\n\t// javascript object like this:\n\t// {\n\t// <pipelineID_1>: [\n\t// <objectID_1_1>,\n\t// <objectID_1_2\n\t// ],\n\t// <pipelineID_2>: [\n\t// <objectID_2_1>,\n\t// <objectID_2_2\n\t// ]\n\t// }\n\t// newStyles - This is a style specification object.\n\t// temporary - A boolean to indicate if the style is serialized when\n\t// getPipelineFlow() method is called or not.\n\tsetObjectsStyle(pipelineObjectIds, newStyle, temporary) {\n\t\tthis.objectModel.setObjectsStyle(pipelineObjectIds, newStyle, temporary);\n\t}\n\n\t// Sets the styles of multiple objects at once.\n\t// pipelineObjStyles - Specified the objects and the styles each should be\n\t// set to. It is a javascript array like this:\n\t// [\n\t// { pipelineId: <pipelineId>, objId: <objectId>, style: <style_spec>},\n\t// { pipelineId: <pipelineId>, objId: <objectId>, style: <style_spec>},\n\t// { pipelineId: <pipelineId>, objId: <objectId>, style: <style_spec>}\n\t// ]\n\t// temporary - A boolean to indicate if the styles are serialized when\n\t// getPipelineFlow() method is called or not.\n\tsetObjectsMultiStyle(pipelineObjStyles, temporary) {\n\t\tthis.objectModel.setObjectsMultiStyle(pipelineObjStyles, temporary);\n\t}\n\n\t// Sets the branch highlighting flag on all nodes identified in\n\t// the pipelineObjectIds parameter.\n\tsetObjectsBranchHighlight(pipelineObjectIds) {\n\t\tthis.objectModel.setObjectsBranchHighlight(pipelineObjectIds);\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Node methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns an array of nodes for the pipeline specified by the pipelineId.\n\tgetNodes(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodes();\n\t}\n\n\t// Returns a new node created from the data parameter in the pipeline\n\t// identified by the pipelineId.\n\t// The data parameter must contain:\n\t// nodeTemplate - a node template from the palette. The nodeTemplate\n\t// can be retrieved from the palette using with Canvas\n\t// Controller methods: getPaletteNode or getPaletteNodeById.\n\t// offsetX - the x coordinate of the new node\n\t// offsetY - the y coordinate of the new node\n\tcreateNode(data, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).createNode(data);\n\t}\n\n\t// Adds a new node into the pipeline specified by the pipelineId.\n\taddNode(node, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).addNode(node);\n\t}\n\n\t// Creates a node using the data parameter provided in the pipeline specified\n\t// by pipelineId and adds the command to the command stack (so the user can\n\t// undo/redo the command). This will also cause the beforeEditActionHandler\n\t// and editActionHandler callbacks to be called.\n\t// The data parameter must contain:\n\t// nodeTemplate - a node template from the palette. The nodeTemplate\n\t// can be retrieved from the palette using with Canvas\n\t// Controller methods: getPaletteNode or getPaletteNodeById.\n\t// offsetX - the x coordinate of the new node\n\t// offsetY - the y coordinate of the new node\n\t//\n\t// If pipelineId is omitted the node will be created in the current\n\t// \"top-level\" pipeline.\n\tcreateNodeCommand(data, pipelineId) {\n\t\tconst pId = pipelineId || this.getCurrentPipelineId();\n\t\tconst nodeTemplate = this.convertNodeTemplate(data.nodeTemplate);\n\t\tthis.createNodeFromTemplateAt(nodeTemplate, { x: data.offsetX, y: data.offsetY }, pId);\n\t}\n\n\t// Deletes the node specified.\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tdeleteNode(nodeId, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).deleteNode(nodeId);\n\t}\n\n\t// Sets the node properties\n\t// nodeId - The ID of the node\n\t// properties - An object containing properties to be overridden in the node\n\t// pipelineId - The ID of the pipeline\n\tsetNodeProperties(nodeId, properties, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeProperties(nodeId, properties);\n\t}\n\n\t// Sets the nodes properties\n\t// nodesProperties - An array of object containing properties to be overridden in the node\n\t// pipelineId - The ID of the pipeline\n\tsetNodesProperties(nodesProperties, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodesProperties(nodesProperties);\n\t}\n\n\t// Sets the node parameters\n\t// nodeId - The ID of the node\n\t// parameters - An array of parameters\n\t// pipelineId - The ID of the pipeline\n\tsetNodeParameters(nodeId, parameters, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeParameters(nodeId, parameters);\n\t}\n\n\t// Sets the node UI parameters\n\t// nodeId - The ID of the node\n\t// parameters - An array of UI parameters\n\t// pipelineId - The ID of the pipeline\n\tsetNodeUiParameters(nodeId, uiParameters, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeUiParameters(nodeId, uiParameters);\n\t}\n\n\t// Sets the node messages\n\t// nodeId - The ID of the node\n\t// messages - An array of messages\n\t// pipelineId - The ID of the pipeline\n\tsetNodeMessages(nodeId, messages, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeMessages(nodeId, messages);\n\t}\n\n\t// Sets a single message on a node\n\t// nodeId - The ID of the node\n\t// message - A message\n\t// pipelineId - The ID of the pipeline\n\tsetNodeMessage(nodeId, message, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeMessage(nodeId, message);\n\t}\n\n\t// Sets the label for a node\n\t// nodeId - The ID of the node\n\t// ndeLabel - The label\n\t// pipelineId - The ID of the pipeline\n\tsetNodeLabel(nodeId, newLabel, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeLabel(nodeId, newLabel);\n\t}\n\n\t/**\n\t * Sets the class name to newClassName of the nodes identified by nodeIds\n\t * array in the pipeline specified by pipeline ID. The class name will be\n\t * applied to the nodes' group (<g>) element in the DOM. To remove any\n\t * previously added classes an empty string can be specified.\n\t * @param nodeIds - An array of node IDs\n\t * @param newClassName - New class string. Can be a space separated list\n\t * of classes or an empty string to remove\n\t * previously added classes.\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t*/\n\tsetNodesClassName(nodeIds, newClassName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setObjectsClassName(nodeIds, newClassName);\n\t}\n\n\t// Sets the decorations on a node. The decorations array passed in\n\t// will replace any decorations currently applied to the node.\n\t// nodeId - The ID of the node\n\t// newDecorations - An array of decoration objects.\n\t// pipelineId - The ID of the pipeline\n\tsetNodeDecorations(nodeId, newDecorations, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeDecorations(nodeId, newDecorations);\n\t}\n\n\t// Sets the input ports on a node. The inputs array of ports provided will\n\t// replace any input ports for a node.\n\t// nodeId - The ID of the node\n\t// inputs - An array of input port objects.\n\t// pipelineId - The ID of the pipeline\n\tsetNodeInputPorts(nodeId, inputs, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeInputPorts(nodeId, inputs);\n\t}\n\n\t// Sets the output ports on a node. The outputs array of ports provided will\n\t// replace any output ports for a node.\n\t// nodeId - The ID of the node\n\t// outputs - An array of output port objects.\n\t// pipelineId - The ID of the pipeline\n\tsetNodeOutputPorts(nodeId, outputs, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeOutputPorts(nodeId, outputs);\n\t}\n\n\t// Sets the decorations of multiple nodes at once. The decorations array\n\t// passed in will replace any decorations currently applied to the nodes.\n\t// pipelineNodeDecorations - Specifies the nodes and their decorations.\n\t// It is a javascript array like this:\n\t// [\n\t// { pipelineId: <pipelineId>, nodeId: <nodeId>, decorations: <decoration_spec>},\n\t// { pipelineId: <pipelineId>, nodeId: <nodeId>, decorations: <decoration_spec>},\n\t// { pipelineId: <pipelineId>, nodeId: <nodeId>, decorations: <decoration_spec>}\n\t// ]\n\tsetNodesMultiDecorations(pipelineNodeDecorations) {\n\t\tthis.objectModel.setNodesMultiDecorations(pipelineNodeDecorations);\n\t}\n\n\t// Sets the input port label on a node\n\t// nodeId - The ID of the node\n\t// portId - The ID of the input port\n\t// newLabel - The label\n\t// pipelineId - The ID of the pipeline\n\tsetInputPortLabel(nodeId, portId, newLabel, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setInputPortLabel(nodeId, portId, newLabel);\n\t}\n\n\t// Sets the output port label on a node\n\t// nodeId - The ID of the node\n\t// portId - The ID of the output port\n\t// newLabel - The label\n\t// pipelineId - The ID of the pipeline\n\tsetOutputPortLabel(nodeId, portId, newLabel, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setOutputPortLabel(nodeId, portId, newLabel);\n\t}\n\n\t// Gets a node\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNode(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNode(nodeId);\n\t}\n\n\t// Gets the UI parameters for a node\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNodeUiParameters(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeUiParameters(nodeId);\n\t}\n\n\t// Gets the supernodes for a pipeline.\n\t// pipelineId - The ID of the pipeline\n\tgetSupernodes(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getSupernodes();\n\t}\n\n\t// Returns supernode ID that has a subflow_ref to the given pipelineId.\n\tgetSupernodeObjReferencing(pipelineId) {\n\t\treturn this.objectModel.getSupernodeObjReferencing(pipelineId);\n\t}\n\n\t// Gets the messages for a node\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNodeMessages(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeMessages(nodeId);\n\t}\n\n\t// Gets a message for a specific control for a node\n\t// nodeId - The ID of the node\n\t// controlName - The control name\n\t// pipelineId - The ID of the pipeline\n\tgetNodeMessage(nodeId, controlName, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeMessage(nodeId, controlName);\n\t}\n\n\t// Gets the array of input ports for the node or null if the node ID is\n\t// not recognized.\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNodeInputPorts(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeInputPorts(nodeId);\n\t}\n\n\t// Gets the array of output ports for the node or null if the node ID is\n\t// not recognized.\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNodeOutputPorts(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeOutputPorts(nodeId);\n\t}\n\n\t// Gets an array of decorations for a node\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetNodeDecorations(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeDecorations(nodeId);\n\t}\n\n\t// Gets the class name associated with the node specified by nodeId in the\n\t// pipeline specified by pipelineId.\n\tgetNodeClassName(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeClassName(nodeId);\n\t}\n\n\t// Gets the style specification for a node\n\t// nodeId - The ID of the node\n\t// temporary - A boolean to indicate if the styles are serialized when\n\t// getPipelineFlow() method is called or not.\n\t// pipelineId - The ID of the pipeline\n\tgetNodeStyle(nodeId, temporary, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeStyle(nodeId, temporary);\n\t}\n\n\t/**\n\t * Returns an array of nodes that are for the branch(es) that the nodes,\n\t * identified by the node IDs passed in, are within.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\tgetBranchNodes(nodeIds, pipelineId) {\n\t\tconst pId = pipelineId ? pipelineId : this.getCurrentPipelineId();\n\t\treturn this.objectModel.getConnectedObjects(pId, nodeIds, constants.CONNECTED_BRANCH);\n\t}\n\n\t/**\n\t * Returns an array of nodes that are upstream from the nodes\n\t * identified by the node IDs passed in.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\tgetUpstreamNodes(nodeIds, pipelineId) {\n\t\tconst pId = pipelineId ? pipelineId : this.getCurrentPipelineId();\n\t\treturn this.objectModel.getConnectedObjects(pId, nodeIds, constants.CONNECTED_UPSTREAM);\n\t}\n\n\t/**\n\t * Returns an array of nodes that are downstream from the nodes\n\t * identified by the node IDs passed in.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\tgetDownstreamNodes(nodeIds, pipelineId) {\n\t\tconst pId = pipelineId ? pipelineId : this.getCurrentPipelineId();\n\t\treturn this.objectModel.getConnectedObjects(pId, nodeIds, constants.CONNECTED_DOWNSTREAM);\n\t}\n\n\t// Adds a custom attribute to the nodes.\n\t// @Deprecated.\n\taddCustomAttrToNodes(nodeIds, attrName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).addCustomAttrToNodes(nodeIds, attrName);\n\t}\n\n\t// Removes a custom attribute from the nodes.\n\t// @Deprecated.\n\tremoveCustomAttrFromNodes(nodeIds, attrName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).removeCustomAttrFromNodes(nodeIds, attrName);\n\t}\n\n\t// Returns a boolean to indicate whether the supernode is expanded in place.\n\t// nodeId - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tisSuperNodeExpandedInPlace(nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).isSuperNodeExpandedInPlace(nodeId);\n\t}\n\n\t// Sets the label, for the node identified, to edit mode, provided the node\n\t// label is editable. This allows the user to edit the label text.\n\tsetNodeLabelEditingMode(nodeId, pipelineId) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setNodeLabelEditingMode(nodeId, pipelineId);\n\t\t}\n\t}\n\n\t// Sets the decoration label, for the decoration in the node identified, to edit\n\t// mode, provided the node label is editable. This allows the user to edit the\n\t// label text.\n\tsetNodeDecorationLabelEditingMode(decId, nodeId, pipelineId) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setNodeDecorationLabelEditingMode(decId, nodeId, pipelineId);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the focus function for the node identified by the node ID passed in.\n\t * The focus function will be function on a React object which is used to\n\t * display the contents of the node. The focus function will be called when the\n\t * user presses shortcuts to move the focus highlighting to the node's sub-objects.\n\t * @param nodeId - The ID of the node.\n\t * @param focusFunction -\n\t * @param pipelineId - Optional. The ID of the pipeline of the node.\n\t * Defaults to the currently displayed pipeline.\n\t */\n\tsetSubObjectFocusFunction(nodeId, focusFunction, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setSubObjectFocusFunction(nodeId, focusFunction);\n\t}\n\n\t// Sets the connection source for creating a link from an output port.\n\t// This is called when the user activates the keyboard shortcut (Ctrl/Cmd + Shift + L)\n\t// while focus is on an output port. Only one port can have connectFrom set to true at a time.\n\tsetPortConnectFrom(nodeId, portId, pipelineId) {\n\t\t// First, clear any existing connectFrom status in the pipeline\n\t\tthis.clearConnectFromStatus(pipelineId);\n\t\t// Now set the new connectFrom status\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setOutputPortConnectFromStatus(nodeId, portId, true);\n\t}\n\n\t// Finds the node and output port that has connectFrom set to true in the specified pipeline.\n\t// Returns an object with { node, portId } or null if not found.\n\tgetConnectFromInfo(pipelineId) {\n\t\tconst nodes = this.objectModel.getAPIPipeline(pipelineId).getNodes();\n\t\tfor (const node of nodes) {\n\t\t\tif (node.outputs) {\n\t\t\t\tfor (const port of node.outputs) {\n\t\t\t\t\tif (port.connectFrom) {\n\t\t\t\t\t\treturn { node: node, portId: port.id };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Clears the connectFrom status from any port in the specified pipeline.\n\tclearConnectFromStatus(pipelineId) {\n\t\tconst connectFromInfo = this.getConnectFromInfo(pipelineId);\n\t\tif (connectFromInfo) {\n\t\t\tthis.objectModel.getAPIPipeline(pipelineId).setOutputPortConnectFromStatus(\n\t\t\t\tconnectFromInfo.node.id,\n\t\t\t\tconnectFromInfo.portId,\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Comments methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns the comments from the pipeline.\n\t// pipelineId - The ID of the pipeline\n\tgetComments(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getComments();\n\t}\n\n\t// Returns a comment from the pipeline.\n\t// comId - The ID of the comment\n\t// pipelineId - The ID of the pipeline\n\tgetComment(comId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getComment(comId);\n\t}\n\n\t// Returns a position object which indicates the position of where a new\n\t// comment should be placed in a situation where the mouse position cannot be\n\t// used (e.g. the toolbar button was clicked).\n\t// pipelineId - The ID of the pipeline\n\tgetNewCommentPosition(pipelineId) {\n\t\tconst apiPipeline = this.objectModel.getAPIPipeline(pipelineId);\n\t\tconst defComPos = this.getSVGCanvasD3().getDefaultCommentOffset();\n\t\tconst newComPos = apiPipeline.getAdjustedCommentPosition(defComPos);\n\t\treturn { x: newComPos.x_pos, y: newComPos.y_pos };\n\t}\n\n\t// Creates a comment for the pipeline.\n\t// source - Input data\n\t// pipelineId - The ID of the pipeline\n\tcreateComment(source, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).createComment(source);\n\t}\n\n\t// Adds a comment to the pipeline.\n\t// data - the data describing the comment\n\t// pipelineId - The ID of the pipeline\n\taddComment(data, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).addComment(data);\n\t}\n\n\t// Edits a comment with the data.\n\t// properties - comment properties to overwrite the comment\n\t// pipelineId - The ID of the pipeline\n\teditComment(properties, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).editComment(properties);\n\t}\n\n\t// Sets the properties in the comment identified by the commentId. The\n\t// commentProperties is an object containing one or more properties that will\n\t// replace the corresponding properties in the comment. For example: if\n\t// commentProperties is { x_pos: 50, y_pos: 70 } the comment\n\t// will be set to that position.\n\tsetCommentProperties(commentId, properties, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setCommentProperties(commentId, properties);\n\t}\n\n\t/**\n\t * Sets the class name to newClassName of the comments identified by commentIds\n\t * array in the pipeline specified by pipeline ID. The class name will be\n\t * applied to the comments' group (<g>) element in the DOM. To remove any\n\t * previously added classes an empty string can be specified.\n\t * @param commentIds - An array of comment IDs.\n\t * @param newClassName - New class string. Can be a space separated list\n\t * of classes or an empty string to remove\n\t * previously added classes.\n\t * @param pipelineId - Optional. The ID of the pipeline of the comment.\n\t * Defaults to the currently displayed pipeline.\n\t */\n\tsetCommentsClassName(commentIds, newClassName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setObjectsClassName(commentIds, newClassName);\n\t}\n\n\t// Deletes a comment\n\t// commentId - The ID of the comment\n\t// pipelineId - The ID of the pipeline\n\tdeleteComment(commentId, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).deleteComment(commentId);\n\t}\n\n\t// Adds custom attributes to a comment\n\t// @Deprecated\n\taddCustomAttrToComments(comIds, attrName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).addCustomAttrToComments(comIds, attrName);\n\t}\n\n\t// Removes custom attributes from a comment\n\t// @Deprecated\n\tremoveCustomAttrFromComments(comIds, attrName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).removeCustomAttrFromComments(comIds, attrName);\n\t}\n\n\t// Gets the class name associated with the comment specified by commentId in the\n\t// pipeline specified by pipelineId.\n\tgetCommentClassName(commentId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getCommentClassName(commentId);\n\t}\n\n\t// Gets the style specification for a comment.\n\t// commentId - The ID of the node\n\t// temporary - A boolean to indicate if the styles are serialized when\n\t// getPipelineFlow() method is called or not.\n\t// pipelineId - The ID of the pipeline\n\tgetCommentStyle(commentId, temporary, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getCommentStyle(commentId, temporary);\n\t}\n\n\t// Toggles comments on the canvas between shown and hidden.\n\ttoggleComments() {\n\t\tif (this.isHidingComments()) {\n\t\t\tthis.showComments();\n\t\t} else {\n\t\t\tthis.hideComments();\n\t\t}\n\t}\n\n\t// Hides all comments on the canvas.\n\thideComments() {\n\t\tthis.objectModel.hideComments();\n\t}\n\n\t// Shows all comments on the canvas - if they were previously hiding.\n\tshowComments() {\n\t\tthis.objectModel.showComments();\n\t}\n\n\t// Returns true if comments are currently hiding.\n\tisHidingComments() {\n\t\treturn this.objectModel.isHidingComments();\n\t}\n\n\t// Sets text to be highlighted in the comments identified by the commentIds array passed in\n\t// or, if set to a falsy value, the highlight text will be applied to all comments. The\n\t// pipelineId is optional. If highlightText is a falsy value, the highlighting will\n\t// be removed from the comments.\n\tsetCommentHighlightText(commentIds, highlightText, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setCommentHighlighText(commentIds, highlightText);\n\t}\n\n\t// Sets the comment identified, to edit mode so the user can\n\t// edit the comment.\n\tsetCommentEditingMode(commentId, pipelineId) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setCommentEditingMode(commentId, pipelineId);\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Links methods\n\t// ---------------------------------------------------------------------------\n\n\t// Gets a link\n\t// linkId - The ID of the link\n\t// pipelineId - The ID of the pipeline\n\tgetLink(linkId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getLink(linkId);\n\t}\n\n\t// Returns an array of link objects for the pipelineId passed in.\n\t// pipelineId - The ID of the pipeline\n\tgetLinks(pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getLinks();\n\t}\n\n\t// Sets the properties in the link identified by the linkId. The\n\t// linkProperties is an object containing one or more properties that will\n\t// replace the corresponding properties in the link. For exam`ple: if\n\t// linkProperties is { trgNodeId: \"123\", trgNodePortId: \"789\" } the target\n\t// node ID will be set to \"123\" and the target port ID set to \"789\".\n\tsetLinkProperties(linkId, properties, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setLinkProperties(linkId, properties);\n\t}\n\n\t// Sets the source properties in the data link identified by the linkId. The\n\t// srcNodeId and srcNodePortId will be set to the values provided. If\n\t// srcNodePortId is set to null the current srcNodePortId will be removed\n\t// from the link. Also, if the link has a srcPos property (because its\n\t// source end is detached) that will be removed.\n\tsetNodeDataLinkSrcInfo(linkId, srcNodeId, srcNodePortId, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeDataLinkSrcInfo(linkId, srcNodeId, srcNodePortId);\n\t}\n\n\t// Sets the target properties in the data link identified by the linkId. The\n\t// trgNodeId and trgNodePortId will be set to the values provided. If\n\t// trgNodePortId is set to null the current trgNodePortId will be removed\n\t// from the link. Also, if the link has a trgPos property (because its\n\t// target end is detached) that will be removed.\n\tsetNodeDataLinkTrgInfo(linkId, trgNodeId, trgNodePortId, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setNodeDataLinkTrgInfo(linkId, trgNodeId, trgNodePortId);\n\t}\n\n\t// Gets a node to node data link\n\t// srcNodeId - The ID of the source node\n\t// srcNodePortId - The ID of the source node port\n\t// trgNodeId - The ID of the target node\n\t// trgNodePortId - The ID of the target node port\n\t// pipelineId - The ID of the pipeline\n\tgetNodeDataLinkFromInfo(srcNodeId, srcNodePortId, trgNodeId, trgNodePortId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeDataLinkFromInfo(srcNodeId, srcNodePortId, trgNodeId, trgNodePortId);\n\t}\n\n\t// Gets a comment to node link\n\t// id1 - The ID of the comment\n\t// id2 - The ID of the node\n\t// pipelineId - The ID of the pipeline\n\tgetCommentLinkFromInfo(commentId, nodeId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getCommentLinkFromInfo(commentId, nodeId);\n\t}\n\n\t// Gets a node to node association link\n\t// nodeId1 - The ID of one of the nodes\n\t// nodeId2 - The ID of one of the nodes\n\t// pipelineId - The ID of the pipeline\n\tgetNodeAssocLinkFromInfo(nodeId1, nodeId2, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getNodeAssocLinkFromInfo(nodeId1, nodeId2);\n\t}\n\n\t// Adds links to the current links array for a pipeline.\n\t// linkList - An array of links\n\t// pipelineId - The ID of the pipeline\n\taddLinks(linkList, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).addLinks(linkList);\n\t}\n\n\t// Sets the current links array for a pipeline to the list passed in.\n\t// linkList - An array of links to replace the current array.\n\t// pipelineId - The ID of the pipeline\n\tsetLinks(linkList, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setLinks(linkList);\n\t}\n\n\t// Deletes a link\n\t// link - the link object to be deleted\n\t// pipelineId - The ID of the pipeline\n\tdeleteLink(link, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).deleteLink(link);\n\t}\n\n\t// Creates node to node links\n\t// data - Data describing the links\n\t// pipelineId - The ID of the pipeline\n\tcreateNodeLinks(data, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).createNodeLinks(data);\n\t}\n\n\t// Creates comment links\n\t// data - Data describing the links\n\t// pipelineId - The ID of the pipeline\n\tcreateCommentLinks(data, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).createCommentLinks(data);\n\t}\n\n\t/**\n\t * Sets the class name to newClassName of the links identified by linkIds\n\t * array in the pipeline specified by pipeline ID. The class name will be\n\t * applied to the links' group (<g>) element in the DOM. To remove any\n\t * previously added classes an empty string can be specified.\n\t * @param linkIds - An array of link IDs\n\t * @param newClassName - New class string. Can be a space separated list\n\t * of classes or an empty string to remove\n\t * previously added classes.\n\t * @param pipelineId - Optional. The ID of the pipeline of the link.\n\t * Defaults to the currently displayed pipeline.\n\t */\n\tsetLinksClassName(linkIds, newClassName, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setLinksClassName(linkIds, newClassName);\n\t}\n\n\t// Sets the style of the links specified by pipelineLinkIds to be\n\t// the newStyle which will be either temporary or permanent.\n\t// pipelineLinkIds - This identifies the objects to be styles. It is a\n\t// javascript object like this:\n\t// {\n\t// <pipelineID_1>: [\n\t// <linkID_1_1>,\n\t// <linkID_1_2\n\t// ],\n\t// <pipelineID_2>: [\n\t// <linkID_2_1>,\n\t// <linkID_2_2\n\t// ]\n\t// }\n\t// newStyle - This is a style specification objects.\n\t// temporary - A boolean to indicate if the style is serialized when\n\t// getPipelineFlow() method is called or not.\n\tsetLinksStyle(pipelineLinkIds, newStyle, temporary) {\n\t\tthis.objectModel.setLinksStyle(pipelineLinkIds, newStyle, temporary);\n\t}\n\n\t// Sets the styles of multiple links at once.\n\t// pipelineObjStyles - Specified the links and the styles each should be\n\t// set to. It is a javascript array like this:\n\t// [\n\t// { pipelineId: <pipelineId>, objId: <linkId>, style: <style_spec>},\n\t// { pipelineId: <pipelineId>, objId: <linkId>, style: <style_spec>},\n\t// { pipelineId: <pipelineId>, objId: <linkId>, style: <style_spec>}\n\t// ]\n\t// temporary - A boolean to indicate if the styles are serialized when\n\t// getPipelineFlow() method is called or not.\n\tsetLinksMultiStyle(pipelineObjStyles, temporary) {\n\t\tthis.objectModel.setLinksMultiStyle(pipelineObjStyles, temporary);\n\t}\n\n\t// Gets the class name associated with the link specified by linkId in the\n\t// pipeline specified by pipelineId.\n\tgetLinkClassName(linkId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getLinkClassName(linkId);\n\t}\n\n\t// Returns the style specification for a link.\n\t// linkIds - An array of links\n\t// temporary - A boolean to indicate if the styles are serialized when\n\t// getPipelineFlow() method is called or not.\n\t// pipelineId - The ID of the pipeline\n\tgetLinkStyle(linkId, temporary, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getLinkStyle(linkId, temporary);\n\t}\n\n\t// Sets the branch highlighting flag on all links identified in\n\t// the pipelineLinkIds parameter.\n\tsetLinksBranchHighlight(pipelineLinkIds) {\n\t\tthis.objectModel.setLinksBranchHighlight(pipelineLinkIds);\n\t}\n\n\t// Sets the decorations on a link. The decorations array passed in\n\t// will replace any decorations currently applied to the link.\n\t// linkId - The ID of the link\n\t// newDecorations - An array of decoration objects.\n\t// pipelineId - The ID of the pipeline\n\tsetLinkDecorations(linkId, newDecorations, pipelineId) {\n\t\tthis.objectModel.getAPIPipeline(pipelineId).setLinkDecorations(linkId, newDecorations);\n\t}\n\n\t// Sets the decorations of multiple links at once. The decorations array\n\t// passed in will replace any decorations currently applied to the links.\n\t// pipelineLinkDecorations - Specifies the links and their decorations.\n\t// It is a javascript array like this:\n\t// [\n\t// { pipelineId: <pipelineId>, linkId: <linkId>, decorations: <decoration_spec>},\n\t// { pipelineId: <pipelineId>, linkId: <linkId>, decorations: <decoration_spec>},\n\t// { pipelineId: <pipelineId>, linkId: <linkId>, decorations: <decoration_spec>}\n\t// ]\n\tsetLinksMultiDecorations(pipelineLinkDecorations) {\n\t\tthis.objectModel.setLinksMultiDecorations(pipelineLinkDecorations);\n\t}\n\n\t// Gets an array of decorations for a link\n\t// linkId - The ID of the link\n\t// pipelineId - The ID of the pipeline\n\tgetLinkDecorations(linkId, pipelineId) {\n\t\treturn this.objectModel.getAPIPipeline(pipelineId).getLinkDecorations(linkId);\n\t}\n\n\t// Sets the decoration label, for the decoration in the link identified, to edit\n\t// mode provided the link label is editable. This allows the user to edit the\n\t// label text.\n\tsetLinkDecorationLabelEditingMode(decId, linkId, pipelineId) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setLinkDecorationLabelEditingMode(decId, linkId, pipelineId);\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Command stack methods\n\t// ---------------------------------------------------------------------------\n\n\t// This method is deprecated. Applications should use the canvas-controller\n\t// methods to interact with the command stack.\n\tgetCommandStack() {\n\t\treturn this.commandStack;\n\t}\n\n\t// Adds the command object to the command stack which will cause the\n\t// do() method of the command to be called.\n\tdo(command) {\n\t\tthis.getCommandStack().do(command);\n\t\tthis.objectModel.refreshToolbar();\n\t}\n\n\t// Calls the undo() method of the next available command on the command\n\t// stack that can be undone, if one is available. Uses the editActionHandler\n\t// method which will cause the app's editActionHandler to be called.\n\tundo() {\n\t\tif (this.canUndo()) {\n\t\t\tthis.editActionHandler({ editType: \"undo\", editSource: \"controller\" });\n\t\t}\n\t}\n\n\t// Undoes a number of commands on the command stack as indicated by the\n\t// 'count' parameter. If 'count' is bigger than the number of undoable commands\n\t// on the stack, all undoable commands currently on the command stack\n\t// will be undone. Uses the editActionHandler method which will cause\n\t// the app's editActionHandler to be called.\n\tundoMulti(count) {\n\t\tfor (let i = 0; i < count && this.canUndo(); i++) {\n\t\t\tthis.editActionHandler({ editType: \"undo\", editSource: \"controller\" });\n\t\t}\n\t}\n\n\n\t// Calls the redo() method of the next available command on the command\n\t// stack that can be redone, if one is available. Uses the editActionHandler\n\t// method which will cause the app's editActionHandler to be called.\n\tredo() {\n\t\tif (this.canRedo()) {\n\t\t\tthis.editActionHandler({ editType: \"redo\", editSource: \"controller\" });\n\t\t}\n\t}\n\n\t// Redoes a number of commands on the command stack as indicated by the\n\t// 'count' parameter. If 'count' is bigger than the number of redoable commands\n\t// on the stack, all redoable commands currently on the command stack\n\t// will be redone. Uses the editActionHandler method which will cause\n\t// the app's editActionHandler to be called.\n\tredoMulti(count) {\n\t\tfor (let i = 0; i < count && this.canRedo(); i++) {\n\t\t\tthis.editActionHandler({ editType: \"redo\", editSource: \"controller\" });\n\t\t}\n\t}\n\n\t// Returns true if there is a command on the command stack\n\t// available to be undone.\n\tcanUndo() {\n\t\treturn this.getCommandStack().canUndo();\n\t}\n\n\t// Returns true if there is a command on the command stack\n\t// available to be redone.\n\tcanRedo() {\n\t\treturn this.getCommandStack().canRedo();\n\t}\n\n\t// Returns an array of all undoable commands currently on the\n\t// command stack.\n\tgetAllUndoCommands() {\n\t\treturn this.getCommandStack().getAllUndoCommands();\n\t}\n\n\t// Returns an array of all redoable commands currently on the\n\t// command stack.\n\tgetAllRedoCommands() {\n\t\treturn this.getCommandStack().getAllRedoCommands();\n\t}\n\n\t// Returns a string which is the label that describes the next undoable\n\t// command.\n\tgetUndoLabel() {\n\t\tif (this.canUndo()) {\n\t\t\tconst cmnd = this.getCommandStack().getUndoCommand();\n\t\t\tif (cmnd && cmnd.getLabel) {\n\t\t\t\treturn cmnd.getLabel();\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t// Returns a string which is the label that describes the next redoable\n\t// command.\n\tgetRedoLabel() {\n\t\tif (this.canRedo()) {\n\t\t\tconst cmnd = this.getCommandStack().getRedoCommand();\n\t\t\tif (cmnd && cmnd.getLabel) {\n\t\t\t\treturn cmnd.getLabel();\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t// Clears the command stack of all currently stored commands.\n\tclearCommandStack() {\n\t\tthis.getCommandStack().clearCommandStack();\n\t\tthis.objectModel.refreshToolbar();\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Breadcrumbs methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns the current array of breadcrumbs. There will one breadcrumb object\n\t// for each level of supernode that the user has navigated into. This array\n\t// can be used to display breadcrumbs to the user to show where they are\n\t// within the navigation hierarchy within Common Canvas.\n\tgetBreadcrumbs() {\n\t\treturn this.objectModel.getBreadcrumbs();\n\t}\n\n\t// Returns the last breadcrumb which represents the level with supernode\n\t// hierarchy that the user has currently navigated to.\n\tgetCurrentBreadcrumb() {\n\t\treturn this.objectModel.getCurrentBreadcrumb();\n\t}\n\n\t// Creates a breadcrumb from the supernode object and its parent pipeline ID.\n\tcreateBreadcrumb(supernodeDatum, parentPipelineId) {\n\t\treturn this.objectModel.createBreadcrumb(supernodeDatum, parentPipelineId);\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Highlight methods\n\t// ---------------------------------------------------------------------------\n\n\t// Sets the branch highlight flag on the nodes and links passed in\n\t// the highlightObjectIds parameter\n\tsetBranchHighlight(highlightObjectIds) {\n\t\tthis.unsetAllBranchHighlight();\n\t\tthis.setObjectsBranchHighlight(highlightObjectIds.nodes);\n\t\tthis.setLinksBranchHighlight(highlightObjectIds.links);\n\n\t\tthis.branchHighlighted = true;\n\t}\n\n\t/**\n\t * Highlights the branch(s) (both upstream and downstream) from the node\n\t * IDs passed in and returns the highlighted object Ids.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\thighlightBranch(nodeIds, pipelineId) {\n\t\tconst highlightObjectIds = this.getBranchNodes(nodeIds, pipelineId);\n\t\tthis.setBranchHighlight(highlightObjectIds);\n\t\treturn highlightObjectIds;\n\t}\n\n\t/**\n\t * Highlights the upstream nodes from the node IDs passed in\n\t * and returns the highlighted object Ids.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\thighlightUpstream(nodeIds, pipelineId) {\n\t\tconst highlightObjectIds = this.getUpstreamNodes(nodeIds, pipelineId);\n\t\tthis.setBranchHighlight(highlightObjectIds);\n\t\treturn highlightObjectIds;\n\t}\n\n\t/**\n\t * Highlights the downstream nodes from the node IDs passed in\n\t * and returns highlighted object Ids.\n\t * @param nodeIds - An array of node Ids\n\t * @param pipelineId - Optional. The ID of the pipeline of the nodes.\n\t * Defaults to the currently displayed pipeline.\n\t * @returns A object containing connected nodes and links\n\t */\n\thighlightDownstream(nodeIds, pipelineId) {\n\t\tconst highlightObjectIds = this.getDownstreamNodes(nodeIds, pipelineId);\n\t\tthis.setBranchHighlight(highlightObjectIds);\n\t\treturn highlightObjectIds;\n\t}\n\n\tisBranchHighlighted() {\n\t\treturn this.branchHighlighted;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Operational methods\n\t// ---------------------------------------------------------------------------\n\n\t// Returns a Boolean to indicate whether canvas logging is switched on or off.\n\tgetLoggingState() {\n\t\treturn Logger.getLoggingState();\n\t}\n\n\t// Sets canvas logging based on the Boolean passed in.\n\tsetLoggingState(state) {\n\t\tLogger.setLoggingState(state);\n\t}\n\n\tlog(msg) {\n\t\tconst logger = new Logger(\"Host App\");\n\t\tlogger.log(msg);\n\t}\n\n\taddAfterUpdateCallback(callback) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.canvasContents.addAfterUpdateCallback(callback);\n\t\t}\n\t}\n\n\tremoveAfterUpdateCallback(callback) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.canvasContents.removeAfterUpdateCallback(callback);\n\t\t}\n\t}\n\n\ttogglePalette() {\n\t\tthis.getObjectModel().togglePalette();\n\t}\n\n\topenPalette() {\n\t\tthis.getObjectModel().openPalette();\n\t}\n\n\tclosePalette() {\n\t\tthis.getObjectModel().closePalette();\n\t}\n\n\tisPaletteOpen() {\n\t\treturn this.getObjectModel().isPaletteOpen();\n\t}\n\n\tisBottomPanelOpen() {\n\t\treturn this.getObjectModel().isBottomPanelOpen();\n\t}\n\n\tsetBottomPanelHeight(ht) {\n\t\tthis.objectModel.setBottomPanelHeight(ht);\n\t}\n\n\tisLeftFlyoutOpen() {\n\t\treturn this.objectModel.isLeftFlyoutOpen();\n\t}\n\n\tsetRightFlyoutWidth(wd) {\n\t\tthis.objectModel.setRightFlyoutWidth(wd);\n\t}\n\n\tsetRightFlyoutMinWidth(wd) {\n\t\tthis.objectModel.setRightFlyoutMinWidth(wd);\n\t}\n\n\tisRightFlyoutOpen() {\n\t\treturn this.objectModel.isRightFlyoutOpen();\n\t}\n\n\tisTopPanelOpen() {\n\t\treturn this.getObjectModel().isTopPanelOpen();\n\t}\n\n\topenContextMenu(menuDef, source) {\n\t\tthis.objectModel.openContextMenu(menuDef, source);\n\t}\n\n\tcloseContextMenu() {\n\t\tthis.objectModel.closeContextMenu();\n\t\tthis.restoreFocus();\n\t}\n\n\tisContextMenuDisplayed() {\n\t\treturn this.objectModel.isContextMenuDisplayed();\n\t}\n\n\tgetContextMenuSource() {\n\t\treturn this.objectModel.getContextMenuSource();\n\t}\n\n\tcloseContextToolbar(cause = CAUSE_MOUSE) {\n\t\tif (cause === CAUSE_KEYBOARD) {\n\t\t\tthis.objectModel.closeContextMenu();\n\t\t\tthis.restoreFocus();\n\n\t\t} else if (!this.mouseInContextToolbar && !this.mouseInObject) {\n\t\t\tthis.objectModel.closeContextMenu();\n\t\t\tthis.restoreFocus();\n\t\t}\n\t}\n\n\t// Manages the flag that indicates whether the mouse cursor is over\n\t// the context toolbar or not. This flag is used for controlling the\n\t// display of the context toolbar.\n\tsetMouseInContextToolbar(state) {\n\t\tthis.mouseInContextToolbar = state;\n\t}\n\n\t// Manages the flag that indicates whether the mouse cursor is over\n\t// an object (node, comment or link) or not. This flag is used for\n\t// controlling the display of the context toolbar. 'id' is either the id\n\t// of the object the cursor is over, or null, if it is not over an object.\n\tsetMouseInObject(id) {\n\t\t// Close the context toolbar immediately if the mouse cursor moves\n\t\t// from one object to another.\n\t\tif (id && id !== this.mouseInObject) {\n\t\t\tthis.closeContextToolbar();\n\t\t}\n\t\tthis.mouseInObject = id;\n\t}\n\n\topenNotificationPanel() {\n\t\tthis.objectModel.openNotificationPanel();\n\t}\n\n\tcloseNotificationPanel() {\n\t\tthis.objectModel.closeNotificationPanel();\n\t}\n\n\ttoggleNotificationPanel() {\n\t\tthis.objectModel.toggleNotificationPanel();\n\t}\n\n\tisDisplayingFullPageSubFlow() {\n\t\tconst breadcrumbs = this.objectModel.getBreadcrumbs();\n\t\treturn breadcrumbs.length > 1;\n\t}\n\n\t// Displays a pipeline (identified by the pipelineId passed in). This must be\n\t// one of the pipelines referenced by the current set of breadcrumbs. It\n\t// cannot be used to open a new pipeline outside the current set of breadcrumbs.\n\tdisplaySubPipeline(pipelineId) {\n\t\tconst breadcrumbs = this.objectModel.getBreadcrumbs();\n\t\tconst index = breadcrumbs.findIndex((b) => b.pipelineId === pipelineId);\n\t\tif (index > -1) {\n\t\t\tconst supernode = this.getSupernodeFromBreadcrumb(breadcrumbs[index]);\n\n\t\t\tconst data = {\n\t\t\t\teditType: \"displaySubPipeline\",\n\t\t\t\teditSource: \"canvas\",\n\t\t\t\ttargetObject: supernode,\n\t\t\t\tbreadcrumbIndex: index\n\t\t\t};\n\t\t\tthis.editActionHandler(data);\n\t\t}\n\t}\n\n\t// Displays a pipeline for a supernode (identified by the supernodeId\n\t// parameter) in a parent pipeline (identified by the pipelineId parameter).\n\t// This parent pipeline should be the last of the current set of breadcrumbs.\n\t// That is, the pipeline currently shown \"full page\" in the canvas.\n\tdisplaySubPipelineForSupernode(supernodeId, pipelineId) {\n\t\tconst sn = this.getNode(supernodeId, pipelineId);\n\t\tif (sn && sn.type === SUPER_NODE) {\n\t\t\tconst currentBreadcrumb = this.objectModel.getCurrentBreadcrumb();\n\t\t\tconst bc = this.objectModel.createBreadcrumb(sn, currentBreadcrumb.pipelineId);\n\t\t\tthis.displaySubPipelineForBreadcrumbs([bc]);\n\t\t}\n\t}\n\n\t// Adds the breadcrumbs provided to the current set of breadcrumbs and then\n\t// displays \"full page\" the pipeline identified by the last of the additional\n\t// set of breadcrumbs. This is a convenience function for Common Canvas.\n\tdisplaySubPipelineForBreadcrumbs(addBreadcrumbs) {\n\t\tconst lastBreadcrumb = addBreadcrumbs[addBreadcrumbs.length - 1];\n\t\tconst supernode = this.getSupernodeFromBreadcrumb(lastBreadcrumb);\n\n\t\tconst data = {\n\t\t\teditType: \"displaySubPipeline\",\n\t\t\teditSource: \"canvas\",\n\t\t\ttargetObject: supernode,\n\t\t\taddBreadcrumbs: addBreadcrumbs\n\t\t};\n\t\tthis.editActionHandler(data);\n\t}\n\n\t// Returns the supernode specified in the breadcrumb provided.\n\tgetSupernodeFromBreadcrumb(breadcrumb) {\n\t\tif (breadcrumb.supernodeParentPipelineId) {\n\t\t\tconst apiPipeline = this.objectModel.getAPIPipeline(breadcrumb.supernodeParentPipelineId);\n\t\t\treturn apiPipeline.getNode(breadcrumb.supernodeId);\n\t\t}\n\t\t// breadcrumb.supernodeParentPipelineId might be missing when processing\n\t\t// the breadcrumb for the primary pipeline.\n\t\treturn null;\n\t}\n\n\tdisplayPreviousPipeline() {\n\t\tconst data = { editType: \"displayPreviousPipeline\", pipelineInfo: this.objectModel.getPreviousBreadcrumb(), editSource: \"canvas\" };\n\t\tthis.editActionHandler(data);\n\t}\n\n\tzoomIn() {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().zoomIn();\n\t\t}\n\t}\n\n\tzoomOut() {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().zoomOut();\n\t\t}\n\t}\n\n\tzoomToFit(animateTime) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().zoomToFit(animateTime);\n\t\t}\n\t}\n\n\t// Changes the zoom amounts for the canvas. This method does not alter the\n\t// pipelineFlow document. zoomObject is an object with three fields:\n\t// x: Is the horizontal translate amount which is a number indicating the\n\t// pixel amount to move. Negative left and positive right\n\t// y: Is the vertical translate amount which is a number indicating the\n\t// pixel amount to move. Negative up and positive down.\n\t// k: Is the scale amount which is a number greater than 0 where 1 is the\n\t// default scale size.\n\t// animateTime is a number of milliseconds that the animation should take.\n\t// It defaults to 500ms. Set to 0 for no animation.\n\tzoomTo(zoomObject, animateTime) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().zoomTo(zoomObject, animateTime);\n\t\t}\n\t}\n\n\t// Increments the translation of the canvas by the x and y increment\n\t// amounts. The optional animateTime parameter can be provided to animate the\n\t// movement of the canvas. It is a time for the animation in milliseconds.\n\t// If omitted the movement happens immediately.\n\ttranslateBy(x, y, animateTime) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().translateBy(x, y, animateTime);\n\t\t}\n\t}\n\n\t// Returns the current zoom object for the currently displayed canvas or null\n\t// if the canvas is not yet rendered for the first time.\n\tgetZoom() {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.getSVGCanvasD3().getZoom();\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns a zoom object required to pan the objects (nodes and/or comments)\n\t * identified by the objectIds array to 'reveal' the objects in the viewport.\n\t * The zoom object returned can be provided to the CanvasController.zoomTo()\n\t * method to perform the zoom/pan action.\n\t * If the xPos and yPos variables are provided it will return a zoom object\n\t * to pan the objects to a location specified by a percentage offset of the\n\t * viewport width and height respectively.\n\t * If the xPos and yPos parameters are undefined (omitted) and all the\n\t * objects are fully within the canvas viewport, it will return null.\n\t * This can be used to detect whether the objects are fully visible or not.\n\t * Otherwise it will return a zoom object which can be used to pan the\n\t * objects into the viewport so they appear at the nearest side of the\n\t * viewport to where they are currently positioned.\n\t * If the specified objects are so far apart that they cannot all fit into\n\t * the current viewport, at the current scale amount, a zoom object for a\n\t * zoom-to-fit operation will be returned regardless of the xPos and yPos\n\t * settings.\n\t *\n\t * @param objectIds - An array of nodes and/or comment IDs.\n\t * @param xPos - Optional. Can be set to percentage offset of the viewport width.\n\t * @param yPos - Optional. Can be set to percentage offset of the viewport height.\n\t * @returns a ZoomObject or null\n\t */\n\tgetZoomToReveal(objectIds, xPos, yPos) {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.getSVGCanvasD3().getZoomToReveal(objectIds, xPos, yPos);\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Clears any saved zoom values stored in local storage. This means\n\t// newly opened flows will appear with the default zoom. This method\n\t// is only applicable when the enableSaveZoom config parameter is\n\t// set to \"LocalStorage\".\n\tclearSavedZoomValues() {\n\t\tthis.objectModel.clearSavedZoomValues();\n\t}\n\n\tgetViewPortDimensions() {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.getSVGCanvasD3().getTransformedViewportDimensions();\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetCanvasDimensionsWithPadding() {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.getSVGCanvasD3().getCanvasDimensionsWithPadding();\n\t\t}\n\t\treturn null;\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Focus management methods\n\t// ---------------------------------------------------------------------------\n\n\t// Restores the focus highlighting to the last focused object before focus\n\t// was removed from the flow editor.\n\trestoreFocus() {\n\t\tthis.logger.log(\"restoreFocus - \" + CanvasUtils.getFocusName(this.focusObject));\n\n\t\tif (this.getSVGCanvasD3() && !this.getSVGCanvasD3().isEditingText()) {\n\t\t\tthis.setFocusObject(this.focusObject); // This will force a refresh of the focus\n\t\t}\n\t}\n\n\tfocusOnTextEntryElement(evt) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().focusOnTextEntryElement(evt);\n\t\t}\n\t}\n\n\t// Sets focus on the flow editor canvas background.\n\tsetFocusOnCanvas() {\n\t\tthis.setFocusObject(CANVAS_FOCUS, null, true);\n\t}\n\n\t// Returns the currently focused object or the string \"CanvasFocus\".\n\tgetFocusObject() {\n\t\treturn this.focusObject;\n\t}\n\n\t/** Sets the focus highlighting to the parameter passed in which can be\n\t * either a canvas object or the string \"CanvasFocus\".\n\t * @param focusObj - The Canvas object or the string \"CanvasFocus\" where the focus should be set\n\t * @param evt - The event object\n\t */\n\tsetFocusObject(focusObj, evt, force = false) {\n\t\tthis.logger.log(\"setFocusObject focusObject = \" + CanvasUtils.getFocusName(focusObj));\n\n\t\tthis.focusObject = focusObj;\n\n\t\tconst isActiveElementInCanvas = this.isTargetInsideCanvas(document.activeElement);\n\n\t\tif ((isActiveElementInCanvas || force) &&\n\t\t\t\tthis.focusObject && this.canvasContents) {\n\t\t\tif (this.focusObject === CANVAS_FOCUS) {\n\t\t\t\tthis.canvasContents.focusOnCanvas();\n\n\t\t\t} else {\n\t\t\t\t// The D3 rendering object may not exist for some sophisticated\n\t\t\t\t// refresh scenarios, so check its existence first.\n\t\t\t\t/* eslint no-lonely-if: \"off\" */\n\t\t\t\tif (this.getSVGCanvasD3()) {\n\t\t\t\t\tthis.getSVGCanvasD3().moveFocusTo(focusObj, evt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Returns true of the target passed in is either the canvas div or an\n\t// element inside the canvas div.\n\tisTargetInsideCanvas(target) {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.canvasContents.isTargetInsideCanvas(target);\n\t\t}\n\t\treturn false;\n\t}\n\n\n\t// Returns true of the focus in currently on the flow editor canvas background.\n\tisFocusOnCanvas() {\n\t\tif (this.canvasContents) {\n\t\t\treturn this.canvasContents.isFocusOnCanvas();\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Checks to see if the current focus object is selected. If it is not selected\n\t// this method auto-selects that object and ensures that the action function\n\t// passed in (actionFn) is run immediately after the selection has run. If the\n\t// current focus object is already selected and enableDragWithoutSelect is\n\t// false or the 'always' parameter is true it just runs the action function.\n\t// If augment is set to true the focus object will be added to the set of\n\t// selected objects instead of replacing the current selections.\n\tautoSelectFocusObj(actionFn, augment, always) {\n\t\tconst focusObj = this.getFocusObject();\n\t\tif (focusObj && focusObj !== CANVAS_FOCUS &&\n\t\t\t\t(always || !this.getCanvasConfig().enableDragWithoutSelect)) {\n\t\t\tconst pipelineId = this.getCurrentPipelineId();\n\t\t\tif (!this.isFocusOnCanvas() && !this.isSelected(focusObj.id, pipelineId)) {\n\t\t\t\tconst fn = () => {\n\t\t\t\t\tactionFn();\n\t\t\t\t\tthis.removeAfterUpdateCallback(fn);\n\t\t\t\t};\n\t\t\t\tthis.addAfterUpdateCallback(fn);\n\t\t\t\tthis.selectObjectWithClick(focusObj, SINGLE_CLICK, pipelineId, false, augment);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tactionFn();\n\t}\n\n\t/** Sets focus on the next sub-object in the object provided.\n\t * @param parentObj - The Canvas object where the sub-object exists.\n\t * @param evt - The event object.\n\t */\n\tsetFocusNextSubObject(parentObj, evt) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setFocusNextSubObject(parentObj, evt);\n\t\t}\n\t}\n\n\t/** Sets focus on the previous sub-object in the object provided.\n\t * @param parentObj - The Canvas object where the sub-object exists.\n\t * @param evt - The event object.\n\t */\n\tsetFocusPreviousSubObject(parentObj, evt) {\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().setFocusPreviousSubObject(parentObj, evt);\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------\n\t// Utility/helper methods\n\t// ---------------------------------------------------------------------------\n\n\tgetGhostNode(nodeTemplate) {\n\t\tif (this.canvasContents) {\n\t\t\tlet node = this.convertNodeTemplate(nodeTemplate);\n\t\t\tnode = this.objectModel.setNodeAttributes(node);\n\t\t\treturn this.getSVGCanvasD3().getGhostNode(node);\n\t\t}\n\t\treturn null;\n\t}\n\n\tnodeTemplateDragStart(nodeTemplate) {\n\t\tCanvasController.dragNodeTemplate = nodeTemplate;\n\n\t\tif (this.canvasContents) {\n\t\t\tthis.getSVGCanvasD3().nodeTemplateDragStart(CanvasController.dragNodeTemplate);\n\t\t}\n\t}\n\n\tnodeTemplateDragEnd() {\n\t\tif (this.canvasContents && CanvasController.dragNodeTemplate) {\n\t\t\tthis.getSVGCanvasD3().nodeTemplateDragEnd(CanvasController.dragNodeTemplate);\n\t\t}\n\t\tCanvasController.dragNodeTemplate = null;\n\t}\n\n\tgetDragNodeTemplate() {\n\t\treturn CanvasController.dragNodeTemplate;\n\t}\n\n\t// Cuts the currently selected objects to the internal clipboard.\n\tcutToClipboard() {\n\t\tthis.editActionHandler({\n\t\t\teditType: \"cut\",\n\t\t\teditSource: \"api\"\n\t\t});\n\t}\n\n\t// Copies the currently selected objects to the internal clipboard.\n\tcopyToClipboard() {\n\t\tthis.editActionHandler({\n\t\t\teditType: \"copy\",\n\t\t\teditSource: \"api\"\n\t\t});\n\t}\n\n\tpasteFromClipboard(pipelineId) {\n\t\tthis.editActionHandler({\n\t\t\teditType: \"paste\",\n\t\t\teditSource: \"api\",\n\t\t\tpipelineId: pipelineId\n\t\t});\n\t}\n\n\tisClipboardEmpty() {\n\t\treturn this.objectModel.isClipboardEmpty();\n\t}\n\n\tcanPaste() {\n\t\treturn !this.isClipboardEmpty();\n\t}\n\n\tcanCutCopy() {\n\t\tif (this.getSelectedObjectIds().length > 0) {\n\t\t\tif (this.areAllSelectedObjectsLinks() &&\n\t\t\t\t\t!this.areDetachableLinksInUse()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tcanDelete() {\n\t\treturn this.getSelectedObjectIds().length > 0;\n\t}\n\n\tcanZoomIn() {\n\t\tif (this.isPrimaryPipelineEmpty()) {\n\t\t\treturn false;\n\n\t\t} else if (this.getSVGCanvasD3()) {\n\t\t\treturn !this.getSVGCanvasD3().isZoomedToMax();\n\t\t}\n\t\treturn true;\n\t}\n\n\tcanZoomOut() {\n\t\tif (this.isPrimaryPipelineEmpty()) {\n\t\t\treturn false;\n\n\t\t} else if (this.getSVGCanvasD3()) {\n\t\t\treturn !this.getSVGCanvasD3().isZoomedToMin();\n\t\t}\n\t\treturn true;\n\t}\n\n\tcanZoomToFit() {\n\t\tif (this.isPrimaryPipelineEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Returns the saved zoom either from what is in local storage or in the\n\t// pipeline flow (based on the enableSaveZoom config parameter) or null,\n\t// if there is no saved zoom.\n\tgetSavedZoom(pipelineId) {\n\t\treturn this.objectModel.getSavedZoom(pipelineId);\n\t}\n\n\topenTip(tipConfig) {\n\t\tif (!this.isTipOpen() && this.isTipEnabled(tipConfig.type)) {\n\t\t\tif (this.handlers.tipHandler) {\n\t\t\t\tconst data = {};\n\t\t\t\t// Copy only required fields from tipConfig to data object - ignore other fields in tipConfig\n\t\t\t\tswitch (tipConfig.type) {\n\t\t\t\tcase constants.TIP_TYPE_PALETTE_ITEM:\n\t\t\t\t\tdata.nodeTemplate = tipConfig.nodeTemplate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_PALETTE_CATEGORY:\n\t\t\t\t\tdata.category = tipConfig.category;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_NODE:\n\t\t\t\t\tdata.pipelineId = tipConfig.pipelineId;\n\t\t\t\t\tdata.node = tipConfig.node;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_PORT:\n\t\t\t\t\tdata.pipelineId = tipConfig.pipelineId;\n\t\t\t\t\tdata.node = tipConfig.node;\n\t\t\t\t\tdata.port = tipConfig.port;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_DEC:\n\t\t\t\t\tdata.pipelineId = tipConfig.pipelineId;\n\t\t\t\t\tdata.decoration = tipConfig.decoration;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_LINK:\n\t\t\t\t\tdata.pipelineId = tipConfig.pipelineId;\n\t\t\t\t\tdata.link = tipConfig.link;\n\t\t\t\t\tbreak;\n\t\t\t\tcase constants.TIP_TYPE_STATE_TAG:\n\t\t\t\t\tdata.stateTagText = tipConfig.stateTagText;\n\t\t\t\t\tdata.stateTagType = tipConfig.stateTagType;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t}\n\n\t\t\t\ttipConfig.customContent = this.handlers.tipHandler(tipConfig.type, data);\n\t\t\t}\n\n\t\t\tconst that = this;\n\t\t\tif (this.pendingTooltip) {\n\t\t\t\tclearTimeout(this.pendingTooltip);\n\t\t\t}\n\n\t\t\tthis.pendingTooltip = setTimeout(function() {\n\t\t\t\tthat.objectModel.setTooltipDef(tipConfig);\n\t\t\t}, tipConfig.delay ? tipConfig.delay : 200);\n\t\t}\n\t}\n\n\tcloseTip() {\n\t\tif (this.pendingTooltip) {\n\t\t\tclearTimeout(this.pendingTooltip);\n\t\t}\n\t\tif (this.isTipOpen()) {\n\t\t\tthis.objectModel.setTooltipDef({});\n\t\t}\n\t}\n\n\tisTipOpen() {\n\t\treturn this.objectModel.isTooltipOpen();\n\t}\n\n\t// Returns the ID of the current tooltip or null if no tip\n\t// is currently displayed.\n\tgetTipId() {\n\t\tconst t = this.objectModel.getTooltip();\n\t\treturn t ? t.id : null;\n\t}\n\n\tisTipEnabled(tipType) {\n\t\tconst canvasConfig = this.getCanvasConfig();\n\t\tswitch (tipType) {\n\t\tcase constants.TIP_TYPE_PALETTE_CATEGORY:\n\t\t\treturn canvasConfig.tipConfig.palette === true || get(canvasConfig, \"tipConfig.palette.categories\", false);\n\t\tcase constants.TIP_TYPE_PALETTE_ITEM:\n\t\t\treturn canvasConfig.tipConfig.palette === true || get(canvasConfig, \"tipConfig.palette.nodeTemplates\", false);\n\t\tcase constants.TIP_TYPE_NODE:\n\t\t\treturn canvasConfig.tipConfig.nodes;\n\t\tcase constants.TIP_TYPE_PORT:\n\t\t\treturn canvasConfig.tipConfig.ports;\n\t\tcase constants.TIP_TYPE_DEC:\n\t\t\treturn canvasConfig.tipConfig.decorations;\n\t\tcase constants.TIP_TYPE_LINK:\n\t\t\treturn canvasConfig.tipConfig.links;\n\t\tcase constants.TIP_TYPE_STATE_TAG:\n\t\t\treturn canvasConfig.tipConfig.stateTag;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}\n\n\topenTextToolbar(xPos, yPos, formats, contentType, actionHandler, blurHandler) {\n\t\tthis.objectModel.setTextToolbarDef({ isOpen: true, pos_x: xPos, pos_y: yPos, formats, contentType, actionHandler, blurHandler });\n\t}\n\n\tcloseTextToolbar() {\n\t\tthis.objectModel.setTextToolbarDef({ isOpen: false });\n\t}\n\n\tmoveTextToolbar(xPos, yPos) {\n\t\tthis.objectModel.setTextToolbarDef({ pos_x: xPos, pos_y: yPos });\n\t}\n\n\tupdateTextToolbarFormats(formats) {\n\t\tthis.objectModel.setTextToolbarDef({ formats: cloneDeep(formats) }); // Clone to force mapToState refresh.\n\t}\n\n\t// Processes the drop of an 'external' object, either from the desktop or\n\t// elsewhere on the browser page, onto the canvas.\n\t// dropData - The data describing the object being dropped\n\t// transPos - mouse position transformed for canvas coordinates\n\t// pipelineId - the ID of the pipeline onto which the object is being dropped\n\tcreateDroppedExternalObject(dropData, transPos, pipelineId) {\n\t\tif (dropData) {\n\t\t\tif (dropData.operation === \"createFromObject\") {\n\t\t\t\tthis.createNodeFromObjectAt(dropData.sourceId, dropData.sourceObjectTypeId, dropData.label, transPos.x, transPos.y, pipelineId);\n\n\t\t\t} else {\n\t\t\t\tthis.createNodeFromDataAt(transPos.x, transPos.y, dropData, pipelineId);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Automatically adds a node (nodeTemplate) to the canvas. The nodeTemplate\n\t// must be in the internal format. If addLink is true a link will be created\n\t// between the new node and the node it is positioned next to.\n\tcreateAutoNode(nodeTemplate, addLink = true) {\n\t\tconst selApiPipeline = this.objectModel.getSelectionAPIPipeline();\n\t\tconst apiPipeline = selApiPipeline ? selApiPipeline : this.objectModel.getAPIPipeline();\n\t\tvar data = {\n\t\t\teditType: \"createAutoNode\",\n\t\t\teditSource: \"canvas\",\n\t\t\taddLink: addLink,\n\t\t\tnodeTemplate: nodeTemplate,\n\t\t\tpipelineId: apiPipeline.pipelineId\n\t\t};\n\n\t\tthis.editActionHandler(data);\n\t}\n\n\t// Called when a node is dragged from the palette onto the canvas. The\n\t// nodeTemplate is in the internal format.\n\tcreateNodeFromTemplateAt(nodeTemplate, pos, pipelineId) {\n\t\tvar data = {\n\t\t\teditType: \"createNode\",\n\t\t\teditSource: \"canvas\",\n\t\t\tnodeTemplate: nodeTemplate,\n\t\t\toffsetX: pos.x,\n\t\t\toffsetY: pos.y,\n\t\t\tpipelineId: pipelineId\n\t\t};\n\n\t\tthis.editActionHandler(data);\n\t}\n\n\t// Called when a node is dragged from the palette onto the canvas and dropped\n\t// onto an existing link between two data nodes. The nodeTemplate\n\t// is in the internal format.\n\tcreateNodeFromTemplateOnLinkAt(nodeTemplate, link, pos, pipelineId) {\n\t\tif (this.canNewNodeBeDroppedOnLink(nodeTemplate)) {\n\t\t\tvar data = {\n\t\t\t\teditType: \"createNodeOnLink\",\n\t\t\t\teditSource: \"canvas\",\n\t\t\t\tnodeTemplate: nodeTemplate,\n\t\t\t\toffsetX: pos.x,\n\t\t\t\toffsetY: pos.y,\n\t\t\t\tlink: link,\n\t\t\t\tpipelineId: pipelineId\n\t\t\t};\n\n\t\t\tthis.editActionHandler(data);\n\t\t}\n\t}\n\n\t// Called when a node is dragged from the palette onto the canvas and dropped\n\t// onto one or more semi-detached or fully-detached links. The nodeTemplate\n\t// is in the internal format.\n\tcreateNodeFromTemplateAttachLinks(nodeTemplate, detachedLinks, pos, pipelineId) {\n\t\tif (detachedLinks &&\n\t\t\t\tthis.canNewNodeBeAttachedToLinks(nodeTemplate)) {\n\t\t\tvar data = {\n\t\t\t\teditType: \"createNodeAttachLinks\",\n\t\t\t\teditSource: \"canvas\",\n\t\t\t\tnodeTemplate: nodeTemplate,\n\t\t\t\toffsetX: pos.x,\n\t\t\t\toffsetY: pos.y,\n\t\t\t\tdetachedLinks: detachedLinks,\n\t\t\t\tpipelineId: pipelineId\n\t\t\t};\n\n\t\t\tthis.editActionHandler(data);\n\t\t}\n\t}\n\n\t// Called when a node is dragged from the 'output' window (in WML) onto the canvas\n\tcreateNodeFromObjectAt(sourceId, sourceObjectTypeId, label, x, y, pipelineId) {\n\t\tvar data = {\n\t\t\teditType: \"createNode\",\n\t\t\teditSource: \"canvas\",\n\t\t\tlabel: label, // label will be passed through to the external object model\n\t\t\toffsetX: x,\n\t\t\toffsetY: y,\n\t\t\tsourceObjectId: sourceId,\n\t\t\tsourceObjectTypeId: sourceObjectTypeId,\n\t\t\tpipelineId: pipelineId\n\t\t};\n\n\t\tthis.editActionHandler(data);\n\t}\n\n\t// Called when a data object is dragged from outside Common Canvas.\n\t// The data object must contain the 'action' field that is passed to\n\t// the host app from editActionHandler. The editActionHandler method\n\t// does not intercept this action.\n\tcreateNodeFromDataAt(x, y, dropData, pipelineId) {\n\t\tif (dropData?.data) {\n\t\t\tconst data = dropData.data;\n\t\t\tdata.offsetX = x;\n\t\t\tdata.offsetY = y;\n\t\t\tdata.pipelineId = pipelineId;\n\t\t\tdata.editSource = \"canvas\";\n\n\t\t\tthis.editActionHandler(data);\n\t\t}\n\t}\n\n\tcanNewNodeBeDroppedOnLink(nodeType) {\n\t\tif (nodeType.inputs && nodeType.inputs.length > 0 &&\n\t\t\t\tnodeType.outputs && nodeType.outputs.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tcanNewNodeBeAttachedToLinks(nodeType) {\n\t\tif (nodeType.inputs && nodeType.inputs.length > 0 ||\n\t\t\t\tnodeType.outputs && nodeType.outputs.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Returns true if the context toolbar is switched on and the node over which\n\t// the mouse cursor is hovering is NOT in the list of selected objects.\n\tisContextToolbarForNonSelectedObj(source) {\n\t\tif (this.getCanvasConfig().enableContextToolbar) {\n\t\t\tif (source.targetObject) {\n\t\t\t\treturn !source.selectedObjectIds.includes(source.targetObject.id);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tcontextMenuHandler(source) {\n\t\tconst menuDefinition = getContextMenuDefinition(source, this);\n\n\t\t// Open the context menu if we still have one!\n\t\tif (menuDefinition && menuDefinition.length > 0) {\n\t\t\tthis.openContextMenu(menuDefinition, source);\n\t\t}\n\t}\n\n\tcontextMenuActionHandler(action, evt, editParam) {\n\t\tconst source = this.getContextMenuSource();\n\n\t\tthis.logger.log(\"contextMenuActionHandler - action: \" + action);\n\t\tthis.logger.log(source);\n\n\t\tthis.closeContextMenu();\n\t\tif (this.getCanvasConfig().enableContextToolbar &&\n\t\t\t\tthis.isContextToolbarForNonSelectedObj(source)) {\n\t\t\tthis.setSelections([source.targetObject.id]);\n\t\t}\n\n\t\tconst data = Object.assign({}, source, { \"editType\": action, \"editParam\": editParam, \"editSource\": \"contextmenu\" });\n\t\tthis.editActionHandler(data);\n\t}\n\n\ttextActionHandler(action, editSource, source) {\n\t\tconst data = Object.assign({}, source, { \"editType\": action, editSource });\n\t\tthis.editActionHandler(data);\n\t}\n\n\ttoolbarActionHandler(action) {\n\t\tthis.logger.log(\"toolbarActionHandler - action: \" + action);\n\t\tthis.editActionHandler({\n\t\t\teditType: action,\n\t\t\teditSource: \"toolbar\",\n\t\t\tpipelineId: this.objectModel.getSelectedPipelineId()\n\t\t});\n\t}\n\n\tkeyboardActionHandler(action, mousePos) {\n\t\tthis.logger.log(\"keyboardActionHandler - action: \" + action);\n\n\t\tthis.editActionHandler({\n\t\t\teditType: action,\n\t\t\teditSource: \"keyboard\",\n\t\t\tpipelineId: this.objectModel.getSelectedPipelineId(),\n\t\t\tmousePos: mousePos\n\t\t});\n\t}\n\n\tclickActionHandler(source) {\n\t\tthis.logger.log(\"clickActionHandler - \" + source.clickType + \" on \" + source.objectType);\n\t\tif (this.handlers.clickActionHandler) {\n\t\t\tthis.handlers.clickActionHandler(source);\n\t\t}\n\t}\n\n\tdecorationActionHandler(node, id, pipelineId) {\n\t\tthis.logger.log(\"decorationActionHandler - node: \" + node.id + \" id: \" + id);\n\t\tif (this.handlers.decorationActionHandler) {\n\t\t\tthis.handlers.decorationActionHandler(node, id, pipelineId);\n\t\t}\n\t}\n\n\t// Performs edit actions, based on the cmndData passed in, to the object\n\t// model which result in changes to the displayed canvas. Returns true if\n\t// the action completes successfully and false if it does not complete,\n\t// for example, if the host application cancels the action by returning\n\t// false from the beforeEditActionHandler.\n\teditActionHandler(cmndData) {\n\t\tthis.logger.log(\"editActionHandler - \" + cmndData.editType);\n\t\tthis.logger.log(cmndData);\n\t\tlet data = CanvasUtils.removeNullProperties(cmndData);\n\t\tdata.selectedObjectIds = this.getSelectedObjectIds();\n\t\tdata.selectedObjects = this.getSelectedObjects();\n\t\tdata.pipelineId = data.pipelineId || this.getCurrentPipelineId();\n\n\t\t// Generate a dummy external URL when an external sub-flow is being\n\t\t// created.\n\t\tif (data.editType === \"createSuperNodeExternal\" ||\n\t\t\t\tdata.editType === \"convertSuperNodeLocalToExternal\") {\n\t\t\tdata.externalUrl = \"\";\n\t\t\tdata.externalPipelineFlowId = \"\";\n\n\t\t// Pre-process for handling external pipeline flows.\n\t\t} else if (data.editType === \"loadPipelineFlow\" ||\n\t\t\t\tdata.editType === \"expandSuperNodeInPlace\" ||\n\t\t\t\tdata.editType === \"displaySubPipeline\" ||\n\t\t\t\tdata.editType === \"deconstructSuperNode\" ||\n\t\t\t\tdata.editType === \"convertSuperNodeExternalToLocal\") {\n\t\t\tdata = this.preProcessForExternalPipelines(data);\n\n\t\t} else if (data.editType === \"paste\") {\n\t\t\tconst pasteObjects = this.objectModel.getObjectsToPaste();\n\t\t\tif (pasteObjects) {\n\t\t\t\tdata.objects = pasteObjects;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check with host application if it wants to proceed with the command\n\t\t// and also let the application modify the command input data if required.\n\t\tif (this.handlers.beforeEditActionHandler) {\n\t\t\tlet cmnd = null;\n\t\t\tif (data.editType === \"undo\") {\n\t\t\t\tcmnd = this.getCommandStack().getUndoCommand();\n\t\t\t} else if (data.editType === \"redo\") {\n\t\t\t\tcmnd = this.getCommandStack().getRedoCommand();\n\t\t\t}\n\t\t\tdata = this.handlers.beforeEditActionHandler(data, cmnd);\n\t\t\t// If the host app returns null, it doesn't want the action to proceed.\n\t\t\tif (!data) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// If an external pipeline flow was requested, we need to make sure it\n\t\t\t// was provided by the host app. We can't proceed if it was not.\n\t\t\tif (!this.wasExtPipelineFlowLoadSuccessful(data)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Now preprocessing is complete, execute the action itself.\n\t\treturn this.editAction(data);\n\t}\n\n\t// Performs the edit action using the 'data' parameter, which contains the\n\t// appropriate action parameters, without executing any of the preprocessing\n\t// or the beforeEditActionHandler callback. This is useful for applications\n\t// that need to do asynchronous activity in their beforeEditActionHandler code.\n\t// Those applications should call this method to execute the command, after\n\t// their asynchronous activity has ended, instead of the editActionHandler\n\t// method otherwise the host app's beforeEdtActionHandler callback will be\n\t// called a second time.\n\teditAction(cmndData) {\n\t\tlet data = cmndData;\n\n\t\t// Only execute the delete or cut if there are some selections.\n\t\t// This prevents an 'empty' command being added to the command stack when\n\t\t// 'delete' or 'cut' is pressed on the keyboard.\n\t\tif ((data.editType === \"deleteSelectedObjects\" ||\n\t\t\t\tdata.editType === \"cut\") &&\n\t\t\t\tdata.selectedObjectIds.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// These commands are supported for the external AND internal object models.\n\t\tswitch (data.editType) {\n\t\tcase \"selectAll\": {\n\t\t\tthis.selectAll(data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"deselectAll\": {\n\t\t\tthis.deselectAll(data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"zoomIn\": {\n\t\t\tthis.zoomIn();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"zoomOut\": {\n\t\t\tthis.zoomOut();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"zoomToFit\": {\n\t\t\tthis.zoomToFit();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"commentsToggle\": {\n\t\t\tthis.toggleComments();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"commentsHide\": {\n\t\t\tthis.hideComments();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"commentsShow\": {\n\t\t\tthis.showComments();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"setCommentEditingMode\": {\n\t\t\tthis.setCommentEditingMode(data.id, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"setNodeLabelEditingMode\": {\n\t\t\tthis.setNodeLabelEditingMode(data.id, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"setNodeDecorationLabelEditingMode\": {\n\t\t\tthis.setNodeDecorationLabelEditingMode(data.decId, data.id, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"setLinkDecorationLabelEditingMode\": {\n\t\t\tthis.setLinkDecorationLabelEditingMode(data.decId, data.id, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"setZoom\": {\n\t\t\tthis.objectModel.setZoom(data.zoom, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"togglePalette\": {\n\t\t\tthis.togglePalette();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"openPalette\": {\n\t\t\tthis.openPalette();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"closePalette\": {\n\t\t\tthis.closePalette();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"toggleNotificationPanel\": {\n\t\t\tthis.toggleNotificationPanel();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"openNotificationPanel\": {\n\t\t\tthis.openNotificationPanel();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"closeNotificationPanel\": {\n\t\t\tthis.closeNotificationPanel();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"loadPipelineFlow\": {\n\t\t\tthis.objectModel.ensurePipelineIsLoaded(data);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"connectFromPort\": {\n\t\t\tthis.setPortConnectFrom(data.id, data.port.id, data.pipelineId);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"connectToPort\": {\n\t\t\tconst connectFromInfo = this.getConnectFromInfo(data.pipelineId);\n\t\t\tif (connectFromInfo) {\n\t\t\t\tconst srcNode = connectFromInfo.node;\n\t\t\t\tconst trgNode = this.getNode(data.id, data.pipelineId);\n\n\t\t\t\tif (srcNode && trgNode) {\n\t\t\t\t\t// Get the SVG canvas D3 object which has the renderer\n\t\t\t\t\tconst svgCanvasD3 = this.getSVGCanvasD3();\n\t\t\t\t\t// Use dragNewLinkUtils to create the link\n\t\t\t\t\t// This handles all validation and link replacement logic\n\t\t\t\t\tsvgCanvasD3?.renderer?.dragNewLinkUtils?.createNewNodeLink(\n\t\t\t\t\t\tsrcNode,\n\t\t\t\t\t\tconnectFromInfo.portId,\n\t\t\t\t\t\ttrgNode,\n\t\t\t\t\t\tdata.port.id\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t}\n\n\t\t// These commands are added to the command stack\n\t\tlet command = null;\n\n\t\tif (this.getCanvasConfig().enableInternalObjectModel) {\n\t\t\tswitch (data.editType) {\n\t\t\tcase \"createNode\": {\n\t\t\t\tcommand = new CreateNodeAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createNodeOnLink\": {\n\t\t\t\tcommand = new CreateNodeOnLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createNodeAttachLinks\": {\n\t\t\t\tcommand = new CreateNodeAttachLinksAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createAutoNode\": {\n\t\t\t\tcommand = new CreateAutoNodeAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tthis.panToReveal(data);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createComment\": {\n\t\t\t\tdata.pos = data.mousePos;\n\t\t\t\tcommand = new CreateCommentAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createWYSIWYGComment\": {\n\t\t\t\tdata.pos = data.mousePos;\n\t\t\t\tdata.contentType = WYSIWYG;\n\t\t\t\tdata.formats = [];\n\t\t\t\tcommand = new CreateCommentAction(data, this);\n\t\t\t\tdata = command.getData();\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createAutoComment\": {\n\t\t\t\tdata.pos = this.getNewCommentPosition(data.pipelineId);\n\t\t\t\tcommand = new CreateCommentAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createAutoWYSIWYGComment\": {\n\t\t\t\tdata.pos = this.getNewCommentPosition(data.pipelineId);\n\t\t\t\tdata.contentType = WYSIWYG;\n\t\t\t\tdata.formats = [];\n\t\t\t\tcommand = new CreateCommentAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"insertNodeIntoLink\": {\n\t\t\t\tcommand = new InsertNodeIntoLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"attachNodeToLinks\": {\n\t\t\t\tcommand = new AttachNodeToLinksAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"moveObjects\": {\n\t\t\t\tcommand = new MoveObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"resizeObjects\": {\n\t\t\t\tcommand = new SizeAndPositionObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"setObjectsStyle\": {\n\t\t\t\tcommand = new SetObjectsStyleAction(data);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"setLinksStyle\": {\n\t\t\t\tcommand = new SetLinksStyleAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"updateLink\": {\n\t\t\t\tcommand = new UpdateLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"setNodeLabel\": {\n\t\t\t\tcommand = new SetNodeLabelAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"editComment\": {\n\t\t\t\tcommand = new EditCommentAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"editDecorationLabel\": {\n\t\t\t\tcommand = new EditDecorationLabelAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"linkNodes\": {\n\t\t\t\tcommand = new CreateNodeLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"linkNodesAndReplace\": {\n\t\t\t\tcommand = new CreateNodeLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"linkComment\": {\n\t\t\t\tcommand = new CreateCommentLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createDetachedLink\": {\n\t\t\t\tcommand = new CreateNodeLinkDetachedAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"colorSelectedObjects\": {\n\t\t\t\tcommand = new ColorSelectedObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"deleteSelectedObjects\": {\n\t\t\t\tcommand = new DeleteObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"displaySubPipeline\": {\n\t\t\t\tcommand = new DisplaySubPipelineAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"displayPreviousPipeline\": {\n\t\t\t\tcommand = new DisplayPreviousPipelineAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"arrangeHorizontally\": {\n\t\t\t\tdata.layoutDirection = constants.HORIZONTAL;\n\t\t\t\tcommand = new ArrangeLayoutAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"arrangeVertically\": {\n\t\t\t\tdata.layoutDirection = constants.VERTICAL;\n\t\t\t\tcommand = new ArrangeLayoutAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"createSuperNode\":\n\t\t\tcase \"createSuperNodeExternal\": {\n\t\t\t\tcommand = new CreateSuperNodeAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"deconstructSuperNode\": {\n\t\t\t\tcommand = new DeconstructSuperNodeAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"expandSuperNodeInPlace\": {\n\t\t\t\tcommand = new ExpandSuperNodeInPlaceAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"collapseSuperNodeInPlace\": {\n\t\t\t\tcommand = new CollapseSuperNodeInPlaceAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"convertSuperNodeExternalToLocal\": {\n\t\t\t\tcommand = new ConvertSuperNodeExternalToLocal(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"convertSuperNodeLocalToExternal\": {\n\t\t\t\tcommand = new ConvertSuperNodeLocalToExternal(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"deleteLink\": {\n\t\t\t\tcommand = new DeleteLinkAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"disconnectNode\": {\n\t\t\t\tcommand = new DisconnectObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"saveToPalette\": {\n\t\t\t\tcommand = new SaveToPaletteAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"cut\": {\n\t\t\t\tthis.objectModel.copyToClipboard(this.areDetachableLinksInUse());\n\t\t\t\tcommand = new DeleteObjectsAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"copy\": {\n\t\t\t\tthis.objectModel.copyToClipboard(this.areDetachableLinksInUse());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"paste\": {\n\t\t\t\tcommand = new PasteAction(data, this);\n\t\t\t\tthis.commandStack.do(command);\n\t\t\t\tdata = command.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"undo\": {\n\t\t\t\tcommand = this.getCommandStack().getUndoCommand();\n\t\t\t\tthis.commandStack.undo();\n\t\t\t\tthis.objectModel.refreshToolbar();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"redo\": {\n\t\t\t\tcommand = this.getCommandStack().getRedoCommand();\n\t\t\t\tthis.commandStack.redo();\n\t\t\t\tthis.objectModel.refreshToolbar();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Commands which are not added to the command stack.\n\t\t\tcase \"highlightBranch\":\n\t\t\t\tdata.highlightedObjectIds = this.highlightBranch(this.objectModel.getSelectedNodesIds(), data.pipelineId);\n\t\t\t\tbreak;\n\t\t\tcase \"highlightDownstream\":\n\t\t\t\tdata.highlightedObjectIds = this.highlightDownstream(this.objectModel.getSelectedNodesIds(), data.pipelineId);\n\t\t\t\tbreak;\n\t\t\tcase \"highlightUpstream\":\n\t\t\t\tdata.highlightedObjectIds = this.highlightUpstream(this.objectModel.getSelectedNodesIds(), data.pipelineId);\n\t\t\t\tbreak;\n\t\t\tcase \"unhighlight\":\n\t\t\t\tthis.unsetAllBranchHighlight();\n\t\t\t\tthis.branchHighlighted = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\n\t\tif (this.handlers.editActionHandler) {\n\t\t\tthis.handlers.editActionHandler(data, command);\n\t\t}\n\n\t\t// After executing the 'loadPipelineFlow' and 'expandSuperNodeInPlace'\n\t\t// actions we need to check to see if there are any more expanded\n\t\t// supernodes that refer to external pipelines. These need to be loaded\n\t\t// for the pipeline to display correctly. If there is more than one expanded\n\t\t// pipeline visible they will be loaded one by one when this check is\n\t\t// encountered.\n\t\tthis.ensureVisibleExpandedPipelinesAreLoaded();\n\n\t\t// Set the keyboard focus appropriately for each command that has\n\t\t// a getFocusObject method. In other cases, the focus will remain\n\t\t// in its current location.\n\t\tif (this.getCanvasConfig().enableKeyboardNavigation) {\n\t\t\tif (data.editSource !== \"toolbar\" &&\n\t\t\t\tcommand?.getFocusObject) { // Only commands extended from Action will have a getFocusObject function.\n\t\t\t\tconst focusObject = command.getFocusObject();\n\n\t\t\t\tthis.logger.log(\"Focus object from \" + data.editType + \" command = \" + CanvasUtils.getFocusName(focusObject));\n\n\t\t\t\tif (focusObject) {\n\t\t\t\t\tif (focusObject === CANVAS_FOCUS) {\n\t\t\t\t\t\tthis.setFocusOnCanvas();\n\n\t\t\t\t\t} else if (this.canvasContents) {\n\t\t\t\t\t\tthis.setFocusObject(focusObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// When keyboard navigation is NOT activated we restore focus (which will\n\t\t// put focus on the canvas background) except in these cases.\n\t\t} else if (data.editType !== \"setCommentEditingMode\" &&\n\t\t\t\t\tdata.editType !== \"setNodeLabelEditingMode\" &&\n\t\t\t\t\tdata.editType !== \"setNodeDecorationLabelEditingMode\" &&\n\t\t\t\t\tdata.editType !== \"setLinkDecorationLabelEditingMode\" &&\n\t\t\t\t\tdata.editType !== \"togglePalette\" &&\n\t\t\t\t\tdata.editType !== \"openPalette\" &&\n\t\t\t\t\tdata.editType !== \"closePalette\" &&\n\t\t\t\t\tdata.editType !== \"toggleNotificationPanel\" &&\n\t\t\t\t\tdata.editType !== \"openNotificationPanel\" &&\n\t\t\t\t\tdata.editType !== \"closeNotificationPanel\" &&\n\t\t\t\t\tdata.editType !== \"loadPipelineFlow\") {\n\t\t\tthis.restoreFocus();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t// Sets the appropriate values when handling an external pipeline flow\n\t// when performing sub-flow actions.\n\tpreProcessForExternalPipelines(data) {\n\t\tdata.externalPipelineFlowLoad = false;\n\n\t\t// targetObject might be missing if we are handing display of the\n\t\t// primary pipeline which will always be 'local' not 'external'.\n\t\tif (data.targetObject) {\n\t\t\tconst externalPipelineFlowUrl = get(data, \"targetObject.subflow_ref.url\");\n\n\t\t\t// If there is a URL then we must be accessing an external pipeline flow.\n\t\t\tif (externalPipelineFlowUrl) {\n\t\t\t\tdata.externalUrl = externalPipelineFlowUrl;\n\n\t\t\t\t// Try to retrieve the pipeline from our store. If it is not there then\n\t\t\t\t// we'll need to load it from the host application so switch load flag on.\n\t\t\t\tdata.externalPipelineFlow = this.objectModel.getExternalPipelineFlow(externalPipelineFlowUrl);\n\t\t\t\tif (!data.externalPipelineFlow) {\n\t\t\t\t\tdata.externalPipelineFlowLoad = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t// Ensures that any external pipeline, associated with any visible expanded\n\t// supernodes in the pipeline flow being displayed, are loaded. This method\n\t// is called for one pipeline at a time until all needed pipeline flows are\n\t// loaded. This allows the host app to serve up one pipeline flow at a time.\n\tensureVisibleExpandedPipelinesAreLoaded() {\n\t\tconst expandedSupernodes = this.objectModel.getVisibleExpandedExternalSupernodes();\n\t\tif (expandedSupernodes && expandedSupernodes.length > 0) {\n\t\t\tthis.editActionHandler({\n\t\t\t\teditType: \"loadPipelineFlow\",\n\t\t\t\ttargetObject: expandedSupernodes[0]\n\t\t\t});\n\t\t}\n\t}\n\n\t// Returns false if the host application did not provided an external pipeline\n\t// flow when requested by Common Canvas setting the externalPipelineFlowLoad\n\t// boolean to true. Returns true otherwise which will be the case when no\n\t// external pipeline was requested.\n\twasExtPipelineFlowLoadSuccessful(data) {\n\t\tif (data.externalPipelineFlowLoad && !data.externalPipelineFlow) {\n\t\t\tconst msg = \"The host app did not provide a pipeline flow when requested for action \" +\n\t\t\t\tdata.editType + \" in beforeEditActionHandler, for URL: \" +\n\t\t\t\tdata.externalUrl;\n\t\t\tthis.logger.error(msg);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Pans the canvas to bring the newly added node into view if it is not\n\t// already visible. This needs to be done after the canvas has finished\n\t// updating so we add the function as a callback to be called after update.\n\tpanToReveal(data) {\n\t\t// Declare a function that will reposition the canvas to show the\n\t\t// newly added node if it's outside the viewport.\n\t\tconst moveCanvasToReveal = () => {\n\t\t\tconst zoomObject = this.getZoomToReveal([data.newNode.id]);\n\t\t\tif (zoomObject) {\n\t\t\t\tthis.zoomTo(zoomObject);\n\t\t\t}\n\t\t\t// Remove the callback after it has been called so it is not called for\n\t\t\t// other canvas operations.\n\t\t\tthis.removeAfterUpdateCallback(moveCanvasToReveal);\n\t\t};\n\n\t\tthis.addAfterUpdateCallback(moveCanvasToReveal);\n\t}\n}\n\n// A static variable for saving the current node template being dragged.\nCanvasController.dragNodeTemplate = null;\n"],"names":["identity","require$$0","_castFunction","value","baseIsMatch","_baseIsMatch","getMatchData","require$$1","isMatch_1","object","source","isMatchWith_1","customizer","undefined","horizontalDefaultLayout","nodeLayout","defaultNodeWidth","defaultNodeHeight","className","nodeShapeDisplay","nodeShape","bodyPath","selectionPath","nodeExternalObject","onFocusAllowDefaultAction","imageDisplay","imageWidth","imageHeight","imagePosition","imagePosX","imagePosY","labelDisplay","labelWidth","labelHeight","labelPosition","labelPosX","labelPosY","labelEditable","labelAlign","labelSingleLine","labelOutline","labelMaxCharacters","labelAllowReturnKey","decorations","decoratorTopY","decoratorMiddleY","decoratorBottomY","decoratorLeftX","decoratorCenterX","decoratorRightX","decoratorWidth","decoratorHeight","decoratorPadding","decoratorLabelWidth","decoratorLabelHeight","dropShadow","nodeHighlightGap","nodeResizable","nodeMovable","nodeSizingArea","errorPosition","errorXPos","errorYPos","errorWidth","errorHeight","nodeCornerResizeArea","drawNodeLinkLineFromTo","drawCommentLinkLineTo","minInitialLine","minInitialLineIncrement","minFinalLine","inputPortDisplay","inputPortFocusable","inputPortDisplayObjects","type","inputPortAutoPosition","inputPortPositions","x_pos","y_pos","pos","inputPortGuideObjects","outputPortDisplay","outputPortFocusable","outputPortDisplayObjects","outputPortAutoPosition","outputPortPositions","outputPortGuideObjects","autoSizeNode","portRadius","portArcOffset","portArcRadius","portArcSpacing","contextToolbarPosition","ellipsisDisplay","ellipsisPosition","ellipsisWidth","ellipsisHeight","ellipsisPosX","ellipsisPosY","ellipsisHoverAreaPadding","canvasLayout","supernodeLabelPosX","supernodeLabelPosY","supernodeLabelWidth","supernodeLabelHeight","supernodeImageWidth","supernodeImageHeight","supernodeImagePosX","supernodeImagePosY","supernodeEllipsisPosX","supernodeEllipsisPosY","supernodeEllipsisWidth","supernodeEllipsisHeight","supernodeExpansionIconPosX","supernodeExpansionIconPosY","supernodeExpansionIconHeight","supernodeExpansionIconWidth","supernodeExpansionIconHoverAreaPadding","supernodeErrorPosX","supernodeErrorPosY","supernodeErrorWidth","supernodeErrorHeight","supernodeDefaultWidth","supernodeDefaultHeight","supernodeMinWidth","supernodeMinHeight","supernodeTopAreaHeight","supernodeSVGAreaPadding","supernodeBindingPortRadius","linkMethod","LINK_METHOD_PORTS","linkDirection","LINK_DIR_LEFT_RIGHT","displayLinkOnOverlap","linkGap","linkDecoratorHeight","linkDecoratorWidth","linkDecoratorPadding","linkDecoratorLabelWidth","linkDecoratorLabelHeight","elbowSize","wrapAroundSpacing","wrapAroundNodePadding","linkType","commentLinkArrowHead","dataLinkArrowHead","linkContextToolbarPosX","linkContextToolbarPosY","linkDistanceForAltDecorations","linkAltDecorations","linkStartHandleObject","linkStartHandleImage","linkStartHandleWidth","linkStartHandleHeight","linkStartHandleRadius","linkEndHandleObject","linkEndHandleImage","linkEndHandleWidth","linkEndHandleHeight","linkEndHandleRadius","commentCornerResizeArea","commentHighlightGap","commentSizingArea","commentAutoSize","addCommentOffsetX","addCommentOffsetY","commentPortRadius","commentToolbarPosX","commentToolbarPosY","alwaysDisplayBackToParentFlow","zoomToFitPadding","snapToGridType","snapToGridX","snapToGridY","displayGridType","displayGridMajorX","displayGridMajorY","displayGridMinorX","displayGridMinorY","nodeProximity","ghostAreaPadding","initialPanX","initialPanY","autoLayoutInitialMarginX","autoLayoutInitialMarginY","autoLayoutVerticalSpacing","autoLayoutHorizontalSpacing","verticalDefaultLayout","LayoutDimensions","_createClass","_classCallCheck","key","config","overlayLayout","arguments","length","newLayout","this","getDefaultLayout","overridePortPositions","overrideNodeResizable","overrideNodeLayout","overrideCanvasLayout","overrideLinkType","overrideSnapToGrid","overrideDisplayGrid","overrideAutoLayout","overrideArrowHead","defaultLayout","enableNodeFormatType","NODE_FORMAT_VERTICAL","_cloneDeep","layout","enableResizableNodes","Object","assign","enableLinkType","enableStraightLinksAsFreeform","LINK_METHOD_FREEFORM","enableLinkMethod","enableLinkDirection","enableSnapToGridType","enableSnapToGridX","enableSnapToGridY","snapToGridXPx","getGridSize","snapToGridYPx","defaultCanvasLayout","defaultMajorX","defaultMajorY","defaultMinorX","defaultMinorY","displayGridMajorPx","displayGridMajorPy","displayGridMinorPx","displayGridMinorPy","getAutoLayoutSpacing","enableAutoLayoutVerticalSpacing","enableAutoLayoutHorizontalSpacing","configAutoLayoutSpacing","layoutAutoLayoutSpacing","spacing","gridSizeStr","defaultNodeSize","endsWith","Number","parseFloat","yPos","LINK_TYPE_STRAIGHT","ConfigUtils","startConfig","newConfig","getLayout","enableNodeLayout","enableCanvasLayout","newTipConfig","tipConfig","enableInteractionType","NODE_FORMAT_HORIZONTAL","enableLinkSelection","LINK_SELECTION_NONE","enableLinkReplaceOnNewConnection","enableSplitLinkDroppedOnNode","enableRaiseLinksToTopOnHover","enableSelfRefLinks","enableAssocLinkCreation","enableAssocLinkType","ASSOC_STRAIGHT","enableDragWithoutSelect","enableInternalObjectModel","enablePaletteLayout","PALETTE_LAYOUT_FLYOUT","enablePaletteHeader","enableToolbarLayout","enableImageDisplay","enableInsertNodeDroppedOnLink","enableHighlightNodeOnNewLinkDrag","enableHighlightUnavailableNodes","enableMoveNodesOnSupernodeResize","enableRaiseNodesToTopOnHover","enableExternalPipelineFlows","enableEditingActions","enableDisplayFullLabelOnHover","enableDropZoneOnExternalDrag","enableLeftFlyoutUnderToolbar","enableRightFlyoutUnderToolbar","enableRightFlyoutDragToResize","enablePanIntoViewOnOpen","enableZoomIntoSubFlows","enableBrowserEditMenu","enableMarkdownInComments","enableMarkdownHTML","enableWYSIWYGComments","enableMoveNodesInComment","enableKeyboardNavigation","enableAutoLinkOnlyFromSelNodes","enableSingleClickAddFromPalette","enableContextToolbar","enableSaveZoom","enableSingleOutputPortDisplay","enableNarrowPalette","schemaValidation","enableFocusOnMount","enableBoundingRectangles","enableCanvasUnderlay","enableParentClass","enablePositionNodeOnRightFlyoutOpen","emptyCanvasContent","dropZoneCanvasContent","enableUseCardFromOriginalPorts","palette","categories","nodeTemplates","nodes","ports","links","stateTag","c1","c2","config1","omitFields","config2","compareCanvasConfigs","_this","state","keys","_isMatchWith","objValue","srcValue","enableNodeRightFlyoutOpenExactlyMatches","enableCanvasLayoutExactlyMatches","enableNodeLayoutExactlyMatches","enableTipConfigExactlyMatches","_omit","omit_1","enablePositionNode1","enablePositionNode2","_typeof","x","y","enableLayout1","enableLayout2","compareFieldCount","_isMatch","decorationsArraysExactlyMatches","decorations1","decorations2","forEach","dec1","i","dec2","tipConfig1","tipConfig2","obj1","obj2","ArrangeLayoutAction","_Action","data","canvasController","labelUtil","objectModel","layoutDirection","apiPipeline","getAPIPipeline","existingNodes","getNodes","map","n","_objectSpread","existingLinks","getLinks","_inherits","autoLayout","replaceNodes","updateLinks","getActionLabel","Action","AttachNodeToLinksAction","pipelineId","node","linksToUpdateInfo","CanvasUtils","getDetachedLinksToUpdate","detachedLinks","getNodeDataLinks","moveObjects","id","offsetX","offsetY","newLinks","oldLinks","node_label","label","ConvertSuperNodeExternalToLocal","pipelineFlowLoaded","ensurePipelineIsLoaded","oldSupernode","getNode","targetObject","oldPipelines","getDescPipelinesToDelete","filter","p","parentUrl","externalUrl","oldExtPipelineFlows","getExternalPipelineFlowsForPipelines","newSupernode","subflow_ref","image","USE_DEFAULT_EXT_ICON","USE_DEFAULT_ICON","url","pipelinesToClone","getDescendantPipelinesForSupernode","newPipelines","cloneSupernodeContents","replaceSupernodeAndPipelines","topSupernode","pipelinesToAdd","pipelinesToRemove","extPipelineFlowsToAdd","extPipelineFlowsToDelete","ConvertSuperNodeLocalToExternal","descPipelines","newPipelineFlow","createExternalPipelineFlowTemplate","pipelineFlowId","pipeline_id_ref","pipelines","CreateAutoNodeAction","addLink","autoLinkOnlyFromSelNodes","getCanvasConfig","srcNode","getAutoSourceNode","newNode","createAutoNode","newLink","isLinkNeededWithAutoNode","createLink","sourceNode","subPipeline","subPipelines","addNode","setSelections","deleteNodes","CreateCommentAction","comment","createComment","addComment","focusObject","deleteComment","CANVAS_FOCUS","CreateCommentLinkAction","linkCommentList","createCommentLinks","linkIds","link","addLinks","_this2","deleteLink","CreateNodeAction","createNode","CreateNodeLinkAction","actionLabel","createActionLabel","linkNodeList","replaceLink","createNodeLinks","targetNodeLabel","getTargetNodeLabel","targetNodes","CreateNodeLinkDetachedAction","detachedLink","createNodeLinkDetached","CreateNodeOnLinkAction","firstLinkSrcInfo","srcNodeId","portId","srcNodePortId","firstLinkTrgInfo","secondLinkSrcInfo","secondLinkTrgInfo","trgNodeId","trgNodePortId","newFirstLink","firstLink","newSecondLink","secondLink","createNodeLink","CreateNodeAttachLinksAction","BOUNDING_RECT_PADDING","CreateSuperNodeAction","useCardFromOriginalPorts","subflowNodes","getSelectedNodes","subflowComments","getSelectedComments","subflowRect","getBoundingRectForNodes","linksToDelete","uniqueSubflowLinks","getUniqueSubflowLinks","selectedObjectIds","subflowNodeLinks","getSubflowNodeLinks","subflowCommentLinks","getSubflowCommentLinks","filterCommentLinks","subflowLinks","concat","subflowInputLinks","createOrderedSubflowInputLinks","subflowOutputLinks","createOrderedSubflowOutputLinks","createPipeline","subAPIPipeline","bindingInputData","getBindingInputData","bindingOutputData","getBindingOutputData","supernode","createSupernode","supernodeLinkDefs","createSupernodeLinkDefs","bindingNodeLinkDefs","createBindingNodeLinkDefs","handleExternalSubflow","getLinksContainingId","objectLink","find","push","NODE_LINK","ASSOCIATION_LINK","COMMENT_LINK","_this3","filteredLinks","getComment","isObjectIdInObjects","isCommentLinkedToNonSelectedNodes","removeCommentLinksToUnselectedNodes","inSubflowCommentLinks","_step","_this4","commentsToUnlinkFromUnselectedNodes","_iterator","_createForOfIteratorHelper","s","done","err","e","f","superLink","_this5","inLink","removeLinkFromSubflow","reorderSubflowLinks","_this6","outLink","supernodes","filterSupernodes","getDescendantPipelinesForSupernodes","externalPipelineFlowId","supernodeInputPorts","bnd","supernodePort","supernodeOutputPorts","supernodeTemplate","getLabel","description","inputs","outputs","SUPER_NODE","topLeftNode","getTopLeftNode","supernodeData","nodeTemplate","_this7","supernodeLinks","_toConsumableArray","nodeId","sort","a","b","nodeA","nodeB","aYcoord","bYcoord","listOfNodes","_this8","closestNode","shortestDistance","getDistanceFromPosition","distance","Math","sqrt","pow","_this9","entryBindingYPos","trgNode","findPort","generateUniquePortId","cardinality","min","max","bindingNodePort","inputBindingNode","createBindingNode","isSupernodeInputBinding","bindingNode","_this0","exitBindingYPos","width","outputBindingNode","isSupernodeOutputBinding","nodePortId","found","getPort","port","bindingNodeData","newId","count","occurrencesStartingWith","startsWith","portsData","bindingNodeTemplate","actionData","editType","linkDefs","linkData","srcInfo","trgInfo","srcPos","trgPos","subPipelineId","_this1","deleteComments","deleteLinks","addSupernode","setInputPortSubflowNodeRef","setOutputPortSubflowNodeRef","linkDef","subflowNewLinks","addExternalPipelineFlow","setParentUrl","_this10","removeExternalPipelineFlow","deleteSupernodes","selectedObjects","CollapseSuperNodeInPlaceAction","oldObjectPositions","newObjectPositions","oldLinkPositions","newLinkPositions","getObjectPositions","getObjects","getLinkPositions","moveSurroundingObjects","moveSurroundingDetachedLinks","collapseSuperNodeInPlace","expandSuperNodeInPlace","ColorSelectedObjectsAction","oldIds","o","oldColors","getOldColors","newBackgroundColor","editParam","color","setObjectsColorClassName","comments_count","getObjectColorClass","class_name","classes","split","c","getBkgColorClass","DeconstructSuperNodeAction","targetApiPipeline","targetPipeline","getPipeline","extPipelineFlowToDelete","getExternalPipelineFlow","linksToRemove","getLinksToRemove","bindingNodes","getBindingNodes","nodesToAdd","getNonBindingNodes","commentsToAdd","getCommentsToAdd","linksToAdd","getLinksToAdd","expandedCanvasDims","left","top","getCanvasDimensions","height","n2a","c2a","info","supernodeToDelete","pipelineToDelete","some","bn","input","subflow_node_ref","output","getLinksContainingIds","linksToFromBindingNodes","getLinksToFromBindingNodes","l","ltfbm","getComments","linksNotToFromBindingNodes","getLinksNotToFromBindingNodes","getNewLinks","supernodeDataLinks","getNewLinksForInput","getNewLinksForOutput","inputLinks","getSupernodeInputLinks","getInputBindingNode","inputBindingLinks","getInputBindingLinks","inputLink","inputBindingLink","linkInfo","createLinkFromInfo","outputLinks","getSupernodeOutputLinks","getOutputBindingNode","outputBindingLinks","getOutputBindingLinks","outputLink","outputBindingLink","inputPortId","getDefaultInputPortId","getLinksContainingSourceId","outputPortId","getDefaultOutputPortId","getLinksContainingTargetId","_this$info","deconstructSupernode","reconstructSupernode","DeleteLinkAction","getLink","DeleteObjectsAction","areDetachableLinksSupported","areDetachableLinksInUse","objectsInfo","nodesToDelete","commentsToDelete","getSelectedLinks","supernodesToDelete","nodeAndCommentsToDelete","getConnectedLinksToDelete","getLinksToUpdateInfo","pipelinesToDelete","isSupernodeToBeDeleted","excludeType","nc","conLink","isLinkToBeDeleted","src","isSourceToBeDeleted","trg","isTargetToBeDeleted","getSrcPos","getTrgPos","findIndex","sn","deleteAndUpdateObjects","linksToUpdate","addAndUpdateObjects","supernodesToAdd","dynamicStringKey","val","v","join","nodes_count","links_count","DisconnectObjectsAction","disconnectObjects","DisplayPreviousPipeline","oldBreadcrumbs","getBreadcrumbs","setPreviousBreadcrumb","setBreadcrumbs","DisplaySubPipeline","addBreadcrumbs","breadcrumbIndex","setIndexedBreadcrumb","EditCommentAction","previousComment","editComment","EditDecorationLabelAction","objType","DEC_LINK","previousDecorations","getLinkDecorations","objId","DEC_NODE","getNodeDecorations","newDecorations","dec","decId","setLinkDecorations","setNodeDecorations","SetNodeLabelAction","previousLabel","setNodeLabel","expandSuperNodeInPlaceAction","getSupernodeExpandedWidth","getCanvasLayout","getSupernodeExpandedHeight","InsertNodeIntoLinkAction","trgPort","srcPort","MoveObjectsAction","PasteAction","viewportDimensions","getViewPortDimensions","isSnapToGridInUse","oldFocusObject","getFocusObject","adjustObjectsPositions","clones","cloneObjectsToPaste","objects","comments","_this$objectModel$ext","extractAddDataPipelines","clonedNodes","selectionIds","getSelectionIds","pastedObjDimensions","mousePos","xDelta","yDelta","moveObjectsPositions","transRect","ensureNoOverlap","xInc","yInc","exactlyOverlaps","cn","clonedComments","cc","clonedLinks","cl","addPastedObjects","selections","getDoFocusObject","_this$clones","_this$clones2","_this$clones3","deletePastedObjects","SaveToPaletteAction","addedNodeTypes","createNodesForPalette","addNodeTypesToPalette","SAVED_NODES_CATEGORY_ID","SAVED_NODES_FOLDER_ICON","addedIds","ant","removeNodesFromPalette","baseFor","_baseFor","castFunction","keysIn","require$$2","forIn_1","iteratee","SetObjectsStyleAction","oldPipelineObjStyles","_forIn","pipelineObjectIds","objectIds","style","getObjectStyle","temporary","setObjectsStyle","setObjectsMultiStyle","SetLinksStyleAction","oldPipelineLinkStyles","pipelineLinkIds","linkId","getLinkStyle","setLinksStyle","setLinksMultiStyle","UpdateLinkAction","oldLink","updateLink","LabelUtil","intl","actionLabelHandler","defaultMessages","defaultMessages1","defaultMessages2","handler","action","substituteObj","formatMessage","defaultMessage","baseDifference","_baseDifference","baseFlatten","_baseFlatten","baseRest","_baseRest","isArrayLikeObject","require$$3","isArrayLikeObject_1","last","require$$4","differenceWith_1","array","values","comparator","CanvasInHandler","canvas","canvasInfoPipeline","diagram","runtime_ref","zoom","k","doc_type","version","json_schema","primary_pipeline","canvasNodes","canvasNode","nodeType","getType","xPos","objectData","inputPorts","getInputPorts","outputPorts","getOutputPorts","getDecorations","subDiagramId","open_with_tool","is_expanded","expanded_width","expanded_height","MODEL_NODE","model_ref","EXECUTION_NODE","BINDING","userData","typeId","op","containsModel","canvasInputPorts","defaultMaxCard","canvasInputPort","name","getMinCard","getMaxCard","canvasOutputPorts","canvasOutputPort","card","decoration","position","hotspot","outline","canvasComments","canvasComment","content","canvasLinks","canvasLink","isValidLink","target","getLinkType","sourcePort","targetPort","isValid","_has","has_1","canvasPalette","getCategories","cat","category","is_open","nodetypes","convertNodeTypes","nodetype","newNodeType","operator_id_ref","input_ports","convertPalettePorts","output_ports","convertPaletteCardinality","isVersion0Palette","idx","isVersion0Category","CanvasOutHandler","oldCanvas","canvasinfo","getDiagram","canvasinfoPipeline","getCanvasNodes","getCanvasComments","getCanvasLinks","canvasnodes","canvasnode","getCanvasPorts","getCanvasDecorations","oldNode","getOldNode","canvasports","canvasport","newPort","canvasdecorations","newDecoration","index","canvascomments","canvascomment","canvaslinks","canvaslink","linkTypeValue","PipelineInHandler","pipelineFlow","canvasInfoPipelines","convertPipelinesToCanvasInfoPipelines","pFlowPipeline","convertPipelineToCanvasInfoPipeline","pipeline","app_data","ui_data","detached_links","convertNodes","convertComments","convertLinks","parameters","convertNode","obj","convertOutputs","convertInputs","convertLabel","convertDecorations","messages","ui_parameters","removeUiDataFromAppData","convertSubFlowRef","isResized","is_resized","resizeHeight","resize_height","resizeWidth","resize_width","sub_pipelines","connection","data_asset","subFlowRef","sfr","_isObject","isObject_1","convertPortObject","portObj","schema_ref","getUUID","newComment","contentType","content_type","formats","isNode","node_id_ref","createDataLink","port_id_ref","_isEmpty","associations","association","node_ref","associated_id_refs","assocRef","detLink","newDetLink","src_node_id","src_node_port_id","trg_node_id","trg_node_port_id","src_pos","trg_pos","uuid4","v4","link_name","linkName","type_attr","typeAttr","appData","newAppData","PipelineOutHandler","canvasInfo","copyCanvasInfo","subdueStyle","hideComments","createPipelinesFromCanvasInfo","filterOutExternalPipelines","newPipeline","createNodes","createPipelineAppData","canvasInfoNode","createSchemaNode","ciNode","ciLinks","createNodeUiData","createInputs","createOutputs","isEmpty_1","associationLinks","createAssociationLinks","uiData","createDecorations","jsx","newInputs","ciInputPort","portIndex","newInput","createPortUiData","createLinks","newOutputs","ciOutputPort","newOutput","ciPort","ciNodeId","ciInputPortId","getFilteredCanvasLinks","newNodeLink","addNodeLinkCommonAttrs","createPipelineUiData","createComments","detLinks","createDetachedLinks","canvasInfoComments","canvasInfoLinks","newCom","commentId","associationsLinks","assoc","_set","LocalStorage","attributeName","window","electronUtil","wsdStorage","setItem","localStorage","logger","warn","getItem","removeItem","prepareNodes","layoutHandler","setSupernodesBindingStatusForNode","setSupernodesBindingStatus","inPipeline","setNodeAttributesWithLayout","setCommentAttributesWithLayout","setPipelineObjectAttributes","snPipelineId","getSupernodePipelineId","subNode","findNode","customLayout","convertPortPosInfo","convertPortDisplayInfo","decs","getCombinedDecorations","setNodeLayoutAttributes","inputPortsWidth","getInputPortsWidth","outputPortsWidth","getOutputPortsWidth","setNodeDimensionAttributesVertical","inputPortsHeight","getInputPortsHeight","outputPortsHeight","getOutputPortsHeight","setNodeDimensionAttributesHoriz","SNAP_TO_GRID_DURING","SNAP_TO_GRID_AFTER","snapToGrid","Logger","exports","r","t","require","u","Error","code","call","commonjsRequire","module","graphlib","debug","util","time","notime","_","greedyFAS","run","g","fas","graph","acyclicer","weightFn","dfsFAS","edge","weight","removeEdge","forwardName","reversed","setEdge","w","uniqueId","stack","visited","dfs","has","outEdges","undo","edges","addBorderSegments","children","borderLeft","borderRight","rank","minRank","maxRank","addBorderNode","prop","prefix","sg","sgNode","borderType","prev","curr","addDummyNode","setParent","adjust","rankDir","rankdir","toLowerCase","swapWidthHeight","reverseY","swapXY","swapWidthHeightOne","attrs","reverseYOne","points","swapXYOne","List","sentinel","_next","_prev","_sentinel","unlink","entry","filterOutLinks","prototype","dequeue","enqueue","toString","strs","JSON","stringify","Graph","debugOrdering","layerMatrix","buildLayerMatrix","h","compound","multigraph","setGraph","setNode","layer","layerV","reduce","DEFAULT_WEIGHT_FN","constant","nodeCount","buildState","results","doGreedyFAS","buckets","zeroIdx","flatten","sources","sinks","removeNode","collectPredecessors","inEdges","uEntry","out","assignBucket","wEntry","fasGraph","maxIn","maxOut","in","prevWeight","edgeWeight","range","acyclic","normalize","normalizeRanks","parentDummyChains","removeEmptyRanks","nestingGraph","coordinateSystem","order","opts","debugTiming","layoutGraph","buildLayoutGraph","runLayout","updateInputGraph","makeSpaceForEdgeLabels","removeSelfEdges","asNonCompoundGraph","injectEdgeLabelProxies","cleanup","assignRankMinMax","removeEdgeLabelProxies","insertSelfEdges","positionSelfEdges","removeBorderNodes","fixupEdgeLabelCoords","translateGraph","assignNodeIntersects","reversePointsForReversedEdges","inputGraph","inputLabel","layoutLabel","graphNumAttrs","graphDefaults","ranksep","edgesep","nodesep","graphAttrs","nodeNumAttrs","nodeDefaults","edgeNumAttrs","edgeDefaults","minlen","labeloffset","labelpos","edgeAttrs","canonicalize","merge","selectNumberAttrs","pick","defaults","parent","borderTop","borderBottom","dummy","labelRank","minX","POSITIVE_INFINITY","maxX","minY","maxY","graphLabel","marginX","marginx","marginY","marginy","getExtremes","p1","p2","nodeV","nodeW","unshift","intersectRect","reverse","abs","selfEdges","layers","orderShift","selfEdge","selfNode","dx","dy","mapValues","newAttrs","lodash","cloneDeep","each","forIn","isUndefined","minBy","now","sortBy","zipObject","root","depths","treeDepths","nodeSep","nestingRoot","sumWeights","child","nodeRankFactor","bottom","childNode","childTop","childBottom","thisWeight","nestingEdge","depth","acc","dummyChains","normalizeEdge","vRank","wRank","edgeLabel","edgeObj","origLabel","successors","addSubgraphConstraints","cg","vs","rootPrev","prevChild","barycenter","movable","inV","result","nodeU","sum","buildLayerGraph","relationship","createRootNode","setDefaultNodeLabel","hasNode","crossCount","layering","twoLayerCrossCount","northLayer","southLayer","southPos","southEntries","firstIndex","treeSize","tree","Array","weightSum","initOrder","sortSubgraph","downLayerGraphs","buildLayerGraphs","upLayerGraphs","assignOrder","best","bestCC","lastBest","sweepLayerGraphs","ranks","layerGraphs","biasRight","lg","sorted","simpleNodes","orderedVs","resolveConflicts","entries","mappedEntries","tmp","indegree","entryV","entryW","doResolveConflicts","sourceSet","handleIn","vEntry","merged","mergeEntries","handleOut","pop","bl","br","subgraphs","barycenters","subgraphResult","mergeBarycenters","expandSubgraphs","predecessors","blPred","brPred","other","parts","partition","sortable","lhs","unsortable","rhs","vsIndex","compareWithBias","consumeUnsortable","bias","postorderNums","postorder","pathData","findPath","path","lca","pathIdx","pathV","ascending","vPath","wPath","low","lim","findType1Conflicts","conflicts","visitLayer","prevLayer","k0","scanPos","prevLayerLength","lastNode","findOtherInnerSegmentNode","k1","slice","scanNode","uLabel","uPos","addConflict","findType2Conflicts","scan","south","southEnd","prevNorthBorder","nextNorthBorder","uNode","north","nextNorthPos","prevNorthPos","southLookahead","conflictsV","hasConflict","verticalAlignment","neighborFn","align","prevIdx","ws","mp","floor","il","ceil","horizontalCompaction","reverseSep","xs","blockG","buildBlockGraph","iterate","setXsFunc","nextNodesFunc","elem","pass1","pass2","bind","blockGraph","sepFn","sep","vRoot","uRoot","prevMax","findSmallestWidthAlignment","xss","NEGATIVE_INFINITY","halfWidth","alignCoordinates","alignTo","alignToVals","alignToMin","alignToMax","vert","horiz","delta","alignment","xsVals","balance","ul","ignore","positionX","adjustedLayering","inner","smallestWidth","edgeSep","vLabel","wLabel","positionY","rankSep","prevY","maxHeight","slack","feasibleTree","directed","start","size","tightTree","findMinSlackEdge","shiftRanks","nodeEdges","edgeV","longestPath","networkSimplex","ranker","networkSimplexRanker","tightTreeRanker","longestPathRanker","initRank","preorder","alg","simplify","initLowLimValues","initCutValues","leaveEdge","exchangeEdges","enterEdge","assignCutValue","cutvalue","calcCutValue","childIsTail","graphEdge","cutValue","isOutEdge","pointsToHead","otherWeight","isTreeEdge","otherCutValue","dfsAssignLowLim","nextLim","neighbors","hasEdge","tailLabel","flip","candidates","isDescendant","updateRanks","flipped","rootLabel","simplified","simpleLabel","isMultigraph","successorWeights","weightMap","sucs","predecessorWeights","preds","rect","point","sx","sy","offset","collection","fn","console","log","lib","json","components","cmpt","cmpts","isArray","navigation","isDirected","doDfs","dijkstra","dijkstraAll","weightFunc","edgeFunc","transform","PriorityQueue","DEFAULT_WEIGHT_FUNC","edgeFn","runDijkstra","String","pq","updateNeighbors","predecessor","decrease","add","removeMin","tarjan","findCycles","floydWarshall","runFloydWarshall","d","rowK","rowI","j","ik","kj","ij","altDistance","isAcyclic","prim","topsort","CycleException","parents","pri","priority","init","onStack","lowlink","visit","_arr","_keyIndices","keyIndices","arr","_decrease","_swap","_heapify","largest","origArrI","origArrJ","DEFAULT_EDGE_NAME","GRAPH_NODE","EDGE_KEY_DELIM","_isDirected","_isMultigraph","_isCompound","_label","_defaultNodeLabelFn","_defaultEdgeLabelFn","_nodes","_parent","_children","_in","_preds","_out","_sucs","_edgeObjs","_edgeLabels","incrementOrInitEntry","decrementOrRemoveEntry","edgeArgsToId","v_","w_","edgeArgsToObj","edgeObjToId","_nodeCount","_edgeCount","isCompound","newDefault","isFunction","self","isEmpty","setNodes","args","_removeFromParentsChildList","ancestor","predsV","sucsV","union","isLeaf","filterNodes","copy","constructor","findParent","setDefaultEdgeLabel","edgeCount","setPath","valueSpecified","arg0","freeze","outV","write","options","writeNodes","writeEdges","clone","nodeValue","edgeValue","read","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","clear","set","get","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","Promise","Set","setCacheAdd","setCacheHas","SetCache","__data__","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","Symbol","Uint8Array","WeakMap","apply","func","thisArg","arrayEach","arrayFilter","predicate","resIndex","baseIndexOf","arrayIncludes","arrayIncludesWith","baseTimes","isArguments","isBuffer","isIndex","isTypedArray","hasOwnProperty","arrayLikeKeys","inherited","isArr","isArg","isBuff","isType","skipIndexes","arrayMap","arrayPush","arrayReduce","accumulator","initAccum","arraySome","asciiSize","baseProperty","baseAssignValue","eq","assignMergeValue","assignValue","assocIndexOf","copyObject","baseAssign","baseAssignIn","defineProperty","configurable","enumerable","writable","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isMap","isObject","isSet","CLONE_DEEP_FLAG","CLONE_FLAT_FLAG","CLONE_SYMBOLS_FLAG","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","cloneableTags","baseClone","bitmask","isDeep","isFlat","isFull","tag","isFunc","stacked","subValue","keysFunc","props","objectCreate","create","baseCreate","proto","baseForOwn","baseEach","createBaseEach","isSymbol","baseExtremum","current","computed","baseFilter","baseFindIndex","fromIndex","fromRight","isFlattenable","isStrict","createBaseFor","castPath","toKey","baseGet","baseGetAllKeys","symbolsFunc","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","toStringTag","baseGetTag","baseGt","baseHas","baseHasIn","baseIsNaN","strictIndexOf","isObjectLike","baseIsArguments","baseIsEqualDeep","baseIsEqual","equalArrays","equalByTag","equalObjects","COMPARE_PARTIAL_FLAG","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","baseIsMap","COMPARE_UNORDERED_FLAG","matchData","noCustomizer","isMasked","toSource","reRegExpChar","reIsHostCtor","funcProto","Function","objectProto","funcToString","reIsNative","RegExp","replace","baseIsNative","test","baseIsSet","isLength","typedArrayTags","baseIsTypedArray","baseMatches","baseMatchesProperty","property","baseIteratee","isPrototype","nativeKeys","baseKeys","nativeKeysIn","baseKeysIn","isProto","baseLt","isArrayLike","baseMap","matchesStrictComparable","hasIn","isKey","isStrictComparable","baseMergeDeep","safeGet","baseMerge","srcIndex","newValue","cloneTypedArray","isPlainObject","toPlainObject","mergeFunc","isCommon","isTyped","baseSortBy","baseUnary","compareMultiple","baseOrderBy","iteratees","orders","criteria","basePickBy","basePick","paths","baseSet","basePropertyDeep","nativeCeil","nativeMax","baseRange","end","step","baseReduce","eachFunc","overRest","setToString","lastIndex","nested","baseSetToString","string","comparer","INFINITY","symbolProto","symbolToString","baseToString","cacheHas","createSet","setToArray","LARGE_ARRAY_SIZE","baseUniq","includes","seen","outer","seenIndex","baseValues","baseZipObject","assignFunc","valsLength","cache","stringToPath","cloneArrayBuffer","arrayBuffer","byteLength","freeExports","freeModule","Buffer","allocUnsafe","buffer","cloneDataView","dataView","byteOffset","reFlags","cloneRegExp","regexp","exec","symbolValueOf","valueOf","cloneSymbol","symbol","typedArray","compareAscending","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","objCriteria","othCriteria","ordersLength","isNew","getSymbols","getSymbolsIn","coreJsData","isIterateeCall","createAssigner","assigner","guard","iterable","createFind","findIndexFunc","toFinite","createRange","noop","isPartial","arrLength","othLength","arrValue","othValue","compared","othIndex","mapToArray","message","convert","objProps","objLength","skipCtor","objCtor","othCtor","flatRest","global","freeGlobal","commonjsGlobal","isKeyable","getMapData","getValue","getPrototype","overArg","getPrototypeOf","nativeObjectToString","isOwn","unmasked","stubArray","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","promiseTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","resolve","Ctor","ctorString","hasPath","hasFunc","reHasUnicode","hasUnicode","nativeCreate","HASH_UNDEFINED","spreadableSymbol","isConcatSpreadable","MAX_SAFE_INTEGER","reIsUint","reIsDeepProp","reIsPlainProp","uid","maskSrcKey","IE_PROTO","splice","hash","memoize","MAX_MEMOIZE_SIZE","memoizeCapped","freeProcess","process","nodeUtil","types","binding","arg","otherArgs","freeSelf","shortOut","HOT_COUNT","HOT_SPAN","nativeNow","Date","lastCalled","stamp","remaining","pairs","unicodeSize","stringSize","rePropName","reEscapeChar","charCodeAt","match","number","quote","subString","rsAstralRange","rsAstral","rsCombo","rsFitz","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsModifier","rsOptVar","rsSeq","rsSymbol","reUnicode","propsIndex","propsLength","toInteger","defaultValue","stubFalse","asyncTag","proxyTag","nodeIsMap","objectCtorString","nodeIsSet","isString","nodeIsTypedArray","FUNC_ERROR_TEXT","resolver","TypeError","memoized","Cache","toNumber","MAX_INTEGER","remainder","NAN","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","isBinary","isArrLike","arrays","idCounter","APIPipeline","store","getCanvasInfoPipeline","dispatch","deleteObjects","executeWithSelectionChange","inObjectIds","_this$filterNodesAndC","filterNodesAndComments","deleteNodesInternal","deleteCommentsInternal","inData","oId","getObject","style_temp","newClassName","objIds","newColorClass","pushUniqueLinks","com","nodeDefs","commentDefs","overlaps","nodeDef","exactlyOverlapsNodes","commentDef","exactlyOverlapsComments","exactlyOverlapsLinks","overlap","inNodes","canvasNodeWidthX","canvasNodeHeightY","inObjects","convertNodeTemplate","getUniqueId","CREATE_NODE","setNodeAttributes","selectedNodes","isViableAutoSourceNode","nodesArray","lastNodeAdded","lastButOneNodeAdded","isSrcCardinalityAtMax","initialMarginX","initialMarginY","horizontalSpacing","verticalSpacing","isEntryBindingNode","newNodeOverLapping","isNodeOverlappingOthers","newNodes","selObjId","pData","getSchemaPipelinesForSupernode","replacementNodes","isCardinalityAtMax","arrayNode","isSourceOverlappingTarget","srcHighlightGap","trgHighlightGap","_get","get_1","newSubPipelines","getCanvasInfo","cloneSupernodeRemovePipelineData","newCanvasInfo","setCanvasInfo","removePipelines","_this11","deleteSupernodesAndDescPipelines","linksInfo","_this12","isDataNode","objectPositions","linkPositions","newLabel","ensureDecorationsHaveIds","subflowNodeRef","connectFrom","properties","setNodesProperties","nodesProperties","_this13","updatedNodes","existingNode","updatedNode","uiParameters","setNodeProperties","focusFunction","nodeIds","attrName","attrValue","controlName","getNodeMessages","id_ref","hasErrorMessage","hasWarningMessage","includeMsgTypes","_step2","validFlow","_iterator2","isNodeValid","validNode","_step3","_iterator3","msg","indexOf","flowNodes","nodeMsgs","movedNodesInfo","movedLinksInfo","VERTICAL","_this$dagreAutoLayout","dagreAutoLayout","DAGRE_VERTICAL","_this$dagreAutoLayout2","_slicedToArray","_this$dagreAutoLayout3","DAGRE_HORIZONTAL","_this$dagreAutoLayout4","sizeAndPositionObjects","direction","_this$objectModel$get","_this14","nodeLinks","nodesData","defaultWidth","defaultHeight","newWidth","padding","getPaddingForNode","dagre","outputGraph","convertGraphToMovedNodes","convertGraphToMovedLinks","canvasInfoPipelineNodes","lookup","len","layoutInfo","getNodePaddingToTargetNodes","xLeft","yTop","xRight","yBot","_this15","_this16","CREATE_COMMENT","setCommentAttributes","CREATE_COMMENT_LINK","targetNode","comPos","stgType","_this17","inComments","_this18","comIds","commentIds","highlightText","CREATE_NODE_LINK","sourceNodeId","targetNodeId","_this19","selfRefLinks","isTrgConnectionAllowedWithDetachedLinks","isSrcConnectionAllowedWithDetachedLinks","isConnectionAllowed","_this20","isCommentLinkConnectionAllowed","linkList","_this21","_this22","objIdArray","_this23","linksArray","linksForId","concatUniqueBasedOnId","_this24","srcPortId","trgPortId","_this25","getDefaultSrcPortId","getDefaultTrgPortId","linkSrcNodePortId","linkTrgNodePortId","id1","id2","commentProperties","linkProperties","_step4","commentLinks","selectedIds","getSelectedObjectIds","linkedToNonSelectedNodes","_iterator4","commentLink","linkToDelete","tooltip","tooltipDef","nodeTypes","selObjectIds","categoryId","node_types","categoryLabel","categoryDescription","categoryImage","loading_text","loadingText","empty_text","emptyText","isOpen","newContent","nodeObj","nodePositions","newPosition","controlNameIndex","customAttrs","pipelineNodeDec","pipelineNodeDecorations","newStyle","pipelineObjStyle","pipelineObjStyles","branchHighlight","commentPositions","getCommentFromData","cd","comObj","tok","removeCurrentColorClass","addNewColorClass","replaceColorClass","addAttr","delLnk","linkToUpdate","pipelineLinkDec","pipelineLinkDecorations","createdLinks","newComments","isPipelineToDelete","pipelineIds","pipelineObjIds","contextmenu","menuDef","m","leftflyout","rightflyout","bottompanel","toppanel","breadcrumbs","canvasInfoIdChanged","primaryPipelineIdChanged","isCurrentBreadcrumbInPipelineFlow","supernodeId","supernodeParentPipelineId","piId","canvasconfig","canvasConfig","canvastoolbar","toolbarConfig","texttoolbar","textToolbarDef","notifications","convertMsgType","filterIds","ids","selectioninfo","newSelections","objsToDelete","notificationpanel","notificationPanelConfig","externalpipelineflows","epf","subset","efd","pf","CanvasStore","emptyCanvasInfo","combinedReducer","combineReducers","initialState","getDefaultCanvasConfig","panelHeight","createStore","callback","subscribe","getState","getNonClonedPipeline","cloneDeep_1","_pipeline$nodes","_pipeline$comments","_pipeline$links","selectedPipelineId","getSelectedPipelineId","selectedObjIds","internalNode","internalCom","internalLink","cloneData","getNotificationPanel","getSelectionInfo","_this$store$getState$","getNonClonedSelectedObjs","includeLinks","pId","countObjs","getCountNodes","getCountComments","getCountLinks","selObjs","getCountSelectedObjects","validatePipelineFlowAgainstSchema","validator1","SchemaValidator","addSchema","pipelineFlowUIV1Schema","pipelineConnectionV1Schema","dataRecordMetadataV1Schema","getV1Validator","validateAgainstSchema","pipelineFlowV1Schema","validator2","pipelineFlowV2Schema","pipelineFlowUIV2Schema","pipelineConnectionV2Schema","dataRecordMetadataV2Schema","getV2Validator","validator3","getV3Validator","pipelineFlowV3Schema","validatePaletteAgainstSchema","paletteData","paletteV1Schema","paletteV2Schema","paletteV3Schema","schema","validator","logStartTimer","valResult","validate","nestedErrors","logEndTimer","errors","error","pipelineFlowUIV3Schema","pipelineConnectionV3Schema","dataRecordMetadataV3Schema","iterator","_arrayLikeToArray","from","_unsupportedIterableToArray","_n","F","next","updateFuncs","newPalette","_readPorts","_extractPaletteVersion","baseVersion","portsArray","retArray","ObjectModel","getEmptyCanvasInfo","idGeneratorHandler","selectionChangeHandler","setCanvasConfig","getNodeLayout","getStore","newPalData","convertPaletteToPipelineFlowPalette","setPipelineFlowPalette","palData","validateAndUpgradePalette","clearPaletteData","getPaletteData","isPaletteOpen","closePalette","openPalette","getPalette","paletteInitialState","nodeTypeObj","nodeTypeObjs","nodeTypePaletteData","convertPipelineData","newPd","pd","createEmptyPipeline","isSupernode","pDataArray","nodeOpIdRef","outNodeType","operatorId","pal","extractPaletteVersion","upgradePalette","getPaletteCategory","getCurrentBreadcrumb","convertCanvasToCanvasInfo","getCanvasBasedOnCanvasInfo","newFlowId","newPipelineId","schemas","setCanvas","preparePipelineFlow","hasCanvasInfoIdChanged","hasPrimaryPipelineIdChanged","snPipelineUrl","getSupernodePipelineUrl","isPipelineLoaded","externalPipelineFlow","flowContainsPipeline","getCurrentPipeline","getVisibleExpandedExternalSupernodesForPipeline","getPipelines","subFlowPipeline","sns","shouldAddPipelines","convertedPf","runtimes","getExternalPipelineFlows","urls","getUniqueUrls","getExternalPipelineFlowsForUrls","extPipelineFlows","extFlow","createPipelineFlow","validateAndUpgrade","convertPipelineFlowToCanvasInfo","extractVersion","LATEST_VERSION","upgradePipelineFlow","getPrimaryPipelineId","getSupernodes","getDescendantPipelineIds","supernode2","supernodesToDel","parentPipelineId","supernodeInfosToDel","getDescendantSupernodeInfos","otherSupernodeInfos","getOtherSupernodeInfos","sid","shouldBeDeleted","supernodeInfo","osi","supernodesToIgnore","primaryPipelineId","primaryPipeline","ignoreInfo","outSupernodeInfos","getDescendantSupernodeInfosForSupernode","di","isSupernodeInfoInArray","supernodeInfos","continueNavigation","sn2d","si","isSupernodeInfoEqual","si1","si2","getAncestorsBetween","upperPipelineId","lowerPipelineId","ancestors","isAncestorOfPipeline","ancestorId","supernodeRef","getAncestorPipelineIds","pipelineObj","inCanvasInfo","getPipelineFlowId","getCurrentPipelineId","isPipeline","inPipelines","clonedPipeline","clonePipelineWithNewId","clonedNode","extraPipelines","CLONE_PIPELINE","pipelineInfo","CREATE_PIPELINE","supernodeDatum","resetBreadcrumb","crumbs","crumb","oldConfig","mergeCanvasConfigs","messageType","notificationMessages","getNotifications","isNotificationPanelOpen","closeNotificationPanel","openNotificationPanel","isContextMenuDisplayed","getContextMenuSource","isLeftFlyoutOpen","isRightFlyoutOpen","wd","panelWidth","panelMinWidth","isBottomPanelOpen","ht","isTopPanelOpen","clonedNodesInfo","clonedCommentsInfo","cloneNode","originalId","cloneComment","srcClonedNode","findClonedNode","trgClonedNode","cloneNodeLink","srcClonedComment","findClonedComment","cloneCommentLink","cni","cci","clonedNodeInfo","clonedCommentInfo","inNode","CLONE_NODE","inComment","CLONE_COMMENT","CLONE_NODE_LINK","clonedLink","CLONE_COMMENT_LINK","augment","isSelected","toggleSelection","selectSubGraph","objectId","toggleRequested","selPipelineId","getSelectedPipeline","selected","isSuperBindingNode","endNodeId","getSubGraphNodes","allPaths","startNodeId","getGraphPaths","_i","_allPaths","_step5","_iterator5","getGraphPathForNode","isInSavedPath","_step6","_iterator6","getNeighborNodeIDs","neighbor","_step7","_iterator7","_step8","getSelectedNodesIds","connectedNodesIdsGroup","_iterator8","addConnectedNodeIdToGroup","areAllObjectsSelected","areAllSelectedObjectsLinks","_step9","_iterator9","subPipelineInfo","createCanvasInfoPipeline","previousSelection","selectedLinks","selectedComments","newSelection","selection","addedLinks","_differenceWith","addedNodes","addedComments","deselectedLinks","deselectedNodes","deselectedComments","previousPipelineId","ERROR","WARNING","getNotificationMessages","errorMessages","warningMessages","successMessages","SUCCESS","infoMessages","INFO","maxMessageType","SAVE_ZOOM_PIPELINE_FLOW","SAVE_ZOOM_LOCAL_STORAGE","setSavedZoomLocal","refreshToolbar","getZoom","getSavedZoomLocal","canvasSavedZoomValues","savedZooms","parse","set_1","savedZoom","pipelineLinkStyles","operator","connectedNodeIds","connectedLinkIds","CONNECTED_BRANCH","getUpstreamObjIdsFrom","getDownstreamObjIdsFrom","CONNECTED_UPSTREAM","CONNECTED_DOWNSTREAM","getSupernodeNodeIds","getNodeIds","getLinkIds","_union","union_1","nId","currentPipeline","getAttachedLinksContainingTargetId","srcNodeOutputPort","getSupernodeOutputPortForLink","supernodeObj","getSupernodeObjReferencing","parentPipeline","inputPort","supernodeLink","upstreamSupernode","upstreamSupernodeOutputPort","bindingNodeId","getAttachedLinksContainingSourceId","trgNodeInputPort","getSupernodeInputPortForLink","isExitBindingNode","outputPort","downstreamSupernode","downstreamSupernodeInputPort","copyData","getSelectionAPIPipeline","getLinksBetween","emanatingLinks","getNodeDataLinksContainingIds","clipboardData","textToPaste","tipDef","getTooltip","isTooltipOpen","SizeAndPositionObjectsAction","previousObjectsInfo","getPreviousObjectsInfo","previousDetLinksInfo","getPreviousDetachedLinksInfo","previousLinksInfo","detachedLinksInfo","filterOutEditingActions","menuDefinition","newMenuDefinition","menuEntry","submenu","newSubMenu","menu","isEditingAction","filterOutUnwantedDividers","newMenuDef","previousDivider","item","divider","createDefaultContextMenu","_source$targetObject","menuForNonSelectedObj","isContextToolbarForNonSelectedObj","createCommentMenu","createSelectAllMenu","toolbarItem","WYSIWYG","objectAry","editSubMenu","createEditMenu","enable","canUndo","canRedo","areSelectedNodesContiguous","isSuperNodeExpandedInPlace","isPipelineExternal","createHighlightSubMenu","isBranchHighlighted","hasMarkedPort","getConnectFromInfo","isTrgCardinalityAtMax","isEnabled","isPrimaryPipelineEmpty","includePaste","isClipboardEmpty","highlightSubMenuDef","createUnhighlightMenu","commonCanvasControllerInstanceId","CanvasController","instanceId","contextMenuConfig","enableCreateSupernodeNonContiguous","defaultMenuEntries","saveToPalette","displaySupernodeFullPage","colorBackground","keyboardConfig","actions","delete","redo","selectAll","deselectAll","copyToClipboard","cutToClipboard","pasteFromClipboard","handlers","contextMenuHandler","beforeEditActionHandler","editActionHandler","clickActionHandler","decorationActionHandler","tipHandler","commandStack","CommandStack","contextMenuActionHandler","closeContextMenu","branchHighlighted","correctConfig","correctTypo","openPaletteIfNecessary","enableHightlightNodeOnNewLinkDrag","setIntl","getIntl","setToolbarConfig","setNotificationPanelConfig","setLeftFlyoutConfig","setRightFlyoutConfig","setBottomPanelConfig","setTopPanelConfig","inHandlers","setIdGeneratorHandler","setSelectionChangeHandler","setLayoutHandler","setActionLabelHandler","canvasContents","getSVGCanvasD3","getObjectModel","flow","setPipelineFlow","ensureVisibleExpandedPipelinesAreLoaded","clearPipelineFlow","getPipelineFlow","removeAllStyles","setSubdueStyle","unsetAllBranchHighlight","getFlowMessages","isFlowValid","setPaletteData","getCanvas","setCategoryLoadingText","setCategoryEmptyText","addNodeTypeToPalette","getPaletteNode","getPaletteNodeById","getCategoryForNode","setIsOpenCategory","setIsOpenAllCategories","isPaletteCategoryOpen","clearSelections","getSelectedObjects","deleteSelectedObjects","LINK_SELECTION_DETACHABLE","SNAP_TO_GRID_NONE","selectObject","clickType","objectType","getObjectTypeName","newMessages","setNotificationMessages","clearNotificationMessages","deleteNotificationMessages","getNotificationMessagesMaxType","deleteObject","setObjectsBranchHighlight","createNodeFromTemplateAt","deleteNode","setNodeParameters","setNodeUiParameters","setNodeMessages","setNodeMessage","setObjectsClassName","setNodeInputPorts","setNodeOutputPorts","setNodesMultiDecorations","setInputPortLabel","setOutputPortLabel","getNodeUiParameters","getNodeMessage","getNodeInputPorts","getNodeOutputPorts","getNodeClassName","getNodeStyle","getConnectedObjects","constants","addCustomAttrToNodes","removeCustomAttrFromNodes","setNodeLabelEditingMode","setNodeDecorationLabelEditingMode","setSubObjectFocusFunction","clearConnectFromStatus","setOutputPortConnectFromStatus","connectFromInfo","comId","defComPos","getDefaultCommentOffset","newComPos","getAdjustedCommentPosition","setCommentProperties","addCustomAttrToComments","removeCustomAttrFromComments","getCommentClassName","getCommentStyle","isHidingComments","showComments","setCommentHighlighText","setCommentEditingMode","setLinkProperties","setNodeDataLinkSrcInfo","setNodeDataLinkTrgInfo","getNodeDataLinkFromInfo","getCommentLinkFromInfo","nodeId1","nodeId2","getNodeAssocLinkFromInfo","setLinks","setLinksClassName","getLinkClassName","setLinksBranchHighlight","setLinksMultiDecorations","setLinkDecorationLabelEditingMode","command","getCommandStack","editSource","getAllUndoCommands","getAllRedoCommands","cmnd","getUndoCommand","getRedoCommand","clearCommandStack","createBreadcrumb","highlightObjectIds","getBranchNodes","setBranchHighlight","getUpstreamNodes","getDownstreamNodes","getLoggingState","setLoggingState","addAfterUpdateCallback","removeAfterUpdateCallback","togglePalette","setBottomPanelHeight","setRightFlyoutWidth","setRightFlyoutMinWidth","openContextMenu","restoreFocus","CAUSE_MOUSE","CAUSE_KEYBOARD","mouseInContextToolbar","mouseInObject","closeContextToolbar","toggleNotificationPanel","getSupernodeFromBreadcrumb","currentBreadcrumb","bc","displaySubPipelineForBreadcrumbs","lastBreadcrumb","breadcrumb","getPreviousBreadcrumb","zoomIn","zoomOut","animateTime","zoomToFit","zoomObject","zoomTo","translateBy","getZoomToReveal","clearSavedZoomValues","getTransformedViewportDimensions","getCanvasDimensionsWithPadding","getFocusName","isEditingText","setFocusObject","evt","focusOnTextEntryElement","focusObj","force","isTargetInsideCanvas","document","activeElement","focusOnCanvas","moveFocusTo","isFocusOnCanvas","actionFn","always","selectObjectWithClick","SINGLE_CLICK","parentObj","setFocusNextSubObject","setFocusPreviousSubObject","getGhostNode","dragNodeTemplate","nodeTemplateDragStart","nodeTemplateDragEnd","isZoomedToMax","isZoomedToMin","getSavedZoom","isTipOpen","isTipEnabled","TIP_TYPE_PALETTE_ITEM","TIP_TYPE_PALETTE_CATEGORY","TIP_TYPE_NODE","TIP_TYPE_PORT","TIP_TYPE_DEC","TIP_TYPE_LINK","TIP_TYPE_STATE_TAG","stateTagText","stateTagType","customContent","that","pendingTooltip","clearTimeout","setTimeout","setTooltipDef","delay","tipType","actionHandler","blurHandler","setTextToolbarDef","pos_x","pos_y","dropData","transPos","operation","createNodeFromObjectAt","sourceId","sourceObjectTypeId","createNodeFromDataAt","selApiPipeline","canNewNodeBeDroppedOnLink","canNewNodeBeAttachedToLinks","sourceObjectId","defMenu","menuCustom","getContextMenuDefinition","cmndData","removeNullProperties","preProcessForExternalPipelines","pasteObjects","getObjectsToPaste","wasExtPipelineFlowLoadSuccessful","editAction","toggleComments","setZoom","setPortConnectFrom","_svgCanvasD3$renderer","svgCanvasD3","renderer","dragNewLinkUtils","createNewNodeLink","_command","getData","panToReveal","getNewCommentPosition","DisplaySubPipelineAction","DisplayPreviousPipelineAction","ExpandSuperNodeInPlaceAction","highlightedObjectIds","highlightBranch","highlightDownstream","highlightUpstream","setFocusOnCanvas","externalPipelineFlowLoad","externalPipelineFlowUrl","expandedSupernodes","getVisibleExpandedExternalSupernodes","moveCanvasToReveal"],"mappings":"o8JAAIA,EAAWC,EAAAA,WAaf,IAAAC,EAJA,SAAsBC,GACpB,MAAuB,mBAATA,EAAsBA,EAAQH,CAC9C,ECXII,EAAcH,EAAyBI,aACvCC,EAAeC,EAAAA,cAkCnB,IAAAC,EAJA,SAAiBC,EAAQC,GACvB,OAAOD,IAAWC,GAAUN,EAAYK,EAAQC,EAAQJ,EAAaI,GACvE,ECjCIN,EAAcH,EAAyBI,aACvCC,EAAeC,EAAAA,cAuCnB,IAAAI,EALA,SAAqBF,EAAQC,EAAQE,GAEnC,OADAA,EAAkC,mBAAdA,EAA2BA,OAAaC,EACrDT,EAAYK,EAAQC,EAAQJ,EAAaI,GAASE,EAC3D,ECbME,EAA0B,CAC/BC,WAAY,CAIXC,iBAAkB,IAClBC,kBAAmB,GAInBC,UAAW,GAGXC,kBAAkB,EAIlBC,UAAW,YAOXC,SAAU,KACVC,cA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