.fire --> .runScript) with value false:\nTypeError: Object has no method 'draw'\nTypeError: Object has no method 'draw'\n at Box.render (eval at (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:13316:29))\n at Box.runScript (eval at (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:13316:29))\n at http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:14936:19\n at AttributeConnection.update (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:14947:5)\n at Namespace.signal (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:15252:45)\n at Button.setValue (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:31607:51)\n at Button.onMouseUp (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:31635:18)\n at Button.onMouseUpEntry (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:30338:21)\n at EventHandler.handleEvent (http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?db6cea4b818ceee29e04cf9eca6643db:29784:64)\n at HTMLDivElement.bound (http://lively-kernel.org/repository/webwerkstatt/core/lively/bootstrap.js:850:37)","__layered_draggingEnabled__":true,"_Scale":1,"renderContextTable":{"__isSmartRef__":true,"id":514},"eventHandler":{"__isSmartRef__":true,"id":515},"eventStartPos":{"__isSmartRef__":true,"id":516},"worldMenuOpened":true,"prevScroll":[0,-1080],"attributeConnections":[{"__isSmartRef__":true,"id":517}],"doNotSerialize":["$$savedWorldAsURL"],"doNotCopyProperties":["$$savedWorldAsURL"],"draggingEnabled":true,"clickedOnMorphTime":1329201522576,"_Scroll":[0,-1080],"savedWorldAsURL":{"__isSmartRef__":true,"id":522},"__LivelyClassName__":"lively.morphic.World"},"1":{"submorphs":[],"scripts":[],"id":"DBC5988E-3C47-4435-8F45-3BE816386996","shape":{"__isSmartRef__":true,"id":2},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"fixedHeight":false,"allowsInput":true,"_FontFamily":"Arial, sans-serif","registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":8},"_MaxTextWidth":476,"_MaxTextHeight":null,"textColor":{"__isSmartRef__":true,"id":5},"showsHalos":false,"_FontSize":14,"__SourceModuleName__":"Global.lively.morphic.TextCore","name":"Text","partsBinMetaInfo":{"__isSmartRef__":true,"id":9},"textChunks":[{"__isSmartRef__":true,"id":10}],"charsReplaced":"New World Starter","lastFindLoc":17,"priorSelectionRange":[1,1],"prevScroll":[0,0],"priorExtent":{"__isSmartRef__":true,"id":12},"renderContextTable":{"__isSmartRef__":true,"id":13},"eventHandler":{"__isSmartRef__":true,"id":14},"attributeConnections":[],"doNotSerialize":[],"doNotCopyProperties":[],"_Padding":{"__isSmartRef__":true,"id":15},"_ClipMode":"visible","derivationIds":[355],"_WhiteSpaceHandling":"pre-wrap","owner":{"__isSmartRef__":true,"id":0},"_MinTextWidth":476,"_MinTextHeight":null,"_Rotation":0,"_Scale":1.002003004005006,"isBeingDragged":false,"previousSelection":[11,11],"__LivelyClassName__":"lively.morphic.Text"},"2":{"fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":3},"_Extent":{"__isSmartRef__":true,"id":4},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":5},"renderContextTable":{"__isSmartRef__":true,"id":6},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":7},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"3":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"4":{"x":476,"y":22,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"5":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"6":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"7":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"8":{"x":45,"y":16,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"9":{"partsSpaceName":"PartsBin/Basic","__SourceModuleName__":"Global.lively.PartsBin","migrationLevel":4,"comment":"a simple text morph","partName":"Text","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"10":{"style":{"__isSmartRef__":true,"id":11},"chunkOwner":{"__isSmartRef__":true,"id":1},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"D3 test","__LivelyClassName__":"lively.morphic.TextChunk"},"11":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"12":{"x":476,"y":22,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"13":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"14":{"morph":{"__isSmartRef__":true,"id":1},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"15":{"x":5,"y":5,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"16":{"submorphs":[{"__isSmartRef__":true,"id":17},{"__isSmartRef__":true,"id":100}],"scripts":[],"shape":{"__isSmartRef__":true,"id":248},"derivationIds":[null],"id":"776F2C3B-C57F-4ED5-9382-D81267684AB5","renderContextTable":{"__isSmartRef__":true,"id":252},"eventHandler":{"__isSmartRef__":true,"id":253},"droppingEnabled":true,"halosEnabled":true,"draggingEnabled":true,"layout":{"__isSmartRef__":true,"id":254},"LK2":true,"_Position":{"__isSmartRef__":true,"id":255},"priorExtent":{"__isSmartRef__":true,"id":256},"targetMorph":{"__isSmartRef__":true,"id":17},"titleBar":{"__isSmartRef__":true,"id":100},"contentOffset":{"__isSmartRef__":true,"id":97},"collapsedTransform":null,"collapsedExtent":null,"expandedTransform":null,"expandedExtent":null,"ignoreEventsOnExpand":false,"owner":{"__isSmartRef__":true,"id":0},"highlighted":true,"_Rotation":0,"_Scale":1,"prevDragPos":{"__isSmartRef__":true,"id":257},"isBeingDragged":false,"showsHalos":false,"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.Window","withoutLayers":["Global.lively.morphic.GrabbingLayer"]},"17":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":18},"derivationIds":[null],"id":"E58255B6-5E05-47D4-8CFA-3C91C149A19F","renderContextTable":{"__isSmartRef__":true,"id":25},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":26},{"__isSmartRef__":true,"id":28},{"__isSmartRef__":true,"id":30},{"__isSmartRef__":true,"id":32},{"__isSmartRef__":true,"id":34},{"__isSmartRef__":true,"id":36},{"__isSmartRef__":true,"id":38},{"__isSmartRef__":true,"id":40},{"__isSmartRef__":true,"id":42},{"__isSmartRef__":true,"id":44},{"__isSmartRef__":true,"id":46},{"__isSmartRef__":true,"id":48},{"__isSmartRef__":true,"id":50},{"__isSmartRef__":true,"id":52},{"__isSmartRef__":true,"id":54},{"__isSmartRef__":true,"id":56},{"__isSmartRef__":true,"id":58},{"__isSmartRef__":true,"id":60},{"__isSmartRef__":true,"id":62},{"__isSmartRef__":true,"id":64},{"__isSmartRef__":true,"id":66},{"__isSmartRef__":true,"id":68},{"__isSmartRef__":true,"id":70},{"__isSmartRef__":true,"id":72},{"__isSmartRef__":true,"id":74},{"__isSmartRef__":true,"id":76},{"__isSmartRef__":true,"id":78},{"__isSmartRef__":true,"id":80},{"__isSmartRef__":true,"id":82},{"__isSmartRef__":true,"id":84},{"__isSmartRef__":true,"id":86},{"__isSmartRef__":true,"id":88},{"__isSmartRef__":true,"id":90},{"__isSmartRef__":true,"id":92},{"__isSmartRef__":true,"id":94}],"eventHandler":{"__isSmartRef__":true,"id":96},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"auto","fixedWidth":true,"fixedHeight":true,"allowInput":true,"_FontFamily":"Helvetica","_FontSize":10,"_Position":{"__isSmartRef__":true,"id":97},"priorExtent":{"__isSmartRef__":true,"id":98},"_MaxTextWidth":618,"_MinTextWidth":618,"_MaxTextHeight":null,"_MinTextHeight":null,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":16},"layout":{"__isSmartRef__":true,"id":99},"showsHalos":false,"previousSelection":[131970,131970],"priorSelectionRange":[132263,132263],"isBeingDragged":false,"charsReplaced":"","lastFindLoc":132264,"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"18":{"_Position":{"__isSmartRef__":true,"id":19},"renderContextTable":{"__isSmartRef__":true,"id":20},"_Extent":{"__isSmartRef__":true,"id":21},"_ClipMode":"auto","_Padding":{"__isSmartRef__":true,"id":22},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":23},"_Fill":{"__isSmartRef__":true,"id":24},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"19":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"20":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"21":{"x":640,"y":684,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"22":{"x":4,"y":2,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"23":{"r":0.372,"g":0.369,"b":0.372,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"24":{"r":0.95,"g":0.95,"b":0.95,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"25":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"26":{"style":{"__isSmartRef__":true,"id":27},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"// copied from from d3 examples\n\n(function(){if (!Date.now) Date.now = function() {\n return +new Date;\n};\ntry {\n document.createElement(\"div\").style.setProperty(\"opacity\", 0, \"\");\n} catch (error) {\n var d3_style_prototype = CSSStyleDeclaration.prototype,\n d3_style_setProperty = d3_style_prototype.setProperty;\n d3_style_prototype.setProperty = function(name, value, priority) {\n d3_style_setProperty.call(this, name, value + \"\", priority);\n };\n}\nd3 = {version: \"2.7.4\"}; // semver\nvar d3_array = d3_arraySlice; // conversion for NodeLists\n\nfunction d3_arrayCopy(pseudoarray) {\n var i = -1, n = pseudoarray.length, array = [];\n while (++i < n) array.push(pseudoarray[i]);\n return array;\n}\n\nfunction d3_arraySlice(pseudoarray) {\n return Array.prototype.slice.call(pseudoarray);\n}\n\ntry {\n d3_array(document.documentElement.childNodes)[0].nodeType;\n} catch(e) {\n d3_array = d3_arrayCopy;\n}\n\nvar d3_arraySubclass = [].__proto__?\n\n// Until ECMAScript supports array subclassing, prototype injection works well.\nfunction(array, prototype) {\n array.__proto__ = prototype;\n}:\n\n// And if your browser doesn't support __proto__, we'll use direct extension.\nfunction(array, prototype) {\n for (var property in prototype) array[property] = prototype[property];\n};\nfunction d3_this() {\n return this;\n}\nd3.functor = function(v) {\n return typeof v === \"function\" ? v : function() { return v; };\n};\n// Copies a variable number of methods from source to target.\nd3.rebind = function(target, source) {\n var i = 1, n = arguments.length, method;\n while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);\n return target;\n};\n\n// Method is assumed to be a standard D3 getter-setter:\n// If passed with no arguments, gets the value.\n// If passed with arguments, sets the value and returns the target.\nfunction d3_rebind(target, source, method) {\n return function() {\n var value = method.apply(source, arguments);\n return arguments.length ? target : value;\n };\n}\nd3.ascending = function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n};\nd3.descending = function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n};\nd3.mean = function(array, f) {\n var n = array.length,\n a,\n m = 0,\n i = -1,\n j = 0;\n if (arguments.length === 1) {\n while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;\n } else {\n while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;\n }\n return j ? m : undefined;\n};\nd3.median = function(array, f) {\n if (arguments.length > 1) array = array.map(f);\n array = array.filter(d3_number);\n return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;\n};\nd3.min = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b;\n if (arguments.length === 1) {\n while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;\n while (++i < n) if ((b = array[i]) != null && a > b) a = b;\n } else {\n while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;\n }\n return a;\n};\nd3.max = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b;\n if (arguments.length === 1) {\n while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;\n while (++i < n) if ((b = array[i]) != null && b > a) a = b;\n } else {\n while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;\n }\n return a;\n};\nd3.extent = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b,\n c;\n if (arguments.length === 1) {\n while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;\n while (++i < n) if ((b = array[i]) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n } else {\n while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n }\n return [a, c];\n};\nd3.random = {\n normal: function(mean, deviation) {\n if (arguments.length < 2) deviation = 1;\n if (arguments.length < 1) mean = 0;\n return function() {\n var x, y, r;\n do {\n x = Math.random() * 2 - 1;\n y = Math.random() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n return mean + deviation * x * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n};\nfunction d3_number(x) {\n return x != null && !isNaN(x);\n}\nd3.sum = function(array, f) {\n var s = 0,\n n = array.length,\n a,\n i = -1;\n\n if (arguments.length === 1) {\n while (++i < n) if (!isNaN(a = +array[i])) s += a;\n } else {\n while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;\n }\n\n return s;\n};\n// R-7 per \nd3.quantile = function(values, p) {\n var H = (values.length - 1) * p + 1,\n h = Math.floor(H),\n v = values[h - 1],\n e = H - h;\n return e ? v + e * (values[h] - v) : v;\n};\nd3.transpose = function(matrix) {\n return d3.zip.apply(d3, matrix);\n};\nd3.zip = function() {\n if (!(n = arguments.length)) return [];\n for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m;) {\n for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n;) {\n zip[j] = arguments[j][i];\n }\n }\n return zips;\n};\n\nfunction d3_zipLength(d) {\n return d.length;\n}\n// Locate the insertion point for x in a to maintain sorted order. The\n// arguments lo and hi may be used to specify a subset of the array which should\n// be considered; by default the entire array is used. If x is already present\n// in a, the insertion point will be before (to the left of) any existing\n// entries. The return value is suitable for use as the first argument to\n// `array.splice` assuming that a is already sorted.\n//\n// The returned insertion point i partitions the array a into two halves so that\n// all v < x for v in a[lo:i] for the left side and all v >= x for v in a[i:hi]\n// for the right side.\nd3.bisectLeft = function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = (lo + hi) >> 1;\n if (a[mid] < x) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n};\n\n// Similar to bisectLeft, but returns an insertion point which comes after (to\n// the right of) any existing entries of x in a.\n//\n// The returned insertion point i partitions the array into two halves so that\n// all v <= x for v in a[lo:i] for the left side and all v > x for v in a[i:hi]\n// for the right side.\nd3.bisect =\nd3.bisectRight = function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = (lo + hi) >> 1;\n if (x < a[mid]) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n};\nd3.first = function(array, f) {\n var i = 0,\n n = array.length,\n a = array[0],\n b;\n if (arguments.length === 1) f = d3.ascending;\n while (++i < n) {\n if (f.call(array, a, b = array[i]) > 0) {\n a = b;\n }\n }\n return a;\n};\nd3.last = function(array, f) {\n var i = 0,\n n = array.length,\n a = array[0],\n b;\n if (arguments.length === 1) f = d3.ascending;\n while (++i < n) {\n if (f.call(array, a, b = array[i]) <= 0) {\n a = b;\n }\n }\n return a;\n};\nd3.nest = function() {\n var nest = {},\n keys = [],\n sortKeys = [],\n sortValues,\n rollup;\n\n function map(array, depth) {\n if (depth >= keys.length) return rollup\n ? rollup.call(nest, array) : (sortValues\n ? array.sort(sortValues)\n : array);\n\n var i = -1,\n n = array.length,\n key = keys[depth++],\n keyValue,\n object,\n o = {};\n\n while (++i < n) {\n if ((keyValue = key(object = array[i])) in o) {\n o[keyValue].push(object);\n } else {\n o[keyValue] = [object];\n }\n }\n\n for (keyValue in o) {\n o[keyValue] = map(o[keyValue], depth);\n }\n\n return o;\n }\n\n function entries(map, depth) {\n if (depth >= keys.length) return map;\n\n var a = [],\n sortKey = sortKeys[depth++],\n key;\n\n for (key in map) {\n a.push({key: key, values: entries(map[key], depth)});\n }\n\n if (sortKey) a.sort(function(a, b) {\n return sortKey(a.key, b.key);\n });\n\n return a;\n }\n\n nest.map = function(array) {\n return map(array, 0);\n };\n\n nest.entries = function(array) {\n return entries(map(array, 0), 0);\n };\n\n nest.key = function(d) {\n keys.push(d);\n return nest;\n };\n\n // Specifies the order for the most-recently specified key.\n // Note: only applies to entries. Map keys are unordered!\n nest.sortKeys = function(order) {\n sortKeys[keys.length - 1] = order;\n return nest;\n };\n\n // Specifies the order for leaf values.\n // Applies to both maps and entries array.\n nest.sortValues = function(order) {\n sortValues = order;\n return nest;\n };\n\n nest.rollup = function(f) {\n rollup = f;\n return nest;\n };\n\n return nest;\n};\nd3.keys = function(map) {\n var keys = [];\n for (var key in map) keys.push(key);\n return keys;\n};\nd3.values = function(map) {\n var values = [];\n for (var key in map) values.push(map[key]);\n return values;\n};\nd3.entries = function(map) {\n var entries = [];\n for (var key in map) entries.push({key: key, value: map[key]});\n return entries;\n};\nd3.permute = function(array, indexes) {\n var permutes = [],\n i = -1,\n n = indexes.length;\n while (++i < n) permutes[i] = array[indexes[i]];\n return permutes;\n};\nd3.merge = function(arrays) {\n return Array.prototype.concat.apply([], arrays);\n};\nd3.split = function(array, f) {\n var arrays = [],\n values = [],\n value,\n i = -1,\n n = array.length;\n if (arguments.length < 2) f = d3_splitter;\n while (++i < n) {\n if (f.call(values, value = array[i], i)) {\n values = [];\n } else {\n if (!values.length) arrays.push(values);\n values.push(value);\n }\n }\n return arrays;\n};\n\nfunction d3_splitter(d) {\n return d == null;\n}\nfunction d3_collapse(s) {\n return s.replace(/(^\\s+)|(\\s+$)/g, \"\").replace(/\\s+/g, \" \");\n}\n/**\n * @param {number} start\n * @param {number=} stop\n * @param {number=} step\n */\nd3.range = function(start, stop, step) {\n if (arguments.length < 3) {\n step = 1;\n if (arguments.length < 2) {\n stop = start;\n start = 0;\n }\n }\n if ((stop - start) / step == Infinity) throw new Error(\"infinite range\");\n var range = [],\n i = -1,\n j;\n if (step < 0) while ((j = start + step * ++i) > stop) range.push(j);\n else while ((j = start + step * ++i) < stop) range.push(j);\n return range;\n};\nd3.requote = function(s) {\n return s.replace(d3_requote_re, \"\\\\$&\");\n};\n\nvar d3_requote_re = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\nd3.round = function(x, n) {\n return n\n ? Math.round(x * (n = Math.pow(10, n))) / n\n : Math.round(x);\n};\nd3.xhr = function(url, mime, callback) {\n var req = new XMLHttpRequest;\n if (arguments.length < 3) callback = mime, mime = null;\n else if (mime && req.overrideMimeType) req.overrideMimeType(mime);\n req.open(\"GET\", url, true);\n if (mime) req.setRequestHeader(\"Accept\", mime);\n req.onreadystatechange = function() {\n if (req.readyState === 4) callback(req.status < 300 ? req : null);\n };\n req.send(null);\n};\nd3.text = function(url, mime, callback) {\n function ready(req) {\n callback(req && req.responseText);\n }\n if (arguments.length < 3) {\n callback = mime;\n mime = null;\n }\n d3.xhr(url, mime, ready);\n};\nd3.json = function(url, callback) {\n d3.text(url, \"application/json\", function(text) {\n callback(text ? JSON.parse(text) : null);\n });\n};\nd3.html = function(url, callback) {\n d3.text(url, \"text/html\", function(text) {\n if (text != null) { // Treat empty string as valid HTML.\n var range = document.createRange();\n range.selectNode(document.body);\n text = range.createContextualFragment(text);\n }\n callback(text);\n });\n};\nd3.xml = function(url, mime, callback) {\n function ready(req) {\n callback(req && req.responseXML);\n }\n if (arguments.length < 3) {\n callback = mime;\n mime = null;\n }\n d3.xhr(url, mime, ready);\n};\nvar d3_nsPrefix = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: \"http://www.w3.org/1999/xhtml\",\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n\nd3.ns = {\n prefix: d3_nsPrefix,\n qualify: function(name) {\n var i = name.indexOf(\":\");\n return i < 0 ? (name in d3_nsPrefix\n ? {space: d3_nsPrefix[name], local: name} : name)\n : {space: d3_nsPrefix[name.substring(0, i)], local: name.substring(i + 1)};\n }\n};\nd3.dispatch = function() {\n var dispatch = new d3_dispatch(),\n i = -1,\n n = arguments.length;\n while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n return dispatch;\n};\n\nfunction d3_dispatch() {}\n\nd3_dispatch.prototype.on = function(type, listener) {\n var i = type.indexOf(\".\"),\n name = \"\";\n\n // Extract optional namespace, e.g., \"click.foo\"\n if (i > 0) {\n name = type.substring(i + 1);\n type = type.substring(0, i);\n }\n\n return arguments.length < 2\n ? this[type].on(name)\n : this[type].on(name, listener);\n};\n\nfunction d3_dispatch_event(dispatch) {\n var listeners = [],\n listenerByName = {};\n\n function event() {\n var z = listeners, // defensive reference\n i = -1,\n n = z.length,\n l;\n while (++i < n) if (l = z[i].on) l.apply(this, arguments);\n return dispatch;\n }\n\n event.on = function(name, listener) {\n var l, i;\n\n // return the current listener, if any\n if (arguments.length < 2) return (l = listenerByName[name]) && l.on;\n\n // remove the old listener, if any (with copy-on-write)\n if (l = listenerByName[name]) {\n l.on = null;\n listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));\n delete listenerByName[name];\n }\n\n // add the new listener, if any\n if (listener) {\n listeners.push(listenerByName[name] = {on: listener});\n }\n\n return dispatch;\n };\n\n return event;\n};\n// TODO align\nd3.format = function(specifier) {\n var match = d3_format_re.exec(specifier),\n fill = match[1] || \" \",\n sign = match[3] || \"\",\n zfill = match[5],\n width = +match[6],\n comma = match[7],\n precision = match[8],\n type = match[9],\n scale = 1,\n suffix = \"\",\n integer = false;\n\n if (precision) precision = +precision.substring(1);\n\n if (zfill) {\n fill = \"0\"; // TODO align = \"=\";\n if (comma) width -= Math.floor((width - 1) / 4);\n }\n\n switch (type) {\n case \"n\": comma = true; type = \"g\"; break;\n case \"%\": scale = 100; suffix = \"%\"; type = \"f\"; break;\n case \"p\": scale = 100; suffix = \"%\"; type = \"r\"; break;\n case \"d\": integer = true; precision = 0; break;\n case \"s\": scale = -1; type = \"r\"; break;\n }\n\n // If no precision is specified for r, fallback to general notation.\n if (type == \"r\" && !precision) type = \"g\";\n\n type = d3_format_types[type] || d3_format_typeDefault;\n\n return function(value) {\n\n // Return the empty string for floats formatted as ints.\n if (integer && (value % 1)) return \"\";\n\n // Convert negative to positive, and record the sign prefix.\n var negative = (value < 0) && (value = -value) ? \"\\u2212\" : sign;\n\n // Apply the scale, computing it from the value's exponent for si format.\n if (scale < 0) {\n var prefix = d3.formatPrefix(value, precision);\n value *= prefix.scale;\n suffix = prefix.symbol;\n } else {\n value *= scale;\n }\n\n // Convert to the desired precision.\n value = type(value, precision);\n\n // If the fill character is 0, the sign and group is applied after the fill.\n if (zfill) {\n var length = value.length + negative.length;\n if (length < width) value = new Array(width - length + 1).join(fill) + value;\n if (comma) value = d3_format_group(value);\n value = negative + value;\n }\n\n // Otherwise (e.g., space-filling), the sign and group is applied before.\n else {\n if (comma) value = d3_format_group(value);\n value = negative + value;\n var length = value.length;\n if (length < width) value = new Array(width - length + 1).join(fill) + value;\n }\n\n return value + suffix;\n };\n};\n\n// [[fill]align][sign][#][0][width][,][.precision][type]\nvar d3_format_re = /(?:([^{])?([<>=^]))?([+\\- ])?(#)?(0)?([0-9]+)?(,)?(\\.[0-9]+)?([a-zA-Z%])?/;\n\nvar d3_format_types = {\n g: function(x, p) { return x.toPrecision(p); },\n e: function(x, p) { return x.toExponential(p); },\n f: function(x, p) { return x.toFixed(p); },\n r: function(x, p) { return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p))); }\n};\n\nfunction d3_format_precision(x, p) {\n return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);\n}\n\nfunction d3_format_typeDefault(x) {\n return x + \"\";\n}\n\n// Apply comma grouping for thousands.\nfunction d3_format_group(value) {\n var i = value.lastIndexOf(\".\"),\n f = i >= 0 ? value.substring(i) : (i = value.length, \"\"),\n t = [];\n while (i > 0) t.push(value.substring(i -= 3, i + 3));\n return t.reverse().join(\",\") + f;\n}\nvar d3_formatPrefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"μ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(d3_formatPrefix);\n\nd3.formatPrefix = function(value, precision) {\n var i = 0;\n if (value) {\n if (value < 0) value *= -1;\n if (precision) value = d3.round(value, d3_format_precision(value, precision));\n i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);\n i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));\n }\n return d3_formatPrefixes[8 + i / 3];\n};\n\nfunction d3_formatPrefix(d, i) {\n return {\n scale: Math.pow(10, (8 - i) * 3),\n symbol: d\n };\n}\n\n/*\n * TERMS OF USE - EASING EQUATIONS\n *\n * Open source under the BSD License.\n *\n * Copyright 2001 Robert Penner\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * - Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * - Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * - Neither the name of the author nor the names of contributors may be used to\n * endorse or promote products derived from this software without specific\n * prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar d3_ease_quad = d3_ease_poly(2),\n d3_ease_cubic = d3_ease_poly(3);\n\nvar d3_ease = {\n linear: function() { return d3_ease_linear; },\n poly: d3_ease_poly,\n quad: function() { return d3_ease_quad; },\n cubic: function() { return d3_ease_cubic; },\n sin: function() { return d3_ease_sin; },\n exp: function() { return d3_ease_exp; },\n circle: function() { return d3_ease_circle; },\n elastic: d3_ease_elastic,\n back: d3_ease_back,\n bounce: function() { return d3_ease_bounce; }\n};\n\nvar d3_ease_mode = {\n \"in\": function(f) { return f; },\n \"out\": d3_ease_reverse,\n \"in-out\": d3_ease_reflect,\n \"out-in\": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }\n};\n\nd3.ease = function(name) {\n var i = name.indexOf(\"-\"),\n t = i >= 0 ? name.substring(0, i) : name,\n m = i >= 0 ? name.substring(i + 1) : \"in\";\n return d3_ease_clamp(d3_ease_mode[m](d3_ease[t].apply(null, Array.prototype.slice.call(arguments, 1))));\n};\n\nfunction d3_ease_clamp(f) {\n return function(t) {\n return t <= 0 ? 0 : t >= 1 ? 1 : f(t);\n };\n}\n\nfunction d3_ease_reverse(f) {\n return function(t) {\n return 1 - f(1 - t);\n };\n}\n\nfunction d3_ease_reflect(f) {\n return function(t) {\n return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));\n };\n}\n\nfunction d3_ease_linear(t) {\n return t;\n}\n\nfunction d3_ease_poly(e) {\n return function(t) {\n return Math.pow(t, e);\n }\n}\n\nfunction d3_ease_sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n}\n\nfunction d3_ease_exp(t) {\n return Math.pow(2, 10 * (t - 1));\n}\n\nfunction d3_ease_circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction d3_ease_elastic(a, p) {\n var s;\n if (arguments.length < 2) p = 0.45;\n if (arguments.length < 1) { a = 1; s = p / 4; }\n else s = p / (2 * Math.PI) * Math.asin(1 / a);\n return function(t) {\n return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);\n };\n}\n\nfunction d3_ease_back(s) {\n if (!s) s = 1.70158;\n return function(t) {\n return t * t * ((s + 1) * t - s);\n };\n}\n\nfunction d3_ease_bounce(t) {\n return t < 1 / 2.75 ? 7.5625 * t * t\n : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75\n : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375\n : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;\n}\nd3.event = null;\n\nfunction d3_eventCancel() {\n d3.event.stopPropagation();\n d3.event.preventDefault();\n}\nd3.interpolate = function(a, b) {\n var i = d3.interpolators.length, f;\n while (--i >= 0 && !(f = d3.interpolators[i](a, b)));\n return f;\n};\n\nd3.interpolateNumber = function(a, b) {\n b -= a;\n return function(t) { return a + b * t; };\n};\n\nd3.interpolateRound = function(a, b) {\n b -= a;\n return function(t) { return Math.round(a + b * t); };\n};\n\nd3.interpolateString = function(a, b) {\n var m, // current match\n i, // current index\n j, // current index (for coallescing)\n s0 = 0, // start index of current string prefix\n s1 = 0, // end index of current string prefix\n s = [], // string constants and placeholders\n q = [], // number interpolators\n n, // q.length\n o;\n\n // Reset our regular expression!\n d3_interpolate_number.lastIndex = 0;\n\n // Find all numbers in b.\n for (i = 0; m = d3_interpolate_number.exec(b); ++i) {\n if (m.index) s.push(b.substring(s0, s1 = m.index));\n q.push({i: s.length, x: m[0]});\n s.push(null);\n s0 = d3_interpolate_number.lastIndex;\n }\n if (s0 < b.length) s.push(b.substring(s0));\n\n // Find all numbers in a.\n for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {\n o = q[i];\n if (o.x == m[0]) { // The numbers match, so coallesce.\n if (o.i) {\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i - 1] += o.x;\n s.splice(o.i, 1);\n for (j = i + 1; j < n; ++j) q[j].i--;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i - 1] += o.x + s[o.i + 1];\n s.splice(o.i, 2);\n for (j = i + 1; j < n; ++j) q[j].i -= 2;\n }\n } else {\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i] = o.x;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i] = o.x + s[o.i + 1];\n s.splice(o.i + 1, 1);\n for (j = i + 1; j < n; ++j) q[j].i--;\n }\n }\n q.splice(i, 1);\n n--;\n i--;\n } else {\n o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));\n }\n }\n\n // Remove any numbers in b not found in a.\n while (i < n) {\n o = q.pop();\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i] = o.x;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i] = o.x + s[o.i + 1];\n s.splice(o.i + 1, 1);\n }\n n--;\n }\n\n // Special optimization for only a single match.\n if (s.length === 1) {\n return s[0] == null ? q[0].x : function() { return b; };\n }\n\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return function(t) {\n for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n};\n\nd3.interpolateTransform = function(a, b) {\n var s = [], // string constants and placeholders\n q = [], // number interpolators\n n,\n A = d3.transform(a),\n B = d3.transform(b),\n ta = A.translate,\n tb = B.translate,\n ra = A.rotate,\n rb = B.rotate,\n wa = A.skew,\n wb = B.skew,\n ka = A.scale,\n kb = B.scale;\n\n if (ta[0] != tb[0] || ta[1] != tb[1]) {\n s.push(\"translate(\", null, \",\", null, \")\");\n q.push({i: 1, x: d3.interpolateNumber(ta[0], tb[0])}, {i: 3, x: d3.interpolateNumber(ta[1], tb[1])});\n } else if (tb[0] || tb[1]) {\n s.push(\"translate(\" + tb + \")\");\n } else {\n s.push(\"\");\n }\n\n if (ra != rb) {\n q.push({i: s.push(s.pop() + \"rotate(\", null, \")\") - 2, x: d3.interpolateNumber(ra, rb)});\n } else if (rb) {\n s.push(s.pop() + \"rotate(\" + rb + \")\");\n }\n\n if (wa != wb) {\n q.push({i: s.push(s.pop() + \"skewX(\", null, \")\") - 2, x: d3.interpolateNumber(wa, wb)});\n } else if (wb) {\n s.push(s.pop() + \"skewX(\" + wb + \")\");\n }\n\n if (ka[0] != kb[0] || ka[1] != kb[1]) {\n n = s.push(s.pop() + \"scale(\", null, \",\", null, \")\");\n q.push({i: n - 4, x: d3.interpolateNumber(ka[0], kb[0])}, {i: n - 2, x: d3.interpolateNumber(ka[1], kb[1])});\n } else if (kb[0] != 1 || kb[1] != 1) {\n s.push(s.pop() + \"scale(\" + kb + \")\");\n }\n\n n = q.length;\n return function(t) {\n var i = -1, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n};\n\nd3.interpolateRgb = function(a, b) {\n a = d3.rgb(a);\n b = d3.rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return \"#\"\n + d3_rgb_hex(Math.round(ar + br * t))\n + d3_rgb_hex(Math.round(ag + bg * t))\n + d3_rgb_hex(Math.round(ab + bb * t));\n };\n};\n\n// interpolates HSL space, but outputs RGB string (for compatibility)\nd3.interpolateHsl = function(a, b) {\n a = d3.hsl(a);\n b = d3.hsl(b);\n var h0 = a.h,\n s0 = a.s,\n l0 = a.l,\n h1 = b.h - h0,\n s1 = b.s - s0,\n l1 = b.l - l0;\n return function(t) {\n return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString();\n };\n};\n\nd3.interpolateArray = function(a, b) {\n var x = [],\n c = [],\n na = a.length,\n nb = b.length,\n n0 = Math.min(a.length, b.length),\n i;\n for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));\n for (; i < na; ++i) c[i] = a[i];\n for (; i < nb; ++i) c[i] = b[i];\n return function(t) {\n for (i = 0; i < n0; ++i) c[i] = x[i](t);\n return c;\n };\n};\n\nd3.interpolateObject = function(a, b) {\n var i = {},\n c = {},\n k;\n for (k in a) {\n if (k in b) {\n i[k] = d3_interpolateByName(k)(a[k], b[k]);\n } else {\n c[k] = a[k];\n }\n }\n for (k in b) {\n if (!(k in a)) {\n c[k] = b[k];\n }\n }\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n\nvar d3_interpolate_number = /[-+]?(?:\\d*\\.?\\d+)(?:[eE][-+]?\\d+)?/g;\n\nfunction d3_interpolateByName(n) {\n return n == \"transform\"\n ? d3.interpolateTransform\n : d3.interpolate;\n}\n\nd3.interpolators = [\n d3.interpolateObject,\n function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },\n function(a, b) { return (typeof a === \"string\" || typeof b === \"string\") && d3.interpolateString(a + \"\", b + \"\"); },\n function(a, b) { return (typeof b === \"string\" ? b in d3_rgb_names || /^(#|rgb\\(|hsl\\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b); },\n function(a, b) { return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b); }\n];\nfunction d3_uninterpolateNumber(a, b) {\n b = b - (a = +a) ? 1 / (b - a) : 0;\n return function(x) { return (x - a) * b; };\n}\n\nfunction d3_uninterpolateClamp(a, b) {\n b = b - (a = +a) ? 1 / (b - a) : 0;\n return function(x) { return Math.max(0, Math.min(1, (x - a) * b)); };\n}\nd3.rgb = function(r, g, b) {\n return arguments.length === 1\n ? (r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b)\n : d3_rgb_parse(\"\" + r, d3_rgb, d3_hsl_rgb))\n : d3_rgb(~~r, ~~g, ~~b);\n};\n\nfunction d3_rgb(r, g, b) {\n return new d3_Rgb(r, g, b);\n}\n\nfunction d3_Rgb(r, g, b) {\n this.r = r;\n this.g = g;\n this.b = b;\n}\n\nd3_Rgb.prototype.brighter = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n var r = this.r,\n g = this.g,\n b = this.b,\n i = 30;\n if (!r && !g && !b) return d3_rgb(i, i, i);\n if (r && r < i) r = i;\n if (g && g < i) g = i;\n if (b && b < i) b = i;\n return d3_rgb(\n Math.min(255, Math.floor(r / k)),\n Math.min(255, Math.floor(g / k)),\n Math.min(255, Math.floor(b / k)));\n};\n\nd3_Rgb.prototype.darker = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_rgb(\n Math.floor(k * this.r),\n Math.floor(k * this.g),\n Math.floor(k * this.b));\n};\n\nd3_Rgb.prototype.hsl = function() {\n return d3_rgb_hsl(this.r, this.g, this.b);\n};\n\nd3_Rgb.prototype.toString = function() {\n return \"#\" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);\n};\n\nfunction d3_rgb_hex(v) {\n return v < 0x10\n ? \"0\" + Math.max(0, v).toString(16)\n : Math.min(255, v).toString(16);\n}\n\nfunction d3_rgb_parse(format, rgb, hsl) {\n var r = 0, // red channel; int in [0, 255]\n g = 0, // green channel; int in [0, 255]\n b = 0, // blue channel; int in [0, 255]\n m1, // CSS color specification match\n m2, // CSS color specification type (e.g., rgb)\n name;\n\n /* Handle hsl, rgb. */\n m1 = /([a-z]+)\\((.*)\\)/i.exec(format);\n if (m1) {\n m2 = m1[2].split(\",\");\n switch (m1[1]) {\n case \"hsl\": {\n return hsl(\n parseFloat(m2[0]), // degrees\n parseFloat(m2[1]) / 100, // percentage\n parseFloat(m2[2]) / 100 // percentage\n );\n }\n case \"rgb\": {\n return rgb(\n d3_rgb_parseNumber(m2[0]),\n d3_rgb_parseNumber(m2[1]),\n d3_rgb_parseNumber(m2[2])\n );\n }\n }\n }\n\n /* Named colors. */\n if (name = d3_rgb_names[format]) return rgb(name.r, name.g, name.b);\n\n /* Hexadecimal colors: #rgb and #rrggbb. */\n if (format != null && format.charAt(0) === \"#\") {\n if (format.length === 4) {\n r = format.charAt(1); r += r;\n g = format.charAt(2); g += g;\n b = format.charAt(3); b += b;\n } else if (format.length === 7) {\n r = format.substring(1, 3);\n g = format.substring(3, 5);\n b = format.substring(5, 7);\n }\n r = parseInt(r, 16);\n g = parseInt(g, 16);\n b = parseInt(b, 16);\n }\n\n return rgb(r, g, b);\n}\n\nfunction d3_rgb_hsl(r, g, b) {\n var min = Math.min(r /= 255, g /= 255, b /= 255),\n max = Math.max(r, g, b),\n d = max - min,\n h,\n s,\n l = (max + min) / 2;\n if (d) {\n s = l < .5 ? d / (max + min) : d / (2 - max - min);\n if (r == max) h = (g - b) / d + (g < b ? 6 : 0);\n else if (g == max) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n h *= 60;\n } else {\n s = h = 0;\n }\n return d3_hsl(h, s, l);\n}\n\nfunction d3_rgb_parseNumber(c) { // either integer or percentage\n var f = parseFloat(c);\n return c.charAt(c.length - 1) === \"%\" ? Math.round(f * 2.55) : f;\n}\n\nvar d3_rgb_names = {\n aliceblue: \"#f0f8ff\",\n antiquewhite: \"#faebd7\",\n aqua: \"#00ffff\",\n aquamarine: \"#7fffd4\",\n azure: \"#f0ffff\",\n beige: \"#f5f5dc\",\n bisque: \"#ffe4c4\",\n black: \"#000000\",\n blanchedalmond: \"#ffebcd\",\n blue: \"#0000ff\",\n blueviolet: \"#8a2be2\",\n brown: \"#a52a2a\",\n burlywood: \"#deb887\",\n cadetblue: \"#5f9ea0\",\n chartreuse: \"#7fff00\",\n chocolate: \"#d2691e\",\n coral: \"#ff7f50\",\n cornflowerblue: \"#6495ed\",\n cornsilk: \"#fff8dc\",\n crimson: \"#dc143c\",\n cyan: \"#00ffff\",\n darkblue: \"#00008b\",\n darkcyan: \"#008b8b\",\n darkgoldenrod: \"#b8860b\",\n darkgray: \"#a9a9a9\",\n darkgreen: \"#006400\",\n darkgrey: \"#a9a9a9\",\n darkkhaki: \"#bdb76b\",\n darkmagenta: \"#8b008b\",\n darkolivegreen: \"#556b2f\",\n darkorange: \"#ff8c00\",\n darkorchid: \"#9932cc\",\n darkred: \"#8b0000\",\n darksalmon: \"#e9967a\",\n darkseagreen: \"#8fbc8f\",\n darkslateblue: \"#483d8b\",\n darkslategray: \"#2f4f4f\",\n darkslategrey: \"#2f4f4f\",\n darkturquoise: \"#00ced1\",\n darkviolet: \"#9400d3\",\n deeppink: \"#ff1493\",\n deepskyblue: \"#00bfff\",\n dimgray: \"#696969\",\n dimgrey: \"#696969\",\n dodgerblue: \"#1e90ff\",\n firebrick: \"#b22222\",\n floralwhite: \"#fffaf0\",\n forestgreen: \"#228b22\",\n fuchsia: \"#ff00ff\",\n gainsboro: \"#dcdcdc\",\n ghostwhite: \"#f8f8ff\",\n gold: \"#ffd700\",\n goldenrod: \"#daa520\",\n gray: \"#808080\",\n green: \"#008000\",\n greenyellow: \"#adff2f\",\n grey: \"#808080\",\n honeydew: \"#f0fff0\",\n hotpink: \"#ff69b4\",\n indianred: \"#cd5c5c\",\n indigo: \"#4b0082\",\n ivory: \"#fffff0\",\n khaki: \"#f0e68c\",\n lavender: \"#e6e6fa\",\n lavenderblush: \"#fff0f5\",\n lawngreen: \"#7cfc00\",\n lemonchiffon: \"#fffacd\",\n lightblue: \"#add8e6\",\n lightcoral: \"#f08080\",\n lightcyan: \"#e0ffff\",\n lightgoldenrodyellow: \"#fafad2\",\n lightgray: \"#d3d3d3\",\n lightgreen: \"#90ee90\",\n lightgrey: \"#d3d3d3\",\n lightpink: \"#ffb6c1\",\n lightsalmon: \"#ffa07a\",\n lightseagreen: \"#20b2aa\",\n lightskyblue: \"#87cefa\",\n lightslategray: \"#778899\",\n lightslategrey: \"#778899\",\n lightsteelblue: \"#b0c4de\",\n lightyellow: \"#ffffe0\",\n lime: \"#00ff00\",\n limegreen: \"#32cd32\",\n linen: \"#faf0e6\",\n magenta: \"#ff00ff\",\n maroon: \"#800000\",\n mediumaquamarine: \"#66cdaa\",\n mediumblue: \"#0000cd\",\n mediumorchid: \"#ba55d3\",\n mediumpurple: \"#9370db\",\n mediumseagreen: \"#3cb371\",\n mediumslateblue: \"#7b68ee\",\n mediumspringgreen: \"#00fa9a\",\n mediumturquoise: \"#48d1cc\",\n mediumvioletred: \"#c71585\",\n midnightblue: \"#191970\",\n mintcream: \"#f5fffa\",\n mistyrose: \"#ffe4e1\",\n moccasin: \"#ffe4b5\",\n navajowhite: \"#ffdead\",\n navy: \"#000080\",\n oldlace: \"#fdf5e6\",\n olive: \"#808000\",\n olivedrab: \"#6b8e23\",\n orange: \"#ffa500\",\n orangered: \"#ff4500\",\n orchid: \"#da70d6\",\n palegoldenrod: \"#eee8aa\",\n palegreen: \"#98fb98\",\n paleturquoise: \"#afeeee\",\n palevioletred: \"#db7093\",\n papayawhip: \"#ffefd5\",\n peachpuff: \"#ffdab9\",\n peru: \"#cd853f\",\n pink: \"#ffc0cb\",\n plum: \"#dda0dd\",\n powderblue: \"#b0e0e6\",\n purple: \"#800080\",\n red: \"#ff0000\",\n rosybrown: \"#bc8f8f\",\n royalblue: \"#4169e1\",\n saddlebrown: \"#8b4513\",\n salmon: \"#fa8072\",\n sandybrown: \"#f4a460\",\n seagreen: \"#2e8b57\",\n seashell: \"#fff5ee\",\n sienna: \"#a0522d\",\n silver: \"#c0c0c0\",\n skyblue: \"#87ceeb\",\n slateblue: \"#6a5acd\",\n slategray: \"#708090\",\n slategrey: \"#708090\",\n snow: \"#fffafa\",\n springgreen: \"#00ff7f\",\n steelblue: \"#4682b4\",\n tan: \"#d2b48c\",\n teal: \"#008080\",\n thistle: \"#d8bfd8\",\n tomato: \"#ff6347\",\n turquoise: \"#40e0d0\",\n violet: \"#ee82ee\",\n wheat: \"#f5deb3\",\n white: \"#ffffff\",\n whitesmoke: \"#f5f5f5\",\n yellow: \"#ffff00\",\n yellowgreen: \"#9acd32\"\n};\n\nfor (var d3_rgb_name in d3_rgb_names) {\n d3_rgb_names[d3_rgb_name] = d3_rgb_parse(\n d3_rgb_names[d3_rgb_name],\n d3_rgb,\n d3_hsl_rgb);\n}\nd3.hsl = function(h, s, l) {\n return arguments.length === 1\n ? (h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l)\n : d3_rgb_parse(\"\" + h, d3_rgb_hsl, d3_hsl))\n : d3_hsl(+h, +s, +l);\n};\n\nfunction d3_hsl(h, s, l) {\n return new d3_Hsl(h, s, l);\n}\n\nfunction d3_Hsl(h, s, l) {\n this.h = h;\n this.s = s;\n this.l = l;\n}\n\nd3_Hsl.prototype.brighter = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_hsl(this.h, this.s, this.l / k);\n};\n\nd3_Hsl.prototype.darker = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_hsl(this.h, this.s, k * this.l);\n};\n\nd3_Hsl.prototype.rgb = function() {\n return d3_hsl_rgb(this.h, this.s, this.l);\n};\n\nd3_Hsl.prototype.toString = function() {\n return this.rgb().toString();\n};\n\nfunction d3_hsl_rgb(h, s, l) {\n var m1,\n m2;\n\n /* Some simple corrections for h, s and l. */\n h = h % 360; if (h < 0) h += 360;\n s = s < 0 ? 0 : s > 1 ? 1 : s;\n l = l < 0 ? 0 : l > 1 ? 1 : l;\n\n /* From FvD 13.37, CSS Color Module Level 3 */\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s;\n m1 = 2 * l - m2;\n\n function v(h) {\n if (h > 360) h -= 360;\n else if (h < 0) h += 360;\n if (h < 60) return m1 + (m2 - m1) * h / 60;\n if (h < 180) return m2;\n if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;\n return m1;\n }\n\n function vv(h) {\n return Math.round(v(h) * 255);\n }\n\n return d3_rgb(vv(h + 120), vv(h), vv(h - 120));\n}\nfunction d3_selection(groups) {\n d3_arraySubclass(groups, d3_selectionPrototype);\n return groups;\n}\n\nvar d3_select = function(s, n) { return n.querySelector(s); },\n d3_selectAll = function(s, n) { return n.querySelectorAll(s); },\n d3_selectRoot = document.documentElement,\n d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector,\n d3_selectMatches = function(n, s) { return d3_selectMatcher.call(n, s); };\n\n// Prefer Sizzle, if available.\nif (typeof Sizzle === \"function\") {\n d3_select = function(s, n) { return Sizzle(s, n)[0]; };\n d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); };\n d3_selectMatches = Sizzle.matchesSelector;\n}\n\nvar d3_selectionPrototype = [];\n\nd3.selection = function() {\n return d3_selectionRoot;\n};\n\nd3.selection.prototype = d3_selectionPrototype;\nd3_selectionPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n group,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selector(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroup.push(subnode = selector.call(node, node.__data__, i));\n if (subnode && \"__data__\" in node) subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_selector(selector) {\n return function() {\n return d3_select(selector, this);\n };\n}\nd3_selectionPrototype.selectAll = function(selector) {\n var subgroups = [],\n subgroup,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selectorAll(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));\n subgroup.parentNode = node;\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_selectorAll(selector) {\n return function() {\n return d3_selectAll(selector, this);\n };\n}\nd3_selectionPrototype.attr = function(name, value) {\n name = d3.ns.qualify(name);\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) {\n var node = this.node();\n return name.local\n ? node.getAttributeNS(name.space, name.local)\n : node.getAttribute(name);\n }\n\n function attrNull() {\n this.removeAttribute(name);\n }\n\n function attrNullNS() {\n this.removeAttributeNS(name.space, name.local);\n }\n\n function attrConstant() {\n this.setAttribute(name, value);\n }\n\n function attrConstantNS() {\n this.setAttributeNS(name.space, name.local, value);\n }\n\n function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name);\n else this.setAttribute(name, x);\n }\n\n function attrFunctionNS() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttributeNS(name.space, name.local);\n else this.setAttributeNS(name.space, name.local, x);\n }\n\n return this.each(value == null\n ? (name.local ? attrNullNS : attrNull) : (typeof value === \"function\"\n ? (name.local ? attrFunctionNS : attrFunction)\n : (name.local ? attrConstantNS : attrConstant)));\n};\nd3_selectionPrototype.classed = function(name, value) {\n var names = name.split(d3_selection_classedWhitespace),\n n = names.length,\n i = -1;\n if (arguments.length > 1) {\n while (++i < n) d3_selection_classed.call(this, names[i], value);\n return this;\n } else {\n while (++i < n) if (!d3_selection_classed.call(this, names[i])) return false;\n return true;\n }\n};\n\nvar d3_selection_classedWhitespace = /\\s+/g;\n\nfunction d3_selection_classed(name, value) {\n var re = new RegExp(\"(^|\\\\s+)\" + d3.requote(name) + \"(\\\\s+|$)\", \"g\");\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) {\n var node = this.node();\n if (c = node.classList) return c.contains(name);\n var c = node.className;\n re.lastIndex = 0;\n return re.test(c.baseVal != null ? c.baseVal : c);\n }\n\n function classedAdd() {\n if (c = this.classList) return c.add(name);\n var c = this.className,\n cb = c.baseVal != null,\n cv = cb ? c.baseVal : c;\n re.lastIndex = 0;\n if (!re.test(cv)) {\n cv = d3_collapse(cv + \" \" + name);\n if (cb) c.baseVal = cv;\n else this.className = cv;\n }\n }\n\n function classedRemove() {\n if (c = this.classList) return c.remove(name);\n var c = this.className,\n cb = c.baseVal != null,\n cv = cb ? c.baseVal : c;\n cv = d3_collapse(cv.replace(re, \" \"));\n if (cb) c.baseVal = cv;\n else this.className = cv;\n }\n\n function classedFunction() {\n (value.apply(this, arguments)\n ? classedAdd\n : classedRemove).call(this);\n }\n\n return this.each(typeof value === \"function\"\n ? classedFunction : value\n ? classedAdd\n : classedRemove);\n}\nd3_selectionPrototype.style = function(name, value, priority) {\n if (arguments.length < 3) priority = \"\";\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) return window\n .getComputedStyle(this.node(), null)\n .getPropertyValue(name);\n\n function styleNull() {\n this.style.removeProperty(name);\n }\n\n function styleConstant() {\n this.style.setProperty(name, value, priority);\n }\n\n function styleFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.style.removeProperty(name);\n else this.style.setProperty(name, x, priority);\n }\n\n return this.each(value == null\n ? styleNull : (typeof value === \"function\"\n ? styleFunction : styleConstant));\n};\nd3_selectionPrototype.property = function(name, value) {\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) return this.node()[name];\n\n function propertyNull() {\n delete this[name];\n }\n\n function propertyConstant() {\n this[name] = value;\n }\n\n function propertyFunction() {\n var x = value.apply(this, arguments);\n if (x == null) delete this[name];\n else this[name] = x;\n }\n\n return this.each(value == null\n ? propertyNull : (typeof value === \"function\"\n ? propertyFunction : propertyConstant));\n};\nd3_selectionPrototype.text = function(value) {\n return arguments.length < 1\n ? this.node().textContent : this.each(typeof value === \"function\"\n ? function() { var v = value.apply(this, arguments); this.textContent = v == null ? \"\" : v; } : value == null\n ? function() { this.textContent = \"\"; }\n : function() { this.textContent = value; });\n};\nd3_selectionPrototype.html = function(value) {\n return arguments.length < 1\n ? this.node().innerHTML : this.each(typeof value === \"function\"\n ? function() { var v = value.apply(this, arguments); this.innerHTML = v == null ? \"\" : v; } : value == null\n ? function() { this.innerHTML = \"\"; }\n : function() { this.innerHTML = value; });\n};\n// TODO append(node)?\n// TODO append(function)?\nd3_selectionPrototype.append = function(name) {\n name = d3.ns.qualify(name);\n\n function append() {\n return this.appendChild(document.createElementNS(this.namespaceURI, name));\n }\n\n function appendNS() {\n return this.appendChild(document.createElementNS(name.space, name.local));\n }\n\n return this.select(name.local ? appendNS : append);\n};\n// TODO insert(node, function)?\n// TODO insert(function, string)?\n// TODO insert(function, function)?\nd3_selectionPrototype.insert = function(name, before) {\n name = d3.ns.qualify(name);\n\n function insert() {\n return this.insertBefore(\n document.createElementNS(this.namespaceURI, name),\n d3_select(before, this));\n }\n\n function insertNS() {\n return this.insertBefore(\n document.createElementNS(name.space, name.local),\n d3_select(before, this));\n }\n\n return this.select(name.local ? insertNS : insert);\n};\n// TODO remove(selector)?\n// TODO remove(node)?\n// TODO remove(function)?\nd3_selectionPrototype.remove = function() {\n return this.each(function() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n });\n};\n// TODO data(null) for clearing data?\nd3_selectionPrototype.data = function(data, join) {\n var enter = [],\n update = [],\n exit = [];\n\n function bind(group, groupData) {\n var i,\n n = group.length,\n m = groupData.length,\n n0 = Math.min(n, m),\n n1 = Math.max(n, m),\n updateNodes = [],\n enterNodes = [],\n exitNodes = [],\n node,\n nodeData;\n\n if (join) {\n var nodeByKey = {},\n keys = [],\n key,\n j = groupData.length;\n\n for (i = -1; ++i < n;) {\n key = join.call(node = group[i], node.__data__, i);\n if (key in nodeByKey) {\n exitNodes[j++] = node; // duplicate key\n } else {\n nodeByKey[key] = node;\n }\n keys.push(key);\n }\n\n for (i = -1; ++i < m;) {\n node = nodeByKey[key = join.call(groupData, nodeData = groupData[i], i)];\n if (node) {\n node.__data__ = nodeData;\n updateNodes[i] = node;\n enterNodes[i] = exitNodes[i] = null;\n } else {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n updateNodes[i] = exitNodes[i] = null;\n }\n delete nodeByKey[key];\n }\n\n for (i = -1; ++i < n;) {\n if (keys[i] in nodeByKey) {\n exitNodes[i] = group[i];\n }\n }\n } else {\n for (i = -1; ++i < n0;) {\n node = group[i];\n nodeData = groupData[i];\n if (node) {\n node.__data__ = nodeData;\n updateNodes[i] = node;\n enterNodes[i] = exitNodes[i] = null;\n } else {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n updateNodes[i] = exitNodes[i] = null;\n }\n }\n for (; i < m; ++i) {\n enterNodes[i] = d3_selection_dataNode(groupData[i]);\n updateNodes[i] = exitNodes[i] = null;\n }\n for (; i < n1; ++i) {\n exitNodes[i] = group[i];\n enterNodes[i] = updateNodes[i] = null;\n }\n }\n\n enterNodes.update\n = updateNodes;\n\n enterNodes.parentNode\n = updateNodes.parentNode\n = exitNodes.parentNode\n = group.parentNode;\n\n enter.push(enterNodes);\n update.push(updateNodes);\n exit.push(exitNodes);\n }\n\n var i = -1,\n n = this.length,\n group;\n if (typeof data === \"function\") {\n while (++i < n) {\n bind(group = this[i], data.call(group, group.parentNode.__data__, i));\n }\n } else {\n while (++i < n) {\n bind(group = this[i], data);\n }\n }\n\n var selection = d3_selection(update);\n selection.enter = function() { return d3_selection_enter(enter); };\n selection.exit = function() { return d3_selection(exit); };\n return selection;\n};\n\nfunction d3_selection_dataNode(data) {\n return {__data__: data};\n}\nd3_selectionPrototype.filter = function(filter) {\n var subgroups = [],\n subgroup,\n group,\n node;\n\n if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n\n for (var j = 0, m = this.length; j < m; j++) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = 0, n = group.length; i < n; i++) {\n if ((node = group[i]) && filter.call(node, node.__data__, i)) {\n subgroup.push(node);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_filter(selector) {\n return function() {\n return d3_selectMatches(this, selector);\n };\n}\nd3_selectionPrototype.map = function(map) {\n return this.each(function() {\n this.__data__ = map.apply(this, arguments);\n });\n};\nd3_selectionPrototype.order = function() {\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n return this;\n};\nd3_selectionPrototype.sort = function(comparator) {\n comparator = d3_selection_sortComparator.apply(this, arguments);\n for (var j = -1, m = this.length; ++j < m;) this[j].sort(comparator);\n return this.order();\n};\n\nfunction d3_selection_sortComparator(comparator) {\n if (!arguments.length) comparator = d3.ascending;\n return function(a, b) {\n return comparator(a && a.__data__, b && b.__data__);\n };\n}\n// type can be namespaced, e.g., \"click.foo\"\n// listener can be null for removal\nd3_selectionPrototype.on = function(type, listener, capture) {\n if (arguments.length < 3) capture = false;\n\n // parse the type specifier\n var name = \"__on\" + type, i = type.indexOf(\".\");\n if (i > 0) type = type.substring(0, i);\n\n // if called with only one argument, return the current listener\n if (arguments.length < 2) return (i = this.node()[name]) && i._;\n\n // remove the old event listener, and add the new event listener\n return this.each(function(d, i) {\n var node = this;\n\n if (node[name]) node.removeEventListener(type, node[name], capture);\n if (listener) node.addEventListener(type, node[name] = l, capture);\n\n // wrapped event listener that preserves i\n function l(e) {\n var o = d3.event; // Events can be reentrant (e.g., focus).\n d3.event = e;\n try {\n listener.call(node, node.__data__, i);\n } finally {\n d3.event = o;\n }\n }\n\n // stash the unwrapped listener for retrieval\n l._ = listener;\n });\n};\nd3_selectionPrototype.each = function(callback) {\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n var node = group[i];\n if (node) callback.call(node, node.__data__, i, j);\n }\n }\n return this;\n};\n//\n// Note: assigning to the arguments array simultaneously changes the value of\n// the corresponding argument!\n//\n// TODO The `this` argument probably shouldn't be the first argument to the\n// callback, anyway, since it's redundant. However, that will require a major\n// version bump due to backwards compatibility, so I'm not changing it right\n// away.\n//\nd3_selectionPrototype.call = function(callback) {\n callback.apply(this, (arguments[0] = this, arguments));\n return this;\n};\nd3_selectionPrototype.empty = function() {\n return !this.node();\n};\nd3_selectionPrototype.node = function(callback) {\n for (var j = 0, m = this.length; j < m; j++) {\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n var node = group[i];\n if (node) return node;\n }\n }\n return null;\n};\nd3_selectionPrototype.transition = function() {\n var subgroups = [],\n subgroup,\n node;\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n subgroup.push((node = group[i]) ? {node: node, delay: 0, duration: 250} : null);\n }\n }\n\n return d3_transition(subgroups, d3_transitionInheritId || ++d3_transitionId, Date.now());\n};\nvar d3_selectionRoot = d3_selection([[document]]);\n\nd3_selectionRoot[0].parentNode = d3_selectRoot;\n\n// TODO fast singleton implementation!\n// TODO select(function)\nd3.select = function(selector) {\n return typeof selector === \"string\"\n ? d3_selectionRoot.select(selector)\n : d3_selection([[selector]]); // assume node\n};\n\n// TODO selectAll(function)\nd3.selectAll = function(selector) {\n return typeof selector === \"string\"\n ? d3_selectionRoot.selectAll(selector)\n : d3_selection([d3_array(selector)]); // assume node[]\n};\nfunction d3_selection_enter(selection) {\n d3_arraySubclass(selection, d3_selection_enterPrototype);\n return selection;\n}\n\nvar d3_selection_enterPrototype = [];\n\nd3_selection_enterPrototype.append = d3_selectionPrototype.append;\nd3_selection_enterPrototype.insert = d3_selectionPrototype.insert;\nd3_selection_enterPrototype.empty = d3_selectionPrototype.empty;\nd3_selection_enterPrototype.node = d3_selectionPrototype.node;\nd3_selection_enterPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n upgroup,\n group,\n node;\n\n for (var j = -1, m = this.length; ++j < m;) {\n upgroup = (group = this[j]).update;\n subgroups.push(subgroup = []);\n subgroup.parentNode = group.parentNode;\n for (var i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));\n subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\nfunction d3_transition(groups, id, time) {\n d3_arraySubclass(groups, d3_transitionPrototype);\n\n var tweens = {},\n event = d3.dispatch(\"start\", \"end\"),\n ease = d3_transitionEase;\n\n groups.id = id;\n\n groups.time = time;\n\n groups.tween = function(name, tween) {\n if (arguments.length < 2) return tweens[name];\n if (tween == null) delete tweens[name];\n else tweens[name] = tween;\n return groups;\n };\n\n groups.ease = function(value) {\n if (!arguments.length) return ease;\n ease = typeof value === \"function\" ? value : d3.ease.apply(d3, arguments);\n return groups;\n };\n\n groups.each = function(type, listener) {\n if (arguments.length < 2) return d3_transition_each.call(groups, type);\n event.on(type, listener);\n return groups;\n };\n\n d3.timer(function(elapsed) {\n groups.each(function(d, i, j) {\n var tweened = [],\n node = this,\n delay = groups[j][i].delay,\n duration = groups[j][i].duration,\n lock = node.__transition__ || (node.__transition__ = {active: 0, count: 0});\n\n ++lock.count;\n\n delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);\n\n function start(elapsed) {\n if (lock.active > id) return stop();\n lock.active = id;\n\n for (var tween in tweens) {\n if (tween = tweens[tween].call(node, d, i)) {\n tweened.push(tween);\n }\n }\n\n event.start.call(node, d, i);\n if (!tick(elapsed)) d3.timer(tick, 0, time);\n return 1;\n }\n\n function tick(elapsed) {\n if (lock.active !== id) return stop();\n\n var t = (elapsed - delay) / duration,\n e = ease(t),\n n = tweened.length;\n\n while (n > 0) {\n tweened[--n].call(node, e);\n }\n\n if (t >= 1) {\n stop();\n d3_transitionInheritId = id;\n event.end.call(node, d, i);\n d3_transitionInheritId = 0;\n return 1;\n }\n }\n\n function stop() {\n if (!--lock.count) delete node.__transition__;\n return 1;\n }\n });\n return 1;\n }, 0, time);\n\n return groups;\n}\n\nvar d3_transitionRemove = {};\n\nfunction d3_transitionNull(d, i, a) {\n return a != \"\" && d3_transitionRemove;\n}\n\nfunction d3_transitionTween(name, b) {\n var interpolate = d3_interpolateByName(name);\n\n function transitionFunction(d, i, a) {\n var v = b.call(this, d, i);\n return v == null\n ? a != \"\" && d3_transitionRemove\n : a != v && interpolate(a, v);\n }\n\n function transitionString(d, i, a) {\n return a != b && interpolate(a, b);\n }\n\n return typeof b === \"function\" ? transitionFunction\n : b == null ? d3_transitionNull\n : (b += \"\", transitionString);\n}\n\nvar d3_transitionPrototype = [],\n d3_transitionId = 0,\n d3_transitionInheritId = 0,\n d3_transitionEase = d3.ease(\"cubic-in-out\");\n\nd3_transitionPrototype.call = d3_selectionPrototype.call;\n\nd3.transition = function() {\n return d3_selectionRoot.transition();\n};\n\nd3.transition.prototype = d3_transitionPrototype;\nd3_transitionPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selector(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {\n if (\"__data__\" in node.node) subnode.__data__ = node.node.__data__;\n subgroup.push({node: subnode, delay: node.delay, duration: node.duration});\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_transition(subgroups, this.id, this.time).ease(this.ease());\n};\nd3_transitionPrototype.selectAll = function(selector) {\n var subgroups = [],\n subgroup,\n subnodes,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selectorAll(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subnodes = selector.call(node.node, node.node.__data__, i);\n subgroups.push(subgroup = []);\n for (var k = -1, o = subnodes.length; ++k < o;) {\n subgroup.push({node: subnodes[k], delay: node.delay, duration: node.duration});\n }\n }\n }\n }\n\n return d3_transition(subgroups, this.id, this.time).ease(this.ease());\n};\nd3_transitionPrototype.attr = function(name, value) {\n return this.attrTween(name, d3_transitionTween(name, value));\n};\n\nd3_transitionPrototype.attrTween = function(nameNS, tween) {\n var name = d3.ns.qualify(nameNS);\n\n function attrTween(d, i) {\n var f = tween.call(this, d, i, this.getAttribute(name));\n return f === d3_transitionRemove\n ? (this.removeAttribute(name), null)\n : f && function(t) { this.setAttribute(name, f(t)); };\n }\n\n function attrTweenNS(d, i) {\n var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));\n return f === d3_transitionRemove\n ? (this.removeAttributeNS(name.space, name.local), null)\n : f && function(t) { this.setAttributeNS(name.space, name.local, f(t)); };\n }\n\n return this.tween(\"attr.\" + nameNS, name.local ? attrTweenNS : attrTween);\n};\nd3_transitionPrototype.style = function(name, value, priority) {\n if (arguments.length < 3) priority = \"\";\n return this.styleTween(name, d3_transitionTween(name, value), priority);\n};\n\nd3_transitionPrototype.styleTween = function(name, tween, priority) {\n if (arguments.length < 3) priority = \"\";\n return this.tween(\"style.\" + name, function(d, i) {\n var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));\n return f === d3_transitionRemove\n ? (this.style.removeProperty(name), null)\n : f && function(t) { this.style.setProperty(name, f(t), priority); };\n });\n};\nd3_transitionPrototype.text = function(value) {\n return this.tween(\"text\", function(d, i) {\n this.textContent = typeof value === \"function\"\n ? value.call(this, d, i)\n : value;\n });\n};\nd3_transitionPrototype.remove = function() {\n return this.each(\"end.transition\", function() {\n var p;\n if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);\n });\n};\nd3_transitionPrototype.delay = function(value) {\n var groups = this;\n return groups.each(typeof value === \"function\"\n ? function(d, i, j) { groups[j][i].delay = +value.apply(this, arguments); }\n : (value = +value, function(d, i, j) { groups[j][i].delay = value; }));\n};\nd3_transitionPrototype.duration = function(value) {\n var groups = this;\n return groups.each(typeof value === \"function\"\n ? function(d, i, j) { groups[j][i].duration = +value.apply(this, arguments); }\n : (value = +value, function(d, i, j) { groups[j][i].duration = value; }));\n};\nfunction d3_transition_each(callback) {\n for (var j = 0, m = this.length; j < m; j++) {\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n var node = group[i];\n if (node) callback.call(node = node.node, node.__data__, i, j);\n }\n }\n return this;\n}\nd3_transitionPrototype.transition = function() {\n return this.select(d3_this);\n};\nvar d3_timer_queue = null,\n d3_timer_interval, // is an interval (or frame) active?\n d3_timer_timeout; // is a timeout active?\n\n// The timer will continue to fire until callback returns true.\nd3.timer = function(callback, delay, then) {\n var found = false,\n t0,\n t1 = d3_timer_queue;\n\n if (arguments.length < 3) {\n if (arguments.length < 2) delay = 0;\n else if (!isFinite(delay)) return;\n then = Date.now();\n }\n\n // See if the callback's already in the queue.\n while (t1) {\n if (t1.callback === callback) {\n t1.then = then;\n t1.delay = delay;\n found = true;\n break;\n }\n t0 = t1;\n t1 = t1.next;\n }\n\n // Otherwise, add the callback to the queue.\n if (!found) d3_timer_queue = {\n callback: callback,\n then: then,\n delay: delay,\n next: d3_timer_queue\n };\n\n // Start animatin'!\n if (!d3_timer_interval) {\n d3_timer_timeout = clearTimeout(d3_timer_timeout);\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n}\n\nfunction d3_timer_step() {\n var elapsed,\n now = Date.now(),\n t1 = d3_timer_queue;\n\n while (t1) {\n elapsed = now - t1.then;\n if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);\n t1 = t1.next;\n }\n\n var delay = d3_timer_flush() - now;\n if (delay > 24) {\n if (isFinite(delay)) {\n clearTimeout(d3_timer_timeout);\n d3_timer_timeout = setTimeout(d3_timer_step, delay);\n }\n d3_timer_interval = 0;\n } else {\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n}\n\nd3.timer.flush = function() {\n var elapsed,\n now = Date.now(),\n t1 = d3_timer_queue;\n\n while (t1) {\n elapsed = now - t1.then;\n if (!t1.delay) t1.flush = t1.callback(elapsed);\n t1 = t1.next;\n }\n\n d3_timer_flush();\n};\n\n// Flush after callbacks, to avoid concurrent queue modification.\nfunction d3_timer_flush() {\n var t0 = null,\n t1 = d3_timer_queue,\n then = Infinity;\n while (t1) {\n if (t1.flush) {\n t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;\n } else {\n then = Math.min(then, t1.then + t1.delay);\n t1 = (t0 = t1).next;\n }\n }\n return then;\n}\n\nvar d3_timer_frame = window.requestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.oRequestAnimationFrame\n || window.msRequestAnimationFrame\n || function(callback) { setTimeout(callback, 17); };\nd3.transform = function(string) {\n var g = document.createElementNS(d3.ns.prefix.svg, \"g\"),\n identity = {a: 1, b: 0, c: 0, d: 1, e: 0, f: 0};\n return (d3.transform = function(string) {\n g.setAttribute(\"transform\", string);\n var t = g.transform.baseVal.consolidate();\n return new d3_transform(t ? t.matrix : identity);\n })(string);\n};\n\n// Compute x-scale and normalize the first row.\n// Compute shear and make second row orthogonal to first.\n// Compute y-scale and normalize the second row.\n// Finally, compute the rotation.\nfunction d3_transform(m) {\n var r0 = [m.a, m.b],\n r1 = [m.c, m.d],\n kx = d3_transformNormalize(r0),\n kz = d3_transformDot(r0, r1),\n ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;\n if (r0[0] * r1[1] < r1[0] * r0[1]) {\n r0[0] *= -1;\n r0[1] *= -1;\n kx *= -1;\n kz *= -1;\n }\n this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;\n this.translate = [m.e, m.f];\n this.scale = [kx, ky];\n this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;\n};\n\nd3_transform.prototype.toString = function() {\n return \"translate(\" + this.translate\n + \")rotate(\" + this.rotate\n + \")skewX(\" + this.skew\n + \")scale(\" + this.scale\n + \")\";\n};\n\nfunction d3_transformDot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n\nfunction d3_transformNormalize(a) {\n var k = Math.sqrt(d3_transformDot(a, a));\n if (k) {\n a[0] /= k;\n a[1] /= k;\n }\n return k;\n}\n\nfunction d3_transformCombine(a, b, k) {\n a[0] += k * b[0];\n a[1] += k * b[1];\n return a;\n}\n\nvar d3_transformDegrees = 180 / Math.PI;\nfunction d3_noop() {}\nd3.scale = {};\n\nfunction d3_scaleExtent(domain) {\n var start = domain[0], stop = domain[domain.length - 1];\n return start < stop ? [start, stop] : [stop, start];\n}\n\nfunction d3_scaleRange(scale) {\n return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());\n}\nfunction d3_scale_nice(domain, nice) {\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n dx;\n\n if (x1 < x0) {\n dx = i0; i0 = i1; i1 = dx;\n dx = x0; x0 = x1; x1 = dx;\n }\n\n if (dx = x1 - x0) {\n nice = nice(dx);\n domain[i0] = nice.floor(x0);\n domain[i1] = nice.ceil(x1);\n }\n\n return domain;\n}\n\nfunction d3_scale_niceDefault() {\n return Math;\n}\nd3.scale.linear = function() {\n return d3_scale_linear([0, 1], [0, 1], d3.interpolate, false);\n};\n\nfunction d3_scale_linear(domain, range, interpolate, clamp) {\n var output,\n input;\n\n function rescale() {\n var linear = domain.length == 2 ? d3_scale_bilinear : d3_scale_polylinear,\n uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;\n output = linear(domain, range, uninterpolate, interpolate);\n input = linear(range, domain, uninterpolate, d3.interpolate);\n return scale;\n }\n\n function scale(x) {\n return output(x);\n }\n\n // Note: requires range is coercible to number!\n scale.invert = function(y) {\n return input(y);\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(Number);\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.rangeRound = function(x) {\n return scale.range(x).interpolate(d3.interpolateRound);\n };\n\n scale.clamp = function(x) {\n if (!arguments.length) return clamp;\n clamp = x;\n return rescale();\n };\n\n scale.interpolate = function(x) {\n if (!arguments.length) return interpolate;\n interpolate = x;\n return rescale();\n };\n\n scale.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n\n scale.tickFormat = function(m) {\n return d3_scale_linearTickFormat(domain, m);\n };\n\n scale.nice = function() {\n d3_scale_nice(domain, d3_scale_linearNice);\n return rescale();\n };\n\n scale.copy = function() {\n return d3_scale_linear(domain, range, interpolate, clamp);\n };\n\n return rescale();\n};\n\nfunction d3_scale_linearRebind(scale, linear) {\n return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n}\n\nfunction d3_scale_linearNice(dx) {\n dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);\n return {\n floor: function(x) { return Math.floor(x / dx) * dx; },\n ceil: function(x) { return Math.ceil(x / dx) * dx; }\n };\n}\n\nfunction d3_scale_linearTickRange(domain, m) {\n var extent = d3_scaleExtent(domain),\n span = extent[1] - extent[0],\n step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),\n err = m / span * step;\n\n // Filter ticks to get closer to the desired count.\n if (err <= .15) step *= 10;\n else if (err <= .35) step *= 5;\n else if (err <= .75) step *= 2;\n\n // Round start and stop values to step interval.\n extent[0] = Math.ceil(extent[0] / step) * step;\n extent[1] = Math.floor(extent[1] / step) * step + step * .5; // inclusive\n extent[2] = step;\n return extent;\n}\n\nfunction d3_scale_linearTicks(domain, m) {\n return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));\n}\n\nfunction d3_scale_linearTickFormat(domain, m) {\n return d3.format(\",.\" + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + \"f\");\n}\nfunction d3_scale_bilinear(domain, range, uninterpolate, interpolate) {\n var u = uninterpolate(domain[0], domain[1]),\n i = interpolate(range[0], range[1]);\n return function(x) {\n return i(u(x));\n };\n}\nfunction d3_scale_polylinear(domain, range, uninterpolate, interpolate) {\n var u = [],\n i = [],\n j = 0,\n k = domain.length - 1;\n\n // Handle descending domains.\n if (domain[k] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++j <= k) {\n u.push(uninterpolate(domain[j - 1], domain[j]));\n i.push(interpolate(range[j - 1], range[j]));\n }\n\n return function(x) {\n var j = d3.bisect(domain, x, 1, k) - 1;\n return i[j](u[j](x));\n };\n}\nd3.scale.log = function() {\n return d3_scale_log(d3.scale.linear(), d3_scale_logp);\n};\n\nfunction d3_scale_log(linear, log) {\n var pow = log.pow;\n\n function scale(x) {\n return linear(log(x));\n }\n\n scale.invert = function(x) {\n return pow(linear.invert(x));\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(pow);\n log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;\n pow = log.pow;\n linear.domain(x.map(log));\n return scale;\n };\n\n scale.nice = function() {\n linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));\n return scale;\n };\n\n scale.ticks = function() {\n var extent = d3_scaleExtent(linear.domain()),\n ticks = [];\n if (extent.every(isFinite)) {\n var i = Math.floor(extent[0]),\n j = Math.ceil(extent[1]),\n u = pow(extent[0]),\n v = pow(extent[1]);\n if (log === d3_scale_logn) {\n ticks.push(pow(i));\n for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);\n } else {\n for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);\n ticks.push(pow(i));\n }\n for (i = 0; ticks[i] < u; i++) {} // strip small values\n for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values\n ticks = ticks.slice(i, j);\n }\n return ticks;\n };\n\n scale.tickFormat = function(n, format) {\n if (arguments.length < 2) format = d3_scale_logFormat;\n if (arguments.length < 1) return format;\n var k = n / scale.ticks().length,\n f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil),\n e;\n return function(d) {\n return d / pow(f(log(d) + e)) < k ? format(d) : \"\";\n };\n };\n\n scale.copy = function() {\n return d3_scale_log(linear.copy(), log);\n };\n\n return d3_scale_linearRebind(scale, linear);\n};\n\nvar d3_scale_logFormat = d3.format(\".0e\");\n\nfunction d3_scale_logp(x) {\n return Math.log(x < 0 ? 0 : x) / Math.LN10;\n}\n\nfunction d3_scale_logn(x) {\n return -Math.log(x > 0 ? 0 : -x) / Math.LN10;\n}\n\nd3_scale_logp.pow = function(x) {\n return Math.pow(10, x);\n};\n\nd3_scale_logn.pow = function(x) {\n return -Math.pow(10, -x);\n};\nd3.scale.pow = function() {\n return d3_scale_pow(d3.scale.linear(), 1);\n};\n\nfunction d3_scale_pow(linear, exponent) {\n var powp = d3_scale_powPow(exponent),\n powb = d3_scale_powPow(1 / exponent);\n\n function scale(x) {\n return linear(powp(x));\n }\n\n scale.invert = function(x) {\n return powb(linear.invert(x));\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(powb);\n linear.domain(x.map(powp));\n return scale;\n };\n\n scale.ticks = function(m) {\n return d3_scale_linearTicks(scale.domain(), m);\n };\n\n scale.tickFormat = function(m) {\n return d3_scale_linearTickFormat(scale.domain(), m);\n };\n\n scale.nice = function() {\n return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));\n };\n\n scale.exponent = function(x) {\n if (!arguments.length) return exponent;\n var domain = scale.domain();\n powp = d3_scale_powPow(exponent = x);\n powb = d3_scale_powPow(1 / exponent);\n return scale.domain(domain);\n };\n\n scale.copy = function() {\n return d3_scale_pow(linear.copy(), exponent);\n };\n\n return d3_scale_linearRebind(scale, linear);\n};\n\nfunction d3_scale_powPow(e) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);\n };\n}\nd3.scale.sqrt = function() {\n return d3.scale.pow().exponent(.5);\n};\nd3.scale.ordinal = function() {\n return d3_scale_ordinal([], {t: \"range\", x: []});\n};\n\nfunction d3_scale_ordinal(domain, ranger) {\n var index,\n range,\n rangeBand;\n\n function scale(x) {\n return range[((index[x] || (index[x] = domain.push(x))) - 1) % range.length];\n }\n\n function steps(start, step) {\n return d3.range(domain.length).map(function(i) { return start + step * i; });\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = [];\n index = {};\n var i = -1, n = x.length, xi;\n while (++i < n) if (!index[xi = x[i]]) index[xi] = domain.push(xi);\n return scale[ranger.t](ranger.x, ranger.p);\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n rangeBand = 0;\n ranger = {t: \"range\", x: x};\n return scale;\n };\n\n scale.rangePoints = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0],\n stop = x[1],\n step = (stop - start) / (domain.length - 1 + padding);\n range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);\n rangeBand = 0;\n ranger = {t: \"rangePoints\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeBands = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0],\n stop = x[1],\n step = (stop - start) / (domain.length + padding);\n range = steps(start + step * padding, step);\n rangeBand = step * (1 - padding);\n ranger = {t: \"rangeBands\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeRoundBands = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0],\n stop = x[1],\n step = Math.floor((stop - start) / (domain.length + padding));\n range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step);\n rangeBand = Math.round(step * (1 - padding));\n ranger = {t: \"rangeRoundBands\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeBand = function() {\n return rangeBand;\n };\n\n scale.rangeExtent = function() {\n return ranger.t === \"range\" ? d3_scaleExtent(ranger.x) : ranger.x;\n };\n\n scale.copy = function() {\n return d3_scale_ordinal(domain, ranger);\n };\n\n return scale.domain(domain);\n};\n/*\n * This product includes color specifications and designs developed by Cynthia\n * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information.\n */\n\nd3.scale.category10 = function() {\n return d3.scale.ordinal().range(d3_category10);\n};\n\nd3.scale.category20 = function() {\n return d3.scale.ordinal().range(d3_category20);\n};\n\nd3.scale.category20b = function() {\n return d3.scale.ordinal().range(d3_category20b);\n};\n\nd3.scale.category20c = function() {\n return d3.scale.ordinal().range(d3_category20c);\n};\n\nvar d3_category10 = [\n \"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\",\n \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"\n];\n\nvar d3_category20 = [\n \"#1f77b4\", \"#aec7e8\",\n \"#ff7f0e\", \"#ffbb78\",\n \"#2ca02c\", \"#98df8a\",\n \"#d62728\", \"#ff9896\",\n \"#9467bd\", \"#c5b0d5\",\n \"#8c564b\", \"#c49c94\",\n \"#e377c2\", \"#f7b6d2\",\n \"#7f7f7f\", \"#c7c7c7\",\n \"#bcbd22\", \"#dbdb8d\",\n \"#17becf\", \"#9edae5\"\n];\n\nvar d3_category20b = [\n \"#393b79\", \"#5254a3\", \"#6b6ecf\", \"#9c9ede\",\n \"#637939\", \"#8ca252\", \"#b5cf6b\", \"#cedb9c\",\n \"#8c6d31\", \"#bd9e39\", \"#e7ba52\", \"#e7cb94\",\n \"#843c39\", \"#ad494a\", \"#d6616b\", \"#e7969c\",\n \"#7b4173\", \"#a55194\", \"#ce6dbd\", \"#de9ed6\"\n];\n\nvar d3_category20c = [\n \"#3182bd\", \"#6baed6\", \"#9ecae1\", \"#c6dbef\",\n \"#e6550d\", \"#fd8d3c\", \"#fdae6b\", \"#fdd0a2\",\n \"#31a354\", \"#74c476\", \"#a1d99b\", \"#c7e9c0\",\n \"#756bb1\", \"#9e9ac8\", \"#bcbddc\", \"#dadaeb\",\n \"#636363\", \"#969696\", \"#bdbdbd\", \"#d9d9d9\"\n];\nd3.scale.quantile = function() {\n return d3_scale_quantile([], []);\n};\n\nfunction d3_scale_quantile(domain, range) {\n var thresholds;\n\n function rescale() {\n var k = 0,\n n = domain.length,\n q = range.length;\n thresholds = [];\n while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);\n return scale;\n }\n\n function scale(x) {\n if (isNaN(x = +x)) return NaN;\n return range[d3.bisect(thresholds, x)];\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending);\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.quantiles = function() {\n return thresholds;\n };\n\n scale.copy = function() {\n return d3_scale_quantile(domain, range); // copy on write!\n };\n\n return rescale();\n};\nd3.scale.quantize = function() {\n return d3_scale_quantize(0, 1, [0, 1]);\n};\n\nfunction d3_scale_quantize(x0, x1, range) {\n var kx, i;\n\n function scale(x) {\n return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];\n }\n\n function rescale() {\n kx = range.length / (x1 - x0);\n i = range.length - 1;\n return scale;\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return [x0, x1];\n x0 = +x[0];\n x1 = +x[x.length - 1];\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.copy = function() {\n return d3_scale_quantize(x0, x1, range); // copy on write\n };\n\n return rescale();\n};\nd3.svg = {};\nd3.svg.arc = function() {\n var innerRadius = d3_svg_arcInnerRadius,\n outerRadius = d3_svg_arcOuterRadius,\n startAngle = d3_svg_arcStartAngle,\n endAngle = d3_svg_arcEndAngle;\n\n function arc() {\n var r0 = innerRadius.apply(this, arguments),\n r1 = outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,\n a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,\n da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0),\n df = da < Math.PI ? \"0\" : \"1\",\n c0 = Math.cos(a0),\n s0 = Math.sin(a0),\n c1 = Math.cos(a1),\n s1 = Math.sin(a1);\n return da >= d3_svg_arcMax\n ? (r0\n ? \"M0,\" + r1\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + (-r1)\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + r1\n + \"M0,\" + r0\n + \"A\" + r0 + \",\" + r0 + \" 0 1,0 0,\" + (-r0)\n + \"A\" + r0 + \",\" + r0 + \" 0 1,0 0,\" + r0\n + \"Z\"\n : \"M0,\" + r1\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + (-r1)\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + r1\n + \"Z\")\n : (r0\n ? \"M\" + r1 * c0 + \",\" + r1 * s0\n + \"A\" + r1 + \",\" + r1 + \" 0 \" + df + \",1 \" + r1 * c1 + \",\" + r1 * s1\n + \"L\" + r0 * c1 + \",\" + r0 * s1\n + \"A\" + r0 + \",\" + r0 + \" 0 \" + df + \",0 \" + r0 * c0 + \",\" + r0 * s0\n + \"Z\"\n : \"M\" + r1 * c0 + \",\" + r1 * s0\n + \"A\" + r1 + \",\" + r1 + \" 0 \" + df + \",1 \" + r1 * c1 + \",\" + r1 * s1\n + \"L0,0\"\n + \"Z\");\n }\n\n arc.innerRadius = function(v) {\n if (!arguments.length) return innerRadius;\n innerRadius = d3.functor(v);\n return arc;\n };\n\n arc.outerRadius = function(v) {\n if (!arguments.length) return outerRadius;\n outerRadius = d3.functor(v);\n return arc;\n };\n\n arc.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3.functor(v);\n return arc;\n };\n\n arc.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3.functor(v);\n return arc;\n };\n\n arc.centroid = function() {\n var r = (innerRadius.apply(this, arguments)\n + outerRadius.apply(this, arguments)) / 2,\n a = (startAngle.apply(this, arguments)\n + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;\n return [Math.cos(a) * r, Math.sin(a) * r];\n };\n\n return arc;\n};\n\nvar d3_svg_arcOffset = -Math.PI / 2,\n d3_svg_arcMax = 2 * Math.PI - 1e-6;\n\nfunction d3_svg_arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction d3_svg_arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction d3_svg_arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction d3_svg_arcEndAngle(d) {\n return d.endAngle;\n}\nfunction d3_svg_line(projection) {\n var x = d3_svg_lineX,\n y = d3_svg_lineY,\n interpolate = \"linear\",\n interpolator = d3_svg_lineInterpolators[interpolate],\n tension = .7;\n\n function line(d) {\n return d.length < 1 ? null : \"M\" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension);\n }\n\n line.x = function(v) {\n if (!arguments.length) return x;\n x = v;\n return line;\n };\n\n line.y = function(v) {\n if (!arguments.length) return y;\n y = v;\n return line;\n };\n\n line.interpolate = function(v) {\n if (!arguments.length) return interpolate;\n interpolator = d3_svg_lineInterpolators[interpolate = v];\n return line;\n };\n\n line.tension = function(v) {\n if (!arguments.length) return tension;\n tension = v;\n return line;\n };\n\n return line;\n}\n\nd3.svg.line = function() {\n return d3_svg_line(Object);\n};\n\n// Converts the specified array of data into an array of points\n// (x-y tuples), by evaluating the specified `x` and `y` functions on each\n// data point. The `this` context of the evaluated functions is the specified\n// \"self\" object; each function is passed the current datum and index.\nfunction d3_svg_linePoints(self, d, x, y) {\n var points = [],\n i = -1,\n n = d.length,\n fx = typeof x === \"function\",\n fy = typeof y === \"function\",\n value;\n if (fx && fy) {\n while (++i < n) points.push([\n x.call(self, value = d[i], i),\n y.call(self, value, i)\n ]);\n } else if (fx) {\n while (++i < n) points.push([x.call(self, d[i], i), y]);\n } else if (fy) {\n while (++i < n) points.push([x, y.call(self, d[i], i)]);\n } else {\n while (++i < n) points.push([x, y]);\n }\n return points;\n}\n\n// The default `x` property, which references d[0].\nfunction d3_svg_lineX(d) {\n return d[0];\n}\n\n// The default `y` property, which references d[1].\nfunction d3_svg_lineY(d) {\n return d[1];\n}\n\n// The various interpolators supported by the `line` class.\nvar d3_svg_lineInterpolators = {\n \"linear\": d3_svg_lineLinear,\n \"step-before\": d3_svg_lineStepBefore,\n \"step-after\": d3_svg_lineStepAfter,\n \"basis\": d3_svg_lineBasis,\n \"basis-open\": d3_svg_lineBasisOpen,\n \"basis-closed\": d3_svg_lineBasisClosed,\n \"bundle\": d3_svg_lineBundle,\n \"cardinal\": d3_svg_lineCardinal,\n \"cardinal-open\": d3_svg_lineCardinalOpen,\n \"cardinal-closed\": d3_svg_lineCardinalClosed,\n \"monotone\": d3_svg_lineMonotone\n};\n\n// Linear interpolation; generates \"L\" commands.\nfunction d3_svg_lineLinear(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"L\", (p = points[i])[0], \",\", p[1]);\n return path.join(\"\");\n}\n\n// Step interpolation; generates \"H\" and \"V\" commands.\nfunction d3_svg_lineStepBefore(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"V\", (p = points[i])[1], \"H\", p[0]);\n return path.join(\"\");\n}\n\n// Step interpolation; generates \"H\" and \"V\" commands.\nfunction d3_svg_lineStepAfter(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"H\", (p = points[i])[0], \"V\", p[1]);\n return path.join(\"\");\n}\n\n// Open cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinalOpen(points, tension) {\n return points.length < 4\n ? d3_svg_lineLinear(points)\n : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1),\n d3_svg_lineCardinalTangents(points, tension));\n}\n\n// Closed cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinalClosed(points, tension) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] + d3_svg_lineHermite((points.push(points[0]), points),\n d3_svg_lineCardinalTangents([points[points.length - 2]]\n .concat(points, [points[1]]), tension));\n}\n\n// Cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinal(points, tension, closed) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] + d3_svg_lineHermite(points,\n d3_svg_lineCardinalTangents(points, tension));\n}\n\n// Hermite spline construction; generates \"C\" commands.\nfunction d3_svg_lineHermite(points, tangents) {\n if (tangents.length < 1\n || (points.length != tangents.length\n && points.length != tangents.length + 2)) {\n return d3_svg_lineLinear(points);\n }\n\n var quad = points.length != tangents.length,\n path = \"\",\n p0 = points[0],\n p = points[1],\n t0 = tangents[0],\n t = t0,\n pi = 1;\n\n if (quad) {\n path += \"Q\" + (p[0] - t0[0] * 2 / 3) + \",\" + (p[1] - t0[1] * 2 / 3)\n + \",\" + p[0] + \",\" + p[1];\n p0 = points[1];\n pi = 2;\n }\n\n if (tangents.length > 1) {\n t = tangents[1];\n p = points[pi];\n pi++;\n path += \"C\" + (p0[0] + t0[0]) + \",\" + (p0[1] + t0[1])\n + \",\" + (p[0] - t[0]) + \",\" + (p[1] - t[1])\n + \",\" + p[0] + \",\" + p[1];\n for (var i = 2; i < tangents.length; i++, pi++) {\n p = points[pi];\n t = tangents[i];\n path += \"S\" + (p[0] - t[0]) + \",\" + (p[1] - t[1])\n + \",\" + p[0] + \",\" + p[1];\n }\n }\n\n if (quad) {\n var lp = points[pi];\n path += \"Q\" + (p[0] + t[0] * 2 / 3) + \",\" + (p[1] + t[1] * 2 / 3)\n + \",\" + lp[0] + \",\" + lp[1];\n }\n\n return path;\n}\n\n// Generates tangents for a cardinal spline.\nfunction d3_svg_lineCardinalTangents(points, tension) {\n var tangents = [],\n a = (1 - tension) / 2,\n p0,\n p1 = points[0],\n p2 = points[1],\n i = 1,\n n = points.length;\n while (++i < n) {\n p0 = p1;\n p1 = p2;\n p2 = points[i];\n tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);\n }\n return tangents;\n}\n\n// B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasis(points) {\n if (points.length < 3) return d3_svg_lineLinear(points);\n var i = 1,\n n = points.length,\n pi = points[0],\n x0 = pi[0],\n y0 = pi[1],\n px = [x0, x0, x0, (pi = points[1])[0]],\n py = [y0, y0, y0, pi[1]],\n path = [x0, \",\", y0];\n d3_svg_lineBasisBezier(path, px, py);\n while (++i < n) {\n pi = points[i];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n i = -1;\n while (++i < 2) {\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\n// Open B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasisOpen(points) {\n if (points.length < 4) return d3_svg_lineLinear(points);\n var path = [],\n i = -1,\n n = points.length,\n pi,\n px = [0],\n py = [0];\n while (++i < 3) {\n pi = points[i];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px)\n + \",\" + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));\n --i; while (++i < n) {\n pi = points[i];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\n// Closed B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasisClosed(points) {\n var path,\n i = -1,\n n = points.length,\n m = n + 4,\n pi,\n px = [],\n py = [];\n while (++i < 4) {\n pi = points[i % n];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path = [\n d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\",\n d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)\n ];\n --i; while (++i < m) {\n pi = points[i % n];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\nfunction d3_svg_lineBundle(points, tension) {\n var n = points.length - 1,\n x0 = points[0][0],\n y0 = points[0][1],\n dx = points[n][0] - x0,\n dy = points[n][1] - y0,\n i = -1,\n p,\n t;\n while (++i <= n) {\n p = points[i];\n t = i / n;\n p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);\n p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);\n }\n return d3_svg_lineBasis(points);\n}\n\n// Returns the dot product of the given four-element vectors.\nfunction d3_svg_lineDot4(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n\n// Matrix to transform basis (b-spline) control points to bezier\n// control points. Derived from FvD 11.2.8.\nvar d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0],\n d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0],\n d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6];\n\n// Pushes a \"C\" Bézier curve onto the specified path array, given the\n// two specified four-element arrays which define the control points.\nfunction d3_svg_lineBasisBezier(path, x, y) {\n path.push(\n \"C\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));\n}\n\n// Computes the slope from points p0 to p1.\nfunction d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}\n\n// Compute three-point differences for the given points.\n// http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference\nfunction d3_svg_lineFiniteDifferences(points) {\n var i = 0,\n j = points.length - 1,\n m = [],\n p0 = points[0],\n p1 = points[1],\n d = m[0] = d3_svg_lineSlope(p0, p1);\n while (++i < j) {\n m[i] = d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]));\n }\n m[i] = d;\n return m;\n}\n\n// Interpolates the given points using Fritsch-Carlson Monotone cubic Hermite\n// interpolation. Returns an array of tangent vectors. For details, see\n// http://en.wikipedia.org/wiki/Monotone_cubic_interpolation\nfunction d3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])\n / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}\n\nfunction d3_svg_lineMonotone(points) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] +\n d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));\n}\nd3.svg.line.radial = function() {\n var line = d3_svg_line(d3_svg_lineRadial);\n line.radius = line.x, delete line.x;\n line.angle = line.y, delete line.y;\n return line;\n};\n\nfunction d3_svg_lineRadial(points) {\n var point,\n i = -1,\n n = points.length,\n r,\n a;\n while (++i < n) {\n point = points[i];\n r = point[0];\n a = point[1] + d3_svg_arcOffset;\n point[0] = r * Math.cos(a);\n point[1] = r * Math.sin(a);\n }\n return points;\n}\nfunction d3_svg_area(projection) {\n var x0 = d3_svg_lineX,\n x1 = d3_svg_lineX,\n y0 = 0,\n y1 = d3_svg_lineY,\n interpolate,\n i0,\n i1,\n tension = .7;\n\n function area(d) {\n if (d.length < 1) return null;\n var points0 = d3_svg_linePoints(this, d, x0, y0),\n points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);\n return \"M\" + i0(projection(points1), tension)\n + \"L\" + i1(projection(points0.reverse()), tension)\n + \"Z\";\n }\n\n area.x = function(x) {\n if (!arguments.length) return x1;\n x0 = x1 = x;\n return area;\n };\n\n area.x0 = function(x) {\n if (!arguments.length) return x0;\n x0 = x;\n return area;\n };\n\n area.x1 = function(x) {\n if (!arguments.length) return x1;\n x1 = x;\n return area;\n };\n\n area.y = function(y) {\n if (!arguments.length) return y1;\n y0 = y1 = y;\n return area;\n };\n\n area.y0 = function(y) {\n if (!arguments.length) return y0;\n y0 = y;\n return area;\n };\n\n area.y1 = function(y) {\n if (!arguments.length) return y1;\n y1 = y;\n return area;\n };\n\n area.interpolate = function(x) {\n if (!arguments.length) return interpolate;\n i0 = d3_svg_lineInterpolators[interpolate = x];\n i1 = i0.reverse || i0;\n return area;\n };\n\n area.tension = function(x) {\n if (!arguments.length) return tension;\n tension = x;\n return area;\n };\n\n return area.interpolate(\"linear\");\n}\n\nd3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;\nd3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;\n\nd3.svg.area = function() {\n return d3_svg_area(Object);\n};\n\nfunction d3_svg_areaX(points) {\n return function(d, i) {\n return points[i][0];\n };\n}\n\nfunction d3_svg_areaY(points) {\n return function(d, i) {\n return points[i][1];\n };\n}\nd3.svg.area.radial = function() {\n var area = d3_svg_area(d3_svg_lineRadial);\n area.radius = area.x, delete area.x;\n area.innerRadius = area.x0, delete area.x0;\n area.outerRadius = area.x1, delete area.x1;\n area.angle = area.y, delete area.y;\n area.startAngle = area.y0, delete area.y0;\n area.endAngle = area.y1, delete area.y1;\n return area;\n};\nd3.svg.chord = function() {\n var source = d3_svg_chordSource,\n target = d3_svg_chordTarget,\n radius = d3_svg_chordRadius,\n startAngle = d3_svg_arcStartAngle,\n endAngle = d3_svg_arcEndAngle;\n\n // TODO Allow control point to be customized.\n\n function chord(d, i) {\n var s = subgroup(this, source, d, i),\n t = subgroup(this, target, d, i);\n return \"M\" + s.p0\n + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t)\n ? curve(s.r, s.p1, s.r, s.p0)\n : curve(s.r, s.p1, t.r, t.p0)\n + arc(t.r, t.p1, t.a1 - t.a0)\n + curve(t.r, t.p1, s.r, s.p0))\n + \"Z\";\n }\n\n function subgroup(self, f, d, i) {\n var subgroup = f.call(self, d, i),\n r = radius.call(self, subgroup, i),\n a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset,\n a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;\n return {\n r: r,\n a0: a0,\n a1: a1,\n p0: [r * Math.cos(a0), r * Math.sin(a0)],\n p1: [r * Math.cos(a1), r * Math.sin(a1)]\n };\n }\n\n function equals(a, b) {\n return a.a0 == b.a0 && a.a1 == b.a1;\n }\n\n function arc(r, p, a) {\n return \"A\" + r + \",\" + r + \" 0 \" + +(a > Math.PI) + \",1 \" + p;\n }\n\n function curve(r0, p0, r1, p1) {\n return \"Q 0,0 \" + p1;\n }\n\n chord.radius = function(v) {\n if (!arguments.length) return radius;\n radius = d3.functor(v);\n return chord;\n };\n\n chord.source = function(v) {\n if (!arguments.length) return source;\n source = d3.functor(v);\n return chord;\n };\n\n chord.target = function(v) {\n if (!arguments.length) return target;\n target = d3.functor(v);\n return chord;\n };\n\n chord.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3.functor(v);\n return chord;\n };\n\n chord.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3.functor(v);\n return chord;\n };\n\n return chord;\n};\n\nfunction d3_svg_chordSource(d) {\n return d.source;\n}\n\nfunction d3_svg_chordTarget(d) {\n return d.target;\n}\n\nfunction d3_svg_chordRadius(d) {\n return d.radius;\n}\n\nfunction d3_svg_chordStartAngle(d) {\n return d.startAngle;\n}\n\nfunction d3_svg_chordEndAngle(d) {\n return d.endAngle;\n}\nd3.svg.diagonal = function() {\n var source = d3_svg_chordSource,\n target = d3_svg_chordTarget,\n projection = d3_svg_diagonalProjection;\n\n function diagonal(d, i) {\n var p0 = source.call(this, d, i),\n p3 = target.call(this, d, i),\n m = (p0.y + p3.y) / 2,\n p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3];\n p = p.map(projection);\n return \"M\" + p[0] + \"C\" + p[1] + \" \" + p[2] + \" \" + p[3];\n }\n\n diagonal.source = function(x) {\n if (!arguments.length) return source;\n source = d3.functor(x);\n return diagonal;\n };\n\n diagonal.target = function(x) {\n if (!arguments.length) return target;\n target = d3.functor(x);\n return diagonal;\n };\n\n diagonal.projection = function(x) {\n if (!arguments.length) return projection;\n projection = x;\n return diagonal;\n };\n\n return diagonal;\n};\n\nfunction d3_svg_diagonalProjection(d) {\n return [d.x, d.y];\n}\nd3.svg.diagonal.radial = function() {\n var diagonal = d3.svg.diagonal(),\n projection = d3_svg_diagonalProjection,\n projection_ = diagonal.projection;\n\n diagonal.projection = function(x) {\n return arguments.length\n ? projection_(d3_svg_diagonalRadialProjection(projection = x))\n : projection;\n };\n\n return diagonal;\n};\n\nfunction d3_svg_diagonalRadialProjection(projection) {\n return function() {\n var d = projection.apply(this, arguments),\n r = d[0],\n a = d[1] + d3_svg_arcOffset;\n return [r * Math.cos(a), r * Math.sin(a)];\n };\n}\nd3.svg.mouse = function(container) {\n return d3_svg_mousePoint(container, d3.event);\n};\n\n// https://bugs.webkit.org/show_bug.cgi?id=44083\nvar d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;\n\nfunction d3_svg_mousePoint(container, e) {\n var point = (container.ownerSVGElement || container).createSVGPoint();\n if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {\n var svg = d3.select(document.body)\n .append(\"svg\")\n .style(\"position\", \"absolute\")\n .style(\"top\", 0)\n .style(\"left\", 0);\n var ctm = svg[0][0].getScreenCTM();\n d3_mouse_bug44083 = !(ctm.f || ctm.e);\n svg.remove();\n }\n if (d3_mouse_bug44083) {\n point.x = e.pageX;\n point.y = e.pageY;\n } else {\n point.x = e.clientX;\n point.y = e.clientY;\n }\n point = point.matrixTransform(container.getScreenCTM().inverse());\n return [point.x, point.y];\n};\nd3.svg.touches = function(container, touches) {\n if (arguments.length < 2) touches = d3.event.touches;\n\n return touches ? d3_array(touches).map(function(touch) {\n var point = d3_svg_mousePoint(container, touch);\n point.identifier = touch.identifier;\n return point;\n }) : [];\n};\nd3.svg.symbol = function() {\n var type = d3_svg_symbolType,\n size = d3_svg_symbolSize;\n\n function symbol(d, i) {\n return (d3_svg_symbols[type.call(this, d, i)]\n || d3_svg_symbols.circle)\n (size.call(this, d, i));\n }\n\n symbol.type = function(x) {\n if (!arguments.length) return type;\n type = d3.functor(x);\n return symbol;\n };\n\n // size of symbol in square pixels\n symbol.size = function(x) {\n if (!arguments.length) return size;\n size = d3.functor(x);\n return symbol;\n };\n\n return symbol;\n};\n\nfunction d3_svg_symbolSize() {\n return 64;\n}\n\nfunction d3_svg_symbolType() {\n return \"circle\";\n}\n\n// TODO cross-diagonal?\nvar d3_svg_symbols = {\n \"circle\": function(size) {\n var r = Math.sqrt(size / Math.PI);\n return \"M0,\" + r\n + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + (-r)\n + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + r\n + \"Z\";\n },\n \"cross\": function(size) {\n var r = Math.sqrt(size / 5) / 2;\n return \"M\" + -3 * r + \",\" + -r\n + \"H\" + -r\n + \"V\" + -3 * r\n + \"H\" + r\n + \"V\" + -r\n + \"H\" + 3 * r\n + \"V\" + r\n + \"H\" + r\n + \"V\" + 3 * r\n + \"H\" + -r\n + \"V\" + r\n + \"H\" + -3 * r\n + \"Z\";\n },\n \"diamond\": function(size) {\n var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),\n rx = ry * d3_svg_symbolTan30;\n return \"M0,\" + -ry\n + \"L\" + rx + \",0\"\n + \" 0,\" + ry\n + \" \" + -rx + \",0\"\n + \"Z\";\n },\n \"square\": function(size) {\n var r = Math.sqrt(size) / 2;\n return \"M\" + -r + \",\" + -r\n + \"L\" + r + \",\" + -r\n + \" \" + r + \",\" + r\n + \" \" + -r + \",\" + r\n + \"Z\";\n },\n \"triangle-down\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3),\n ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + ry\n + \"L\" + rx +\",\" + -ry\n + \" \" + -rx + \",\" + -ry\n + \"Z\";\n },\n \"triangle-up\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3),\n ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + -ry\n + \"L\" + rx +\",\" + ry\n + \" \" + -rx + \",\" + ry\n + \"Z\";\n }\n};\n\nd3.svg.symbolTypes = d3.keys(d3_svg_symbols);\n\nvar d3_svg_symbolSqrt3 = Math.sqrt(3),\n d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);\nd3.svg.axis = function() {\n var scale = d3.scale.linear(),\n orient = \"bottom\",\n tickMajorSize = 6,\n tickMinorSize = 6,\n tickEndSize = 6,\n tickPadding = 3,\n tickArguments_ = [10],\n tickFormat_,\n tickSubdivide = 0;\n\n function axis(selection) {\n selection.each(function(d, i, j) {\n var g = d3.select(this);\n\n // If selection is a transition, create subtransitions.\n var transition = selection.delay ? function(o) {\n var id = d3_transitionInheritId;\n try {\n d3_transitionInheritId = selection.id;\n return o.transition()\n .delay(selection[j][i].delay)\n .duration(selection[j][i].duration)\n .ease(selection.ease());\n } finally {\n d3_transitionInheritId = id;\n }\n } : Object;\n\n // Ticks, or domain values for ordinal scales.\n var ticks = scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain(),\n tickFormat = tickFormat_ == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String) : tickFormat_;\n\n // Minor ticks.\n var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),\n subtick = g.selectAll(\".minor\").data(subticks, String),\n subtickEnter = subtick.enter().insert(\"line\", \"g\").attr(\"class\", \"tick minor\").style(\"opacity\", 1e-6),\n subtickExit = transition(subtick.exit()).style(\"opacity\", 1e-6).remove(),\n subtickUpdate = transition(subtick).style(\"opacity\", 1);\n\n // Major ticks.\n var tick = g.selectAll(\"g\").data(ticks, String),\n tickEnter = tick.enter().insert(\"g\", \"path\").style(\"opacity\", 1e-6),\n tickExit = transition(tick.exit()).style(\"opacity\", 1e-6).remove(),\n tickUpdate = transition(tick).style(\"opacity\", 1),\n tickTransform;\n\n // Domain.\n var range = d3_scaleRange(scale),\n path = g.selectAll(\".domain\").data([0]),\n pathEnter = path.enter().append(\"path\").attr(\"class\", \"domain\"),\n pathUpdate = transition(path);\n\n // Stash a snapshot of the new scale, and retrieve the old snapshot.\n var scale1 = scale.copy(),\n scale0 = this.__chart__ || scale1;\n this.__chart__ = scale1;\n\n tickEnter.append(\"line\").attr(\"class\", \"tick\");\n tickEnter.append(\"text\");\n tickUpdate.select(\"text\").text(tickFormat);\n\n switch (orient) {\n case \"bottom\": {\n tickTransform = d3_svg_axisX;\n subtickEnter.attr(\"y2\", tickMinorSize);\n subtickUpdate.attr(\"x2\", 0).attr(\"y2\", tickMinorSize);\n tickEnter.select(\"line\").attr(\"y2\", tickMajorSize);\n tickEnter.select(\"text\").attr(\"y\", Math.max(tickMajorSize, 0) + tickPadding);\n tickUpdate.select(\"line\").attr(\"x2\", 0).attr(\"y2\", tickMajorSize);\n tickUpdate.select(\"text\").attr(\"x\", 0).attr(\"y\", Math.max(tickMajorSize, 0) + tickPadding).attr(\"dy\", \".71em\").attr(\"text-anchor\", \"middle\");\n pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + tickEndSize + \"V0H\" + range[1] + \"V\" + tickEndSize);\n break;\n }\n case \"top\": {\n tickTransform = d3_svg_axisX;\n subtickEnter.attr(\"y2\", -tickMinorSize);\n subtickUpdate.attr(\"x2\", 0).attr(\"y2\", -tickMinorSize);\n tickEnter.select(\"line\").attr(\"y2\", -tickMajorSize);\n tickEnter.select(\"text\").attr(\"y\", -(Math.max(tickMajorSize, 0) + tickPadding));\n tickUpdate.select(\"line\").attr(\"x2\", 0).attr(\"y2\", -tickMajorSize);\n tickUpdate.select(\"text\").attr(\"x\", 0).attr(\"y\", -(Math.max(tickMajorSize, 0) + tickPadding)).attr(\"dy\", \"0em\").attr(\"text-anchor\", \"middle\");\n pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + -tickEndSize + \"V0H\" + range[1] + \"V\" + -tickEndSize);\n break;\n }\n case \"left\": {\n tickTransform = d3_svg_axisY;\n subtickEnter.attr(\"x2\", -tickMinorSize);\n subtickUpdate.attr(\"x2\", -tickMinorSize).attr(\"y2\", 0);\n tickEnter.select(\"line\").attr(\"x2\", -tickMajorSize);\n tickEnter.select(\"text\").attr(\"x\", -(Math.max(tickMajorSize, 0) + tickPadding));\n tickUpdate.select(\"line\").attr(\"x2\", -tickMajorSize).attr(\"y2\", 0);\n tickUpdate.select(\"text\").attr(\"x\", -(Math.max(tickMajorSize, 0) + tickPadding)).attr(\"y\", 0).attr(\"dy\", \".32em\").attr(\"text-anchor\", \"end\");\n pathUpdate.attr(\"d\", \"M\" + -tickEndSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + -tickEndSize);\n break;\n }\n case \"right\": {\n tickTransform = d3_svg_axisY;\n subtickEnter.attr(\"x2\", tickMinorSize);\n subtickUpdate.attr(\"x2\", tickMinorSize).attr(\"y2\", 0);\n tickEnter.select(\"line\").attr(\"x2\", tickMajorSize);\n tickEnter.select(\"text\").attr(\"x\", Math.max(tickMajorSize, 0) + tickPadding);\n tickUpdate.select(\"line\").attr(\"x2\", tickMajorSize).attr(\"y2\", 0);\n tickUpdate.select(\"text\").attr(\"x\", Math.max(tickMajorSize, 0) + tickPadding).attr(\"y\", 0).attr(\"dy\", \".32em\").attr(\"text-anchor\", \"start\");\n pathUpdate.attr(\"d\", \"M\" + tickEndSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + tickEndSize);\n break;\n }\n }\n\n // For quantitative scales:\n // - enter new ticks from the old scale\n // - exit old ticks to the new scale\n if (scale.ticks) {\n tickEnter.call(tickTransform, scale0);\n tickUpdate.call(tickTransform, scale1);\n tickExit.call(tickTransform, scale1);\n subtickEnter.call(tickTransform, scale0);\n subtickUpdate.call(tickTransform, scale1);\n subtickExit.call(tickTransform, scale1);\n }\n\n // For ordinal scales:\n // - any entering ticks are undefined in the old scale\n // - any exiting ticks are undefined in the new scale\n // Therefore, we only need to transition updating ticks.\n else {\n var dx = scale1.rangeBand() / 2, x = function(d) { return scale1(d) + dx; };\n tickEnter.call(tickTransform, x);\n tickUpdate.call(tickTransform, x);\n }\n });\n }\n\n axis.scale = function(x) {\n if (!arguments.length) return scale;\n scale = x;\n return axis;\n };\n\n axis.orient = function(x) {\n if (!arguments.length) return orient;\n orient = x;\n return axis;\n };\n\n axis.ticks = function() {\n if (!arguments.length) return tickArguments_;\n tickArguments_ = arguments;\n return axis;\n };\n\n axis.tickFormat = function(x) {\n if (!arguments.length) return tickFormat_;\n tickFormat_ = x;\n return axis;\n };\n\n axis.tickSize = function(x, y, z) {\n if (!arguments.length) return tickMajorSize;\n var n = arguments.length - 1;\n tickMajorSize = +x;\n tickMinorSize = n > 1 ? +y : tickMajorSize;\n tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;\n return axis;\n };\n\n axis.tickPadding = function(x) {\n if (!arguments.length) return tickPadding;\n tickPadding = +x;\n return axis;\n };\n\n axis.tickSubdivide = function(x) {\n if (!arguments.length) return tickSubdivide;\n tickSubdivide = +x;\n return axis;\n };\n\n return axis;\n};\n\nfunction d3_svg_axisX(selection, x) {\n selection.attr(\"transform\", function(d) { return \"translate(\" + x(d) + \",0)\"; });\n}\n\nfunction d3_svg_axisY(selection, y) {\n selection.attr(\"transform\", function(d) { return \"translate(0,\" + y(d) + \")\"; });\n}\n\nfunction d3_svg_axisSubdivide(scale, ticks, m) {\n subticks = [];\n if (m && ticks.length > 1) {\n var extent = d3_scaleExtent(scale.domain()),\n subticks,\n i = -1,\n n = ticks.length,\n d = (ticks[1] - ticks[0]) / ++m,\n j,\n v;\n while (++i < n) {\n for (j = m; --j > 0;) {\n if ((v = +ticks[i] - j * d) >= extent[0]) {\n subticks.push(v);\n }\n }\n }\n for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1];) {\n subticks.push(v);\n }\n }\n return subticks;\n}\nd3.svg.brush = function() {\n var event = d3.dispatch(\"brushstart\", \"brush\", \"brushend\"),\n x, // x-scale, optional\n y, // y-scale, optional\n extent = [[0, 0], [0, 0]]; // [x0, y0], [x1, y1]\n\n function brush(g) {\n var resizes = x && y ? [\"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\"]\n : x ? [\"e\", \"w\"]\n : y ? [\"n\", \"s\"]\n : [];\n\n g.each(function() {\n var g = d3.select(this).on(\"mousedown.brush\", down),\n bg = g.selectAll(\".background\").data([0]),\n fg = g.selectAll(\".extent\").data([0]),\n tz = g.selectAll(\".resize\").data(resizes, String),\n e;\n\n // An invisible, mouseable area for starting a new brush.\n bg.enter().append(\"rect\")\n .attr(\"class\", \"background\")\n .style(\"visibility\", \"hidden\")\n .style(\"pointer-events\", \"all\")\n .style(\"cursor\", \"crosshair\");\n\n // The visible brush extent; style this as you like!\n fg.enter().append(\"rect\")\n .attr(\"class\", \"extent\")\n .style(\"cursor\", \"move\");\n\n // More invisible rects for resizing the extent.\n tz.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"resize \" + d; })\n .attr(\"width\", 6)\n .attr(\"height\", 6)\n .style(\"visibility\", \"hidden\")\n .style(\"cursor\", function(d) { return d3_svg_brushCursor[d]; });\n\n // Update the resizers.\n tz.style(\"pointer-events\", brush.empty() ? \"none\" : \"all\");\n\n // Remove any superfluous resizers.\n tz.exit().remove();\n\n // Initialize the background to fill the defined range.\n // If the range isn't defined, you can post-process.\n if (x) {\n e = d3_scaleRange(x);\n bg.attr(\"x\", e[0]).attr(\"width\", e[1] - e[0]);\n d3_svg_brushRedrawX(g, extent);\n }\n if (y) {\n e = d3_scaleRange(y);\n bg.attr(\"y\", e[0]).attr(\"height\", e[1] - e[0]);\n d3_svg_brushRedrawY(g, extent);\n }\n });\n }\n\n function down() {\n var target = d3.select(d3.event.target);\n\n // Store some global state for the duration of the brush gesture.\n d3_svg_brush = brush;\n d3_svg_brushTarget = this;\n d3_svg_brushExtent = extent;\n d3_svg_brushOffset = d3.svg.mouse(d3_svg_brushTarget);\n\n // If the extent was clicked on, drag rather than brush;\n // store the offset between the mouse and extent origin instead.\n if (d3_svg_brushDrag = target.classed(\"extent\")) {\n d3_svg_brushOffset[0] = extent[0][0] - d3_svg_brushOffset[0];\n d3_svg_brushOffset[1] = extent[0][1] - d3_svg_brushOffset[1];\n }\n\n // If a resizer was clicked on, record which side is to be resized.\n // Also, set the offset to the opposite side.\n else if (target.classed(\"resize\")) {\n d3_svg_brushResize = d3.event.target.__data__;\n d3_svg_brushOffset[0] = extent[+/w$/.test(d3_svg_brushResize)][0];\n d3_svg_brushOffset[1] = extent[+/^n/.test(d3_svg_brushResize)][1];\n }\n\n // If the ALT key is down when starting a brush, the center is at the mouse.\n else if (d3.event.altKey) {\n d3_svg_brushCenter = d3_svg_brushOffset.slice();\n }\n\n // Restrict which dimensions are resized.\n d3_svg_brushX = !/^(n|s)$/.test(d3_svg_brushResize) && x;\n d3_svg_brushY = !/^(e|w)$/.test(d3_svg_brushResize) && y;\n\n // Notify listeners.\n d3_svg_brushDispatch = dispatcher(this, arguments);\n d3_svg_brushDispatch(\"brushstart\");\n d3_svg_brushMove();\n d3_eventCancel();\n }\n\n function dispatcher(that, argumentz) {\n return function(type) {\n var e = d3.event;\n try {\n d3.event = {type: type, target: brush};\n event[type].apply(that, argumentz);\n } finally {\n d3.event = e;\n }\n };\n }\n\n brush.x = function(z) {\n if (!arguments.length) return x;\n x = z;\n return brush;\n };\n\n brush.y = function(z) {\n if (!arguments.length) return y;\n y = z;\n return brush;\n };\n\n brush.extent = function(z) {\n var x0, x1, y0, y1, t;\n\n // Invert the pixel extent to data-space.\n if (!arguments.length) {\n if (x) {\n x0 = extent[0][0], x1 = extent[1][0];\n if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n }\n if (y) {\n y0 = extent[0][1], y1 = extent[1][1];\n if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n }\n return x && y ? [[x0, y0], [x1, y1]] : x ? [x0, x1] : y && [y0, y1];\n }\n\n // Scale the data-space extent to pixels.\n if (x) {\n x0 = z[0], x1 = z[1];\n if (y) x0 = x0[0], x1 = x1[0];\n if (x.invert) x0 = x(x0), x1 = x(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n extent[0][0] = x0, extent[1][0] = x1;\n }\n if (y) {\n y0 = z[0], y1 = z[1];\n if (x) y0 = y0[1], y1 = y1[1];\n if (y.invert) y0 = y(y0), y1 = y(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n extent[0][1] = y0, extent[1][1] = y1;\n }\n\n return brush;\n };\n\n brush.clear = function() {\n extent[0][0] =\n extent[0][1] =\n extent[1][0] =\n extent[1][1] = 0;\n return brush;\n };\n\n brush.empty = function() {\n return (x && extent[0][0] === extent[1][0])\n || (y && extent[0][1] === extent[1][1]);\n };\n\n d3.select(window)\n .on(\"mousemove.brush\", d3_svg_brushMove)\n .on(\"mouseup.brush\", d3_svg_brushUp)\n .on(\"keydown.brush\", d3_svg_brushKeydown)\n .on(\"keyup.brush\", d3_svg_brushKeyup);\n\n return d3.rebind(brush, event, \"on\");\n};\n\nvar d3_svg_brush,\n d3_svg_brushDispatch,\n d3_svg_brushTarget,\n d3_svg_brushX,\n d3_svg_brushY,\n d3_svg_brushExtent,\n d3_svg_brushDrag,\n d3_svg_brushResize,\n d3_svg_brushCenter,\n d3_svg_brushOffset;\n\nfunction d3_svg_brushRedrawX(g, extent) {\n g.select(\".extent\").attr(\"x\", extent[0][0]);\n g.selectAll(\".n,.s,.w,.nw,.sw\").attr(\"x\", extent[0][0] - 2);\n g.selectAll(\".e,.ne,.se\").attr(\"x\", extent[1][0] - 3);\n g.selectAll(\".extent,.n,.s\").attr(\"width\", extent[1][0] - extent[0][0]);\n}\n\nfunction d3_svg_brushRedrawY(g, extent) {\n g.select(\".extent\").attr(\"y\", extent[0][1]);\n g.selectAll(\".n,.e,.w,.nw,.ne\").attr(\"y\", extent[0][1] - 3);\n g.selectAll(\".s,.se,.sw\").attr(\"y\", extent[1][1] - 4);\n g.selectAll(\".extent,.e,.w\").attr(\"height\", extent[1][1] - extent[0][1]);\n}\n\nfunction d3_svg_brushKeydown() {\n if (d3.event.keyCode == 32 && d3_svg_brushTarget && !d3_svg_brushDrag) {\n d3_svg_brushCenter = null;\n d3_svg_brushOffset[0] -= d3_svg_brushExtent[1][0];\n d3_svg_brushOffset[1] -= d3_svg_brushExtent[1][1];\n d3_svg_brushDrag = 2;\n d3_eventCancel();\n }\n}\n\nfunction d3_svg_brushKeyup() {\n if (d3.event.keyCode == 32 && d3_svg_brushDrag == 2) {\n d3_svg_brushOffset[0] += d3_svg_brushExtent[1][0];\n d3_svg_brushOffset[1] += d3_svg_brushExtent[1][1];\n d3_svg_brushDrag = 0;\n d3_eventCancel();\n }\n}\n\nfunction d3_svg_brushMove() {\n if (d3_svg_brushOffset) {\n var mouse = d3.svg.mouse(d3_svg_brushTarget),\n g = d3.select(d3_svg_brushTarget);\n\n if (!d3_svg_brushDrag) {\n\n // If needed, determine the center from the current extent.\n if (d3.event.altKey) {\n if (!d3_svg_brushCenter) {\n d3_svg_brushCenter = [\n (d3_svg_brushExtent[0][0] + d3_svg_brushExtent[1][0]) / 2,\n (d3_svg_brushExtent[0][1] + d3_svg_brushExtent[1][1]) / 2\n ];\n }\n\n // Update the offset, for when the ALT key is released.\n d3_svg_brushOffset[0] = d3_svg_brushExtent[+(mouse[0] < d3_svg_brushCenter[0])][0];\n d3_svg_brushOffset[1] = d3_svg_brushExtent[+(mouse[1] < d3_svg_brushCenter[1])][1];\n }\n\n // When the ALT key is released, we clear the center.\n else d3_svg_brushCenter = null;\n }\n\n // Update the brush extent for each dimension.\n if (d3_svg_brushX) {\n d3_svg_brushMove1(mouse, d3_svg_brushX, 0);\n d3_svg_brushRedrawX(g, d3_svg_brushExtent);\n }\n if (d3_svg_brushY) {\n d3_svg_brushMove1(mouse, d3_svg_brushY, 1);\n d3_svg_brushRedrawY(g, d3_svg_brushExtent);\n }\n\n // Notify listeners.\n d3_svg_brushDispatch(\"brush\");\n }\n}\n\nfunction d3_svg_brushMove1(mouse, scale, i) {\n var range = d3_scaleRange(scale),\n r0 = range[0],\n r1 = range[1],\n offset = d3_svg_brushOffset[i],\n size = d3_svg_brushExtent[1][i] - d3_svg_brushExtent[0][i],\n min,\n max;\n\n // When dragging, reduce the range by the extent size and offset.\n if (d3_svg_brushDrag) {\n r0 -= offset;\n r1 -= size + offset;\n }\n\n // Clamp the mouse so that the extent fits within the range extent.\n min = Math.max(r0, Math.min(r1, mouse[i]));\n\n // Compute the new extent bounds.\n if (d3_svg_brushDrag) {\n max = (min += offset) + size;\n } else {\n\n // If the ALT key is pressed, then preserve the center of the extent.\n if (d3_svg_brushCenter) offset = Math.max(r0, Math.min(r1, 2 * d3_svg_brushCenter[i] - min));\n\n // Compute the min and max of the offset and mouse.\n if (offset < min) {\n max = min;\n min = offset;\n } else {\n max = offset;\n }\n }\n\n // Update the stored bounds.\n d3_svg_brushExtent[0][i] = min;\n d3_svg_brushExtent[1][i] = max;\n}\n\nfunction d3_svg_brushUp() {\n if (d3_svg_brushOffset) {\n d3_svg_brushMove();\n d3.select(d3_svg_brushTarget).selectAll(\".resize\").style(\"pointer-events\", d3_svg_brush.empty() ? \"none\" : \"all\");\n d3_svg_brushDispatch(\"brushend\");\n d3_svg_brush =\n d3_svg_brushDispatch =\n d3_svg_brushTarget =\n d3_svg_brushX =\n d3_svg_brushY =\n d3_svg_brushExtent =\n d3_svg_brushDrag =\n d3_svg_brushResize =\n d3_svg_brushCenter =\n d3_svg_brushOffset = null;\n d3_eventCancel();\n }\n}\n\nvar d3_svg_brushCursor = {\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\nd3.behavior = {};\n// TODO Track touch points by identifier.\n\nd3.behavior.drag = function() {\n var event = d3.dispatch(\"drag\", \"dragstart\", \"dragend\"),\n origin = null;\n\n function drag() {\n this\n .on(\"mousedown.drag\", mousedown)\n .on(\"touchstart.drag\", mousedown);\n\n d3.select(window)\n .on(\"mousemove.drag\", d3_behavior_dragMove)\n .on(\"touchmove.drag\", d3_behavior_dragMove)\n .on(\"mouseup.drag\", d3_behavior_dragUp, true)\n .on(\"touchend.drag\", d3_behavior_dragUp, true)\n .on(\"click.drag\", d3_behavior_dragClick, true);\n }\n\n // snapshot the local context for subsequent dispatch\n function start() {\n d3_behavior_dragEvent = event;\n d3_behavior_dragEventTarget = d3.event.target;\n d3_behavior_dragTarget = this;\n d3_behavior_dragArguments = arguments;\n d3_behavior_dragOrigin = d3_behavior_dragPoint();\n if (origin) {\n d3_behavior_dragOffset = origin.apply(d3_behavior_dragTarget, d3_behavior_dragArguments);\n d3_behavior_dragOffset = [d3_behavior_dragOffset.x - d3_behavior_dragOrigin[0], d3_behavior_dragOffset.y - d3_behavior_dragOrigin[1]];\n } else {\n d3_behavior_dragOffset = [0, 0];\n }\n d3_behavior_dragMoved = 0;\n }\n\n function mousedown() {\n start.apply(this, arguments);\n d3_behavior_dragDispatch(\"dragstart\");\n }\n\n drag.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n return drag;\n };\n\n return d3.rebind(drag, event, \"on\");\n};\n\nvar d3_behavior_dragEvent,\n d3_behavior_dragEventTarget,\n d3_behavior_dragTarget,\n d3_behavior_dragArguments,\n d3_behavior_dragOffset,\n d3_behavior_dragOrigin,\n d3_behavior_dragMoved;\n\nfunction d3_behavior_dragDispatch(type) {\n var p = d3_behavior_dragPoint(),\n o = d3.event,\n e = d3.event = {type: type};\n\n if (p) {\n e.x = p[0] + d3_behavior_dragOffset[0];\n e.y = p[1] + d3_behavior_dragOffset[1];\n e.dx = p[0] - d3_behavior_dragOrigin[0];\n e.dy = p[1] - d3_behavior_dragOrigin[1];\n d3_behavior_dragMoved |= e.dx | e.dy;\n d3_behavior_dragOrigin = p;\n }\n\n try {\n d3_behavior_dragEvent[type].apply(d3_behavior_dragTarget, d3_behavior_dragArguments);\n } finally {\n d3.event = o;\n }\n\n o.stopPropagation();\n o.preventDefault();\n}\n\nfunction d3_behavior_dragPoint() {\n var p = d3_behavior_dragTarget.parentNode,\n t = d3.event.changedTouches;\n return p && (t\n ? d3.svg.touches(p, t)[0]\n : d3.svg.mouse(p));\n}\n\nfunction d3_behavior_dragMove() {\n if (!d3_behavior_dragTarget) return;\n var parent = d3_behavior_dragTarget.parentNode;\n\n // O NOES! The drag element was removed from the DOM.\n if (!parent) return d3_behavior_dragUp();\n\n d3_behavior_dragDispatch(\"drag\");\n d3_eventCancel();\n}\n\nfunction d3_behavior_dragUp() {\n if (!d3_behavior_dragTarget) return;\n d3_behavior_dragDispatch(\"dragend\");\n\n // If the node was moved, prevent the mouseup from propagating.\n // Also prevent the subsequent click from propagating (e.g., for anchors).\n if (d3_behavior_dragMoved) {\n d3_eventCancel();\n d3_behavior_dragMoved = d3.event.target === d3_behavior_dragEventTarget;\n }\n\n d3_behavior_dragEvent =\n d3_behavior_dragEventTarget =\n d3_behavior_dragTarget =\n d3_behavior_dragArguments =\n d3_behavior_dragOffset =\n d3_behavior_dragOrigin = null;\n}\n\nfunction d3_behavior_dragClick() {\n if (d3_behavior_dragMoved) {\n d3_eventCancel();\n d3_behavior_dragMoved = 0;\n }\n}\n// TODO unbind zoom behavior?\nd3.behavior.zoom = function() {\n var xyz = [0, 0, 0],\n event = d3.dispatch(\"zoom\"),\n extent = d3_behavior_zoomInfiniteExtent;\n\n function zoom() {\n this\n .on(\"mousedown.zoom\", mousedown)\n .on(\"mousewheel.zoom\", mousewheel)\n .on(\"DOMMouseScroll.zoom\", mousewheel)\n .on(\"dblclick.zoom\", dblclick)\n .on(\"touchstart.zoom\", touchstart);\n\n d3.select(window)\n .on(\"mousemove.zoom\", d3_behavior_zoomMousemove)\n .on(\"mouseup.zoom\", d3_behavior_zoomMouseup)\n .on(\"touchmove.zoom\", d3_behavior_zoomTouchmove)\n .on(\"touchend.zoom\", d3_behavior_zoomTouchup)\n .on(\"click.zoom\", d3_behavior_zoomClick, true);\n }\n\n // snapshot the local context for subsequent dispatch\n function start() {\n d3_behavior_zoomXyz = xyz;\n d3_behavior_zoomExtent = extent;\n d3_behavior_zoomDispatch = event.zoom;\n d3_behavior_zoomEventTarget = d3.event.target;\n d3_behavior_zoomTarget = this;\n d3_behavior_zoomArguments = arguments;\n }\n\n function mousedown() {\n start.apply(this, arguments);\n d3_behavior_zoomPanning = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));\n d3_behavior_zoomMoved = 0;\n d3.event.preventDefault();\n window.focus();\n }\n\n // store starting mouse location\n function mousewheel() {\n start.apply(this, arguments);\n if (!d3_behavior_zoomZooming) d3_behavior_zoomZooming = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));\n d3_behavior_zoomTo(d3_behavior_zoomDelta() + xyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomZooming);\n }\n\n function dblclick() {\n start.apply(this, arguments);\n var mouse = d3.svg.mouse(d3_behavior_zoomTarget);\n d3_behavior_zoomTo(d3.event.shiftKey ? Math.ceil(xyz[2] - 1) : Math.floor(xyz[2] + 1), mouse, d3_behavior_zoomLocation(mouse));\n }\n\n // doubletap detection\n function touchstart() {\n start.apply(this, arguments);\n var touches = d3_behavior_zoomTouchup(),\n touch,\n now = Date.now();\n if ((touches.length === 1) && (now - d3_behavior_zoomLast < 300)) {\n d3_behavior_zoomTo(1 + Math.floor(xyz[2]), touch = touches[0], d3_behavior_zoomLocations[touch.identifier]);\n }\n d3_behavior_zoomLast = now;\n }\n\n zoom.extent = function(x) {\n if (!arguments.length) return extent;\n extent = x == null ? d3_behavior_zoomInfiniteExtent : x;\n return zoom;\n };\n\n return d3.rebind(zoom, event, \"on\");\n};\n\nvar d3_behavior_zoomDiv,\n d3_behavior_zoomPanning,\n d3_behavior_zoomZooming,\n d3_behavior_zoomLocations = {}, // identifier -> location\n d3_behavior_zoomLast = 0,\n d3_behavior_zoomXyz,\n d3_behavior_zoomExtent,\n d3_behavior_zoomDispatch,\n d3_behavior_zoomEventTarget,\n d3_behavior_zoomTarget,\n d3_behavior_zoomArguments,\n d3_behavior_zoomMoved;\n\nfunction d3_behavior_zoomLocation(point) {\n return [\n point[0] - d3_behavior_zoomXyz[0],\n point[1] - d3_behavior_zoomXyz[1],\n d3_behavior_zoomXyz[2]\n ];\n}\n\n// detect the pixels that would be scrolled by this wheel event\nfunction d3_behavior_zoomDelta() {\n\n // mousewheel events are totally broken!\n // https://bugs.webkit.org/show_bug.cgi?id=40441\n // not only that, but Chrome and Safari differ in re. to acceleration!\n if (!d3_behavior_zoomDiv) {\n d3_behavior_zoomDiv = d3.select(\"body\").append(\"div\")\n .style(\"visibility\", \"hidden\")\n .style(\"top\", 0)\n .style(\"height\", 0)\n .style(\"width\", 0)\n .style(\"overflow-y\", \"scroll\")\n .append(\"div\")\n .style(\"height\", \"2000px\")\n .node().parentNode;\n }\n\n var e = d3.event, delta;\n try {\n d3_behavior_zoomDiv.scrollTop = 1000;\n d3_behavior_zoomDiv.dispatchEvent(e);\n delta = 1000 - d3_behavior_zoomDiv.scrollTop;\n } catch (error) {\n delta = e.wheelDelta || (-e.detail * 5);\n }\n\n return delta * .005;\n}\n\n// Note: Since we don't rotate, it's possible for the touches to become\n// slightly detached from their original positions. Thus, we recompute the\n// touch points on touchend as well as touchstart!\nfunction d3_behavior_zoomTouchup() {\n var touches = d3.svg.touches(d3_behavior_zoomTarget),\n i = -1,\n n = touches.length,\n touch;\n while (++i < n) d3_behavior_zoomLocations[(touch = touches[i]).identifier] = d3_behavior_zoomLocation(touch);\n return touches;\n}\n\nfunction d3_behavior_zoomTouchmove() {\n var touches = d3.svg.touches(d3_behavior_zoomTarget);\n switch (touches.length) {\n\n // single-touch pan\n case 1: {\n var touch = touches[0];\n d3_behavior_zoomTo(d3_behavior_zoomXyz[2], touch, d3_behavior_zoomLocations[touch.identifier]);\n break;\n }\n\n // double-touch pan + zoom\n case 2: {\n var p0 = touches[0],\n p1 = touches[1],\n p2 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2],\n l0 = d3_behavior_zoomLocations[p0.identifier],\n l1 = d3_behavior_zoomLocations[p1.identifier],\n l2 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2, l0[2]];\n d3_behavior_zoomTo(Math.log(d3.event.scale) / Math.LN2 + l0[2], p2, l2);\n break;\n }\n }\n}\n\nfunction d3_behavior_zoomMousemove() {\n d3_behavior_zoomZooming = null;\n if (d3_behavior_zoomPanning) {\n d3_behavior_zoomMoved = 1;\n d3_behavior_zoomTo(d3_behavior_zoomXyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomPanning);\n }\n}\n\nfunction d3_behavior_zoomMouseup() {\n if (d3_behavior_zoomPanning) {\n if (d3_behavior_zoomMoved) {\n d3_eventCancel();\n d3_behavior_zoomMoved = d3_behavior_zoomEventTarget === d3.event.target;\n }\n\n d3_behavior_zoomXyz =\n d3_behavior_zoomExtent =\n d3_behavior_zoomDispatch =\n d3_behavior_zoomEventTarget =\n d3_behavior_zoomTarget =\n d3_behavior_zoomArguments =\n d3_behavior_zoomPanning = null;\n }\n}\n\nfunction d3_behavior_zoomClick() {\n if (d3_behavior_zoomMoved) {\n d3_eventCancel();\n d3_behavior_zoomMoved = 0;\n }\n}\n\nfunction d3_behavior_zoomTo(z, x0, x1) {\n z = d3_behavior_zoomExtentClamp(z, 2);\n var j = Math.pow(2, d3_behavior_zoomXyz[2]),\n k = Math.pow(2, z),\n K = Math.pow(2, (d3_behavior_zoomXyz[2] = z) - x1[2]),\n x_ = d3_behavior_zoomXyz[0],\n y_ = d3_behavior_zoomXyz[1],\n x = d3_behavior_zoomXyz[0] = d3_behavior_zoomExtentClamp((x0[0] - x1[0] * K), 0, k),\n y = d3_behavior_zoomXyz[1] = d3_behavior_zoomExtentClamp((x0[1] - x1[1] * K), 1, k),\n o = d3.event; // Events can be reentrant (e.g., focus).\n\n d3.event = {\n scale: k,\n translate: [x, y],\n transform: function(sx, sy) {\n if (sx) transform(sx, x_, x);\n if (sy) transform(sy, y_, y);\n }\n };\n\n function transform(scale, a, b) {\n scale.domain(scale.range().map(function(v) { return scale.invert(((v - b) * j) / k + a); }));\n }\n\n try {\n d3_behavior_zoomDispatch.apply(d3_behavior_zoomTarget, d3_behavior_zoomArguments);\n } finally {\n d3.event = o;\n }\n\n o.preventDefault();\n}\n\nvar d3_behavior_zoomInfiniteExtent = [\n [-Infinity, Infinity],\n [-Infinity, Infinity],\n [-Infinity, Infinity]\n];\n\nfunction d3_behavior_zoomExtentClamp(x, i, k) {\n var range = d3_behavior_zoomExtent[i],\n r0 = range[0],\n r1 = range[1];\n return arguments.length === 3\n ? Math.max(r1 * (r1 === Infinity ? -Infinity : 1 / k - 1),\n Math.min(r0 === -Infinity ? Infinity : r0, x / k)) * k\n : Math.max(r0, Math.min(r1, x));\n}\n})();\n\n// ############################################################\nfunction render() {\n var r = $morph('","__LivelyClassName__":"lively.morphic.TextChunk"},"27":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"28":{"style":{"__isSmartRef__":true,"id":29},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"ProtovisDrawing","__LivelyClassName__":"lively.morphic.TextChunk"},"29":{"color":"rgb(0,0,0)","fontFamily":"Helvetica","fontSize":"14px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"-webkit-auto","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","display":"inline!important","float":"none","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"30":{"style":{"__isSmartRef__":true,"id":31},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"')\n","__LivelyClassName__":"lively.morphic.TextChunk"},"31":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"32":{"style":{"__isSmartRef__":true,"id":33},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" ","__LivelyClassName__":"lively.morphic.TextChunk"},"33":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"34":{"style":{"__isSmartRef__":true,"id":35},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"var","__LivelyClassName__":"lively.morphic.TextChunk"},"35":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,128)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"36":{"style":{"__isSmartRef__":true,"id":37},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" w = ","__LivelyClassName__":"lively.morphic.TextChunk"},"37":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"38":{"style":{"__isSmartRef__":true,"id":39},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"39":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"40":{"style":{"__isSmartRef__":true,"id":41},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".getExtent().x,\n h = ","__LivelyClassName__":"lively.morphic.TextChunk"},"41":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"42":{"style":{"__isSmartRef__":true,"id":43},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"43":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"44":{"style":{"__isSmartRef__":true,"id":45},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".getExtent().y;\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"45":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"46":{"style":{"__isSmartRef__":true,"id":47},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"47":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"48":{"style":{"__isSmartRef__":true,"id":49},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".vis = ","__LivelyClassName__":"lively.morphic.TextChunk"},"49":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"50":{"style":{"__isSmartRef__":true,"id":51},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"51":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"52":{"style":{"__isSmartRef__":true,"id":53},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".draw(w, h);\n\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"53":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"54":{"style":{"__isSmartRef__":true,"id":55},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"var","__LivelyClassName__":"lively.morphic.TextChunk"},"55":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,128)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"56":{"style":{"__isSmartRef__":true,"id":57},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" svg = ","__LivelyClassName__":"lively.morphic.TextChunk"},"57":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"58":{"style":{"__isSmartRef__":true,"id":59},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"59":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"60":{"style":{"__isSmartRef__":true,"id":61},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".renderContext().svgNode;\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"61":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"62":{"style":{"__isSmartRef__":true,"id":63},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"if","__LivelyClassName__":"lively.morphic.TextChunk"},"63":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,128)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"64":{"style":{"__isSmartRef__":true,"id":65},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" (svg) svg.parentNode.removeChild(svg)\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"65":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"66":{"style":{"__isSmartRef__":true,"id":67},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"var","__LivelyClassName__":"lively.morphic.TextChunk"},"67":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,128)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"68":{"style":{"__isSmartRef__":true,"id":69},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" svg = NodeFactory.create(","__LivelyClassName__":"lively.morphic.TextChunk"},"69":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"70":{"style":{"__isSmartRef__":true,"id":71},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"'svg'","__LivelyClassName__":"lively.morphic.TextChunk"},"71":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,128,128)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"72":{"style":{"__isSmartRef__":true,"id":73},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":");\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"73":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"74":{"style":{"__isSmartRef__":true,"id":75},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"75":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"76":{"style":{"__isSmartRef__":true,"id":77},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".renderContext().shapeNode.appendChild(svg);\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"77":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"78":{"style":{"__isSmartRef__":true,"id":79},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"79":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"80":{"style":{"__isSmartRef__":true,"id":81},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".renderContext().svgNode = svg;\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"81":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"82":{"style":{"__isSmartRef__":true,"id":83},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"83":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"84":{"style":{"__isSmartRef__":true,"id":85},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".vis.canvas(svg);\n ","__LivelyClassName__":"lively.morphic.TextChunk"},"85":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"86":{"style":{"__isSmartRef__":true,"id":87},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"r","__LivelyClassName__":"lively.morphic.TextChunk"},"87":{"fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","color":"rgb(0,0,139)","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"88":{"style":{"__isSmartRef__":true,"id":89},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":".vis.render();\n\n return r.vis;\n","__LivelyClassName__":"lively.morphic.TextChunk"},"89":{"color":"rgb(0,0,0)","fontFamily":"Monaco,courier","fontSize":"12px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"left","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","textDecoration":"none","outlineStyle":"none","outlineWidth":"initial","outlineColor":"initial","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"90":{"style":{"__isSmartRef__":true,"id":91},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"}\n\nvar data = d3.range(20).map(function(i) {\n return {x: i / 19, y: (Math.sin(i / 3) + 1) / 2};\n});\n\nvar w = 450,\n h = 275,\n p = 20,\n x = d3.scale.linear().domain([0, 1]).range([0, w]),\n y = d3.scale.linear().domain([0, 1]).range([h, 0]);\n\n// var vis = d3.select(\"body #chart\")\n// var vis = render()\n// looks like body div div is the place\n","__LivelyClassName__":"lively.morphic.TextChunk"},"91":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"92":{"style":{"__isSmartRef__":true,"id":93},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"var vis = d3.select(\"body>div>div\")\n","__LivelyClassName__":"lively.morphic.TextChunk"},"93":{"color":"rgb(0,0,0)","fontFamily":"Helvetica","fontSize":"14px","fontStyle":"normal","fontVariant":"normal","fontWeight":"normal","letterSpacing":"normal","lineHeight":"normal","orphans":"2","textAlign":"-webkit-auto","textIndent":"0px","textTransform":"none","whiteSpace":"pre-wrap","widows":"2","wordSpacing":"0px","webkitTextSizeAdjust":"auto","webkitTextStrokeWidth":"0px","backgroundColor":"rgb(243,243,243)","display":"inline!important","float":"none","__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"94":{"style":{"__isSmartRef__":true,"id":95},"chunkOwner":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":" .data([data])\n .append(\"svg\")\n .attr(\"width\", w + p * 2)\n .attr(\"height\", h + p * 2)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + p + \",\" + p + \")\");\n\nvar rules = vis.selectAll(\"g.rule\")\n .data(x.ticks(10))\n .enter().append(\"g\")\n .attr(\"class\", \"rule\");\n\nrules.append(\"line\")\n .attr(\"x1\", x)\n .attr(\"x2\", x)\n .attr(\"y1\", 0)\n .attr(\"y2\", h - 1);\n\nrules.append(\"line\")\n .attr(\"class\", function(d) { return d ? null : \"axis\"; })\n .attr(\"y1\", y)\n .attr(\"y2\", y)\n .attr(\"x1\", 0)\n .attr(\"x2\", w + 1);\n\nrules.append(\"text\")\n .attr(\"x\", x)\n .attr(\"y\", h + 3)\n .attr(\"dy\", \".71em\")\n .attr(\"text-anchor\", \"middle\")\n .text(x.tickFormat(10));\n\nrules.append(\"text\")\n .attr(\"y\", y)\n .attr(\"x\", -3)\n .attr(\"dy\", \".35em\")\n .attr(\"text-anchor\", \"end\")\n .text(y.tickFormat(10));\n\nvis.append(\"path\")\n .attr(\"class\", \"line\")\n .attr(\"d\", d3.svg.line()\n .x(function(d) { return x(d.x); })\n .y(function(d) { return y(d.y); }));\n\nvis.selectAll(\"circle.line\")\n .data(data)\n .enter().append(\"circle\")\n .attr(\"class\", \"line\")\n .attr(\"cx\", function(d) { return x(d.x); })\n .attr(\"cy\", function(d) { return y(d.y); })\n .attr(\"r\", 3.5);\n\n// render();\n","__LivelyClassName__":"lively.morphic.TextChunk"},"95":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"96":{"morph":{"__isSmartRef__":true,"id":17},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"97":{"x":0,"y":21,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"98":{"x":640,"y":684,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"99":{"resizeWidth":true,"resizeHeight":true},"100":{"submorphs":[{"__isSmartRef__":true,"id":101},{"__isSmartRef__":true,"id":115},{"__isSmartRef__":true,"id":162},{"__isSmartRef__":true,"id":196}],"scripts":[],"shape":{"__isSmartRef__":true,"id":231},"derivationIds":[null],"id":"39C3515B-1A5F-4B59-8823-886E8A63788C","renderContextTable":{"__isSmartRef__":true,"id":243},"eventHandler":{"__isSmartRef__":true,"id":244},"droppingEnabled":true,"halosEnabled":true,"layout":{"__isSmartRef__":true,"id":245},"_Position":{"__isSmartRef__":true,"id":246},"windowMorph":{"__isSmartRef__":true,"id":16},"label":{"__isSmartRef__":true,"id":101},"closeButton":{"__isSmartRef__":true,"id":115},"menuButton":{"__isSmartRef__":true,"id":162},"collapseButton":{"__isSmartRef__":true,"id":196},"priorExtent":{"__isSmartRef__":true,"id":247},"owner":{"__isSmartRef__":true,"id":16},"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.TitleBar"},"101":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":102},"derivationIds":[null],"id":"3B0566F5-D10E-4962-83AC-9771F9EBD597","renderContextTable":{"__isSmartRef__":true,"id":108},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":109}],"eventHandler":{"__isSmartRef__":true,"id":111},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"hidden","fixedWidth":true,"fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"isLabel":true,"_HandStyle":"default","layout":{"__isSmartRef__":true,"id":112},"_Align":"center","eventsAreIgnored":true,"owner":{"__isSmartRef__":true,"id":100},"priorExtent":{"__isSmartRef__":true,"id":113},"_MaxTextWidth":581,"_MinTextWidth":581,"_MaxTextHeight":null,"_MinTextHeight":null,"_Position":{"__isSmartRef__":true,"id":114},"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"102":{"_Position":{"__isSmartRef__":true,"id":103},"renderContextTable":{"__isSmartRef__":true,"id":104},"_Extent":{"__isSmartRef__":true,"id":105},"_ClipMode":"hidden","_Padding":{"__isSmartRef__":true,"id":106},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":107},"_Fill":null,"_BorderRadius":0,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"103":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"104":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"105":{"x":581,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"106":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"107":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"108":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"109":{"style":{"__isSmartRef__":true,"id":110},"chunkOwner":{"__isSmartRef__":true,"id":101},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"my-d3-test-for-lively.html","__LivelyClassName__":"lively.morphic.TextChunk"},"110":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"111":{"morph":{"__isSmartRef__":true,"id":101},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"112":{"resizeWidth":true},"113":{"x":581,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"114":{"x":20,"y":3,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"115":{"submorphs":[{"__isSmartRef__":true,"id":116}],"scripts":[],"shape":{"__isSmartRef__":true,"id":128},"derivationIds":[null],"id":"0F810641-7B43-4605-BD5B-14B636B50476","renderContextTable":{"__isSmartRef__":true,"id":144},"eventHandler":{"__isSmartRef__":true,"id":145},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"_Position":{"__isSmartRef__":true,"id":146},"priorExtent":{"__isSmartRef__":true,"id":147},"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":134},"lighterFill":{"__isSmartRef__":true,"id":148},"label":{"__isSmartRef__":true,"id":116},"owner":{"__isSmartRef__":true,"id":100},"layout":{"__isSmartRef__":true,"id":157},"attributeConnections":[{"__isSmartRef__":true,"id":158},{"__isSmartRef__":true,"id":160}],"doNotSerialize":["$$getHelpText","$$fire"],"doNotCopyProperties":["$$getHelpText","$$fire"],"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.WindowControl"},"116":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":117},"derivationIds":[null],"id":"D36955D2-BC26-45BA-B27E-BF6DCB2FEF28","renderContextTable":{"__isSmartRef__":true,"id":122},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":123}],"eventHandler":{"__isSmartRef__":true,"id":125},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"hidden","fixedWidth":true,"fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":8,"_Position":{"__isSmartRef__":true,"id":126},"priorExtent":{"__isSmartRef__":true,"id":127},"_MaxTextWidth":17,"_MinTextWidth":17,"_MaxTextHeight":null,"_MinTextHeight":null,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":115},"isLabel":true,"_HandStyle":"default","_TextColor":{"__isSmartRef__":true,"id":107},"_Align":"center","eventsAreIgnored":true,"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"117":{"_Position":{"__isSmartRef__":true,"id":118},"renderContextTable":{"__isSmartRef__":true,"id":119},"_Extent":{"__isSmartRef__":true,"id":120},"_ClipMode":"hidden","_Padding":{"__isSmartRef__":true,"id":121},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":107},"_Fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"118":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"119":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"120":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"121":{"x":0,"y":3,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"122":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"123":{"style":{"__isSmartRef__":true,"id":124},"chunkOwner":{"__isSmartRef__":true,"id":116},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"X","__LivelyClassName__":"lively.morphic.TextChunk"},"124":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"125":{"morph":{"__isSmartRef__":true,"id":116},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"126":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"127":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"128":{"_Position":{"__isSmartRef__":true,"id":129},"renderContextTable":{"__isSmartRef__":true,"id":130},"_Extent":{"__isSmartRef__":true,"id":131},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":132},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":133},"_Fill":{"__isSmartRef__":true,"id":134},"_StrokeOpacity":0,"_BorderRadius":5,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"129":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"130":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"131":{"x":17,"y":17,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"132":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"133":{"r":0.7411764705882353,"g":0.7450980392156863,"b":0.7529411764705882,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"134":{"stops":[{"__isSmartRef__":true,"id":135},{"__isSmartRef__":true,"id":137},{"__isSmartRef__":true,"id":139},{"__isSmartRef__":true,"id":141}],"vector":{"__isSmartRef__":true,"id":143},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"135":{"offset":0,"color":{"__isSmartRef__":true,"id":136}},"136":{"r":0.9600000000000001,"g":0.9600000000000001,"b":0.9600000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"137":{"offset":0.4,"color":{"__isSmartRef__":true,"id":138}},"138":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"139":{"offset":0.6,"color":{"__isSmartRef__":true,"id":140}},"140":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"141":{"offset":1,"color":{"__isSmartRef__":true,"id":142}},"142":{"r":0.94,"g":0.94,"b":0.94,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"143":{"x":0,"y":0,"width":0,"height":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"144":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"145":{"morph":{"__isSmartRef__":true,"id":115},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"146":{"x":620,"y":3,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"147":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"148":{"stops":[{"__isSmartRef__":true,"id":149},{"__isSmartRef__":true,"id":151},{"__isSmartRef__":true,"id":153},{"__isSmartRef__":true,"id":155}],"vector":{"__isSmartRef__":true,"id":143},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"149":{"offset":0,"color":{"__isSmartRef__":true,"id":150}},"150":{"r":0.98,"g":0.98,"b":0.98,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"151":{"offset":0.4,"color":{"__isSmartRef__":true,"id":152}},"152":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"153":{"offset":0.6,"color":{"__isSmartRef__":true,"id":154}},"154":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"155":{"offset":1,"color":{"__isSmartRef__":true,"id":156}},"156":{"r":0.97,"g":0.97,"b":0.97,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"157":{"moveHorizontal":true},"158":{"sourceObj":{"__isSmartRef__":true,"id":115},"sourceAttrName":"getHelpText","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"getCloseHelp","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":159},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"159":{"source":{"__isSmartRef__":true,"id":115},"target":{"__isSmartRef__":true,"id":16}},"160":{"sourceObj":{"__isSmartRef__":true,"id":115},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"initiateShutdown","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":161},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"161":{"source":{"__isSmartRef__":true,"id":115},"target":{"__isSmartRef__":true,"id":16}},"162":{"submorphs":[{"__isSmartRef__":true,"id":163}],"scripts":[],"shape":{"__isSmartRef__":true,"id":174},"derivationIds":[null],"id":"56EC1207-7316-4F80-94FF-E01E3F2CA0A3","renderContextTable":{"__isSmartRef__":true,"id":179},"eventHandler":{"__isSmartRef__":true,"id":180},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"_Position":{"__isSmartRef__":true,"id":181},"priorExtent":{"__isSmartRef__":true,"id":182},"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":134},"lighterFill":{"__isSmartRef__":true,"id":183},"label":{"__isSmartRef__":true,"id":163},"owner":{"__isSmartRef__":true,"id":100},"attributeConnections":[{"__isSmartRef__":true,"id":192},{"__isSmartRef__":true,"id":194}],"doNotSerialize":["$$getHelpText","$$fire"],"doNotCopyProperties":["$$getHelpText","$$fire"],"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.WindowControl"},"163":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":164},"derivationIds":[null],"id":"58FB7AAC-AE37-4076-9CC3-C04E0DC51540","renderContextTable":{"__isSmartRef__":true,"id":168},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":169}],"eventHandler":{"__isSmartRef__":true,"id":171},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"hidden","fixedWidth":true,"fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":8,"_Position":{"__isSmartRef__":true,"id":172},"priorExtent":{"__isSmartRef__":true,"id":173},"_MaxTextWidth":17,"_MinTextWidth":17,"_MaxTextHeight":null,"_MinTextHeight":null,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":162},"isLabel":true,"_HandStyle":"default","_TextColor":{"__isSmartRef__":true,"id":107},"_Align":"center","eventsAreIgnored":true,"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"164":{"_Position":{"__isSmartRef__":true,"id":165},"renderContextTable":{"__isSmartRef__":true,"id":166},"_Extent":{"__isSmartRef__":true,"id":167},"_ClipMode":"hidden","_Padding":{"__isSmartRef__":true,"id":121},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":107},"_Fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"165":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"166":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"167":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"168":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"169":{"style":{"__isSmartRef__":true,"id":170},"chunkOwner":{"__isSmartRef__":true,"id":163},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"M","__LivelyClassName__":"lively.morphic.TextChunk"},"170":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"171":{"morph":{"__isSmartRef__":true,"id":163},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"172":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"173":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"174":{"_Position":{"__isSmartRef__":true,"id":175},"renderContextTable":{"__isSmartRef__":true,"id":176},"_Extent":{"__isSmartRef__":true,"id":177},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":178},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":133},"_Fill":{"__isSmartRef__":true,"id":134},"_StrokeOpacity":0,"_BorderRadius":5,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"175":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"176":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"177":{"x":17,"y":17,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"178":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"179":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"180":{"morph":{"__isSmartRef__":true,"id":162},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"181":{"x":3,"y":3,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"182":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"183":{"stops":[{"__isSmartRef__":true,"id":184},{"__isSmartRef__":true,"id":186},{"__isSmartRef__":true,"id":188},{"__isSmartRef__":true,"id":190}],"vector":{"__isSmartRef__":true,"id":143},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"184":{"offset":0,"color":{"__isSmartRef__":true,"id":185}},"185":{"r":0.98,"g":0.98,"b":0.98,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"186":{"offset":0.4,"color":{"__isSmartRef__":true,"id":187}},"187":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"188":{"offset":0.6,"color":{"__isSmartRef__":true,"id":189}},"189":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"190":{"offset":1,"color":{"__isSmartRef__":true,"id":191}},"191":{"r":0.97,"g":0.97,"b":0.97,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"192":{"sourceObj":{"__isSmartRef__":true,"id":162},"sourceAttrName":"getHelpText","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"getMenuHelp","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":193},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"193":{"source":{"__isSmartRef__":true,"id":162},"target":{"__isSmartRef__":true,"id":16}},"194":{"sourceObj":{"__isSmartRef__":true,"id":162},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"showTargetMorphMenu","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":195},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"195":{"source":{"__isSmartRef__":true,"id":162},"target":{"__isSmartRef__":true,"id":16}},"196":{"submorphs":[{"__isSmartRef__":true,"id":197}],"scripts":[],"shape":{"__isSmartRef__":true,"id":208},"derivationIds":[null],"id":"438EE77C-92F6-4BC2-B59C-4C8950E18C1F","renderContextTable":{"__isSmartRef__":true,"id":213},"eventHandler":{"__isSmartRef__":true,"id":214},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"accessibleInInactiveWindow":true,"_Position":{"__isSmartRef__":true,"id":215},"priorExtent":{"__isSmartRef__":true,"id":216},"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":134},"lighterFill":{"__isSmartRef__":true,"id":217},"label":{"__isSmartRef__":true,"id":197},"owner":{"__isSmartRef__":true,"id":100},"layout":{"__isSmartRef__":true,"id":226},"attributeConnections":[{"__isSmartRef__":true,"id":227},{"__isSmartRef__":true,"id":229}],"doNotSerialize":["$$getHelpText","$$fire"],"doNotCopyProperties":["$$getHelpText","$$fire"],"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.WindowControl"},"197":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":198},"derivationIds":[null],"id":"1399D37A-6B71-401F-B43A-23BD1F739E57","renderContextTable":{"__isSmartRef__":true,"id":202},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":203}],"eventHandler":{"__isSmartRef__":true,"id":205},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"hidden","fixedWidth":true,"fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":8,"_Position":{"__isSmartRef__":true,"id":206},"priorExtent":{"__isSmartRef__":true,"id":207},"_MaxTextWidth":17,"_MinTextWidth":17,"_MaxTextHeight":null,"_MinTextHeight":null,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":196},"isLabel":true,"_HandStyle":"default","_TextColor":{"__isSmartRef__":true,"id":107},"_Align":"center","eventsAreIgnored":true,"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"198":{"_Position":{"__isSmartRef__":true,"id":199},"renderContextTable":{"__isSmartRef__":true,"id":200},"_Extent":{"__isSmartRef__":true,"id":201},"_ClipMode":"hidden","_Padding":{"__isSmartRef__":true,"id":121},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":107},"_Fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"199":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"200":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"201":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"202":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"203":{"style":{"__isSmartRef__":true,"id":204},"chunkOwner":{"__isSmartRef__":true,"id":197},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"–","__LivelyClassName__":"lively.morphic.TextChunk"},"204":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"205":{"morph":{"__isSmartRef__":true,"id":197},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"206":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"207":{"x":17,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"208":{"_Position":{"__isSmartRef__":true,"id":209},"renderContextTable":{"__isSmartRef__":true,"id":210},"_Extent":{"__isSmartRef__":true,"id":211},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":212},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":133},"_Fill":{"__isSmartRef__":true,"id":134},"_StrokeOpacity":0,"_BorderRadius":5,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"209":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"210":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"211":{"x":17,"y":17,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"212":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"213":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"214":{"morph":{"__isSmartRef__":true,"id":196},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"215":{"x":601,"y":3,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"216":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"217":{"stops":[{"__isSmartRef__":true,"id":218},{"__isSmartRef__":true,"id":220},{"__isSmartRef__":true,"id":222},{"__isSmartRef__":true,"id":224}],"vector":{"__isSmartRef__":true,"id":143},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"218":{"offset":0,"color":{"__isSmartRef__":true,"id":219}},"219":{"r":0.98,"g":0.98,"b":0.98,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"220":{"offset":0.4,"color":{"__isSmartRef__":true,"id":221}},"221":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"222":{"offset":0.6,"color":{"__isSmartRef__":true,"id":223}},"223":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"224":{"offset":1,"color":{"__isSmartRef__":true,"id":225}},"225":{"r":0.97,"g":0.97,"b":0.97,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"226":{"moveHorizontal":true},"227":{"sourceObj":{"__isSmartRef__":true,"id":196},"sourceAttrName":"getHelpText","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"getCollapseHelp","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":228},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"228":{"source":{"__isSmartRef__":true,"id":196},"target":{"__isSmartRef__":true,"id":16}},"229":{"sourceObj":{"__isSmartRef__":true,"id":196},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":16},"targetMethodName":"toggleCollapse","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":230},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"230":{"source":{"__isSmartRef__":true,"id":196},"target":{"__isSmartRef__":true,"id":16}},"231":{"_Position":{"__isSmartRef__":true,"id":232},"renderContextTable":{"__isSmartRef__":true,"id":233},"_Extent":{"__isSmartRef__":true,"id":234},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":235},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":236},"_Fill":{"__isSmartRef__":true,"id":237},"_StrokeOpacity":1,"_BorderRadius":"8px 8px 0px 0px","__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"232":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"233":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"234":{"x":640,"y":22,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"235":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"236":{"r":0.4,"g":0.4,"b":0.4,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"237":{"stops":[{"__isSmartRef__":true,"id":238},{"__isSmartRef__":true,"id":240}],"vector":{"__isSmartRef__":true,"id":242},"__LivelyClassName__":"lively.morphic.LinearGradient","__SourceModuleName__":"Global.lively.morphic.Shapes"},"238":{"offset":0,"color":{"__isSmartRef__":true,"id":239}},"239":{"r":1,"g":1,"b":1,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"240":{"offset":1,"color":{"__isSmartRef__":true,"id":241}},"241":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"242":{"x":0,"y":0,"width":0,"height":1,"__LivelyClassName__":"Rectangle","__SourceModuleName__":"Global"},"243":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"244":{"morph":{"__isSmartRef__":true,"id":100},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"245":{"resizeWidth":true,"adjustForNewBounds":true},"246":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"247":{"x":640,"y":22,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"248":{"renderContextTable":{"__isSmartRef__":true,"id":249},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":250},"_BorderWidth":0,"_Fill":null,"_StrokeOpacity":0,"_BorderRadius":0,"_Extent":{"__isSmartRef__":true,"id":251},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"249":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"250":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"251":{"x":640,"y":705,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"252":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"253":{"morph":{"__isSmartRef__":true,"id":16},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"254":{"adjustForNewBounds":true},"255":{"x":609,"y":16,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"256":{"x":640,"y":705,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"257":{"x":730,"y":25,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"258":{"submorphs":[{"__isSmartRef__":true,"id":259},{"__isSmartRef__":true,"id":302}],"scripts":[],"id":"955D3BE9-AEEE-4D37-A4E8-370D241ABA71","shape":{"__isSmartRef__":true,"id":426},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":434},"showsHalos":false,"name":"ProtovisDrawing","partsBinMetaInfo":{"__isSmartRef__":true,"id":435},"__SourceModuleName__":"Global.lively.morphic.Core","renderContextTable":{"__isSmartRef__":true,"id":438},"eventHandler":{"__isSmartRef__":true,"id":439},"layout":{"__isSmartRef__":true,"id":440},"priorExtent":{"__isSmartRef__":true,"id":441},"connections":{"__isSmartRef__":true,"id":442},"attributeConnections":[],"doNotSerialize":[],"doNotCopyProperties":[],"isBeingDragged":false,"derivationIds":[1408],"owner":{"__isSmartRef__":true,"id":0},"_Rotation":0,"_Scale":1.0060210561262526,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":444},"__LivelyClassName__":"lively.morphic.Box"},"259":{"submorphs":[{"__isSmartRef__":true,"id":260}],"scripts":[],"id":"373D4394-4603-471B-82FA-D97A2C45E73C","shape":{"__isSmartRef__":true,"id":275},"grabbingEnabled":false,"droppingEnabled":false,"showsMorphMenu":true,"halosEnabled":true,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":291},"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":278},"lighterFill":{"__isSmartRef__":true,"id":292},"label":{"__isSmartRef__":true,"id":260},"attributeConnections":[{"__isSmartRef__":true,"id":301}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"showsHalos":false,"__SourceModuleName__":"Global.lively.morphic.Widgets","padding":{"__isSmartRef__":true,"id":421},"name":"resetButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":422},"renderContextTable":{"__isSmartRef__":true,"id":423},"eventHandler":{"__isSmartRef__":true,"id":424},"owner":{"__isSmartRef__":true,"id":258},"distanceToDragEvent":{"__isSmartRef__":true,"id":425},"derivationIds":[1409],"_Rotation":0,"_Scale":1.089423869470782,"__LivelyClassName__":"lively.morphic.Button"},"260":{"submorphs":[],"scripts":[],"id":"BBC4A926-B8C4-41A6-B668-81E74F0271CD","shape":{"__isSmartRef__":true,"id":261},"grabbingEnabled":false,"droppingEnabled":false,"showsMorphMenu":false,"halosEnabled":true,"fixedWidth":true,"_MaxTextWidth":116,"_MaxTextHeight":null,"fixedHeight":true,"allowsInput":false,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":267},"textColor":{"__isSmartRef__":true,"id":264},"owner":{"__isSmartRef__":true,"id":259},"eventsAreIgnored":true,"__SourceModuleName__":"Global.lively.morphic.TextCore","textChunks":[{"__isSmartRef__":true,"id":268}],"padding":{"__isSmartRef__":true,"id":270},"_Padding":{"__isSmartRef__":true,"id":271},"prevScroll":[0,0],"priorExtent":{"__isSmartRef__":true,"id":272},"_FontFamily":"Helvetica, Sans-Serif","renderContextTable":{"__isSmartRef__":true,"id":273},"eventHandler":{"__isSmartRef__":true,"id":274},"_HandStyle":"default","_PointerEvents":"none","_ClipMode":"visible","_WhiteSpaceHandling":"pre-wrap","_Align":"center","attributeConnections":[],"doNotSerialize":[],"doNotCopyProperties":[],"_MinTextWidth":116,"_MinTextHeight":null,"derivationIds":[1410],"__LivelyClassName__":"lively.morphic.Text"},"261":{"borderWidth":0,"fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":262},"_Extent":{"__isSmartRef__":true,"id":263},"_BorderColor":{"__isSmartRef__":true,"id":264},"renderContextTable":{"__isSmartRef__":true,"id":265},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":266},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"262":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"263":{"x":116,"y":18,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"264":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"265":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"266":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"267":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"268":{"style":{"__isSmartRef__":true,"id":269},"chunkOwner":{"__isSmartRef__":true,"id":260},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"reset","__LivelyClassName__":"lively.morphic.TextChunk"},"269":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"270":{"x":5,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"271":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"272":{"x":116,"y":18,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"273":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"274":{"morph":{"__isSmartRef__":true,"id":260},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"275":{"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":276},"_Extent":{"__isSmartRef__":true,"id":277},"_Fill":{"__isSmartRef__":true,"id":278},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":288},"_BorderRadius":5,"renderContextTable":{"__isSmartRef__":true,"id":289},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":290},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"276":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"277":{"x":116,"y":20,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"278":{"stops":[{"__isSmartRef__":true,"id":279},{"__isSmartRef__":true,"id":281},{"__isSmartRef__":true,"id":283},{"__isSmartRef__":true,"id":285}],"vector":{"__isSmartRef__":true,"id":287},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"279":{"offset":0,"color":{"__isSmartRef__":true,"id":280}},"280":{"r":0.9600000000000001,"g":0.9600000000000001,"b":0.9600000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"281":{"offset":0.4,"color":{"__isSmartRef__":true,"id":282}},"282":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"283":{"offset":0.6,"color":{"__isSmartRef__":true,"id":284}},"284":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"285":{"offset":1,"color":{"__isSmartRef__":true,"id":286}},"286":{"r":0.94,"g":0.94,"b":0.94,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"287":{"x":0,"y":0,"width":0,"height":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"288":{"r":0.839,"g":0.839,"b":0.839,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"289":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"290":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"291":{"x":116.98227848038027,"y":-225.53994003998997,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"292":{"stops":[{"__isSmartRef__":true,"id":293},{"__isSmartRef__":true,"id":295},{"__isSmartRef__":true,"id":297},{"__isSmartRef__":true,"id":299}],"vector":{"__isSmartRef__":true,"id":287},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"293":{"offset":0,"color":{"__isSmartRef__":true,"id":294}},"294":{"r":0.98,"g":0.98,"b":0.98,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"295":{"offset":0.4,"color":{"__isSmartRef__":true,"id":296}},"296":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"297":{"offset":0.6,"color":{"__isSmartRef__":true,"id":298}},"298":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"299":{"offset":1,"color":{"__isSmartRef__":true,"id":300}},"300":{"r":0.97,"g":0.97,"b":0.97,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"301":{"sourceObj":{"__isSmartRef__":true,"id":259},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":302},"targetMethodName":"reset","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":420},"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"302":{"submorphs":[],"scripts":[],"id":"EA05B8F8-8497-43B9-B11F-7F6C38C06903","shape":{"__isSmartRef__":true,"id":303},"droppingEnabled":true,"halosEnabled":true,"data":[5,8,6,12],"doNotSerialize":["vis"],"showsHalos":false,"_Position":{"__isSmartRef__":true,"id":310},"name":"ProtovisMorph","partsBinMetaInfo":{"__isSmartRef__":true,"id":311},"__SourceModuleName__":"Global.apps.ProtoVisInterface","graph":{"__isSmartRef__":true,"id":312},"priorExtent":{"__isSmartRef__":true,"id":344},"layout":{"__isSmartRef__":true,"id":345},"_ClipMode":"visible","renderContextTable":{"__isSmartRef__":true,"id":346},"eventHandler":{"__isSmartRef__":true,"id":347},"attributeConnections":[],"doNotCopyProperties":[],"owner":{"__isSmartRef__":true,"id":258},"distanceToDragEvent":{"__isSmartRef__":true,"id":348},"scriptAnnotations":{"__isSmartRef__":true,"id":349},"isBeingDragged":false,"connections":{"__isSmartRef__":true,"id":364},"maxDataLength":100,"derivationIds":[1411],"_Rotation":0,"_Scale":0.996005996001,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":366},"__LivelyClassName__":"ProtoVisMorph"},"303":{"position":{"__isSmartRef__":true,"id":304},"_Extent":{"__isSmartRef__":true,"id":305},"_Fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_BorderColor":{"__isSmartRef__":true,"id":306},"_BorderWidth":1.484,"_Position":{"__isSmartRef__":true,"id":307},"renderContextTable":{"__isSmartRef__":true,"id":308},"_BorderRadius":0,"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":309},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"304":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"305":{"x":496,"y":493,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"306":{"r":0.572,"g":0.572,"b":0.572,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"307":{"x":6.72295955392093,"y":2.2409865179703843,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"308":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"309":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"310":{"x":-255.14389450453177,"y":-199.38173624485555,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"311":{"migrationLevel":2,"partsSpaceName":"PartsBin/NewWorld","__SourceModuleName__":"Global.lively.PartsBin","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"312":{"analytics":{"__isSmartRef__":true,"id":313},"animate":{"__isSmartRef__":true,"id":317},"data":{"__isSmartRef__":true,"id":319},"display":{"__isSmartRef__":true,"id":321},"flex":{"__isSmartRef__":true,"id":322},"physics":{"__isSmartRef__":true,"id":323},"query":{"__isSmartRef__":true,"id":324},"scale":{"__isSmartRef__":true,"id":326},"util":{"__isSmartRef__":true,"id":327},"vis":{"__isSmartRef__":true,"id":331}},"313":{"cluster":{"__isSmartRef__":true,"id":314},"graph":{"__isSmartRef__":true,"id":315},"optimization":{"__isSmartRef__":true,"id":316}},"314":{"AgglomerativeCluster":3938,"CommunityStructure":3812,"HierarchicalCluster":6714,"MergeEdge":743},"315":{"BetweennessCentrality":3534,"LinkDistance":5731,"MaxFlowMinCut":7840,"ShortestPaths":5914,"SpanningTree":3416},"316":{"AspectRatioBanker":7074},"317":{"Easing":17010,"FunctionSequence":5842,"interpolate":{"__isSmartRef__":true,"id":318},"ISchedulable":1041,"Parallel":5176,"Pause":449,"Scheduler":5593,"Sequence":5534,"Transition":9201,"Transitioner":19975,"TransitionEvent":1116,"Tween":6006},"318":{"ArrayInterpolator":1983,"ColorInterpolator":2047,"DateInterpolator":1375,"Interpolator":8746,"MatrixInterpolator":2202,"NumberInterpolator":1382,"ObjectInterpolator":1629,"PointInterpolator":1675,"RectangleInterpolator":2042},"319":{"converters":{"__isSmartRef__":true,"id":320},"DataField":1759,"DataSchema":2165,"DataSet":586,"DataSource":3331,"DataTable":772,"DataUtil":3322},"320":{"Converters":721,"DelimitedTextConverter":4294,"GraphMLConverter":9800,"IDataConverter":1314,"JSONConverter":2220},"321":{"DirtySprite":8833,"LineSprite":1732,"RectSprite":3623,"TextSprite":10066},"322":{"FlareVis":4116},"323":{"DragForce":1082,"GravityForce":1336,"IForce":319,"NBodyForce":10498,"Particle":2822,"Simulation":9983,"Spring":2213,"SpringForce":1681},"324":{"AggregateExpression":1616,"And":1027,"Arithmetic":3891,"Average":891,"BinaryExpression":2893,"Comparison":5103,"CompositeExpression":3677,"Count":781,"DateUtil":4141,"Distinct":933,"Expression":5130,"ExpressionIterator":3617,"Fn":3240,"If":2732,"IsA":2039,"Literal":1214,"Match":3748,"Maximum":843,"methods":{"__isSmartRef__":true,"id":325},"Minimum":843,"Not":1554,"Or":970,"Query":13896,"Range":1594,"StringUtil":4130,"Sum":791,"Variable":1124,"Variance":1876,"Xor":1101},"325":{"add":593,"and":330,"average":287,"count":277,"distinct":292,"div":595,"eq":594,"fn":460,"gt":603,"gte":625,"iff":748,"isa":461,"lt":597,"lte":619,"max":283,"min":283,"mod":591,"mul":603,"neq":599,"not":386,"or":323,"orderby":307,"range":772,"select":296,"stddev":363,"sub":600,"sum":280,"update":307,"variance":335,"where":299,"xor":354,"_":264},"326":{"IScaleMap":2105,"LinearScale":1316,"LogScale":3151,"OrdinalScale":3770,"QuantileScale":2435,"QuantitativeScale":4839,"RootScale":1756,"Scale":4268,"ScaleType":1821,"TimeScale":5833},"327":{"Arrays":8258,"Colors":10001,"Dates":8217,"Displays":12555,"Filter":2324,"Geometry":10993,"heap":{"__isSmartRef__":true,"id":328},"IEvaluable":335,"IPredicate":383,"IValueProxy":874,"math":{"__isSmartRef__":true,"id":329},"Maths":17705,"Orientation":1486,"palette":{"__isSmartRef__":true,"id":330},"Property":5559,"Shapes":19118,"Sort":6887,"Stats":6557,"Strings":22026},"328":{"FibonacciHeap":9354,"HeapNode":1233},"329":{"DenseMatrix":3165,"IMatrix":2815,"SparseMatrix":3366},"330":{"ColorPalette":6367,"Palette":1229,"ShapePalette":2059,"SizePalette":2291},"331":{"axis":{"__isSmartRef__":true,"id":332},"controls":{"__isSmartRef__":true,"id":333},"data":{"__isSmartRef__":true,"id":334},"events":{"__isSmartRef__":true,"id":336},"legend":{"__isSmartRef__":true,"id":337},"operator":{"__isSmartRef__":true,"id":338},"Visualization":16540},"332":{"Axes":1302,"Axis":24593,"AxisGridLine":652,"AxisLabel":636,"CartesianAxes":6703},"333":{"AnchorControl":2138,"ClickControl":3824,"Control":1353,"ControlList":4665,"DragControl":2649,"ExpandControl":2832,"HoverControl":4896,"IControl":763,"PanZoomControl":5222,"SelectionControl":7862,"TooltipControl":8435},"334":{"Data":20544,"DataList":19788,"DataSprite":10349,"EdgeSprite":3301,"NodeSprite":19382,"render":{"__isSmartRef__":true,"id":335},"ScaleBinding":11275,"Tree":7147,"TreeBuilder":9930},"335":{"ArrowType":698,"EdgeRenderer":5569,"IRenderer":353,"ShapeRenderer":2247},"336":{"DataEvent":2313,"SelectionEvent":1880,"TooltipEvent":1701,"VisualizationEvent":1117},"337":{"Legend":20859,"LegendItem":4614,"LegendRange":10530},"338":{"distortion":{"__isSmartRef__":true,"id":339},"encoder":{"__isSmartRef__":true,"id":340},"filter":{"__isSmartRef__":true,"id":341},"IOperator":1286,"label":{"__isSmartRef__":true,"id":342},"layout":{"__isSmartRef__":true,"id":343},"Operator":2490,"OperatorList":5248,"OperatorSequence":4190,"OperatorSwitch":2581,"SortOperator":2023},"339":{"BifocalDistortion":4461,"Distortion":6314,"FisheyeDistortion":3444},"340":{"ColorEncoder":3179,"Encoder":4060,"PropertyEncoder":4138,"ShapeEncoder":1690,"SizeEncoder":1830},"341":{"FisheyeTreeFilter":5219,"GraphDistanceFilter":3165,"VisibilityFilter":3509},"342":{"Labeler":9956,"RadialLabeler":3899,"StackedAreaLabeler":3202},"343":{"AxisLayout":6725,"BundledEdgeRouter":3727,"CircleLayout":9317,"CirclePackingLayout":12003,"DendrogramLayout":4853,"ForceDirectedLayout":8411,"IcicleTreeLayout":4864,"IndentedTreeLayout":3174,"Layout":7881,"NodeLinkTreeLayout":12870,"PieLayout":2728,"RadialTreeLayout":12348,"RandomLayout":870,"StackedAreaLayout":9121,"TreeMapLayout":9191},"344":{"x":495,"y":493,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"345":{"resizeWidth":true,"resizeHeight":true,"moveVertical":false,"moveHorizontal":false},"346":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"347":{"morph":{"__isSmartRef__":true,"id":302},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"348":{"x":228.15662601665827,"y":-246.15021578713652,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"349":{"addDataAndRender":{"__isSmartRef__":true,"id":350},"drawAreaChart":{"__isSmartRef__":true,"id":352},"draw":{"__isSmartRef__":true,"id":354},"drawBarChart":{"__isSmartRef__":true,"id":356},"drawPieChart":{"__isSmartRef__":true,"id":358},"setChartType":{"__isSmartRef__":true,"id":360},"reset":{"__isSmartRef__":true,"id":362}},"350":{"time":{"__isSmartRef__":true,"id":351},"user":"robertkrahn"},"351":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:48:47 GMT-0500 (CDT)"},"352":{"time":{"__isSmartRef__":true,"id":353},"user":"robertkrahn"},"353":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:50:13 GMT-0500 (CDT)"},"354":{"time":{"__isSmartRef__":true,"id":355},"user":"robertkrahn"},"355":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:51:31 GMT-0500 (CDT)"},"356":{"time":{"__isSmartRef__":true,"id":357},"user":"robertkrahn"},"357":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:52:17 GMT-0500 (CDT)"},"358":{"time":{"__isSmartRef__":true,"id":359},"user":"robertkrahn"},"359":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:52:21 GMT-0500 (CDT)"},"360":{"time":{"__isSmartRef__":true,"id":361},"user":"robertkrahn"},"361":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:52:24 GMT-0500 (CDT)"},"362":{"time":{"__isSmartRef__":true,"id":363},"user":"robertkrahn"},"363":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:52:38 GMT-0500 (CDT)"},"364":{"addDataAndRender":{"__isSmartRef__":true,"id":365}},"365":{},"366":{"restoreRenderContextAfterCopy":{"__isSmartRef__":true,"id":367},"draw":{"__isSmartRef__":true,"id":374},"setupExample":{"__isSmartRef__":true,"id":385},"render":{"__isSmartRef__":true,"id":388},"setDataAndRender":{"__isSmartRef__":true,"id":395},"prepareForNewRenderContext":{"__isSmartRef__":true,"id":398},"addDataAndRender":{"__isSmartRef__":true,"id":405},"drawAreaChart":{"__isSmartRef__":true,"id":381},"drawBarChart":{"__isSmartRef__":true,"id":408},"drawPieChart":{"__isSmartRef__":true,"id":411},"setChartType":{"__isSmartRef__":true,"id":414},"reset":{"__isSmartRef__":true,"id":417}},"367":{"varMapping":{"__isSmartRef__":true,"id":368},"source":"function restoreRenderContextAfterCopy(renderCtx) {\n $super(renderCtx);\n lively.bindings.callWhenNotNull(Global, 'pv', this, 'render');\n}","funcProperties":{"__isSmartRef__":true,"id":373},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"368":{"this":{"__isSmartRef__":true,"id":302},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":369}},"369":{"$super":{"__isSmartRef__":true,"id":370}},"370":{"varMapping":{"__isSmartRef__":true,"id":371},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":372},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"371":{"obj":{"__isSmartRef__":true,"id":302},"name":"restoreRenderContextAfterCopy"},"372":{},"373":{},"374":{"varMapping":{"__isSmartRef__":true,"id":375},"source":"function drawAreaChart(w, h) {\n\tw = w - 30;\n\th = h - 25;\n\n\tvar vis = new pv.Panel()\n\t\t.width(w)\n\t\t.height(h)\n\t\t.bottom(20)\n\t\t.left(20)\n\t\t.right(10)\n\t\t.top(5);\n\n\tvar xMin = pv.min(this.data.collect(function(d) {\n\t\t\treturn d instanceof Array ? d[0] : null;\n\t\t})),\n\t\txMax = Math.max(\n\t\t\tthis.data.length - 1,\n\t\t\tpv.max(this.data.collect(function(d) {\n\t\t\t\treturn d instanceof Array ? d[0] : null;\n\t\t\t}))\n\t\t),\n\t\tyVals = this.data.collect(function(d) {\n\t\t\treturn d instanceof Array ? d[1] : d;\n\t\t}),\n\t\tx = (this.xScale ?\n\t\t\t(this.xScale.hasOwnProperty('isWrapper') ? this.xScale(xMax) : this.xScale) :\n\t\t\tpv.Scale.linear(xMin, xMax)\n\t\t).range(0, w),\n\t\ty = (this.yScale ?\n\t\t\t(this.yScale.hasOwnProperty('isWrapper') ? this.yScale(pv.max(yVals)) : this.yScale) :\n\t\t\tpv.Scale.linear(\n\t\t\t\tpv.min(yVals.concat(0)),\n\t\t\t\tpv.max(yVals)\n\t\t\t)\n\t\t).range(0, h);\n\n\tvis.add(pv.Rule)\n\t\t.data(y.ticks())\n\t\t.bottom(y)\n\t\t.strokeStyle(function(d) { return d ? \"#eee\" : \"#000\"; })\n\t.anchor(\"left\").add(pv.Label)\n\t\t.text(this.yFormat || y.tickFormat);\n\n\tvis.add(pv.Rule)\n\t\t.data(x.ticks().length < this.data.length ? x.ticks() : x.ticks(this.data.length))\n\t\t.visible(function(d) { return d != 0; })\n\t\t.left(x)\n\t\t.bottom(-5)\n\t\t.height(5)\n\t.anchor(\"bottom\").add(pv.Label)\n\t .text(this.xFormat || x.tickFormat);\n\n\tvis.add(pv.Area)\n\t\t.def('idx', 0)\n\t\t.data(this.data)\n\t\t.bottom(1)\n\t\t.left(function(d) {\n\t\t\tvar idx = this.idx();\n\n\t\t\tif (d instanceof Array)\n\t\t\t\tidx = d[0];\n\t\t\tthis.idx(idx + 1);\n\t\t\n\t\t\treturn x(idx);\n\t\t})\n\t\t.height(function(d) {\n\t\t\tif (d instanceof Array)\n\t\t\t\td = d[1];\n\t\t\treturn y(d);\n\t\t})\n\t\t.fillStyle(\"rgb(121,173,210)\")\n\t.anchor(\"top\").add(pv.Line)\n\t\t.lineWidth(3);\n\n\treturn vis;\n}","funcProperties":{"__isSmartRef__":true,"id":380},"__SourceModuleName__":"Global","__serializedLivelyClosures__":{"__isSmartRef__":true,"id":384},"__LivelyClassName__":"lively.Closure"},"375":{"this":{"__isSmartRef__":true,"id":302},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":376}},"376":{"$super":{"__isSmartRef__":true,"id":377}},"377":{"varMapping":{"__isSmartRef__":true,"id":378},"source":"function () {\n try {\n return obj.constructor.prototype[name].apply(obj, arguments)\n } catch(e) {\n alert('Error in $super call: ' + e + '\\n' + e.stack);\n return null;\n }\n }","funcProperties":{"__isSmartRef__":true,"id":379},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"378":{"obj":{"__isSmartRef__":true,"id":302},"name":"draw"},"379":{},"380":{"hasLivelyClosure":true,"livelyClosure":{"__isSmartRef__":true,"id":381}},"381":{"varMapping":{"__isSmartRef__":true,"id":382},"source":"function drawAreaChart(w, h) {\n\tw = w - 30;\n\th = h - 25;\n\n\tvar vis = new pv.Panel()\n\t\t.width(w)\n\t\t.height(h)\n\t\t.bottom(20)\n\t\t.left(20)\n\t\t.right(10)\n\t\t.top(5);\n\n\tvar xMin = pv.min(this.data.collect(function(d) {\n\t\t\treturn d instanceof Array ? d[0] : null;\n\t\t})),\n\t\txMax = Math.max(\n\t\t\tthis.data.length - 1,\n\t\t\tpv.max(this.data.collect(function(d) {\n\t\t\t\treturn d instanceof Array ? d[0] : null;\n\t\t\t}))\n\t\t),\n\t\tyVals = this.data.collect(function(d) {\n\t\t\treturn d instanceof Array ? d[1] : d;\n\t\t}),\n\t\tx = (this.xScale ?\n\t\t\t(this.xScale.hasOwnProperty('isWrapper') ? this.xScale(xMax) : this.xScale) :\n\t\t\tpv.Scale.linear(xMin, xMax)\n\t\t).range(0, w),\n\t\ty = (this.yScale ?\n\t\t\t(this.yScale.hasOwnProperty('isWrapper') ? this.yScale(pv.max(yVals)) : this.yScale) :\n\t\t\tpv.Scale.linear(\n\t\t\t\tpv.min(yVals.concat(0)),\n\t\t\t\tpv.max(yVals)\n\t\t\t)\n\t\t).range(0, h);\n\n\tvis.add(pv.Rule)\n\t\t.data(y.ticks())\n\t\t.bottom(y)\n\t\t.strokeStyle(function(d) { return d ? \"#eee\" : \"#000\"; })\n\t.anchor(\"left\").add(pv.Label)\n\t\t.text(this.yFormat || y.tickFormat);\n\n\tvis.add(pv.Rule)\n\t\t.data(x.ticks().length < this.data.length ? x.ticks() : x.ticks(this.data.length))\n\t\t.visible(function(d) { return d != 0; })\n\t\t.left(x)\n\t\t.bottom(-5)\n\t\t.height(5)\n\t.anchor(\"bottom\").add(pv.Label)\n\t .text(this.xFormat || x.tickFormat);\n\n\tvis.add(pv.Area)\n\t\t.def('idx', 0)\n\t\t.data(this.data)\n\t\t.bottom(1)\n\t\t.left(function(d) {\n\t\t\tvar idx = this.idx();\n\n\t\t\tif (d instanceof Array)\n\t\t\t\tidx = d[0];\n\t\t\tthis.idx(idx + 1);\n\t\t\n\t\t\treturn x(idx);\n\t\t})\n\t\t.height(function(d) {\n\t\t\tif (d instanceof Array)\n\t\t\t\td = d[1];\n\t\t\treturn y(d);\n\t\t})\n\t\t.fillStyle(\"rgb(121,173,210)\")\n\t.anchor(\"top\").add(pv.Line)\n\t\t.lineWidth(3);\n\n\treturn vis;\n}","funcProperties":{"__isSmartRef__":true,"id":383},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"382":{"this":{"__isSmartRef__":true,"id":302}},"383":{},"384":{"originalFunc":{"__isSmartRef__":true,"id":381}},"385":{"varMapping":{"__isSmartRef__":true,"id":386},"source":"function setupExample() {\n this.graph = {}; \n this.graph.nodes = [\n {nodeName:\"ObjectA\", group:1},\n {nodeName:\"ObjectB\", group:1},\n ];\n this.graph.links = [\n {source:0, target:1, value:1},\n ];\n}","funcProperties":{"__isSmartRef__":true,"id":387},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"386":{"this":{"__isSmartRef__":true,"id":302}},"387":{},"388":{"varMapping":{"__isSmartRef__":true,"id":389},"source":"function render() {\n this.removeDrawing();\n\n var w = this.getExtent().x,\n h = this.getExtent().y;\n this.vis = this.draw(w, h);\n\n var svg = this.renderContext().svgNode;\n if (svg) svg.parentNode.removeChild(svg)\n var svg = NodeFactory.create('svg');\n this.renderContext().shapeNode.appendChild(svg);\n this.renderContext().svgNode = svg;\n this.vis.canvas(svg);\n this.vis.render();\n}","funcProperties":{"__isSmartRef__":true,"id":394},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"389":{"this":{"__isSmartRef__":true,"id":302},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":390}},"390":{"$super":{"__isSmartRef__":true,"id":391}},"391":{"varMapping":{"__isSmartRef__":true,"id":392},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":393},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"392":{"obj":{"__isSmartRef__":true,"id":302},"name":"render"},"393":{},"394":{},"395":{"varMapping":{"__isSmartRef__":true,"id":396},"source":"function setDataAndRender(data) {\n this.data = data;\t\n this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":397},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"396":{"this":{"__isSmartRef__":true,"id":302}},"397":{},"398":{"varMapping":{"__isSmartRef__":true,"id":399},"source":"function prepareForNewRenderContext(renderCtx) {\n $super(renderCtx);\n lively.bindings.callWhenNotNull(Global, 'pv', this, 'render');\n}","funcProperties":{"__isSmartRef__":true,"id":404},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"399":{"this":{"__isSmartRef__":true,"id":302},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":400}},"400":{"$super":{"__isSmartRef__":true,"id":401}},"401":{"varMapping":{"__isSmartRef__":true,"id":402},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":403},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"402":{"obj":{"__isSmartRef__":true,"id":302},"name":"prepareForNewRenderContext"},"403":{},"404":{},"405":{"varMapping":{"__isSmartRef__":true,"id":406},"source":"function addDataAndRender(data) {\n if (data == null) return;\n\n if ((typeof data == 'object') && !(data instanceof Array))\n data = [data.x, data.y];\n\n if (!this.data)\n this.data = [data];\n else {\n if (this.maxDataLength) {\n this.data = this.data.slice(\n this.data.length-this.maxDataLength,this.data.length);\n }\n this.data.push(data);\n }\n\n this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":407},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"406":{"this":{"__isSmartRef__":true,"id":302}},"407":{},"408":{"varMapping":{"__isSmartRef__":true,"id":409},"source":"function drawBarChart(w, h) {\n\tvar vis = new pv.Panel()\n\t\t.width(w)\n\t\t.height(h);\n\n\tvar yRange = pv.range(\n\t\tpv.min(this.data.concat(0)),\n\t\tpv.max(this.data), 5);\n\n\tvar leftPadding = 15,\n\t\teach_w = Math.floor(((w - leftPadding) / this.data.length) * 4 / 5),\n\t\teach_p = Math.ceil(each_w / 4)\n\t\teach_h = h / 20;\n\n\tvis.add(pv.Rule)\n\t\t.data(yRange)\n\t\t.bottom(function(d) { return d * each_h + .5; })\n\t.add(pv.Label);\n\n\tvis.add(pv.Bar)\n\t\t.data(this.data)\n\t\t.width(each_w)\n\t\t.height(function(d) { return d * each_h; })\n\t\t.bottom(0)\n\t\t.left(function() { return this.index * (each_w + each_p) + each_p / 2 + leftPadding; })\n\t\t.event(\"mouseover\", function() { console.log($A(arguments)); })\n\t.anchor(\"bottom\").add(pv.Label);\n\n\treturn vis;\n}","funcProperties":{"__isSmartRef__":true,"id":410},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"409":{"this":{"__isSmartRef__":true,"id":302}},"410":{},"411":{"varMapping":{"__isSmartRef__":true,"id":412},"source":"function drawPieChart(w, h) {\n\tvar vis = new pv.Panel()\n\t\t.width(w)\n\t\t.height(h);\n\n\tvar max = Math.min(h, w),\n\t\tr = max / 2,\n\t\ta = pv.Scale.linear(0, pv.sum(this.data)).range(0, 2 * Math.PI);\n\n\tvis.add(pv.Wedge)\n\t\t.data(this.data.sort(pv.reverseOrder))\n\t\t.bottom((max + (h - max)) / 2)\n\t\t.left((max + (w - max)) / 2)\n\t\t.innerRadius(0)\n\t\t.outerRadius(r)\n\t\t.angle(a)\n\t.anchor(\"center\").add(pv.Label)\n\t\t.visible(function(d) { return d > .15; })\n\t\t.textAngle(0);\n\n\treturn vis;\n}","funcProperties":{"__isSmartRef__":true,"id":413},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"412":{"this":{"__isSmartRef__":true,"id":302}},"413":{},"414":{"varMapping":{"__isSmartRef__":true,"id":415},"source":"function setChartType(cType) {\n\tvar chart = this;\n\tif (!chart.vis) {\n\t\talert('Chart type could not be set. Chart is missing!');\n\t\tchart.render();\n\t\treturn;\n\t}\n\n\tswitch (cType.toLowerCase()) {\n\tcase 'bar':\n\t\tchart.drawBarChart.asScriptOf(chart, 'draw');\n\t\tbreak;\n\tcase 'pie':\n\t\tchart.drawPieChart.asScriptOf(chart, 'draw');\n\t\tbreak;\n\tcase 'area':\n\t\tchart.drawAreaChart.asScriptOf(chart, 'draw');\n\t\tbreak;\n\tdefault:\n\t\talert('The chart type \"' + cType + '\" is unknown!');\n\t\treturn;\n\t}\n this.render()\n}","funcProperties":{"__isSmartRef__":true,"id":416},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"415":{"this":{"__isSmartRef__":true,"id":302}},"416":{},"417":{"varMapping":{"__isSmartRef__":true,"id":418},"source":"function reset() {\n this.connections = {addDataAndRender: {}}\n this.data = [5,8,6,12];\n this.maxDataLength = 100;\n this.setChartType('area');\n}","funcProperties":{"__isSmartRef__":true,"id":419},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"418":{"this":{"__isSmartRef__":true,"id":302}},"419":{},"420":{"source":{"__isSmartRef__":true,"id":259},"target":{"__isSmartRef__":true,"id":302}},"421":{"x":5,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"422":{"partsSpaceName":"PartsBin/Inputs/","__SourceModuleName__":"Global.lively.PartsBin","migrationLevel":2,"comment":"Simple button. Connect to 'fire' to trigger actions when the button is pressed.","partName":"Button","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"423":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"424":{"morph":{"__isSmartRef__":true,"id":259},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"425":{"x":-172.51423051237225,"y":-256.916125916021,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"426":{"position":{"__isSmartRef__":true,"id":427},"_Extent":{"__isSmartRef__":true,"id":428},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":429},"_Fill":{"__isSmartRef__":true,"id":430},"__SourceModuleName__":"Global.lively.morphic.Shapes","renderContextTable":{"__isSmartRef__":true,"id":431},"_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","_Position":{"__isSmartRef__":true,"id":432},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":433},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"427":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"428":{"x":514.1704110039991,"y":539.0546128281011,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"429":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"430":{"r":1,"g":1,"b":1,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"431":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"432":{"x":-261.476262000004,"y":-235.5282360000009,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"433":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"434":{"x":1533.0060090120155,"y":263.01201802403034,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"435":{"migrationLevel":4,"partsSpaceName":"PartsBin/Visualization/","__SourceModuleName__":"Global.lively.PartsBin","partName":"ProtovisDrawing","comment":"undefined","changes":[{"__isSmartRef__":true,"id":436}],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"436":{"date":{"__isSmartRef__":true,"id":437},"author":"lauritz","message":"fixed origin","id":"02F9CFD6-CCBE-4AD7-8FC3-E34E43DCD949"},"437":{"isSerializedDate":true,"string":"Tue Nov 15 2011 13:25:21 GMT-0600 (CST)"},"438":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"439":{"morph":{"__isSmartRef__":true,"id":258},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"440":{},"441":{"x":514.1704110039991,"y":540.050618823587,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"442":{"addDataAndRender":{"__isSmartRef__":true,"id":443}},"443":{"x":4,"y":3},"444":{"addDataAndRender":{"__isSmartRef__":true,"id":445},"reset":{"__isSmartRef__":true,"id":448},"prepareForNewRenderContext":{"__isSmartRef__":true,"id":452},"setupConnections":{"__isSmartRef__":true,"id":459}},"445":{"varMapping":{"__isSmartRef__":true,"id":446},"source":"function addDataAndRender(data) {\n this.get('ProtovisMorph').addDataAndRender(data)\n}","funcProperties":{"__isSmartRef__":true,"id":447},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"446":{"this":{"__isSmartRef__":true,"id":258}},"447":{},"448":{"varMapping":{"__isSmartRef__":true,"id":449},"source":"function reset() {\n this.connections = {addDataAndRender: {x: 4, y: 3}}\n this.get('ProtovisMorph').reset();\n}","funcProperties":{"__isSmartRef__":true,"id":450},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"449":{"this":{"__isSmartRef__":true,"id":258}},"450":{"user":"robertkrahn","timestamp":{"__isSmartRef__":true,"id":451}},"451":{"isSerializedDate":true,"string":"Fri Sep 30 2011 09:27:14 GMT-0500 (CDT)"},"452":{"varMapping":{"__isSmartRef__":true,"id":453},"source":"function prepareForNewRenderContext(renderCtx) {\n $super(renderCtx);\n lively.bindings.callWhenNotNull(Global, 'pv', this.get('ProtovisMorph'), 'render');\n}","funcProperties":{"__isSmartRef__":true,"id":458},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"453":{"this":{"__isSmartRef__":true,"id":258},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":454}},"454":{"$super":{"__isSmartRef__":true,"id":455}},"455":{"varMapping":{"__isSmartRef__":true,"id":456},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":457},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"456":{"obj":{"__isSmartRef__":true,"id":258},"name":"prepareForNewRenderContext"},"457":{},"458":{},"459":{"varMapping":{"__isSmartRef__":true,"id":460},"source":"function setupConnections() {\n connect(this.get('resetButton'), 'fire', this.get('ProtovisMorph'), 'render',\n {updater: function($upd) { this.targetObj.data = []; $upd() }})\n}","funcProperties":{"__isSmartRef__":true,"id":461},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"460":{"this":{"__isSmartRef__":true,"id":258}},"461":{},"462":{"submorphs":[],"scripts":[],"id":226,"shape":{"__isSmartRef__":true,"id":463},"grabbingEnabled":false,"droppingEnabled":false,"showsMorphMenu":false,"halosEnabled":false,"registeredForMouseEvents":true,"_world":{"__isSmartRef__":true,"id":0},"__SourceModuleName__":"Global.lively.morphic.Events","carriesGrabbedMorphs":false,"renderContextTable":{"__isSmartRef__":true,"id":469},"eventHandler":{"__isSmartRef__":true,"id":470},"lastScrollTime":1329201156654,"internalClickedOnMorph":{"__isSmartRef__":true,"id":471},"attributeConnections":[],"doNotSerialize":[],"doNotCopyProperties":[],"_Position":{"__isSmartRef__":true,"id":505},"_Scale":1.002003004005006,"_Rotation":0,"owner":{"__isSmartRef__":true,"id":0},"scrollFocusMorph":{"__isSmartRef__":true,"id":471},"__LivelyClassName__":"lively.morphic.HandMorph","withLayers":["Global.NoMagnetsLayer"]},"463":{"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":464},"_Extent":{"__isSmartRef__":true,"id":465},"_Fill":{"__isSmartRef__":true,"id":466},"renderContextTable":{"__isSmartRef__":true,"id":467},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":468},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"464":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"465":{"x":2,"y":2,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"466":{"r":0.8,"g":0,"b":0,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"467":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"468":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"469":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"470":{"morph":{"__isSmartRef__":true,"id":462},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"471":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":472},"derivationIds":[null],"id":"51ED3C60-9EE4-4F47-9DBA-3FF0E3BDC636","renderContextTable":{"__isSmartRef__":true,"id":483},"_WhiteSpaceHandling":"pre","textChunks":[{"__isSmartRef__":true,"id":484}],"eventHandler":{"__isSmartRef__":true,"id":486},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_ClipMode":"hidden","fixedWidth":false,"fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":10.5,"_Position":{"__isSmartRef__":true,"id":487},"priorExtent":{"__isSmartRef__":true,"id":488},"_MaxTextWidth":null,"_MinTextWidth":null,"_MaxTextHeight":null,"_MinTextHeight":null,"evalEnabled":false,"_HandStyle":"default","_TextColor":{"__isSmartRef__":true,"id":489},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":490},"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore"},"472":{"_Position":{"__isSmartRef__":true,"id":473},"renderContextTable":{"__isSmartRef__":true,"id":474},"_Extent":{"__isSmartRef__":true,"id":475},"_ClipMode":"hidden","_Padding":{"__isSmartRef__":true,"id":476},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":477},"_Fill":{"__isSmartRef__":true,"id":478},"_BorderRadius":4,"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes"},"473":{"x":0,"y":0,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"474":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"475":{"x":184,"y":23,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"476":{"x":3,"y":2,"width":0,"height":0,"__LivelyClassName__":"Rectangle","__SourceModuleName__":"Global"},"477":{"r":0,"g":0,"b":0,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"478":{"stops":[{"__isSmartRef__":true,"id":479},{"__isSmartRef__":true,"id":481}],"vector":{"__isSmartRef__":true,"id":242},"__LivelyClassName__":"lively.morphic.LinearGradient","__SourceModuleName__":"Global.lively.morphic.Shapes"},"479":{"offset":0,"color":{"__isSmartRef__":true,"id":480}},"480":{"r":0.39215686274509803,"g":0.5137254901960784,"b":0.9725490196078431,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"481":{"offset":1,"color":{"__isSmartRef__":true,"id":482}},"482":{"r":0.13333333333333333,"g":0.3333333333333333,"b":0.9607843137254902,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"483":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","setMinTextWidth":"setMinTextWidthHTML","setMinTextHeight":"setMinTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","unignoreTextEvents":"unignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML","focusMorph":"focusMorphHTML"},"484":{"style":{"__isSmartRef__":true,"id":485},"chunkOwner":{"__isSmartRef__":true,"id":471},"storedString":"save world","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"485":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"486":{"morph":{"__isSmartRef__":true,"id":471},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"487":{"x":0,"y":184,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"488":{"x":180,"y":23,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"489":{"r":1,"g":1,"b":1,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"490":{"onMouseWheel":{"__isSmartRef__":true,"id":491},"onSelectStart":{"__isSmartRef__":true,"id":498}},"491":{"varMapping":{"__isSmartRef__":true,"id":492},"source":"function onMouseWheel(evt) {\n return false; // to allow scrolling\n }","funcProperties":{"__isSmartRef__":true,"id":497},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global"},"492":{"this":{"__isSmartRef__":true,"id":471},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":493}},"493":{"$super":{"__isSmartRef__":true,"id":494}},"494":{"varMapping":{"__isSmartRef__":true,"id":495},"source":"function () {\n try {\n return obj.constructor.prototype[name].apply(obj, arguments)\n } catch(e) {\n alert('Error in $super call: ' + e + '\\n' + e.stack);\n return null;\n }\n }","funcProperties":{"__isSmartRef__":true,"id":496},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global"},"495":{"obj":{"__isSmartRef__":true,"id":471},"name":"onMouseWheel"},"496":{},"497":{},"498":{"varMapping":{"__isSmartRef__":true,"id":499},"source":"function onSelectStart(evt) {\n return false; // to allow scrolling\n }","funcProperties":{"__isSmartRef__":true,"id":504},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global"},"499":{"this":{"__isSmartRef__":true,"id":471},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":500}},"500":{"$super":{"__isSmartRef__":true,"id":501}},"501":{"varMapping":{"__isSmartRef__":true,"id":502},"source":"function () {\n try {\n return obj.constructor.prototype[name].apply(obj, arguments)\n } catch(e) {\n alert('Error in $super call: ' + e + '\\n' + e.stack);\n return null;\n }\n }","funcProperties":{"__isSmartRef__":true,"id":503},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global"},"502":{"obj":{"__isSmartRef__":true,"id":471},"name":"onSelectStart"},"503":{},"504":{},"505":{"x":495,"y":679,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"506":{"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":507},"_Extent":{"__isSmartRef__":true,"id":508},"_Fill":{"__isSmartRef__":true,"id":509},"renderContextTable":{"__isSmartRef__":true,"id":510},"_ClipMode":"visible","_Padding":{"__isSmartRef__":true,"id":511},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"507":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"508":{"x":2800,"y":2900,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"509":{"r":1,"g":1,"b":1,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"510":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setPadding":"setPaddingHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML","setClipMode":"setClipModeHTML"},"511":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"512":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"513":{"name":"Local code","__LivelyClassName__":"ChangeSet","__SourceModuleName__":"Global.lively.ChangeSet"},"514":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","adjustOrigin":"adjustOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","showsVerticalScrollBar":"showsVerticalScrollBarHTML","showsHorizontalScrollBar":"showsHorizontalScrollBarHTML","getScrollBarExtent":"getScrollBarExtentHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","setScroll":"setScrollHTML"},"515":{"morph":{"__isSmartRef__":true,"id":0},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"516":{"x":493,"y":677,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"517":{"sourceObj":{"__isSmartRef__":true,"id":0},"sourceAttrName":"savedWorldAsURL","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"visitNewPageAfterSaveAs","converter":null,"converterString":null,"updaterString":"function ($upd, v) {\n if (v && v.toString() !== URL.source.toString()) {\n $upd(v)\n }\n }","varMapping":{"__isSmartRef__":true,"id":518},"__SourceModuleName__":"Global.lively.bindings","__serializedLivelyClosures__":{"__isSmartRef__":true,"id":519},"__LivelyClassName__":"AttributeConnection"},"518":{"source":{"__isSmartRef__":true,"id":0},"target":{"__isSmartRef__":true,"id":0}},"519":{"updater":{"__isSmartRef__":true,"id":520}},"520":{"originalFunc":null,"varMapping":{"__isSmartRef__":true,"id":518},"source":"function ($upd, v) {\n if (v && v.toString() !== URL.source.toString()) {\n $upd(v)\n }\n }","funcProperties":{"__isSmartRef__":true,"id":521},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"521":{},"522":{"protocol":"http:","hostname":"lively-kernel.org","pathname":"/repository/webwerkstatt/users/mzimmerm/test-d3.xhtml","__SourceModuleName__":"Global.lively.Network","__LivelyClassName__":"URL"},"isSimplifiedRegistry":true}}]]>