{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":41},{"__isSmartRef__":true,"id":98},{"__isSmartRef__":true,"id":102},{"__isSmartRef__":true,"id":106}],"scripts":[],"shape":{"__isSmartRef__":true,"id":110},"_ClipMode":"visible","derivationIds":["159DBD6C-08E4-454C-AA93-8B2A04D070ED"],"id":"D61426B3-2946-4687-8593-9AC5E71FD49D","__layered_droppingEnabled__":false,"halosEnabled":true,"draggingEnabled":true,"layout":{"__isSmartRef__":true,"id":111},"closeButton":{"__isSmartRef__":true,"id":8},"collapseButton":{"__isSmartRef__":true,"id":18},"menuButton":{"__isSmartRef__":true,"id":28},"reframeHandle":{"__isSmartRef__":true,"id":98},"rightReframeHandle":{"__isSmartRef__":true,"id":106},"bottomReframeHandle":{"__isSmartRef__":true,"id":102},"titleBar":{"__isSmartRef__":true,"id":1},"collapsedTransform":null,"collapsedExtent":null,"expandedTransform":null,"expandedExtent":null,"ignoreEventsOnExpand":false,"_PreviousBorderWidth":0,"targetMorph":{"__isSmartRef__":true,"id":41},"eventHandler":{"__isSmartRef__":true,"id":112},"partsBinMetaInfo":{"__isSmartRef__":true,"id":113},"name":"NetworkChart","_StyleClassNames":["Morph","Window"],"showsHalos":false,"__serializedExpressions__":["_Position","contentOffset"],"_Rotation":0,"_Scale":1,"__LivelyClassName__":"lively.morphic.Window","__SourceModuleName__":"Global.lively.morphic.Widgets","withoutLayers":["Global.lively.morphic.GrabbingLayer"],"_Position":"lively.pt(0.0,0.0)","contentOffset":"lively.pt(3.0,22.0)"},"1":{"submorphs":[{"__isSmartRef__":true,"id":2},{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":18},{"__isSmartRef__":true,"id":28}],"scripts":[],"shape":{"__isSmartRef__":true,"id":38},"_ClipMode":"visible","derivationIds":["E5C0B936-04F5-4119-84F9-D94B8B1BD870"],"id":"A93FEF75-6000-46A1-9828-169F7BEE9081","__layered_droppingEnabled__":false,"halosEnabled":true,"layout":{"__isSmartRef__":true,"id":39},"windowMorph":{"__isSmartRef__":true,"id":0},"buttons":[{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":18},{"__isSmartRef__":true,"id":28}],"label":{"__isSmartRef__":true,"id":2},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":40},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.TitleBar","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(0.0,0.0)"},"2":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":3},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":4}],"_ClipMode":"hidden","derivationIds":["43F135A4-A72F-4432-A8BA-31EDD5BDF3D8"],"id":"1AA17696-CAE9-4CB6-8447-C9F626FCD245","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"isLabel":true,"eventsAreIgnored":true,"layout":{"__isSmartRef__":true,"id":6},"owner":{"__isSmartRef__":true,"id":1},"_StyleClassNames":["Morph","Text","window-title"],"_TextStylingMode":true,"eventHandler":{"__isSmartRef__":true,"id":7},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(3.0,3.0)"},"3":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(561.0,16.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"4":{"style":{"__isSmartRef__":true,"id":5},"chunkOwner":{"__isSmartRef__":true,"id":2},"_id":"_345","storedString":"Lively2LivelyNetworkChart","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"5":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"6":{"resizeWidth":true},"7":{"morph":{"__isSmartRef__":true,"id":2},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"8":{"submorphs":[{"__isSmartRef__":true,"id":9}],"scripts":[],"shape":{"__isSmartRef__":true,"id":14},"_ClipMode":"visible","derivationIds":["7C4B5FAE-51D0-4C83-AE70-CA0F8E236E53"],"id":"725E0C27-347B-43AC-99ED-895E41895D17","grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":9},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"_StyleClassNames":["Morph","Button","WindowControl","close"],"attributeConnections":[{"__isSmartRef__":true,"id":15}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":17},"isPressed":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(633.0,3.0)"},"9":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":10},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":11}],"_ClipMode":"hidden","derivationIds":["340C8787-7056-4BC9-B30F-DC9B77873AD6"],"id":"B840E290-CFE8-4D62-83C1-4CEE25E11B6E","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":8,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":8},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":13},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,-1.0)"},"10":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(16.0,19.0)","_Padding":"lively.rect(4,2,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"11":{"style":{"__isSmartRef__":true,"id":12},"chunkOwner":{"__isSmartRef__":true,"id":9},"_id":"_338","storedString":"X","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"12":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"13":{"morph":{"__isSmartRef__":true,"id":9},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"14":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"15":{"sourceObj":{"__isSmartRef__":true,"id":8},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"initiateShutdown","varMapping":{"__isSmartRef__":true,"id":16},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"16":{"source":{"__isSmartRef__":true,"id":8},"target":{"__isSmartRef__":true,"id":0}},"17":{"morph":{"__isSmartRef__":true,"id":8},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"18":{"submorphs":[{"__isSmartRef__":true,"id":19}],"scripts":[],"shape":{"__isSmartRef__":true,"id":24},"_ClipMode":"visible","derivationIds":["B6E41880-47FD-4E05-B160-F47653A47709"],"id":"371695A5-B4DF-4B48-956D-F38103E3123B","grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":19},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"attributeConnections":[{"__isSmartRef__":true,"id":25}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":27},"isPressed":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(613.0,3.0)"},"19":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":20},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":21}],"_ClipMode":"hidden","derivationIds":["7F589512-6351-48D3-BCE4-848B31960633"],"id":"ACCECE29-6AA6-49B2-B0D0-87D75EEA1CC3","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":8,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":18},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":23},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,1.0)"},"20":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(15.0,19.0)","_Padding":"lively.rect(4,2,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"21":{"style":{"__isSmartRef__":true,"id":22},"chunkOwner":{"__isSmartRef__":true,"id":19},"_id":"_341","storedString":"–","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"22":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"23":{"morph":{"__isSmartRef__":true,"id":19},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"24":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(17.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"25":{"sourceObj":{"__isSmartRef__":true,"id":18},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"toggleCollapse","varMapping":{"__isSmartRef__":true,"id":26},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"26":{"source":{"__isSmartRef__":true,"id":18},"target":{"__isSmartRef__":true,"id":0}},"27":{"morph":{"__isSmartRef__":true,"id":18},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"28":{"submorphs":[{"__isSmartRef__":true,"id":29}],"scripts":[],"shape":{"__isSmartRef__":true,"id":34},"_ClipMode":"visible","derivationIds":["11355579-59FF-4096-B2BB-358B43FB8B8D"],"id":"4D9C6EF8-D320-4EF0-A823-B0333BD2FDD1","grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":29},"_PreviousBorderWidth":0,"owner":{"__isSmartRef__":true,"id":1},"attributeConnections":[{"__isSmartRef__":true,"id":35}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"eventHandler":{"__isSmartRef__":true,"id":37},"isPressed":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.WindowControl","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(570.0,3.0)"},"29":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":30},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":31}],"_ClipMode":"hidden","derivationIds":["0857E164-26D8-447D-B715-0FE68AFD149A"],"id":"7F6F3ADD-BC3D-4D9C-9ABD-DDEBCDCB6706","_InputAllowed":false,"_HandStyle":"default","allowInput":false,"grabbingEnabled":false,"__layered_droppingEnabled__":false,"halosEnabled":true,"draggingEnabled":true,"fixedWidth":true,"fixedHeight":true,"_FontFamily":"Helvetica","_FontSize":8,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":28},"isLabel":true,"eventsAreIgnored":true,"_TextStylingMode":true,"eventsAreDisabled":true,"_PointerEvents":"none","eventHandler":{"__isSmartRef__":true,"id":33},"__serializedExpressions__":["_TextColor","_Position"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(64,64,64)","_Position":"lively.pt(0.0,0.0)"},"30":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(39.0,19.0)","_Padding":"lively.rect(4,2,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"31":{"style":{"__isSmartRef__":true,"id":32},"chunkOwner":{"__isSmartRef__":true,"id":29},"_id":"_344","storedString":"Menu","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"32":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"33":{"morph":{"__isSmartRef__":true,"id":29},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"34":{"_BorderWidth":1,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(40.0,17.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"35":{"sourceObj":{"__isSmartRef__":true,"id":28},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"showTargetMorphMenu","varMapping":{"__isSmartRef__":true,"id":36},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"36":{"source":{"__isSmartRef__":true,"id":28},"target":{"__isSmartRef__":true,"id":0}},"37":{"morph":{"__isSmartRef__":true,"id":28},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"38":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(653.0,22.0)","_Padding":"lively.rect(0,0,0,0)"},"39":{"resizeWidth":true,"adjustForNewBounds":true},"40":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"41":{"shape":{"__isSmartRef__":true,"id":42},"submorphs":[{"__isSmartRef__":true,"id":43}],"scripts":[],"_ClipMode":"visible","derivationIds":["AB2CD9B1-B8A7-488A-8677-EF55AEBC35C7","E6003058-4623-47B9-84B3-2455E1235474","9668B417-0690-4B52-8E2F-8024C3EEF8DD","C96D82D7-4985-4386-B187-9005687378DC","1A07D900-F889-4FD2-8673-7180DFDA0817"],"id":"FCC67FF9-DF1C-41E5-9EF7-A056C8D103EC","__layered_droppingEnabled__":true,"halosEnabled":true,"_StyleClassNames":["Morph","HtmlWrapperMorph","selectable"],"name":"Lively2LivelyNetworkChart","eventHandler":{"__isSmartRef__":true,"id":46},"layout":{"__isSmartRef__":true,"id":47},"showsHalos":false,"isBeingDragged":false,"prevScroll":[0,0],"_StyleSheet":{"__isSmartRef__":true,"id":48},"canvasId":"d3-1A07D900F8894FD286737180DFDA0817","partsBinMetaInfo":{"__isSmartRef__":true,"id":68},"owner":{"__isSmartRef__":true,"id":0},"grabbingEnabled":false,"doNotSerialize":["data","graph"],"__serializedExpressions__":["_Position","distanceToDragEvent"],"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":72},"__LivelyClassName__":"lively.morphic.HtmlWrapperMorph","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs","_Position":"lively.pt(3.0,22.0)","distanceToDragEvent":"lively.pt(1263.0,-7.0)"},"42":{"_BorderWidth":0,"stringifiedShapeNode":"<div xmlns=\"http://www.w3.org/1999/xhtml\" data-lively-morphid=\"FCC67FF9-DF1C-41E5-9EF7-A056C8D103EC\" class=\"Morph HtmlWrapperMorph selectable\" id=\"null\" style=\"overflow: visible; border: 0px solid rgb(95, 94, 95); padding: 0px; width: 647px; height: 325px; position: absolute; left: 0px; top: 0px; background: rgb(255, 255, 255);\"><div class=\"graph-frame\" style=\"position: relative; overflow: hidden; width: 100%; height: 100%;\"><canvas width=\"1414\" height=\"760\" style=\"position: relative; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); width: 100%; height: 100%;\"></canvas></div><div data-lively-node-type=\"origin-node\" style=\"top: 0px !important; left: 0px !important; position: absolute !important; margin-top: 0px !important; margin-left: 0px !important;\"><div class=\"morphNode\" tabindex=\"-1\" touch-action=\"none\" data-lively-node-type=\"morph-node\" style=\"position: absolute; left: 0px; top: 0px; visibility: hidden;\"><div id=\"null\" data-lively-morphid=\"027952B0-D333-4ABB-86B2-40719F3ACEA4\" class=\"Morph Box\" style=\"position: absolute; left: 0px; top: 0px; padding: 0px; width: 10px; height: 10px; opacity: 1; border: 0px solid rgba(0, 0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; overflow: visible; background: rgb(204, 0, 0);\"></div></div></div><div data-lively-node-type=\"origin-node\" style=\"top: 0px !important; left: 0px !important; position: absolute !important; margin-top: 0px !important; margin-left: 0px !important;\"><div class=\"morphNode\" tabindex=\"-1\" touch-action=\"none\" data-lively-node-type=\"morph-node\" style=\"position: absolute; left: 0px; top: 0px; visibility: hidden;\"><div id=\"null\" data-lively-morphid=\"63769156-2E1A-47A0-8336-F1AC5EAEF346\" class=\"Morph Box\" style=\"position: absolute; left: 0px; top: 0px; padding: 0px; width: 10px; height: 10px; opacity: 1; border: 0px solid rgba(0, 0, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; overflow: visible; background: rgb(204, 0, 0);\"></div></div></div></div>","_AppearanceStylingMode":false,"__serializedExpressions__":["_Padding","_BorderColor","_Fill","_Position","_Extent","extent"],"__LivelyClassName__":"lively.morphic.Shapes.External","__SourceModuleName__":"Global.lively.morphic.Shapes","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(95,94,95)","_Fill":"Color.rgb(255,255,255)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(647.0,325.0)","extent":"lively.pt(647.0,325.0)"},"43":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":44},"_ClipMode":"visible","derivationIds":[],"id":"63769156-2E1A-47A0-8336-F1AC5EAEF346","__layered_droppingEnabled__":true,"halosEnabled":true,"__serializedExpressions__":["_Position"],"name":"updateDot","owner":{"__isSmartRef__":true,"id":41},"eventHandler":{"__isSmartRef__":true,"id":45},"_Visible":false,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"44":{"__serializedExpressions__":["_Position","_Extent","_Padding","_Fill"],"_BorderWidth":0,"_BorderColor":null,"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(10.0,10.0)","_Padding":"lively.rect(0,0,0,0)","_Fill":"Color.rgb(204,0,0)"},"45":{"morph":{"__isSmartRef__":true,"id":43},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"46":{"morph":{"__isSmartRef__":true,"id":41},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"47":{"resizeWidth":true,"resizeHeight":true},"48":{"rules":[{"__isSmartRef__":true,"id":49},{"__isSmartRef__":true,"id":52},{"__isSmartRef__":true,"id":54},{"__isSmartRef__":true,"id":58},{"__isSmartRef__":true,"id":62},{"__isSmartRef__":true,"id":64}],"originMorph":{"__isSmartRef__":true,"id":41},"__LivelyClassName__":"lively.morphic.StyleSheet","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"49":{"declarations":[{"__isSmartRef__":true,"id":50},{"__isSmartRef__":true,"id":51}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"50":{"values":["10px","sans-serif"],"rule":{"__isSmartRef__":true,"id":49},"property":"font","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"51":{"values":["0"],"rule":{"__isSmartRef__":true,"id":49},"property":"margin","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"52":{"declarations":[{"__isSmartRef__":true,"id":53}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph svg","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"53":{"values":["hidden"],"rule":{"__isSmartRef__":true,"id":52},"property":"overflow","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"54":{"declarations":[{"__isSmartRef__":true,"id":55},{"__isSmartRef__":true,"id":56},{"__isSmartRef__":true,"id":57}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph .node rect","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"55":{"values":["#333"],"rule":{"__isSmartRef__":true,"id":54},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"56":{"values":["1.5px"],"rule":{"__isSmartRef__":true,"id":54},"property":"stroke-width","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"57":{"values":["#fff"],"rule":{"__isSmartRef__":true,"id":54},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"58":{"declarations":[{"__isSmartRef__":true,"id":59},{"__isSmartRef__":true,"id":60},{"__isSmartRef__":true,"id":61}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph #node-kspacey","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"59":{"values":["red"],"rule":{"__isSmartRef__":true,"id":58},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"60":{"values":["1px"],"rule":{"__isSmartRef__":true,"id":58},"property":"stroke-width","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"61":{"values":["#fff"],"rule":{"__isSmartRef__":true,"id":58},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"62":{"declarations":[{"__isSmartRef__":true,"id":63}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph .edgeLabel rect","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"63":{"values":["#fff"],"rule":{"__isSmartRef__":true,"id":62},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"64":{"declarations":[{"__isSmartRef__":true,"id":65},{"__isSmartRef__":true,"id":66},{"__isSmartRef__":true,"id":67}],"styleSheet":{"__isSmartRef__":true,"id":48},"selector":".Morph .edgePath","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"65":{"values":["#333"],"rule":{"__isSmartRef__":true,"id":64},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"66":{"values":["1.5px"],"rule":{"__isSmartRef__":true,"id":64},"property":"stroke-width","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"67":{"values":["none"],"rule":{"__isSmartRef__":true,"id":64},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"68":{"partName":"NetworkChart","requiredModules":[],"partsSpaceName":"PartsBin/Charlie/","comment":"no comment","changes":[{"__isSmartRef__":true,"id":69},{"__isSmartRef__":true,"id":70},{"__isSmartRef__":true,"id":71}],"migrationLevel":8,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Thu May 01 2014 00:02:47 GMT-0700 (Pacific Daylight Time)\")"},"69":{"author":"robertkrahn","message":"no comment","id":"DA7483BC-7F0D-47A5-84B4-1D5C4D84A365","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:11:03 GMT-0700 (Pacific Daylight Time)\")"},"70":{"author":"robertkrahn","message":"no comment","id":"2C3083B5-AEBA-4315-9796-CFCA7DD0AA99","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:18:03 GMT-0700 (Pacific Daylight Time)\")"},"71":{"author":"cmagnuso","message":"no comment","id":"562372AF-9E3E-454A-9407-00F045BA5E86","__serializedExpressions__":["date"],"date":"new Date(\"Mon Sep 29 2014 18:15:49 GMT-0700 (Pacific Daylight Time)\")"},"72":{"loadD3":{"__isSmartRef__":true,"id":73},"reset":{"__isSmartRef__":true,"id":76},"onLoad":{"__isSmartRef__":true,"id":79},"loadViz":{"__isSmartRef__":true,"id":82},"render":{"__isSmartRef__":true,"id":85},"setExtent":{"__isSmartRef__":true,"id":88},"update":{"__isSmartRef__":true,"id":95}},"73":{"varMapping":{"__isSmartRef__":true,"id":74},"source":"function loadD3(loadAttemptCount, thenDo) {\n    var self = this;\n    var maxLoadAttemptCount = 5;\n    var d3URL = '//cdnjs.cloudflare.com/ajax/libs/d3/3.4.6/d3.js';\n    if (!loadAttemptCount) loadAttemptCount = 1;\n    $('script[src=\"' + d3URL + '\"]').remove();\n    JSLoader.loadJs(d3URL);\n    Functions.waitFor(\n        5*1000,\n        function() { return typeof d3 !== 'undefined'; },\n        function(err) {\n            var msg;\n            if (err && loadAttemptCount < maxLoadAttemptCount) {\n                msg = Strings.format(\n                    \"Loading d3, attempt %s timed out.\\nTrying again...\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.yellow, 5);\n                self.loadD3(loadAttemptCount + 1);\n                return;\n            }\n            if (err) {\n                msg = Strings.format(\n                    \"Cannot load d3 library.\\nSorry, d3 isn't available right now.\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.red, 10);\n                return;\n            }\n            msg = Strings.format(\n                \"d3 loaded!\",\n                loadAttemptCount);\n            $world.setStatusMessage(msg, Color.green, 4);\n            thenDo && thenDo();\n            lively.bindings.signal(this, 'd3Loaded');\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":75},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"74":{"this":{"__isSmartRef__":true,"id":41}},"75":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Apr 30 2014 19:42:03 GMT-0700 (Pacific Daylight Time)\")"},"76":{"varMapping":{"__isSmartRef__":true,"id":77},"source":"function reset() {\n\n    // if (this.graph) {\n    //     this.graph.removeAllListeners()\n    // }\n    // this.render();\n    // this.jQuery().html(\"\");\n\n    this.data = null;\n    this.graph = null;\n    this.stopStepping();\n    this.doNotSerialize = ['data', 'graph'];\n\n    var updateDot = this.getMorphNamed(\"updateDot\");\n    if (updateDot) updateDot.remove()\n    updateDot = lively.morphic.newMorph({extent: pt(10,10), style: {fill: Color.red}});\n    updateDot.name = 'updateDot';\n    this.addMorph(updateDot);\n    updateDot.align(updateDot.bounds().topLeft(), this.innerBounds().topLeft());\n    updateDot.setVisible(false);\n}","funcProperties":{"__isSmartRef__":true,"id":78},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"77":{"this":{"__isSmartRef__":true,"id":41}},"78":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jun 17 2014 17:41:46 GMT-0700 (Pacific Daylight Time)\")"},"79":{"varMapping":{"__isSmartRef__":true,"id":80},"source":"function onLoad() {\n    Functions.composeAsync(\n        this.loadViz.bind(this, 0),\n        this.loadD3.bind(this, 0)\n        // this.loadDagre.bind(this, 0)\n    )(function() {\n        this.startStepping(30*1000, 'update');\n        this.render();\n    }.bind(this));\n}","funcProperties":{"__isSmartRef__":true,"id":81},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"80":{"this":{"__isSmartRef__":true,"id":41}},"81":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Mon Jun 16 2014 17:05:16 GMT-0700 (Pacific Daylight Time)\")"},"82":{"varMapping":{"__isSmartRef__":true,"id":83},"source":"function loadViz(loadAttemptCount, thenDo) {\n    var self = this;\n    var maxLoadAttemptCount = 5;\n    var url = \"http://visjs.org/dist/vis.js\";\n    if (!loadAttemptCount) loadAttemptCount = 1;\n    lively.$('script[src=\"' + url + '\"]').remove();\n    JSLoader.loadJs(url);\n    Functions.waitFor(\n        5*1000,\n        function() { return typeof vis !== 'undefined'; },\n        function(err) {\n            var msg;\n            if (err && loadAttemptCount < maxLoadAttemptCount) {\n                msg = Strings.format(\n                    \"Loading vis.js, attempt %s timed out.\\nTrying again...\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.yellow, 5);\n                self.loadD3(loadAttemptCount + 1);\n                return;\n            }\n            if (err) {\n                msg = Strings.format(\n                    \"Cannot load vis.js library.\\nSorry, vis.js isn't available right now.\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.red, 10);\n                return;\n            }\n            msg = Strings.format(\n                \"vis.js loaded!\",\n                loadAttemptCount);\n            $world.setStatusMessage(msg, Color.green, 4);\n            thenDo && thenDo();\n            lively.bindings.signal(this, 'vis.jsLoaded');\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":84},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"83":{"this":{"__isSmartRef__":true,"id":41}},"84":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sun Jun 15 2014 11:30:09 GMT-0700 (Pacific Daylight Time)\")"},"85":{"varMapping":{"__isSmartRef__":true,"id":86},"source":"function render() {\n\n// Functions.composeAsync(\n//             getData,\n//             createRenderState,\n//             getNodesAndEdgesFromRenderState\n// )(function(err, renderState) {Global.renderState=renderState})\n// this.data.nodes.data[\"tracker-3A99B531-D214-4511-A819-3155F6395839\"]\n// this.data.nodes.data[\"tracker-38E644D2-6867-4404-8B91-360DECC146E8\"]\n\n// Object.values(this.graph.edges).pluck('width')\n// user = 'unknown'; worldURL = 'welcome.html'\n// function getEdgesForNode(user, worldURL) {\n//     nodes = Object.values(this.graph.nodes);\n//     mask = nodes.pluck('label').map(function(label) {\n//         var parts = label.split('\\n'); return parts[0] === user && parts[1] === worldURL;\n//     })\n    \n\n//     function showNode(node) {\n//         show(self.getPositionInWorld().addPt(pt(node.left,node.top)))\n//         show(self.getPositionInWorld().addPt(pt(node.x,node.y)))\n//     }\n//     nodes.mask(mask).forEach(showNode);\n    \n// }\n        \n\n    var self = this;\n\n    if (!self.graph) {\n\n        Functions.composeAsync(\n            getData,\n            createRenderState,\n            getNodesAndEdgesFromRenderState,\n            initEdgesAndNodes,\n            function(data, next) { createVisGraphForMorph(self, data, next); }\n        )(function(graph, err) {\n            if (err) { show(err); return; }\n            alertOK(\"graph created\");\n        });\n\n    } else {\n    \n        Functions.composeAsync(\n            indicateUpdate,\n            getData,\n            createRenderState,\n            getNodesAndEdgesFromRenderState,\n            function(newNodesAndEdges, next) { updateDataSets(self.data, newNodesAndEdges, next); },\n            indicateUpdateDone\n        )(function(err) {\n            if (err) { show(err); return; }\n            \n            ;(function tryRedraw(redrawAttempts) {\n                try { self.graph.redraw(); } catch (e) {\n                    show('error redrawing, trying again');\n                    if (redrawAttempts < 5) tryRedraw.curry(redrawAttempts+1).delay(.2);\n                }\n            })(0);\n            \n        });\n\n    }\n    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n    function indicateUpdate(next) { self.getMorphNamed(\"updateDot\").setVisible(true); next(); }\n    function indicateUpdateDone(next) { self.getMorphNamed(\"updateDot\").setVisible(false); next(); }\n\n    function createVisGraphForMorph(morph, data, thenDo) {\n        morph.jQuery().html(\"\");\n\n        var container = morph.jQuery()[0];\n        var options = {\n            // physics: {\n            //     repulsion: {\n            //         centralGravity: 0.1,\n            //         springLength: 50,\n            //         springConstant: 0.05,\n            //         nodeDistance: 100,\n            //         damping: 0.09\n            //     },\n            // },\n            stabilize: false,   // stabilize positions before displaying\n            nodes: {\n              fontColor: Color.black.toCSSString()\n            },\n            edges: {\n              color: Color.gray.toCSSString()\n            },\n        };\n    \n        morph.data = data;\n        morph.graph = new vis.Graph(container, data, options);\n\n        thenDo && thenDo(null, morph.graph);\n\n        morph.graph.on(\"stabilized\", function() { })\n        morph.graph.on(\"viewChanged\", function() { })\n        \n    }\n    \n    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n    function updateDataSets(data, newNodesAndEdges, thenDo) {\n        var existingIds = data.nodes.getIds();\n        var currentIds = newNodesAndEdges.nodes.pluck('id')\n        var nodesToRemove = existingIds.withoutAll(currentIds);\n\n        nodesToRemove.forEach(function(id) { data.nodes.remove(id) });\n        newNodesAndEdges.nodes.forEach(function(node) { data.nodes.update(node) });\n        \n        // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n        var existingEdges = data.edges.getIds().map(function(id) {\n            return { id: id, edge: data.edges.get(id) }\n        })\n    \n        newNodesAndEdges.edges.forEach(function(edge) {\n            var existing = existingEdges.detect(function(existingEdge) {\n                return existingEdge.edge.from === edge.from && existingEdge.edge.to === edge.to;\n            });\n            if (existing) {\n                edge.id = existing.id;\n                data.edges.update(edge);\n            } else {\n                data.edges.add(edge);\n            }\n        });\n\n        existingEdges.forEach(function(edge) {\n            var existsInNewEdges = newNodesAndEdges.edges.detect(function(newEdge) {\n                return newEdge.from === edge.edge.from && newEdge.to === edge.edge.to;\n            });\n            if (existsInNewEdges) return;\n            data.edges.remove(edge.id);\n        });\n        \n        thenDo(null);\n    }\n\n    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n    function initEdgesAndNodes(edgesAndNodes, thenDo) {\n        // DataSet can sync changes later on, cool!\n        var edges = new vis.DataSet();\n        edges.add(edgesAndNodes.edges);\n        var nodes = new vis.DataSet();\n        nodes.add(edgesAndNodes.nodes);\n        var d = {edges: edges, nodes: nodes};\n        thenDo && thenDo(null, d);\n    }\n    \n    function getData(thenDo) {\n        new URL(\"http://lively-web.org/nodejs/SessionTracker/topology\")\n            .asWebResource().beAsync().get()\n            .withJSONWhenDone(function(sessions, status) {\n                thenDo(status.isSuccess() ? null : status, sessions)\n            });\n    }\n    \n    function createRenderState(sessions, thenDo) {\n        \n        // 1. group into clients/trackers\n        var groupedSessions = sessions.groupByKey('type'),\n            clients = groupedSessions['client'],\n            trackers = groupedSessions['tracker'];\n        \n        // 2. group clients per tracker\n        var clientsPerTracker = clients.groupByKey('trackerId'),\n            clientsPerTrackerAndUser = clientsPerTracker.reduceGroups(function(clientsPerTrackerAndUser, tid, clients) {\n                return clientsPerTrackerAndUser.concat(clients.groupByKey('remoteAddress').toArray())\n            }, []);\n        \n        // 3. intermediate helper nodes that connect client groups with trackers\n        var clientTrackerConnectors = clientsPerTrackerAndUser.map(function(clients) {\n            return {\n                id: clients[0].trackerId + ':::' + clients[0].remoteAddress,\n                trackerId: clients[0].trackerId,\n                clientIds: clients.pluck('id'),\n                weights: clients.reduce(function(weights, client) {\n                    weights[client.id] = weightOfClient(client);\n                    return weights;\n                }, {})\n            }\n            \n            // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n            function weightOfClient(client) {\n                var timeDelta = Date.now() - Math.max(client.lastActivity)\n                if (isNaN(timeDelta)) return 0;\n                var ageInMinutes = timeDelta/(1000*60*60);\n                if (ageInMinutes < 0.5) return 5;\n                if (ageInMinutes < 3) return 4;\n                if (ageInMinutes < 5) return 3;\n                if (ageInMinutes < 8) return 2;\n                if (ageInMinutes < 15) return 1;\n                return 0;\n            }\n        });\n        \n        // 4. make a color function that colors each client group uniformly\n        // Global.clientTrackerConnectors=clientTrackerConnectors;\n\n        function createColorId(client) {\n            return client.user + ':::' + client.remoteAddress + ':::' + client.trackerId;\n        }\n\n        var colorIds = clientsPerTrackerAndUser.pluck([0]).map(createColorId);\n\n        var colorForClientGroup = d3.scale.ordinal()\n                  .domain(colorIds)\n                  .range([\"#8dd3c7\",\"#ffffb3\",\"#bebada\",\"#fb8072\",\"#80b1d3\",\"#fdb462\",\"#b3de69\", \"#fccde5\"])\n\n        function colorForClient(client) { return colorForClientGroup(createColorId(client)); }\n        \n        thenDo(null, {\n            trackers: trackers,\n            clients: clients,\n            clientTrackerConnectors: clientTrackerConnectors,\n            colorForClient: colorForClient\n        });\n    \n    }\n    \n    // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n    \n    function getNodesAndEdgesFromRenderState(renderState, thenDo) {\n        var nodes = [], edges = [];\n    \n        // 1. add nodes for all trackers\n        nodes.pushAll(renderState.trackers.map(function(t, i) {\n            return {\n                id: t.id, mass: 20, shape: 'box',\n                label: t.local ? 'lively-web.org' : t.remoteAddress,\n                color: { 'background': \"lightGray\", 'border': \"gray\", }, fontSize: 26 };\n        }));\n    \n        // 2. add nodes for all clients\n        nodes.pushAll(renderState.clients.map(function(c) {\n            return {\n                id: c.id,\n                label: c.user + '\\n' + c.worldURL.split('/').last(),\n                group: c.remoteAddress,\n                fontSize: 9, color: renderState.colorForClient(c)\n            }\n        }))\n    \n        // 3. for each client-tracker-connector add another helper node\n        // also color client nodes\n        renderState.clientTrackerConnectors.forEach(function(con) {\n            nodes.push({id: con.id, label: '', shape: 'dot', color: 'lightgray'});\n        });\n    \n        // 4. create edges for clients\n        edges.pushAll(renderState.clientTrackerConnectors.reduce(function(all, con) {\n            return all.concat(con.clientIds.map(function(id) { return {from: id, to: con.id, width: con.weights[id]}; }))\n        }, []));\n    \n        // 5. create edge from client-tracker-connector to tracker\n// var weightsDebug = ''\n        edges.pushAll(renderState.clientTrackerConnectors.map(function(con) {\n// weightsDebug += Strings.format(\"\\n\\n%s\\n%s\", Math.min(8, Object.values(con.weights).sum()), Object.values(con.weights).join(','));\n             return {to: con.trackerId, from: con.id, width: Math.min(8, Object.values(con.weights).sum())}; \n        }));\n// $world.addCodeEditor({content: weightsDebug, textMode: 'text'});\n    \n        // 6. create edges between trackers\n        var localTracker = renderState.trackers.detect(function(ea) { return !!ea.local; });\n        if (localTracker) {\n            edges.pushAll(renderState.trackers.without(localTracker).map(function(t, i) {\n                return {from: t.id, to: localTracker.id, color: 'lightgray'};\n            }));\n        }\n    \n        thenDo(null, {nodes: nodes, edges: edges});\n    }\n\n}","funcProperties":{"__isSmartRef__":true,"id":87},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"86":{"this":{"__isSmartRef__":true,"id":41}},"87":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Jun 17 2014 17:48:51 GMT-0700 (Pacific Daylight Time)\")"},"88":{"varMapping":{"__isSmartRef__":true,"id":89},"source":"function setExtent(ext) {\n    $super(ext);\n    Functions.debounceNamed(this.id + '-setExtent', 1000, function(self) {\n        self.reset();\n        (function() { self.render(); }).delay(0);\n    })(this);\n}","funcProperties":{"__isSmartRef__":true,"id":94},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"89":{"this":{"__isSmartRef__":true,"id":41},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":90}},"90":{"$super":{"__isSmartRef__":true,"id":91}},"91":{"varMapping":{"__isSmartRef__":true,"id":92},"source":"function () {\n                try {\n                    // FIXME super is supposed to be static\n                    return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n                } catch (e) {\n                    if ($world)\n                        $world.logError(e, 'Error in $super call')\n                    else\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                    return null;\n                }\n            }","funcProperties":{"__isSmartRef__":true,"id":93},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"92":{"obj":{"__isSmartRef__":true,"id":41},"name":"setExtent"},"93":{},"94":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sun Jun 15 2014 20:50:53 GMT-0700 (Pacific Daylight Time)\")"},"95":{"varMapping":{"__isSmartRef__":true,"id":96},"source":"function update() {\n    this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":97},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"96":{"this":{"__isSmartRef__":true,"id":41}},"97":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Sun Jun 15 2014 19:46:49 GMT-0700 (Pacific Daylight Time)\")"},"98":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":99},"_ClipMode":"visible","derivationIds":["477F534A-22CA-4BEB-AAF3-65B00CAA5394"],"id":"61179991-41C1-40F1-B227-557DE7FEED5E","__layered_droppingEnabled__":true,"halosEnabled":true,"type":"corner","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle corner"],"layout":{"__isSmartRef__":true,"id":100},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":101},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(639.0,336.0)"},"99":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(14.0,14.0)","_Padding":"lively.rect(0,0,0,0)"},"100":{"moveVertical":true,"moveHorizontal":true},"101":{"morph":{"__isSmartRef__":true,"id":98},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"102":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":103},"_ClipMode":"visible","derivationIds":["F00F8A7D-EC9E-4693-927B-FA5C6D070F59"],"id":"131E69BC-B517-48C3-945A-480270923B00","__layered_droppingEnabled__":true,"halosEnabled":true,"type":"bottom","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle bottom"],"layout":{"__isSmartRef__":true,"id":104},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":105},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(0.0,347.0)"},"103":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(639.0,3.0)","_Padding":"lively.rect(0,0,0,0)"},"104":{"moveVertical":true},"105":{"morph":{"__isSmartRef__":true,"id":102},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"106":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":107},"_ClipMode":"visible","derivationIds":["CBC0357A-60D4-49BE-A8A5-099EC60CD3D4"],"id":"48915E77-4A30-489F-8B8C-77D56C4C3CEC","__layered_droppingEnabled__":true,"halosEnabled":true,"type":"right","_StyleClassNames":["Morph","Box","ReframeHandle","reframe-handle right"],"layout":{"__isSmartRef__":true,"id":108},"owner":{"__isSmartRef__":true,"id":0},"eventHandler":{"__isSmartRef__":true,"id":109},"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.ReframeHandle","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(650.0,0.0)"},"107":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(3.0,336.0)","_Padding":"lively.rect(0,0,0,0)"},"108":{"moveHorizontal":true},"109":{"morph":{"__isSmartRef__":true,"id":106},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"110":{"_BorderWidth":0,"_BorderColor":null,"_Fill":null,"_StrokeOpacity":false,"_BorderRadius":false,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Padding","_Extent"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Padding":"lively.rect(0,0,0,0)","_Extent":"lively.pt(653.0,350.0)"},"111":{"adjustForNewBounds":true},"112":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"113":{"partName":"NetworkChart","requiredModules":[],"partsSpaceName":"PartsBin/Charlie/","comment":"no comment","changes":[{"__isSmartRef__":true,"id":114},{"__isSmartRef__":true,"id":115},{"__isSmartRef__":true,"id":116},{"__isSmartRef__":true,"id":117}],"migrationLevel":8,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Mon Sep 29 2014 18:15:55 GMT-0700 (Pacific Daylight Time)\")"},"114":{"author":"cmagnuso","message":"no comment","id":"562372AF-9E3E-454A-9407-00F045BA5E86","__serializedExpressions__":["date"],"date":"new Date(\"Mon Sep 29 2014 18:15:49 GMT-0700 (Pacific Daylight Time)\")"},"115":{"author":"robertkrahn","message":"no comment","id":"2C3083B5-AEBA-4315-9796-CFCA7DD0AA99","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:18:03 GMT-0700 (Pacific Daylight Time)\")"},"116":{"author":"robertkrahn","message":"no comment","id":"DA7483BC-7F0D-47A5-84B4-1D5C4D84A365","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:11:03 GMT-0700 (Pacific Daylight Time)\")"},"117":{"__serializedExpressions__":["date"],"author":"cmagnuso","message":"no comment","id":"2E25F1FA-F48B-45B4-9B61-82FA0A2FC9D6","date":"new Date(\"Mon Sep 29 2014 18:22:30 GMT-0700 (Pacific Daylight Time)\")"},"isSimplifiedRegistry":true}}