@elyra/canvas 13.30.0 → 13.31.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.
Files changed (77) hide show
  1. package/dist/canvas-controller-5714c16e.js +2 -0
  2. package/dist/canvas-controller-5714c16e.js.map +1 -0
  3. package/dist/canvas-controller-fb3341f8.js +2 -0
  4. package/dist/canvas-controller-fb3341f8.js.map +1 -0
  5. package/dist/common-canvas-cb2af30e.js +2 -0
  6. package/dist/common-canvas-cb2af30e.js.map +1 -0
  7. package/dist/common-canvas-fed3a116.js +2 -0
  8. package/dist/common-canvas-fed3a116.js.map +1 -0
  9. package/dist/{common-canvas-utils-bbe543ed.js → common-canvas-utils-04c7ddd2.js} +1 -1
  10. package/dist/{common-canvas-utils-bbe543ed.js.map → common-canvas-utils-04c7ddd2.js.map} +1 -1
  11. package/dist/{common-canvas-utils-a489e236.js → common-canvas-utils-26fdf006.js} +1 -1
  12. package/dist/{common-canvas-utils-a489e236.js.map → common-canvas-utils-26fdf006.js.map} +1 -1
  13. package/dist/common-canvas.es.js +1 -1
  14. package/dist/common-canvas.js +1 -1
  15. package/dist/common-properties-6709d67d.js +2 -0
  16. package/dist/common-properties-6709d67d.js.map +1 -0
  17. package/dist/common-properties-9ea710be.js +2 -0
  18. package/dist/common-properties-9ea710be.js.map +1 -0
  19. package/dist/{context-menu-wrapper-ea061c95.js → context-menu-wrapper-c6dea37b.js} +2 -2
  20. package/dist/{context-menu-wrapper-ea061c95.js.map → context-menu-wrapper-c6dea37b.js.map} +1 -1
  21. package/dist/{context-menu-wrapper-7caefd31.js → context-menu-wrapper-ff90de76.js} +2 -2
  22. package/dist/{context-menu-wrapper-7caefd31.js.map → context-menu-wrapper-ff90de76.js.map} +1 -1
  23. package/dist/keyboard-utils-485bef78.js +2 -0
  24. package/dist/keyboard-utils-485bef78.js.map +1 -0
  25. package/dist/keyboard-utils-f7c4ec40.js +2 -0
  26. package/dist/keyboard-utils-f7c4ec40.js.map +1 -0
  27. package/dist/lib/canvas-controller.es.js +1 -1
  28. package/dist/lib/canvas-controller.js +1 -1
  29. package/dist/lib/canvas.es.js +1 -1
  30. package/dist/lib/canvas.js +1 -1
  31. package/dist/lib/context-menu.es.js +1 -1
  32. package/dist/lib/context-menu.js +1 -1
  33. package/dist/lib/properties.es.js +1 -1
  34. package/dist/lib/properties.js +1 -1
  35. package/dist/{toolbar-4ce5b537.js → toolbar-1db25a07.js} +2 -2
  36. package/dist/{toolbar-4ce5b537.js.map → toolbar-1db25a07.js.map} +1 -1
  37. package/dist/{toolbar-40d93a80.js → toolbar-4c42861f.js} +2 -2
  38. package/dist/{toolbar-40d93a80.js.map → toolbar-4c42861f.js.map} +1 -1
  39. package/package.json +4 -3
  40. package/src/command-actions/createAutoNodeAction.js +0 -7
  41. package/src/common-canvas/canvas-controller.js +28 -34
  42. package/src/common-canvas/cc-bottom-panel.jsx +21 -26
  43. package/src/common-canvas/cc-panels.jsx +16 -5
  44. package/src/common-canvas/cc-right-flyout.jsx +17 -33
  45. package/src/common-canvas/common-canvas-utils.js +6 -6
  46. package/src/common-canvas/keyboard-utils.js +3 -2
  47. package/src/common-canvas/svg-canvas-d3.js +4 -4
  48. package/src/common-canvas/svg-canvas-renderer.js +21 -7
  49. package/src/common-canvas/svg-canvas-utils-drag-objects.js +41 -7
  50. package/src/common-canvas/svg-canvas-utils-zoom.js +23 -5
  51. package/src/common-properties/components/editor-form/editor-form.jsx +2 -0
  52. package/src/common-properties/components/wide-flyout/wide-flyout.jsx +85 -5
  53. package/src/common-properties/controls/datepicker/datepicker.jsx +1 -0
  54. package/src/common-properties/controls/dropdown/dropdown.jsx +17 -11
  55. package/src/common-properties/form/ControlInfo.js +1 -1
  56. package/src/common-properties/panels/tearsheet/tearsheet.jsx +2 -1
  57. package/src/object-model/layout-dimensions.js +6 -0
  58. package/stats.html +1 -1
  59. package/types/canvas-controller.ts +18 -4
  60. package/types/common-canvas.ts +5 -0
  61. package/types/common-properties.ts +1 -1
  62. package/dist/canvas-controller-5b727491.js +0 -2
  63. package/dist/canvas-controller-5b727491.js.map +0 -1
  64. package/dist/canvas-controller-f1489f81.js +0 -2
  65. package/dist/canvas-controller-f1489f81.js.map +0 -1
  66. package/dist/common-canvas-4807ed78.js +0 -2
  67. package/dist/common-canvas-4807ed78.js.map +0 -1
  68. package/dist/common-canvas-a41d6dc9.js +0 -2
  69. package/dist/common-canvas-a41d6dc9.js.map +0 -1
  70. package/dist/common-properties-75f30ccf.js +0 -2
  71. package/dist/common-properties-75f30ccf.js.map +0 -1
  72. package/dist/common-properties-e2a321a6.js +0 -2
  73. package/dist/common-properties-e2a321a6.js.map +0 -1
  74. package/dist/keyboard-utils-232a10e1.js +0 -2
  75. package/dist/keyboard-utils-232a10e1.js.map +0 -1
  76. package/dist/keyboard-utils-ce49412d.js +0 -2
  77. package/dist/keyboard-utils-ce49412d.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{_ as e,a as t,b as n}from"./createClass-a140e270.js";import{c as i,k as o,f as a}from"./en-e327741d.js";import{x as r,y as s,z as d,e as c,f as l,g as p,h as u,a as f,m as h,i as g,v as y}from"./isArrayLikeObject-1a51e928.js";import{h as m,f as v,C as b,D as _,g as k}from"./get-0aeefae2.js";import{b2 as P,Q as I,P as S,ay as j,aH as N,b3 as O,aE as E,U as T,a7 as w,_ as L,a4 as C,a3 as A,$ as x,O as D,M,R as U,V as F,ar as R,aP as B,b4 as H,b5 as G,b6 as q,b7 as z,b8 as V,as as $,at as W,b9 as Y,ba as X,bb as K,bc as J,bd as Z,be as Q,bf as ee,bg as te,bh as ne,bi as ie,bj as oe,bk as ae,bl as re,E as se,W as de,S as ce,I as le,bm as pe,bn as ue,bo as fe,bp as he,bq as ge,a0 as ye,au as me,br as ve,ad as be,av as _e,a8 as ke,a9 as Pe,aa as Ie,ab as Se,ac as je,a5 as Ne,a2 as Oe,bs as Ee,aS as Te}from"./canvas-constants-0c10edc8.js";import{_ as we,a as Le,b as Ce}from"./inherits-860188e5.js";import{o as Ae,A as xe,b as De,d as Me,u as Ue}from"./datarecord-metadata-v3-schema-7f12396b.js";import{C as Fe,s as Re}from"./common-canvas-utils-26fdf006.js";import Be from"./lib/command-stack.es.js";import{L as He}from"./canvas-logger-037c0c68.js";import{v4 as Ge}from"uuid";import{combineReducers as qe,createStore as ze}from"redux";import{Validator as Ve}from"jsonschema";import{extractVersion as $e,LATEST_VERSION as We,upgradePipelineFlow as Ye}from"@elyra/pipeline-schemas";var Xe={"menu.highlightBranch":"Highlight branch","menu.highlightUpstream":"Highlight upstream","menu.highlightDownstream":"Highlight downstream","menu.unhighlight":"Unhighlight","menu.highlight":"Highlight","edit.cutSelection":"Cut","edit.copySelection":"Copy","edit.pasteSelection":"Paste","canvas.label":"Canvas","canvas.addComment":"New comment","canvas.addWysiwygComment":"New WYSIWYG comment","canvas.selectAll":"Select all","canvas.deselectAll":"Deselect all","canvas.undo":"Undo","canvas.redo":"Redo","canvas.undoCommand":"Undo: {undo_command}","canvas.redoCommand":"Redo: {redo_command}","canvas.deleteObject":"Delete","canvas.flowIsEmpty":"Your flow is empty.","canvas.addNodeToStart":"Get started by adding a node.","canvas.stateTagLocked":"Locked","canvas.stateTagReadOnly":"Read-only","canvas.stateTagTipLocked":"This flow is locked and cannot be edited.","canvas.stateTagTipReadOnly":"This flow cannot be edited.","canvas.returnToPrevious":"Return to previous flow","comment.colorBackground":"Color background","comment.editComment":"Edit comment","node.createSupernode":"Create supernode","node.createSupernodeExternal":"Create external supernode","node.expandSupernode":"Expand supernode","node.displaySupernodeFullPage":"Display full page","node.collapseSupernodeInPlace":"Collapse supernode","node.deconstructSupernode":"Deconstruct supernode","node.convertSupernodeExternalToLocal":"Convert external to local","node.convertSupernodeLocalToExternal":"Convert local to external","node.renameNode":"Rename","canvas.validateFlow":"Validate Flow","node.editNode":"Open","node.editMenu":"Edit","node.disconnectNode":"Disconnect","node.saveToPalette":"Save to palette","link.deleteLink":"Delete","texttoolbar.headerAction":"Header","texttoolbar.boldAction":"Bold","texttoolbar.italicsAction":"Italics","texttoolbar.underline":"Underline","texttoolbar.strikethroughAction":"Strikethrough","texttoolbar.codeAction":"Code","texttoolbar.linkAction":"Link","texttoolbar.quoteAction":"Quote","texttoolbar.bulletedListAction":"Bulleted List","texttoolbar.numberedListAction":"Numbered List","texttoolbar.titleAction":"Title","texttoolbar.subheaderAction":"Subheader","texttoolbar.bodyAction":"Body","texttoolbar.fontAction":"Font","texttoolbar.fontIBMPlexSans":"IBM Plex Sans","texttoolbar.fontIBMPlexSerif":"IBM Plex Serif","texttoolbar.fontIBMPlexSansCon":"IBM Plex Sans Condensed","texttoolbar.fontIBMPlexMono":"IBM Plex Mono","texttoolbar.fontArial":"Arial","texttoolbar.fontComicSansMS":"Comic Sans MS","texttoolbar.fontGillSans":"Gill Sans","texttoolbar.fontHelveticaNeue":"Helvetica Neue","texttoolbar.fontTimesNewRoman":"Times New Roman","texttoolbar.fontVerdana":"Verdana","texttoolbar.textSize":"Text size","texttoolbar.colorText":"Color text","texttoolbar.alignHoriz":"Align horizontally","texttoolbar.alignHorizLeft":"Left","texttoolbar.alignHorizCenter":"Center","texttoolbar.alignHorizRight":"Right","texttoolbar.alignVert":"Align vertically","texttoolbar.alignVertTop":"Top","texttoolbar.alignVertMiddle":"Middle","texttoolbar.alignVertBottom":"Bottom","texttoolbar.colorBackground":"Color background","texttoolbar.outline":"Outline","texttoolbar.outlineNone":"No outline","texttoolbar.outlineSolid":"Solid outline"},Ke=r;var Je=function(e){return"function"==typeof e?e:Ke},Ze=s,Qe=d;var et=function(e,t){return e===t||Ze(e,t,Qe(t))},tt=s,nt=d;var it=function(e,t,n){return n="function"==typeof n?n:void 0,tt(e,t,nt(t),n)},ot={nodeLayout:{defaultNodeWidth:160,defaultNodeHeight:40,className:"",nodeShapeDisplay:!0,nodeShape:"port-arcs",bodyPath:null,selectionPath:null,nodeExternalObject:!1,imageDisplay:!0,imageWidth:26,imageHeight:26,imagePosition:"topLeft",imagePosX:6,imagePosY:7,labelDisplay:!0,labelWidth:112,labelHeight:19,labelPosition:"topLeft",labelPosX:36,labelPosY:12,labelEditable:!1,labelAlign:"left",labelSingleLine:!0,labelOutline:!1,labelMaxCharacters:null,labelAllowReturnKey:!1,decorations:[],decoratorTopY:2,decoratorMiddleY:-8,decoratorBottomY:-18,decoratorLeftX:2,decoratorCenterX:-8,decoratorRightX:-30,decoratorWidth:16,decoratorHeight:16,decoratorPadding:2,decoratorLabelWidth:80,decoratorLabelHeight:30,dropShadow:!0,nodeHighlightGap:1,nodeResizable:!1,nodeMovable:!0,nodeSizingArea:10,errorPosition:"topLeft",errorXPos:24,errorYPos:5,errorWidth:10.5,errorHeight:10.5,nodeCornerResizeArea:10,drawNodeLinkLineFromTo:"node_center",drawCommentLinkLineTo:"node_center",minInitialLine:30,minInitialLineIncrement:8,minFinalLine:30,inputPortDisplay:!0,inputPortDisplayObjects:[{type:"circleWithArrow"}],inputPortAutoPosition:!0,inputPortPositions:[{x_pos:0,y_pos:20,pos:"topLeft"}],inputPortGuideObjects:[{type:"circle"}],outputPortDisplay:!0,outputPortDisplayObjects:[{type:"circle"}],outputPortAutoPosition:!0,outputPortPositions:[{x_pos:0,y_pos:20,pos:"topRight"}],outputPortGuideObjects:[{type:"circle"}],autoSizeNode:!0,portRadius:3,portArcOffset:3,portArcRadius:6,portArcSpacing:3,contextToolbarPosition:"topRight",ellipsisDisplay:!0,ellipsisPosition:"topLeft",ellipsisWidth:10,ellipsisHeight:22,ellipsisPosX:145,ellipsisPosY:9,ellipsisHoverAreaPadding:2},canvasLayout:{supernodeLabelPosX:30,supernodeLabelPosY:4,supernodeLabelWidth:50,supernodeLabelHeight:20,supernodeImageWidth:18,supernodeImageHeight:18,supernodeImagePosX:5,supernodeImagePosY:4,supernodeEllipsisPosX:-34,supernodeEllipsisPosY:2,supernodeEllipsisWidth:10,supernodeEllipsisHeight:20,supernodeExpansionIconPosX:-21,supernodeExpansionIconPosY:4,supernodeExpansionIconHeight:18,supernodeExpansionIconWidth:18,supernodeExpansionIconHoverAreaPadding:2,supernodeErrorPosX:-50,supernodeErrorPosY:5,supernodeErrorWidth:14,supernodeErrorHeight:14,supernodeDefaultWidth:300,supernodeDefaultHeight:200,supernodeMinWidth:100,supernodeMinHeight:80,supernodeTopAreaHeight:25,supernodeSVGAreaPadding:3,supernodeBindingPortRadius:6,linkMethod:j,linkDirection:N,displayLinkOnOverlap:!0,linkGap:7,linkDecoratorHeight:20,linkDecoratorWidth:20,linkDecoratorPadding:2,linkDecoratorLabelWidth:80,linkDecoratorLabelHeight:30,elbowSize:10,wrapAroundSpacing:20,wrapAroundNodePadding:10,linkType:"Curve",commentLinkArrowHead:!1,dataLinkArrowHead:!1,linkContextToolbarPosX:0,linkContextToolbarPosY:0,linkDistanceForAltDecorations:150,linkAltDecorations:null,linkStartHandleObject:"circle",linkStartHandleImage:"",linkStartHandleWidth:12,linkStartHandleHeight:12,linkStartHandleRadius:5,linkEndHandleObject:"circle",linkEndHandleImage:"",linkEndHandleWidth:12,linkEndHandleHeight:12,linkEndHandleRadius:5,commentCornerResizeArea:10,commentHighlightGap:1,commentSizingArea:10,commentAutoSize:!0,addCommentOffsetX:30,addCommentOffsetY:50,commentPortRadius:5,commentToolbarPosX:-2,commentToolbarPosY:-36,alwaysDisplayBackToParentFlow:!1,zoomToFitPadding:10,snapToGridType:"None",snapToGridX:"20%",snapToGridY:"33.33%",displayGridType:"None",displayGridMajorX:"100%",displayGridMajorY:"100%",displayGridMinorX:"20%",displayGridMinorY:"33.33%",nodeProximity:20,ghostAreaPadding:10,initialPanX:null,initialPanY:null,autoLayoutInitialMarginX:50,autoLayoutInitialMarginY:50,autoLayoutVerticalSpacing:80,autoLayoutHorizontalSpacing:80}},at={nodeLayout:{defaultNodeWidth:70,defaultNodeHeight:75,className:"",nodeShapeDisplay:!0,nodeShape:"rectangle",bodyPath:null,selectionPath:null,nodeExternalObject:!1,imageDisplay:!0,imageWidth:48,imageHeight:48,imagePosition:"topLeft",imagePosX:11,imagePosY:6,labelDisplay:!0,labelWidth:72,labelHeight:19,labelPosition:"topLeft",labelPosX:35,labelPosY:55,labelEditable:!1,labelAlign:"center",labelSingleLine:!0,labelOutline:!1,labelMaxCharacters:null,labelAllowReturnKey:!1,decorations:[],decoratorTopY:5,decoratorMiddleY:-8,decoratorBottomY:-34,decoratorLeftX:10,decoratorCenterX:-8,decoratorRightX:-24,decoratorWidth:16,decoratorHeight:16,decoratorPadding:2,decoratorLabelWidth:80,decoratorLabelHeight:30,dropShadow:!1,nodeHighlightGap:4,nodeResizable:!1,nodeMovable:!0,nodeSizingArea:10,errorPosition:"topLeft",errorXPos:45,errorYPos:5,errorWidth:14,errorHeight:14,nodeCornerResizeArea:10,drawNodeLinkLineFromTo:"node_center",drawCommentLinkLineTo:"node_center",minInitialLine:30,minInitialLineIncrement:8,minFinalLine:30,inputPortDisplay:!0,inputPortDisplayObjects:[{type:"circleWithArrow"}],inputPortAutoPosition:!0,inputPortPositions:[{x_pos:0,y_pos:29,pos:"topLeft"}],inputPortGuideObjects:[{type:"circle"}],outputPortDisplay:!0,outputPortDisplayObjects:[{type:"circle"}],outputPortAutoPosition:!0,outputPortPositions:[{x_pos:0,y_pos:29,pos:"topRight"}],outputPortGuideObjects:[{type:"circle"}],autoSizeNode:!0,portRadius:6,portArcOffset:0,portArcRadius:10,portArcSpacing:0,contextToolbarPosition:"topCenter",ellipsisDisplay:!0,ellipsisPosition:"topLeft",ellipsisWidth:11,ellipsisHeight:21,ellipsisPosX:57,ellipsisPosY:4,ellipsisHoverAreaPadding:2},canvasLayout:{supernodeLabelPosX:30,supernodeLabelPosY:4,supernodeLabelWidth:50,supernodeLabelHeight:20,supernodeImageWidth:18,supernodeImageHeight:18,supernodeImagePosX:5,supernodeImagePosY:4,supernodeEllipsisPosX:-34,supernodeEllipsisPosY:2,supernodeEllipsisWidth:10,supernodeEllipsisHeight:20,supernodeExpansionIconPosX:-21,supernodeExpansionIconPosY:4,supernodeExpansionIconHeight:18,supernodeExpansionIconWidth:18,supernodeExpansionIconHoverAreaPadding:2,supernodeErrorPosX:-50,supernodeErrorPosY:5,supernodeErrorWidth:14,supernodeErrorHeight:14,supernodeDefaultWidth:200,supernodeDefaultHeight:200,supernodeMinWidth:100,supernodeMinHeight:80,supernodeTopAreaHeight:25,supernodeSVGAreaPadding:3,supernodeBindingPortRadius:10,linkMethod:j,linkDirection:N,displayLinkOnOverlap:!0,linkGap:7,linkDecoratorHeight:20,linkDecoratorWidth:20,linkDecoratorPadding:2,linkDecoratorLabelWidth:80,linkDecoratorLabelHeight:30,elbowSize:10,wrapAroundSpacing:20,wrapAroundNodePadding:10,linkType:"Curve",commentLinkArrowHead:!1,dataLinkArrowHead:!1,linkContextToolbarPosX:0,linkContextToolbarPosY:0,linkDistanceForAltDecorations:150,linkAltDecorations:null,linkStartHandleObject:"circle",linkStartHandleImage:"",linkStartHandleWidth:12,linkStartHandleHeight:12,linkStartHandleRadius:6,linkEndHandleObject:"circle",linkEndHandleImage:"",linkEndHandleWidth:12,linkEndHandleHeight:12,linkEndHandleRadius:6,commentCornerResizeArea:10,commentHighlightGap:4,commentSizingArea:10,commentAutoSize:!0,addCommentOffsetX:30,addCommentOffsetY:50,commentPortRadius:5,commentToolbarPosX:-2,commentToolbarPosY:-36,alwaysDisplayBackToParentFlow:!1,zoomToFitPadding:10,snapToGridType:"None",snapToGridX:"25%",snapToGridY:"20%",displayGridType:"None",displayGridMajorX:"100%",displayGridMajorY:"100%",displayGridMinorX:"25%",displayGridMinorY:"20%",nodeProximity:20,ghostAreaPadding:10,initialPanX:null,initialPanY:null,autoLayoutInitialMarginX:50,autoLayoutInitialMarginY:50,autoLayoutVerticalSpacing:80,autoLayoutHorizontalSpacing:80}},rt=function(){return e(function e(){t(this,e)},null,[{key:"getLayout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getDefaultLayout(e);return e&&(n=this.overridePortPositions(n,e),n=this.overrideNodeResizable(n,e),n=this.overrideNodeLayout(n,t),n=this.overrideCanvasLayout(n,e,t),n=this.overrideLinkType(n,e),n=this.overrideSnapToGrid(n,e),n=this.overrideDisplayGrid(n,e),n=this.overrideAutoLayout(n,e),n=this.overrideArrowHead(n,e)),n}},{key:"getDefaultLayout",value:function(e){var t=e&&e.enableNodeFormatType===P?at:ot;return i(t)}},{key:"overrideNodeResizable",value:function(e,t){return e.nodeLayout.nodeResizable=t.enableResizableNodes,e}},{key:"overrideNodeLayout",value:function(e,t){return e.nodeLayout=Object.assign({},e.nodeLayout,t.nodeLayout||{}),e}},{key:"overrideCanvasLayout",value:function(e,t,n){var i="Straight"===t.enableLinkType&&t.enableStraightLinksAsFreeform?I:t.enableLinkMethod,o=t.enableLinkDirection;return e.canvasLayout=Object.assign({},e.canvasLayout,{linkMethod:i,linkDirection:o},n.canvasLayout||{}),e}},{key:"overrideLinkType",value:function(e,t){return e.canvasLayout.linkType=t.enableLinkType||e.canvasLayout.linkType||"Curve",e}},{key:"overrideSnapToGrid",value:function(e,t){return t.enableSnapToGridType&&(e.canvasLayout.snapToGridType=t.enableSnapToGridType),e.canvasLayout.snapToGridX=t.enableSnapToGridX||e.canvasLayout.snapToGridX||"25%",e.canvasLayout.snapToGridY=t.enableSnapToGridY||e.canvasLayout.snapToGridY||"20%",e.canvasLayout.snapToGridXPx=this.getGridSize(e.canvasLayout.snapToGridX,e.nodeLayout.defaultNodeWidth),e.canvasLayout.snapToGridYPx=this.getGridSize(e.canvasLayout.snapToGridY,e.nodeLayout.defaultNodeHeight),e}},{key:"overrideDisplayGrid",value:function(e,t){var n=t&&t.enableNodeFormatType===P?at.canvasLayout:ot.canvasLayout,i=n.displayGridMajorX,o=n.displayGridMajorY,a=n.displayGridMinorX,r=n.displayGridMinorY;return e.canvasLayout.displayGridMajorX=e.canvasLayout.displayGridMajorX||i,e.canvasLayout.displayGridMajorY=e.canvasLayout.displayGridMajorY||o,e.canvasLayout.displayGridMinorX=e.canvasLayout.displayGridMinorX||a,e.canvasLayout.displayGridMinorY=e.canvasLayout.displayGridMinorY||r,e.canvasLayout.displayGridMajorPx=this.getGridSize(e.canvasLayout.displayGridMajorX,e.nodeLayout.defaultNodeWidth),e.canvasLayout.displayGridMajorPy=this.getGridSize(e.canvasLayout.displayGridMajorY,e.nodeLayout.defaultNodeHeight),e.canvasLayout.displayGridMinorPx=this.getGridSize(e.canvasLayout.displayGridMinorX,e.nodeLayout.defaultNodeWidth),e.canvasLayout.displayGridMinorPy=this.getGridSize(e.canvasLayout.displayGridMinorY,e.nodeLayout.defaultNodeHeight),e}},{key:"overrideAutoLayout",value:function(e,t){return e.canvasLayout.autoLayoutVerticalSpacing=this.getAutoLayoutSpacing(t.enableAutoLayoutVerticalSpacing,e.canvasLayout.autoLayoutVerticalSpacing),e.canvasLayout.autoLayoutHorizontalSpacing=this.getAutoLayoutSpacing(t.enableAutoLayoutHorizontalSpacing,e.canvasLayout.autoLayoutHorizontalSpacing),e}},{key:"getAutoLayoutSpacing",value:function(e,t){var n=80;return null!=e?n=e:null!=t&&(n=t),n}},{key:"getGridSize",value:function(e,t){return e.endsWith("%")?Number.parseFloat(e)/100*t:Number.parseFloat(e)}},{key:"overridePortPositions",value:function(e,t){if("BottomTop"===t.enableLinkDirection)e.nodeLayout.inputPortPositions=[{x_pos:0,y_pos:0,pos:"bottomCenter"}],e.nodeLayout.outputPortPositions=[{x_pos:0,y_pos:0,pos:"topCenter"}];else if("TopBottom"===t.enableLinkDirection)e.nodeLayout.inputPortPositions=[{x_pos:0,y_pos:0,pos:"topCenter"}],e.nodeLayout.outputPortPositions=[{x_pos:0,y_pos:0,pos:"bottomCenter"}];else if("RightLeft"===t.enableLinkDirection){var n=e.nodeLayout.inputPortPositions[0].y_pos;e.nodeLayout.inputPortPositions=[{x_pos:0,y_pos:n,pos:"topRight"}],e.nodeLayout.outputPortPositions=[{x_pos:0,y_pos:n,pos:"topLeft"}]}return e}},{key:"overrideArrowHead",value:function(e,t){return(t.enableLinkMethod===I||t.enableStraightLinksAsFreeform&&t.enableLinkType===S)&&!e.canvasLayout.dataLinkArrowHead&&(e.canvasLayout.dataLinkArrowHead=!0),e}}])}(),st=function(){return e(function e(){t(this,e)},null,[{key:"mergeCanvasConfigs",value:function(e,t){var n=Object.assign({},e,t||{});if(t){var i=rt.getLayout(n,{nodeLayout:t.enableNodeLayout,canvasLayout:t.enableCanvasLayout}),o=Object.assign({},e.tipConfig,t.tipConfig);n=Object.assign({},n,{enableNodeLayout:i.nodeLayout,enableCanvasLayout:i.canvasLayout,tipConfig:o})}return n}},{key:"getDefaultCanvasConfig",value:function(){var e={enableInteractionType:"Mouse",enableNodeFormatType:O,enableLinkType:"Curve",enableStraightLinksAsFreeform:!0,enableLinkMethod:"Ports",enableLinkDirection:"LeftRight",enableLinkSelection:E,enableLinkReplaceOnNewConnection:!1,enableSplitLinkDroppedOnNode:!1,enableRaiseLinksToTopOnHover:!1,enableSelfRefLinks:!1,enableAssocLinkCreation:!1,enableAssocLinkType:T,enableDragWithoutSelect:!1,enableInternalObjectModel:!0,enablePaletteLayout:w,enablePaletteHeader:null,enableToolbarLayout:"Top",enableImageDisplay:"SVGInline",enableResizableNodes:!1,enableInsertNodeDroppedOnLink:!1,enableHighlightNodeOnNewLinkDrag:!1,enableHighlightUnavailableNodes:!1,enableMoveNodesOnSupernodeResize:!0,enableRaiseNodesToTopOnHover:!0,enableExternalPipelineFlows:!0,enableEditingActions:!0,enableDisplayFullLabelOnHover:!1,enableDropZoneOnExternalDrag:!1,enableLeftFlyoutUnderToolbar:!1,enableRightFlyoutUnderToolbar:!1,enableRightFlyoutDragToResize:!1,enablePanIntoViewOnOpen:!1,enableZoomIntoSubFlows:!1,enableBrowserEditMenu:!0,enableMarkdownInComments:!1,enableMarkdownHTML:!0,enableWYSIWYGComments:!1,enableKeyboardNavigation:!1,enableAutoLinkOnlyFromSelNodes:!1,enableSingleClickAddFromPalette:!1,enableContextToolbar:!1,enableSaveZoom:"None",enableSnapToGridType:"None",enableSnapToGridX:null,enableSnapToGridY:null,enableAutoLayoutVerticalSpacing:null,enableAutoLayoutHorizontalSpacing:null,enableSingleOutputPortDisplay:!1,enableNarrowPalette:!0,schemaValidation:!1,enableFocusOnMount:!0,enableBoundingRectangles:!1,enableCanvasUnderlay:"None",enableParentClass:"",enablePositionNodeOnRightFlyoutOpen:!1,emptyCanvasContent:null,dropZoneCanvasContent:null,enableNodeLayout:{},enableCanvasLayout:{},enableUseCardFromOriginalPorts:!1,tipConfig:{palette:{categories:!0,nodeTemplates:!0},nodes:!0,ports:!0,decorations:!0,links:!0,stateTag:!0}},t=rt.getLayout(e);return e.enableNodeLayout=t.nodeLayout,e.enableCanvasLayout=t.canvasLayout,e}},{key:"compareCanvasConfigsOmitFields",value:function(e,t){var n=this.omitFields(e),i=this.omitFields(t);return this.compareCanvasConfigs(n,i)}},{key:"compareCanvasConfigs",value:function(e,t){var n=this,i=!1;return Object.keys(e).length===Object.keys(t).length&&(i=it(e,t,function(e,t,i){switch(i){case"enablePositionNodeOnRightFlyoutOpen":return n.enableNodeRightFlyoutOpenExactlyMatches(e,t);case"enableCanvasLayout":return n.enableCanvasLayoutExactlyMatches(e,t);case"enableNodeLayout":return n.enableNodeLayoutExactlyMatches(e,t);case"tipConfig":return n.enableTipConfigExactlyMatches(e,t);default:return e===t}})),i}},{key:"omitFields",value:function(e){return Ae(e,["enableEditingActions","enableDropZoneOnExternalDrag","enableStateTag","enablePaletteHeader","enableKeyboardNavigation","enableRightFlyoutDragToResize"])}},{key:"enableNodeRightFlyoutOpenExactlyMatches",value:function(e,t){return"boolean"==typeof e&&"boolean"==typeof t?e===t:"object"===n(e)&&"object"===n(t)&&e.x===t.x&&e.y===t.y}},{key:"enableCanvasLayoutExactlyMatches",value:function(e,t){return!e&&!t||!(!this.compareFieldCount(e,t)||!et(e,t))}},{key:"enableNodeLayoutExactlyMatches",value:function(e,t){return!e&&!t||!!(this.compareFieldCount(e,t)&&et(e,t)&&this.decorationsArraysExactlyMatches(e.decorations,t.decorations))}},{key:"decorationsArraysExactlyMatches",value:function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=!0;return e.forEach(function(e,i){var o=t[i];o&&et(e,o)&&et(o,e)||(n=!1)}),n}},{key:"enableTipConfigExactlyMatches",value:function(e,t){return!e&&!t||!(!e||!t)&&(this.compareFieldCount(e,t)&&et(e,t))}},{key:"compareFieldCount",value:function(e,t){return Object.keys(e).length===Object.keys(t).length}}])}();function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lt=function(){return!!e})()}var pt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,r=Le(r=n),(o=Ce(a,lt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.layoutDirection=e.layoutDirection,o.apiPipeline=o.objectModel.getAPIPipeline(),o.existingNodes=o.apiPipeline.getNodes().map(function(e){return ct({},e)}),o.existingLinks=o.apiPipeline.getLinks().map(function(e){return ct({},e)}),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.autoLayout(this.layoutDirection)}},{key:"undo",value:function(){this.apiPipeline.replaceNodes(this.existingNodes),this.apiPipeline.updateLinks(this.existingLinks)}},{key:"redo",value:function(){this.apiPipeline.autoLayout(this.layoutDirection)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.arrangeLayout")}}])}();function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ut=function(){return!!e})()}var ft=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,ut()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.node=e.node,o.linksToUpdateInfo=Fe.getDetachedLinksToUpdate(o.node,o.data.detachedLinks,o.apiPipeline.getNodeDataLinks()),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.linksToUpdateInfo=this.linksToUpdateInfo,this.data}},{key:"do",value:function(){this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:this.data.offsetX,offsetY:this.data.offsetY}),this.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks)}},{key:"undo",value:function(){this.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:-this.data.offsetX,offsetY:-this.data.offsetY})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.attachNodeToLinks",{node_label:this.node.label})}}])}();function ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ht=function(){return!!e})()}var gt=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,ht()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.pipelineFlowLoaded=o.objectModel.ensurePipelineIsLoaded(o.data),o.oldSupernode=o.apiPipeline.getNode(o.data.targetObject.id),o.oldPipelines=o.objectModel.getDescPipelinesToDelete([o.oldSupernode],o.data.pipelineId),o.oldPipelines=o.oldPipelines.filter(function(e){return e.parentUrl===o.data.externalUrl}),o.oldExtPipelineFlows=o.objectModel.getExternalPipelineFlowsForPipelines(o.oldPipelines),o.newSupernode=Object.assign({},o.oldSupernode,{subflow_ref:Object.assign({},o.oldSupernode.subflow_ref)}),o.newSupernode.image=o.newSupernode.image===C?A:o.newSupernode.image,delete o.newSupernode.subflow_ref.url;var d=o.objectModel.getDescendantPipelinesForSupernode(o.newSupernode).filter(function(e){return e.parentUrl===o.data.externalUrl});return o.newPipelines=o.objectModel.cloneSupernodeContents(o.newSupernode,d),o.newPipelines=o.newPipelines.map(function(e){return delete e.parentUrl,e}),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.newSupernode,pipelinesToAdd:this.newPipelines,pipelinesToRemove:this.oldPipelines,extPipelineFlowsToAdd:[],extPipelineFlowsToDelete:this.oldExtPipelineFlows})}},{key:"undo",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.oldSupernode,pipelinesToAdd:this.oldPipelines,pipelinesToRemove:this.newPipelines,extPipelineFlowsToAdd:this.oldExtPipelineFlows,extPipelineFlowsToDelete:[]})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.convertSuperNodeExternalToLocal",{node_label:this.oldSupernode.label})}}])}();function yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yt=function(){return!!e})()}var mt=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,yt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.oldSupernode=o.apiPipeline.getNode(o.data.targetObject.id),o.newSupernode=Object.assign({},o.oldSupernode,{subflow_ref:Object.assign({},o.oldSupernode.subflow_ref)}),o.newSupernode.image=o.newSupernode.image===A?C:o.newSupernode.image,o.newSupernode.subflow_ref.url=o.data.externalUrl;var d=o.objectModel.getDescendantPipelinesForSupernode(o.oldSupernode);return o.oldPipelines=d.filter(function(e){return!e.parentUrl}),o.newPipelines=o.objectModel.cloneSupernodeContents(o.newSupernode,o.oldPipelines),o.newPipelines=o.newPipelines.map(function(e){return e.parentUrl=o.data.externalUrl,e}),o.newPipelineFlow=o.objectModel.createExternalPipelineFlowTemplate(o.data.pipelineFlowId,o.newSupernode.subflow_ref.pipeline_id_ref),o.newPipelineFlow.pipelines=[],o.newPipelineFlow.url=o.data.externalUrl,o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.newSupernode,pipelinesToAdd:this.newPipelines,pipelinesToRemove:this.oldPipelines,extPipelineFlowsToAdd:[this.newPipelineFlow],extPipelineFlowsToDelete:[]})}},{key:"undo",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.oldSupernode,pipelinesToAdd:this.oldPipelines,pipelinesToRemove:this.newPipelines,extPipelineFlowsToAdd:[],extPipelineFlowsToDelete:[this.newPipelineFlow]})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.convertSuperNodeLocalToExternal",{node_label:this.oldSupernode.label})}}])}();function vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vt=function(){return!!e})()}var bt=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,vt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.data.addLink=void 0===o.data.addLink||o.data.addLink;var d=i.getCanvasConfig().enableAutoLinkOnlyFromSelNodes;return o.srcNode=o.apiPipeline.getAutoSourceNode(d),o.newNode=o.apiPipeline.createAutoNode(e,o.srcNode),o.newLink=null,o.data.addLink&&o.apiPipeline.isLinkNeededWithAutoNode(o.newNode,o.srcNode)&&(o.newLink=o.apiPipeline.createLink(o.newNode,o.srcNode)),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.sourceNode=this.srcNode,this.data.newNode=this.newNode,this.data.newLink=this.newLink,this.data.subPipeline=this.subPipelines,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode),this.newLink&&this.apiPipeline.addLink(this.newLink),this.objectModel.setSelections([this.newNode.id],this.data.pipelineId)}},{key:"undo",value:function(){this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNode",{node_label:this.newNode.label})}}])}();function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}var kt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,_t()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.comment=o.apiPipeline.createComment(e),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.comment=this.comment,this.data}},{key:"do",value:function(){this.apiPipeline.addComment(this.comment),this.focusObject=this.comment}},{key:"undo",value:function(){this.apiPipeline.deleteComment(this.comment.id),this.focusObject=x}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createComment")}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pt=function(){return!!e})()}var It=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Pt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.linkCommentList=o.apiPipeline.createCommentLinks(e),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.linkIds=this.linkCommentList.map(function(e){return e.id}),this.data.linkType="comment",this.data}},{key:"do",value:function(){this.apiPipeline.addLinks(this.linkCommentList)}},{key:"undo",value:function(){var e=this;this.linkCommentList.forEach(function(t){e.apiPipeline.deleteLink(t)})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createCommentLink")}}])}();function St(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(St=function(){return!!e})()}var jt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,St()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.newNode=o.apiPipeline.createNode(e),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.subPipelines=this.subPipelines,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode)}},{key:"undo",value:function(){this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNode",{node_label:this.newNode.label})}}])}();function Nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nt=function(){return!!e})()}var Ot=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Nt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.actionLabel=o.createActionLabel(),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.linkIds=this.linkNodeList.map(function(e){return e.id}),this.data.linkType="data",this.data}},{key:"do",value:function(){this.data.replaceLink&&this.apiPipeline.deleteLink(this.data.replaceLink),this.linkNodeList=this.apiPipeline.createNodeLinks(this.data),this.apiPipeline.addLinks(this.linkNodeList)}},{key:"undo",value:function(){var e=this;this.linkNodeList.forEach(function(t){e.apiPipeline.deleteLink(t)}),this.data.replaceLink&&this.apiPipeline.addLinks([this.data.replaceLink])}},{key:"redo",value:function(){this.data.replaceLink&&this.apiPipeline.deleteLink(this.data.replaceLink),this.apiPipeline.addLinks(this.linkNodeList)}},{key:"getLabel",value:function(){return this.actionLabel}},{key:"createActionLabel",value:function(){var e=this.getTargetNodeLabel();return this.data.replaceLink?this.labelUtil.getActionLabel(this,"action.replaceNodeLink",{node_label:e}):this.labelUtil.getActionLabel(this,"action.createNodeLink",{node_label:e})}},{key:"getTargetNodeLabel",value:function(){return(this.data.targetNodes&&this.data.targetNodes.length>0?this.apiPipeline.getNode(this.data.targetNodes[0].id):{}).label}}])}();function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Et=function(){return!!e})()}var Tt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Et()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.detachedLink=o.apiPipeline.createNodeLinkDetached(e),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data}},{key:"do",value:function(){this.apiPipeline.addLinks([this.detachedLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink(this.detachedLink)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeLinkDetached")}}])}();function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}var Lt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,wt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.newNode=o.apiPipeline.createNode(e),o.firstLinkSrcInfo={id:e.link.srcNodeId,portId:e.link.srcNodePortId},o.firstLinkTrgInfo={id:o.newNode.id},o.secondLinkSrcInfo={id:o.newNode.id},o.secondLinkTrgInfo={id:e.link.trgNodeId,portId:e.link.trgNodePortId},o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.newFirstLink=this.firstLink,this.data.newSecondLink=this.secondLink,this.data}},{key:"do",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.addNode(this.newNode),this.firstLink=this.apiPipeline.createNodeLink(this.firstLinkSrcInfo,this.firstLinkTrgInfo),this.secondLink=this.apiPipeline.createNodeLink(this.secondLinkSrcInfo,this.secondLinkTrgInfo),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink({id:this.firstLink.id}),this.apiPipeline.deleteLink({id:this.secondLink.id}),this.apiPipeline.deleteNodes([this.newNode]),this.apiPipeline.addLinks([this.data.link])}},{key:"redo",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.addNode(this.newNode),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeOnLink",{node_label:this.newNode.label})}}])}();function Ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ct=function(){return!!e})()}var At=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Ct()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.newNode=o.apiPipeline.createNode(e),o.linksToUpdateInfo=Fe.getDetachedLinksToUpdate(o.newNode,o.data.detachedLinks,o.apiPipeline.getNodeDataLinks()),o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.linksToUpdateInfo=this.linksToUpdateInfo,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode),this.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks)}},{key:"undo",value:function(){this.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks),this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeAttachLinks",{node_label:this.newNode.label})}}])}();function xt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Dt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mt=function(){return!!e})()}var Ut=80,Ft=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Mt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.data=e,o.useCardFromOriginalPorts=i.getCanvasConfig().enableUseCardFromOriginalPorts,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.subflowNodes=o.objectModel.getSelectedNodes(),o.subflowComments=o.objectModel.getSelectedComments(),o.subflowRect=o.apiPipeline.getBoundingRectForNodes(o.subflowNodes),o.linksToDelete=[];var d=o.getUniqueSubflowLinks(o.data.selectedObjectIds);return o.subflowNodeLinks=o.getSubflowNodeLinks(d),o.subflowCommentLinks=o.getSubflowCommentLinks(d),o.subflowCommentLinks=o.filterCommentLinks(o.subflowCommentLinks,o.subflowComments),o.subflowLinks=o.subflowNodeLinks.concat(o.subflowCommentLinks),o.subflowInputLinks=o.createOrderedSubflowInputLinks(o.subflowNodeLinks),o.subflowOutputLinks=o.createOrderedSubflowOutputLinks(o.subflowNodeLinks),o.subPipeline=o.objectModel.createPipeline(o.subflowNodes,o.subflowComments,o.subflowLinks),o.subAPIPipeline=o.objectModel.getAPIPipeline(o.subPipeline.id),o.bindingInputData=o.getBindingInputData(o.subflowInputLinks,o.subflowRect),o.bindingOutputData=o.getBindingOutputData(o.subflowOutputLinks,o.subflowRect),o.supernode=o.createSupernode(o.bindingInputData,o.bindingOutputData),o.supernodeLinkDefs=o.createSupernodeLinkDefs(o.bindingInputData,o.bindingOutputData,o.supernode),o.bindingNodeLinkDefs=o.createBindingNodeLinkDefs(o.bindingInputData,o.bindingOutputData),o.data.externalUrl&&o.handleExternalSubflow(),o}return we(n,xe),e(n,[{key:"getUniqueSubflowLinks",value:function(e){var t=this,n=[];return e.forEach(function(e){t.apiPipeline.getLinksContainingId(e).forEach(function(e){n.find(function(t){return t.id===e.id})||n.push(e)})}),n}},{key:"getSubflowNodeLinks",value:function(e){return e.filter(function(e){return e.type===D||e.type===M})}},{key:"getSubflowCommentLinks",value:function(e){return e.filter(function(e){return e.type===U})}},{key:"filterCommentLinks",value:function(e,t){var n=this,i=[];return e.forEach(function(e){var t=n.apiPipeline.getComment(e.srcNodeId);n.apiPipeline.isObjectIdInObjects(t.id,n.subflowComments)?i.push(e):n.apiPipeline.isCommentLinkedToNonSelectedNodes(t.id)?n.linksToDelete.push(e):(i.push(e),n.subflowComments.push(t))}),i=this.removeCommentLinksToUnselectedNodes(i,t)}},{key:"removeCommentLinksToUnselectedNodes",value:function(e,t){var n,i=this,o=e,a=[],r=xt(t);try{for(r.s();!(n=r.n()).done;){var s=n.value;this.apiPipeline.isCommentLinkedToNonSelectedNodes(s.id)&&a.push(s)}}catch(e){r.e(e)}finally{r.f()}return a.forEach(function(e){i.apiPipeline.getLinksContainingId(e.id).forEach(function(e){i.apiPipeline.isObjectIdInObjects(e.trgNodeId,i.subflowNodes)||i.apiPipeline.isObjectIdInObjects(e.id,i.linksToDelete)||(o=o.filter(function(t){return t.id!==e.id}),i.linksToDelete.push(e))})}),o}},{key:"createOrderedSubflowInputLinks",value:function(e){var t=this,n=[];return e.forEach(function(e){t.apiPipeline.isObjectIdInObjects(e.srcNodeId,t.subflowNodes)||n.find(function(t){return t.id===e.trgNodeId})||(e.type===M?t.removeLinkFromSubflow(e,!0):(n.push(e),t.removeLinkFromSubflow(e,!1)))}),n=this.reorderSubflowLinks(n,"input")}},{key:"createOrderedSubflowOutputLinks",value:function(e){var t=this,n=[];return e.forEach(function(e){t.apiPipeline.isObjectIdInObjects(e.trgNodeId,t.subflowNodes)||n.find(function(t){return t.id===e.srcNodeId})||(e.type===M?t.removeLinkFromSubflow(e,!0):(n.push(e),t.removeLinkFromSubflow(e,!1)))}),n=this.reorderSubflowLinks(n,"output")}},{key:"handleExternalSubflow",value:function(){var e=Fe.filterSupernodes(this.subflowNodes),t=this.objectModel.getDescendantPipelinesForSupernodes(e);this.descPipelines=t.filter(function(e){return!e.parentUrl}),this.newPipelineFlow=this.objectModel.createExternalPipelineFlowTemplate(this.data.externalPipelineFlowId,this.supernode.subflow_ref.pipeline_id_ref)}},{key:"createSupernode",value:function(e,t){var n=e.map(function(e){return e.supernodePort}),i=t.map(function(e){return e.supernodePort}),o={label:this.labelUtil.getLabel("supernode.template.label"),description:this.labelUtil.getLabel("supernode.template.description"),image:this.data.externalUrl?C:A,inputs:n,outputs:i,type:F,subflow_ref:{pipeline_id_ref:this.subPipeline.id}};this.data.externalUrl&&(o.subflow_ref.url=this.data.externalUrl);var a=this.getTopLeftNode(this.subflowNodes),r={nodeTemplate:o,offsetX:a.x_pos,offsetY:a.y_pos};return this.apiPipeline.createNode(r)}},{key:"reorderSubflowLinks",value:function(e,t){var n=this;if(e.length>1){var i=De(e),o="input"===t?"srcNodeId":"trgNodeId",a="input"===t?"srcPos":"trgPos";return i.sort(function(e,t){var i=n.apiPipeline.getNode(e[o]),r=n.apiPipeline.getNode(t[o]),s=e[a]?e[a].y_pos:i.y_pos,d=t[a]?t[a].y_pos:r.y_pos;return s<d?-1:s>d?1:0}),i}return e}},{key:"getTopLeftNode",value:function(e){var t=this,n=e[0],i=this.getDistanceFromPosition(this.subflowRect.x,this.subflowRect.y,e[0]);return e.forEach(function(e){var o=t.getDistanceFromPosition(t.subflowRect.x,t.subflowRect.y,e);o<i&&(i=o,n=e)}),n}},{key:"getDistanceFromPosition",value:function(e,t,n){var i=n.x_pos-e,o=n.y_pos-t;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}},{key:"getBindingInputData",value:function(e,t){var n=this,i=[],o=t.y-Ut;return e.forEach(function(e){var a=n.apiPipeline.getNode(e.trgNodeId),r=Object.assign({},n.findPort(e.trgNodePortId,a.inputs));r.id=n.generateUniquePortId(r,e.trgNodeId,i),r.label=n.labelUtil.getLabel("supernode.new.port.label"),n.useCardFromOriginalPorts||(r.cardinality={min:0,max:1});var s=Object.assign({},r),d={x:t.x-160,y:o+=Ut};s.id=s.id?"output_"+s.id:s.id;var c=n.createBindingNode(e,{outputs:[s],isSupernodeInputBinding:!0},d);i.push({link:e,supernodePort:r,bindingNode:c})}),i}},{key:"getBindingOutputData",value:function(e,t){var n=this,i=[],o=t.y-Ut;return e.forEach(function(e){var a=n.apiPipeline.getNode(e.srcNodeId),r=Object.assign({},n.findPort(e.srcNodePortId,a.outputs));r.id=n.generateUniquePortId(r,e.srcNodeId,i),r.label=n.labelUtil.getLabel("supernode.new.port.label"),n.useCardFromOriginalPorts||(r.cardinality={min:0,max:1});var s=Object.assign({},r),d={x:t.x+t.width+Ut,y:o+=Ut};s.id=s.id?"input_"+s.id:s.id;var c=n.createBindingNode(e,{inputs:[s],isSupernodeOutputBinding:!0},d);i.push({link:e,supernodePort:r,bindingNode:c})}),i}},{key:"findPort",value:function(e,t){if(null!=e){var n=Fe.getPort(e,t);if(n)return n}return t[0]}},{key:"generateUniquePortId",value:function(e,t,n){var i=e.id?t+"_"+e.id:e.id,o=this.occurancesStartingWith(i,n);return o>0&&(i+="_"+o),i}},{key:"occurancesStartingWith",value:function(e,t){return t.filter(function(t){return t.supernodePort.id.startsWith(e)}).length}},{key:"createBindingNode",value:function(e,t,n){var i={description:this.labelUtil.getLabel("supernode.binding.node.description"),label:this.labelUtil.getLabel("supernode.binding.node.label"),type:"binding"},o={editType:"createNode",nodeTemplate:Object.assign(i,t),offsetX:n.x,offsetY:n.y};return this.subAPIPipeline.createNode(o)}},{key:"removeLinkFromSubflow",value:function(e,t){this.subflowLinks=this.subflowLinks.filter(function(t){return t.id!==e.id}),t&&this.linksToDelete.push(e)}},{key:"createSupernodeLinkDefs",value:function(e,t,n){var i=[];return e.forEach(function(e){var t={srcInfo:{},trgInfo:{}};e.link.srcPos?t.srcInfo.srcPos=e.link.srcPos:(t.srcInfo.id=e.link.srcNodeId,t.srcInfo.portId=e.link.srcNodePortId),t.trgInfo.id=n.id,t.trgInfo.portId=e.supernodePort.id,i.push(t)}),t.forEach(function(e){var t={srcInfo:{},trgInfo:{}};t.srcInfo.id=n.id,t.srcInfo.portId=e.supernodePort.id,e.link.trgPos?t.trgInfo.trgPos=e.link.trgPos:(t.trgInfo.id=e.link.trgNodeId,t.trgInfo.portId=e.link.trgNodePortId),i.push(t)}),i}},{key:"createBindingNodeLinkDefs",value:function(e,t){var n=[];return e.forEach(function(e){n.push({srcInfo:{id:e.bindingNode.id,portId:e.bindingNode.outputs[0].id},trgInfo:{id:e.link.trgNodeId,portId:e.link.trgNodePortId}})}),t.forEach(function(e){n.push({srcInfo:{id:e.link.srcNodeId,portId:e.link.srcNodePortId},trgInfo:{id:e.bindingNode.id,portId:e.bindingNode.inputs[0].id}})}),n}},{key:"getData",value:function(){return this.data.newNode=this.supernode,this.data.newLinks=this.newLinks,this.data.subPipelineId=this.subPipeline.id,this.data}},{key:"do",value:function(){var e=this;if(this.apiPipeline.deleteNodes(this.subflowNodes,!1),this.apiPipeline.deleteComments(this.subflowComments),this.apiPipeline.deleteLinks(this.linksToDelete),this.apiPipeline.addSupernode(this.supernode,[this.subPipeline]),this.bindingInputData.forEach(function(t){e.apiPipeline.setInputPortSubflowNodeRef(e.supernode.id,t.supernodePort.id,t.bindingNode.id)}),this.bindingOutputData.forEach(function(t){e.apiPipeline.setOutputPortSubflowNodeRef(e.supernode.id,t.supernodePort.id,t.bindingNode.id)}),this.newLinks=[],this.supernodeLinkDefs.forEach(function(t){e.newLinks.push(e.apiPipeline.createNodeLink(t.srcInfo,t.trgInfo))}),this.apiPipeline.addLinks(this.newLinks),this.bindingInputData.forEach(function(t){e.subAPIPipeline.addNode(t.bindingNode)}),this.bindingOutputData.forEach(function(t){e.subAPIPipeline.addNode(t.bindingNode)}),this.subflowNewLinks=[],this.bindingNodeLinkDefs.forEach(function(t){e.subflowNewLinks.push(e.subAPIPipeline.createNodeLink(t.srcInfo,t.trgInfo))}),this.subAPIPipeline.addLinks(this.subflowNewLinks),this.data.externalUrl){this.objectModel.addExternalPipelineFlow(this.newPipelineFlow,this.data.externalUrl,null,!1);var t=[this.subPipeline].concat(this.descPipelines);this.objectModel.setParentUrl(t,this.data.externalUrl)}this.focusObject=this.supernode}},{key:"undo",value:function(){var e=this;this.data.externalUrl&&(this.objectModel.setParentUrl(this.descPipelines),this.objectModel.removeExternalPipelineFlow(this.data.externalUrl)),this.apiPipeline.deleteSupernodes([this.supernode],[this.subPipeline],[]),this.subflowNodes.forEach(function(t){e.apiPipeline.addNode(t)}),this.subflowComments.forEach(function(t){e.apiPipeline.addComment(t)}),this.apiPipeline.addLinks(this.subflowLinks),this.apiPipeline.addLinks(this.subflowInputLinks),this.apiPipeline.addLinks(this.subflowOutputLinks),this.apiPipeline.addLinks(this.linksToDelete),this.focusObject=this.data.selectedObjects[0]}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createSuperNode",{node_label:this.supernode.label})}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rt=function(){return!!e})()}var Bt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Rt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.oldObjectPositions=[],o.newObjectPositions=[],o.oldLinkPositions=[],o.newLinkPositions=[],o.enableMoveNodesOnSupernodeResize=i.getCanvasConfig().enableMoveNodesOnSupernodeResize,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.enableMoveNodesOnSupernodeResize&&(o.supernode=o.apiPipeline.getNode(o.data.id),o.oldObjectPositions=Fe.getObjectPositions(o.apiPipeline.getObjects()),o.oldLinkPositions=Fe.getLinkPositions(o.apiPipeline.getLinks()),o.newObjectPositions=Fe.moveSurroundingObjects(o.supernode,o.apiPipeline.getObjects(),"se",o.supernode.layout.defaultNodeWidth,o.supernode.layout.defaultNodeHeight,!1),o.newLinkPositions=Fe.moveSurroundingDetachedLinks(o.supernode,o.apiPipeline.getLinks(),"se",o.supernode.layout.defaultNodeWidth,o.supernode.layout.defaultNodeHeight,!1)),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.collapseSuperNodeInPlace(this.data.id,this.newObjectPositions,this.newLinkPositions)}},{key:"undo",value:function(){this.apiPipeline.expandSuperNodeInPlace(this.data.id,this.oldObjectPositions,this.oldLinkPositions)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.collapseSuperNodeInPlace")}}])}();function Ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ht=function(){return!!e})()}var Gt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Ht()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.oldIds=o.data.selectedObjects.map(function(e){return e.id}),o.oldColors=o.getOldColors(),o.actionLabel=o.createActionLabel(),o.newBackgroundColor=o.data.editParam.color,o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.setObjectsColorClassName(this.oldIds,this.newBackgroundColor)}},{key:"undo",value:function(){this.apiPipeline.setObjectsColorClassName(this.oldIds,this.oldColors)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.actionLabel}},{key:"getFocusObject",value:function(){return this.data.selectedObjects[0]}},{key:"createActionLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.colorComments",{comments_count:this.data.selectedObjectIds.length})}},{key:"getOldColors",value:function(){var e=this,t=[];return this.data.selectedObjects.forEach(function(n){t.push(e.getObjectColorClass(n))}),t}},{key:"getObjectColorClass",value:function(e){if(e.class_name){var t=e.class_name.split(" ");if(t)return t.find(function(e){return Fe.getBkgColorClass(e)})}return""}}])}();function qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qt=function(){return!!e})()}var zt=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,qt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.enableMoveNodesOnSupernodeResize=i.getCanvasConfig().enableMoveNodesOnSupernodeResize,o.supernode=o.data.targetObject,o.oldObjectPositions=[],o.newObjectPositions=[],o.oldLinkPositions=[],o.newLinkPositions=[],o.objectModel.ensurePipelineIsLoaded(o.data),o.targetApiPipeline=o.objectModel.getAPIPipeline(o.supernode.subflow_ref.pipeline_id_ref),o.targetPipeline=o.targetApiPipeline.getPipeline(),o.extPipelineFlowToDelete=o.targetPipeline.parentUrl?o.objectModel.getExternalPipelineFlow(o.targetPipeline.parentUrl):[];var d=o.getLinksToRemove(),c=o.getBindingNodes(),l=o.getNonBindingNodes(c),p=o.getCommentsToAdd(),u=o.getLinksToAdd(c,d),f={left:0,top:0};return o.enableMoveNodesOnSupernodeResize&&(o.oldObjectPositions=Fe.getObjectPositions(o.apiPipeline.getObjects()),o.oldLinkPositions=Fe.getLinkPositions(o.apiPipeline.getLinks()),f=Fe.getCanvasDimensions(l,p,u,0,0),o.newObjectPositions=Fe.moveSurroundingObjects(o.data.targetObject,o.apiPipeline.getObjects(),"se",f.width,f.height,!1),o.newLinkPositions=Fe.moveSurroundingDetachedLinks(o.data.targetObject,o.apiPipeline.getLinks(),"se",f.width,f.height,!1)),l.forEach(function(e){o.newObjectPositions[e.id]={x_pos:o.supernode.x_pos+e.x_pos-f.left,y_pos:o.supernode.y_pos+e.y_pos-f.top}}),p.forEach(function(e){o.newObjectPositions[e.id]={x_pos:o.supernode.x_pos+e.x_pos-f.left,y_pos:o.supernode.y_pos+e.y_pos-f.top}}),o.info={pipelineId:o.data.pipelineId,supernodeToDelete:o.supernode,nodesToAdd:l,linksToAdd:u,linksToRemove:d,commentsToAdd:p,oldObjectPositions:o.oldObjectPositions,newObjectPositions:o.newObjectPositions,oldLinkPositions:o.oldLinkPositions,newLinkPositions:o.newLinkPositions,pipelineToDelete:o.targetPipeline,extPipelineFlowToDelete:o.extPipelineFlowToDelete},o}return we(n,xe),e(n,[{key:"getNonBindingNodes",value:function(e){return this.targetApiPipeline.getNodes().filter(function(t){return!e.some(function(e){return e.id===t.id})})}},{key:"getBindingNodes",value:function(){var e=this,t=[];return this.data.targetObject.inputs&&this.data.targetObject.inputs.forEach(function(n){var i=e.targetApiPipeline.getNode(n.subflow_node_ref);i&&t.push(i)}),this.data.targetObject.outputs&&this.data.targetObject.outputs.forEach(function(n){var i=e.targetApiPipeline.getNode(n.subflow_node_ref);i&&t.push(i)}),t}},{key:"getLinksToFromBindingNodes",value:function(e){return this.targetApiPipeline.getLinksContainingIds(e.map(function(e){return e.id}))}},{key:"getLinksNotToFromBindingNodes",value:function(e){var t=this.getLinksToFromBindingNodes(e);return this.targetApiPipeline.getLinks().filter(function(e){return!t.some(function(t){return t.id===e.id})})}},{key:"getCommentsToAdd",value:function(){return this.targetApiPipeline.getComments()}},{key:"getLinksToRemove",value:function(){return this.apiPipeline.getLinksContainingId(this.supernode.id)}},{key:"getLinksToAdd",value:function(e,t){var n=this.getLinksNotToFromBindingNodes(e),i=this.getNewLinks(t);return n.concat(i)}},{key:"getNewLinks",value:function(e){var t=this,n=[],i=e.filter(function(e){return e.type===D});return this.supernode.inputs&&this.supernode.inputs.forEach(function(e){n=n.concat(t.getNewLinksForInput(e,i))}),this.supernode.outputs&&this.supernode.outputs.forEach(function(e){n=n.concat(t.getNewLinksForOutput(e,i))}),n}},{key:"getNewLinksForInput",value:function(e,t){var n=this,i=[],o=this.getSupernodeInputLinks(this.supernode,e.id,t),a=this.getInputBindingNode(e);if(a){var r=this.getInputBindingLinks(a);o.forEach(function(e){r.forEach(function(t){var o={};e.srcPos?o.srcPos=e.srcPos:(o.srcNodeId=e.srcNodeId,o.srcNodePortId=e.srcNodePortId),t.trgPos?o.trgPos=t.trgPos:(o.trgNodeId=t.trgNodeId,o.trgNodePortId=t.trgNodePortId);var a=n.apiPipeline.createLinkFromInfo(o);i.push(a)})})}return i}},{key:"getNewLinksForOutput",value:function(e,t){var n=this,i=[],o=this.getSupernodeOutputLinks(this.supernode,e.id,t),a=this.getOutputBindingNode(e);if(a){var r=this.getOutputBindingLinks(a);o.forEach(function(e){r.forEach(function(t){var o={};t.srcPos?o.srcPos=t.srcPos:(o.srcNodeId=t.srcNodeId,o.srcNodePortId=t.srcNodePortId),e.trgPos?o.trgPos=e.trgPos:(o.trgNodeId=e.trgNodeId,o.trgNodePortId=e.trgNodePortId);var a=n.apiPipeline.createLinkFromInfo(o);i.push(a)})})}return i}},{key:"getSupernodeInputLinks",value:function(e,t,n){return n.filter(function(n){var i=n.trgNodePortId||Fe.getDefaultInputPortId(e);return n.trgNodeId===e.id&&i===t})}},{key:"getInputBindingNode",value:function(e){return this.targetApiPipeline.getNodes().find(function(t){return t.id===e.subflow_node_ref})}},{key:"getInputBindingLinks",value:function(e){return this.targetApiPipeline.getLinksContainingSourceId(e.id).filter(function(e){return e.type===D})}},{key:"getSupernodeOutputLinks",value:function(e,t,n){return n.filter(function(n){var i=n.srcNodePortId||Fe.getDefaultOutputPortId(e);return n.srcNodeId===e.id&&i===t})}},{key:"getOutputBindingNode",value:function(e){return this.targetApiPipeline.getNodes().find(function(t){return t.id===e.subflow_node_ref})}},{key:"getOutputBindingLinks",value:function(e){return this.targetApiPipeline.getLinksContainingTargetId(e.id).filter(function(e){return e.type===D})}},{key:"do",value:function(){var e;this.apiPipeline.deconstructSupernode(this.info),this.focusObject=(null===(e=this.info)||void 0===e||null===(e=e.nodesToAdd)||void 0===e?void 0:e.length)>0?this.info.nodesToAdd[0]:x}},{key:"undo",value:function(){this.apiPipeline.reconstructSupernode(this.info),this.focusObject=this.supernode}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.deconstructSuperNode",{node_label:this.supernode.label})}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}var $t=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Vt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.link=o.apiPipeline.getLink(o.data.id),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.deleteLink(this.link),this.focusObject=x}},{key:"undo",value:function(){this.apiPipeline.addLinks([this.link]),this.focusObject=this.link}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.deleteLink")}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wt=function(){return!!e})()}var Yt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Wt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.areDetachableLinksSupported=i.areDetachableLinksInUse(),o.objectsInfo=[],o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.nodesToDelete=o.objectModel.getSelectedNodes(),o.commentsToDelete=o.objectModel.getSelectedComments(),o.linksToDelete=o.objectModel.getSelectedLinks(),o.linksToUpdateInfo={},o.supernodesToDelete=[],o.nodeAndCommentsToDelete=o.nodesToDelete.concat(o.commentsToDelete),o.areDetachableLinksSupported?(o.linksToDelete=o.getConnectedLinksToDelete(o.linksToDelete,"nodeLink"),o.linksToUpdateInfo=o.getLinksToUpdateInfo()):o.linksToDelete=o.getConnectedLinksToDelete(o.linksToDelete),o.supernodesToDelete=Fe.filterSupernodes(o.nodesToDelete),o.pipelinesToDelete=o.objectModel.getDescPipelinesToDelete(o.supernodesToDelete,o.data.pipelineId),o.extPipelineFlowsToDelete=o.objectModel.getExternalPipelineFlowsForPipelines(o.pipelinesToDelete),o.nodesToDelete=o.nodesToDelete.filter(function(e){return!o.isSupernodeToBeDeleted(e)}),o.actionLabel=o.createActionLabel(),o}return we(n,xe),e(n,[{key:"getConnectedLinksToDelete",value:function(e,t){var n=this;return this.nodeAndCommentsToDelete.forEach(function(i){n.apiPipeline.getLinksContainingId(i.id).forEach(function(i){n.isLinkToBeDeleted(i,e)||i.type===t||e.push(i)})}),e}},{key:"getLinksToUpdateInfo",value:function(){var e=this,t=[],n=[];return this.apiPipeline.getLinks().forEach(function(i){if(!e.isLinkToBeDeleted(i,e.linksToDelete)){var o=e.isSourceToBeDeleted(i),a=e.isTargetToBeDeleted(i);if(o||a){var r=Object.assign({},i);o&&(delete r.srcNodeId,delete r.srcNodePortId,r.srcPos=Fe.getSrcPos(i,e.apiPipeline)),a&&(delete r.trgNodeId,delete r.trgNodePortId,r.trgPos=Fe.getTrgPos(i,e.apiPipeline)),t.push(r),n.push(i)}}}),{newLinks:t,oldLinks:n}}},{key:"isLinkToBeDeleted",value:function(e,t){return-1!==t.findIndex(function(t){return t.id===e.id})}},{key:"isSupernodeToBeDeleted",value:function(e){return-1!==this.supernodesToDelete.findIndex(function(t){return e.id===t.id})}},{key:"isSourceToBeDeleted",value:function(e){return-1!==this.nodeAndCommentsToDelete.findIndex(function(t){return t.id===e.srcNodeId})}},{key:"isTargetToBeDeleted",value:function(e){return-1!==this.nodesToDelete.findIndex(function(t){return t.id===e.trgNodeId})}},{key:"do",value:function(){this.apiPipeline.deleteAndUpdateObjects({linksToUpdate:this.linksToUpdateInfo.newLinks,linksToDelete:this.linksToDelete,supernodesToDelete:this.supernodesToDelete,pipelinesToDelete:this.pipelinesToDelete,extPipelineFlowsToDelete:this.extPipelineFlowsToDelete,nodesToDelete:this.nodesToDelete,commentsToDelete:this.commentsToDelete}),this.focusObject=x}},{key:"undo",value:function(){this.apiPipeline.addAndUpdateObjects({linksToUpdate:this.linksToUpdateInfo.oldLinks,linksToAdd:this.linksToDelete,supernodesToAdd:this.supernodesToDelete,pipelinesToAdd:this.pipelinesToDelete,extPipelineFlowsToAdd:this.extPipelineFlowsToDelete,nodesToAdd:this.nodesToDelete,commentsToAdd:this.commentsToDelete}),this.focusObject=this.data.selectedObjects[0]}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.actionLabel}},{key:"getFocusObject",value:function(){return this.focusObject}},{key:"createActionLabel",value:function(){var e="action.delete"+[{label:"Nodes",val:this.nodesToDelete.length+this.supernodesToDelete.length},{label:"Comments",val:this.commentsToDelete.length},{label:"Links",val:this.linksToDelete.length}].filter(function(e){return e.val}).map(function(e){return e.label}).join("");return this.labelUtil.getActionLabel(this,e,{nodes_count:this.nodesToDelete.length+this.supernodesToDelete.length,comments_count:this.commentsToDelete.length,links_count:this.linksToDelete.length})}}])}();function Xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xt=function(){return!!e})()}var Kt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Xt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.links=[],o}return we(n,xe),e(n,[{key:"do",value:function(){this.links=this.apiPipeline.disconnectObjects(this.data.selectedObjectIds)}},{key:"undo",value:function(){this.apiPipeline.addLinks(this.links)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.disconnectObjects")}},{key:"getFocusObject",value:function(){return this.data.selectedObjects[0]}}])}();function Jt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jt=function(){return!!e})()}var Zt=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Jt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.oldBreadcrumbs=o.objectModel.getBreadcrumbs(),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.setPreviousBreadcrumb()}},{key:"undo",value:function(){this.objectModel.setBreadcrumbs(this.oldBreadcrumbs)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.displayPreviousPipeline")}}])}();function Qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qt=function(){return!!e})()}var en=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Qt()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.oldBreadcrumbs=o.objectModel.getBreadcrumbs(),o}return we(n,xe),e(n,[{key:"do",value:function(){this.data.addBreadcrumbs?(this.objectModel.ensurePipelineIsLoaded(this.data),this.objectModel.addBreadcrumbs(this.data)):0===this.data.breadcrumbIndex?this.objectModel.setIndexedBreadcrumb(this.data):this.data.breadcrumbIndex&&(this.objectModel.ensurePipelineIsLoaded(this.data),this.objectModel.setIndexedBreadcrumb(this.data))}},{key:"undo",value:function(){this.objectModel.setBreadcrumbs(this.oldBreadcrumbs)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.displaySubPipeline")}}])}();function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tn=function(){return!!e})()}var nn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,tn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.previousComment=o.apiPipeline.getComment(o.data.id),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.editComment(this.data),this.focusObject=this.data}},{key:"undo",value:function(){this.apiPipeline.editComment(this.previousComment),this.focusObject=this.previousComment}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.editComment")}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}var an=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,on()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(o.data.pipelineId),o.data.objType===R?o.previousDecorations=o.apiPipeline.getLinkDecorations(o.data.objId)||[]:o.data.objType===B&&(o.previousDecorations=o.apiPipeline.getNodeDecorations(o.data.objId)||[]),o.newDecorations=o.previousDecorations.map(function(e){return e.id===o.data.decId?Object.assign({},e,{label:o.data.label}):e}),o}return we(n,xe),e(n,[{key:"do",value:function(){this.data.objType===R?this.apiPipeline.setLinkDecorations(this.data.objId,this.newDecorations):this.data.objType===B&&this.apiPipeline.setNodeDecorations(this.data.objId,this.newDecorations),this.focusObject=this.data.selectedObjects[0]}},{key:"undo",value:function(){this.data.objType===R?this.apiPipeline.setLinkDecorations(this.data.objId,this.previousDecorations):this.data.objType===B&&this.apiPipeline.setNodeDecorations(this.data.objId,this.previousDecorations),this.focusObject=this.data.selectedObjects[0]}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.data.objType===R?this.labelUtil.getActionLabel(this,"action.editLinkDecorationLabel"):this.labelUtil.getActionLabel(this,"action.editNodeDecorationLabel")}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rn=function(){return!!e})()}var sn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,rn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.node=o.apiPipeline.getNode(e.nodeId),o.previousLabel=o.node.label,o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.data.label)}},{key:"undo",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.previousLabel)}},{key:"redo",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.data.label)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setNodeLabel")}},{key:"getFocusObject",value:function(){return this.node}}])}();function dn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dn=function(){return!!e})()}var cn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,dn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.oldObjectPositions=[],o.newObjectPositions=[],o.oldLinkPositions=[],o.newLinkPositions=[],o.enableMoveNodesOnSupernodeResize=i.getCanvasConfig().enableMoveNodesOnSupernodeResize,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.supernode=o.apiPipeline.getNode(o.data.id),o.enableMoveNodesOnSupernodeResize&&(o.oldObjectPositions=Fe.getObjectPositions(o.apiPipeline.getObjects()),o.oldLinkPositions=Fe.getLinkPositions(o.apiPipeline.getLinks()),o.newObjectPositions=Fe.moveSurroundingObjects(o.supernode,o.apiPipeline.getObjects(),"se",Fe.getSupernodeExpandedWidth(o.supernode,o.objectModel.getCanvasLayout()),Fe.getSupernodeExpandedHeight(o.supernode,o.objectModel.getCanvasLayout()),!1),o.newLinkPositions=Fe.moveSurroundingDetachedLinks(o.supernode,o.apiPipeline.getLinks(),"se",Fe.getSupernodeExpandedWidth(o.supernode,o.objectModel.getCanvasLayout()),Fe.getSupernodeExpandedHeight(o.supernode,o.objectModel.getCanvasLayout()),!1)),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.ensurePipelineIsLoaded(this.data),this.apiPipeline.expandSuperNodeInPlace(this.data.id,this.newObjectPositions,this.newLinkPositions)}},{key:"undo",value:function(){this.apiPipeline.collapseSuperNodeInPlace(this.data.id,this.oldObjectPositions,this.oldLinkPositions)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.expandSuperNodeInPlace",{node_label:this.supernode.label})}}])}();function ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ln=function(){return!!e})()}var pn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,ln()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.node=e.node,o.firstLinkSrcInfo={id:e.link.srcNodeId,portId:e.link.srcNodePortId},o.firstLinkTrgInfo={id:o.node.id},o.data.trgPort&&(o.firstLinkTrgInfo.portId=o.data.trgPort.id),o.secondLinkSrcInfo={id:o.node.id},o.data.srcPort&&(o.secondLinkSrcInfo.portId=o.data.srcPort.id),o.secondLinkTrgInfo={id:e.link.trgNodeId,portId:e.link.trgNodePortId},o}return we(n,xe),e(n,[{key:"getData",value:function(){return this.data.newFirstLink=this.firstLink,this.data.newSecondLink=this.secondLink,this.data}},{key:"do",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:this.data.offsetX,offsetY:this.data.offsetY}),this.firstLink=this.apiPipeline.createNodeLink(this.firstLinkSrcInfo,this.firstLinkTrgInfo),this.secondLink=this.apiPipeline.createNodeLink(this.secondLinkSrcInfo,this.secondLinkTrgInfo),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink({id:this.firstLink.id}),this.apiPipeline.deleteLink({id:this.secondLink.id}),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:-this.data.offsetX,offsetY:-this.data.offsetY}),this.apiPipeline.addLinks([this.data.link])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.insertNodeIntoLink",{node_label:this.node.label})}}])}();function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(un=function(){return!!e})()}var fn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,un()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.moveObjects(this.data)}},{key:"undo",value:function(){this.data.offsetX=-this.data.offsetX,this.data.offsetY=-this.data.offsetY,this.apiPipeline.moveObjects(this.data)}},{key:"redo",value:function(){this.data.offsetX=-this.data.offsetX,this.data.offsetY=-this.data.offsetY,this.apiPipeline.moveObjects(this.data)}},{key:"getLabel",value:function(){return 1===this.data.nodes.length?this.labelUtil.getActionLabel(this,"action.moveObject"):this.labelUtil.getActionLabel(this,"action.moveObjects")}}])}();function hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hn=function(){return!!e})()}var gn=function(){function n(e,i){var o,a,r,s;t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,hn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.viewportDimensions=i.getViewPortDimensions(),o.areDetachableLinksInUse=i.areDetachableLinksInUse(),o.isSnapToGridInUse=i.isSnapToGridInUse(),o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.oldFocusObject=i.getFocusObject(),o.adjustObjectsPositions(),o.clones=o.objectModel.cloneObjectsToPaste(e.objects.nodes,e.objects.comments,e.objects.links);var d=o.objectModel.extractAddDataPipelines(o.clones.clonedNodes),c=d.nodes,l=d.pipelines;return o.clones.clonedNodes=c,o.pipelines=l,o.selectionIds=o.getSelectionIds(o.clones),o}return we(n,xe),e(n,[{key:"adjustObjectsPositions",value:function(){var e=this.data.objects,t=Fe.getCanvasDimensions(e.nodes,e.comments,e.links,0,0);if(t)if(this.data.mousePos&&this.data.mousePos.x&&this.data.mousePos.y){var n=this.data.mousePos.x-t.left,i=this.data.mousePos.y-t.top;this.moveObjectsPositions(e,n,i)}else{var o=this.viewportDimensions;if(o.x<t.left&&o.y<t.top&&o.x+o.width>t.left&&o.y+o.height>t.top)this.ensureNoOverlap(e);else{var a=o.x+o.width/2-t.width/2-t.left,r=o.y+o.height/2-t.height/2-t.top;this.moveObjectsPositions(e,a,r),this.ensureNoOverlap(e)}}}},{key:"ensureNoOverlap",value:function(e){var t=10,n=10;if(this.isSnapToGridInUse){var i=this.objectModel.getCanvasLayout();t=i.snapToGridXPx,n=i.snapToGridYPx}for(;this.apiPipeline.exactlyOverlaps(e.nodes,e.comments,e.links);)this.moveObjectsPositions(e,t,n)}},{key:"moveObjectsPositions",value:function(e,t,n){e.nodes&&e.nodes.forEach(function(e){e.x_pos+=t,e.y_pos+=n}),e.comments&&e.comments.forEach(function(e){e.x_pos+=t,e.y_pos+=n,e.selectedObjectIds=[]}),e.links&&e.links.forEach(function(e){e.srcPos&&(e.srcPos.x_pos+=t,e.srcPos.y_pos+=n),e.trgPos&&(e.trgPos.x_pos+=t,e.trgPos.y_pos+=n)})}},{key:"getSelectionIds",value:function(e){var t=[];return e.clonedNodes.forEach(function(e){t.push(e.id)}),e.clonedComments.forEach(function(e){t.push(e.id)}),this.areDetachableLinksInUse&&e.clonedLinks.forEach(function(e){return t.push(e.id)}),t}},{key:"getData",value:function(){return this.data.clonedNodes=this.clones.clonedNodes,this.data.clonedComments=this.clones.clonedComments,this.data.clonedLinks=this.clones.clonedLinks,this.data}},{key:"do",value:function(){this.apiPipeline.addPastedObjects({nodesToAdd:this.clones.clonedNodes,commentsToAdd:this.clones.clonedComments,linksToAdd:this.clones.clonedLinks,pipelinesToAdd:this.pipelines,selections:this.selectionIds}),this.focusObject=this.getDoFocusObject()}},{key:"getDoFocusObject",value:function(){var e,t,n;return(null===(e=this.clones)||void 0===e||null===(e=e.clonedNodes)||void 0===e?void 0:e.length)>0?this.clones.clonedNodes[0]:(null===(t=this.clones)||void 0===t||null===(t=t.clonedComments)||void 0===t?void 0:t.length)>0?this.clones.clonedComments[0]:(null===(n=this.clones)||void 0===n||null===(n=n.clonedLinks)||void 0===n?void 0:n.length)>0?this.clones.clonedLinks[0]:null}},{key:"undo",value:function(){var e=Fe.filterSupernodes(this.clones.clonedNodes),t=this.objectModel.getDescPipelinesToDelete(e,this.data.pipelineId),n=this.objectModel.getExternalPipelineFlowsForPipelines(t);this.apiPipeline.deletePastedObjects({nodesToDelete:this.clones.clonedNodes,commentsToDelete:this.clones.clonedComments,linksToDelete:this.clones.clonedLinks,pipelinesToDelete:t,extPipelineFlowsToDelete:n}),this.focusObject=this.oldFocusObject||x}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.pasteObjects")}},{key:"getFocusObject",value:function(){return this.focusObject}}])}();function yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yn=function(){return!!e})()}var mn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,yn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.data.addedNodeTypes=o.apiPipeline.createNodesForPalette(o.data.selectedObjectIds),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.addNodeTypesToPalette(this.data.addedNodeTypes,H,this.labelUtil.getLabel("palette.saved.nodes.label"),this.labelUtil.getLabel("palette.saved.nodes.description"),G)}},{key:"undo",value:function(){var e=this.data.addedNodeTypes.map(function(e){return e.id});this.objectModel.removeNodesFromPalette(e,H)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.saveToPalette")}}])}(),vn=c,bn=Je,_n=o;var kn=function(e,t){return null==e?e:vn(e,bn(t),_n)};function Pn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pn=function(){return!!e})()}var In=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Pn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.oldPipelineObjStyles=[],kn(o.data.pipelineObjectIds,function(e,t){var n=o.objectModel.getAPIPipeline(t);o.oldPipelineObjStyles=[],e.forEach(function(e){o.oldPipelineObjStyles.push({pipelineId:t,objId:e,style:n.getObjectStyle(e,o.data.temporary)})})}),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.setObjectsStyle(this.data.pipelineObjectIds,this.data.style,this.data.temporary)}},{key:"undo",value:function(){this.objectModel.setObjectsMultiStyle(this.oldPipelineObjStyles,this.data.temporary)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setObjectsStyle")}}])}();function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sn=function(){return!!e})()}var jn=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Sn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.oldPipelineLinkStyles=[],kn(o.data.pipelineLinkIds,function(e,t){var n=o.objectModel.getAPIPipeline(t);o.oldPipelineLinkStyles=[],e.forEach(function(e){o.oldPipelineLinkStyles.push({pipelineId:t,objId:e,style:n.getLinkStyle(e,o.data.temporary)})})}),o}return we(n,xe),e(n,[{key:"do",value:function(){this.objectModel.setLinksStyle(this.data.pipelineLinkIds,this.data.style,this.data.temporary)}},{key:"undo",value:function(){this.objectModel.setLinksMultiStyle(this.oldPipelineLinkStyles,this.data.temporary)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setLinksStyle")}}])}();function Nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nn=function(){return!!e})()}var On=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,Nn()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.oldLink=o.apiPipeline.getLink(e.newLink.id),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.updateLink(this.data.newLink)}},{key:"undo",value:function(){this.apiPipeline.updateLink(this.oldLink)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.updateLink")}}])}();function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wn=function(){return e(function e(){t(this,e),this.intl=null,this.actionLabelHandler=null,this.defaultMessages=Tn(Tn({},Xe),a)},[{key:"setIntl",value:function(e){this.intl=e}},{key:"getIntl",value:function(){return this.intl}},{key:"setActionLabelHandler",value:function(e){this.actionLabelHandler=e}},{key:"getActionLabel",value:function(e,t,n){if(this.actionLabelHandler){var i=this.actionLabelHandler(e,n);if(i)return i}return this.getLabel(t,n)}},{key:"getLabel",value:function(e,t){return void 0!==this.intl&&null!==this.intl?this.intl.formatMessage({id:e,defaultMessage:this.defaultMessages[e]},t):this.defaultMessages[e]}}])}(),Ln=p,Cn=u,An=f,xn=h,Dn=l(function(e,t){var n=xn(t);return An(n)&&(n=void 0),An(e)?Ln(e,Cn(t,1,An,!0),void 0,n):[]}),Mn=function(){return e(function e(){t(this,e)},null,[{key:"convertCanvasToCanvasInfo",value:function(e){var t={id:e.diagram.id,nodes:this.getNodes(e.diagram.nodes),comments:this.getComments(e.diagram.comments),links:this.getLinks(e.diagram.links,e.diagram.nodes,e.diagram.comments),runtime_ref:""};return e.zoom&&"number"==typeof e.zoom&&100!==e.zoom&&(t.zoom={k:e.zoom/100,x:0,y:0}),{doc_type:"pipeline",version:"3.0",json_schema:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e.id,primary_pipeline:e.diagram.id,pipelines:[t]}}},{key:"getNodes",value:function(e){var t=this;return e.map(function(e){var n=t.getType(e),i={id:e.id,image:e.image,x_pos:void 0!==e.x_pos?e.x_pos:e.xPos,y_pos:void 0!==e.y_pos?e.y_pos:e.yPos,class_name:e.className,label:e.objectData.label,type:n,style:e.style};return e.objectData&&e.objectData.description&&(i.description=e.objectData.description),e.inputPorts&&(i.inputs=t.getInputPorts(e.inputPorts,1)),e.outputPorts&&(i.outputs=t.getOutputPorts(e.outputPorts,-1)),e.decorations&&(i.decorations=t.getDecorations(e.decorations)),n===F&&(i.subflow_ref={pipeline_id_ref:e.subDiagramId,url:"app_defined"},i.open_with_tool="canvas",i.is_expanded=!1,i.expanded_width=200,i.expanded_height=200),n===q&&(i.model_ref=""),n!==z&&n!==V&&n!==q||(e.userData&&e.userData.typeId?i.op=e.userData.typeId:i.op=""),i})}},{key:"getType",value:function(e){return e.userData&&!0===e.userData.containsModel?q:e.inputPorts&&e.inputPorts.length>0&&e.outputPorts&&e.outputPorts.length>0?e.subDiagramId?F:z:V}},{key:"getInputPorts",value:function(e,t){var n=this;return e.map(function(e){return{id:e.name,label:e.label,cardinality:{min:n.getMinCard(e.cardinality),max:n.getMaxCard(e.cardinality,t)}}})}},{key:"getOutputPorts",value:function(e,t){var n=this;return e.map(function(e){return{id:e.name,label:e.label,cardinality:{min:n.getMinCard(e.cardinality),max:n.getMaxCard(e.cardinality,t)}}})}},{key:"getMinCard",value:function(e){return e?Number(e.split(":")[0]):0}},{key:"getMaxCard",value:function(e,t){return e?Number(e.split(":")[1]):t}},{key:"getDecorations",value:function(e){return e.map(function(e){return{position:e.position,class_name:e.className,hotspot:e.hotspot,id:e.id,image:e.image,outline:e.outline,x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height}})}},{key:"getComments",value:function(e){return e.map(function(e){return{id:e.id,class_name:e.className,content:e.content,x_pos:void 0!==e.x_pos?e.x_pos:e.xPos,y_pos:void 0!==e.y_pos?e.y_pos:e.yPos,height:e.height,width:e.width,style:e.style}})}},{key:"getLinks",value:function(e,t,n){var i=this,o=[];return e.forEach(function(e){if(i.isValidLink(e,t,n)){var a={id:e.id,class_name:e.className,srcNodeId:e.source,trgNodeId:e.target,type:i.getLinkType(e),style:e.style};e.sourcePort&&(a.srcNodePortId=e.sourcePort),e.targetPort&&(a.trgNodePortId=e.targetPort),o.push(a)}}),o}},{key:"isValidLink",value:function(e,t,n){var i=!1;return("nodeLink"===this.getLinkType(e)||"associationLink"===this.getLinkType(e))&&t.findIndex(function(t){return t.id===e.source})>-1&&t.findIndex(function(t){return t.id===e.target})>-1&&(i=!0),"commentLink"===this.getLinkType(e)&&n.findIndex(function(t){return t.id===e.source})>-1&&t.findIndex(function(t){return t.id===e.target})>-1&&(i=!0),i}},{key:"getLinkType",value:function(e){if(m(e,"userData.linkType"))switch(e.userData.linkType){case"comment":return"commentLink";case"object":return"associationLink";default:return"nodeLink"}return"nodeLink"}},{key:"convertPaletteToPipelineFlowPalette",value:function(e){return{version:"1.0",categories:this.getCategories(e.categories)}}},{key:"getCategories",value:function(e){var t=this;return e.map(function(e){return{category:e.category,label:e.label,description:e.description,image:e.image,is_open:e.is_open,nodetypes:t.convertNodeTypes(e.nodetypes)}})}},{key:"convertNodeTypes",value:function(e){var t=this;return e.map(function(e){var n={type:t.getType(e),label:e.label,description:e.description,operator_id_ref:e.typeId,image:e.image};return e.inputPorts&&(n.input_ports=t.convertPalettePorts(e.inputPorts,1)),e.outputPorts&&(n.output_ports=t.convertPalettePorts(e.outputPorts,-1)),n})}},{key:"convertPalettePorts",value:function(e,t){var n=this;return e.map(function(e){return{id:e.name,label:e.label,cardinality:n.convertPaletteCardinality(e.cardinality,t)}})}},{key:"convertPaletteCardinality",value:function(e,t){return{min:this.getMinCard(e),max:this.getMaxCard(e,t)}}},{key:"isVersion0Palette",value:function(e){for(var t=!1,n=0;n<e.categories.length;n++)if(this.isVersion0Category(e.categories[n])){t=!0;break}return t}},{key:"isVersion0Category",value:function(e){var t=!1;if(e.nodetypes)for(var n=0;n<e.nodetypes.length;n++)if(e.nodetypes[n].typeId){t=!0;break}return t}}])}(),Un=function(){return e(function e(){t(this,e)},null,[{key:"getCanvasBasedOnCanvasInfo",value:function(e,t){return Object.assign({},e,{diagram:this.getDiagram(e,t.pipelines[0])})}},{key:"getDiagram",value:function(e,t){return{id:t.id,nodes:this.getCanvasNodes(t.nodes,e),comments:this.getCanvasComments(t.comments),links:this.getCanvasLinks(t.links)}}},{key:"getCanvasNodes",value:function(e,t){var n=this;return e.map(function(e){var i={id:e.id};e.inputs&&(i.inputPorts=n.getCanvasPorts(e.inputs)),e.outputs&&(i.outputPorts=n.getCanvasPorts(e.outputs)),i.image=e.image,i.x_pos=e.x_pos,i.y_pos=e.y_pos,i.className=e.class_name,i.objectData={label:e.label,description:e.description||""},i.userData={typeId:e.op},e.decorations&&(i.decorations=n.getCanvasDecorations(e.decorations));var o=n.getOldNode(e.id,t);return o&&o.userData&&(i.userData=o.userData),i})}},{key:"getCanvasPorts",value:function(e){return e.map(function(e){var t={name:e.id,label:e.label};return e.cardinality&&(t.cardinality=e.cardinality.min+":"+e.cardinality.max),t})}},{key:"getCanvasDecorations",value:function(e){return e.map(function(e){var t={};return e.position&&(t.position=e.position),e.class_name&&(t.className=e.class_name),e.image&&(t.image=e.image),e.hotspot&&(t.hotspot=e.hotspot),e.id&&(t.id=e.id),t})}},{key:"getOldNode",value:function(e,t){if(t&&t.diagram&&t.diagram.nodes){var n=t.diagram.nodes.findIndex(function(t){return t.id===e});if(n>-1)return t.diagram.nodes[n]}return null}},{key:"getCanvasComments",value:function(e){return e.map(function(e){return{id:e.id,className:e.class_name,content:e.content,height:e.height,width:e.width,x_pos:e.x_pos,y_pos:e.y_pos}})}},{key:"getCanvasLinks",value:function(e){return e.map(function(e){var t={id:e.id,className:e.class_name,source:e.srcNodeId};e.srcNodePortId&&(t.sourcePort=e.srcNodePortId),t.target=e.trgNodeId,e.trgNodePortId&&(t.targetPort=e.trgNodePortId);var n="";switch(e.type){case"commentLink":n="comment";break;case"associationLink":n="object";break;default:n="data"}return t.userData={linkType:n},t})}}])}(),Fn=function(){return e(function e(){t(this,e)},null,[{key:"convertPipelineFlowToCanvasInfo",value:function(e,t){var n=this.convertPipelinesToCanvasInfoPipelines(e.pipelines,t);return Object.assign({},e,{pipelines:n})}},{key:"convertPipelinesToCanvasInfoPipelines",value:function(e,t){var n=this,i=[];return e&&(i=e.map(function(e){return n.convertPipelineToCanvasInfoPipeline(e,t)})),i}},{key:"convertPipelineToCanvasInfoPipeline",value:function(e,t){var n=m(e,"nodes")?e.nodes:[],i=m(e,"app_data.ui_data.comments")?e.app_data.ui_data.comments:[],o=m(e,"app_data.ui_data.detached_links")?e.app_data.ui_data.detached_links:[],a={id:e.id,name:e.name,nodes:this.convertNodes(n,t),comments:this.convertComments(i),links:this.convertLinks(n,i,o),runtime_ref:e.runtime_ref,app_data:e.app_data,parameters:e.parameters};return m(e,"app_data.ui_data.zoom")&&("number"==typeof e.app_data.ui_data.zoom?a.zoom={x:0,y:0,k:e.app_data.ui_data.zoom/100}:a.zoom=e.app_data.ui_data.zoom),m(a,"app_data.ui_data.comments")&&delete a.app_data.ui_data.comments,m(a,"app_data.ui_data.detached_links")&&delete a.app_data.ui_data.detached_links,a}},{key:"convertNodes",value:function(e,t){var n=this;return e.map(function(e){return n.convertNode(e,t)})}},{key:"convertNode",value:function(e,t){var n={id:e.id,type:e.type,outputs:this.convertOutputs(e),inputs:this.convertInputs(e),label:this.convertLabel(e),x_pos:m(e,"app_data.ui_data.x_pos")?e.app_data.ui_data.x_pos:10,y_pos:m(e,"app_data.ui_data.y_pos")?e.app_data.ui_data.y_pos:10,decorations:m(e,"app_data.ui_data.decorations")?this.convertDecorations(e.app_data.ui_data.decorations):[],parameters:m(e,"parameters")?e.parameters:[],messages:m(e,"app_data.ui_data.messages")?e.app_data.ui_data.messages:[],ui_parameters:m(e,"app_data.ui_data.ui_parameters")?e.app_data.ui_data.ui_parameters:[],app_data:m(e,"app_data")?this.removeUiDataFromAppData(e.app_data):[]};return e.type!==z&&e.type!==V&&e.type!==q||(n.op=e.op),e.type===F&&(m(e,"open_with_tool")&&(n.open_with_tool=e.open_with_tool),n.subflow_ref=m(e,"subflow_ref")?this.convertSubFlowRef(e.subflow_ref):{},n.is_expanded=!!m(e,"app_data.ui_data.is_expanded")&&e.app_data.ui_data.is_expanded,n.expanded_width=m(e,"app_data.ui_data.expanded_width")?e.app_data.ui_data.expanded_width:t.supernodeDefaultWidth,n.expanded_height=m(e,"app_data.ui_data.expanded_height")?e.app_data.ui_data.expanded_height:t.supernodeDefaultHeight),e.type===q&&(n.model_ref=m(e,"model_ref")?e.model_ref:""),m(e,"app_data.ui_data.is_resized")&&(n.isResized=e.app_data.ui_data.is_resized,n.resizeHeight=e.app_data.ui_data.resize_height,n.resizeWidth=e.app_data.ui_data.resize_width),m(e,"app_data.ui_data.description")&&(n.description=e.app_data.ui_data.description),m(e,"app_data.ui_data.image")&&(n.image=e.app_data.ui_data.image),m(e,"app_data.ui_data.class_name")&&(n.class_name=e.app_data.ui_data.class_name),m(e,"app_data.ui_data.style")&&(n.style=e.app_data.ui_data.style),m(e,"app_data.ui_data.sub_pipelines")&&(n.sub_pipelines=e.app_data.ui_data.sub_pipelines),m(e,"isSupernodeInputBinding")&&(n.isSupernodeInputBinding=!0),m(e,"isSupernodeOutputBinding")&&(n.isSupernodeOutputBinding=!0),m(e,"connection")&&(n.connection=e.connection),m(e,"data_asset")&&(n.data_asset=e.data_asset),n}},{key:"convertSubFlowRef",value:function(e){var t={pipeline_id_ref:e.pipeline_id_ref};return e.url&&(t.url=e.url),t}},{key:"convertLabel",value:function(e){var t=m(e,"app_data.ui_data.label")?e.app_data.ui_data.label:"";return v(t)&&t.default?t.default:t}},{key:"convertOutputs",value:function(e){var t=this;return e.outputs?e.outputs.map(function(e){return t.convertPortObject(e)}):e.outputs}},{key:"convertInputs",value:function(e){var t=this;return e.inputs?e.inputs.map(function(e){return t.convertPortObject(e)}):e.inputs}},{key:"convertPortObject",value:function(e){var t={id:e.id,label:this.convertLabel(e)};return m(e,"subflow_node_ref")&&(t.subflow_node_ref=e.subflow_node_ref),m(e,"schema_ref")&&(t.schema_ref=e.schema_ref),m(e,"app_data.ui_data.cardinality")&&(t.cardinality={min:e.app_data.ui_data.cardinality.min,max:e.app_data.ui_data.cardinality.max}),m(e,"app_data.ui_data.class_name")&&(t.class_name=e.app_data.ui_data.class_name),m(e,"parameters")&&(t.parameters=e.parameters),e.app_data&&(t.app_data=this.removeUiDataFromAppData(e.app_data)),t}},{key:"convertDecorations",value:function(e){var t=this,n=[];return e&&e.forEach(function(e){var i=Object.assign({},e,{id:e.id||t.getUUID()});n.push(i)}),n}},{key:"convertComments",value:function(e){return e.map(function(e){var t={id:e.id,content:e.content,height:e.height,width:e.width,x_pos:e.x_pos,y_pos:e.y_pos};return m(e,"class_name")&&(t.class_name=e.class_name),m(e,"content_type")&&(t.contentType=e.content_type),m(e,"contentType")&&(t.contentType=e.contentType),m(e,"formats")&&(t.formats=e.formats),m(e,"style")&&(t.style=e.style),t})}},{key:"convertLinks",value:function(e,t,n){var i=this,o=[];return e.forEach(function(t){t.inputs&&t.inputs.forEach(function(n){n.links&&n.links.forEach(function(a){if(i.isNode(e,a.node_id_ref)){var r=i.createDataLink(a,a.node_id_ref,a.port_id_ref,t.id,n.id);o.push(r)}})}),m(t,"app_data.ui_data.associations")&&!g(t.app_data.ui_data.associations)&&t.app_data.ui_data.associations.forEach(function(n){if(i.isNode(e,n.node_ref)){var a={id:n.id?n.id:i.getUUID(),srcNodeId:t.id,trgNodeId:n.node_ref,type:"associationLink",decorations:n.decorations};m(n,"class_name")&&(a.class_name=n.class_name),o.push(a)}})}),t.forEach(function(t){t.associated_id_refs&&t.associated_id_refs.forEach(function(n){if(i.isNode(e,n.node_ref)){var a={id:n.id?n.id:i.getUUID(),srcNodeId:t.id,trgNodeId:n.node_ref,type:"commentLink"};m(n,"class_name")&&(a.class_name=n.class_name),n.style&&(a.style=n.style),o.push(a)}})}),n.forEach(function(e){var t=i.createDataLink(e,e.src_node_id,e.src_node_port_id,e.trg_node_id,e.trg_node_port_id);e.src_pos&&(t.srcPos=e.src_pos),e.trg_pos&&(t.trgPos=e.trg_pos),o.push(t)}),o}},{key:"isNode",value:function(e,t){return-1!==e.findIndex(function(e){return e.id===t})}},{key:"getUUID",value:function(){return Ge()}},{key:"createDataLink",value:function(e,t,n,i,o){var a={id:m(e,"id")?e.id:this.getUUID(),srcNodeId:t,trgNodeId:i,trgNodePortId:o,type:"nodeLink"};return m(e,"app_data.ui_data.class_name")&&(a.class_name=e.app_data.ui_data.class_name),m(e,"app_data.ui_data.style")&&(a.style=e.app_data.ui_data.style),m(e,"app_data.ui_data.decorations")&&(a.decorations=e.app_data.ui_data.decorations),e.app_data&&(a.app_data=this.removeUiDataFromAppData(e.app_data)),n&&(a.srcNodePortId=n),e.link_name&&(a.linkName=e.link_name),e.type_attr&&(a.typeAttr=e.type_attr),e.description&&(a.description=e.description),a}},{key:"removeUiDataFromAppData",value:function(e){var t;return e&&delete(t=i(e)).ui_data,t}}])}(),Rn=function(){return e(function e(){t(this,e)},null,[{key:"createPipelineFlow",value:function(e){var t=i(e);return delete t.subdueStyle,delete t.hideComments,Object.assign({},t,{pipelines:this.createPipelinesFromCanvasInfo(t)})}},{key:"createPipelinesFromCanvasInfo",value:function(e){var t=this;return e?this.filterOutExternalPipelines(e.pipelines).map(function(e){return t.createPipeline(e)}):{}}},{key:"filterOutExternalPipelines",value:function(e){return e.filter(function(e){return!e.parentUrl})}},{key:"createPipeline",value:function(e){var t={id:e.id};return e.name&&(t.name=e.name),t.nodes=this.createNodes(e),t.app_data=this.createPipelineAppData(e),t.runtime_ref=e.runtime_ref,e.parameters&&(t.parameters=e.parameters),t}},{key:"createNodes",value:function(e){var t=this;return e.nodes.map(function(n){return t.createSchemaNode(n,e.links)})}},{key:"createSchemaNode",value:function(e,t){var n={id:e.id,type:e.type};e.type!==z&&e.type!==V&&e.type!==q||(e.op||""===e.op)&&(n.op=e.op),e.type===F&&(e.open_with_tool&&(n.open_with_tool=e.open_with_tool),n.subflow_ref=e.subflow_ref),e.type===q&&(n.model_ref=e.model_ref),n.app_data=Object.assign({},e.app_data,{ui_data:this.createNodeUiData(e)}),e.inputs&&(n.inputs=this.createInputs(e,t)),e.outputs&&(n.outputs=this.createOutputs(e)),e.parameters&&!g(e.parameters)&&(n.parameters=e.parameters),e.connection&&(n.connection=e.connection),e.data_asset&&(n.data_asset=e.data_asset);var i=this.createAssociationLinks(e,t);return g(i)||(n.app_data.ui_data.associations=i),n}},{key:"createNodeUiData",value:function(e){var t={label:e.label,image:"object"===n(e.image)?"":e.image,x_pos:e.x_pos,y_pos:e.y_pos};if(e.class_name&&(t.class_name=e.class_name),e.style&&(t.style=e.style),e.description&&(t.description=e.description),e.type===F&&(t.is_expanded=e.is_expanded,t.expanded_width=e.expanded_width,t.expanded_height=e.expanded_height),e.isResized&&(t.is_resized=e.isResized,t.resize_width=e.resizeWidth,t.resize_height=e.resizeHeight),e.messages&&!g(e.messages)&&(t.messages=e.messages),e.ui_parameters&&!g(e.ui_parameters)&&(t.ui_parameters=e.ui_parameters),e.decorations){var i=this.createDecorations(e.decorations);i.length>0&&(t.decorations=i)}return t}},{key:"createDecorations",value:function(e){var t=[];return e&&e.forEach(function(e){if(!e.temporary&&!e.jsx){var n=Object.assign({},e);t.push(n)}}),t}},{key:"createInputs",value:function(e,t){var n=this,i=[];return e.inputs.forEach(function(o,a){var r={id:o.id};e.type===F&&o.subflow_node_ref&&(r.subflow_node_ref=o.subflow_node_ref),o.schema_ref&&(r.schema_ref=o.schema_ref),r.app_data=Object.assign({},o.app_data,{ui_data:n.createPortUiData(o)});var s=n.createLinks(t,e.id,o.id,a);s.length>0&&(r.links=s),o.parameters&&(r.parameters=o.parameters),i.push(r)}),i}},{key:"createOutputs",value:function(e){var t=this,n=[];return e.outputs.forEach(function(i){var o={id:i.id};e.type===F&&i.subflow_node_ref&&(o.subflow_node_ref=i.subflow_node_ref),i.schema_ref&&(o.schema_ref=i.schema_ref),o.app_data=Object.assign({},i.app_data,{ui_data:t.createPortUiData(i)}),i.parameters&&(o.parameters=i.parameters),n.push(o)}),n}},{key:"createPortUiData",value:function(e){var t={};return e.cardinality&&(t.cardinality=e.cardinality),e.class_name&&(t.class_name=e.class_name),t.label=e.label,t}},{key:"createLinks",value:function(e,t,n,i){var o=this,a=[];e&&this.getFilteredCanvasLinks(e,t,n,i).forEach(function(e){if(void 0!==e.srcNodeId){var t={id:e.id,node_id_ref:e.srcNodeId};e.srcNodePortId&&(t.port_id_ref=e.srcNodePortId),t=o.addNodeLinkCommonAttrs(t,e),a.push(t)}});return a}},{key:"getFilteredCanvasLinks",value:function(e,t,n,i){return e.filter(function(e){if("nodeLink"===e.type&&e.trgNodeId===t)if(e.trgNodePortId){if(e.trgNodePortId===n)return!0}else if(0===i)return!0;return!1})}},{key:"createPipelineAppData",value:function(e){return e.app_data?Object.assign({},e.app_data,{ui_data:this.createPipelineUiData(e)}):{ui_data:this.createPipelineUiData(e)}}},{key:"createPipelineUiData",value:function(e){var t=null;t=e.app_data&&e.app_data.ui_data?Object.assign({},e.app_data.ui_data,{comments:this.createComments(e.comments,e.links)}):{comments:this.createComments(e.comments,e.links)};var n=this.createDetachedLinks(e.links);return n.length>0&&(t.detached_links=n),e.zoom&&(t.zoom=e.zoom),t}},{key:"createComments",value:function(e,t){var n=this;return e.map(function(e){var i={id:e.id,x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height};return e.class_name&&(i.class_name=e.class_name),e.contentType&&(i.content_type=e.contentType),e.formats&&(i.formats=e.formats),i.content=e.content,i.associated_id_refs=n.createCommentLinks(t,e.id),e.style&&(i.style=e.style),i})}},{key:"createCommentLinks",value:function(e,t){var n=[];return e.forEach(function(e){if("commentLink"===e.type&&e.srcNodeId===t){var i={id:e.id,node_ref:e.trgNodeId};e.class_name&&(i.class_name=e.class_name),e.style&&(i.style=e.style),n.push(i)}}),n}},{key:"createAssociationLinks",value:function(e,t){var n=this,i=[];return t.forEach(function(t){if("associationLink"===t.type&&t.srcNodeId===e.id){var o={id:t.id,node_ref:t.trgNodeId};if(t.class_name&&(o.class_name=t.class_name),t.style&&(o.style=t.style),t.decorations){var a=n.createDecorations(t.decorations);a.length>0&&(o.decorations=a)}i.push(o)}}),i}},{key:"createDetachedLinks",value:function(e){var t=this,n=[];return e.forEach(function(e){if(!e.srcNodeId||!e.trgNodeId){var i={id:e.id};e.srcNodeId?(i.src_node_id=e.srcNodeId,e.srcNodePortId&&(i.src_node_port_id=e.srcNodePortId)):e.srcPos&&(i.src_pos=e.srcPos),e.trgNodeId?(i.trg_node_id=e.trgNodeId,e.trgNodePortId&&(i.trg_node_port_id=e.trgNodePortId)):e.trgPos&&(i.trg_pos=e.trgPos),i=t.addNodeLinkCommonAttrs(i,e),n.push(i)}}),n}},{key:"addNodeLinkCommonAttrs",value:function(e,t){if(t.app_data&&Re(e,"app_data",t.app_data),t.class_name&&Re(e,"app_data.ui_data.class_name",t.class_name),t.style&&Re(e,"app_data.ui_data.style",t.style),t.decorations){var n=this.createDecorations(t.decorations);n.length>0&&Re(e,"app_data.ui_data.decorations",n)}return t.linkName&&(e.link_name=t.linkName),t.typeAttr&&(e.type_attr=t.typeAttr),t.description&&(e.description=t.description),e}}])}(),Bn=function(){function n(){t(this,n)}return e(n,null,[{key:"set",value:function(e,t){try{window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.setItem?window.electronUtil.wsdStorage.setItem(e,t):window.localStorage&&(window.localStorage[e]=t)}catch(e){n.logger.warn("Local storage is not accessible: "+e)}}},{key:"get",value:function(e){try{if(window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.getItem)return window.electronUtil.wsdStorage.getItem(e);if(window.localStorage)return window.localStorage[e]}catch(e){n.logger.warn("Local storage is not accessible: "+e)}return null}},{key:"delete",value:function(e){try{window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.removeItem?window.electronUtil.wsdStorage.removeItem(e):window.localStorage&&delete window.localStorage[e]}catch(e){n.logger.warn("Local storage is not accessible: "+e)}}}])}();function Hn(e,t,n,i,o){var a=function(e,t){e.forEach(function(e){e.nodes&&e.nodes.forEach(function(e){delete e.isSupernodeInputBinding,delete e.isSupernodeOutputBinding})}),t&&Gn(t,e);return e.forEach(function(t){t.nodes&&Fe.filterSupernodes(t.nodes).forEach(function(t){Gn(t,e)})}),e}(e,o);return a.map(function(e){return function(e,t,n,i){var o=Object.assign({},e);o.nodes?o.nodes=o.nodes.map(function(e){return qn(e,t,n,i)}):o.nodes=[];o.comments?o.comments=o.comments.map(function(e){return Vn(e,n)}):o.comments=[];return o}(e,t,n,i)})}function Gn(e,t){var n=Fe.getSupernodePipelineId(e);n&&(e.inputs&&e.inputs.forEach(function(e){if(e.subflow_node_ref){var i=zn(e.subflow_node_ref,n,t);i&&(i.isSupernodeInputBinding=!0)}}),e.outputs&&e.outputs.forEach(function(e){if(e.subflow_node_ref){var i=zn(e.subflow_node_ref,n,t);i&&(i.isSupernodeOutputBinding=!0)}}))}function qn(e,t,n,i){var o=Object.assign({},e);return o=function(e,t,n){if(e.layout=t,n){var i=n(e);if(i&&!g(i)){i=Fe.convertPortPosInfo(i),i=Fe.convertPortDisplayInfo(i);var o=Fe.getCombinedDecorations(e.layout.decorations,i.decorations);e.layout=Object.assign({},e.layout,i,{decorations:o})}}return e}(o,t,i),o="TopBottom"===n.linkDirection||"BottomTop"===n.linkDirection?function(e,t){e.inputPortsWidth=e.inputs?function(e){return e.inputs.length*(2*e.layout.portArcRadius)+(e.inputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset}(e):0,e.outputPortsWidth=e.outputs?function(e){return e.outputs.length*(2*e.layout.portArcRadius)+(e.outputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset}(e):0,e.height=e.layout.defaultNodeHeight,e.layout.autoSizeNode?e.width=Math.max(e.inputPortsWidth,e.outputPortsWidth,e.layout.defaultNodeWidth):e.width=e.layout.defaultNodeWidth;e.type===F&&e.is_expanded?(e.width+=2*t.supernodeSVGAreaPadding,e.expanded_width&&(e.expanded_width=Math.max(e.expanded_width,e.width)),e.width=Fe.getSupernodeExpandedWidth(e,t),e.height=Fe.getSupernodeExpandedHeight(e,t)):e.isResized&&(e.height=e.resizeHeight?e.resizeHeight:e.height,e.width=e.resizeWidth?e.resizeWidth:e.width);return e}(o,n):function(e,t){e.inputPortsHeight=e.inputs?function(e){return e.inputs.length*(2*e.layout.portArcRadius)+(e.inputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset}(e):0,e.outputPortsHeight=e.outputs?function(e){return e.outputs.length*(2*e.layout.portArcRadius)+(e.outputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset}(e):0,e.layout.autoSizeNode?e.height=Math.max(e.inputPortsHeight,e.outputPortsHeight,e.layout.defaultNodeHeight):e.height=e.layout.defaultNodeHeight;e.width=e.layout.defaultNodeWidth,e.type===F&&e.is_expanded?(e.height+=t.supernodeTopAreaHeight+t.supernodeSVGAreaPadding,e.expanded_height&&(e.expanded_height=Math.max(e.expanded_height,e.height)),e.width=Fe.getSupernodeExpandedWidth(e,t),e.height=Fe.getSupernodeExpandedHeight(e,t)):e.isResized&&(e.height=e.resizeHeight?e.resizeHeight:e.height,e.width=e.resizeWidth?e.resizeWidth:e.width);return e}(o,n),n.snapToGridType!==$&&n.snapToGridType!==W||(o.x_pos=Fe.snapToGrid(o.x_pos,n.snapToGridXPx),o.y_pos=Fe.snapToGrid(o.y_pos,n.snapToGridYPx)),o}function zn(e,t,n){var i=n.find(function(e){return e.id===t});return i&&i.nodes?i.nodes.find(function(t){return t.id===e}):null}function Vn(e,t){var n=Object.assign({},e);return t.snapToGridType!==$&&t.snapToGridType!==W||(n.x_pos=Fe.snapToGrid(n.x_pos,t.snapToGridXPx),n.y_pos=Fe.snapToGrid(n.y_pos,t.snapToGridYPx)),n}Bn.logger=new He(["LocalStorage"]);var $n={exports:{}};$n.exports=function(){function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var d="function"==typeof _&&_;if(!s&&d)return d(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[r]={exports:{}};t[r][0].call(l.exports,function(e){return o(t[r][1][e]||e)},l,l.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof _&&_,r=0;r<i.length;r++)o(i[r]);return o}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var i=e("./lodash"),o=e("./greedy-fas");function a(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):r(e);function n(e){return function(t){return e.edge(t).weight}}i.forEach(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,i.uniqueId("rev"))})}function r(e){var t=[],n={},o={};function a(r){i.has(o,r)||(o[r]=!0,n[r]=!0,i.forEach(e.outEdges(r),function(e){i.has(n,e.w)?t.push(e):a(e.w)}),delete n[r])}return i.forEach(e.nodes(),a),t}function s(e){i.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}t.exports={run:a,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){function t(n){var o=e.children(n),a=e.node(n);if(o.length&&i.forEach(o,t),i.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,d=a.maxRank+1;s<d;++s)r(e,"borderLeft","_bl",n,a,s),r(e,"borderRight","_br",n,a,s)}}i.forEach(e.children(),t)}function r(e,t,n,i,a,r){var s={width:0,height:0,rank:r,borderType:t},d=a[t][r-1],c=o.addDummyNode(e,"border",s,n);a[t][r]=c,e.setParent(c,i),d&&e.setEdge(d,c,{weight:1})}t.exports=a},{"./lodash":10,"./util":29}],4:[function(e,t,n){var i=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||r(e)}function a(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||d(e),"lr"!==t&&"rl"!==t||(l(e),r(e))}function r(e){i.forEach(e.nodes(),function(t){s(e.node(t))}),i.forEach(e.edges(),function(t){s(e.edge(t))})}function s(e){var t=e.width;e.width=e.height,e.height=t}function d(e){i.forEach(e.nodes(),function(t){c(e.node(t))}),i.forEach(e.edges(),function(t){var n=e.edge(t);i.forEach(n.points,c),i.has(n,"y")&&c(n)})}function c(e){e.y=-e.y}function l(e){i.forEach(e.nodes(),function(t){p(e.node(t))}),i.forEach(e.edges(),function(t){var n=e.edge(t);i.forEach(n.points,p),i.has(n,"x")&&p(n)})}function p(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:a}},{"./lodash":10}],5:[function(e,t,n){function i(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function a(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=i,i.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},i.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},i.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,a)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var i=e("./lodash"),o=e("./util"),a=e("./graphlib").Graph;function r(e){var t=o.buildLayerMatrix(e),n=new a({compound:!0,multigraph:!0}).setGraph({});return i.forEach(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),i.forEach(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),i.forEach(t,function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),i.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}t.exports={debugOrdering:r}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var i;if("function"==typeof e)try{i=e("graphlib")}catch(e){}i||(i=window.graphlib),t.exports=i},{graphlib:31}],8:[function(e,t,n){var i=e("./lodash"),o=e("./graphlib").Graph,a=e("./data/list");t.exports=s;var r=i.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=l(e,t||r),o=d(n.graph,n.buckets,n.zeroIdx);return i.flatten(i.map(o,function(t){return e.outEdges(t.v,t.w)}),!0)}function d(e,t,n){for(var i,o=[],a=t[t.length-1],r=t[0];e.nodeCount();){for(;i=r.dequeue();)c(e,t,n,i);for(;i=a.dequeue();)c(e,t,n,i);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(i=t[s].dequeue()){o=o.concat(c(e,t,n,i,!0));break}}return o}function c(e,t,n,o,a){var r=a?[]:void 0;return i.forEach(e.inEdges(o.v),function(i){var o=e.edge(i),s=e.node(i.v);a&&r.push({v:i.v,w:i.w}),s.out-=o,p(t,n,s)}),i.forEach(e.outEdges(o.v),function(i){var o=e.edge(i),a=i.w,r=e.node(a);r.in-=o,p(t,n,r)}),e.removeNode(o.v),r}function l(e,t){var n=new o,r=0,s=0;i.forEach(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),i.forEach(e.edges(),function(e){var i=n.edge(e.v,e.w)||0,o=t(e),a=i+o;n.setEdge(e.v,e.w,a),s=Math.max(s,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var d=i.range(s+r+3).map(function(){return new a}),c=r+1;return i.forEach(n.nodes(),function(e){p(d,c,n.node(e))}),{graph:n,buckets:d,zeroIdx:c}}function p(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var i=e("./lodash"),o=e("./acyclic"),a=e("./normalize"),r=e("./rank"),s=e("./util").normalizeRanks,d=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,l=e("./nesting-graph"),p=e("./add-border-segments"),u=e("./coordinate-system"),f=e("./order"),h=e("./position"),g=e("./util"),y=e("./graphlib").Graph;function m(e,t){var n=t&&t.debugTiming?g.time:g.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){return E(e)});n(" runLayout",function(){v(t,n)}),n(" updateInputGraph",function(){b(e,t)})})}function v(e,t){t(" makeSpaceForEdgeLabels",function(){T(e)}),t(" removeSelfEdges",function(){F(e)}),t(" acyclic",function(){o.run(e)}),t(" nestingGraph.run",function(){l.run(e)}),t(" rank",function(){r(g.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){w(e)}),t(" removeEmptyRanks",function(){c(e)}),t(" nestingGraph.cleanup",function(){l.cleanup(e)}),t(" normalizeRanks",function(){s(e)}),t(" assignRankMinMax",function(){L(e)}),t(" removeEdgeLabelProxies",function(){C(e)}),t(" normalize.run",function(){a.run(e)}),t(" parentDummyChains",function(){d(e)}),t(" addBorderSegments",function(){p(e)}),t(" order",function(){f(e)}),t(" insertSelfEdges",function(){R(e)}),t(" adjustCoordinateSystem",function(){u.adjust(e)}),t(" position",function(){h(e)}),t(" positionSelfEdges",function(){B(e)}),t(" removeBorderNodes",function(){U(e)}),t(" normalize.undo",function(){a.undo(e)}),t(" fixupEdgeLabelCoords",function(){D(e)}),t(" undoCoordinateSystem",function(){u.undo(e)}),t(" translateGraph",function(){A(e)}),t(" assignNodeIntersects",function(){x(e)}),t(" reversePoints",function(){M(e)}),t(" acyclic.undo",function(){o.undo(e)})}function b(e,t){i.forEach(e.nodes(),function(n){var i=e.node(n),o=t.node(n);i&&(i.x=o.x,i.y=o.y,t.children(n).length&&(i.width=o.width,i.height=o.height))}),i.forEach(e.edges(),function(n){var o=e.edge(n),a=t.edge(n);o.points=a.points,i.has(a,"x")&&(o.x=a.x,o.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=m;var _=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},P=["acyclicer","ranker","rankdir","align"],I=["width","height"],S={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function E(e){var t=new y({multigraph:!0,compound:!0}),n=G(e.graph());return t.setGraph(i.merge({},k,H(n,_),i.pick(n,P))),i.forEach(e.nodes(),function(n){var o=G(e.node(n));t.setNode(n,i.defaults(H(o,I),S)),t.setParent(n,e.parent(n))}),i.forEach(e.edges(),function(n){var o=G(e.edge(n));t.setEdge(n,i.merge({},N,H(o,j),i.pick(o,O)))}),t}function T(e){var t=e.graph();t.ranksep/=2,i.forEach(e.edges(),function(n){var i=e.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function w(e){i.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var i=e.node(t.v),o={rank:(e.node(t.w).rank-i.rank)/2+i.rank,e:t};g.addDummyNode(e,"edge-proxy",o,"_ep")}})}function L(e){var t=0;i.forEach(e.nodes(),function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=i.max(t,o.maxRank))}),e.graph().maxRank=t}function C(e){i.forEach(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function A(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,a=0,r=e.graph(),s=r.marginx||0,d=r.marginy||0;function c(e){var i=e.x,r=e.y,s=e.width,d=e.height;t=Math.min(t,i-s/2),n=Math.max(n,i+s/2),o=Math.min(o,r-d/2),a=Math.max(a,r+d/2)}i.forEach(e.nodes(),function(t){c(e.node(t))}),i.forEach(e.edges(),function(t){var n=e.edge(t);i.has(n,"x")&&c(n)}),t-=s,o-=d,i.forEach(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=o}),i.forEach(e.edges(),function(n){var a=e.edge(n);i.forEach(a.points,function(e){e.x-=t,e.y-=o}),i.has(a,"x")&&(a.x-=t),i.has(a,"y")&&(a.y-=o)}),r.width=n-t+s,r.height=a-o+d}function x(e){i.forEach(e.edges(),function(t){var n,i,o=e.edge(t),a=e.node(t.v),r=e.node(t.w);o.points?(n=o.points[0],i=o.points[o.points.length-1]):(o.points=[],n=r,i=a),o.points.unshift(g.intersectRect(a,n)),o.points.push(g.intersectRect(r,i))})}function D(e){i.forEach(e.edges(),function(t){var n=e.edge(t);if(i.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function M(e){i.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function U(e){i.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),a=e.node(n.borderBottom),r=e.node(i.last(n.borderLeft)),s=e.node(i.last(n.borderRight));n.width=Math.abs(s.x-r.x),n.height=Math.abs(a.y-o.y),n.x=r.x+n.width/2,n.y=o.y+n.height/2}}),i.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}function F(e){i.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function R(e){var t=g.buildLayerMatrix(e);i.forEach(t,function(t){var n=0;i.forEach(t,function(t,o){var a=e.node(t);a.order=o+n,i.forEach(a.selfEdges,function(t){g.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:a.rank,order:o+ ++n,e:t.e,label:t.label},"_se")}),delete a.selfEdges})})}function B(e){i.forEach(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var i=e.node(n.e.v),o=i.x+i.width/2,a=i.y,r=n.x-o,s=i.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*r/3,y:a-s},{x:o+5*r/6,y:a-s},{x:o+r,y:a},{x:o+5*r/6,y:a+s},{x:o+2*r/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function H(e,t){return i.mapValues(i.pick(e,t),Number)}function G(e){var t={};return i.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}},{"./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(e,t,n){var i;if("function"==typeof e)try{i={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}i||(i=window._),t.exports=i},{"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(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),a=i.max(i.values(n))-1,c=2*a+1;e.graph().nestingRoot=t,i.forEach(e.edges(),function(t){e.edge(t).minlen*=c});var l=d(e)+1;i.forEach(e.children(),function(i){r(e,t,c,l,a,n,i)}),e.graph().nodeRankFactor=c}function r(e,t,n,a,s,d,c){var l=e.children(c);if(l.length){var p=o.addBorderNode(e,"_bt"),u=o.addBorderNode(e,"_bb"),f=e.node(c);e.setParent(p,c),f.borderTop=p,e.setParent(u,c),f.borderBottom=u,i.forEach(l,function(i){r(e,t,n,a,s,d,i);var o=e.node(i),l=o.borderTop?o.borderTop:i,f=o.borderBottom?o.borderBottom:i,h=o.borderTop?a:2*a,g=l!==f?1:s-d[c]+1;e.setEdge(p,l,{weight:h,minlen:g,nestingEdge:!0}),e.setEdge(f,u,{weight:h,minlen:g,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,p,{weight:0,minlen:s+d[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,a){var r=e.children(o);r&&r.length&&i.forEach(r,function(e){n(e,a+1)}),t[o]=a}return i.forEach(e.children(),function(e){n(e,1)}),t}function d(e){return i.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,i.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}t.exports={run:a,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){e.graph().dummyChains=[],i.forEach(e.edges(),function(t){r(e,t)})}function r(e,t){var n=t.v,i=e.node(n).rank,a=t.w,r=e.node(a).rank,s=t.name,d=e.edge(t),c=d.labelRank;if(r!==i+1){var l,p,u;for(e.removeEdge(t),u=0,++i;i<r;++u,++i)d.points=[],p={width:0,height:0,edgeLabel:d,edgeObj:t,rank:i},l=o.addDummyNode(e,"edge",p,"_d"),i===c&&(p.width=d.width,p.height=d.height,p.dummy="edge-label",p.labelpos=d.labelpos),e.setEdge(n,l,{weight:d.weight},s),0===u&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,a,{weight:d.weight},s)}}function s(e){i.forEach(e.graph().dummyChains,function(t){var n,i=e.node(t),o=i.edgeLabel;for(e.setEdge(i.edgeObj,o);i.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),t=n,i=e.node(t)})}t.exports={run:a,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var i=e("../lodash");function o(e,t,n){var o,a={};i.forEach(n,function(n){for(var i,r,s=e.parent(n);s;){if((i=e.parent(s))?(r=a[i],a[i]=s):(r=o,o=s),r&&r!==s)return void t.setEdge(r,s);s=i}})}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var i=e("../lodash");function o(e,t){return i.map(t,function(t){var n=e.inEdges(t);if(n.length){var o=i.reduce(n,function(t,n){var i=e.edge(n),o=e.node(n.v);return{sum:t.sum+i.weight*o.order,weight:t.weight+i.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}})}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph;function a(e,t,n){var a=r(e),s=new o({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(t){return e.node(t)});return i.forEach(e.nodes(),function(o){var r=e.node(o),d=e.parent(o);(r.rank===t||r.minRank<=t&&t<=r.maxRank)&&(s.setNode(o),s.setParent(o,d||a),i.forEach(e[n](o),function(t){var n=t.v===o?t.w:t.v,a=s.edge(n,o),r=i.isUndefined(a)?0:a.weight;s.setEdge(n,o,{weight:e.edge(t).weight+r})}),i.has(r,"minRank")&&s.setNode(o,{borderLeft:r.borderLeft[t],borderRight:r.borderRight[t]}))}),s}function r(e){for(var t;e.hasNode(t=i.uniqueId("_root")););return t}t.exports=a},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var i=e("../lodash");function o(e,t){for(var n=0,i=1;i<t.length;++i)n+=a(e,t[i-1],t[i]);return n}function a(e,t,n){for(var o=i.zipObject(n,i.map(n,function(e,t){return t})),a=i.flatten(i.map(t,function(t){return i.sortBy(i.map(e.outEdges(t),function(t){return{pos:o[t.w],weight:e.edge(t).weight}}),"pos")}),!0),r=1;r<n.length;)r<<=1;var s=2*r-1;r-=1;var d=i.map(new Array(s),function(){return 0}),c=0;return i.forEach(a.forEach(function(e){var t=e.pos+r;d[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=d[t+1]),d[t=t-1>>1]+=e.weight;c+=e.weight*n})),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var i=e("../lodash"),o=e("./init-order"),a=e("./cross-count"),r=e("./sort-subgraph"),s=e("./build-layer-graph"),d=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,l=e("../util");function p(e){var t=l.maxRank(e),n=u(e,i.range(1,t+1),"inEdges"),r=u(e,i.range(t-1,-1,-1),"outEdges"),s=o(e);h(e,s);for(var d,c=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:r,p%4>=2),s=l.buildLayerMatrix(e);var y=a(e,s);y<c&&(g=0,d=i.cloneDeep(s),c=y)}h(e,d)}function u(e,t,n){return i.map(t,function(t){return s(e,t,n)})}function f(e,t){var n=new c;i.forEach(e,function(e){var o=e.graph().root,a=r(e,o,n,t);i.forEach(a.vs,function(t,n){e.node(t).order=n}),d(e,n,a.vs)})}function h(e,t){i.forEach(t,function(t){i.forEach(t,function(t,n){e.node(t).order=n})})}t.exports=p},{"../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(e,t,n){var i=e("../lodash");function o(e){var t={},n=i.filter(e.nodes(),function(t){return!e.children(t).length}),o=i.max(i.map(n,function(t){return e.node(t).rank})),a=i.map(i.range(o+1),function(){return[]});function r(n){if(!i.has(t,n)){t[n]=!0;var o=e.node(n);a[o.rank].push(n),i.forEach(e.successors(n),r)}}var s=i.sortBy(n,function(t){return e.node(t).rank});return i.forEach(s,r),a}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var i=e("../lodash");function o(e,t){var n={};return i.forEach(e,function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};i.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),i.forEach(t.edges(),function(e){var t=n[e.v],o=n[e.w];i.isUndefined(t)||i.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))}),a(i.filter(n,function(e){return!e.indegree}))}function a(e){var t=[];function n(e){return function(t){t.merged||(i.isUndefined(t.barycenter)||i.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&r(e,t)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var a=e.pop();t.push(a),i.forEach(a.in.reverse(),n(a)),i.forEach(a.out,o(a))}return i.map(i.filter(t,function(e){return!e.merged}),function(e){return i.pick(e,["vs","i","barycenter","weight"])})}function r(e,t){var n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var i=e("../lodash"),o=e("./barycenter"),a=e("./resolve-conflicts"),r=e("./sort");function s(e,t,n,l){var p=e.children(t),u=e.node(t),f=u?u.borderLeft:void 0,h=u?u.borderRight:void 0,g={};f&&(p=i.filter(p,function(e){return e!==f&&e!==h}));var y=o(e,p);i.forEach(y,function(t){if(e.children(t.v).length){var o=s(e,t.v,n,l);g[t.v]=o,i.has(o,"barycenter")&&c(t,o)}});var m=a(y,n);d(m,g);var v=r(m,l);if(f&&(v.vs=i.flatten([f,v.vs,h],!0),e.predecessors(f).length)){var b=e.node(e.predecessors(f)[0]),_=e.node(e.predecessors(h)[0]);i.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+_.order)/(v.weight+2),v.weight+=2}return v}function d(e,t){i.forEach(e,function(e){e.vs=i.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function c(e,t){i.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var i=e("../lodash"),o=e("../util");function a(e,t){var n=o.partition(e,function(e){return i.has(e,"barycenter")}),a=n.lhs,d=i.sortBy(n.rhs,function(e){return-e.i}),c=[],l=0,p=0,u=0;a.sort(s(!!t)),u=r(c,d,u),i.forEach(a,function(e){u+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,p+=e.weight,u=r(c,d,u)});var f={vs:i.flatten(c,!0)};return p&&(f.barycenter=l/p,f.weight=p),f}function r(e,t,n){for(var o;t.length&&(o=i.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=a},{"../lodash":10,"../util":29}],22:[function(e,t,n){var i=e("./lodash");function o(e){var t=r(e);i.forEach(e.graph().dummyChains,function(n){for(var i=e.node(n),o=i.edgeObj,r=a(e,t,o.v,o.w),s=r.path,d=r.lca,c=0,l=s[c],p=!0;n!==o.w;){if(i=e.node(n),p){for(;(l=s[c])!==d&&e.node(l).maxRank<i.rank;)c++;l===d&&(p=!1)}if(!p){for(;c<s.length-1&&e.node(l=s[c+1]).minRank<=i.rank;)c++;l=s[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function a(e,t,n,i){var o,a,r=[],s=[],d=Math.min(t[n].low,t[i].low),c=Math.max(t[n].lim,t[i].lim);o=n;do{o=e.parent(o),r.push(o)}while(o&&(t[o].low>d||c>t[o].lim));for(a=o,o=i;(o=e.parent(o))!==a;)s.push(o);return{path:r.concat(s.reverse()),lca:a}}function r(e){var t={},n=0;function o(a){var r=n;i.forEach(e.children(a),o),t[a]={low:r,lim:n++}}return i.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph,a=e("../util");function r(e,t){var n={};function o(t,o){var a=0,r=0,s=t.length,l=i.last(o);return i.forEach(o,function(t,p){var u=d(e,t),f=u?e.node(u).order:s;(u||t===l)&&(i.forEach(o.slice(r,p+1),function(t){i.forEach(e.predecessors(t),function(i){var o=e.node(i),r=o.order;!(r<a||f<r)||o.dummy&&e.node(t).dummy||c(n,i,t)})}),r=p+1,a=f)}),o}return i.reduce(t,o),n}function s(e,t){var n={};function o(t,o,a,r,s){var d;i.forEach(i.range(o,a),function(o){d=t[o],e.node(d).dummy&&i.forEach(e.predecessors(d),function(t){var i=e.node(t);i.dummy&&(i.order<r||i.order>s)&&c(n,t,d)})})}function a(t,n){var a,r=-1,s=0;return i.forEach(n,function(i,d){if("border"===e.node(i).dummy){var c=e.predecessors(i);c.length&&(a=e.node(c[0]).order,o(n,s,d,r,a),s=d,r=a)}o(n,s,n.length,a,t.length)}),n}return i.reduce(t,a),n}function d(e,t){if(e.node(t).dummy)return i.find(e.predecessors(t),function(t){return e.node(t).dummy})}function c(e,t,n){if(t>n){var i=t;t=n,n=i}var o=e[t];o||(e[t]=o={}),o[n]=!0}function l(e,t,n){if(t>n){var o=t;t=n,n=o}return i.has(e[t],n)}function p(e,t,n,o){var a={},r={},s={};return i.forEach(t,function(e){i.forEach(e,function(e,t){a[e]=e,r[e]=e,s[e]=t})}),i.forEach(t,function(e){var t=-1;i.forEach(e,function(e){var d=o(e);if(d.length){d=i.sortBy(d,function(e){return s[e]});for(var c=(d.length-1)/2,p=Math.floor(c),u=Math.ceil(c);p<=u;++p){var f=d[p];r[e]===e&&t<s[f]&&!l(n,e,f)&&(r[f]=e,r[e]=a[e]=a[f],t=s[f])}}})}),{root:a,align:r}}function u(e,t,n,o,a){var r={},s=f(e,t,n,a),d=a?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),i=n.pop(),o={};i;)o[i]?e(i):(o[i]=!0,n.push(i),n=n.concat(t(i))),i=n.pop()}function l(e){r[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,r[t.v]+s.edge(t))},0)}function p(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,r[t.w]-s.edge(t))},Number.POSITIVE_INFINITY),i=e.node(t);n!==Number.POSITIVE_INFINITY&&i.borderType!==d&&(r[t]=Math.max(r[t],n))}return c(l,s.predecessors.bind(s)),c(p,s.successors.bind(s)),i.forEach(o,function(e){r[e]=r[n[e]]}),r}function f(e,t,n,a){var r=new o,s=e.graph(),d=v(s.nodesep,s.edgesep,a);return i.forEach(t,function(t){var o;i.forEach(t,function(t){var i=n[t];if(r.setNode(i),o){var a=n[o],s=r.edge(a,i);r.setEdge(a,i,Math.max(d(e,t,o),s||0))}o=t})}),r}function h(e,t){return i.minBy(i.values(t),function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return i.forIn(t,function(t,i){var a=b(e,i)/2;n=Math.max(t+a,n),o=Math.min(t-a,o)}),n-o})}function g(e,t){var n=i.values(t),o=i.min(n),a=i.max(n);i.forEach(["u","d"],function(n){i.forEach(["l","r"],function(r){var s,d=n+r,c=e[d];if(c!==t){var l=i.values(c);(s="l"===r?o-i.min(l):a-i.max(l))&&(e[d]=i.mapValues(c,function(e){return e+s}))}})})}function y(e,t){return i.mapValues(e.ul,function(n,o){if(t)return e[t.toLowerCase()][o];var a=i.sortBy(i.map(e,o));return(a[1]+a[2])/2})}function m(e){var t,n=a.buildLayerMatrix(e),o=i.merge(r(e,n),s(e,n)),d={};i.forEach(["u","d"],function(a){t="u"===a?n:i.values(n).reverse(),i.forEach(["l","r"],function(n){"r"===n&&(t=i.map(t,function(e){return i.values(e).reverse()}));var r=("u"===a?e.predecessors:e.successors).bind(e),s=p(e,t,o,r),c=u(e,t,s.root,s.align,"r"===n);"r"===n&&(c=i.mapValues(c,function(e){return-e})),d[a+n]=c})});var c=h(e,d);return g(d,c),y(d,e.graph().align)}function v(e,t,n){return function(o,a,r){var s,d=o.node(a),c=o.node(r),l=0;if(l+=d.width/2,i.has(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":s=-d.width/2;break;case"r":s=d.width/2}if(s&&(l+=n?s:-s),s=0,l+=(d.dummy?t:e)/2,l+=(c.dummy?t:e)/2,l+=c.width/2,i.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(l+=n?s:-s),s=0,l}}function b(e,t){return e.node(t).width}t.exports={positionX:m,findType1Conflicts:r,findType2Conflicts:s,addConflict:c,hasConflict:l,verticalAlignment:p,horizontalCompaction:u,alignCoordinates:g,findSmallestWidthAlignment:h,balance:y}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var i=e("../lodash"),o=e("../util"),a=e("./bk").positionX;function r(e){s(e=o.asNonCompoundGraph(e)),i.forEach(a(e),function(t,n){e.node(n).x=t})}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,a=0;i.forEach(t,function(t){var o=i.max(i.map(t,function(t){return e.node(t).height}));i.forEach(t,function(t){e.node(t).y=a+o/2}),a+=o+n})}t.exports=r},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph,a=e("./util").slack;function r(e){var t,n,i=new o({directed:!1}),r=e.nodes()[0],l=e.nodeCount();for(i.setNode(r,{});s(i,e)<l;)t=d(i,e),n=i.hasNode(t.v)?a(e,t):-a(e,t),c(i,e,n);return i}function s(e,t){function n(o){i.forEach(t.nodeEdges(o),function(i){var r=i.v,s=o===r?i.w:r;e.hasNode(s)||a(t,i)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))})}return i.forEach(e.nodes(),n),e.nodeCount()}function d(e,t){return i.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return a(t,n)})}function c(e,t,n){i.forEach(e.nodes(),function(e){t.node(e).rank+=n})}t.exports=r},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var i=e("./util").longestPath,o=e("./feasible-tree"),a=e("./network-simplex");function r(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":d(e);break;case"longest-path":s(e)}}t.exports=r;var s=i;function d(e){i(e),o(e)}function c(e){a(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var i=e("../lodash"),o=e("./feasible-tree"),a=e("./util").slack,r=e("./util").longestPath,s=e("../graphlib").alg.preorder,d=e("../graphlib").alg.postorder,c=e("../util").simplify;function l(e){e=c(e),r(e);var t,n=o(e);for(h(n),p(n,e);t=y(n);)v(n,e,t,m(n,e,t))}function p(e,t){var n=d(e,e.nodes());n=n.slice(0,n.length-1),i.forEach(n,function(n){u(e,t,n)})}function u(e,t,n){var i=e.node(n).parent;e.edge(n,i).cutvalue=f(e,t,n)}function f(e,t,n){var o=e.node(n).parent,a=!0,r=t.edge(n,o),s=0;return r||(a=!1,r=t.edge(o,n)),s=r.weight,i.forEach(t.nodeEdges(n),function(i){var r=i.v===n,d=r?i.w:i.v;if(d!==o){var c=r===a,l=t.edge(i).weight;if(s+=c?l:-l,_(e,n,d)){var p=e.edge(n,d).cutvalue;s+=c?-p:p}}}),s}function h(e,t){arguments.length<2&&(t=e.nodes()[0]),g(e,{},1,t)}function g(e,t,n,o,a){var r=n,s=e.node(o);return t[o]=!0,i.forEach(e.neighbors(o),function(a){i.has(t,a)||(n=g(e,t,n,a,o))}),s.low=r,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(e){return i.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function m(e,t,n){var o=n.v,r=n.w;t.hasEdge(o,r)||(o=n.w,r=n.v);var s=e.node(o),d=e.node(r),c=s,l=!1;s.lim>d.lim&&(c=d,l=!0);var p=i.filter(t.edges(),function(t){return l===k(e,e.node(t.v),c)&&l!==k(e,e.node(t.w),c)});return i.minBy(p,function(e){return a(t,e)})}function v(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),h(e),p(e,t),b(e,t)}function b(e,t){var n=i.find(e.nodes(),function(e){return!t.node(e).parent}),o=s(e,n);o=o.slice(1),i.forEach(o,function(n){var i=e.node(n).parent,o=t.edge(n,i),a=!1;o||(o=t.edge(i,n),a=!0),t.node(n).rank=t.node(i).rank+(a?o.minlen:-o.minlen)})}function _(e,t,n){return e.hasEdge(t,n)}function k(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=l,l.initLowLimValues=h,l.initCutValues=p,l.calcCutValue=f,l.leaveEdge=y,l.enterEdge=m,l.exchangeEdges=v},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var i=e("../lodash");function o(e){var t={};function n(o){var a=e.node(o);if(i.has(t,o))return a.rank;t[o]=!0;var r=i.min(i.map(e.outEdges(o),function(t){return n(t.w)-e.edge(t).minlen}));return r!==Number.POSITIVE_INFINITY&&null!=r||(r=0),a.rank=r}i.forEach(e.sources(),n)}function a(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:a}},{"../lodash":10}],29:[function(e,t,n){var i=e("./lodash"),o=e("./graphlib").Graph;function a(e,t,n,o){var a;do{a=i.uniqueId(o)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function r(e){var t=(new o).setGraph(e.graph());return i.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),i.forEach(e.edges(),function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+o.weight,minlen:Math.max(i.minlen,o.minlen)})}),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),i.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function d(e){var t=i.map(e.nodes(),function(t){var n={};return i.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return i.zipObject(e.nodes(),t)}function c(e){var t=i.map(e.nodes(),function(t){var n={};return i.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return i.zipObject(e.nodes(),t)}function l(e,t){var n,i,o=e.x,a=e.y,r=t.x-o,s=t.y-a,d=e.width/2,c=e.height/2;if(!r&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(r)*c?(s<0&&(c=-c),n=c*r/s,i=c):(r<0&&(d=-d),n=d,i=d*s/r),{x:o+n,y:a+i}}function p(e){var t=i.map(i.range(g(e)+1),function(){return[]});return i.forEach(e.nodes(),function(n){var o=e.node(n),a=o.rank;i.isUndefined(a)||(t[a][o.order]=n)}),t}function u(e){var t=i.min(i.map(e.nodes(),function(t){return e.node(t).rank}));i.forEach(e.nodes(),function(n){var o=e.node(n);i.has(o,"rank")&&(o.rank-=t)})}function f(e){var t=i.min(i.map(e.nodes(),function(t){return e.node(t).rank})),n=[];i.forEach(e.nodes(),function(i){var o=e.node(i).rank-t;n[o]||(n[o]=[]),n[o].push(i)});var o=0,a=e.graph().nodeRankFactor;i.forEach(n,function(t,n){i.isUndefined(t)&&n%a!==0?--o:o&&i.forEach(t,function(t){e.node(t).rank+=o})})}function h(e,t,n,i){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=i),a(e,"border",o,t)}function g(e){return i.max(i.map(e.nodes(),function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n}))}function y(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function m(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}}function v(e,t){return t()}t.exports={addDummyNode:a,simplify:r,asNonCompoundGraph:s,successorWeights:d,predecessorWeights:c,intersectRect:l,buildLayerMatrix:p,normalizeRanks:u,removeEmptyRanks:f,addBorderNode:h,maxRank:g,partition:y,time:m,notime:v}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var i=e("./lib");t.exports={Graph:i.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:i.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var i=e("../lodash");function o(e){var t,n={},o=[];function a(o){i.has(n,o)||(n[o]=!0,t.push(o),i.each(e.successors(o),a),i.each(e.predecessors(o),a))}return i.each(e.nodes(),function(e){t=[],a(e),t.length&&o.push(t)}),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var i=e("../lodash");function o(e,t,n){i.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),r=[],s={};return i.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);a(e,t,"post"===n,s,o,r)}),r}function a(e,t,n,o,r,s){i.has(o,t)||(o[t]=!0,n||s.push(t),i.each(r(t),function(t){a(e,t,n,o,r,s)}),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var i=e("./dijkstra"),o=e("../lodash");function a(e,t,n){return o.transform(e.nodes(),function(o,a){o[a]=i(e,a,t,n)},{})}t.exports=a},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var i=e("../lodash"),o=e("../data/priority-queue");t.exports=r;var a=i.constant(1);function r(e,t,n,i){return s(e,String(t),n||a,i||function(t){return e.outEdges(t)})}function s(e,t,n,i){var a,r,s={},d=new o,c=function(e){var t=e.v!==a?e.v:e.w,i=s[t],o=n(e),c=r.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<i.distance&&(i.distance=c,i.predecessor=a,d.decrease(t,c))};for(e.nodes().forEach(function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},d.add(e,n)});d.size()>0&&(a=d.removeMin(),(r=s[a]).distance!==Number.POSITIVE_INFINITY);)i(a).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var i=e("../lodash"),o=e("./tarjan");function a(e){return i.filter(o(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}t.exports=a},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var i=e("../lodash");t.exports=a;var o=i.constant(1);function a(e,t,n){return r(e,t||o,n||function(t){return e.outEdges(t)})}function r(e,t,n){var i={},o=e.nodes();return o.forEach(function(e){i[e]={},i[e][e]={distance:0},o.forEach(function(t){e!==t&&(i[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,a=t(n);i[e][o]={distance:a,predecessor:e}})}),o.forEach(function(e){var t=i[e];o.forEach(function(n){var a=i[n];o.forEach(function(n){var i=a[e],o=t[n],r=a[n],s=i.distance+o.distance;s<r.distance&&(r.distance=s,r.predecessor=o.predecessor)})})}),i}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./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(e,t,n){var i=e("./topsort");function o(e){try{i(e)}catch(e){if(e instanceof i.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var i=e("./dfs");function o(e,t){return i(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var i=e("./dfs");function o(e,t){return i(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var i=e("../lodash"),o=e("../graph"),a=e("../data/priority-queue");function r(e,t){var n,r=new o,s={},d=new a;function c(e){var i=e.v===n?e.w:e.v,o=d.priority(i);if(void 0!==o){var a=t(e);a<o&&(s[i]=n,d.decrease(i,a))}}if(0===e.nodeCount())return r;i.each(e.nodes(),function(e){d.add(e,Number.POSITIVE_INFINITY),r.setNode(e)}),d.decrease(e.nodes()[0],0);for(var l=!1;d.size()>0;){if(n=d.removeMin(),i.has(s,n))r.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(c)}return r}t.exports=r},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var i=e("../lodash");function o(e){var t=0,n=[],o={},a=[];function r(s){var d=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(e){i.has(o,e)?o[e].onStack&&(d.lowlink=Math.min(d.lowlink,o[e].index)):(r(e),d.lowlink=Math.min(d.lowlink,o[e].lowlink))}),d.lowlink===d.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);a.push(l)}}return e.nodes().forEach(function(e){i.has(o,e)||r(e)}),a}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var i=e("../lodash");function o(e){var t={},n={},o=[];function r(s){if(i.has(n,s))throw new a;i.has(t,s)||(n[s]=!0,t[s]=!0,i.each(e.predecessors(s),r),delete n[s],o.push(s))}if(i.each(e.sinks(),r),i.size(t)!==e.nodeCount())throw new a;return o}function a(){}t.exports=o,o.CycleException=a,a.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var i=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return i.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!i.has(n,e)){var o=this._arr,a=o.length;return n[e]=a,o.push({key:e,priority:t}),this._decrease(a),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,i<t.length&&(o=t[i].priority<t[o].priority?i:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,i=n[e].priority;0!==e&&!(n[t=e>>1].priority<i);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,i=this._keyIndices,o=n[e],a=n[t];n[e]=a,n[t]=o,i[a.key]=e,i[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var i=e("./lodash");t.exports=s;var o="\0",a="\0",r="";function s(e){this._isDirected=!i.has(e,"directed")||e.directed,this._isMultigraph=!!i.has(e,"multigraph")&&e.multigraph,this._isCompound=!!i.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function d(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function l(e,t,n,a){var s=""+t,d=""+n;if(!e&&s>d){var c=s;s=d,d=c}return s+r+d+r+(i.isUndefined(a)?o:a)}function p(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var r=o;o=a,a=r}var s={v:o,w:a};return i&&(s.name=i),s}function u(e,t){return l(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return i.keys(this._nodes)},s.prototype.sources=function(){var e=this;return i.filter(this.nodes(),function(t){return i.isEmpty(e._in[t])})},s.prototype.sinks=function(){var e=this;return i.filter(this.nodes(),function(t){return i.isEmpty(e._out[t])})},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return i.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},s.prototype.setNode=function(e,t){return i.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return i.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(i.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],i.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),i.each(i.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],i.each(i.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(t))t=a;else{for(var n=t+="";!i.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}},s.prototype.children=function(e){if(i.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return i.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return i.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return i.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;i.each(this._nodes,function(n,i){e(i)&&t.setNode(i,n)}),i.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};function a(e){var i=n.parent(e);return void 0===i||t.hasNode(i)?(o[e]=i,i):i in o?o[i]:a(i)}return this._isCompound&&i.each(t.nodes(),function(e){t.setParent(e,a(e))}),t},s.prototype.setDefaultEdgeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return i.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return i.reduce(e,function(e,i){return o.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this},s.prototype.setEdge=function(){var e,t,n,o,a=!1,r=arguments[0];"object"==typeof r&&null!==r&&"v"in r?(e=r.v,t=r.w,n=r.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=r,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,i.isUndefined(n)||(n=""+n);var s=l(this._isDirected,e,t,n);if(i.has(this._edgeLabels,s))return a&&(this._edgeLabels[s]=o),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=a?o:this._defaultEdgeLabelFn(e,t,n);var c=p(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,d(this._preds[t],e),d(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[i]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return i.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),o=this._edgeObjs[i];return o&&(e=o.v,t=o.w,delete this._edgeLabels[i],delete this._edgeObjs[i],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=i.values(n);return t?i.filter(o,function(e){return e.v===t}):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=i.values(n);return t?i.filter(o,function(e){return e.w===t}):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var i=e("./lodash"),o=e("./graph");function a(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:r(e),edges:s(e)};return i.isUndefined(e.graph())||(t.value=i.clone(e.graph())),t}function r(e){return i.map(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),a={v:t};return i.isUndefined(n)||(a.value=n),i.isUndefined(o)||(a.parent=o),a})}function s(e){return i.map(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return i.isUndefined(t.name)||(o.name=t.name),i.isUndefined(n)||(o.value=n),o})}function d(e){var t=new o(e.options).setGraph(e.value);return i.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),i.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}t.exports={write:a,read:d}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var i;if("function"==typeof e)try{i={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}i||(i=window._),t.exports=i},{"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(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"DataView");t.exports=i},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var i=e("./_hashClear"),o=e("./_hashDelete"),a=e("./_hashGet"),r=e("./_hashHas"),s=e("./_hashSet");function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}d.prototype.clear=i,d.prototype.delete=o,d.prototype.get=a,d.prototype.has=r,d.prototype.set=s,t.exports=d},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var i=e("./_listCacheClear"),o=e("./_listCacheDelete"),a=e("./_listCacheGet"),r=e("./_listCacheHas"),s=e("./_listCacheSet");function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}d.prototype.clear=i,d.prototype.delete=o,d.prototype.get=a,d.prototype.has=r,d.prototype.set=s,t.exports=d},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Map");t.exports=i},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var i=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),r=e("./_mapCacheHas"),s=e("./_mapCacheSet");function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}d.prototype.clear=i,d.prototype.delete=o,d.prototype.get=a,d.prototype.has=r,d.prototype.set=s,t.exports=d},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Promise");t.exports=i},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Set");t.exports=i},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var i=e("./_MapCache"),o=e("./_setCacheAdd"),a=e("./_setCacheHas");function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}r.prototype.add=r.prototype.push=o,r.prototype.has=a,t.exports=r},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var i=e("./_ListCache"),o=e("./_stackClear"),a=e("./_stackDelete"),r=e("./_stackGet"),s=e("./_stackHas"),d=e("./_stackSet");function c(e){var t=this.__data__=new i(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=r,c.prototype.has=s,c.prototype.set=d,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var i=e("./_root").Symbol;t.exports=i},{"./_root":208}],61:[function(e,t,n){var i=e("./_root").Uint8Array;t.exports=i},{"./_root":208}],62:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"WeakMap");t.exports=i},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function i(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=i},{}],64:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}t.exports=i},{}],65:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length,o=0,a=[];++n<i;){var r=e[n];t(r,n,e)&&(a[o++]=r)}return a}t.exports=i},{}],66:[function(e,t,n){var i=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&i(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function i(e,t,n){for(var i=-1,o=null==e?0:e.length;++i<o;)if(n(t,e[i]))return!0;return!1}t.exports=i},{}],68:[function(e,t,n){var i=e("./_baseTimes"),o=e("./isArguments"),a=e("./isArray"),r=e("./isBuffer"),s=e("./_isIndex"),d=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function l(e,t){var n=a(e),l=!n&&o(e),p=!n&&!l&&r(e),u=!n&&!l&&!p&&d(e),f=n||l||p||u,h=f?i(e.length,String):[],g=h.length;for(var y in e)!t&&!c.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||u&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||h.push(y);return h}t.exports=l},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}t.exports=i},{}],70:[function(e,t,n){function i(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}t.exports=i},{}],71:[function(e,t,n){function i(e,t,n,i){var o=-1,a=null==e?0:e.length;for(i&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}t.exports=i},{}],72:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}t.exports=i},{}],73:[function(e,t,n){var i=e("./_baseProperty")("length");t.exports=i},{"./_baseProperty":117}],74:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./eq");function a(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&i(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./eq"),a=Object.prototype.hasOwnProperty;function r(e,t,n){var r=e[t];a.call(e,t)&&o(r,n)&&(void 0!==n||t in e)||i(e,t,n)}t.exports=r},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var i=e("./eq");function o(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var i=e("./_copyObject"),o=e("./keys");function a(e,t){return e&&i(t,o(t),e)}t.exports=a},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var i=e("./_copyObject"),o=e("./keysIn");function a(e,t){return e&&i(t,o(t),e)}t.exports=a},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var i=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var i=e("./_Stack"),o=e("./_arrayEach"),a=e("./_assignValue"),r=e("./_baseAssign"),s=e("./_baseAssignIn"),d=e("./_cloneBuffer"),c=e("./_copyArray"),l=e("./_copySymbols"),p=e("./_copySymbolsIn"),u=e("./_getAllKeys"),f=e("./_getAllKeysIn"),h=e("./_getTag"),g=e("./_initCloneArray"),y=e("./_initCloneByTag"),m=e("./_initCloneObject"),v=e("./isArray"),b=e("./isBuffer"),_=e("./isMap"),k=e("./isObject"),P=e("./isSet"),I=e("./keys"),S=1,j=2,N=4,O="[object Arguments]",E="[object Array]",T="[object Boolean]",w="[object Date]",L="[object Error]",C="[object Function]",A="[object GeneratorFunction]",x="[object Map]",D="[object Number]",M="[object Object]",U="[object RegExp]",F="[object Set]",R="[object String]",B="[object Symbol]",H="[object WeakMap]",G="[object ArrayBuffer]",q="[object DataView]",z="[object Float32Array]",V="[object Float64Array]",$="[object Int8Array]",W="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",K="[object Uint8ClampedArray]",J="[object Uint16Array]",Z="[object Uint32Array]",Q={};function ee(e,t,n,E,T,w){var L,x=t&S,D=t&j,U=t&N;if(n&&(L=T?n(e,E,T,w):n(e)),void 0!==L)return L;if(!k(e))return e;var F=v(e);if(F){if(L=g(e),!x)return c(e,L)}else{var R=h(e),B=R==C||R==A;if(b(e))return d(e,x);if(R==M||R==O||B&&!T){if(L=D||B?{}:m(e),!x)return D?p(e,s(L,e)):l(e,r(L,e))}else{if(!Q[R])return T?e:{};L=y(e,R,x)}}w||(w=new i);var H=w.get(e);if(H)return H;w.set(e,L),P(e)?e.forEach(function(i){L.add(ee(i,t,n,i,e,w))}):_(e)&&e.forEach(function(i,o){L.set(o,ee(i,t,n,o,e,w))});var G=U?D?f:u:D?keysIn:I,q=F?void 0:G(e);return o(q||e,function(i,o){q&&(i=e[o=i]),a(L,o,ee(i,t,n,o,e,w))}),L}Q[O]=Q[E]=Q[G]=Q[q]=Q[T]=Q[w]=Q[z]=Q[V]=Q[$]=Q[W]=Q[Y]=Q[x]=Q[D]=Q[M]=Q[U]=Q[F]=Q[R]=Q[B]=Q[X]=Q[K]=Q[J]=Q[Z]=!0,Q[L]=Q[C]=Q[H]=!1,t.exports=ee},{"./_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(e,t,n){var i=e("./isObject"),o=Object.create,a=function(){function e(){}return function(t){if(!i(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=a},{"./isObject":251}],82:[function(e,t,n){var i=e("./_baseForOwn"),o=e("./_createBaseEach")(i);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var i=e("./isSymbol");function o(e,t,n){for(var o=-1,a=e.length;++o<a;){var r=e[o],s=t(r);if(null!=s&&(void 0===d?s==s&&!i(s):n(s,d)))var d=s,c=r}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var i=e("./_baseEach");function o(e,t){var n=[];return i(e,function(e,i,o){t(e,i,o)&&n.push(e)}),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function i(e,t,n,i){for(var o=e.length,a=n+(i?1:-1);i?a--:++a<o;)if(t(e[a],a,e))return a;return-1}t.exports=i},{}],86:[function(e,t,n){var i=e("./_arrayPush"),o=e("./_isFlattenable");function a(e,t,n,r,s){var d=-1,c=e.length;for(n||(n=o),s||(s=[]);++d<c;){var l=e[d];t>0&&n(l)?t>1?a(l,t-1,n,r,s):i(s,l):r||(s[s.length]=l)}return s}t.exports=a},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var i=e("./_createBaseFor")();t.exports=i},{"./_createBaseFor":149}],88:[function(e,t,n){var i=e("./_baseFor"),o=e("./keys");function a(e,t){return e&&i(e,t,o)}t.exports=a},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var i=e("./_castPath"),o=e("./_toKey");function a(e,t){for(var n=0,a=(t=i(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}t.exports=a},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var i=e("./_arrayPush"),o=e("./isArray");function a(e,t,n){var a=t(e);return o(e)?a:i(a,n(e))}t.exports=a},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var i=e("./_Symbol"),o=e("./_getRawTag"),a=e("./_objectToString"),r="[object Null]",s="[object Undefined]",d=i?i.toStringTag:void 0;function c(e){return null==e?void 0===e?s:r:d&&d in Object(e)?o(e):a(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function i(e,t){return e>t}t.exports=i},{}],93:[function(e,t,n){var i=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&i.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function i(e,t){return null!=e&&t in Object(e)}t.exports=i},{}],95:[function(e,t,n){var i=e("./_baseFindIndex"),o=e("./_baseIsNaN"),a=e("./_strictIndexOf");function r(e,t,n){return t==t?a(e,t,n):i(e,o,n)}t.exports=r},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Arguments]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var i=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function a(e,t,n,r,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:i(e,t,n,r,a,s))}t.exports=a},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var i=e("./_Stack"),o=e("./_equalArrays"),a=e("./_equalByTag"),r=e("./_equalObjects"),s=e("./_getTag"),d=e("./isArray"),c=e("./isBuffer"),l=e("./isTypedArray"),p=1,u="[object Arguments]",f="[object Array]",h="[object Object]",g=Object.prototype.hasOwnProperty;function y(e,t,n,y,m,v){var b=d(e),_=d(t),k=b?f:s(e),P=_?f:s(t),I=(k=k==u?h:k)==h,S=(P=P==u?h:P)==h,j=k==P;if(j&&c(e)){if(!c(t))return!1;b=!0,I=!1}if(j&&!I)return v||(v=new i),b||l(e)?o(e,t,n,y,m,v):a(e,t,k,n,y,m,v);if(!(n&p)){var N=I&&g.call(e,"__wrapped__"),O=S&&g.call(t,"__wrapped__");if(N||O){var E=N?e.value():e,T=O?t.value():t;return v||(v=new i),m(E,T,n,y,v)}}return!!j&&(v||(v=new i),r(e,t,n,y,m,v))}t.exports=y},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var i=e("./_getTag"),o=e("./isObjectLike"),a="[object Map]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var i=e("./_Stack"),o=e("./_baseIsEqual"),a=1,r=2;function s(e,t,n,s){var d=n.length,c=d,l=!s;if(null==e)return!c;for(e=Object(e);d--;){var p=n[d];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++d<c;){var u=(p=n[d])[0],f=e[u],h=p[1];if(l&&p[2]){if(void 0===f&&!(u in e))return!1}else{var g=new i;if(s)var y=s(f,h,u,e,t,g);if(!(void 0===y?o(h,f,a|r,s,g):y))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function i(e){return e!=e}t.exports=i},{}],102:[function(e,t,n){var i=e("./isFunction"),o=e("./_isMasked"),a=e("./isObject"),r=e("./_toSource"),s=/[\\^$.*+?()[\]{}|]/g,d=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,p=c.toString,u=l.hasOwnProperty,f=RegExp("^"+p.call(u).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(e){return!(!a(e)||o(e))&&(i(e)?f:d).test(r(e))}t.exports=h},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var i=e("./_getTag"),o=e("./isObjectLike"),a="[object Set]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isLength"),a=e("./isObjectLike"),r="[object Arguments]",s="[object Array]",d="[object Boolean]",c="[object Date]",l="[object Error]",p="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",g="[object RegExp]",y="[object Set]",m="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",k="[object Float64Array]",P="[object Int8Array]",I="[object Int16Array]",S="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",O="[object Uint16Array]",E="[object Uint32Array]",T={};function w(e){return a(e)&&o(e.length)&&!!T[i(e)]}T["[object Float32Array]"]=T[k]=T[P]=T[I]=T[S]=T[j]=T[N]=T[O]=T[E]=!0,T[r]=T[s]=T[b]=T[d]=T[_]=T[c]=T[l]=T[p]=T[u]=T[f]=T[h]=T[g]=T[y]=T[m]=T[v]=!1,t.exports=w},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var i=e("./_baseMatches"),o=e("./_baseMatchesProperty"),a=e("./identity"),r=e("./isArray"),s=e("./property");function d(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?r(e)?o(e[0],e[1]):i(e):s(e)}t.exports=d},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var i=e("./_isPrototype"),o=e("./_nativeKeys"),a=Object.prototype.hasOwnProperty;function r(e){if(!i(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=r},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var i=e("./isObject"),o=e("./_isPrototype"),a=e("./_nativeKeysIn"),r=Object.prototype.hasOwnProperty;function s(e){if(!i(e))return a(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&r.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function i(e,t){return e<t}t.exports=i},{}],109:[function(e,t,n){var i=e("./_baseEach"),o=e("./isArrayLike");function a(e,t){var n=-1,a=o(e)?Array(e.length):[];return i(e,function(e,i,o){a[++n]=t(e,i,o)}),a}t.exports=a},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var i=e("./_baseIsMatch"),o=e("./_getMatchData"),a=e("./_matchesStrictComparable");function r(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}t.exports=r},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var i=e("./_baseIsEqual"),o=e("./get"),a=e("./hasIn"),r=e("./_isKey"),s=e("./_isStrictComparable"),d=e("./_matchesStrictComparable"),c=e("./_toKey"),l=1,p=2;function u(e,t){return r(e)&&s(t)?d(c(e),t):function(n){var r=o(n,e);return void 0===r&&r===t?a(n,e):i(t,r,l|p)}}t.exports=u},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var i=e("./_Stack"),o=e("./_assignMergeValue"),a=e("./_baseFor"),r=e("./_baseMergeDeep"),s=e("./isObject"),d=e("./keysIn"),c=e("./_safeGet");function l(e,t,n,p,u){e!==t&&a(t,function(a,d){if(u||(u=new i),s(a))r(e,t,d,n,l,p,u);else{var f=p?p(c(e,d),a,d+"",e,t,u):void 0;void 0===f&&(f=a),o(e,d,f)}},d)}t.exports=l},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var i=e("./_assignMergeValue"),o=e("./_cloneBuffer"),a=e("./_cloneTypedArray"),r=e("./_copyArray"),s=e("./_initCloneObject"),d=e("./isArguments"),c=e("./isArray"),l=e("./isArrayLikeObject"),p=e("./isBuffer"),u=e("./isFunction"),f=e("./isObject"),h=e("./isPlainObject"),g=e("./isTypedArray"),y=e("./_safeGet"),m=e("./toPlainObject");function v(e,t,n,v,b,_,k){var P=y(e,n),I=y(t,n),S=k.get(I);if(S)i(e,n,S);else{var j=_?_(P,I,n+"",e,t,k):void 0,N=void 0===j;if(N){var O=c(I),E=!O&&p(I),T=!O&&!E&&g(I);j=I,O||E||T?c(P)?j=P:l(P)?j=r(P):E?(N=!1,j=o(I,!0)):T?(N=!1,j=a(I,!0)):j=[]:h(I)||d(I)?(j=P,d(P)?j=m(P):f(P)&&!u(P)||(j=s(I))):N=!1}N&&(k.set(I,j),b(j,I,v,_,k),k.delete(I)),i(e,n,j)}}t.exports=v},{"./_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(e,t,n){var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),r=e("./_baseSortBy"),s=e("./_baseUnary"),d=e("./_compareMultiple"),c=e("./identity");function l(e,t,n){var l=-1;t=i(t.length?t:[c],s(o));var p=a(e,function(e,n,o){return{criteria:i(t,function(t){return t(e)}),index:++l,value:e}});return r(p,function(e,t){return d(e,t,n)})}t.exports=l},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var i=e("./_basePickBy"),o=e("./hasIn");function a(e,t){return i(e,t,function(t,n){return o(e,n)})}t.exports=a},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var i=e("./_baseGet"),o=e("./_baseSet"),a=e("./_castPath");function r(e,t,n){for(var r=-1,s=t.length,d={};++r<s;){var c=t[r],l=i(e,c);n(l,c)&&o(d,a(c,e),l)}return d}t.exports=r},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function i(e){return function(t){return null==t?void 0:t[e]}}t.exports=i},{}],118:[function(e,t,n){var i=e("./_baseGet");function o(e){return function(t){return i(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var i=Math.ceil,o=Math.max;function a(e,t,n,a){for(var r=-1,s=o(i((t-e)/(n||1)),0),d=Array(s);s--;)d[a?s:++r]=e,e+=n;return d}t.exports=a},{}],120:[function(e,t,n){function i(e,t,n,i,o){return o(e,function(e,o,a){n=i?(i=!1,e):t(n,e,o,a)}),n}t.exports=i},{}],121:[function(e,t,n){var i=e("./identity"),o=e("./_overRest"),a=e("./_setToString");function r(e,t){return a(o(e,t,i),e+"")}t.exports=r},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var i=e("./_assignValue"),o=e("./_castPath"),a=e("./_isIndex"),r=e("./isObject"),s=e("./_toKey");function d(e,t,n,d){if(!r(e))return e;for(var c=-1,l=(t=o(t,e)).length,p=l-1,u=e;null!=u&&++c<l;){var f=s(t[c]),h=n;if(c!=p){var g=u[f];void 0===(h=d?d(g,f,u):void 0)&&(h=r(g)?g:a(t[c+1])?[]:{})}i(u,f,h),u=u[f]}return e}t.exports=d},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var i=e("./constant"),o=e("./_defineProperty"),a=e("./identity"),r=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:a;t.exports=r},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function i(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=i},{}],125:[function(e,t,n){function i(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}t.exports=i},{}],126:[function(e,t,n){var i=e("./_Symbol"),o=e("./_arrayMap"),a=e("./isArray"),r=e("./isSymbol"),s=1/0,d=i?i.prototype:void 0,c=d?d.toString:void 0;function l(e){if("string"==typeof e)return e;if(a(e))return o(e,l)+"";if(r(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=l},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function i(e){return function(t){return e(t)}}t.exports=i},{}],128:[function(e,t,n){var i=e("./_SetCache"),o=e("./_arrayIncludes"),a=e("./_arrayIncludesWith"),r=e("./_cacheHas"),s=e("./_createSet"),d=e("./_setToArray"),c=200;function l(e,t,n){var l=-1,p=o,u=e.length,f=!0,h=[],g=h;if(n)f=!1,p=a;else if(u>=c){var y=t?null:s(e);if(y)return d(y);f=!1,p=r,g=new i}else g=t?[]:h;e:for(;++l<u;){var m=e[l],v=t?t(m):m;if(m=n||0!==m?m:0,f&&v==v){for(var b=g.length;b--;)if(g[b]===v)continue e;t&&g.push(v),h.push(m)}else p(g,v,n)||(g!==h&&g.push(v),h.push(m))}return h}t.exports=l},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var i=e("./_arrayMap");function o(e,t){return i(t,function(t){return e[t]})}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function i(e,t,n){for(var i=-1,o=e.length,a=t.length,r={};++i<o;){var s=i<a?t[i]:void 0;n(r,e[i],s)}return r}t.exports=i},{}],131:[function(e,t,n){function i(e,t){return e.has(t)}t.exports=i},{}],132:[function(e,t,n){var i=e("./identity");function o(e){return"function"==typeof e?e:i}t.exports=o},{"./identity":241}],133:[function(e,t,n){var i=e("./isArray"),o=e("./_isKey"),a=e("./_stringToPath"),r=e("./toString");function s(e,t){return i(e)?e:o(e,t)?[e]:a(r(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var i=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var i=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,r=a&&a.exports===o?i.Buffer:void 0,s=r?r.allocUnsafe:void 0;function d(e,t){if(t)return e.slice();var n=e.length,i=s?s(n):new e.constructor(n);return e.copy(i),i}t.exports=d},{"./_root":208}],136:[function(e,t,n){var i=e("./_cloneArrayBuffer");function o(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var i=/\w*$/;function o(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var i=e("./_Symbol"),o=i?i.prototype:void 0,a=o?o.valueOf:void 0;function r(e){return a?Object(a.call(e)):{}}t.exports=r},{"./_Symbol":60}],139:[function(e,t,n){var i=e("./_cloneArrayBuffer");function o(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var i=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,a=e==e,r=i(e),s=void 0!==t,d=null===t,c=t==t,l=i(t);if(!d&&!l&&!r&&e>t||r&&s&&c&&!d&&!l||o&&s&&c||!n&&c||!a)return 1;if(!o&&!r&&!l&&e<t||l&&n&&a&&!o&&!r||d&&n&&a||!s&&a||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var i=e("./_compareAscending");function o(e,t,n){for(var o=-1,a=e.criteria,r=t.criteria,s=a.length,d=n.length;++o<s;){var c=i(a[o],r[o]);if(c)return o>=d?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function i(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}t.exports=i},{}],143:[function(e,t,n){var i=e("./_assignValue"),o=e("./_baseAssignValue");function a(e,t,n,a){var r=!n;n||(n={});for(var s=-1,d=t.length;++s<d;){var c=t[s],l=a?a(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),r?o(n,c,l):i(n,c,l)}return n}t.exports=a},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var i=e("./_copyObject"),o=e("./_getSymbols");function a(e,t){return i(e,o(e),t)}t.exports=a},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var i=e("./_copyObject"),o=e("./_getSymbolsIn");function a(e,t){return i(e,o(e),t)}t.exports=a},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var i=e("./_root")["__core-js_shared__"];t.exports=i},{"./_root":208}],147:[function(e,t,n){var i=e("./_baseRest"),o=e("./_isIterateeCall");function a(e){return i(function(t,n){var i=-1,a=n.length,r=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(a--,r):void 0,s&&o(n[0],n[1],s)&&(r=a<3?void 0:r,a=1),t=Object(t);++i<a;){var d=n[i];d&&e(t,d,i,r)}return t})}t.exports=a},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var i=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!i(n))return e(n,o);for(var a=n.length,r=t?a:-1,s=Object(n);(t?r--:++r<a)&&!1!==o(s[r],r,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function i(e){return function(t,n,i){for(var o=-1,a=Object(t),r=i(t),s=r.length;s--;){var d=r[e?s:++o];if(!1===n(a[d],d,a))break}return t}}t.exports=i},{}],150:[function(e,t,n){var i=e("./_baseIteratee"),o=e("./isArrayLike"),a=e("./keys");function r(e){return function(t,n,r){var s=Object(t);if(!o(t)){var d=i(n,3);t=a(t),n=function(e){return d(s[e],e,s)}}var c=e(t,n,r);return c>-1?s[d?t[c]:c]:void 0}}t.exports=r},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var i=e("./_baseRange"),o=e("./_isIterateeCall"),a=e("./toFinite");function r(e){return function(t,n,r){return r&&"number"!=typeof r&&o(t,n,r)&&(n=r=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),r=void 0===r?t<n?1:-1:a(r),i(t,n,r,e)}}t.exports=r},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var i=e("./_Set"),o=e("./noop"),a=e("./_setToArray"),r=1/0,s=i&&1/a(new i([,-0]))[1]==r?function(e){return new i(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var i=e("./_getNative"),o=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var i=e("./_SetCache"),o=e("./_arraySome"),a=e("./_cacheHas"),r=1,s=2;function d(e,t,n,d,c,l){var p=n&r,u=e.length,f=t.length;if(u!=f&&!(p&&f>u))return!1;var h=l.get(e);if(h&&l.get(t))return h==t;var g=-1,y=!0,m=n&s?new i:void 0;for(l.set(e,t),l.set(t,e);++g<u;){var v=e[g],b=t[g];if(d)var _=p?d(b,v,g,t,e,l):d(v,b,g,e,t,l);if(void 0!==_){if(_)continue;y=!1;break}if(m){if(!o(t,function(e,t){if(!a(m,t)&&(v===e||c(v,e,n,d,l)))return m.push(t)})){y=!1;break}}else if(v!==b&&!c(v,b,n,d,l)){y=!1;break}}return l.delete(e),l.delete(t),y}t.exports=d},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var i=e("./_Symbol"),o=e("./_Uint8Array"),a=e("./eq"),r=e("./_equalArrays"),s=e("./_mapToArray"),d=e("./_setToArray"),c=1,l=2,p="[object Boolean]",u="[object Date]",f="[object Error]",h="[object Map]",g="[object Number]",y="[object RegExp]",m="[object Set]",v="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",k="[object DataView]",P=i?i.prototype:void 0,I=P?P.valueOf:void 0;function S(e,t,n,i,P,S,j){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!S(new o(e),new o(t)));case p:case u:case g:return a(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case v:return e==t+"";case h:var N=s;case m:var O=i&c;if(N||(N=d),e.size!=t.size&&!O)return!1;var E=j.get(e);if(E)return E==t;i|=l,j.set(e,t);var T=r(N(e),N(t),i,P,S,j);return j.delete(e),T;case b:if(I)return I.call(e)==I.call(t)}return!1}t.exports=S},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var i=e("./_getAllKeys"),o=1,a=Object.prototype.hasOwnProperty;function r(e,t,n,r,s,d){var c=n&o,l=i(e),p=l.length;if(p!=i(t).length&&!c)return!1;for(var u=p;u--;){var f=l[u];if(!(c?f in t:a.call(t,f)))return!1}var h=d.get(e);if(h&&d.get(t))return h==t;var g=!0;d.set(e,t),d.set(t,e);for(var y=c;++u<p;){var m=e[f=l[u]],v=t[f];if(r)var b=c?r(v,m,f,t,e,d):r(m,v,f,e,t,d);if(!(void 0===b?m===v||s(m,v,n,r,d):b)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var _=e.constructor,k=t.constructor;_==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof k&&k instanceof k||(g=!1)}return d.delete(e),d.delete(t),g}t.exports=r},{"./_getAllKeys":159}],157:[function(e,t,n){var i=e("./flatten"),o=e("./_overRest"),a=e("./_setToString");function r(e){return a(o(e,void 0,i),e+"")}t.exports=r},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(e,t,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,void 0!==b?b:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var i=e("./_baseGetAllKeys"),o=e("./_getSymbols"),a=e("./keys");function r(e){return i(e,a,o)}t.exports=r},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var i=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),a=e("./keysIn");function r(e){return i(e,a,o)}t.exports=r},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var i=e("./_isKeyable");function o(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var i=e("./_isStrictComparable"),o=e("./keys");function a(e){for(var t=o(e),n=t.length;n--;){var a=t[n],r=e[a];t[n]=[a,r,i(r)]}return t}t.exports=a},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var i=e("./_baseIsNative"),o=e("./_getValue");function a(e,t){var n=o(e,t);return i(n)?n:void 0}t.exports=a},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var i=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=i},{"./_overArg":206}],165:[function(e,t,n){var i=e("./_Symbol"),o=Object.prototype,a=o.hasOwnProperty,r=o.toString,s=i?i.toStringTag:void 0;function d(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var o=r.call(e);return i&&(t?e[s]=n:delete e[s]),o}t.exports=d},{"./_Symbol":60}],166:[function(e,t,n){var i=e("./_arrayFilter"),o=e("./stubArray"),a=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,s=r?function(e){return null==e?[]:(e=Object(e),i(r(e),function(t){return a.call(e,t)}))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var i=e("./_arrayPush"),o=e("./_getPrototype"),a=e("./_getSymbols"),r=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,a(e)),e=o(e);return t}:r;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var i=e("./_DataView"),o=e("./_Map"),a=e("./_Promise"),r=e("./_Set"),s=e("./_WeakMap"),d=e("./_baseGetTag"),c=e("./_toSource"),l="[object Map]",p="[object Object]",u="[object Promise]",f="[object Set]",h="[object WeakMap]",g="[object DataView]",y=c(i),m=c(o),v=c(a),b=c(r),_=c(s),k=d;(i&&k(new i(new ArrayBuffer(1)))!=g||o&&k(new o)!=l||a&&k(a.resolve())!=u||r&&k(new r)!=f||s&&k(new s)!=h)&&(k=function(e){var t=d(e),n=t==p?e.constructor:void 0,i=n?c(n):"";if(i)switch(i){case y:return g;case m:return l;case v:return u;case b:return f;case _:return h}return t}),t.exports=k},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function i(e,t){return null==e?void 0:e[t]}t.exports=i},{}],170:[function(e,t,n){var i=e("./_castPath"),o=e("./isArguments"),a=e("./isArray"),r=e("./_isIndex"),s=e("./isLength"),d=e("./_toKey");function c(e,t,n){for(var c=-1,l=(t=i(t,e)).length,p=!1;++c<l;){var u=d(t[c]);if(!(p=null!=e&&n(e,u)))break;e=e[u]}return p||++c!=l?p:!!(l=null==e?0:e.length)&&s(l)&&r(u,l)&&(a(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var i=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function o(e){return i.test(e)}t.exports=o},{}],172:[function(e,t,n){var i=e("./_nativeCreate");function o(){this.__data__=i?i(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function i(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=i},{}],174:[function(e,t,n){var i=e("./_nativeCreate"),o="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;function r(e){var t=this.__data__;if(i){var n=t[e];return n===o?void 0:n}return a.call(t,e)?t[e]:void 0}t.exports=r},{"./_nativeCreate":201}],175:[function(e,t,n){var i=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}t.exports=a},{"./_nativeCreate":201}],176:[function(e,t,n){var i=e("./_nativeCreate"),o="__lodash_hash_undefined__";function a(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?o:t,this}t.exports=a},{"./_nativeCreate":201}],177:[function(e,t,n){var i=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var i=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),a=e("./_cloneRegExp"),r=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),d="[object Boolean]",c="[object Date]",l="[object Map]",p="[object Number]",u="[object RegExp]",f="[object Set]",h="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",m="[object DataView]",v="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",k="[object Int16Array]",P="[object Int32Array]",I="[object Uint8Array]",S="[object Uint8ClampedArray]",j="[object Uint16Array]",N="[object Uint32Array]";function O(e,t,n){var O=e.constructor;switch(t){case y:return i(e);case d:case c:return new O(+e);case m:return o(e,n);case v:case b:case _:case k:case P:case I:case S:case j:case N:return s(e,n);case l:return new O;case p:case h:return new O(e);case u:return a(e);case f:return new O;case g:return r(e)}}t.exports=O},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var i=e("./_baseCreate"),o=e("./_getPrototype"),a=e("./_isPrototype");function r(e){return"function"!=typeof e.constructor||a(e)?{}:i(o(e))}t.exports=r},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var i=e("./_Symbol"),o=e("./isArguments"),a=e("./isArray"),r=i?i.isConcatSpreadable:void 0;function s(e){return a(e)||o(e)||!!(r&&e&&e[r])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var i=9007199254740991,o=/^(?:0|[1-9]\d*)$/;function a(e,t){var n=typeof e;return!!(t=null==t?i:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=a},{}],182:[function(e,t,n){var i=e("./eq"),o=e("./isArrayLike"),a=e("./_isIndex"),r=e("./isObject");function s(e,t,n){if(!r(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&a(t,n.length):"string"==s&&t in n)&&i(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var i=e("./isArray"),o=e("./isSymbol"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||r.test(e)||!a.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function i(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=i},{}],185:[function(e,t,n){var i,o=e("./_coreJsData"),a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";function r(e){return!!a&&a in e}t.exports=r},{"./_coreJsData":146}],186:[function(e,t,n){var i=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}t.exports=o},{}],187:[function(e,t,n){var i=e("./isObject");function o(e){return e==e&&!i(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function i(){this.__data__=[],this.size=0}t.exports=i},{}],189:[function(e,t,n){var i=e("./_assocIndexOf"),o=Array.prototype.splice;function a(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=a},{"./_assocIndexOf":76}],190:[function(e,t,n){var i=e("./_assocIndexOf");function o(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var i=e("./_assocIndexOf");function o(e){return i(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var i=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=i(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var i=e("./_Hash"),o=e("./_ListCache"),a=e("./_Map");function r(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}t.exports=r},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var i=e("./_getMapData");function o(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var i=e("./_getMapData");function o(e){return i(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var i=e("./_getMapData");function o(e){return i(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var i=e("./_getMapData");function o(e,t){var n=i(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function i(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}t.exports=i},{}],199:[function(e,t,n){function i(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=i},{}],200:[function(e,t,n){var i=e("./memoize"),o=500;function a(e){var t=i(e,function(e){return n.size===o&&n.clear(),e}),n=t.cache;return t}t.exports=a},{"./memoize":265}],201:[function(e,t,n){var i=e("./_getNative")(Object,"create");t.exports=i},{"./_getNative":163}],202:[function(e,t,n){var i=e("./_overArg")(Object.keys,Object);t.exports=i},{"./_overArg":206}],203:[function(e,t,n){function i(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=i},{}],204:[function(e,t,n){var i=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,r=a&&a.exports===o&&i.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var i=Object.prototype.toString;function o(e){return i.call(e)}t.exports=o},{}],206:[function(e,t,n){function i(e,t){return function(n){return e(t(n))}}t.exports=i},{}],207:[function(e,t,n){var i=e("./_apply"),o=Math.max;function a(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,r=-1,s=o(a.length-t,0),d=Array(s);++r<s;)d[r]=a[t+r];r=-1;for(var c=Array(t+1);++r<t;)c[r]=a[r];return c[t]=n(d),i(e,this,c)}}t.exports=a},{"./_apply":63}],208:[function(e,t,n){var i=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},{"./_freeGlobal":158}],209:[function(e,t,n){function i(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=i},{}],210:[function(e,t,n){var i="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,i),this}t.exports=o},{}],211:[function(e,t,n){function i(e){return this.__data__.has(e)}t.exports=i},{}],212:[function(e,t,n){function i(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=i},{}],213:[function(e,t,n){var i=e("./_baseSetToString"),o=e("./_shortOut")(i);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var i=800,o=16,a=Date.now;function r(e){var t=0,n=0;return function(){var r=a(),s=o-(r-n);if(n=r,s>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r},{}],215:[function(e,t,n){var i=e("./_ListCache");function o(){this.__data__=new i,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function i(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=i},{}],217:[function(e,t,n){function i(e){return this.__data__.get(e)}t.exports=i},{}],218:[function(e,t,n){function i(e){return this.__data__.has(e)}t.exports=i},{}],219:[function(e,t,n){var i=e("./_ListCache"),o=e("./_Map"),a=e("./_MapCache"),r=200;function s(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!o||s.length<r-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function i(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}t.exports=i},{}],221:[function(e,t,n){var i=e("./_asciiSize"),o=e("./_hasUnicode"),a=e("./_unicodeSize");function r(e){return o(e)?a(e):i(e)}t.exports=r},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var i=e("./_memoizeCapped"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,r=i(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,i,o){t.push(i?o.replace(a,"$1"):n||e)}),t});t.exports=r},{"./_memoizeCapped":200}],223:[function(e,t,n){var i=e("./isSymbol"),o=1/0;function a(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=a},{"./isSymbol":256}],224:[function(e,t,n){var i=Function.prototype.toString;function o(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var i="\\ud800-\\udfff",o="["+i+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",s="[^"+i+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+a+"|"+r+")?",p="[\\ufe0e\\ufe0f]?",u=p+l+"(?:\\u200d(?:"+[s,d,c].join("|")+")"+p+l+")*",f="(?:"+[s+a+"?",a,d,c,o].join("|")+")",h=RegExp(r+"(?="+r+")|"+f+u,"g");function g(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}t.exports=g},{}],226:[function(e,t,n){var i=e("./_baseClone"),o=4;function a(e){return i(e,o)}t.exports=a},{"./_baseClone":80}],227:[function(e,t,n){var i=e("./_baseClone"),o=1,a=4;function r(e){return i(e,o|a)}t.exports=r},{"./_baseClone":80}],228:[function(e,t,n){function i(e){return function(){return e}}t.exports=i},{}],229:[function(e,t,n){var i=e("./_baseRest"),o=e("./eq"),a=e("./_isIterateeCall"),r=e("./keysIn"),s=Object.prototype,d=s.hasOwnProperty,c=i(function(e,t){e=Object(e);var n=-1,i=t.length,c=i>2?t[2]:void 0;for(c&&a(t[0],t[1],c)&&(i=1);++n<i;)for(var l=t[n],p=r(l),u=-1,f=p.length;++u<f;){var h=p[u],g=e[h];(void 0===g||o(g,s[h])&&!d.call(e,h))&&(e[h]=l[h])}return e});t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function i(e,t){return e===t||e!=e&&t!=t}t.exports=i},{}],232:[function(e,t,n){var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),r=e("./isArray");function s(e,t){return(r(e)?i:o)(e,a(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var i=e("./_createFind")(e("./findIndex"));t.exports=i},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var i=e("./_baseFindIndex"),o=e("./_baseIteratee"),a=e("./toInteger"),r=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var d=null==n?0:a(n);return d<0&&(d=r(s+d,0)),i(e,o(t,3),d)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var i=e("./_baseFlatten");function o(e){return null!=e&&e.length?i(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var i=e("./_arrayEach"),o=e("./_baseEach"),a=e("./_castFunction"),r=e("./isArray");function s(e,t){return(r(e)?i:o)(e,a(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var i=e("./_baseFor"),o=e("./_castFunction"),a=e("./keysIn");function r(e,t){return null==e?e:i(e,o(t),a)}t.exports=r},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var i=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:i(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var i=e("./_baseHas"),o=e("./_hasPath");function a(e,t){return null!=e&&o(e,t,i)}t.exports=a},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var i=e("./_baseHasIn"),o=e("./_hasPath");function a(e,t){return null!=e&&o(e,t,i)}t.exports=a},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function i(e){return e}t.exports=i},{}],242:[function(e,t,n){var i=e("./_baseIsArguments"),o=e("./isObjectLike"),a=Object.prototype,r=a.hasOwnProperty,s=a.propertyIsEnumerable,d=i(function(){return arguments}())?i:function(e){return o(e)&&r.call(e,"callee")&&!s.call(e,"callee")};t.exports=d},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var i=Array.isArray;t.exports=i},{}],244:[function(e,t,n){var i=e("./isFunction"),o=e("./isLength");function a(e){return null!=e&&o(e.length)&&!i(e)}t.exports=a},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var i=e("./isArrayLike"),o=e("./isObjectLike");function a(e){return o(e)&&i(e)}t.exports=a},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var i=e("./_root"),o=e("./stubFalse"),a="object"==typeof n&&n&&!n.nodeType&&n,r=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===a?i.Buffer:void 0,d=(s?s.isBuffer:void 0)||o;t.exports=d},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArguments"),r=e("./isArray"),s=e("./isArrayLike"),d=e("./isBuffer"),c=e("./_isPrototype"),l=e("./isTypedArray"),p="[object Map]",u="[object Set]",f=Object.prototype.hasOwnProperty;function h(e){if(null==e)return!0;if(s(e)&&(r(e)||"string"==typeof e||"function"==typeof e.splice||d(e)||l(e)||a(e)))return!e.length;var t=o(e);if(t==p||t==u)return!e.size;if(c(e))return!i(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}t.exports=h},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObject"),a="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",d="[object Proxy]";function c(e){if(!o(e))return!1;var t=i(e);return t==r||t==s||t==a||t==d}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var i=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}t.exports=o},{}],250:[function(e,t,n){var i=e("./_baseIsMap"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isMap,s=r?o(r):i;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=i},{}],252:[function(e,t,n){function i(e){return null!=e&&"object"==typeof e}t.exports=i},{}],253:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./_getPrototype"),a=e("./isObjectLike"),r="[object Object]",s=Function.prototype,d=Object.prototype,c=s.toString,l=d.hasOwnProperty,p=c.call(Object);function u(e){if(!a(e)||i(e)!=r)return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}t.exports=u},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var i=e("./_baseIsSet"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isSet,s=r?o(r):i;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isArray"),a=e("./isObjectLike"),r="[object String]";function s(e){return"string"==typeof e||!o(e)&&a(e)&&i(e)==r}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Symbol]";function r(e){return"symbol"==typeof e||o(e)&&i(e)==a}t.exports=r},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var i=e("./_baseIsTypedArray"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isTypedArray,s=r?o(r):i;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function i(e){return void 0===e}t.exports=i},{}],259:[function(e,t,n){var i=e("./_arrayLikeKeys"),o=e("./_baseKeys"),a=e("./isArrayLike");function r(e){return a(e)?i(e):o(e)}t.exports=r},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var i=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),a=e("./isArrayLike");function r(e){return a(e)?i(e,!0):o(e)}t.exports=r},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function i(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=i},{}],262:[function(e,t,n){var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),r=e("./isArray");function s(e,t){return(r(e)?i:a)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./_baseForOwn"),a=e("./_baseIteratee");function r(e,t){var n={};return t=a(t,3),o(e,function(e,o,a){i(n,o,t(e,o,a))}),n}t.exports=r},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseGt"),a=e("./identity");function r(e){return e&&e.length?i(e,a,o):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var i=e("./_MapCache"),o="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],a=n.cache;if(a.has(o))return a.get(o);var r=e.apply(this,i);return n.cache=a.set(o,r)||a,r};return n.cache=new(a.Cache||i),n}a.Cache=i,t.exports=a},{"./_MapCache":55}],266:[function(e,t,n){var i=e("./_baseMerge"),o=e("./_createAssigner")(function(e,t,n){i(e,t,n)});t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseLt"),a=e("./identity");function r(e){return e&&e.length?i(e,a,o):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseIteratee"),a=e("./_baseLt");function r(e,t){return e&&e.length?i(e,o(t,2),a):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function i(){}t.exports=i},{}],270:[function(e,t,n){var i=e("./_root"),o=function(){return i.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var i=e("./_basePick"),o=e("./_flatRest")(function(e,t){return null==e?{}:i(e,t)});t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var i=e("./_baseProperty"),o=e("./_basePropertyDeep"),a=e("./_isKey"),r=e("./_toKey");function s(e){return a(e)?i(r(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var i=e("./_createRange")();t.exports=i},{"./_createRange":151}],274:[function(e,t,n){var i=e("./_arrayReduce"),o=e("./_baseEach"),a=e("./_baseIteratee"),r=e("./_baseReduce"),s=e("./isArray");function d(e,t,n){var d=s(e)?i:r,c=arguments.length<3;return d(e,a(t,4),n,c,o)}t.exports=d},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArrayLike"),r=e("./isString"),s=e("./_stringSize"),d="[object Map]",c="[object Set]";function l(e){if(null==e)return 0;if(a(e))return r(e)?s(e):e.length;var t=o(e);return t==d||t==c?e.size:i(e).length}t.exports=l},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var i=e("./_baseFlatten"),o=e("./_baseOrderBy"),a=e("./_baseRest"),r=e("./_isIterateeCall"),s=a(function(e,t){if(null==e)return[];var n=t.length;return n>1&&r(e,t[0],t[1])?t=[]:n>2&&r(t[0],t[1],t[2])&&(t=[t[0]]),o(e,i(t,1),[])});t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function i(){return[]}t.exports=i},{}],278:[function(e,t,n){function i(){return!1}t.exports=i},{}],279:[function(e,t,n){var i=e("./toNumber"),o=1/0,a=17976931348623157e292;function r(e){return e?(e=i(e))===o||e===-o?(e<0?-1:1)*a:e==e?e:0:0===e?e:0}t.exports=r},{"./toNumber":281}],280:[function(e,t,n){var i=e("./toFinite");function o(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var i=e("./isObject"),o=e("./isSymbol"),a=NaN,r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function p(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=d.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):s.test(e)?a:+e}t.exports=p},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var i=e("./_copyObject"),o=e("./keysIn");function a(e){return i(e,o(e))}t.exports=a},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var i=e("./_baseToString");function o(e){return null==e?"":i(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var i=e("./_arrayEach"),o=e("./_baseCreate"),a=e("./_baseForOwn"),r=e("./_baseIteratee"),s=e("./_getPrototype"),d=e("./isArray"),c=e("./isBuffer"),l=e("./isFunction"),p=e("./isObject"),u=e("./isTypedArray");function f(e,t,n){var f=d(e),h=f||c(e)||u(e);if(t=r(t,4),null==n){var g=e&&e.constructor;n=h?f?new g:[]:p(e)&&l(g)?o(s(e)):{}}return(h?i:a)(e,function(e,i,o){return t(n,e,i,o)}),n}t.exports=f},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var i=e("./_baseFlatten"),o=e("./_baseRest"),a=e("./_baseUniq"),r=e("./isArrayLikeObject"),s=o(function(e){return a(i(e,1,r,!0))});t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var i=e("./toString"),o=0;function a(e){var t=++o;return i(e)+t}t.exports=a},{"./toString":283}],287:[function(e,t,n){var i=e("./_baseValues"),o=e("./keys");function a(e){return null==e?[]:i(e,o(e))}t.exports=a},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var i=e("./_assignValue"),o=e("./_baseZipObject");function a(e,t){return o(e||[],t||[],i)}t.exports=a},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var Wn=$n.exports;function Yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Jn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var Zn=function(){return e(function e(n,i){t(this,e),this.pipelineId=n,this.objectModel=i,this.store=i.store},[{key:"getPipeline",value:function(){return this.objectModel.getCanvasInfoPipeline(this.pipelineId)}},{key:"isPipelineExternal",value:function(){return this.objectModel.getCanvasInfoPipeline(this.pipelineId).parentUrl}},{key:"getObjects",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.nodes.concat(e.comments):[]}},{key:"moveObjects",value:function(e){this.store.dispatch({type:"MOVE_OBJECTS",data:e,pipelineId:this.pipelineId})}},{key:"deleteObject",value:function(e){this.deleteObjects([e])}},{key:"deleteObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange(function(e){var n=t.filterNodesAndComments(e),i=n.nodes,o=n.comments;t.deleteNodesInternal(i),t.deleteCommentsInternal(o)},e)}},{key:"addAndUpdateObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange(function(e){t.store.dispatch({type:"ADD_AND_UPDATE_OBJECTS",data:e,pipelineId:t.pipelineId})},e)}},{key:"deleteAndUpdateObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange(function(e){t.store.dispatch({type:"DELETE_AND_UPDATE_OBJECTS",data:e,pipelineId:t.pipelineId})},e)}},{key:"addPastedObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange(function(e){t.store.dispatch({type:"ADD_PASTED_OBJECTS",data:e,pipelineId:t.pipelineId})},e)}},{key:"deletePastedObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange(function(e){t.store.dispatch({type:"DELETE_PASTED_OBJECTS",data:e,pipelineId:t.pipelineId})},e)}},{key:"filterNodesAndComments",value:function(e){var t=this,n=[],i=[];return e.forEach(function(e){var o=t.getComment(e);o?i.push(o):n.push(t.getNode(e))}),{nodes:n,comments:i}}},{key:"getObjectStyle",value:function(e,t){var n=this.getObject(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"setObjectsClassName",value:function(e,t){this.store.dispatch({type:"SET_OBJECTS_CLASS_NAME",data:{objIds:e,newClassName:t},pipelineId:this.pipelineId})}},{key:"setObjectsColorClassName",value:function(e,t){this.store.dispatch({type:"SET_OBJECTS_COLOR_CLASS_NAME",data:{objIds:e,newColorClass:t},pipelineId:this.pipelineId})}},{key:"disconnectObjects",value:function(e){var t=this,n=[];return e.forEach(function(e){t.getLinksContainingId(e).forEach(function(e){n=t.pushUniqueLinks(e,n)})}),this.store.dispatch({type:"DELETE_LINKS",data:{linksToDelete:n},pipelineId:this.pipelineId}),n}},{key:"isEmpty",value:function(){return this.store.isEmpty(this.pipelineId)}},{key:"getObject",value:function(e){var t=this.getNode(e);if(t)return t;var n=this.getComment(e);return n||null}},{key:"exactlyOverlaps",value:function(e,t,n){var i=this,o=!1;e&&e.length>0&&(e.findIndex(function(e){return i.exactlyOverlapsNodes(e)})>-1&&(o=!0));!1===o&&t&&t.length>0&&(t.findIndex(function(e){return i.exactlyOverlapsComments(e)})>-1&&(o=!0));!1===o&&n&&n.length>0&&(n.findIndex(function(e){return i.exactlyOverlapsLinks(e)})>-1&&(o=!0));return o}},{key:"exactlyOverlapsNodes",value:function(e){var t=!1;return this.getNodes().forEach(function(n){n.x_pos===e.x_pos&&n.y_pos===e.y_pos&&(t=!0)}),t}},{key:"overlapsNodes",value:function(e,t){var n=!1;return(t||this.getNodes()).forEach(function(t){var i=t.x_pos+t.width,o=t.y_pos+t.height;e.id!==t.id&&(e.x_pos===t.x_pos&&e.y_pos===t.y_pos||e.x_pos>=t.x_pos&&e.x_pos<=i&&e.y_pos>=t.y_pos&&e.y_pos<=o||e.x_pos+e.width>t.x_pos&&e.x_pos+e.width<i&&e.y_pos>t.y_pos&&e.y_pos<o||e.x_pos>t.x_pos&&e.x_pos<i&&e.y_pos+e.height>t.y_pos&&e.y_pos+e.height<o||e.x_pos+e.width>t.x_pos&&e.x_pos+e.width<i&&e.y_pos+e.height>t.y_pos&&e.y_pos+e.height<o)&&(n=!0)}),n}},{key:"exactlyOverlapsComments",value:function(e){var t=!1;return this.getComments().forEach(function(n){n.x_pos===e.x_pos&&n.y_pos===e.y_pos&&(t=!0)}),t}},{key:"exactlyOverlapsLinks",value:function(e){var t=!1;return this.getLinks().forEach(function(n){n.srcPos&&e.srcPos&&n.srcPos.x_pos===e.srcPos.x_pos&&n.srcPos.y_pos===e.srcPos.y_pos&&(t=!0),n.trgPos&&e.trgPos&&n.trgPos.x_pos===e.trgPos.x_pos&&n.trgPos.y_pos===e.trgPos.y_pos&&(t=!0)}),t}},{key:"isObjectIdInObjects",value:function(e,t){return!!t&&t.findIndex(function(t){return t.id===e})>-1}},{key:"createNode",value:function(e){var t=e.nodeTemplate;m(e.nodeTemplate,"app_data.ui_data")&&(t=this.objectModel.convertNodeTemplate(t));var n={};return null!==t&&(n=Object.assign({},t,{id:this.objectModel.getUniqueId(Y,{nodeType:t,pipelineId:this.pipelineId}),x_pos:e.offsetX,y_pos:e.offsetY}),n=this.objectModel.setNodeAttributes(n)),n}},{key:"getAutoSourceNode",value:function(e){var t=null,n=this.objectModel.getSelectedNodes();if(1===n.length&&this.isViableAutoSourceNode(n[0]))t=n[0];else if(!e){var i=this.getNodes();if(i.length>0){var o=i[i.length-1];if(o.outputs)t=o;else if(i.length>1){var a=i[i.length-2];a.outputs&&(t=a)}}}return t}},{key:"isViableAutoSourceNode",value:function(e){return e.outputs&&e.outputs.length>0&&!Fe.isSrcCardinalityAtMax(e.outputs[0].id,e,this.getLinks())}},{key:"createAutoNode",value:function(e,t){var n=this.objectModel.getCanvasLayout().autoLayoutInitialMarginX,i=this.objectModel.getCanvasLayout().autoLayoutInitialMarginY,o=this.objectModel.getCanvasLayout().autoLayoutHorizontalSpacing,a=this.objectModel.getCanvasLayout().autoLayoutVerticalSpacing,r=0,s=0;null===t?(r=n,s=i):(r=t.x_pos+t.width+o,s=t.y_pos),e.offsetX=r,e.offsetY=s;var d=this.createNode(e);this.getNodes().length>0&&this.isEntryBindingNode(d)&&(d.x_pos=n,d.y_pos+=d.height+a);for(var c=!0;c;)(c=this.isNodeOverlappingOthers(d))&&(d.y_pos+=d.height+a);return d}},{key:"createNodesForPalette",value:function(e){var t=this,n=[];return e.forEach(function(e){var o=t.getNode(e);if(o){if((o=i(o)).id=t.objectModel.getUUID(),o.x_pos=0,o.y_pos=0,(o=Rn.createSchemaNode(o,[])).type===F){var a=t.objectModel.getSchemaPipelinesForSupernode(o);Re(o,"app_data.ui_data.sub_pipelines",a)}n.push(o)}}),n}},{key:"replaceNodes",value:function(e){this.store.dispatch({type:"REPLACE_NODES",data:e,pipelineId:this.pipelineId})}},{key:"isLinkNeededWithAutoNode",value:function(e,t){var n=!1;return e&&t&&e.inputs&&t.outputs&&1===e.inputs.length&&1===t.outputs.length&&!Fe.isCardinalityAtMax(t.outputs[0].id,e.inputs[0].id,t,e,this.getLinks())&&(n=!0),n}},{key:"isEntryBindingNode",value:function(e){return!(e.type!==V||e.inputs&&0!==e.inputs.length)}},{key:"isExitBindingNode",value:function(e){return!!(e.type===V&&e.inputs&&e.inputs.length>0)}},{key:"isNodeOverlappingOthers",value:function(e){var t=this;return-1!==this.getNodes().findIndex(function(n){return t.isSourceOverlappingTarget(n,e)})}},{key:"isSourceOverlappingTarget",value:function(e,t){var n=e.layout.nodeHighlightGap,i=t.layout.nodeHighlightGap;return e.x_pos+e.width+n>=t.x_pos-i&&t.x_pos+t.width+i>=e.x_pos-n&&e.y_pos+e.height+n>=t.y_pos-i&&t.y_pos+t.height+i>=e.y_pos-n}},{key:"addNode",value:function(e){e&&(e.type===F?this.addSupernode(e,k(e,"sub_pipelines")):this.store.dispatch({type:"ADD_NODE",data:{newNode:e},pipelineId:this.pipelineId}))}},{key:"addSupernodes",value:function(e,t,n){this.store.dispatch({type:"ADD_SUPERNODES",data:{supernodesToAdd:e,pipelinesToAdd:t,extPipelineFlowsToAdd:n,pipelineId:this.pipelineId}})}},{key:"addSupernode",value:function(e,t){var n=this,i=this.objectModel.getCanvasInfo(),o=this.objectModel.getCanvasInfo().pipelines.concat(t||[]);o=o.map(function(t){if(t.id===n.pipelineId){var i=[].concat(De(t.nodes),[n.cloneSupernodeRemovePipelineData(e)]);return Object.assign({},t,{nodes:i})}return t});var a=Object.assign({},i,{pipelines:o});this.objectModel.setCanvasInfo(a)}},{key:"cloneSupernodeRemovePipelineData",value:function(e){var t=Object.assign({},e);return t.app_data&&(t.app_data=Object.assign({},t.app_data),t.app_data.ui_data&&delete t.app_data.ui_data.sub_pipelines),t}},{key:"deleteNode",value:function(e){var t=this.getNode(e);t&&this.deleteNodes([t])}},{key:"deleteNodes",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&e.length>0&&this.objectModel.executeWithSelectionChange(function(e){t.deleteNodesInternal(e.nodes,e.removePipelines)},{nodes:e,removePipelines:n})}},{key:"deleteNodesInternal",value:function(e,t){var n=this;e.filter(function(e){return e.type!==F}).forEach(function(e){n.store.dispatch({type:"DELETE_OBJECT",data:{id:e.id},pipelineId:n.pipelineId})});var i=e.filter(function(e){return e.type===F});t?this.deleteSupernodesAndDescPipelines(i):this.deleteSupernodes(i,[],[])}},{key:"deleteSupernodesAndDescPipelines",value:function(e){var t=this.objectModel.getDescPipelinesToDelete(e,this.pipelineId),n=this.objectModel.getExternalPipelineFlowsForPipelines(t);this.deleteSupernodes(e,t,n)}},{key:"deleteSupernodes",value:function(e,t,n){this.store.dispatch({type:"DELETE_SUPERNODES",data:{supernodesToDelete:e,pipelinesToDelete:t,extPipelineFlowsToDelete:n,pipelineId:this.pipelineId}})}},{key:"deconstructSupernode",value:function(e){this.store.dispatch({type:"DECONSTRUCT_SUPERNODE",data:e})}},{key:"reconstructSupernode",value:function(e){this.store.dispatch({type:"RECONSTRUCT_SUPERNODE",data:e})}},{key:"getNodes",value:function(){return this.store.getNodes(this.pipelineId)}},{key:"getNodeIds",value:function(){return this.getNodes().map(function(e){return e.id})}},{key:"getNode",value:function(e){return this.store.getNode(e,this.pipelineId)}},{key:"getSupernodes",value:function(){return Fe.filterSupernodes(this.getNodes())}},{key:"isDataNode",value:function(e){return this.getNode(e)}},{key:"sizeAndPositionObjects",value:function(e,t){this.store.dispatch({type:"SIZE_AND_POSITION_OBJECTS",data:{objectsInfo:e,linksInfo:t},pipelineId:this.pipelineId})}},{key:"filterDataNodes",value:function(e){var t=this;return e.filter(function(e){return t.isDataNode(e)})}},{key:"expandSuperNodeInPlace",value:function(e,t,n){var i=Object.assign({},this.getNode(e),{is_expanded:!0});i=this.objectModel.setNodeAttributes(i),this.store.dispatch({type:"SET_SUPERNODE_EXPAND_STATE",data:{node:i,objectPositions:t,linkPositions:n},pipelineId:this.pipelineId})}},{key:"collapseSuperNodeInPlace",value:function(e,t,n){var i=Object.assign({},this.getNode(e),{is_expanded:!1});i=this.objectModel.setNodeAttributes(i),this.store.dispatch({type:"SET_SUPERNODE_EXPAND_STATE",data:{node:i,objectPositions:t,linkPositions:n},pipelineId:this.pipelineId})}},{key:"isSuperNodeExpandedInPlace",value:function(e){return!0===this.getNode(e).is_expanded}},{key:"isSupernode",value:function(e){return this.getNode(e).type===F}},{key:"getNodeParameters",value:function(e){var t=this.getNode(e);return t?t.parameters:null}},{key:"getNodeUiParameters",value:function(e){var t=this.getNode(e);return t?t.ui_parameters:null}},{key:"setNodeLabel",value:function(e,t){this.store.dispatch({type:"SET_NODE_LABEL",data:{nodeId:e,label:t},pipelineId:this.pipelineId})}},{key:"setNodeDecorations",value:function(e,t){this.store.dispatch({type:"SET_NODE_DECORATIONS",data:{nodeId:e,decorations:this.ensureDecorationsHaveIds(t)},pipelineId:this.pipelineId})}},{key:"setInputPortLabel",value:function(e,t,n){this.store.dispatch({type:"SET_INPUT_PORT_LABEL",data:{nodeId:e,portId:t,label:n},pipelineId:this.pipelineId})}},{key:"setOutputPortLabel",value:function(e,t,n){this.store.dispatch({type:"SET_OUTPUT_PORT_LABEL",data:{nodeId:e,portId:t,label:n},pipelineId:this.pipelineId})}},{key:"setInputPortSubflowNodeRef",value:function(e,t,n){this.store.dispatch({type:"SET_INPUT_PORT_SUBFLOW_NODE_REF",data:{nodeId:e,portId:t,subflowNodeRef:n},pipelineId:this.pipelineId})}},{key:"setOutputPortSubflowNodeRef",value:function(e,t,n){this.store.dispatch({type:"SET_OUTPUT_PORT_SUBFLOW_NODE_REF",data:{nodeId:e,portId:t,subflowNodeRef:n},pipelineId:this.pipelineId})}},{key:"setNodeProperties",value:function(e,t){var n=i(this.getNode(e));n=Object.assign(n,t),n=this.objectModel.setNodeAttributes(n),this.store.dispatch({type:"REPLACE_NODE",data:{node:n},pipelineId:this.pipelineId})}},{key:"setNodeMessage",value:function(e,t){this.store.dispatch({type:"SET_NODE_MESSAGE",data:{nodeId:e,message:t},pipelineId:this.pipelineId})}},{key:"setNodeMessages",value:function(e,t){this.store.dispatch({type:"SET_NODE_MESSAGES",data:{nodeId:e,messages:t},pipelineId:this.pipelineId})}},{key:"setNodeUiParameters",value:function(e,t){this.store.dispatch({type:"SET_NODE_UI_PARAMETERS",data:{nodeId:e,ui_parameters:t},pipelineId:this.pipelineId})}},{key:"setNodeParameters",value:function(e,t){this.store.dispatch({type:"SET_NODE_PARAMETERS",data:{nodeId:e,parameters:t},pipelineId:this.pipelineId})}},{key:"setNodeInputPorts",value:function(e,t){this.setNodeProperties(e,{inputs:t})}},{key:"setNodeOutputPorts",value:function(e,t){this.setNodeProperties(e,{outputs:t})}},{key:"addCustomAttrToNodes",value:function(e,t,n){this.store.dispatch({type:"ADD_NODE_ATTR",data:{objIds:e,attrName:t,attrValue:n},pipelineId:this.pipelineId})}},{key:"removeCustomAttrFromNodes",value:function(e,t,n){this.store.dispatch({type:"REMOVE_NODE_ATTR",data:{objIds:e,attrName:t},pipelineId:this.pipelineId})}},{key:"getNodeDecorations",value:function(e){var t=this.getNode(e);return t?t.decorations:null}},{key:"getNodeMessages",value:function(e){var t=this.getNode(e);return t?t.messages:null}},{key:"getNodeMessage",value:function(e,t){var n=this.getNodeMessages(e);if(n){var i,o=Kn(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.id_ref===t)return a}}catch(e){o.e(e)}finally{o.f()}}return null}},{key:"getNodeInputPorts",value:function(e){var t=this.getNode(e);return t?t.inputs:null}},{key:"getNodeOutputPorts",value:function(e){var t=this.getNode(e);return t?t.outputs:null}},{key:"getNodeClassName",value:function(e){var t=this.getNode(e);return t?t.class_name:null}},{key:"getNodeStyle",value:function(e,t){var n=this.getNode(e);return t?n?n.style_temp:null:n?n.style:null}},{key:"hasErrorMessage",value:function(e){var t=this.getNode(e);return this.objectModel.hasErrorMessage(t)}},{key:"hasWarningMessage",value:function(e){var t=this.getNode(e);return this.objectModel.hasWarningMessage(t)}},{key:"isFlowValid",value:function(e){var t,n=!0,i=Kn(this.getNodes());try{for(i.s();!(t=i.n()).done;){var o=t.value;n&&(n=this.isNodeValid(o,e))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"isNodeValid",value:function(e,t){var n=!0;if(t&&Array.isArray(t)&&t.length>0){var i,o=Kn(e.messages);try{for(o.s();!(i=o.n()).done;){var a=i.value;-1!==t.indexOf(a.type)&&(n=!1)}}catch(e){o.e(e)}finally{o.f()}}else e.messages&&e.messages.length>0&&(n=!1);return n}},{key:"getFlowMessages",value:function(){var e=this.getNodes(),t={};return e.forEach(function(e){e.messages&&e.messages.length>0&&(t[e.id]=e.messages)}),t}},{key:"autoLayout",value:function(e){var t=this.objectModel.getCanvasInfoPipeline(this.pipelineId),n={},i={};if(e===X){var o=this.dagreAutolayout(K,t),a=y(o,2);n=a[0],i=a[1]}else{var r=this.dagreAutolayout(J,t),s=y(r,2);n=s[0],i=s[1]}this.sizeAndPositionObjects(n,i)}},{key:"dagreAutolayout",value:function(e,t){var n,i=this,o=this.objectModel.getCanvasLayout(),a=t.links.filter(function(e){return e.type===D||e.type===M}),r=[],s=null===(n=this.objectModel.getCanvasConfig())||void 0===n?void 0:n.enableNodeLayout,d=null!=s&&s.defaultNodeWidth?s.defaultNodeWidth:150,c=null!=s&&s.defaultNodeHeight?s.defaultNodeHeight:80,l=a.map(function(e){var t=e.srcNodeId,n=e.trgNodeId;return e.srcPos&&(t="temp-src-node-"+e.id,r.push({v:t,value:{width:d,height:c}})),e.trgPos&&(n="temp-trg-node-"+e.id,r.push({v:n,value:{width:d,height:c}})),{v:t,w:n,value:{points:[]}}});r=r.concat(t.nodes.map(function(n){var a=n.width;if(e===J){var r=i.getPaddingForNode(n,o,t);a=n.width+Math.max(r,o.autoLayoutHorizontalSpacing)}return{v:n.id,value:{width:a,height:n.height}}}));var p={};["TB","BT","LR","RL"].indexOf(e)>=0&&(p={rankDir:e});var u={nodes:r,edges:l,value:p},f=o.autoLayoutInitialMarginX,h=o.autoLayoutInitialMarginY,g=o.autoLayoutVerticalSpacing,y=o.autoLayoutHorizontalSpacing;e===J&&(y=0);var m=Wn.graphlib.json.read(u);m.graph().marginx=f,m.graph().marginy=h,"TB"===e?(m.graph().nodesep=y,m.graph().ranksep=g):(m.graph().nodesep=g,m.graph().ranksep=y),Wn.layout(m);var v=Wn.graphlib.json.write(m);return[this.convertGraphToMovedNodes(v,t.nodes),this.convertGraphToMovedLinks(v)]}},{key:"convertGraphToMovedNodes",value:function(e,t){for(var n={},i={},o=0,a=e.nodes.length;o<a;o++)i[e.nodes[o].v]=e.nodes[o];return t.forEach(function(e){n[e.id]={id:e.id,x_pos:i[e.id].value.x-i[e.id].value.width/2,y_pos:i[e.id].value.y-i[e.id].value.height/2,width:e.width,height:e.height}}),n}},{key:"convertGraphToMovedLinks",value:function(e){var t=[];return e.nodes.forEach(function(e){if(e.v.startsWith("temp-src-node-")){var n=e.v.split("temp-src-node-")[1];t[n]={srcPos:{x_pos:e.value.x-e.value.width/2,y_pos:e.value.y}}}if(e.v.startsWith("temp-trg-node-")){var i=e.v.split("temp-trg-node-")[1];t[i]=Xn(Xn({},t[i]),{},{trgPos:{x_pos:e.value.x-e.value.width/2,y_pos:e.value.y}})}}),t}},{key:"getPaddingForNode",value:function(e,t,n){return Fe.getNodePaddingToTargetNodes(e,n.nodes,n.links,t.linkType)}},{key:"getBoundingRectForNodes",value:function(e){var t=e[0].x_pos,n=e[0].y_pos,i=e[0].width+t,o=e[0].height+n;return e.forEach(function(e){t=Math.min(t,e.x_pos),n=Math.min(n,e.y_pos),i=Math.max(i,e.x_pos+e.width),o=Math.max(o,e.y_pos+e.height)}),{x:t,y:n,width:i-t,height:o-n}}},{key:"ensureDecorationsHaveIds",value:function(e){var t=this;return e?e.map(function(e){return Object.assign({},e,{id:e.id||t.objectModel.getUUID()})}):e}},{key:"createComment",value:function(e){var t=this,n={id:this.objectModel.getUniqueId(Z),content:"",height:42,width:175,x_pos:e.pos.x,y_pos:e.pos.y,linkIds:[],selectedObjectIds:[]};return e.contentType&&(n.contentType=e.contentType),e.formats&&(n.formats=e.formats),n=this.objectModel.setCommentAttributes(n),e.selectedObjectIds.forEach(function(e){t.isDataNode(e)&&(n.selectedObjectIds.push(e),n.linkIds.push(t.objectModel.getUniqueId(Q,{comment:n,targetNode:t.getNode(e)})))}),n}},{key:"addComment",value:function(e){this.store.dispatch({type:"ADD_COMMENT",data:e,pipelineId:this.pipelineId}),this.store.dispatch({type:"SHOW_COMMENTS"})}},{key:"getAdjustedCommentPosition",value:function(e){for(var t=this.objectModel.getCanvasConfig().enableSnapToGridType,n={x_pos:e.x,y_pos:e.y};this.exactlyOverlaps(null,[n],null);)t===$||t===W?(n.x_pos+=this.objectModel.getCanvasLayout().snapToGridXPx,n.y_pos+=this.objectModel.getCanvasLayout().snapToGridYPx):(n.x_pos+=10,n.y_pos+=10);return n}},{key:"deleteComment",value:function(e){var t=this.getComment(e);t&&this.deleteComments([t])}},{key:"deleteComments",value:function(e){var t=this;e&&e.length>0&&this.objectModel.executeWithSelectionChange(function(e){t.deleteCommentsInternal(e)},e)}},{key:"deleteCommentsInternal",value:function(e){var t=this;e.forEach(function(e){t.store.dispatch({type:"DELETE_OBJECT",data:{id:e.id},pipelineId:t.pipelineId})})}},{key:"getComments",value:function(){return this.store.getComments(this.pipelineId)}},{key:"getComment",value:function(e){return this.store.getComment(e,this.pipelineId)}},{key:"editComment",value:function(e){this.store.dispatch({type:"EDIT_COMMENT",data:e,pipelineId:this.pipelineId})}},{key:"addCustomAttrToComments",value:function(e,t,n){this.store.dispatch({type:"ADD_COMMENT_ATTR",data:{objIds:e,attrName:t,attrValue:n},pipelineId:this.pipelineId})}},{key:"removeCustomAttrFromComments",value:function(e,t){this.store.dispatch({type:"REMOVE_COMMENT_ATTR",data:{objIds:e,attrName:t},pipelineId:this.pipelineId})}},{key:"getCommentClassName",value:function(e){var t=this.getComment(e);return t?t.class_name:null}},{key:"getCommentStyle",value:function(e,t){var n=this.getComment(e);return t?n?n.style_temp:null:n?n.style:null}},{key:"createLink",value:function(e,t){var n={id:this.objectModel.getUniqueId(ee,{sourceNode:t,targetNode:e}),srcNodeId:t.id,trgNodeId:e.id,type:D};return t.outputs&&t.outputs.length>0&&(n=Object.assign(n,{srcNodePortId:t.outputs[0].id})),e.inputs&&e.inputs.length>0&&(n=Object.assign(n,{trgNodePortId:e.inputs[0].id})),n}},{key:"createLinkFromInfo",value:function(e){var t=this.objectModel.getUniqueId(ee,{sourceNodeId:e.srcNodeId,targetNodeId:e.trgNodeId});return Object.assign({id:t,type:D},e)}},{key:"deleteLink",value:function(e){this.store.dispatch({type:"DELETE_LINK",data:e,pipelineId:this.pipelineId})}},{key:"deleteLinks",value:function(e){this.store.dispatch({type:"DELETE_LINKS",data:{linksToDelete:e},pipelineId:this.pipelineId})}},{key:"updateLinks",value:function(e){this.store.dispatch({type:"UPDATE_LINKS",data:{linksToUpdate:e},pipelineId:this.pipelineId})}},{key:"updateLink",value:function(e){this.updateLinks([e])}},{key:"createNodeLinks",value:function(e){var t=this,n=[];return e.nodes.forEach(function(i){e.targetNodes.forEach(function(o){var a=t.createNodeLink(i,o,e);a&&n.push(a)})}),n}},{key:"createNodeLink",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{type:D},i=this.getNode(e.id),o=this.getNode(t.id),a=this.getLinks(),r=this.objectModel.getCanvasConfig().enableSelfRefLinks;if(e.srcPos&&t.trgPos||e.srcPos&&Fe.isTrgConnectionAllowedWithDetachedLinks(t.portId,o,a)||t.trgPos&&Fe.isSrcConnectionAllowedWithDetachedLinks(e.portId,i,a)||Fe.isConnectionAllowed(e.portId,t.portId,i,o,a,n.type,r)){var s={};return s.id=n.id?n.id:this.objectModel.getUniqueId(ee,{sourceNode:i,targetNode:o}),s.type=n.type,e.srcPos?s.srcPos=e.srcPos:(s.srcNodeId=e.id,s.srcNodePortId=e.portId),t.trgPos?s.trgPos=t.trgPos:(s.trgNodeId=t.id,s.trgNodePortId=t.portId),n.class_name&&(s.class_name=n.class_name),n.linkName&&(s.linkName=n.linkName),s}return null}},{key:"createNodeLinkDetached",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.id=e.id?e.id:this.objectModel.getUniqueId(ee,{sourceNode:this.getNode(e.srcNodeId)}),t.type=D,t.srcNodeId=e.srcNodeId,t.srcNodePortId=e.srcNodePortId,t.trgPos={x_pos:e.trgPos.x,y_pos:e.trgPos.y},e.class_name&&(t.class_name=e.class_name),e.linkName&&(t.linkName=e.linkName),e.typeAttr&&(t.typeAttr=e.typeAttr),e.description&&(t.description=e.description),t}},{key:"createCommentLinks",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return t.nodes.forEach(function(i){t.targetNodes.forEach(function(t){if(Fe.isCommentLinkConnectionAllowed(i,t,e.getLinks())){var o={};o.id=e.objectModel.getUniqueId(Q,{comment:e.getComment(i),targetNode:e.getNode(t)}),o.type=U,o.srcNodeId=i,o.trgNodeId=t,n.push(o)}})}),n}},{key:"addLinks",value:function(e){var t=this;e.forEach(function(e){t.addLink(e)})}},{key:"addLink",value:function(e){this.store.dispatch({type:"ADD_LINK",data:e,pipelineId:this.pipelineId})}},{key:"setLinks",value:function(e){this.store.dispatch({type:"SET_LINKS",data:e,pipelineId:this.pipelineId})}},{key:"getLinks",value:function(){return this.store.getLinks(this.pipelineId)}},{key:"getLinkIds",value:function(){return this.getLinks().map(function(e){return e.id})}},{key:"getLinksBetween",value:function(e,t){var n=this;return this.getLinks().filter(function(i){return!(!n.isObjectIdInObjects(i.trgNodeId,e)||!n.isObjectIdInObjects(i.srcNodeId,e)&&!n.isObjectIdInObjects(i.srcNodeId,t))})}},{key:"getLinksContainingId",value:function(e){return this.getLinks().filter(function(t){return t.srcNodeId===e||t.trgNodeId===e}).map(function(e){return Object.assign({},e)})}},{key:"getLinksContainingIds",value:function(e){var t=this,n=[];return e.forEach(function(e){var i=t.getLinksContainingId(e);i.length>0&&(n=Fe.concatUniqueBasedOnId(i,n))}),n}},{key:"getNodeDataLinksContainingIds",value:function(e){return this.getLinksContainingIds(e).filter(function(e){return e.type===D})}},{key:"getLinksContainingSourceId",value:function(e){return this.getLinks().filter(function(t){return t.srcNodeId===e})}},{key:"getLinksContainingTargetId",value:function(e){return this.getLinks().filter(function(t){return t.trgNodeId===e})}},{key:"getAttachedLinksContainingSourceId",value:function(e){return this.getLinks().filter(function(t){return t.srcNodeId===e&&t.trgNodeId})}},{key:"getAttachedLinksContainingTargetId",value:function(e){return this.getLinks().filter(function(t){return t.trgNodeId===e&&t.srcNodeId})}},{key:"getNodeLinks",value:function(e){var t=this,n=[];return e.forEach(function(e){t.getLinksContainingId(e.id).forEach(function(e){e.type!==D&&e.type!==M||n.push(e)})}),n}},{key:"getNodeDataLinks",value:function(){return this.getLinks().filter(function(e){return e.type===D})}},{key:"getNodeDataLinkFromInfo",value:function(e,t,n,i){var o=this,a=this.getDefaultSrcPortId(e,t),r=this.getDefaultTrgPortId(n,i);return a&&r?this.getLinks().find(function(t){if(t.type===D){var i=o.getDefaultSrcPortId(t.srcNodeId,t.srcNodePortId),s=o.getDefaultTrgPortId(t.trgNodeId,t.trgNodePortId);return t.srcNodeId===e&&i===a&&t.trgNodeId===n&&s===r}return!1}):null}},{key:"getCommentLinkFromInfo",value:function(e,t){return this.getLinks().find(function(n){return n.type===U&&(n.srcNodeId===e&&n.trgNodeId===t||n.srcNodeId===t&&n.trgNodeId===e)})}},{key:"setCommentProperties",value:function(e,t){this.store.dispatch({type:"SET_COMMENT_PROPERTIES",data:{commentId:e,commentProperties:t},pipelineId:this.pipelineId})}},{key:"getNodeAssocLinkFromInfo",value:function(e,t){return this.getLinks().find(function(n){return n.type===M&&(n.srcNodeId===e&&n.trgNodeId===t||n.srcNodeId===t&&n.trgNodeId===e)})}},{key:"getDefaultSrcPortId",value:function(e,t){if(!t){var n=this.getNode(e);if(n&&n.outputs&&n.outputs.length>0)return n.outputs[0].id}return t}},{key:"getDefaultTrgPortId",value:function(e,t){if(!t){var n=this.getNode(e);if(n&&n.inputs&&n.inputs.length>0)return n.inputs[0].id}return t}},{key:"getLink",value:function(e){return this.store.getLink(e,this.pipelineId)}},{key:"setLinkProperties",value:function(e,t){this.store.dispatch({type:"SET_LINK_PROPERTIES",data:{linkId:e,linkProperties:t},pipelineId:this.pipelineId})}},{key:"setNodeDataLinkSrcInfo",value:function(e,t,n){this.store.dispatch({type:"SET_LINK_SRC_INFO",data:{linkId:e,srcNodeId:t,srcNodePortId:n},pipelineId:this.pipelineId})}},{key:"setNodeDataLinkTrgInfo",value:function(e,t,n){this.store.dispatch({type:"SET_LINK_TRG_INFO",data:{linkId:e,trgNodeId:t,trgNodePortId:n},pipelineId:this.pipelineId})}},{key:"getLinkClassName",value:function(e){var t=this.getLink(e);return t&&t.class_name?t.class_name:null}},{key:"getLinkStyle",value:function(e,t){var n=this.getLink(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"setLinksClassName",value:function(e,t){this.store.dispatch({type:"SET_LINKS_CLASS_NAME",data:{linkIds:e,newClassName:t},pipelineId:this.pipelineId})}},{key:"setLinkDecorations",value:function(e,t){this.store.dispatch({type:"SET_LINK_DECORATIONS",data:{linkId:e,decorations:this.ensureDecorationsHaveIds(t)},pipelineId:this.pipelineId})}},{key:"getLinkDecorations",value:function(e){var t=this.getLink(e);return t?t.decorations:null}},{key:"isCommentLinkedToNonSelectedNodes",value:function(e){var t,n=this.getLinksContainingId(e),i=this.objectModel.getSelectedObjectIds(),o=!1,a=Kn(n);try{for(a.s();!(t=a.n()).done;){var r=t.value;if(o=!i.includes(r.trgNodeId))return o}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"pushUniqueLinks",value:function(e,t){return-1===t.findIndex(function(t){return t.id===e.id})&&t.push(e),t}}])}(),Qn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_TOOLTIP_DEF"===t.type&&t.data.tooltipDef?t.data.tooltipDef:e},ei=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE_TYPES_TO_PALETTE":return t.data.nodeTypes?[].concat(De(e),De(t.data.nodeTypes)):e;case"REMOVE_NODE_TYPES_FROM_PALETTE":return e.filter(function(e){return-1===t.data.selObjectIds.findIndex(function(t){return t===e.id})});default:return e}},ti=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE_TYPES_TO_PALETTE":var n=e.find(function(e){return e.id===t.data.categoryId});return n?e.map(function(e){return t.data.categoryId===e.id?Object.assign({},e,{node_types:ei(e.node_types,t)}):e}):(n={id:t.data.categoryId,label:t.data.categoryLabel?t.data.categoryLabel:t.data.categoryId},t.data.categoryDescription&&(n.description=t.data.categoryDescription),t.data.categoryImage&&(n.image=t.data.categoryImage),n.node_types=[],[].concat(De(e),[Object.assign({},n,{node_types:ei(n.node_types,t)})]));case"REMOVE_NODE_TYPES_FROM_PALETTE":return e.map(function(e){return e.id===t.data.categoryId?Object.assign({},e,{node_types:ei(e.node_types,t)}):e});case"SET_CATEGORY_LOADING_TEXT":return e.map(function(e){return e.id===t.data.categoryId?Object.assign({},e,{loading_text:t.data.loadingText}):e});case"SET_CATEGORY_EMPTY_TEXT":return e.map(function(e){return e.id===t.data.categoryId?Object.assign({},e,{empty_text:t.data.emptyText}):e});case"SET_IS_OPEN_CATEGORY":return e.map(function(e){return e.id===t.data.categoryId?Object.assign({},e,{is_open:t.data.isOpen}):e});case"SET_IS_OPEN_ALL_CATEGORIES":return e.map(function(e){return Object.assign({},e,{is_open:t.data.isOpen})});default:return e}},ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_PALETTE_DATA":return{content:{}};case"SET_PALETTE_DATA":var n=Object.assign({},t.data.content);return Object.assign({},e,{content:n});case"ADD_NODE_TYPES_TO_PALETTE":case"REMOVE_NODE_TYPES_FROM_PALETTE":case"SET_IS_OPEN_CATEGORY":case"SET_IS_OPEN_ALL_CATEGORIES":case"SET_CATEGORY_LOADING_TEXT":case"SET_CATEGORY_EMPTY_TEXT":var i=Object.assign({},e.content,{categories:ti(e.content.categories,t)});return Object.assign({},e,{content:i,version:"3.0"});case"SET_PALETTE_OPEN_STATE":return Object.assign({},e,{isOpen:t.data.isOpen});default:return e}},ii=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INPUT_PORT_LABEL":case"SET_OUTPUT_PORT_LABEL":return e.map(function(e,n){if(t.data.portId===e.id){var i=Object.assign({},e);return i.label=t.data.label,i}return e});case"SET_INPUT_PORT_SUBFLOW_NODE_REF":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":return e.map(function(e,n){if(t.data.portId===e.id){var i=Object.assign({},e);return i.subflow_node_ref=t.data.subflowNodeRef,i}return e});default:return e}},oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE":return[].concat(De(e),[Object.assign({},t.data.newNode)]);case"ADD_NODES":return[].concat(De(e),De(t.data.nodesToAdd));case"REPLACE_NODES":return t.data;case"REPLACE_NODE":return e.map(function(e,n){return t.data.node.id===e.id?t.data.node:e});case"MOVE_OBJECTS":return t.data.nodes?e.map(function(e,n){if(t.data.nodes.indexOf(e.id)>-1){var i=e.x_pos+t.data.offsetX,o=e.y_pos+t.data.offsetY;return Object.assign({},e,{x_pos:i,y_pos:o})}return e}):e;case"SIZE_AND_POSITION_OBJECTS":return e.map(function(e,n){var i=t.data.objectsInfo[e.id];if(void 0!==i){var o=Object.assign({},e,{height:i.height,width:i.width,x_pos:i.x_pos,y_pos:i.y_pos});return o.type===F&&o.is_expanded?(o.expanded_width=i.width,o.expanded_height=i.height):i.isResized?(o.isResized=i.isResized,o.resizeWidth=i.resizeWidth,o.resizeHeight=i.resizeHeight):(delete o.isResized,delete o.resizeWidth,delete o.resizeHeight),o}return e});case"SET_NODE_POSITIONS":return e.map(function(e,n){if(t.data.nodePositions&&void 0!==t.data.nodePositions[e.id]){var i=t.data.nodePositions[e.id];return Object.assign({},e,{x_pos:i.x_pos,y_pos:i.y_pos})}return e});case"ADD_SUPERNODES":return[].concat(De(e),De(t.data.supernodesToAdd));case"DELETE_SUPERNODES":return e.filter(function(e){return!t.data.supernodesToDelete.some(function(t){return t.id===e.id})});case"DELETE_OBJECT":return e.filter(function(e){return e.id!==t.data.id});case"DELETE_NODES":return e.filter(function(e){return!t.data.nodesToDelete.some(function(t){return t.id===e.id})});case"SET_NODE_PARAMETERS":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.parameters=t.data.parameters,i}return e});case"SET_NODE_UI_PARAMETERS":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.ui_parameters=t.data.ui_parameters,i}return e});case"SET_NODE_MESSAGE":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);if(i.messages){var o=i.messages.findIndex(function(e){return e.id_ref===t.data.message.id_ref});o>-1?i.messages[o]=t.data.message:i.messages.push(t.data.message)}else i.messages=[t.data.message];return i}return e});case"SET_NODE_MESSAGES":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.messages=t.data.messages,i}return e});case"ADD_NODE_ATTR":return e.map(function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs=i.customAttrs||[],i.customAttrs.push(t.data.attrName),i}return e});case"REMOVE_NODE_ATTR":return e.map(function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs&&(i.customAttrs=i.customAttrs.filter(function(e){return e!==t.data.attrName})),i}return e});case"SET_NODE_LABEL":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.label=t.data.label,i}return e});case"SET_NODE_DECORATIONS":return e.map(function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.decorations=t.data.decorations,i}return e});case"SET_NODES_MULTI_DECORATIONS":return e.map(function(e){var n=t.data.pipelineNodeDecorations.find(function(n){return n.pipelineId===t.data.pipelineId&&n.nodeId===e.id});return n?Object.assign({},e,{decorations:n.decorations}):e});case"SET_OBJECTS_CLASS_NAME":return e.map(function(e){var n=t.data.objIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]||null:t.data.newClassName,i}return e});case"SET_OBJECTS_STYLE":return e.map(function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e});case"SET_OBJECTS_MULTI_STYLE":return e.map(function(e){var n=t.data.pipelineObjStyles.find(function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id});if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e});case"REMOVE_ALL_STYLES":return e.map(function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e});case"SET_OBJECTS_BRANCH_HIGHLIGHT":return e.map(function(e){return t.data.objIds.indexOf(e.id)>-1?Object.assign({},e,{branchHighlight:!0}):e});case"UNSET_OBJECTS_BRANCH_HIGHLIGHT":return e.map(function(e){return e.branchHighlight?Object.assign({},e,{branchHighlight:!1}):e});case"SET_INPUT_PORT_LABEL":case"SET_INPUT_PORT_SUBFLOW_NODE_REF":return e.map(function(e,n){return t.data.nodeId===e.id?Object.assign({},e,{inputs:ii(e.inputs,t)}):e});case"SET_OUTPUT_PORT_LABEL":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":return e.map(function(e,n){return t.data.nodeId===e.id?Object.assign({},e,{outputs:ii(e.outputs,t)}):e});case"SET_SUPERNODE_EXPAND_STATE":return e.map(function(e){return t.data.node.id===e.id?t.data.node:e});case"REPLACE_SN_AND_PIPELINES":return e.map(function(e,n){return e.id===t.data.topSupernode.id?Object.assign({},t.data.topSupernode):e});default:return e}},ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MOVE_OBJECTS":return t.data.nodes?e.map(function(e,n){if(t.data.nodes.indexOf(e.id)>-1){var i=e.x_pos+t.data.offsetX,o=e.y_pos+t.data.offsetY;return Object.assign({},e,{x_pos:i,y_pos:o})}return e}):e;case"SET_COMMENT_POSITIONS":return e.map(function(e,n){if(t.data.commentPositions&&void 0!==t.data.commentPositions[e.id]){var i=t.data.commentPositions[e.id];return Object.assign({},e,{x_pos:i.x_pos,y_pos:i.y_pos})}return e});case"DELETE_OBJECT":return e.filter(function(e){return e.id!==t.data.id});case"DELETE_COMMENTS":return e.filter(function(e){return!t.data.commentsToDelete.some(function(t){return t.id===e.id})});case"ADD_COMMENT":var n=ri(t.data);return[].concat(De(e),[n]);case"ADD_COMMENTS":var i=t.data.commentsToAdd.map(function(e){return ri(e)});return[].concat(De(e),De(i));case"EDIT_COMMENT":return e.map(function(e,n){return t.data.id===e.id?Object.assign({},e,{content:t.data.content,height:t.data.height,width:t.data.width,x_pos:t.data.x_pos?t.data.x_pos:e.x_pos,y_pos:t.data.y_pos?t.data.y_pos:e.y_pos,contentType:t.data.contentType,formats:t.data.formats}):e});case"SET_COMMENT_PROPERTIES":return e.map(function(e){return e.id===t.data.commentId?Object.assign({},e,t.data.commentProperties):e});case"SIZE_AND_POSITION_OBJECTS":return e.map(function(e,n){var i=t.data.objectsInfo[e.id];return void 0!==i?Object.assign({},e,{height:i.height,width:i.width,x_pos:i.x_pos,y_pos:i.y_pos}):e});case"ADD_COMMENT_ATTR":return e.map(function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs=i.customAttrs||[],i.customAttrs.push(t.data.attrName),i}return e});case"REMOVE_COMMENT_ATTR":return e.map(function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs&&(i.customAttrs=i.customAttrs.filter(function(e){return e!==t.data.attrName})),i}return e});case"SET_OBJECTS_COLOR_CLASS_NAME":return e.map(function(e){var n=t.data.objIds.indexOf(e.id);if(n>-1){var i=Array.isArray(t.data.newColorClass)?t.data.newColorClass[n]||null:t.data.newColorClass,o=function(e,t){var n="";e?(n=function(e){var t=e.split(" ").filter(function(e){return!Fe.getBkgColorClass(e)}).join(" ");return t}(e),n=function(e,t){return e?e+" "+t:t}(n,t)):n=t;return n}(e.class_name,i);return Object.assign({},e,{class_name:o})}return e});case"SET_OBJECTS_CLASS_NAME":return e.map(function(e){var n=t.data.objIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]||null:t.data.newClassName,i}return e});case"SET_OBJECTS_STYLE":return e.map(function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e});case"SET_OBJECTS_MULTI_STYLE":return e.map(function(e){var n=t.data.pipelineObjStyles.find(function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id});if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e});case"REMOVE_ALL_STYLES":return e.map(function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e});default:return e}};function ri(e){var t={id:e.id,content:e.content,height:e.height,width:e.width,x_pos:e.x_pos,y_pos:e.y_pos};return void 0!==e.class_name&&(t.class_name=e.class_name),void 0!==e.contentType&&(t.contentType=e.contentType),void 0!==e.formats&&(t.formats=e.formats),t}var si=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DELETE_SUPERNODES":return e.filter(function(e){return!t.data.supernodesToDelete.some(function(t){return e.srcNodeId===t.id||e.trgNodeId===t.id})});case"DELETE_OBJECT":return e.filter(function(e){return e.srcNodeId!==t.data.id&&e.trgNodeId!==t.data.id});case"REMOVE_LINKS":return e.filter(function(e){return!t.data.linksToDelete.some(function(t){return t.id===e.id})});case"ADD_LINK":var n={id:t.data.id};return di(n,"type",t.data.type),di(n,"class_name",t.data.class_name),di(n,"srcPos",t.data.srcPos),di(n,"srcNodeId",t.data.srcNodeId),di(n,"srcNodePortId",t.data.srcNodePortId),di(n,"trgPos",t.data.trgPos),di(n,"trgNodeId",t.data.trgNodeId),di(n,"trgNodePortId",t.data.trgNodePortId),di(n,"decorations",t.data.decorations),di(n,"style",t.data.style),di(n,"style_temp",t.data.style_temp),di(n,"linkName",t.data.linkName),di(n,"typeAttr",t.data.typeAttr),di(n,"description",t.data.description),di(n,"app_data",t.data.app_data),[].concat(De(e),[n]);case"ADD_LINKS":return[].concat(De(e),De(t.data.linksToAdd));case"SET_LINKS":return De(t.data);case"MOVE_OBJECTS":return e.map(function(e){if(t.data.links&&t.data.links.findIndex(function(t){return t.id===e.id})>-1){var n=Object.assign({},e);n.srcPos&&(n.srcPos.x_pos+=t.data.offsetX,n.srcPos.y_pos+=t.data.offsetY),n.trgPos&&(n.trgPos.x_pos+=t.data.offsetX,n.trgPos.y_pos+=t.data.offsetY)}return e});case"SET_LINK_POSITIONS":return e.map(function(e,n){if(t.data.linkPositions&&void 0!==t.data.linkPositions[e.id]){var i=Object.assign({},e);return t.data.linkPositions[e.id].srcPos&&(i=Object.assign(i,{srcPos:t.data.linkPositions[e.id].srcPos})),t.data.linkPositions[e.id].trgPos&&(i=Object.assign(i,{trgPos:t.data.linkPositions[e.id].trgPos})),i}return e});case"SIZE_AND_POSITION_OBJECTS":return e.map(function(e,n){if(t.data.linksInfo&&void 0!==t.data.linksInfo[e.id]){var i=Object.assign({},e);return t.data.linksInfo[e.id].srcPos&&(i=Object.assign(i,{srcPos:t.data.linksInfo[e.id].srcPos})),t.data.linksInfo[e.id].trgPos&&(i=Object.assign(i,{trgPos:t.data.linksInfo[e.id].trgPos})),i}return e});case"SET_LINK_PROPERTIES":return e.map(function(e){return e.id===t.data.linkId?Object.assign({},e,t.data.linkProperties):e});case"SET_LINK_SRC_INFO":return e.map(function(e){if(e.id===t.data.linkId){var n=Object.assign({},e);return delete n.srcNodeId,delete n.srcNodePortId,delete n.srcPos,n.srcNodeId=t.data.srcNodeId,t.data.srcNodePortId&&(n.srcNodePortId=t.data.srcNodePortId),n}return e});case"SET_LINK_TRG_INFO":return e.map(function(e){if(e.id===t.data.linkId){var n=Object.assign({},e);return delete n.trgNodeId,delete n.trgNodePortId,delete n.trgPos,n.trgNodeId=t.data.trgNodeId,t.data.trgNodePortId&&(n.trgNodePortId=t.data.trgNodePortId),n}return e});case"DELETE_LINK":return e.filter(function(e){return e.id!==t.data.id});case"DELETE_LINKS":return e.filter(function(e){return-1===t.data.linksToDelete.findIndex(function(t){return e.id===t.id})});case"UPDATE_LINKS":return t.data.linksToUpdate?e.map(function(e){var n=t.data.linksToUpdate.find(function(t){return t.id===e.id});if(n){var i=Object.assign({},e,n);return n.srcPos?(delete i.srcNodeId,delete i.srcNodePortId):n.srcNodeId&&delete i.srcPos,n.trgPos?(delete i.trgNodeId,delete i.trgNodePortId):n.trgNodeId&&delete i.trgPos,i}return e}):e;case"SET_LINKS_CLASS_NAME":return e.map(function(e){var n=t.data.linkIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]:t.data.newClassName,i}return e});case"SET_LINKS_STYLE":return e.map(function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e});case"SET_LINKS_MULTI_STYLE":return e.map(function(e){var n=t.data.pipelineObjStyles.find(function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id});if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e});case"SET_LINKS_BRANCH_HIGHLIGHT":return e.map(function(e){return t.data.objIds.indexOf(e.id)>-1?Object.assign({},e,{branchHighlight:!0}):e});case"UNSET_OBJECTS_BRANCH_HIGHLIGHT":return e.map(function(e){return e.branchHighlight?Object.assign({},e,{branchHighlight:!1}):e});case"SET_LINK_DECORATIONS":return e.map(function(e,n){if(t.data.linkId===e.id){var i=Object.assign({},e);return i.decorations=t.data.decorations,i}return e});case"SET_LINKS_MULTI_DECORATIONS":return e.map(function(e){var n=t.data.pipelineLinkDecorations.find(function(n){return n.pipelineId===t.data.pipelineId&&n.linkId===e.id});return n?Object.assign({},e,{decorations:n.decorations}):e});case"REMOVE_ALL_STYLES":return e.map(function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e});case"ADD_COMMENT":var i=[];return t.data.selectedObjectIds&&t.data.selectedObjectIds.forEach(function(e,n){i.push({id:t.data.linkIds[n],srcNodeId:t.data.id,trgNodeId:t.data.selectedObjectIds[n],type:U})}),[].concat(De(e),i);default:return e}};function di(e,t,n){void 0!==n&&(e[t]=n)}function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var pi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfo?Object.assign({},t.canvasInfo):e;case"SET_CANVAS_CONFIG_INFO":case"REPLACE_PIPELINES":return Object.assign({},e,{pipelines:t.data.pipelines});case"ADD_EXTERNAL_PIPELINE_FLOW":var n=t.newPipelines.map(function(e){return Object.assign({},e)}),i=e.pipelines.concat(n);return Object.assign({},e,{pipelines:i});case"REMOVE_EXTERNAL_PIPELINE_FLOW":var o=e.pipelines.filter(function(e){return!e.parentUrl||e.parentUrl!==t.externalUrl});return Object.assign({},e,{pipelines:o});case"REPLACE_SN_AND_PIPELINES":var a=e.pipelines.filter(function(e){return!t.data.pipelinesToRemove.some(function(t){return t.id===e.id})});return a=(a=a.map(function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:oi(e.nodes,t)}):e})).concat(t.data.pipelinesToAdd),Object.assign({},e,{pipelines:a});case"SET_PIPELINE_PARENT_URL":var r=e.pipelines.map(function(e){if(t.data.pipelines.some(function(t){return t.id===e.id})){var n=Object.assign({},e);return t.data.url?n.parentUrl=t.data.url:delete n.parentUrl,n}return e});return Object.assign({},e,{pipelines:r});case"DELETE_PIPELINE":var s=e.pipelines.filter(function(e){return e.id!==t.data.id});return Object.assign({},e,{pipelines:s});case"SET_ZOOM":var d=e.pipelines.map(function(e){return e.id===t.pipelineId?Object.assign({},e,{zoom:{k:t.data.zoom.k,x:t.data.zoom.x,y:t.data.zoom.y}}):e});return Object.assign({},e,{pipelines:d});case"ADD_SUPERNODES":var c=[].concat(De(e.pipelines),De(t.data.pipelinesToAdd));return c=c.map(function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:oi(e.nodes,t)}):e}),Object.assign({},e,{pipelines:c});case"DELETE_SUPERNODES":var l=e.pipelines.filter(function(e){return!t.data.pipelinesToDelete.some(function(t){return t.id===e.id})});return l=l.map(function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:oi(e.nodes,t),links:si(e.links,t)}):e}),Object.assign({},e,{pipelines:l});case"SET_SUBDUE_STYLE":return Object.assign({},e,{subdueStyle:t.data.subdueStyle});case"HIDE_COMMENTS":return li(li({},e),{},{hideComments:!0});case"SHOW_COMMENTS":return li(li({},e),{},{hideComments:!1});case"ADD_NODE":case"REPLACE_NODES":case"REPLACE_NODE":case"SIZE_AND_POSITION_OBJECTS":case"SET_NODE_PARAMETERS":case"SET_NODE_UI_PARAMETERS":case"SET_NODE_MESSAGE":case"SET_NODE_MESSAGES":case"SET_NODE_DECORATIONS":case"SET_LINK_DECORATIONS":case"ADD_NODE_ATTR":case"REMOVE_NODE_ATTR":case"SET_NODE_LABEL":case"SET_OBJECTS_CLASS_NAME":case"SET_OBJECTS_COLOR_CLASS_NAME":case"SET_INPUT_PORT_LABEL":case"SET_OUTPUT_PORT_LABEL":case"SET_INPUT_PORT_SUBFLOW_NODE_REF":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":case"MOVE_OBJECTS":case"DELETE_OBJECT":case"ADD_LINK":case"SET_LINKS":case"SET_LINK_PROPERTIES":case"SET_LINK_SRC_INFO":case"SET_LINK_TRG_INFO":case"SET_LINKS_CLASS_NAME":case"DELETE_LINK":case"DELETE_LINKS":case"UPDATE_LINKS":case"ADD_COMMENT":case"EDIT_COMMENT":case"SET_COMMENT_PROPERTIES":case"ADD_COMMENT_ATTR":case"REMOVE_COMMENT_ATTR":var p=e.pipelines.map(function(e){return e.id===t.pipelineId?Object.assign({},e,{nodes:oi(e.nodes,t),comments:ai(e.comments,t),links:si(e.links,t)}):e});return Object.assign({},e,{pipelines:p});case"DELETE_AND_UPDATE_OBJECTS":var u=e.pipelines.map(function(e){if(e.id===t.pipelineId){var n=si(e.links,{type:"UPDATE_LINKS",data:{linksToUpdate:t.data.linksToUpdate||[]}});n=si(n,{type:"DELETE_LINKS",data:{linksToDelete:t.data.linksToDelete||[]}});var i=oi(e.nodes,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:t.data.supernodesToDelete||[]}});n=si(n,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:t.data.supernodesToDelete||[]}}),i=oi(i,{type:"DELETE_NODES",data:{nodesToDelete:t.data.nodesToDelete||[]}});var o=ai(e.comments,{type:"DELETE_COMMENTS",data:{commentsToDelete:t.data.commentsToDelete||[]}});return Object.assign({},e,{nodes:i,comments:o,links:n})}return e});return u=u.filter(function(e){return!t.data.pipelinesToDelete.some(function(t){return t.id===e.id})}),Object.assign({},e,{pipelines:u});case"ADD_PASTED_OBJECTS":case"ADD_AND_UPDATE_OBJECTS":var f=e.pipelines.map(function(e){if(e.id===t.pipelineId){var n=oi(e.nodes,{type:"ADD_SUPERNODES",data:{supernodesToAdd:t.data.supernodesToAdd||[]}});n=oi(n,{type:"ADD_NODES",data:{nodesToAdd:t.data.nodesToAdd||[]}});var i=ai(e.comments,{type:"ADD_COMMENTS",data:{commentsToAdd:t.data.commentsToAdd||[]}}),o=si(e.links,{type:"ADD_LINKS",data:{linksToAdd:t.data.linksToAdd||[]}});return o=si(o,{type:"UPDATE_LINKS",data:{linksToUpdate:t.data.linksToUpdate||[]}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e});return f=[].concat(De(f),De(t.data.pipelinesToAdd)),Object.assign({},e,{pipelines:f});case"DELETE_PASTED_OBJECTS":var h=e.pipelines.filter(function(e){return!function(e,t){return t.some(function(t){return t.id===e.id})}(e,t.data.pipelinesToDelete)}).map(function(e){if(e.id===t.pipelineId){var n=oi(e.nodes,{type:"DELETE_NODES",data:t.data}),i=ai(e.comments,{type:"DELETE_COMMENTS",data:t.data}),o=si(e.links,{type:"REMOVE_LINKS",data:t.data});return Object.assign({},e,{nodes:n,comments:i,links:o})}return e});return Object.assign({},e,{pipelines:h});case"SET_SUPERNODE_EXPAND_STATE":var g=e.pipelines.map(function(e){if(e.id===t.pipelineId){var n=oi(e.nodes,{type:"SET_SUPERNODE_EXPAND_STATE",data:t.data});n=oi(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.objectPositions}});var i=ai(e.comments,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.objectPositions}}),o=si(e.links,{type:"SET_LINK_POSITIONS",data:t.data});return Object.assign({},e,{nodes:n,comments:i,links:o})}return e});return Object.assign({},e,{pipelines:g});case"DECONSTRUCT_SUPERNODE":var y=e.pipelines.filter(function(e){return e.id!==t.data.pipelineToDelete.id}).map(function(e){if(e.id===t.data.pipelineId){var n=oi(e.nodes,{type:"ADD_NODES",data:t.data}),i=ai(e.comments,{type:"ADD_COMMENTS",data:t.data}),o=si(e.links,{type:"ADD_LINKS",data:t.data});return n=oi(n,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:[t.data.supernodeToDelete]}}),o=si(o,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:[t.data.supernodeToDelete]}}),n=oi(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.newObjectPositions}}),i=ai(i,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.newObjectPositions}}),o=si(o,{type:"SET_LINK_POSITIONS",data:{linkPositions:t.data.newLinkPositions}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e});return Object.assign({},e,{pipelines:y});case"RECONSTRUCT_SUPERNODE":var m=[].concat(De(e.pipelines),[t.data.pipelineToDelete]);return m=m.map(function(e){if(e.id===t.data.pipelineId){var n=oi(e.nodes,{type:"DELETE_NODES",data:{nodesToDelete:t.data.nodesToAdd}}),i=ai(e.comments,{type:"DELETE_COMMENTS",data:{commentsToDelete:t.data.commentsToAdd}}),o=si(e.links,{type:"REMOVE_LINKS",data:{linksToDelete:t.data.linksToAdd}});return n=oi(n,{type:"ADD_SUPERNODES",data:{supernodesToAdd:[t.data.supernodeToDelete]}}),o=si(o,{type:"ADD_LINKS",data:{linksToAdd:t.data.linksToRemove}}),n=oi(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.oldObjectPositions}}),i=ai(i,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.oldObjectPositions}}),o=si(o,{type:"SET_LINK_POSITIONS",data:{linkPositions:t.data.oldLinkPositions}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e}),Object.assign({},e,{pipelines:m});case"SET_OBJECTS_STYLE":case"SET_LINKS_STYLE":case"SET_OBJECTS_BRANCH_HIGHLIGHT":case"SET_LINKS_BRANCH_HIGHLIGHT":var v=Object.keys(t.data.pipelineObjIds),b=e.pipelines.map(function(e){return v.indexOf(e.id)>-1?(t.data.objIds=t.data.pipelineObjIds[e.id],t.data.pipelineId=e.id,Object.assign({},e,{nodes:oi(e.nodes,t),comments:ai(e.comments,t),links:si(e.links,t)})):e});return Object.assign({},e,{pipelines:b});case"UNSET_OBJECTS_BRANCH_HIGHLIGHT":var _=e.pipelines.map(function(e){return Object.assign({},e,{nodes:oi(e.nodes,t),comments:ai(e.comments,t),links:si(e.links,t)})});return Object.assign({},e,{pipelines:_});case"SET_OBJECTS_MULTI_STYLE":case"SET_LINKS_MULTI_STYLE":var k=e.pipelines.map(function(e){return t.data.pipelineObjStyles.findIndex(function(t){return t.pipelineId===e.id})>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:oi(e.nodes,t),comments:ai(e.comments,t),links:si(e.links,t)})):e});return Object.assign({},e,{pipelines:k});case"SET_NODES_MULTI_DECORATIONS":var P=e.pipelines.map(function(e){return t.data.pipelineNodeDecorations.findIndex(function(t){return t.pipelineId===e.id})>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:oi(e.nodes,t),comments:e.comments,links:e.links})):e});return Object.assign({},e,{pipelines:P});case"SET_LINKS_MULTI_DECORATIONS":var I=e.pipelines.map(function(e){return t.data.pipelineLinkDecorations.findIndex(function(t){return t.pipelineId===e.id})>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:e.nodes,comments:e.comments,links:si(e.links,t)})):e});return Object.assign({},e,{pipelines:I});case"REMOVE_ALL_STYLES":var S=e.pipelines.map(function(e){return Object.assign({},e,{nodes:oi(e.nodes,t),comments:ai(e.comments,t),links:si(e.links,t)})});return Object.assign({},e,{pipelines:S});default:return e}};var ui=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_CONTEXT_MENU":var n=t.data.menuDef.map(function(e){return Object.assign({},e)});return n.length>0?Object.assign({},e,{isOpen:!0,menuDef:n,source:t.data.source}):e;case"CLOSE_CONTEXT_MENU":return Object.assign({},e,{isOpen:!1});default:return e}},fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_LEFT_FLYOUT_CONFIG"===t.type&&t.data.config?{content:t.data.config.content,isOpen:t.data.config.isOpen}:e},hi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_RIGHT_FLYOUT_CONFIG"===t.type&&t.data.config?Object.assign({},e,t.data.config):e},gi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BOTTOM_PANEL_CONFIG"===t.type&&t.data.config?Object.assign({},e,t.data.config):e},yi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_TOP_PANEL_CONFIG"===t.type&&t.data.config?Object.assign({},e,t.data.config):e},mi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfoIdChanged||t.primaryPipelineIdChanged||!vi(e,t.canvasInfo)?[{pipelineId:t.canvasInfo.primary_pipeline,pipelineFlowId:t.canvasInfo.id}]:e;case"SET_BREADCRUMBS":return t.data.breadcrumbs.map(function(e){return Object.assign({},e)});case"ADD_BREADCRUMB":return[].concat(De(e),[{pipelineId:t.data.pipelineId,supernodeId:t.data.supernodeId,supernodeParentPipelineId:t.data.supernodeParentPipelineId,externalUrl:t.data.externalUrl,label:t.data.label}]);case"ADD_BREADCRUMBS":return[].concat(De(e),De(t.data.addBreadcrumbs));case"SET_TO_INDEXED_BREADCRUMB":return t.data.breadcrumbIndex>=0&&t.data.breadcrumbIndex<e.length?e.slice(0,t.data.breadcrumbIndex+1):e;case"SET_TO_PREVIOUS_BREADCRUMB":return e.length>1?e.slice(0,e.length-1):e;case"RESET_BREADCRUMB":return[{pipelineId:t.data.pipelineId}];default:return e}},vi=function(e,t){if(t&&t.pipelines&&Array.isArray(e)&&e.length>0&&e[e.length-1].pipelineId){var n=e[e.length-1].pipelineId;return t.pipelines.findIndex(function(e){return e.id===n})>-1}return!1},bi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_CANVAS_CONFIG_INFO"===t.type?t.data.canvasConfig:e},_i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TOOLBAR_CONFIG":return Object.assign({},e,{config:t.data.toolbarConfig});case"REFRESH_TOOLBAR":return Object.assign({},e);default:return e}},ki=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_TEXT_TOOLBAR_DEF"===t.type&&t.data.textToolbarDef?Object.assign({},e,t.data.textToolbarDef):e},Pi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_NOTIFICATION_MESSAGES":return[];case"SET_NOTIFICATION_MESSAGES":return t.data.messages.forEach(function(e){return function(e){null!==e.type&&""!==e.type&&void 0!==e.type||(e.type="unspecified");return e}(e)}),t.data.messages;case"DELETE_NOTIFICATION_MESSAGES":var n=Array.isArray(t.data.ids)?t.data.ids:[t.data.ids];return e.filter(function(e){return!n.includes(e.id)});default:return e}};var Ii=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfoIdChanged?{}:e;case"CLEAR_SELECTIONS":case"SET_BREADCRUMBS":case"ADD_BREADCRUMB":case"ADD_BREADCRUMBS":case"SET_TO_INDEXED_BREADCRUMB":case"SET_TO_PREVIOUS_BREADCRUMB":case"RESET_BREADCRUMB":return{};case"ADD_PASTED_OBJECTS":case"SET_SELECTIONS":return{pipelineId:t.pipelineId,selections:De(t.data.selections)};case"DELETE_OBJECT":if(e.selections){var n=e.selections.filter(function(e){return t.data.id!==e});return{pipelineId:e.pipelineId,selections:n}}return e;case"DELETE_AND_UPDATE_OBJECTS":if(e.selections){var i=[].concat(De(t.data.linksToDelete),De(t.data.supernodesToDelete),De(t.data.nodesToDelete),De(t.data.commentsToDelete)),o=e.selections.filter(function(e){return!i.some(function(t){return t.id===e})});return{pipelineId:e.pipelineId,selections:o}}return e;default:return e}},Si=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NOTIFICATION_PANEL_CONFIG":return Object.assign({},e,{config:t.data.notificationPanelConfig});case"SET_NOTIFICATION_PANEL_OPEN_STATE":return Object.assign({},e,{isOpen:t.data.isOpen});default:return e}},ji=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_EXTERNAL_PIPELINE_FLOW":var n=Object.assign({},t.newPipelineFlow);return[].concat(De(e),[n]);case"REMOVE_EXTERNAL_PIPELINE_FLOW":return e.filter(function(e){return e.url!==t.externalUrl});case"REPLACE_SN_AND_PIPELINES":var i=e.filter(function(e){return!t.data.extPipelineFlowsToDelete.some(function(t){return t.url===e.url})});return[].concat(De(i),De(t.data.extPipelineFlowsToAdd));case"ADD_OBJECTS_AND_UPDATE":case"ADD_SUPERNODES":return[].concat(De(e),De(t.data.extPipelineFlowsToAdd));case"DELETE_PASTED_OBJECTS":case"DELETE_OBJECTS_AND_UPDATE":case"DELETE_SUPERNODES":return e.filter(function(e){return!t.data.extPipelineFlowsToDelete.some(function(t){return e.url===t.url})});case"DECONSTRUCT_SUPERNODE":return e.filter(function(e){return e.id!==t.data.extPipelineFlowToDelete.id});case"RECONSTRUCT_SUPERNODE":return[].concat(De(e),[t.data.extPipelineFlowToDelete]);case"SET_CANVAS_INFO":return t.canvasInfoIdChanged?[]:e;default:return e}},Ni=function(){return e(function e(n){t(this,e);var i=qe({selectioninfo:Ii,canvasconfig:bi,canvasinfo:pi,breadcrumbs:mi,palette:ni,notifications:Pi,notificationpanel:Si,externalpipelineflows:ji,tooltip:Qn,canvastoolbar:_i,texttoolbar:ki,contextmenu:ui,leftflyout:fi,rightflyout:hi,bottompanel:gi,toppanel:yi}),o={selectioninfo:{},canvasinfo:n,canvasconfig:st.getDefaultCanvasConfig(),breadcrumbs:[{pipelineId:n.primary_pipeline,pipelineFlowId:n.id}],palette:{content:{}},notifications:[],notificationpanel:{isOpen:!1,config:{}},externalpipelineflows:[],tooltip:{},canvastoolbar:{},texttoolbar:{isOpen:!1},contextmenu:{isOpen:!1,menuDef:[],source:{}},leftflyout:{},rightflyout:{panelWidth:0},bottompanel:{panelHeight:393},toppanel:{}};this.store=ze(i,o),this.dispatch=this.dispatch.bind(this)},[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"subscribe",value:function(e){return this.store.subscribe(e)}},{key:"getStore",value:function(){return this.store}},{key:"getPalette",value:function(){return i(this.store.getState().palette)}},{key:"getPaletteData",value:function(){return i(this.store.getState().palette.content)}},{key:"getPaletteCategory",value:function(e){return i(this.store.getState().palette.content.categories.find(function(t){return t.id===e}))}},{key:"getCanvasInfo",value:function(){return i(this.store.getState().canvasinfo)}},{key:"getPipelineFlowId",value:function(){return this.store.getState().canvasinfo.id}},{key:"getPrimaryPipelineId",value:function(){return this.store.getState().canvasinfo.primary_pipeline}},{key:"getZoom",value:function(e){var t=this.getNonClonedPipeline(e);return t?i(t.zoom):null}},{key:"isEmpty",value:function(e){var t=this.getNonClonedPipeline(e);return!!(t.nodes&&0===t.nodes.length&&t.comments&&0===t.comments.length&&t.links&&0===t.links.length)}},{key:"getCountNodes",value:function(e){var t,n=this.getNonClonedPipeline(e);return(null==n||null===(t=n.nodes)||void 0===t?void 0:t.length)||0}},{key:"getCountComments",value:function(e){var t,n=this.getNonClonedPipeline(e);return(null==n||null===(t=n.comments)||void 0===t?void 0:t.length)||0}},{key:"getCountLinks",value:function(e){var t,n=this.getNonClonedPipeline(e);return(null==n||null===(t=n.links)||void 0===t?void 0:t.length)||0}},{key:"getNonClonedPipeline",value:function(e){return this.store.getState().canvasinfo.pipelines.find(function(t){return t.id===e})}},{key:"getNonClonedSelectedObjs",value:function(e){var t=this.getSelectedPipelineId();if(t){var n=this.getNonClonedPipeline(t);if(n&&n[e]){var i=this.getSelectedObjectIds();return n[e].filter(function(e){return i.includes(e.id)})}}return[]}},{key:"getNodes",value:function(e){var t=this.getNonClonedPipeline(e);return t&&t.nodes?i(t.nodes):[]}},{key:"getNode",value:function(e,t){var n=this.getNonClonedPipeline(t),o=null;if(n&&n.nodes){var a=n.nodes.find(function(t){return t.id===e});a&&(o=i(a))}return o}},{key:"getComments",value:function(e){var t=this.getNonClonedPipeline(e);return t&&t.comments?i(t.comments):[]}},{key:"getComment",value:function(e,t){var n=this.getNonClonedPipeline(t),o=null;if(n&&n.comments){var a=n.comments.find(function(t){return t.id===e});a&&(o=i(a))}return o}},{key:"getLinks",value:function(e){var t=this.getNonClonedPipeline(e);return t&&t.links?i(t.links):[]}},{key:"getLink",value:function(e,t){var n=this.getNonClonedPipeline(t),o=null;if(n&&n.links){var a=n.links.find(function(t){return t.id===e});a&&(o=i(a))}return o}},{key:"getBreadcrumbs",value:function(){return i(this.store.getState().breadcrumbs)}},{key:"getCanvasConfig",value:function(){return Object.assign({},this.store.getState().canvasconfig)}},{key:"getNodeLayout",value:function(){return this.cloneData(this.store.getState().canvasconfig.enableNodeLayout)}},{key:"getCanvasLayout",value:function(){return this.cloneData(this.store.getState().canvasconfig.enableCanvasLayout)}},{key:"isTooltipOpen",value:function(){return!g(this.store.getState().tooltip)}},{key:"getTooltip",value:function(){return this.cloneData(this.store.getState().tooltip)}},{key:"isLeftFlyoutOpen",value:function(){return this.store.getState().leftflyout.isOpen}},{key:"isRightFlyoutOpen",value:function(){return this.store.getState().rightflyout.isOpen}},{key:"isBottomPanelOpen",value:function(){return this.store.getState().bottompanel.isOpen}},{key:"isTopPanelOpen",value:function(){return this.store.getState().toppanel.isOpen}},{key:"getNotificationPanel",value:function(){return this.cloneData(this.store.getState().notificationpanel)}},{key:"getNotifications",value:function(){return this.store.getState().notifications.map(function(e,t){return Object.assign({},e)})}},{key:"isNotificationPanelOpen",value:function(){return this.getNotificationPanel().isOpen}},{key:"getContextMenuSource",value:function(){return this.cloneData(this.store.getState().contextmenu.source)}},{key:"isContextMenuDisplayed",value:function(){return this.store.getState().contextmenu.isOpen}},{key:"getSelectionInfo",value:function(){return this.cloneData(this.store.getState().selectioninfo)}},{key:"getSelectedPipelineId",value:function(){return this.getSelectionInfo().pipelineId}},{key:"getCountSelectedObjects",value:function(){var e;return(null===(e=this.store.getState().selectioninfo)||void 0===e||null===(e=e.selections)||void 0===e?void 0:e.length)||0}},{key:"getSelectedObjectIds",value:function(){var e=this.store.getState().selectioninfo.selections||[];return this.cloneData(e)}},{key:"getSelectedNodes",value:function(){return i(this.getNonClonedSelectedObjs("nodes"))}},{key:"getSelectedComments",value:function(){return i(this.getNonClonedSelectedObjs("comments"))}},{key:"getSelectedLinks",value:function(){return i(this.getNonClonedSelectedObjs("links"))}},{key:"areAllObjectsSelected",value:function(e){var t=this.getSelectedPipelineId(),n=this.getCountNodes(t)+this.getCountComments(t);e&&(n+=this.getCountLinks(t));var i=this.getCountSelectedObjects();return i>0&&n===i}},{key:"areAllSelectedObjectsLinks",value:function(){return this.getNonClonedSelectedObjs("links").length===this.getSelectedObjectIds().length}},{key:"getExternalPipelineFlows",value:function(){return this.cloneData(this.store.getState().externalpipelineflows)}},{key:"getExternalPipelineFlow",value:function(e){var t=this.store.getState().externalpipelineflows.find(function(t){return t.url===e});return t?this.cloneData(t):null}},{key:"cloneData",value:function(e){return i(e)}}])}(),Oi={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["1.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json#/definitions/record_schema"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},runtime:{description:"Runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{oneOf:[{$ref:"#/definitions/node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","runtime","nodes"],additionalProperties:!1},node_def:{description:"Definition of a single pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","subflow_ref","inputs"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},output:{$ref:"#/definitions/port_binding_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"}},required:["id","type"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},input:{$ref:"#/definitions/port_binding_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"}},required:["id","type"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},port_binding_def:{description:"Definition (input/output) of a binding port on a node (bound or unbound). If no binding is present the port is bound at runtime via a configuration object or wrapper document.",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},link:{$ref:"#/definitions/link_def"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},link_def:{description:"Node link definition",type:"object",properties:{pipeline_id_ref:{description:"id of the pipeline this link connects to",type:"string"},node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["node_id_ref"],additionalProperties:!1},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{anyOf:[{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/pipeline_overview_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/pipeline_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/port_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/node_info_def"}]}},additionalProperties:!0}}},Ei={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#",properties:{},additionalProperties:!0,definitions:{pipeline_overview_def:{description:"Top level UI information",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_def:{description:"Pipeline level UI information",type:"object",properties:{zoom:{description:"Zoom factor",type:"integer"},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},port_info_def:{description:"Additional UI info for ports",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_info_def:{description:"object with app-specific UI-information",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},image:{description:"Image name (do not embed images inline!)",type:"string"},x_pos:{description:"x-position",type:"integer"},y_pos:{description:"y-position",type:"integer"},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_def"}},messages:{descriptions:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},association_def:{description:"Non-data link",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["id","node_ref"],additionalProperties:!1},decoration_def:{description:"Decoration used to decorate a node",type:"object",properties:{id:{description:"An identifier used as a token when a hotspot is used",type:"string"},hotspot:{description:"Indicates whether teh decorator is a hotspot or not. ie does it send an event to consuming app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling",type:"string"},positions:{description:"Shows where the decoration is displayed with respect to the node",enum:["topLeft","topRight","bottomLeft","bottomRight"]},image:{description:"Image displayed at the decoration position",type:"string"}}},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}}},comment_def:{type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"integer",minimum:0},y_pos:{description:"Vertical comment position",type:"integer",minimum:0},width:{description:"Comment width",type:"integer",minimum:10},height:{description:"Comment height",type:"integer",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["node_ref"],additionalProperties:!0}}},Ti={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#",title:"Watson Data Platform Pipeline Connection Schema",description:"Connection schema for pipelines in the Watson Data Platform",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",additionalProperties:{type:"object"},type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:{type:"object"},properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"}}},wi={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json#",title:"Watson Data Platform Datarecord Metadata Schema",description:"Metadata schema for datarecords in the Watson Data Platform",definitions:{record_schema:{description:"Description of a datarecord including column types and metadata",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"Name of datarecord",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json"],type:"string"},type:{description:"Always 'struct' for datarecord schema",type:"string"},fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0}},required:["fields"]},field:{description:"Definition of a datarecord field",type:"object",properties:{name:{description:"Field name. Must be unique within the datarecord",type:"string"},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, binary, boolean, or other)",type:"string"},nullable:{description:"Whether or not one can place null values into the field",type:"boolean",default:!1},metadata:{$ref:"#/definitions/metadata"}},required:["name","type"]},metadata:{description:"Additional field metadata",type:"object",properties:{description:{description:"Field description",type:"string"},measure:{description:"Field measurement level",enum:["range","discrete","flag","set","ordered-set","typeless","collection","geospatial","default"]},modeling_role:{description:"Field role for modeling",enum:["input","target","both","none","partition","split","frequency","record-id"]},max_length:{description:"Maximum length for fields. Length is unlimited when not present",type:"number"},decimal_precision:{description:"Precision for decimal types",type:"number"},decimal_scale:{description:"Scale for decimal types",type:"number"},values:{description:"Array of unique categorical values for the column",type:"array",minItems:0,items:{description:"A value discovered in the data",type:"string"},uniqueItems:!0},range:{description:"Minimum and maximum discovered values for scalar data",type:"object",properties:{min:{description:"Lowest value discovered in the data",type:"number"},max:{description:"Highest value discovered in the data",type:"number"}},required:["min","max"]}},required:[]}}},Li={$schema:"http://json-schema.org/draft-04/schema#",type:"object",description:"Abstract Canvas diagram schema",id:"http://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v1-schema.json",properties:{categories:{description:"Array of palette categories",type:"array",minItems:0,items:{type:"object",properties:{category:{description:"The palette category that the items belong within",type:"string"},label:{description:"Category label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},nodetypes:{description:"Array of nodes within the current category",type:"array",items:{type:"object",properties:{label:{description:"Node label",type:"string"},description:{description:"Node description",type:"string"},type:{description:"Node classification type",enum:["binding","execution_node","super_node","model_node"]},operator_id_ref:{description:"Unique node type identifier",type:"string"},image:{description:"Encoded image or image reference for the node",type:"string"},subDiagramId:{description:"Optional sub diagram identifier.",type:"string"},input_ports:{description:"Array of node input ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}},output_ports:{description:"Array of node output ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}}},required:["label","image"]}}},required:["category","label"]}}},definitions:{port:{description:"Defines a node port for links",type:"object",properties:{id:{description:"Port identifier",type:"string"},label:{description:"Port long label",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1}},required:["id"]}}},Ci={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["2.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},parameters:{description:"Parameters for the flow document",type:"object",properties:{},additionalProperties:!0},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json#/definitions/record_schema"},uniqueItems:!0},runtimes:{description:"Array of runtime objects referred to in the document",type:"array",minItems:0,items:{$ref:"#/definitions/runtime_def"},uniqueItems:!0},external_parameters:{description:"Array of parameterized property references",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/parameters/parameters-v2-schema.json#/definitions/param_property_ref"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"User-readable name",type:"string"},runtime_ref:{description:"Reference to the id of the runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{oneOf:[{$ref:"#/definitions/node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},uniqueItems:!0},parameters:{description:"Parameters for the pipeline",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","runtime_ref","nodes"],additionalProperties:!1},node_def:{description:"Definition of a single pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Optional reference to the id of the runtime associated with the current node",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},open_with_tool:{description:"Name of the tool which can be used to view or edit the sub-flow for this supernode. The default is 'canvas'",type:"string"},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},parameters:{description:"Input parameters for the supernode",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","subflow_ref","inputs"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},outputs:{$ref:"#/definitions/ports_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the entry binding node",type:"object",properties:{},additionalProperties:!0}},required:["id","type"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},inputs:{$ref:"#/definitions/ports_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding exit node",type:"object",properties:{},additionalProperties:!0}},required:["id","type"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Reference to the runtime associated with the current node",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},parameters:{description:"Parameters for the port",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},parameters:{description:"Parameters for the binding port",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},link_def:{description:"Node link definition",type:"object",properties:{node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},link_name:{description:"optional link name (used in parameter sets when there are multiple input sources)",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["node_id_ref"],additionalProperties:!1},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{anyOf:[{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/pipeline_overview_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/pipeline_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/port_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/node_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/runtime_info_def"}]}},additionalProperties:!0},runtime_def:{description:"Runtime associated with the operations in the current pipeline",type:"object",properties:{id:{description:"Unique internal runtime identifier",type:"string"},name:{description:"The runtime name",type:"string"},version:{description:"The runtime version. When not present the latest version is assumed",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","name"]}}},Ai={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#",properties:{},additionalProperties:!0,definitions:{pipeline_overview_def:{description:"Top level UI information",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_def:{description:"Pipeline level UI information",type:"object",properties:{zoom:{description:"Zoom factor",type:"integer"},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},port_info_def:{description:"Additional UI info for ports",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_info_def:{description:"object with app-specific UI-information",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},image:{description:"Image name (do not embed images inline!)",type:"string"},x_pos:{description:"x-position",type:"integer"},y_pos:{description:"y-position",type:"integer"},is_expanded:{description:"Indicates whether a supernode is shown in expanded state or as a regular node.",type:"boolean"},expanded_height:{description:"Height of expanded supernode. If not provided an appropriate height is calculated.",type:"string"},expanded_width:{description:"Width of expanded supernode. If not provided an appropriate width is calculated.",type:"string"},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_def"}},messages:{descriptions:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},ui_parameters:{description:"UI only parameter values for the node",type:"object",properties:{},additionalProperties:!0},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},runtime_info_def:{description:"Runtime information",type:"object",properties:{},required:[],additionalProperties:!0},association_def:{description:"Non-data link",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["id","node_ref"],additionalProperties:!1},decoration_def:{description:"Decoration used to decorate a node",type:"object",properties:{id:{description:"An identifier used to identify the decoration",type:"string"},hotspot:{description:"Indicates whether the decorator is a hotspot or not. ie does it send an event to consuming app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling",type:"string"},position:{description:"Shows where the decoration is displayed with respect to the node",enum:["topLeft","topRight","bottomLeft","bottomRight"]},x_pos:{description:"X position of the decorator relative to the node's top left corner. If provided, this is used in preference to the position field.",type:"integer"},y_pos:{description:"Y position of the decorator relative to the node's top left corner. If provided, this is used in preference to the position field.",type:"integer"},image:{description:"Image displayed at the decoration position. Provide either this or a label.",type:"string"},label:{description:"Label displayed at the decoration position. Provide either this or an image.",type:"string"}}},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}},required:["id_ref","type","text"]},comment_def:{type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"integer",minimum:0},y_pos:{description:"Vertical comment position",type:"integer",minimum:0},width:{description:"Comment width",type:"integer",minimum:10},height:{description:"Comment height",type:"integer",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["node_ref"],additionalProperties:!0}}},xi={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json",title:"Watson Data Platform Pipeline Connection Schema",description:"Connection schema for pipelines in the Watson Data Platform",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{name:{description:"A name tag for disambiguating connections",type:"string"},app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",additionalProperties:{type:"object"},type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:{type:"object"},properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"}}},Di={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json",title:"Watson Data Platform Datarecord Metadata Schema",description:"Metadata schema for datarecords in the Watson Data Platform",definitions:{record_schema:{description:"Description of a datarecord including column types and metadata",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"Name of datarecord",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json"],type:"string"},type:{description:"Always 'struct' for datarecord schema",type:"string"},fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0},struct_types:{description:"The list of custom struct types to be used as field types",type:"object",patternProperties:{".":{type:"object",properties:{fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0}}}}}},required:["id","fields"]},field:{description:"Definition of a datarecord field",type:"object",properties:{name:{description:"Field name. Must be unique within the datarecord",type:"string"},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, binary, boolean, array[type], map[type, type]. The type can also be a reference to a struct_type declaration.)",type:"string"},nullable:{description:"Whether or not one can place null values into the field",type:"boolean",default:!1},metadata:{$ref:"#/definitions/metadata"}},required:["name","type"]},metadata:{description:"Additional field metadata",type:"object",properties:{description:{description:"Field description",type:"string"},measure:{description:"Field measurement level",enum:["range","discrete","flag","set","ordered-set","typeless","collection","geospatial","default"]},modeling_role:{description:"Field role for modeling",enum:["input","target","both","none","partition","split","frequency","record-id"]},max_length:{description:"Maximum length for fields. Length is unlimited when not present",type:"number"},decimal_precision:{description:"Precision for decimal types",type:"number"},decimal_scale:{description:"Scale for decimal types",type:"number"},values:{description:"Array of unique categorical values for the column",type:"array",minItems:0,items:{description:"A value discovered in the data",type:"string"},uniqueItems:!0},range:{description:"Minimum and maximum discovered values for scalar data",type:"object",properties:{min:{description:"Lowest value discovered in the data",type:"number"},max:{description:"Highest value discovered in the data",type:"number"}},required:["min","max"]},runtime_type:{description:"Type of runtime",type:"string"}},required:[]}}},Mi={$schema:"http://json-schema.org/draft-04/schema#",type:"object",description:"Common Canvas palette schema",id:"http://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v2-schema.json",version:{description:"Palette schema version",enum:["2.0"]},properties:{categories:{description:"Array of palette categories",type:"array",minItems:0,items:{type:"object",properties:{category:{description:"The palette category that the items belong within",type:"string"},label:{description:"Category label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},nodetypes:{description:"Array of nodes within the current category",type:"array",items:{type:"object",properties:{label:{description:"Node label",type:"string"},description:{description:"Node description",type:"string"},type:{description:"Node classification type",enum:["binding","execution_node","super_node","model_node"]},operator_id_ref:{description:"Unique node type identifier",type:"string"},image:{description:"Encoded image or image reference for the node",type:"string"},subDiagramId:{description:"Optional sub diagram identifier.",type:"string"},input_ports:{description:"Array of node input ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}},output_ports:{description:"Array of node output ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}}},required:["label","image"]}}},required:["category","label"]}}},definitions:{port:{description:"Defines a node port for links",type:"object",properties:{id:{description:"Port identifier",type:"string"},label:{description:"Port long label",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1}},required:["id"]}}},Ui={$schema:"https://json-schema.org/draft-04/schema#",title:"Pipeline Flow Def",description:"Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["3.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["http://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json","https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},parameters:{description:"Parameters for the flow document",type:"object",properties:{},additionalProperties:!0},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#/definitions/record_schema"},uniqueItems:!0},runtimes:{description:"Array of runtime objects referred to in the document",type:"array",minItems:0,items:{$ref:"#/definitions/runtime_def"},uniqueItems:!0},external_paramsets:{description:"Array of parameter set references",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/parameters/parametersets-v3-schema.json#/definitions/paramset_ref"},uniqueItems:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/pipeline_flow_ui_def"}},additionalProperties:!0}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/pipeline_def instead.",type:"string",deprecated:!0},name:{description:"User-readable name",type:"string"},runtime_ref:{description:"Reference to the id of the runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{$ref:"#/definitions/node_type_def"},uniqueItems:!0},parameters:{description:"Parameters for the pipeline",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/pipeline_ui_def"}},additionalProperties:!0}},required:["id","runtime_ref","nodes"],additionalProperties:!1},node_type_def:{oneOf:[{$ref:"#/definitions/execution_node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},execution_node_def:{description:"Definition of a single execution pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Optional reference to the id of the runtime associated with the current node",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def"}},additionalProperties:!0}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},open_with_tool:{description:"Name of the tool which can be used to view or edit the sub-flow for this supernode. The default is 'canvas'",type:"string"},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},parameters:{description:"Input parameters for the supernode",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def"}},additionalProperties:!0}},required:["id","type","subflow_ref"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},outputs:{$ref:"#/definitions/ports_def"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def"}},additionalProperties:!0},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding entry node",type:"object",properties:{},additionalProperties:!0}},required:["id","type","outputs"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def"}},additionalProperties:!0},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding exit node",type:"object",properties:{},additionalProperties:!0}},required:["id","type","inputs"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},op:{description:"Node type identifier of modeling node that created this model.",type:"string"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Reference to the runtime associated with the current node",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_ui_def"}},additionalProperties:!0}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/node_link_def"},uniqueItems:!0},parameters:{description:"Parameters for the port",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/port_ui_def"}},additionalProperties:!0}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:0,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:0,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/node_link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},parameters:{description:"Parameters for the binding port",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/port_ui_def"}},additionalProperties:!0}},required:["id"],additionalProperties:!1},node_link_def:{description:"Node link definition",type:"object",properties:{id:{description:"Unique id of this link within the pipelineFlow. If omitted a new link id will be generated.",type:"string"},node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},link_name:{description:"optional link name (used in parameter sets when there are multiple input sources)",type:"string"},type_attr:{description:"Link type attribute",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_link_ui_def instead.",type:"string",deprecated:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_link_ui_def"}},additionalProperties:!0}},required:["node_id_ref"],additionalProperties:!1},runtime_def:{description:"Runtime associated with the operations in the current pipeline",type:"object",properties:{id:{description:"Unique internal runtime identifier",type:"string"},name:{description:"The runtime name",type:"string"},version:{description:"The runtime version. When not present the latest version is assumed",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/runtime_ui_def"}},additionalProperties:!0}},required:["id","name"]}}},Fi={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json",properties:{},additionalProperties:!0,definitions:{pipeline_flow_ui_def:{description:"Pipeline flow UI properties.",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_ui_def:{description:"Pipeline UI properties",type:"object",properties:{description:{description:"User-defined description",type:"string"},zoom:{description:"X/Y pan and scale amounts for the canvas.",type:"object",$ref:"#/definitions/zoom_object_def"},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},zoom_object_def:{oneOf:[{description:"Deprecated - use zoom object instead. Scale factor as a percentage. 100% is standard scale amount. Smaller values zoom out. Larger values zoom in.",type:"integer",deprecated:!0},{description:"A zoom object containing translation and scale amounts.",type:"object",properties:{x:{description:"Horizontal translation amount. Positive value moves right, negative to the left.",type:"number"},y:{description:"Vertical translation amount. Positive value moves down, negative moves up.",type:"number"},k:{description:"Scale amount. 1.0 is the standard scale amount. Smaller values zoom out. Larger values zoom in.",type:"number"}},required:["x","y","k"],additionalProperties:!1}]},port_ui_def:{description:"Port UI properties ",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the port.",type:["string","object"]},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_ui_def:{description:"Node UI properties.",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the node.",type:["string","object"]},image:{description:"URL to image source. Although a data URL can be used to embed an image inline, it is not recommended. The 'image' property can also be a JSX object that displays an image using an <svg> element however, JSX images must be set programmatically and cannot be stringified into JSON.",type:["string","object"]},x_pos:{description:"x-position",type:"number"},y_pos:{description:"y-position",type:"number"},is_expanded:{description:"Indicates whether a supernode is shown in expanded state or as a regular node.",type:"boolean"},expanded_height:{description:"Height of expanded supernode. If not provided an appropriate height is calculated.",type:"number"},expanded_width:{description:"Width of expanded supernode. If not provided an appropriate width is calculated.",type:"number"},is_resized:{description:"Indicates whether a node has been resized or not. If true, resize_width and resize_height are used for node display. If false, the default width and height are used.",type:"boolean"},resize_height:{description:"Height of resized node. The node will be displayed with this height, when is_resized is true, in preference to its default height.",type:"number"},resize_width:{description:"Width of resized node. The node will be displayed with this width, when is_resized is true, in preference to its default width.",type:"number"},sub_pipelines:{description:"An array of pipelines referenced when this node is a supernode. This field is only used when the supernode is in a palette or on the clipboard. It will be an empty array when the supernode references an external pipeline.",type:"array",minItems:0,uniqueItems:!0},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_link_def"}},messages:{description:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},ui_parameters:{description:"UI only parameter values for the node",type:"object",properties:{},additionalProperties:!0},palette_image:{description:"Image name for the node displayed in palette. If omitted the image from 'image' field will be used.",type:"string"},palette_class_name:{description:"CSS class name applied to the <div> shown in palette for the node",type:"string"},palette_disabled:{description:"Indicates whether the node in the palette is disabled. If true, prevents the node being dragged or double-clicked from palette.",type:"boolean"},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/node_decoration_def"},uniqueItems:!0}},additionalProperties:!0},node_link_ui_def:{description:"Node link UI properties.",type:"object",properties:{description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the node to node link.",type:["string","object"]},decorations:{description:"Array of decorations used to decorate node links",type:"array",minItems:0,items:{$ref:"#/definitions/link_decoration_def"},uniqueItems:!0}},additionalProperties:!0},runtime_ui_def:{description:"Runtime UI properties.",type:"object",properties:{},additionalProperties:!0},association_link_def:{description:"Association link properties",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the association link.",type:["string","object"]},decorations:{description:"Array of decorations used to decorate association links",type:"array",minItems:0,items:{$ref:"#/definitions/link_decoration_def"},uniqueItems:!0}},required:["id","node_ref"],additionalProperties:!1},node_decoration_def:{description:"Decoration used to decorate a node",properties:{position:{description:"Indicates an anchor point on the node at which the decoration will be displayed.",enum:["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight"]}},anyOf:[{$ref:"#/definitions/image_decoration_def"},{$ref:"#/definitions/label_decoration_def"},{$ref:"#/definitions/shape_decoration_def"},{$ref:"#/definitions/jsx_decoration_def"}]},link_decoration_def:{description:"Decoration used to decorate a link",properties:{position:{description:"Indicates an anchor point on the link at which the decoration will be displayed.",enum:["source","middle","target"]},distance:{description:"Only applicable to straight link lines. Will move the decoration the specified number of pixels from its 'position'.",type:"integer"}},anyOf:[{$ref:"#/definitions/image_decoration_def"},{$ref:"#/definitions/label_decoration_def"},{$ref:"#/definitions/shape_decoration_def"},{$ref:"#/definitions/jsx_decoration_def"}]},image_decoration_def:{description:"Image decoration properties including shared properties.",type:"object",allOf:[{properties:{image:{description:"Image displayed at the decoration position. Provide either this or a label.",type:"string"},outline:{description:"If true and outline is drawn around the image.",type:"boolean"}}},{$ref:"#/definitions/decoration_shared_properties"}]},label_decoration_def:{description:"Label decoration properties including shared properties.",type:"object",allOf:[{properties:{label:{description:"Label displayed at the decoration position. Provide either this or an image.",type:"string"},label_editable:{description:"If true, the label decoration can be edited. It displays an edit icon which can be clicked to enter edit mode.",type:"boolean"},label_align:{description:"The alignment of the label.",enum:["left","center"]},label_single_line:{description:"If true, the label is displayed as a single line and is truncated at the width.",type:"boolean"},label_max_characters:{description:"The maximum number of characters that can be entered in the label decoration when it is editable.",type:"integer"},label_allow_return_key:{description:"If false, pressing the return key in edit mode will not do anything: label will wrap at width. If true, return will enter a newline character. ",type:"boolean"}}},{$ref:"#/definitions/decoration_shared_properties"}]},shape_decoration_def:{description:"Shape decoration properties including shared properties.",type:"object",allOf:[{properties:{path:{description:"An SVG path that describes a shape to be drawn at the decoration position.",type:"string"}}},{$ref:"#/definitions/decoration_shared_properties"}]},jsx_decoration_def:{description:"JSX decoration properties including shared properties These are never serialized in the pipeline flow.",type:"object",allOf:[{properties:{jsx:{description:"A JSX expression that will be used to display the content of the decoration.",type:"object"}}},{$ref:"#/definitions/decoration_shared_properties"}]},decoration_shared_properties:{description:"Shared properties across all types of decoration.",type:"object",properties:{id:{description:"A unique identifier used to identify the decoration",type:"string"},x_pos:{description:"X position of the decorator relative to the decorations's position field.",type:"integer"},y_pos:{description:"Y position of the decorator relative to the decorations's position field.",type:"integer"},width:{description:"Display width of decoration.",type:"integer"},height:{description:"Display height of decoration.",type:"integer"},hotspot:{description:"Indicates whether the decorator is a hotspot or not. If true, it calls sends an event to the host app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling. It can be a space-separated list of classes.",type:"string"},tooltip:{description:"Tooltip text for the decoration.",type:"string"},temporary:{description:"If set to true, the decoration will not be serialized in the pipeline flow.",type:"boolean"}},required:["id"]},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}},required:["id_ref","type","text"]},comment_def:{description:"Comment definition",type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"number"},y_pos:{description:"Vertical comment position",type:"number"},width:{description:"Comment width",type:"number",minimum:10},height:{description:"Comment height",type:"number",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the comment.",type:["string","object"]},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},content_type:{description:"The type of content either regular or markdown or WYSIWYG",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the comment link.",type:["string","object"]}},required:["node_ref"],additionalProperties:!0}}},Ri={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json",title:"Pipeline Connection Schema",description:"Connection schema for pipelines",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{name:{description:"A name tag for disambiguating connections",type:"string"},app_data:{$ref:"#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},space_ref:{description:"If ref is set, this refers to the ID of the space which contains the connection. If neither this attribute nor space_ref are specified, the connection will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},space_ref:{description:"If ref is set, this refers to the ID of the space which contains the data asset. If neither this attribute nor space_ref are specified, the data asset will be assumed to exist in the project, space, or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:!0,properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{},additionalProperties:!0}}},Bi={$schema:"https://json-schema.org/draft-04/schema#",type:"object",title:"Pipeline Flow Palette",description:"Common Canvas palette schema",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v3-schema.json",properties:{version:{description:"Palette schema version",enum:["3.0"]},categories:{description:"Array of palette categories",type:"array",minItems:0,items:{$ref:"#/definitions/category_def"},uniqueItems:!0}},additionalProperties:!1,definitions:{category_def:{description:"Palette Category",type:"object",properties:{id:{description:"ID of the category",type:"string"},label:{description:"Category label",type:"string"},description:{description:"Category description",type:"string"},is_open:{description:"Boolean to indicate if the category is open (true) or not (false).",type:"boolean"},empty_text:{description:"When set to a non-empty string and node_types is empty, is used to indicate that no nodes exist",type:"string"},loading_text:{description:"When set to a non-empty string, causes a loading indicator to appear with this text as a label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},node_types:{description:"Array of pipeline node types",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json#/definitions/node_type_def"},uniqueItems:!0}},required:["id","label"],additionalProperties:!1}}},Hi=new He("SchemaValidator");function Gi(e,t){switch(t){case 1:var n=function(){var e=new Ve,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Ei,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_overview_def"),e.addSchema(Ei,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_def"),e.addSchema(Ei,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/port_info_def"),e.addSchema(Ei,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/node_info_def"),e.addSchema(Ti,t+"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"),e.addSchema(Ti,t+"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"),e.addSchema(wi,t+"datarecord-metadata/datarecord-metadata-v1-schema.json#/definitions/record_schema"),e}();zi(e,Oi,"pipelineFlow",n);break;case 2:var i=function(){var e=new Ve,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Ci,t+"pipeline-flow/pipeline-flow-v2-schema.json"),e.addSchema(Ai,t+"pipeline-flow/pipeline-flow-ui-v2-schema.json"),e.addSchema(xi,t+"pipeline-connection/pipeline-connection-v2-schema.json"),e.addSchema(Di,t+"datarecord-metadata/datarecord-metadata-v2-schema.json"),e}();zi(e,Ci,"pipelineFlow",i);break;default:var o=Vi();zi(e,Ui,"pipelineFlow",o)}}function qi(e,t){switch(t){case 1:zi(e,Li,"palette",new Ve);break;case 2:zi(e,Mi,"palette",new Ve);break;default:var n=Vi();zi(e,Bi,"palette",n)}}function zi(e,t,n,i){Hi.logStartTimer("Schema validation");var o=i.validate(e,t,{nestedErrors:!0});if(Hi.logEndTimer("Schema validation"),Hi.log("Schema "+n+" - validation result:"),Hi.log(o),o&&o.errors&&o.errors.length>0)throw Hi.error(o),o}function Vi(){var e=new Ve,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Ui,t+"pipeline-flow/pipeline-flow-v3-schema.json"),e.addSchema(Fi,t+"pipeline-flow/pipeline-flow-ui-v3-schema.json"),e.addSchema(Ri,t+"pipeline-connection/pipeline-connection-v3-schema.json"),e.addSchema(Me,t+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}function $i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Wi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Wi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var Yi=[function(e){return e},function(e){var t=Object.assign({},{version:"2.0"},e);return t},function(e){e.version="3.0";var t,n=$i(e.categories);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.id=i.category,delete i.category,i.node_types=[];for(var o=0;o<i.nodetypes.length;o++){var a=i.nodetypes[o],r={id:""};r.type=a.type,"execution_node"===a.type||"binding"===a.type?r.op=a.operator_id_ref:"super_node"===a.type&&(a.open_with_tool&&(r.open_with_tool=a.open_with_tool),r.subflow_ref={pipeline_id_ref:a.subDiagramId}),a.input_ports&&a.input_ports.length>0&&(r.inputs=Ki(a.input_ports)),a.output_ports&&a.output_ports.length>0&&(r.outputs=Ki(a.output_ports)),r.parameters={},r.app_data={},r.app_data.ui_data={},r.app_data.ui_data.label=a.label,r.app_data.ui_data.description=a.description,r.app_data.ui_data.image=a.image,r.app_data.ui_data.x_pos=0,r.app_data.ui_data.y_pos=0,i.node_types.push(r)}delete i.nodetypes}}catch(e){n.e(e)}finally{n.f()}return e}];function Xi(e){var t;if(!e)throw new Error("Invalid palette document");if(e.version){if("string"!=typeof e.version||0===e.version.length)throw new Error("Invalid palette document: The 'version' attribute is missing or invalid");if(!(t=parseInt(e.version,10)))throw new Error("Invalid palette document: The 'version' attribute cannot be parsed")}else t=1;return t}function Ki(e){var t,n=[],i=$i(e);try{for(i.s();!(t=i.n()).done;){var o=t.value,a={};a.id=o.id,a.app_data={},a.app_data.ui_data={},o.cardinality&&(a.app_data.ui_data.cardinality=o.cardinality),a.app_data.ui_data.label=o.label,n.push(a)}}catch(e){i.e(e)}finally{i.f()}return n}function Ji(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Zi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var Qi=function(){return e(function e(){t(this,e),this.logger=new He("Object Model");var n=this.getEmptyCanvasInfo();this.store=new Ni(n),this.oldCanvas=null,this.idGeneratorHandler=null,this.selectionChangeHandler=null,this.layoutHandler=null},[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"subscribe",value:function(e){return this.store.subscribe(e)}},{key:"setSchemaValidation",value:function(e){this.setCanvasConfig({schemaValidation:e})}},{key:"setSelectionChangeHandler",value:function(e){this.selectionChangeHandler=e}},{key:"setLayoutHandler",value:function(e){if(e!==this.layoutHandler){this.layoutHandler=e;var t=Hn(this.getCanvasInfo().pipelines,this.getNodeLayout(),this.getCanvasLayout(),this.layoutHandler);this.store.dispatch({type:"REPLACE_PIPELINES",data:{pipelines:t}})}}},{key:"getStore",value:function(){return this.store.getStore()}},{key:"getUUID",value:function(){return Ge()}},{key:"setIdGeneratorHandler",value:function(e){this.idGeneratorHandler=e}},{key:"getUniqueId",value:function(e,t){var n;return this.idGeneratorHandler&&(n=this.idGeneratorHandler(e,t)),n||this.getUUID()}},{key:"clearPaletteData",value:function(){this.store.dispatch({type:"CLEAR_PALETTE_DATA"})}},{key:"setPaletteData",value:function(e){var t=Mn.convertPaletteToPipelineFlowPalette(e);this.setPipelineFlowPalette(t)}},{key:"setPipelineFlowPalette",value:function(e){if(e&&!g(e)){var t=e;Mn.isVersion0Palette(t)&&(t=Mn.convertPaletteToPipelineFlowPalette(t));var n=this.validateAndUpgradePalette(t);this.store.dispatch({type:"SET_PALETTE_DATA",data:{content:n}})}else this.clearPaletteData()}},{key:"getPaletteData",value:function(){return this.store.getPaletteData()}},{key:"togglePalette",value:function(){this.isPaletteOpen()?this.closePalette():this.openPalette()}},{key:"openPalette",value:function(){this.store.dispatch({type:"SET_PALETTE_OPEN_STATE",data:{isOpen:!0}})}},{key:"openPaletteIfNecessary",value:function(e){e&&void 0===this.store.getPalette().isOpen&&void 0!==e.paletteInitialState&&(e.paletteInitialState?this.openPalette():this.closePalette())}},{key:"closePalette",value:function(){this.store.dispatch({type:"SET_PALETTE_OPEN_STATE",data:{isOpen:!1}})}},{key:"isPaletteOpen",value:function(){var e=this.store.getPalette().isOpen;return void 0!==e&&e}},{key:"setCategoryLoadingText",value:function(e,t){this.store.dispatch({type:"SET_CATEGORY_LOADING_TEXT",data:{categoryId:e,loadingText:t}})}},{key:"setCategoryEmptyText",value:function(e,t){this.store.dispatch({type:"SET_CATEGORY_EMPTY_TEXT",data:{categoryId:e,emptyText:t}})}},{key:"addNodeTypeToPalette",value:function(e,t,n,i,o){this.addNodeTypesToPalette([e],t,n,i,o)}},{key:"addNodeTypesToPalette",value:function(e,t,n,i,o){var a={nodeTypes:e,categoryId:t,categoryLabel:n,categoryDescription:i,categoryImage:o};this.store.dispatch({type:"ADD_NODE_TYPES_TO_PALETTE",data:a}),this.store.getCanvasConfig().schemaValidation&&qi(this.getPaletteData(),3)}},{key:"removeNodesFromPalette",value:function(e,t){this.store.dispatch({type:"REMOVE_NODE_TYPES_FROM_PALETTE",data:{selObjectIds:e,categoryId:t}})}},{key:"convertNodeTemplate",value:function(e){var t=null;return e?((t=Fn.convertNode(e,this.getCanvasLayout())).type===F&&(t=this.convertPipelineData(t)),t):null}},{key:"convertPipelineData",value:function(e){var t,n=k(e,"sub_pipelines");if(n)t=e.subflow_ref.url?[]:Fn.convertPipelinesToCanvasInfoPipelines(n,this.getCanvasLayout()),t=Hn(t=this.cloneSupernodeContents(e,t),this.getNodeLayout(),this.getCanvasLayout(),this.layoutHandler,e);else{var i=this.createEmptyPipeline();t=[i],Re(e,"subflow_ref.pipeline_id_ref",i.id)}return e.sub_pipelines=t,e}},{key:"extractAddDataPipelines",value:function(e){var t=[],n=[];return e.forEach(function(e){if(Fe.isSupernode(e)){var i=k(e,"sub_pipelines");i&&(t.push.apply(t,De(i)),e.sub_pipelines&&delete e.sub_pipelines)}n.push(e)}),{nodes:n,pipelines:t}}},{key:"getPaletteNode",value:function(e){var t=null;return e&&!g(this.getPaletteData())&&this.getPaletteData().categories.forEach(function(n){n.node_types.forEach(function(n){n.op===e&&(t=n)})}),t}},{key:"getPaletteNodeById",value:function(e){var t=null;return g(this.getPaletteData())||this.getPaletteData().categories.forEach(function(n){n.node_types.forEach(function(n){n.id===e&&(t=n)})}),t}},{key:"getCategoryForNode",value:function(e){var t=null;return this.getPaletteData().categories.forEach(function(n){n.node_types.forEach(function(i){i.op===e&&(t=n)})}),t}},{key:"validateAndUpgradePalette",value:function(e){var t=i(e),n=Xi(t);return this.store.getCanvasConfig().schemaValidation&&qi(t,n),3!==n&&(t=function(e){for(var t=Math.max(Xi(e),1),n=i(e),o=t;o<3;o++)n=Yi[o](n);return n}(t),this.store.getCanvasConfig().schemaValidation&&qi(t,3)),t}},{key:"setIsOpenCategory",value:function(e,t){this.store.dispatch({type:"SET_IS_OPEN_CATEGORY",data:{categoryId:e,isOpen:t}})}},{key:"setIsOpenAllCategories",value:function(e){this.store.dispatch({type:"SET_IS_OPEN_ALL_CATEGORIES",data:{isOpen:e}})}},{key:"isPaletteCategoryOpen",value:function(e){var t=this.store.getPaletteCategory(e);return t?t.is_open:null}},{key:"getAPIPipeline",value:function(e){return new Zn(e||this.getCurrentBreadcrumb().pipelineId,this)}},{key:"getSelectionAPIPipeline",value:function(){var e=this.getSelectedPipelineId();return e?this.getAPIPipeline(e):null}},{key:"clearPipelineFlow",value:function(){this.setCanvasInfo(this.getEmptyCanvasInfo())}},{key:"setCanvas",value:function(e){this.oldCanvas=e;var t=Mn.convertCanvasToCanvasInfo(e);this.setCanvasInfo(t)}},{key:"getCanvas",value:function(){return this.oldCanvas?Un.getCanvasBasedOnCanvasInfo(this.oldCanvas,this.getCanvasInfo()):{}}},{key:"getEmptyCanvasInfo",value:function(){var e=this.getUUID(),t=this.getUUID();return{doc_type:"pipeline",version:"3.0",json_schema:"http://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e,primary_pipeline:t,pipelines:[{id:t,runtime_ref:"",nodes:[],comments:[],links:[]}],schemas:[]}}},{key:"setPipelineFlow",value:function(e){if(e.objectData)this.setCanvas(e);else{var t=this.preparePipelineFlow(e);this.executeWithSelectionChange(this.store.dispatch,{type:"SET_CANVAS_INFO",canvasInfo:t,canvasInfoIdChanged:this.hasCanvasInfoIdChanged(t),primaryPipelineIdChanged:this.hasPrimaryPipelineIdChanged(t)})}}},{key:"ensurePipelineIsLoaded",value:function(e){var t=this.getSupernodePipelineUrl(e.targetObject),n=Fe.getSupernodePipelineId(e.targetObject);if(!this.isPipelineLoaded(n,t)){if(!e.externalPipelineFlow){var i="The external pipeline flow at '"+e.externalUrl+"' was not provided. Make sure you have implemented beforeEditActionHandler to support external pipeline flows.";throw this.logger.error(i),i}if(!this.flowContainsPipeline(e.externalPipelineFlow,n)){var o="The external pipeline flow '"+e.externalPipelineFlow.id+"' does not contain a pipeline with ID: "+n;throw this.logger.error(o),o}return this.addExternalPipelineFlow(e.externalPipelineFlow,t,e.targetObject,!0),!0}return!1}},{key:"getVisibleExpandedExternalSupernodes",value:function(){var e=this.getCurrentPipeline();return this.getVisibleExpandedExternalSupernodesForPipeline(e,this.getPipelines())}},{key:"getVisibleExpandedExternalSupernodesForPipeline",value:function(e,t){var n=this,i=[];return e.nodes.forEach(function(e){if(e.type===F&&e.is_expanded){var o=t.find(function(t){return t.id===Fe.getSupernodePipelineId(e)});if(e.subflow_ref.url&&!o&&i.push(e),o){var a=n.getVisibleExpandedExternalSupernodesForPipeline(o,t);i=i.concat(a)}}}),i}},{key:"flowContainsPipeline",value:function(e,t){return!!e.pipelines&&e.pipelines.some(function(e){return e.id===t})}},{key:"addExternalPipelineFlow",value:function(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.preparePipelineFlow(e,n);o.pipelines.forEach(function(e){return e.parentUrl=t});var a=Object.assign({},o);a.pipelines=[],a.url=t,this.store.dispatch({type:"ADD_EXTERNAL_PIPELINE_FLOW",newPipelineFlow:a,newPipelines:i?o.pipelines:[]})}},{key:"removeExternalPipelineFlow",value:function(e){this.store.dispatch({type:"REMOVE_EXTERNAL_PIPELINE_FLOW",externalUrl:e})}},{key:"createExternalPipelineFlowTemplate",value:function(e,t){return{doc_type:"pipeline",version:"3.0",json_schema:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e,primary_pipeline:t,pipelines:[{id:"",runtime_ref:"",nodes:[]}],schemas:[],runtimes:[]}}},{key:"getExternalPipelineFlows",value:function(){return this.store.getExternalPipelineFlows()}},{key:"getExternalPipelineFlowsForPipelines",value:function(e){var t=this.getUniqueUrls(e);return this.getExternalPipelineFlowsForUrls(t)}},{key:"getUniqueUrls",value:function(e){var t=[];return e.forEach(function(e){e.parentUrl&&!t.includes(e.parentUrl)&&t.push(e.parentUrl)}),t}},{key:"getExternalPipelineFlowsForUrls",value:function(e){var t=this,n=[];return e.forEach(function(e){var i=t.getExternalPipelineFlow(e);i.url=e,n.push(i)}),n}},{key:"getExternalPipelineFlow",value:function(e){var t=this.store.getExternalPipelineFlow(e);if(t){delete t.url;var n=this.getCanvasInfo();t.pipelines=n.pipelines.filter(function(t){return t.parentUrl===e}),t.pipelines.forEach(function(e){return delete e.parentUrl}),t=Rn.createPipelineFlow(t),this.store.getCanvasConfig().schemaValidation&&Gi(t)}return t}},{key:"setParentUrl",value:function(e,t){this.store.dispatch({type:"SET_PIPELINE_PARENT_URL",data:{pipelines:e,url:t}})}},{key:"replaceSupernodeAndPipelines",value:function(e){this.store.dispatch({type:"REPLACE_SN_AND_PIPELINES",data:e})}},{key:"preparePipelineFlow",value:function(e,t){var n=this.validateAndUpgrade(e),i=Fn.convertPipelineFlowToCanvasInfo(n,this.getCanvasLayout());return i.pipelines=Hn(i.pipelines,this.getNodeLayout(),this.getCanvasLayout(),this.layoutHandler,t),i}},{key:"setNodeAttributes",value:function(e){return qn(e,this.getNodeLayout(),this.getCanvasLayout(),this.layoutHandler)}},{key:"setCommentAttributes",value:function(e){return Vn(e,this.getCanvasLayout())}},{key:"validateAndUpgrade",value:function(e){var t=i(e),n=$e(t);return this.store.getCanvasConfig().schemaValidation&&Gi(t,n),n!==We&&(t=Ye(t),this.store.getCanvasConfig().schemaValidation&&Gi(t,We)),t}},{key:"getCanvasInfoPipeline",value:function(e){var t=this.getCanvasInfo();if(!t)return null;var n=e;n||(n=this.getPrimaryPipelineId());var i=t.pipelines.find(function(e){return e.id===n});return void 0===i?null:i}},{key:"getDescendantPipelineIds",value:function(e){var t=this,n=[];return this.getAPIPipeline(e).getSupernodes().forEach(function(e){var i=Fe.getSupernodePipelineId(e);i&&(n.push(i),n=n.concat(t.getDescendantPipelineIds(i)))}),n}},{key:"getDescendantPipelinesForSupernodes",value:function(e){var t=this,n=[];return e.forEach(function(e){n=n.concat(t.getDescendantPipelinesForSupernode(e))}),n}},{key:"getDescendantPipelinesForSupernode",value:function(e){var t=this,n=[],i=Fe.getSupernodePipelineId(e);if(i){var o=this.getCanvasInfoPipeline(i);o&&(n.push(o),this.getAPIPipeline(i).getSupernodes().forEach(function(e){n=n.concat(t.getDescendantPipelinesForSupernode(e))}))}return n}},{key:"getSchemaPipelinesForSupernode",value:function(e){return this.getDescendantPipelinesForSupernode(e).filter(function(e){return!e.parentUrl}).map(function(e){return Rn.createPipeline(e)})}},{key:"getDescPipelinesToDelete",value:function(e,t){var n=this,i=this.getDescendantSupernodeInfos(e,t),o=this.getOtherSupernodeInfos(e,t),a=[];return i.forEach(function(e){if(n.shouldBeDeleted(e,o)){var t=n.getCanvasInfoPipeline(e.pipelineId);a.push(t)}}),a}},{key:"shouldBeDeleted",value:function(e,t){var n=!0;return t.forEach(function(t){t.pipelineId===e.pipelineId&&(n=!1)}),n}},{key:"getOtherSupernodeInfos",value:function(e,t){var n=this.getPrimaryPipelineId(),i=this.getCanvasInfoPipeline(n),o=Fe.filterSupernodes(i.nodes);return this.getDescendantSupernodeInfos(o,n,{supernodesToIgnore:e,parentPipelineId:t})}},{key:"getDescendantSupernodeInfos",value:function(e,t,n){var i=this,o=[];return e.forEach(function(e){i.getDescendantSupernodeInfosForSupernode(e,t,n).forEach(function(e){i.isSupernodeInfoInArray(e,o)||o.push(e)})}),o}},{key:"getDescendantSupernodeInfosForSupernode",value:function(e,t,n){var i=this,o=[];if(this.continueNavigation(e,t,n)){var a=Fe.getSupernodePipelineId(e),r=this.getCanvasInfoPipeline(a);if(r)o.push({pipelineId:a,supernode:e,parentPipelineId:t}),Fe.filterSupernodes(r.nodes).forEach(function(e){o=o.concat(i.getDescendantSupernodeInfosForSupernode(e,a,n))})}return o}},{key:"continueNavigation",value:function(e,t,n){return!n||n.parentPipelineId!==t||!n.supernodesToIgnore.some(function(t){return t.id===e.id})}},{key:"isSupernodeInfoInArray",value:function(e,t){var n=this,i=!1;return t.forEach(function(t){n.isSupernodeInfoEqual(t,e)&&(i=!0)}),i}},{key:"isSupernodeInfoEqual",value:function(e,t){return e.supernode.id===t.supernode.id&&e.parentPipelineId===t.parentPipelineId}},{key:"getAncestorPipelineIds",value:function(e){var t=this.getPrimaryPipelineId();return t===e?[{pipelineId:t}]:[{pipelineId:t}].concat(this.getAncestorsBetween(t,e))}},{key:"getAncestorsBetween",value:function(e,t){var n=this,i=[];return this.getAPIPipeline(e).getSupernodes().forEach(function(o){var a=Fe.getSupernodePipelineId(o);a&&((n.isAncestorOfPipeline(a,t)||a===t)&&i.push({pipelineId:a,label:o.label,supernodeId:o.id,parentPipelineId:e}),i=i.concat(n.getAncestorsBetween(a,t)))}),i}},{key:"isAncestorOfPipeline",value:function(e,t){return this.getDescendantPipelineIds(e).includes(t)}},{key:"getSupernodePipelineUrl",value:function(e){return e.type===F&&m(e,"subflow_ref.url")?e.subflow_ref.url:null}},{key:"getSupernodeObjReferencing",value:function(e){var t;e===this.getPrimaryPipelineId()?t=this.getAPIPipeline(e).getSupernodes().find(function(t){return Fe.getSupernodePipelineId(t)===e}).id:t=this.getAncestorPipelineIds(e).find(function(t){return t.pipelineId===e&&m(t,"supernodeId")});return t}},{key:"setCanvasInfo",value:function(e){var t=Object.assign({},e);t.pipelines=Hn(t.pipelines,this.getNodeLayout(),this.getCanvasLayout(),this.layoutHandler),this.store.dispatch({type:"SET_CANVAS_INFO",canvasInfo:t,canvasInfoIdChanged:this.hasCanvasInfoIdChanged(t)})}},{key:"getPipelineFlow",value:function(){var e=Rn.createPipelineFlow(this.getCanvasInfo());return this.store.getCanvasConfig().schemaValidation&&Gi(e),e}},{key:"getPipelines",value:function(){return this.getCanvasInfo().pipelines}},{key:"getPipelineFlowId",value:function(){return this.store.getPipelineFlowId()}},{key:"getPrimaryPipelineId",value:function(){return this.store.getPrimaryPipelineId()}},{key:"getPrimaryPipeline",value:function(){return this.getCanvasInfoPipeline(this.getPrimaryPipelineId())}},{key:"getCurrentPipeline",value:function(){return this.getCanvasInfoPipeline(this.getCurrentPipelineId())}},{key:"getCurrentPipelineId",value:function(){return this.getCurrentBreadcrumb().pipelineId}},{key:"isPrimaryPipelineEmpty",value:function(){return this.getAPIPipeline(this.getPrimaryPipelineId()).isEmpty()}},{key:"deletePipeline",value:function(e){this.store.dispatch({type:"DELETE_PIPELINE",data:{id:e}})}},{key:"isPipelineLoaded",value:function(e,t){var n=this,i=this.getCanvasInfo();return!!i&&i.pipelines.some(function(i){return n.isPipeline(i,e,t)})}},{key:"isPipeline",value:function(e,t,n){return e.id===t&&(!e.parentUrl&&!n||e.parentUrl===n)}},{key:"cloneSupernodeContents",value:function(e,t){var n=this,i=[],o=Fe.getSupernodePipelineId(e);if(o){var a=t.find(function(e){return e.id===o});if(a){var r=this.clonePipelineWithNewId(a);e.subflow_ref.pipeline_id_ref=r.id,i.push(r),r.nodes.forEach(function(e){if(e.type===F){var o=n.cloneSupernodeContents(e,t);i=i.concat(o)}})}}return i}},{key:"clonePipelineWithNewId",value:function(e){var t=i(e);return Object.assign({},t,{id:this.getUniqueId(te,{pipeline:t})})}},{key:"createCanvasInfoPipeline",value:function(e){var t=this.getUniqueId(ne,{pipeline:e});return Object.assign({},e,{id:t})}},{key:"getCanvasInfo",value:function(){return this.store.getCanvasInfo()}},{key:"hasCanvasInfoIdChanged",value:function(e){return e.id!==this.getCanvasInfo().id}},{key:"hasPrimaryPipelineIdChanged",value:function(e){return e.primary_pipeline!==this.getCanvasInfo().primary_pipeline}},{key:"setSubdueStyle",value:function(e){this.store.dispatch({type:"SET_SUBDUE_STYLE",data:{subdueStyle:e}})}},{key:"removeAllStyles",value:function(e){this.store.dispatch({type:"REMOVE_ALL_STYLES",data:{temporary:e}})}},{key:"hideComments",value:function(){this.store.dispatch({type:"HIDE_COMMENTS"})}},{key:"showComments",value:function(){this.store.dispatch({type:"SHOW_COMMENTS"})}},{key:"isHidingComments",value:function(){return this.store.getCanvasInfo().hideComments}},{key:"findNode",value:function(e,t,n){var i=n.find(function(e){return e.id===t});return i&&i.nodes?i.nodes.find(function(t){return t.id===e}):null}},{key:"createBreadcrumb",value:function(e,t){return{pipelineId:e.subflow_ref.pipeline_id_ref,supernodeId:e.id,supernodeParentPipelineId:t,externalUrl:e.subflow_ref.url,label:e.label}}},{key:"addBreadcrumb",value:function(e){e&&e.pipelineId!==this.getPrimaryPipelineId()?this.store.dispatch({type:"ADD_BREADCRUMB",data:e}):this.resetBreadcrumb()}},{key:"addBreadcrumbs",value:function(e){this.store.dispatch({type:"ADD_BREADCRUMBS",data:e})}},{key:"setIndexedBreadcrumb",value:function(e){this.store.dispatch({type:"SET_TO_INDEXED_BREADCRUMB",data:e})}},{key:"setBreadcrumbs",value:function(e){this.store.dispatch({type:"SET_BREADCRUMBS",data:{breadcrumbs:e}})}},{key:"setPreviousBreadcrumb",value:function(){this.store.dispatch({type:"SET_TO_PREVIOUS_BREADCRUMB"})}},{key:"resetBreadcrumb",value:function(){this.store.dispatch({type:"RESET_BREADCRUMB",data:{pipelineId:this.getPrimaryPipelineId()}})}},{key:"getBreadcrumbs",value:function(){return this.store.getBreadcrumbs()}},{key:"getCurrentBreadcrumb",value:function(){var e=this.getBreadcrumbs();return e[e.length-1]}},{key:"getPreviousBreadcrumb",value:function(){var e=this.getBreadcrumbs();return e.length<2?null:e[e.length-2]}},{key:"isInSubFlowBreadcrumb",value:function(e){return this.getBreadcrumbs().findIndex(function(t){return t.pipelineId===e})>0}},{key:"setCanvasConfig",value:function(e){var t=this.getCanvasConfig(),n=st.mergeCanvasConfigs(t,e);if(!st.compareCanvasConfigs(t,n)){var i=Hn(this.getCanvasInfo().pipelines,n.enableNodeLayout,n.enableCanvasLayout,this.layoutHandler);this.store.dispatch({type:"SET_CANVAS_CONFIG_INFO",data:{canvasConfig:n,pipelines:i}})}}},{key:"setToolbarConfig",value:function(e){this.store.dispatch({type:"SET_TOOLBAR_CONFIG",data:{toolbarConfig:e}})}},{key:"refreshToolbar",value:function(){this.store.dispatch({type:"REFRESH_TOOLBAR"})}},{key:"setNotificationPanelConfig",value:function(e){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_CONFIG",data:{notificationPanelConfig:e}})}},{key:"getCanvasConfig",value:function(){return this.store.getCanvasConfig()}},{key:"getNodeLayout",value:function(){return this.store.getNodeLayout()}},{key:"getCanvasLayout",value:function(){return this.store.getCanvasLayout()}},{key:"clearNotificationMessages",value:function(){this.store.dispatch({type:"CLEAR_NOTIFICATION_MESSAGES"})}},{key:"setNotificationMessages",value:function(e){this.store.dispatch({type:"SET_NOTIFICATION_MESSAGES",data:{messages:e}})}},{key:"getNotificationMessages",value:function(e){var t=this.store.getNotifications();return e?t.filter(function(t){return t.type===e}):t}},{key:"deleteNotificationMessages",value:function(e){this.store.dispatch({type:"DELETE_NOTIFICATION_MESSAGES",data:{ids:e}})}},{key:"toggleNotificationPanel",value:function(){this.isNotificationPanelOpen()?this.closeNotificationPanel():this.openNotificationPanel()}},{key:"openNotificationPanel",value:function(){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_OPEN_STATE",data:{isOpen:!0}})}},{key:"closeNotificationPanel",value:function(){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_OPEN_STATE",data:{isOpen:!1}})}},{key:"isNotificationPanelOpen",value:function(){return this.store.isNotificationPanelOpen()}},{key:"openContextMenu",value:function(e,t){this.store.dispatch({type:"OPEN_CONTEXT_MENU",data:{menuDef:e,source:t}})}},{key:"closeContextMenu",value:function(){this.store.dispatch({type:"CLOSE_CONTEXT_MENU"})}},{key:"isContextMenuDisplayed",value:function(){return this.store.isContextMenuDisplayed()}},{key:"getContextMenuSource",value:function(){return this.store.getContextMenuSource()}},{key:"setLeftFlyoutConfig",value:function(e){this.store.dispatch({type:"SET_LEFT_FLYOUT_CONFIG",data:{config:e}})}},{key:"isLeftFlyoutOpen",value:function(){return this.store.isLeftFlyoutOpen()}},{key:"setRightFlyoutConfig",value:function(e){this.store.dispatch({type:"SET_RIGHT_FLYOUT_CONFIG",data:{config:e}})}},{key:"isRightFlyoutOpen",value:function(){return this.store.isRightFlyoutOpen()}},{key:"setRightFlyoutWidth",value:function(e){this.store.dispatch({type:"SET_RIGHT_FLYOUT_CONFIG",data:{config:{panelWidth:e}}})}},{key:"setBottomPanelConfig",value:function(e){this.store.dispatch({type:"SET_BOTTOM_PANEL_CONFIG",data:{config:e}})}},{key:"isBottomPanelOpen",value:function(){return this.store.isBottomPanelOpen()}},{key:"setBottomPanelHeight",value:function(e){this.store.dispatch({type:"SET_BOTTOM_PANEL_CONFIG",data:{config:{panelHeight:e}}})}},{key:"setTopPanelConfig",value:function(e){this.store.dispatch({type:"SET_TOP_PANEL_CONFIG",data:{config:e}})}},{key:"isTopPanelOpen",value:function(){return this.store.isTopPanelOpen()}},{key:"cloneObjectsToPaste",value:function(e,t,n){var i=this,o=[],a=[],r=[];return e&&e.forEach(function(e){var t=i.cloneNode(e);t.type===F&&(t=i.convertPipelineData(t)),o.push({originalId:e.id,node:t})}),t&&t.forEach(function(e){a.push({originalId:e.id,comment:i.cloneComment(e)})}),n&&n.forEach(function(e){if("nodeLink"===e.type||"associationLink"===e.type){var t=i.findClonedNode(e.srcNodeId,o),n=i.findClonedNode(e.trgNodeId,o),s=i.cloneNodeLink(e,t,n);r.push(s)}else{var d=i.findClonedComment(e.srcNodeId,a),c=i.findClonedNode(e.trgNodeId,o);if(d&&c){var l=i.cloneCommentLink(e,d.id,c.id);r.push(l)}}}),{clonedNodes:o.map(function(e){return e.node}),clonedComments:a.map(function(e){return e.comment}),clonedLinks:r}}},{key:"findClonedNode",value:function(e,t){var n=t.find(function(t){return t.originalId===e});return n?n.node:null}},{key:"findClonedComment",value:function(e,t){var n=t.find(function(t){return t.originalId===e});return n?n.comment:null}},{key:"cloneNode",value:function(e){var t=Object.assign({},e,{id:this.getUniqueId(ie,{node:e})});return t=this.setNodeAttributes(t)}},{key:"cloneComment",value:function(e){var t=this.setCommentAttributes(e);return Object.assign({},t,{id:this.getUniqueId(oe,{comment:t})})}},{key:"cloneNodeLink",value:function(e,t,n){var i=this.getUniqueId(ae,{link:e,sourceNodeId:t?t.id:null,targetNodeId:n?n.id:null}),o=Object.assign({},e,{id:i});return t?(o.srcNodeId=t.id,o.srcNodePortId=e.srcNodePortId):o.srcPos=e.srcPos,n?(o.trgNodeId=n.id,o.trgNodePortId=e.trgNodePortId):o.trgPos=e.trgPos,o}},{key:"cloneCommentLink",value:function(e,t,n){return{id:this.getUniqueId(re,{link:e,commentId:t,targetNodeId:n}),type:e.type,class_name:e.class_name,srcNodeId:t,trgNodeId:n}}},{key:"getSelectedObjectIds",value:function(){return this.store.getSelectedObjectIds()}},{key:"getSelectedNodesIds",value:function(){return this.getSelectedNodes().map(function(e){return e.id})}},{key:"getSelectedNodes",value:function(){return this.store.getSelectedNodes()}},{key:"getSelectedComments",value:function(){return this.store.getSelectedComments()}},{key:"getSelectedLinks",value:function(){return this.store.getSelectedLinks()}},{key:"getSelectedObjects",value:function(){return this.getSelectedNodes().concat(this.getSelectedComments()).concat(this.getSelectedLinks())}},{key:"getSelectionInfo",value:function(){return this.store.getSelectionInfo()}},{key:"getSelectedPipeline",value:function(){return this.getAPIPipeline(this.getSelectedPipelineId())}},{key:"getSelectedPipelineId",value:function(){return this.store.getSelectedPipelineId()}},{key:"clearSelections",value:function(){this.executeWithSelectionChange(this.store.dispatch,{type:"CLEAR_SELECTIONS"})}},{key:"selectObject",value:function(e,t,n,i){this.isSelected(e,i)?(n||t)&&this.toggleSelection(e,n||t,i):t?this.selectSubGraph(e,i):this.toggleSelection(e,n,i)}},{key:"isSelected",value:function(e,t){return t===this.getSelectedPipelineId()&&this.getSelectedObjectIds().indexOf(e)>=0}},{key:"toggleSelection",value:function(e,t,n){var i=[e];if(n===this.getSelectedPipelineId()&&t)if(this.isSelected(e,n)){var o=(i=this.getSelectedObjectIds().slice()).indexOf(e);i.splice(o,1)}else i=this.getSelectedObjectIds().concat(e);this.setSelections(i,n)}},{key:"setSelections",value:function(e,t){var n=this.getAPIPipeline(t).pipelineId;this.executeWithSelectionChange(this.store.dispatch,{type:"SET_SELECTIONS",data:{selections:e},pipelineId:n})}},{key:"deleteSelectedObjects",value:function(){this.getSelectedPipeline().deleteObjects(this.getSelectedObjectIds())}},{key:"selectAll",value:function(e,t){var n,i=[],o=this.getAPIPipeline(t),a=Ji(o.getNodes());try{for(a.s();!(n=a.n()).done;){var r=n.value;Fe.isSuperBindingNode(r)||i.push(r.id)}}catch(e){a.e(e)}finally{a.f()}var s,d=Ji(o.getComments());try{for(d.s();!(s=d.n()).done;){var c=s.value;i.push(c.id)}}catch(e){d.e(e)}finally{d.f()}if(e){var l,p=Ji(o.getLinks());try{for(p.s();!(l=p.n()).done;){var u=l.value;i.push(u.id)}}catch(e){p.e(e)}finally{p.f()}}this.setSelections(i,o.pipelineId)}},{key:"deselectAll",value:function(e){var t=this.getAPIPipeline(e);this.setSelections([],t.pipelineId)}},{key:"selectSubGraph",value:function(e,t){var n=this.getSubGraphNodes(e,t);this.setSelections(n,t)}},{key:"getSubGraphNodes",value:function(e,t){var n=this.getSelectedObjectIds();if(t===this.getSelectedPipelineId()){var i,o=this.getAPIPipeline(t).getLinks(),a=[],r=Ji(n);try{for(r.s();!(i=r.n()).done;){var s=i.value,d=this.getGraphPaths(s,e,o);a.push.apply(a,De(d))}}catch(e){r.e(e)}finally{r.f()}for(var c=0,l=a;c<l.length;c++){var p,u=Ji(l[c]);try{for(u.s();!(p=u.n()).done;){var f=p.value;n.includes(f)||n.push(f)}}catch(e){u.e(e)}finally{u.f()}}}return n.includes(e)||n.push(e),n}},{key:"getGraphPaths",value:function(e,t,n){var i=new Set,o=[];return this.getGraphPathForNode(e,t,[],i,o,n),o}},{key:"getGraphPathForNode",value:function(e,t,n,i,o,a){if(e!==t)if(i.has(e))this.isInSavedPath(e,o)&&o.push([].concat(De(n),[t]));else{i.add(e),n.push(e);var r,s=Ji(this.getNeighbourNodeIDs(e,a));try{for(s.s();!(r=s.n()).done;){var d=r.value;this.getGraphPathForNode(d,t,n,i,o,a)}}catch(e){s.e(e)}finally{s.f()}n.pop()}else o.push([].concat(De(n),[t]))}},{key:"isInSavedPath",value:function(e,t){var n,i=Ji(t);try{for(i.s();!(n=i.n()).done;){if(n.value.includes(e))return!0}}catch(e){i.e(e)}finally{i.f()}return!1}},{key:"getNeighbourNodeIDs",value:function(e,t){var n=[];return t.forEach(function(t){t.srcNodeId===e&&t.trgNodeId&&t.type!==M&&n.push(t.trgNodeId)}),n}},{key:"areSelectedNodesContiguous",value:function(){var e,t=this.getSelectedNodesIds(),n=[t[0]],i=this.getSelectedPipeline(),o=Ji(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;this.addConnectedNodeIdToGroup(a,n,t,i)}}catch(e){o.e(e)}finally{o.f()}return n.length===t.length}},{key:"areAllObjectsSelected",value:function(e){return this.store.areAllObjectsSelected(e)}},{key:"areAllSelectedObjectsLinks",value:function(){return this.store.areAllSelectedObjectsLinks()}},{key:"addConnectedNodeIdToGroup",value:function(e,t,n,i){if(t.includes(e)){var o,a=i.getLinksContainingId(e).filter(function(e){return e.type===D||e.type===M}),r=Ji(a);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.includes(s.trgNodeId)&&n.includes(s.srcNodeId)&&(t.includes(s.trgNodeId)||(t.push(s.trgNodeId),this.addConnectedNodeIdToGroup(s.trgNodeId,t,n,i)),t.includes(s.srcNodeId)||(t.push(s.srcNodeId),this.addConnectedNodeIdToGroup(s.srcNodeId,t,n,i)))}}catch(e){r.e(e)}finally{r.f()}}}},{key:"createEmptyPipeline",value:function(){var e={runtime_ref:this.getCanvasInfoPipeline(this.getPrimaryPipelineId()).runtime_ref,nodes:[],comments:[],links:[]};return this.createCanvasInfoPipeline(e)}},{key:"createPipeline",value:function(e,t,n){var i={runtime_ref:this.getCanvasInfoPipeline(this.getPrimaryPipelineId()).runtime_ref,nodes:e,comments:t,links:n};return this.createCanvasInfoPipeline(i)}},{key:"executeWithSelectionChange",value:function(e,t){var n={nodes:[],comments:[],pipelineId:""};if(this.selectionChangeHandler&&(n={links:this.getSelectedLinks(),nodes:this.getSelectedNodes(),comments:this.getSelectedComments(),pipelineId:this.getSelectedPipelineId()}),e(t),this.selectionChangeHandler){var i=this.getSelectedLinks(),o=this.getSelectedNodes(),a=this.getSelectedComments(),r={selection:this.getSelectedObjectIds(),selectedLinks:i,selectedNodes:o,selectedComments:a,addedLinks:Dn(i,n.links,function(e,t){return e.id===t.id}),addedNodes:Dn(o,n.nodes,function(e,t){return e.id===t.id}),addedComments:Dn(a,n.comments,function(e,t){return e.id===t.id}),deselectedLinks:Dn(n.links,i,function(e,t){return e.id===t.id}),deselectedNodes:Dn(n.nodes,o,function(e,t){return e.id===t.id}),deselectedComments:Dn(n.comments,a,function(e,t){return e.id===t.id}),previousPipelineId:n.pipelineId,selectedPipelineId:this.getSelectedPipelineId()};g(r.addedLinks)&&g(r.addedNodes)&&g(r.addedComments)&&g(r.deselectedLinks)&&g(r.deselectedNodes)&&g(r.deselectedComments)||this.selectionChangeHandler(r)}}},{key:"hasErrorMessage",value:function(e){var t=this.getNodeMessages(e);return!!t&&t.some(function(e){return e.type===se})}},{key:"hasWarningMessage",value:function(e){var t=this.getNodeMessages(e);return!!t&&t.some(function(e){return e.type===de})}},{key:"getNodeMessages",value:function(e){return e?e.messages:null}},{key:"getNotificationMessagesMaxType",value:function(){var e=this.getNotificationMessages(),t=this.getNotificationMessages(se),n=this.getNotificationMessages(de),i=this.getNotificationMessages(ce),o=this.getNotificationMessages(le),a=null;return e.length>0&&(t.length>0?a=se:n.length>0?a=de:i.length>0?a=ce:o.length>0&&(a=le)),a}},{key:"setZoom",value:function(e,t){var n=this.getCanvasConfig().enableSaveZoom;n===pe?this.store.dispatch({type:"SET_ZOOM",data:{zoom:e,enableSaveZoom:n},pipelineId:t}):n===ue&&this.setSavedZoomLocal(e,t),this.refreshToolbar()}},{key:"getSavedZoom",value:function(e){var t=this.getCanvasConfig().enableSaveZoom;return t===pe?this.store.getZoom(e):t===ue?this.getSavedZoomLocal(e):null}},{key:"clearSavedZoomValues",value:function(){Bn.delete("canvasSavedZoomValues")}},{key:"setSavedZoomLocal",value:function(e,t){var n=Bn.get("canvasSavedZoomValues"),i=n?JSON.parse(n):{};Re(i,[this.getPipelineFlowId(),t],e),Bn.set("canvasSavedZoomValues",JSON.stringify(i))}},{key:"getSavedZoomLocal",value:function(e){var t=Bn.get("canvasSavedZoomValues");if(t){var n=JSON.parse(t);return k(n,[this.getPipelineFlowId(),e])}return null}},{key:"setNodesMultiDecorations",value:function(e){this.store.dispatch({type:"SET_NODES_MULTI_DECORATIONS",data:{pipelineNodeDecorations:e}})}},{key:"setLinksMultiDecorations",value:function(e){this.store.dispatch({type:"SET_LINKS_MULTI_DECORATIONS",data:{pipelineLinkDecorations:e}})}},{key:"setObjectsStyle",value:function(e,t,n){this.store.dispatch({type:"SET_OBJECTS_STYLE",data:{pipelineObjIds:e,newStyle:t,temporary:n}})}},{key:"setObjectsMultiStyle",value:function(e,t){this.store.dispatch({type:"SET_OBJECTS_MULTI_STYLE",data:{pipelineObjStyles:e,temporary:t}})}},{key:"setLinksStyle",value:function(e,t,n){this.store.dispatch({type:"SET_LINKS_STYLE",data:{pipelineObjIds:e,newStyle:t,temporary:n}})}},{key:"setLinksMultiStyle",value:function(e,t){this.store.dispatch({type:"SET_LINKS_MULTI_STYLE",data:{pipelineObjStyles:e,temporary:t}})}},{key:"getObjectStyle",value:function(e,t){var n=this.getObject(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"getConnectedObjects",value:function(e,t,n){var i=this,o={},a={};return o[e]=[],a[e]=[],t.forEach(function(t){switch(o[e].push(t),n){case ge:i.getUpstreamObjIdsFrom(t,e,o,a),i.getDownstreamObjIdsFrom(t,e,o,a);break;case he:i.getUpstreamObjIdsFrom(t,e,o,a);break;case fe:i.getDownstreamObjIdsFrom(t,e,o,a)}i.getAPIPipeline(e).isSupernode(t)&&i.getSupernodeNodeIds(t,e,o,a)}),{nodes:o,links:a}}},{key:"getSupernodeNodeIds",value:function(e,t,n,i){var o=this,a=this.getAPIPipeline(t).getNode(e);if(a.type===F){var r=Fe.getSupernodePipelineId(a);n[r]=n[r]||[],i[r]=i[r]||[];var s=this.getAPIPipeline(r).getNodeIds(),d=this.getAPIPipeline(r).getLinkIds();n[r]=Ue(n[r],s),i[r]=Ue(i[r],d),s.forEach(function(e){o.getSupernodeNodeIds(e,r,n,i)})}}},{key:"getUpstreamObjIdsFrom",value:function(e,t,n,i){var o=this;n[t]=n[t]||[],i[t]=i[t]||[];var a=this.getAPIPipeline(t),r=a.getNode(e),s=a.getAttachedLinksContainingTargetId(e).filter(function(e){return e.type===D});if(s.length>0)s.forEach(function(e){if(!i[t].includes(e.id)){var r=a.getNode(e.srcNodeId);i[t]=Ue(i[t],[e.id]),n[t]=Ue(n[t],[e.srcNodeId]);var s=o.getSupernodeOutputPortForLink(r,e);if(s){var d=Fe.getSupernodePipelineId(r),c=o.getAPIPipeline(d).getNode(s.subflow_node_ref);c&&(i[d]=i[d]||[],n[d]=n[d]||[],n[d]=Ue(n[d],[c.id]),o.getUpstreamObjIdsFrom(c.id,d,n,i))}else o.getUpstreamObjIdsFrom(e.srcNodeId,t,n,i)}});else if(a.isEntryBindingNode(r)&&Fe.isSuperBindingNode(r)){var d=this.getSupernodeObjReferencing(t),c=d.parentPipelineId,l=this.getAPIPipeline(c),p=l.getNode(d.supernodeId);p.inputs.forEach(function(t){t.subflow_node_ref===e&&l.getAttachedLinksContainingTargetId(p.id).forEach(function(e){if(e.trgNodePortId===t.id)if(n[c]=n[c]||[],i[c]=i[c]||[],n[c]=Ue(n[c],[e.srcNodeId]),i[c]=Ue(i[c],[e.id]),l.isSupernode(e.srcNodeId)){var a=l.getNode(e.srcNodeId),r=o.getSupernodeOutputPortForLink(a,e);if(r){var s=r.subflow_node_ref;o.getUpstreamObjIdsFrom(s,Fe.getSupernodePipelineId(a),n,i)}}else o.getUpstreamObjIdsFrom(e.srcNodeId,c,n,i)})})}}},{key:"getDownstreamObjIdsFrom",value:function(e,t,n,i){var o=this;n[t]=n[t]||[],i[t]=i[t]||[];var a=this.getAPIPipeline(t),r=a.getNode(e),s=a.getAttachedLinksContainingSourceId(e).filter(function(e){return e.type===D});if(s.length>0)s.forEach(function(e){if(!i[t].includes(e.id)){var r=a.getNode(e.trgNodeId);i[t]=Ue(i[t],[e.id]),n[t]=Ue(n[t],[e.trgNodeId]);var s=o.getSupernodeInputPortForLink(r,e);if(s){var d=Fe.getSupernodePipelineId(r),c=o.getAPIPipeline(d).getNode(s.subflow_node_ref);c&&(i[d]=i[d]||[],n[d]=n[d]||[],n[d]=Ue(n[d],[c.id]),o.getDownstreamObjIdsFrom(c.id,d,n,i))}else o.getDownstreamObjIdsFrom(e.trgNodeId,t,n,i)}});else if(a.isExitBindingNode(r)&&Fe.isSuperBindingNode(r)){var d=this.getSupernodeObjReferencing(t),c=d.parentPipelineId,l=this.getAPIPipeline(c),p=l.getNode(d.supernodeId);p.outputs.forEach(function(t){t.subflow_node_ref===e&&l.getAttachedLinksContainingSourceId(p.id).forEach(function(e){if(e.srcNodePortId===t.id)if(n[c]=n[c]||[],i[c]=i[c]||[],n[c]=Ue(n[c],[e.trgNodeId]),i[c]=Ue(i[c],[e.id]),l.isSupernode(e.trgNodeId)){var a=l.getNode(e.trgNodeId),r=o.getSupernodeInputPortForLink(a,e);if(r){var s=r.subflow_node_ref;o.getDownstreamObjIdsFrom(s,Fe.getSupernodePipelineId(a),n,i)}}else o.getDownstreamObjIdsFrom(e.trgNodeId,c,n,i)})})}}},{key:"getSupernodeInputPortForLink",value:function(e,t){var n=null;return Fe.getSupernodePipelineId(e)&&t.trgNodePortId&&e.inputs.forEach(function(e){e.id!==t.trgNodePortId||(n=e)}),n}},{key:"getSupernodeOutputPortForLink",value:function(e,t){var n=null;return Fe.getSupernodePipelineId(e)&&t.srcNodePortId&&e.outputs.forEach(function(e){e.id!==t.srcNodePortId||(n=e)}),n}},{key:"setObjectsBranchHighlight",value:function(e){this.store.dispatch({type:"SET_OBJECTS_BRANCH_HIGHLIGHT",data:{pipelineObjIds:e}})}},{key:"setLinksBranchHighlight",value:function(e){this.store.dispatch({type:"SET_LINKS_BRANCH_HIGHLIGHT",data:{pipelineObjIds:e}})}},{key:"unsetAllBranchHighlight",value:function(){this.store.dispatch({type:"UNSET_OBJECTS_BRANCH_HIGHLIGHT"})}},{key:"copyToClipboard",value:function(e){var t=this,n={},i=this.getSelectionAPIPipeline();if(!i)return!1;var o=this.getSelectedNodes(),a=this.getSelectedComments(),r=i.getLinksBetween(o,a);if(e){var s=i.getNodeDataLinksContainingIds(o.map(function(e){return e.id}));r=Fe.concatUniqueBasedOnId(s,r),r=Fe.concatUniqueBasedOnId(this.getSelectedLinks(),r)}if(0===o.length&&0===a.length&&0===r.length)return!1;if(o&&o.length>0){n.nodes=o;var d=[];Fe.filterSupernodes(o).forEach(function(e){d=d.concat(t.getSchemaPipelinesForSupernode(e)),e.sub_pipelines=d})}a&&a.length>0&&(n.comments=a),r&&r.length>0&&(n.links=r.map(function(e){var t=Object.assign({},e);return e.type===D&&e.srcNodeId&&-1===o.findIndex(function(t){return t.id===e.srcNodeId})&&(delete t.srcNodeId,delete t.srcNodePortId,t.srcPos=Fe.getSrcPos(e,i)),e.type===D&&e.trgNodeId&&-1===o.findIndex(function(t){return t.id===e.trgNodeId})&&(delete t.trgNodeId,delete t.trgNodePortId,t.trgPos=Fe.getTrgPos(e,i)),t}));var c=JSON.stringify(n);return Bn.set("canvasClipboard",c),!0}},{key:"isClipboardEmpty",value:function(){var e=Bn.get("canvasClipboard");return!e||""===e}},{key:"getObjectsToPaste",value:function(){var e=Bn.get("canvasClipboard");if(!e)return{};var t=JSON.parse(e);return t.nodes||t.comments||t.links?t:null}},{key:"setTooltipDef",value:function(e){this.store.dispatch({type:"SET_TOOLTIP_DEF",data:{tooltipDef:e}})}},{key:"getTooltip",value:function(){return this.store.getTooltip()}},{key:"isTooltipOpen",value:function(){return this.store.isTooltipOpen()}},{key:"setTextToolbarDef",value:function(e){this.store.dispatch({type:"SET_TEXT_TOOLBAR_DEF",data:{textToolbarDef:e}})}}])}();function eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eo=function(){return!!e})()}var to=function(){function n(e,i){var o,a,r,s;return t(this,n),a=this,s=[e],r=Le(r=n),(o=Ce(a,eo()?Reflect.construct(r,s||[],Le(a).constructor):r.apply(a,s))).data=e,o.labelUtil=i.labelUtil,o.objectModel=i.objectModel,o.apiPipeline=o.objectModel.getAPIPipeline(e.pipelineId),o.previousObjectsInfo=o.getPreviousObjectsInfo(e),o.previousDetLinksInfo=o.getPreviousDetachedLinksInfo(e),o}return we(n,xe),e(n,[{key:"do",value:function(){this.apiPipeline.sizeAndPositionObjects(this.data.objectsInfo,this.data.linksInfo)}},{key:"undo",value:function(){this.apiPipeline.sizeAndPositionObjects(this.previousObjectsInfo,this.previousDetLinksInfo)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.apiPipeline.getComment(this.data.selectedObjectIds[0])?this.labelUtil.getActionLabel(this,"action.sizeComment"):this.labelUtil.getActionLabel(this,"action.sizeAndPositionObjects")}},{key:"getPreviousObjectsInfo",value:function(e){var t=this,n=[];return Object.keys(e.objectsInfo).forEach(function(e){var i=t.apiPipeline.getObject(e);i&&(n[e]={id:i.id,x_pos:i.x_pos,y_pos:i.y_pos,width:i.width,height:i.height},i.isResized&&(n[e].isResized=i.isResized,n[e].resizeWidth=i.resizeWidth,n[e].resizeHeight=i.resizeHeight))}),n}},{key:"getPreviousDetachedLinksInfo",value:function(e){var t=this,n=[];return Object.keys(e.detachedLinksInfo).forEach(function(e){var i=t.apiPipeline.getLink(e);i&&(i.srcPos||i.trgPos)&&(n[e]={},i.srcPos&&(n[e].srcPos={x_pos:i.srcPos.x_pos,y_pos:i.srcPos.y_pos}),i.trgPos&&(n[e].trgPos={x_pos:i.trgPos.x_pos,y_pos:i.trgPos.y_pos}))}),n}}])}(),no=null;var io=function(e){var t=[];return e.forEach(function(e){if(e.submenu){var n=io(e.menu);n&&n.length>0&&(e.menu=n,t.push(e))}else ao(e.action)||t.push(e)}),t},oo=function(e){var t=[],n=!0;return e.forEach(function(e){e.divider?n||(t.push(e),n=!0):(t.push(e),n=!1)}),t},ao=function(e){return"createComment"===e||"createWYSIWYGComment"===e||"colorBackground"===e||"disconnectNode"===e||"setCommentEditingMode"===e||"setNodeLabelEditingMode"===e||"setNodeDecorationLabelEditingMode"===e||"setLinkDecorationLabelEditingMode"===e||"cut"===e||"copy"===e||"paste"===e||"undo"===e||"redo"===e||"deleteSelectedObjects"===e||"createSuperNode"===e||"createSuperNodeExternal"===e||"deconstructSuperNode"===e||"collapseSuperNodeInPlace"===e||"expandSuperNodeInPlace"===e||"convertSuperNodeExternalToLocal"===e||"convertSuperNodeLocalToExternal"===e||"deleteLink"===e||"saveToPalette"===e},ro=function(e){var t,n=[],i=no.isContextToolbarForNonSelectedObj(e);if("canvas"===e.type&&(n=n.concat(so(),co())),"node"===e.type&&k(e,"targetObject.layout.labelEditable",!1)&&(n=n.concat({action:"setNodeLabelEditingMode",label:fo("node.renameNode"),toolbarItem:!0})),"comment"===e.type&&(n=n.concat({action:"setCommentEditingMode",label:fo("comment.editComment"),toolbarItem:!0})),"comment"===e.type&&(null===(t=e.targetObject)||void 0===t?void 0:t.contentType)!==ye&&k(no,"contextMenuConfig.defaultMenuEntries.colorBackground",!0)&&(n=n.concat({action:"colorBackground",label:fo("comment.colorBackground")},{divider:!0})),"node"===e.type||"comment"===e.type){var o=i?[e.targetObject.id]:e.selectedObjectIds;no.objectModel.getAPIPipeline(e.pipelineId).getLinksContainingIds(o).length>0&&(n=n.concat({action:"disconnectNode",label:fo("node.disconnectNode")},{divider:!0}))}if("node"===e.type||"comment"===e.type||"link"===e.type&&no.areDetachableLinksInUse()||"canvas"===e.type){var a=lo(e,"canvas"===e.type);n=n.concat({action:"clipboard",submenu:!0,menu:a,label:fo("node.editMenu")},{divider:!0})}return"canvas"===e.type&&(n=n.concat({action:"undo",label:fo("canvas.undo"),enable:no.canUndo()},{action:"redo",label:fo("canvas.redo"),enable:no.canRedo()},{divider:!0})),("node"===e.type||"comment"===e.type||no.getCanvasConfig().enableLinkSelection!==E&&"link"===e.type)&&(n=n.concat({action:"deleteSelectedObjects",label:fo("canvas.deleteObject"),toolbarItem:!0},{divider:!0})),"node"!==e.type&&"comment"!==e.type||k(no,"contextMenuConfig.defaultMenuEntries.createSupernode",!1)&&(no.areSelectedNodesContiguous()||k(no,"contextMenuConfig.enableCreateSupernodeNonContiguous",!1)||i&&"node"===e.type)&&(n=n.concat({action:"createSuperNode",label:fo("node.createSupernode")}),no.getCanvasConfig().enableExternalPipelineFlows&&(n=n.concat({action:"createSuperNodeExternal",label:fo("node.createSupernodeExternal")})),n=n.concat({divider:!0})),"node"!==e.type||e.targetObject.type!==F||1!==e.selectedObjectIds.length&&!i||"canvas"!==e.targetObject.open_with_tool&&void 0!==e.targetObject.open_with_tool||(n=n.concat({action:"deconstructSuperNode",label:fo("node.deconstructSupernode")},{divider:!0}),n=no.isSuperNodeExpandedInPlace(e.targetObject.id,e.pipelineId)?n.concat({action:"collapseSuperNodeInPlace",label:fo("node.collapseSupernodeInPlace")}):n.concat({action:"expandSuperNodeInPlace",label:fo("node.expandSupernode")}),k(no,"contextMenuConfig.defaultMenuEntries.displaySupernodeFullPage")&&(n=n.concat({action:"displaySubPipeline",label:fo("node.displaySupernodeFullPage"),toolbarItem:!0})),n=n.concat({divider:!0}),no.getCanvasConfig().enableExternalPipelineFlows&&(e.targetObject.subflow_ref.url?no.isPipelineExternal(e.pipelineId)||(n=n.concat({action:"convertSuperNodeExternalToLocal",label:fo("node.convertSupernodeExternalToLocal")},{divider:!0})):n=n.concat({action:"convertSuperNodeLocalToExternal",label:fo("node.convertSupernodeLocalToExternal")},{divider:!0}))),"link"===e.type&&no.getCanvasConfig().enableLinkSelection===E&&(n=n.concat({action:"deleteLink",label:fo("canvas.deleteObject"),toolbarItem:!0})),"node"===e.type&&(n=n.concat({action:"highlight",submenu:!0,menu:po(),label:fo("menu.highlight")})),"canvas"===e.type&&(n=n.concat({action:"unhighlight",label:fo("menu.unhighlight"),enable:no.isBranchHighlighted()})),"node"===e.type&&k(no,"contextMenuConfig.defaultMenuEntries.saveToPalette",!1)&&(n=n.concat({divider:!0},{action:"saveToPalette",label:fo("node.saveToPalette")})),n},so=function(){return no.getCanvasConfig().enableWYSIWYGComments?[{action:"createComment",label:fo("canvas.addComment"),toolbarItem:!0},{action:"createWYSIWYGComment",label:fo("canvas.addWysiwygComment"),toolbarItem:!0}]:{action:"createComment",label:fo("canvas.addComment"),toolbarItem:!0}},co=function(){var e=[];return no.isPrimaryPipelineEmpty()||no.areAllObjectsSelected()||e.push({action:"selectAll",label:fo("canvas.selectAll")},{divider:!0}),no.getSelectedObjectIds().length>0&&e.push({action:"deselectAll",label:fo("canvas.deselectAll")},{divider:!0}),e},lo=function(e,t){var n=[{action:"cut",label:fo("edit.cutSelection"),enable:"canvas"!==e.type||e.selectedObjectIds.length>0},{action:"copy",label:fo("edit.copySelection"),enable:"canvas"!==e.type||e.selectedObjectIds.length>0}];return t&&n.push({action:"paste",label:fo("edit.pasteSelection"),enable:!no.isClipboardEmpty()}),n},po=function(e){var t=[{action:"highlightBranch",label:fo("menu.highlightBranch")},{action:"highlightUpstream",label:fo("menu.highlightUpstream")},{action:"highlightDownstream",label:fo("menu.highlightDownstream")}];return t.push({divider:!0}),t=t.concat(uo())},uo=function(e){return[{action:"unhighlight",label:fo("menu.unhighlight"),enable:no.isBranchHighlighted()}]},fo=function(e){return no.labelUtil.getLabel(e)},ho=0,go=function(){function n(){t(this,n),this.logger=new He("CanvasController"),this.contextMenuConfig={enableCreateSupernodeNonContiguous:!1,defaultMenuEntries:{saveToPalette:!1,createSupernode:!0,displaySupernodeFullPage:!0,colorBackground:!0}},this.keyboardConfig={actions:{delete:!0,undo:!0,redo:!0,selectAll:!0,deselectAll:!0,copyToClipboard:!0,cutToClipboard:!0,pasteFromClipboard:!0}},this.handlers={contextMenuHandler:null,beforeEditActionHandler:null,editActionHandler:null,clickActionHandler:null,decorationActionHandler:null,tipHandler:null,layoutHandler:null,idGeneratorHandler:null,selectionChangeHandler:null,actionLabelHandler:null},this.objectModel=new Qi,this.commandStack=new Be,this.labelUtil=new wn,this.contextMenuActionHandler=this.contextMenuActionHandler.bind(this),this.closeContextMenu=this.closeContextMenu.bind(this),this.isContextToolbarForNonSelectedObj=this.isContextToolbarForNonSelectedObj.bind(this),this.instanceId=ho++,this.branchHighlighted=!1,this.focusObject=null}return e(n,[{key:"setCanvasConfig",value:function(e){if(this.logger.log("Setting Canvas Config"),e){var t=this.correctTypo(e);t.enableNodeLayout=Fe.convertPortPosInfo(t.enableNodeLayout),t.enableNodeLayout=Fe.convertPortDisplayInfo(t.enableNodeLayout),this.objectModel.openPaletteIfNecessary(e),this.objectModel.setCanvasConfig(t)}}},{key:"correctTypo",value:function(e){return g(e)||"boolean"!=typeof e.enableHightlightNodeOnNewLinkDrag||(e.enableHighlightNodeOnNewLinkDrag=e.enableHightlightNodeOnNewLinkDrag,delete e.enableHightlightNodeOnNewLinkDrag),e}},{key:"getCanvasConfig",value:function(){return this.objectModel.getCanvasConfig()}},{key:"setIntl",value:function(e){this.labelUtil.setIntl(e)}},{key:"getIntl",value:function(){return this.labelUtil.getIntl()}},{key:"setToolbarConfig",value:function(e){this.logger.log("Setting Toolbar Config"),this.objectModel.setToolbarConfig(e)}},{key:"setNotificationPanelConfig",value:function(e){this.logger.log("Setting Notif Panel Config"),this.objectModel.setNotificationPanelConfig(e)}},{key:"setLeftFlyoutConfig",value:function(e){this.logger.log("Setting Left Flyout Config"),this.objectModel.setLeftFlyoutConfig(e)}},{key:"setRightFlyoutConfig",value:function(e){this.logger.log("Setting Right Flyout Config"),this.objectModel.setRightFlyoutConfig(e)}},{key:"setBottomPanelConfig",value:function(e){this.logger.log("Setting Bottom Panel Config"),this.objectModel.setBottomPanelConfig(e)}},{key:"setTopPanelConfig",value:function(e){this.logger.log("Setting Top Panel Config"),this.objectModel.setTopPanelConfig(e)}},{key:"setContextMenuConfig",value:function(e){if(this.logger.log("Setting Context Menu Config"),e){var t=Object.assign(this.contextMenuConfig.defaultMenuEntries,e.defaultMenuEntries);this.contextMenuConfig=Object.assign(this.contextMenuConfig,e,{defaultMenuEntries:t})}}},{key:"setKeyboardConfig",value:function(e){this.logger.log("Setting Keyboard Config"),e&&e.actions&&(this.keyboardConfig.actions=Object.assign({},this.keyboardConfig.actions,e.actions))}},{key:"getKeyboardConfig",value:function(){return this.keyboardConfig}},{key:"setHandlers",value:function(e){this.logger.log("Setting Handlers"),this.handlers=Object.assign(this.handlers,e),this.objectModel.setIdGeneratorHandler(e.idGeneratorHandler),this.objectModel.setSelectionChangeHandler(e.selectionChangeHandler),this.objectModel.setLayoutHandler(e.layoutHandler),this.labelUtil.setActionLabelHandler(e.actionLabelHandler)}},{key:"setCanvasContents",value:function(e){this.canvasContents=e}},{key:"getSVGCanvasD3",value:function(){return this.canvasContents?this.canvasContents.getSVGCanvasD3():null}},{key:"setInstanceId",value:function(e){this.instanceId=e}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"getObjectModel",value:function(){return this.objectModel}},{key:"isInternalObjectModelEnabled",value:function(){return this.getCanvasConfig().enableInternalObjectModel}},{key:"getStore",value:function(){return this.getObjectModel().getStore()}},{key:"setPipelineFlow",value:function(e){this.logger.logStartTimer("setPipelineFlow"),this.objectModel.setPipelineFlow(e),this.ensureVisibleExpandedPipelinesAreLoaded(),this.logger.logEndTimer("setPipelineFlow")}},{key:"clearPipelineFlow",value:function(){this.objectModel.clearPipelineFlow()}},{key:"getPipelineFlow",value:function(){return this.objectModel.getPipelineFlow()}},{key:"getPipelineFlowId",value:function(){return this.objectModel.getPipelineFlowId()}},{key:"getPrimaryPipelineId",value:function(){return this.objectModel.getPrimaryPipelineId()}},{key:"getExternalPipelineFlow",value:function(e){return this.objectModel.getExternalPipelineFlow(e)}},{key:"getCanvasInfo",value:function(){return this.objectModel.getCanvasInfo()}},{key:"getAncestorPipelineIds",value:function(e){return this.objectModel.getAncestorPipelineIds(e)}},{key:"removeAllStyles",value:function(e){this.objectModel.removeAllStyles(e)}},{key:"setSubdueStyle",value:function(e){this.objectModel.setSubdueStyle(e)}},{key:"unsetAllBranchHighlight",value:function(){this.objectModel.unsetAllBranchHighlight()}},{key:"getPipeline",value:function(e){return this.objectModel.getCanvasInfoPipeline(e)}},{key:"getCurrentPipelineId",value:function(){return this.objectModel.getCurrentPipelineId()}},{key:"isPipelineExternal",value:function(e){return this.objectModel.getAPIPipeline(e).isPipelineExternal()}},{key:"getFlowMessages",value:function(e){return this.objectModel.getAPIPipeline(e).getFlowMessages()}},{key:"isFlowValid",value:function(e,t){return this.objectModel.getAPIPipeline(t).isFlowValid(e)}},{key:"autoLayout",value:function(e,t){this.objectModel.getAPIPipeline(t).autoLayout(e)}},{key:"setCanvas",value:function(e){this.objectModel.setCanvas(e)}},{key:"setPaletteData",value:function(e){this.objectModel.setPaletteData(e)}},{key:"getCanvas",value:function(){return this.objectModel.getCanvas()}},{key:"setPipelineFlowPalette",value:function(e){this.objectModel.setPipelineFlowPalette(e)}},{key:"clearPaletteData",value:function(){this.objectModel.clearPaletteData()}},{key:"setCategoryLoadingText",value:function(e,t){this.objectModel.setCategoryLoadingText(e,t)}},{key:"setCategoryEmptyText",value:function(e,t){this.objectModel.setCategoryEmptyText(e,t)}},{key:"addNodeTypeToPalette",value:function(e,t,n,i,o){this.objectModel.addNodeTypeToPalette(e,t,n,i,o)}},{key:"addNodeTypesToPalette",value:function(e,t,n,i,o){this.objectModel.addNodeTypesToPalette(e,t,n,i,o)}},{key:"removeNodesFromPalette",value:function(e,t){this.objectModel.addNodeTypesToPalette(e,t)}},{key:"getPaletteData",value:function(){return this.objectModel.getPaletteData()}},{key:"getPaletteNode",value:function(e){return this.objectModel.getPaletteNode(e)}},{key:"getPaletteNodeById",value:function(e){return this.objectModel.getPaletteNodeById(e)}},{key:"getCategoryForNode",value:function(e){return this.objectModel.getCategoryForNode(e)}},{key:"convertNodeTemplate",value:function(e){return this.objectModel.convertNodeTemplate(e)}},{key:"openPaletteCategory",value:function(e){this.objectModel.setIsOpenCategory(e,!0)}},{key:"closePaletteCategory",value:function(e){this.objectModel.setIsOpenCategory(e,!1)}},{key:"openAllPaletteCategories",value:function(){this.objectModel.setIsOpenAllCategories(!0)}},{key:"closeAllPaletteCategories",value:function(){this.objectModel.setIsOpenAllCategories(!1)}},{key:"isPaletteCategoryOpen",value:function(e){return this.objectModel.isPaletteCategoryOpen(e)}},{key:"setSelections",value:function(e,t){this.objectModel.setSelections(e,t)}},{key:"clearSelections",value:function(){this.objectModel.clearSelections()}},{key:"selectAll",value:function(e){var t=this.getCanvasConfig().enableLinkSelection!==E;this.objectModel.selectAll(t,e)}},{key:"deselectAll",value:function(e){this.objectModel.deselectAll(e)}},{key:"isPrimaryPipelineEmpty",value:function(){return this.objectModel.isPrimaryPipelineEmpty()}},{key:"getSelectedObjectIds",value:function(){return this.objectModel.getSelectedObjectIds()}},{key:"getSelectedNodes",value:function(){return this.objectModel.getSelectedNodes()}},{key:"getSelectedComments",value:function(){return this.objectModel.getSelectedComments()}},{key:"getSelectedLinks",value:function(){return this.objectModel.getSelectedLinks()}},{key:"getSelectedObjects",value:function(){return this.objectModel.getSelectedObjects()}},{key:"getSelectedPipelineId",value:function(){return this.objectModel.getSelectedPipelineId()}},{key:"deleteSelectedObjects",value:function(){this.objectModel.deleteSelectedObjects()}},{key:"areSelectedNodesContiguous",value:function(){return this.objectModel.areSelectedNodesContiguous()}},{key:"areAllObjectsSelected",value:function(){var e=this.areDetachableLinksInUse();return this.objectModel.areAllObjectsSelected(e)}},{key:"areAllSelectedObjectsLinks",value:function(){return this.objectModel.areAllSelectedObjectsLinks()}},{key:"areDetachableLinksInUse",value:function(){return this.getCanvasConfig().enableLinkSelection===me}},{key:"isSnapToGridInUse",value:function(){return this.getCanvasConfig().enableSnapToGridType!==ve}},{key:"isSelected",value:function(e,t){return this.objectModel.isSelected(e,t)}},{key:"selectObject",value:function(e,t,n,i){this.objectModel.selectObject(e,t,n,i)}},{key:"selectObjectWithClick",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.selectObject(e.id,i,o,n);var a=Fe.getObjectTypeName(e);this.clickActionHandler({clickType:t,objectType:a,id:e.id,selectedObjectIds:this.getSelectedObjectIds(),pipelineId:n})}},{key:"setNotificationMessages",value:function(e){this.objectModel.setNotificationMessages(e)}},{key:"clearNotificationMessages",value:function(){this.objectModel.clearNotificationMessages()}},{key:"deleteNotificationMessages",value:function(e){this.objectModel.deleteNotificationMessages(e)}},{key:"getNotificationMessages",value:function(e){return this.objectModel.getNotificationMessages(e)}},{key:"getNotificationMessagesMaxType",value:function(){return this.objectModel.getNotificationMessagesMaxType()}},{key:"moveObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).moveObjects(e)}},{key:"deleteObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteObjects(e)}},{key:"disconnectObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).disconnectObjects(e)}},{key:"deleteObject",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteObject(e)}},{key:"setObjectsStyle",value:function(e,t,n){this.objectModel.setObjectsStyle(e,t,n)}},{key:"setObjectsMultiStyle",value:function(e,t){this.objectModel.setObjectsMultiStyle(e,t)}},{key:"setObjectsBranchHighlight",value:function(e){this.objectModel.setObjectsBranchHighlight(e)}},{key:"getNodes",value:function(e){return this.objectModel.getAPIPipeline(e).getNodes()}},{key:"createNode",value:function(e,t){return this.objectModel.getAPIPipeline(t).createNode(e)}},{key:"addNode",value:function(e,t){this.objectModel.getAPIPipeline(t).addNode(e)}},{key:"createNodeCommand",value:function(e,t){var n=t||this.getCurrentPipelineId(),i=this.convertNodeTemplate(e.nodeTemplate);this.createNodeFromTemplateAt(i,{x:e.offsetX,y:e.offsetY},n)}},{key:"deleteNode",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteNode(e)}},{key:"setNodeProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeProperties(e,t)}},{key:"setNodeParameters",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeParameters(e,t)}},{key:"setNodeUiParameters",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeUiParameters(e,t)}},{key:"setNodeMessages",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeMessages(e,t)}},{key:"setNodeMessage",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeMessage(e,t)}},{key:"setNodeLabel",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeLabel(e,t)}},{key:"setNodesClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setObjectsClassName(e,t)}},{key:"setNodeDecorations",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeDecorations(e,t)}},{key:"setNodeInputPorts",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeInputPorts(e,t)}},{key:"setNodeOutputPorts",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeOutputPorts(e,t)}},{key:"setNodesMultiDecorations",value:function(e){this.objectModel.setNodesMultiDecorations(e)}},{key:"setInputPortLabel",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setInputPortLabel(e,t,n)}},{key:"setOutputPortLabel",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setOutputPortLabel(e,t,n)}},{key:"getNode",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNode(e)}},{key:"getNodeUiParameters",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeUiParameters(e)}},{key:"getSupernodes",value:function(e){return this.objectModel.getAPIPipeline(e).getSupernodes()}},{key:"getSupernodeObjReferencing",value:function(e){return this.objectModel.getSupernodeObjReferencing(e)}},{key:"getNodeMessages",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeMessages(e)}},{key:"getNodeMessage",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeMessage(e,t)}},{key:"getNodeInputPorts",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeInputPorts(e)}},{key:"getNodeOutputPorts",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeOutputPorts(e)}},{key:"getNodeDecorations",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeDecorations(e)}},{key:"getNodeClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeClassName(e)}},{key:"getNodeStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeStyle(e,t)}},{key:"getBranchNodes",value:function(e,t){var n=t||this.getCurrentPipelineId();return this.objectModel.getConnectedObjects(n,e,ge)}},{key:"getUpstreamNodes",value:function(e,t){var n=t||this.getCurrentPipelineId();return this.objectModel.getConnectedObjects(n,e,he)}},{key:"getDownstreamNodes",value:function(e,t){var n=t||this.getCurrentPipelineId();return this.objectModel.getConnectedObjects(n,e,fe)}},{key:"addCustomAttrToNodes",value:function(e,t,n){this.objectModel.getAPIPipeline(n).addCustomAttrToNodes(e,t)}},{key:"removeCustomAttrFromNodes",value:function(e,t,n){this.objectModel.getAPIPipeline(n).removeCustomAttrFromNodes(e,t)}},{key:"isSuperNodeExpandedInPlace",value:function(e,t){return this.objectModel.getAPIPipeline(t).isSuperNodeExpandedInPlace(e)}},{key:"setNodeLabelEditingMode",value:function(e,t){this.canvasContents&&this.getSVGCanvasD3().setNodeLabelEditingMode(e,t)}},{key:"setNodeDecorationLabelEditingMode",value:function(e,t,n){this.canvasContents&&this.getSVGCanvasD3().setNodeDecorationLabelEditingMode(e,t,n)}},{key:"getComments",value:function(e){return this.objectModel.getAPIPipeline(e).getComments()}},{key:"getComment",value:function(e,t){return this.objectModel.getAPIPipeline(t).getComment(e)}},{key:"getNewCommentPosition",value:function(e){var t=this.objectModel.getAPIPipeline(e),n=this.getSVGCanvasD3().getDefaultCommentOffset(),i=t.getAdjustedCommentPosition(n);return{x:i.x_pos,y:i.y_pos}}},{key:"createComment",value:function(e,t){this.objectModel.getAPIPipeline(t).createComment(e)}},{key:"addComment",value:function(e,t){this.objectModel.getAPIPipeline(t).addComment(e)}},{key:"editComment",value:function(e,t){this.objectModel.getAPIPipeline(t).editComment(e)}},{key:"setCommentProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setCommentProperties(e,t)}},{key:"setCommentsClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setObjectsClassName(e,t)}},{key:"deleteComment",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteComment(e)}},{key:"addCustomAttrToComments",value:function(e,t,n){this.objectModel.getAPIPipeline(n).addCustomAttrToComments(e,t)}},{key:"removeCustomAttrFromComments",value:function(e,t,n){this.objectModel.getAPIPipeline(n).removeCustomAttrFromComments(e,t)}},{key:"getCommentClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getCommentClassName(e)}},{key:"getCommentStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getCommentStyle(e,t)}},{key:"toggleComments",value:function(){this.isHidingComments()?this.showComments():this.hideComments()}},{key:"hideComments",value:function(){this.objectModel.hideComments()}},{key:"showComments",value:function(){this.objectModel.showComments()}},{key:"isHidingComments",value:function(){return this.objectModel.isHidingComments()}},{key:"setCommentEditingMode",value:function(e,t){this.canvasContents&&this.getSVGCanvasD3().setCommentEditingMode(e,t)}},{key:"getLink",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLink(e)}},{key:"getLinks",value:function(e){return this.objectModel.getAPIPipeline(e).getLinks()}},{key:"setLinkProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinkProperties(e,t)}},{key:"setNodeDataLinkSrcInfo",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setNodeDataLinkSrcInfo(e,t,n)}},{key:"setNodeDataLinkTrgInfo",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setNodeDataLinkTrgInfo(e,t,n)}},{key:"getNodeDataLinkFromInfo",value:function(e,t,n,i,o){return this.objectModel.getAPIPipeline(o).getNodeDataLinkFromInfo(e,t,n,i)}},{key:"getCommentLinkFromInfo",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getCommentLinkFromInfo(e,t)}},{key:"getNodeAssocLinkFromInfo",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeAssocLinkFromInfo(e,t)}},{key:"addLinks",value:function(e,t){this.objectModel.getAPIPipeline(t).addLinks(e)}},{key:"setLinks",value:function(e,t){this.objectModel.getAPIPipeline(t).setLinks(e)}},{key:"deleteLink",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteLink(e)}},{key:"createNodeLinks",value:function(e,t){return this.objectModel.getAPIPipeline(t).createNodeLinks(e)}},{key:"createCommentLinks",value:function(e,t){return this.objectModel.getAPIPipeline(t).createCommentLinks(e)}},{key:"setLinksClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinksClassName(e,t)}},{key:"setLinksStyle",value:function(e,t,n){this.objectModel.setLinksStyle(e,t,n)}},{key:"setLinksMultiStyle",value:function(e,t){this.objectModel.setLinksMultiStyle(e,t)}},{key:"getLinkClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLinkClassName(e)}},{key:"getLinkStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getLinkStyle(e,t)}},{key:"setLinksBranchHighlight",value:function(e){this.objectModel.setLinksBranchHighlight(e)}},{key:"setLinkDecorations",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinkDecorations(e,t)}},{key:"setLinksMultiDecorations",value:function(e){this.objectModel.setLinksMultiDecorations(e)}},{key:"getLinkDecorations",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLinkDecorations(e)}},{key:"setLinkDecorationLabelEditingMode",value:function(e,t,n){this.canvasContents&&this.getSVGCanvasD3().setLinkDecorationLabelEditingMode(e,t,n)}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"do",value:function(e){this.getCommandStack().do(e),this.objectModel.refreshToolbar()}},{key:"undo",value:function(){this.canUndo()&&this.editActionHandler({editType:"undo",editSource:"controller"})}},{key:"undoMulti",value:function(e){for(var t=0;t<e&&this.canUndo();t++)this.editActionHandler({editType:"undo",editSource:"controller"})}},{key:"redo",value:function(){this.canRedo()&&this.editActionHandler({editType:"redo",editSource:"controller"})}},{key:"redoMulti",value:function(e){for(var t=0;t<e&&this.canRedo();t++)this.editActionHandler({editType:"redo",editSource:"controller"})}},{key:"canUndo",value:function(){return this.getCommandStack().canUndo()}},{key:"canRedo",value:function(){return this.getCommandStack().canRedo()}},{key:"getAllUndoCommands",value:function(){return this.getCommandStack().getAllUndoCommands()}},{key:"getAllRedoCommands",value:function(){return this.getCommandStack().getAllRedoCommands()}},{key:"getUndoLabel",value:function(){if(this.canUndo()){var e=this.getCommandStack().getUndoCommand();if(e&&e.getLabel)return e.getLabel()}return""}},{key:"getRedoLabel",value:function(){if(this.canRedo()){var e=this.getCommandStack().getRedoCommand();if(e&&e.getLabel)return e.getLabel()}return""}},{key:"clearCommandStack",value:function(){this.getCommandStack().clearCommandStack(),this.objectModel.refreshToolbar()}},{key:"getBreadcrumbs",value:function(){return this.objectModel.getBreadcrumbs()}},{key:"getCurrentBreadcrumb",value:function(){return this.objectModel.getCurrentBreadcrumb()}},{key:"createBreadcrumb",value:function(e,t){return this.objectModel.createBreadcrumb(e,t)}},{key:"setBranchHighlight",value:function(e){this.unsetAllBranchHighlight(),this.setObjectsBranchHighlight(e.nodes),this.setLinksBranchHighlight(e.links),this.branchHighlighted=!0}},{key:"highlightBranch",value:function(e,t){var n=this.getBranchNodes(e,t);return this.setBranchHighlight(n),n}},{key:"highlightUpstream",value:function(e,t){var n=this.getUpstreamNodes(e,t);return this.setBranchHighlight(n),n}},{key:"highlightDownstream",value:function(e,t){var n=this.getDownstreamNodes(e,t);return this.setBranchHighlight(n),n}},{key:"isBranchHighlighted",value:function(){return this.branchHighlighted}},{key:"getLoggingState",value:function(){return He.getLoggingState()}},{key:"setLoggingState",value:function(e){He.setLoggingState(e)}},{key:"log",value:function(e){new He("Host App").log(e)}},{key:"addAfterUpdateCallback",value:function(e){this.canvasContents&&this.canvasContents.addAfterUpdateCallback(e)}},{key:"removeAfterUpdateCallback",value:function(e){this.canvasContents&&this.canvasContents.removeAfterUpdateCallback(e)}},{key:"togglePalette",value:function(){this.getObjectModel().togglePalette()}},{key:"openPalette",value:function(){this.getObjectModel().openPalette()}},{key:"closePalette",value:function(){this.getObjectModel().closePalette()}},{key:"isPaletteOpen",value:function(){return this.getObjectModel().isPaletteOpen()}},{key:"isBottomPanelOpen",value:function(){return this.getObjectModel().isBottomPanelOpen()}},{key:"setBottomPanelHeight",value:function(e){this.objectModel.setBottomPanelHeight(e)}},{key:"isLeftFlyoutOpen",value:function(){return this.objectModel.isLeftFlyoutOpen()}},{key:"setRightFlyoutWidth",value:function(e){this.objectModel.setRightFlyoutWidth(e)}},{key:"isRightFlyoutOpen",value:function(){return this.objectModel.isRightFlyoutOpen()}},{key:"isTopPanelOpen",value:function(){return this.getObjectModel().isTopPanelOpen()}},{key:"openContextMenu",value:function(e,t){this.objectModel.openContextMenu(e,t)}},{key:"closeContextMenu",value:function(){this.objectModel.closeContextMenu(),this.restoreFocus()}},{key:"isContextMenuDisplayed",value:function(){return this.objectModel.isContextMenuDisplayed()}},{key:"getContextMenuSource",value:function(){return this.objectModel.getContextMenuSource()}},{key:"closeContextToolbar",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Te)===be?(this.objectModel.closeContextMenu(),this.restoreFocus()):this.mouseInContextToolbar||this.mouseInObject||(this.objectModel.closeContextMenu(),this.restoreFocus())}},{key:"setMouseInContextToolbar",value:function(e){this.mouseInContextToolbar=e}},{key:"setMouseInObject",value:function(e){e&&e!==this.mouseInObject&&this.closeContextToolbar(),this.mouseInObject=e}},{key:"openNotificationPanel",value:function(){this.objectModel.openNotificationPanel()}},{key:"closeNotificationPanel",value:function(){this.objectModel.closeNotificationPanel()}},{key:"toggleNotificationPanel",value:function(){this.objectModel.toggleNotificationPanel()}},{key:"isDisplayingFullPageSubFlow",value:function(){return this.objectModel.getBreadcrumbs().length>1}},{key:"displaySubPipeline",value:function(e){var t=this.objectModel.getBreadcrumbs(),n=t.findIndex(function(t){return t.pipelineId===e});if(n>-1){var i={editType:"displaySubPipeline",editSource:"canvas",targetObject:this.getSupernodeFromBreadcrumb(t[n]),breadcrumbIndex:n};this.editActionHandler(i)}}},{key:"displaySubPipelineForSupernode",value:function(e,t){var n=this.getNode(e,t);if(n&&n.type===F){var i=this.objectModel.getCurrentBreadcrumb(),o=this.objectModel.createBreadcrumb(n,i.pipelineId);this.displaySubPipelineForBreadcrumbs([o])}}},{key:"displaySubPipelineForBreadcrumbs",value:function(e){var t=e[e.length-1],n={editType:"displaySubPipeline",editSource:"canvas",targetObject:this.getSupernodeFromBreadcrumb(t),addBreadcrumbs:e};this.editActionHandler(n)}},{key:"getSupernodeFromBreadcrumb",value:function(e){return e.supernodeParentPipelineId?this.objectModel.getAPIPipeline(e.supernodeParentPipelineId).getNode(e.supernodeId):null}},{key:"displayPreviousPipeline",value:function(){var e={editType:"displayPreviousPipeline",pipelineInfo:this.objectModel.getPreviousBreadcrumb(),editSource:"canvas"};this.editActionHandler(e)}},{key:"zoomIn",value:function(){this.canvasContents&&this.getSVGCanvasD3().zoomIn()}},{key:"zoomOut",value:function(){this.canvasContents&&this.getSVGCanvasD3().zoomOut()}},{key:"zoomToFit",value:function(e){this.canvasContents&&this.getSVGCanvasD3().zoomToFit(e)}},{key:"zoomTo",value:function(e,t){this.canvasContents&&this.getSVGCanvasD3().zoomTo(e,t)}},{key:"translateBy",value:function(e,t,n){this.canvasContents&&this.getSVGCanvasD3().translateBy(e,t,n)}},{key:"getZoom",value:function(){return this.canvasContents?this.getSVGCanvasD3().getZoom():null}},{key:"getZoomToReveal",value:function(e,t,n){return this.canvasContents?this.getSVGCanvasD3().getZoomToReveal(e,t,n):null}},{key:"clearSavedZoomValues",value:function(){this.objectModel.clearSavedZoomValues()}},{key:"getViewPortDimensions",value:function(){return this.canvasContents?this.getSVGCanvasD3().getTransformedViewportDimensions():null}},{key:"getCanvasDimensionsWithPadding",value:function(){return this.canvasContents?this.getSVGCanvasD3().getCanvasDimensionsWithPadding():null}},{key:"restoreFocus",value:function(){this.logger.log("restoreFocus - "+Fe.getFocusName(this.focusObject)),this.getSVGCanvasD3()&&!this.getSVGCanvasD3().isEditingText()&&this.setFocusObject(this.focusObject)}},{key:"focusOnTextEntryElement",value:function(e){this.canvasContents&&this.getSVGCanvasD3().focusOnTextEntryElement(e)}},{key:"setFocusOnCanvas",value:function(){this.setFocusObject(x)}},{key:"getFocusObject",value:function(){return this.focusObject}},{key:"setFocusObject",value:function(e,t){this.logger.log("setFocusObject focusObject = "+Fe.getFocusName(e)),this.focusObject=e,this.focusObject&&this.canvasContents&&(this.focusObject===x?this.canvasContents.focusOnCanvas():this.getSVGCanvasD3()&&this.getSVGCanvasD3().moveFocusTo(e,t))}},{key:"isFocusOnCanvas",value:function(){return!!this.canvasContents&&this.canvasContents.isFocusOnCanvas()}},{key:"autoSelectFocusObj",value:function(e,t,n){var i=this,o=this.getFocusObject();if(o&&o!==x&&(n||!this.getCanvasConfig().enableDragWithoutSelect)){var a=this.getCurrentPipelineId();if(!this.isFocusOnCanvas()&&!this.isSelected(o.id,a)){var r=function(){e(),i.removeAfterUpdateCallback(r)};return this.addAfterUpdateCallback(r),void this.selectObjectWithClick(o,_e,a,!1,t)}}e()}},{key:"getGhostNode",value:function(e){if(this.canvasContents){var t=this.convertNodeTemplate(e);return t=this.objectModel.setNodeAttributes(t),this.getSVGCanvasD3().getGhostNode(t)}return null}},{key:"nodeTemplateDragStart",value:function(e){n.dragNodeTemplate=e,this.canvasContents&&this.getSVGCanvasD3().nodeTemplateDragStart(n.dragNodeTemplate)}},{key:"nodeTemplateDragEnd",value:function(){this.canvasContents&&n.dragNodeTemplate&&this.getSVGCanvasD3().nodeTemplateDragEnd(n.dragNodeTemplate),n.dragNodeTemplate=null}},{key:"getDragNodeTemplate",value:function(){return n.dragNodeTemplate}},{key:"cutToClipboard",value:function(){this.editActionHandler({editType:"cut",editSource:"api"})}},{key:"copyToClipboard",value:function(){this.editActionHandler({editType:"copy",editSource:"api"})}},{key:"pasteFromClipboard",value:function(e){this.editActionHandler({editType:"paste",editSource:"api",pipelineId:e})}},{key:"isClipboardEmpty",value:function(){return this.objectModel.isClipboardEmpty()}},{key:"canPaste",value:function(){return!this.isClipboardEmpty()}},{key:"canCutCopy",value:function(){return this.getSelectedObjectIds().length>0&&!(this.areAllSelectedObjectsLinks()&&!this.areDetachableLinksInUse())}},{key:"canDelete",value:function(){return this.getSelectedObjectIds().length>0}},{key:"canZoomIn",value:function(){return!this.isPrimaryPipelineEmpty()&&(!this.getSVGCanvasD3()||!this.getSVGCanvasD3().isZoomedToMax())}},{key:"canZoomOut",value:function(){return!this.isPrimaryPipelineEmpty()&&(!this.getSVGCanvasD3()||!this.getSVGCanvasD3().isZoomedToMin())}},{key:"canZoomToFit",value:function(){return!this.isPrimaryPipelineEmpty()}},{key:"getSavedZoom",value:function(e){return this.objectModel.getSavedZoom(e)}},{key:"openTip",value:function(e){if(!this.isTipOpen()&&this.isTipEnabled(e.type)){if(this.handlers.tipHandler){var t={};switch(e.type){case Oe:t.nodeTemplate=e.nodeTemplate;break;case Ne:t.category=e.category;break;case je:t.pipelineId=e.pipelineId,t.node=e.node;break;case Se:t.pipelineId=e.pipelineId,t.node=e.node,t.port=e.port;break;case Ie:t.pipelineId=e.pipelineId,t.decoration=e.decoration;break;case Pe:t.pipelineId=e.pipelineId,t.link=e.link;break;case ke:t.stateTagText=e.stateTagText,t.stateTagType=e.stateTagType}e.customContent=this.handlers.tipHandler(e.type,t)}var n=this;this.pendingTooltip&&clearTimeout(this.pendingTooltip),this.pendingTooltip=setTimeout(function(){n.objectModel.setTooltipDef(e)},e.delay?e.delay:200)}}},{key:"closeTip",value:function(){this.pendingTooltip&&clearTimeout(this.pendingTooltip),this.isTipOpen()&&this.objectModel.setTooltipDef({})}},{key:"isTipOpen",value:function(){return this.objectModel.isTooltipOpen()}},{key:"getTipId",value:function(){var e=this.objectModel.getTooltip();return e?e.id:null}},{key:"isTipEnabled",value:function(e){var t=this.getCanvasConfig();switch(e){case Ne:return!0===t.tipConfig.palette||k(t,"tipConfig.palette.categories",!1);case Oe:return!0===t.tipConfig.palette||k(t,"tipConfig.palette.nodeTemplates",!1);case je:return t.tipConfig.nodes;case Se:return t.tipConfig.ports;case Ie:return t.tipConfig.decorations;case Pe:return t.tipConfig.links;case ke:return t.tipConfig.stateTag;default:return!1}}},{key:"openTextToolbar",value:function(e,t,n,i,o,a){this.objectModel.setTextToolbarDef({isOpen:!0,pos_x:e,pos_y:t,formats:n,contentType:i,actionHandler:o,blurHandler:a})}},{key:"closeTextToolbar",value:function(){this.objectModel.setTextToolbarDef({isOpen:!1})}},{key:"moveTextToolbar",value:function(e,t){this.objectModel.setTextToolbarDef({pos_x:e,pos_y:t})}},{key:"updateTextToolbarFormats",value:function(e){this.objectModel.setTextToolbarDef({formats:i(e)})}},{key:"createDroppedExternalObject",value:function(e,t,n){e&&("createFromObject"===e.operation?this.createNodeFromObjectAt(e.sourceId,e.sourceObjectTypeId,e.label,t.x,t.y,n):this.createNodeFromDataAt(t.x,t.y,e,n))}},{key:"createAutoNode",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.objectModel.getSelectionAPIPipeline(),i={editType:"createAutoNode",editSource:"canvas",addLink:t,nodeTemplate:e,pipelineId:(n||this.objectModel.getAPIPipeline()).pipelineId};this.editActionHandler(i)}},{key:"createNodeFromTemplateAt",value:function(e,t,n){var i={editType:"createNode",editSource:"canvas",nodeTemplate:e,offsetX:t.x,offsetY:t.y,pipelineId:n};this.editActionHandler(i)}},{key:"createNodeFromTemplateOnLinkAt",value:function(e,t,n,i){if(this.canNewNodeBeDroppedOnLink(e)){var o={editType:"createNodeOnLink",editSource:"canvas",nodeTemplate:e,offsetX:n.x,offsetY:n.y,link:t,pipelineId:i};this.editActionHandler(o)}}},{key:"createNodeFromTemplateAttachLinks",value:function(e,t,n,i){if(t&&this.canNewNodeBeAttachedToLinks(e)){var o={editType:"createNodeAttachLinks",editSource:"canvas",nodeTemplate:e,offsetX:n.x,offsetY:n.y,detachedLinks:t,pipelineId:i};this.editActionHandler(o)}}},{key:"createNodeFromObjectAt",value:function(e,t,n,i,o,a){var r={editType:"createNode",editSource:"canvas",label:n,offsetX:i,offsetY:o,sourceObjectId:e,sourceObjectTypeId:t,pipelineId:a};this.editActionHandler(r)}},{key:"createNodeFromDataAt",value:function(e,t,n,i){if(null!=n&&n.data){var o=n.data;o.offsetX=e,o.offsetY=t,o.pipelineId=i,o.editSource="canvas",this.editActionHandler(o)}}},{key:"canNewNodeBeDroppedOnLink",value:function(e){return!!(e.inputs&&e.inputs.length>0&&e.outputs&&e.outputs.length>0)}},{key:"canNewNodeBeAttachedToLinks",value:function(e){return!!(e.inputs&&e.inputs.length>0||e.outputs&&e.outputs.length>0)}},{key:"isContextToolbarForNonSelectedObj",value:function(e){return!(!this.getCanvasConfig().enableContextToolbar||!e.targetObject)&&!e.selectedObjectIds.includes(e.targetObject.id)}},{key:"contextMenuHandler",value:function(e){var t=function(e,t){no=t;var n,i=ro(e);if("function"==typeof no.handlers.contextMenuHandler){var o=no.handlers.contextMenuHandler(e,i);o&&o.length>0&&(n=o)}else n=i;return n&&n.length>0&&!1===no.getCanvasConfig().enableEditingActions&&(n=io(n)),n&&n.length>0&&(n=oo(n)),n}(e,this);t&&t.length>0&&this.openContextMenu(t,e)}},{key:"contextMenuActionHandler",value:function(e,t,n){var i=this.getContextMenuSource();this.logger.log("contextMenuActionHandler - action: "+e),this.logger.log(i),this.closeContextMenu(),this.getCanvasConfig().enableContextToolbar&&this.isContextToolbarForNonSelectedObj(i)&&this.setSelections([i.targetObject.id]);var o=Object.assign({},i,{editType:e,editParam:n,editSource:"contextmenu"});this.editActionHandler(o)}},{key:"textActionHandler",value:function(e,t,n){var i=Object.assign({},n,{editType:e,editSource:t});this.editActionHandler(i)}},{key:"toolbarActionHandler",value:function(e){this.logger.log("toolbarActionHandler - action: "+e),this.editActionHandler({editType:e,editSource:"toolbar",pipelineId:this.objectModel.getSelectedPipelineId()})}},{key:"keyboardActionHandler",value:function(e,t){this.logger.log("keyboardActionHandler - action: "+e),this.editActionHandler({editType:e,editSource:"keyboard",pipelineId:this.objectModel.getSelectedPipelineId(),mousePos:t})}},{key:"clickActionHandler",value:function(e){this.logger.log("clickActionHandler - "+e.clickType+" on "+e.objectType),this.handlers.clickActionHandler&&this.handlers.clickActionHandler(e)}},{key:"decorationActionHandler",value:function(e,t,n){this.logger.log("decorationActionHandler - node: "+e.id+" id: "+t),this.handlers.decorationActionHandler&&this.handlers.decorationActionHandler(e,t,n)}},{key:"editActionHandler",value:function(e){this.logger.log("editActionHandler - "+e.editType),this.logger.log(e);var t=Fe.removeNullProperties(e);if(t.selectedObjectIds=this.getSelectedObjectIds(),t.selectedObjects=this.getSelectedObjects(),t.pipelineId=t.pipelineId||this.getCurrentPipelineId(),"createSuperNodeExternal"===t.editType||"convertSuperNodeLocalToExternal"===t.editType)t.externalUrl="",t.externalPipelineFlowId="";else if("loadPipelineFlow"===t.editType||"expandSuperNodeInPlace"===t.editType||"displaySubPipeline"===t.editType||"deconstructSuperNode"===t.editType||"convertSuperNodeExternalToLocal"===t.editType)t=this.preProcessForExternalPipelines(t);else if("paste"===t.editType){var n=this.objectModel.getObjectsToPaste();if(!n)return!1;t.objects=n}if(this.handlers.beforeEditActionHandler){var i=null;if("undo"===t.editType?i=this.getCommandStack().getUndoCommand():"redo"===t.editType&&(i=this.getCommandStack().getRedoCommand()),!(t=this.handlers.beforeEditActionHandler(t,i)))return!1;if(!this.wasExtPipelineFlowLoadSuccessful(t))return!1}return this.editAction(t)}},{key:"editAction",value:function(e){var t=e;if(("deleteSelectedObjects"===t.editType||"cut"===t.editType)&&0===t.selectedObjectIds.length)return!1;switch(t.editType){case"selectAll":this.selectAll(t.pipelineId);break;case"deselectAll":this.deselectAll(t.pipelineId);break;case"zoomIn":this.zoomIn();break;case"zoomOut":this.zoomOut();break;case"zoomToFit":this.zoomToFit();break;case"commentsToggle":this.toggleComments();break;case"commentsHide":this.hideComments();break;case"commentsShow":this.showComments();break;case"setCommentEditingMode":this.setCommentEditingMode(t.id,t.pipelineId);break;case"setNodeLabelEditingMode":this.setNodeLabelEditingMode(t.id,t.pipelineId);break;case"setNodeDecorationLabelEditingMode":this.setNodeDecorationLabelEditingMode(t.decId,t.id,t.pipelineId);break;case"setLinkDecorationLabelEditingMode":this.setLinkDecorationLabelEditingMode(t.decId,t.id,t.pipelineId);break;case"setZoom":this.objectModel.setZoom(t.zoom,t.pipelineId);break;case"togglePalette":this.togglePalette();break;case"openPalette":this.openPalette();break;case"closePalette":this.closePalette();break;case"toggleNotificationPanel":this.toggleNotificationPanel();break;case"openNotificationPanel":this.openNotificationPanel();break;case"closeNotificationPanel":this.closeNotificationPanel();break;case"loadPipelineFlow":this.objectModel.ensurePipelineIsLoaded(t)}var n,i=null;if(this.getCanvasConfig().enableInternalObjectModel)switch(t.editType){case"createNode":i=new jt(t,this),this.commandStack.do(i),t=i.getData();break;case"createNodeOnLink":i=new Lt(t,this),this.commandStack.do(i),t=i.getData();break;case"createNodeAttachLinks":i=new At(t,this),this.commandStack.do(i),t=i.getData();break;case"createAutoNode":i=new bt(t,this),this.commandStack.do(i),this.panToReveal(t),t=i.getData();break;case"createComment":t.pos=t.mousePos,i=new kt(t,this),this.commandStack.do(i),t=i.getData();break;case"createWYSIWYGComment":t.pos=t.mousePos,t.contentType=ye,t.formats=[],t=(i=new kt(t,this)).getData(),this.commandStack.do(i);break;case"createAutoComment":t.pos=this.getNewCommentPosition(t.pipelineId),i=new kt(t,this),this.commandStack.do(i),t=i.getData();break;case"createAutoWYSIWYGComment":t.pos=this.getNewCommentPosition(t.pipelineId),t.contentType=ye,t.formats=[],i=new kt(t,this),this.commandStack.do(i),t=i.getData();break;case"insertNodeIntoLink":i=new pn(t,this),this.commandStack.do(i);break;case"attachNodeToLinks":i=new ft(t,this),this.commandStack.do(i);break;case"moveObjects":i=new fn(t,this),this.commandStack.do(i);break;case"resizeObjects":i=new to(t,this),this.commandStack.do(i);break;case"setObjectsStyle":i=new In(t),this.commandStack.do(i);break;case"setLinksStyle":i=new jn(t,this),this.commandStack.do(i);break;case"updateLink":i=new On(t,this),this.commandStack.do(i);break;case"setNodeLabel":i=new sn(t,this),this.commandStack.do(i);break;case"editComment":i=new nn(t,this),this.commandStack.do(i);break;case"editDecorationLabel":i=new an(t,this),this.commandStack.do(i);break;case"linkNodes":i=new Ot(t,this),this.commandStack.do(i),t=i.getData();break;case"linkNodesAndReplace":i=new Ot(t,this),this.commandStack.do(i);break;case"linkComment":i=new It(t,this),this.commandStack.do(i),t=i.getData();break;case"createDetachedLink":i=new Tt(t,this),this.commandStack.do(i),t=i.getData();break;case"colorSelectedObjects":i=new Gt(t,this),this.commandStack.do(i);break;case"deleteSelectedObjects":i=new Yt(t,this),this.commandStack.do(i);break;case"displaySubPipeline":i=new en(t,this),this.commandStack.do(i);break;case"displayPreviousPipeline":i=new Zt(t,this),this.commandStack.do(i);break;case"arrangeHorizontally":t.layoutDirection=Ee,i=new pt(t,this),this.commandStack.do(i);break;case"arrangeVertically":t.layoutDirection=X,i=new pt(t,this),this.commandStack.do(i);break;case"createSuperNode":case"createSuperNodeExternal":i=new Ft(t,this),this.commandStack.do(i);break;case"deconstructSuperNode":i=new zt(t,this),this.commandStack.do(i);break;case"expandSuperNodeInPlace":i=new cn(t,this),this.commandStack.do(i);break;case"collapseSuperNodeInPlace":i=new Bt(t,this),this.commandStack.do(i);break;case"convertSuperNodeExternalToLocal":i=new gt(t,this),this.commandStack.do(i);break;case"convertSuperNodeLocalToExternal":i=new mt(t,this),this.commandStack.do(i);break;case"deleteLink":i=new $t(t,this),this.commandStack.do(i);break;case"disconnectNode":i=new Kt(t,this),this.commandStack.do(i);break;case"saveToPalette":i=new mn(t,this),this.commandStack.do(i);break;case"cut":this.objectModel.copyToClipboard(this.areDetachableLinksInUse()),i=new Yt(t,this),this.commandStack.do(i);break;case"copy":this.objectModel.copyToClipboard(this.areDetachableLinksInUse());break;case"paste":i=new gn(t,this),this.commandStack.do(i),t=i.getData();break;case"undo":i=this.getCommandStack().getUndoCommand(),this.commandStack.undo(),this.objectModel.refreshToolbar();break;case"redo":i=this.getCommandStack().getRedoCommand(),this.commandStack.redo(),this.objectModel.refreshToolbar();break;case"highlightBranch":t.highlightedObjectIds=this.highlightBranch(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"highlightDownstream":t.highlightedObjectIds=this.highlightDownstream(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"highlightUpstream":t.highlightedObjectIds=this.highlightUpstream(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"unhighlight":this.unsetAllBranchHighlight(),this.branchHighlighted=!1}if(this.handlers.editActionHandler&&this.handlers.editActionHandler(t,i),this.ensureVisibleExpandedPipelinesAreLoaded(),this.getCanvasConfig().enableKeyboardNavigation){if("toolbar"!==t.editSource&&null!==(n=i)&&void 0!==n&&n.getFocusObject){var o=i.getFocusObject();this.logger.log("Focus object from "+t.editType+" command = "+Fe.getFocusName(o)),o===x?this.setFocusOnCanvas():this.canvasContents&&this.setFocusObject(o)}}else"setCommentEditingMode"!==t.editType&&"setNodeLabelEditingMode"!==t.editType&&"setNodeDecorationLabelEditingMode"!==t.editType&&"setLinkDecorationLabelEditingMode"!==t.editType&&"togglePalette"!==t.editType&&"openPalette"!==t.editType&&"closePalette"!==t.editType&&"toggleNotificationPanel"!==t.editType&&"openNotificationPanel"!==t.editType&&"closeNotificationPanel"!==t.editType&&"loadPipelineFlow"!==t.editType&&this.restoreFocus();return!0}},{key:"preProcessForExternalPipelines",value:function(e){if(e.externalPipelineFlowLoad=!1,e.targetObject){var t=k(e,"targetObject.subflow_ref.url");t&&(e.externalUrl=t,e.externalPipelineFlow=this.objectModel.getExternalPipelineFlow(t),e.externalPipelineFlow||(e.externalPipelineFlowLoad=!0))}return e}},{key:"ensureVisibleExpandedPipelinesAreLoaded",value:function(){var e=this.objectModel.getVisibleExpandedExternalSupernodes();e&&e.length>0&&this.editActionHandler({editType:"loadPipelineFlow",targetObject:e[0]})}},{key:"wasExtPipelineFlowLoadSuccessful",value:function(e){if(e.externalPipelineFlowLoad&&!e.externalPipelineFlow){var t="The host app did not provide a pipeline flow when requested for action "+e.editType+" in beforeEditActionHandler, for URL: "+e.externalUrl;return this.logger.error(t),!1}return!0}},{key:"panToReveal",value:function(e){var t=this,n=function(){var i=t.getZoomToReveal([e.newNode.id]);i&&t.zoomTo(i),t.removeAfterUpdateCallback(n)};this.addAfterUpdateCallback(n)}}])}();go.dragNodeTemplate=null;export{go as C,Yt as D,gn as P,Je as _,st as a,bt as b,jt as c,Xe as d,Ot as e,Kt as f,et as i};
2
+ //# sourceMappingURL=canvas-controller-5714c16e.js.map