{
"version": 3,
"file": "/Users/cmalley/GitHub/example-sim/build/example-sim.min.js",
"sources": [
"../node_modules/grunt-requirejs/node_modules/almond/almond.js",
"../../joist/js/SimLauncher.js",
"../../assert/js/assert.js",
"../../phet-core/js/phetAllocation.js",
"../../scenery/js/scenery.js",
"../../dot/js/dot.js",
"../../phet-core/js/extend.js",
"../../phet-core/js/inherit.js",
"../../phet-core/js/Poolable.js",
"../../dot/js/Util.js",
"../../dot/js/Vector2.js",
"../../dot/js/Vector4.js",
"../../dot/js/Vector3.js",
"../../dot/js/Matrix4.js",
"../../dot/js/Matrix3.js",
"../../dot/js/Ray2.js",
"../../dot/js/Transform3.js",
"../../dot/js/Bounds2.js",
"../../scenery/js/util/Util.js",
"../../kite/js/kite.js",
"../../kite/js/segments/Segment.js",
"../../kite/js/segments/Line.js",
"../../kite/js/segments/Arc.js",
"../../kite/js/util/Subpath.js",
"../../kite/js/../parser/svgPath.js",
"../../kite/js/util/LineStyles.js",
"../../kite/js/segments/Quadratic.js",
"../../kite/js/segments/Cubic.js",
"../../kite/js/segments/EllipticalArc.js",
"../../kite/js/Shape.js",
"../../scenery/js/util/FixedNodeEvents.js",
"../../scenery/js/layers/LayerStrategy.js",
"../../scenery/js/nodes/Node.js",
"../../scenery/js/layers/LayerType.js",
"../../scenery/js/util/Trail.js",
"../../scenery/js/layers/Layer.js",
"../../scenery/js/util/CanvasContextWrapper.js",
"../../scenery/js/util/TrailPointer.js",
"../../scenery/js/layers/CanvasLayer.js",
"../../scenery/js/layers/DOMLayer.js",
"../../scenery/js/layers/SVGLayer.js",
"../../scenery/js/layers/Renderer.js",
"../../scenery/js/nodes/Fillable.js",
"../../scenery/js/nodes/Strokable.js",
"../../scenery/js/nodes/Path.js",
"../../scenery/js/nodes/HBox.js",
"../../scenery/js/nodes/VBox.js",
"../../phet-core/js/escapeHTML.js",
"../../scenery/js/util/Font.js",
"../../scenery/js/nodes/Text.js",
"../../scenery/js/nodes/Image.js",
"../../scenery/js/nodes/DOM.js",
"../../phet-core/js/collect.js",
"../../scenery/js/util/AccessibilityPeer.js",
"../../scenery/js/util/LiveRegion.js",
"../../scenery/js/util/Instance.js",
"../../scenery/js/util/RenderInterval.js",
"../../scenery/js/input/Pointer.js",
"../../scenery/js/input/Mouse.js",
"../../scenery/js/input/Touch.js",
"../../scenery/js/input/Pen.js",
"../../scenery/js/input/Key.js",
"../../scenery/js/input/Event.js",
"../../scenery/js/input/Input.js",
"../../scenery/js/layers/LayerBoundary.js",
"../../scenery/js/layers/LayerBuilder.js",
"../../scenery/js/Scene.js",
"../../scenery/js/nodes/Rectangle.js",
"../../scenery/js/input/SimpleDragHandler.js",
"../../sun/js/FontAwesomeNode.js",
"../../sun/js/Panel.js",
"../../scenery-phet/js/HomeButton.js",
"../../scenery-phet/js/MultiLineText.js",
"../../joist/js/ScreenView.js",
"../../scenery/js/nodes/HTMLText.js",
"../../scenery-phet/js/PhetFont.js",
"../../joist/js/AboutDialog.js",
"../../scenery/js/input/DownUpListener.js",
"../../scenery/js/input/ButtonListener.js",
"../../scenery/js/nodes/Plane.js",
"../../axon/js/axon.js",
"../../axon/js/log.js",
"../../joist/js/PhetMenu.js",
"../../scenery/js/util/Color.js",
"../../scenery/js/util/Gradient.js",
"../../scenery/js/util/LinearGradient.js",
"../../phet-core/js/platform.js",
"../../chipper/requirejs-plugins/image.js",
"../../../../../../image!JOIST/../images/phet-logo-short.svg",
"../../joist/js/PhetButton.js",
"../../joist/js/Highlight.js",
"../../joist/js/NavigationBar.js",
"../../joist/js/Frame.js",
"../../axon/js/Property.js",
"../../joist/js/FullScreenButton.js",
"../../joist/js/HomeScreen.js",
"../js/version.js",
"../../axon/js/DerivedProperty.js",
"../../axon/js/PropertySet.js",
"../../joist/js/share/Pointer.js",
"../../joist/js/share/Pointers.js",
"../../joist/js/share/LogPointers.js",
"../../joist/js/Sim.js",
"../js/barmagnet/model/BarMagnet.js",
"../../dot/js/Dimension2.js",
"../js/barmagnet/model/BarMagnetModel.js",
"../../../../../../image!EXAMPLE_SIM/../images/barMagnet.png",
"../js/barmagnet/view/BarMagnetNode.js",
"../../sherpa/i18n-2.0.4.js",
"../js/../nls/example-sim-strings.js",
"../js/../nls/root/example-sim-strings.js",
"../../../../../../i18n!EXAMPLE_SIM/../nls/example-sim-strings",
"../js/common/ExampleSimStrings.js",
"../../sun/js/PushButton.js",
"../../../../../../image!SCENERY_PHET/../images/reset_button_up.png",
"../../../../../../image!SCENERY_PHET/../images/reset_button_over.png",
"../../../../../../image!SCENERY_PHET/../images/reset_button_down.png",
"../../../../../../image!SCENERY_PHET/../images/reset_button_disabled.png",
"../../scenery-phet/js/ResetAllButton.js",
"../../sun/js/RectangleButton.js",
"../../sun/js/TextButton.js",
"../js/barmagnet/view/ControlPanel.js",
"../../phetcommon/js/view/ModelViewTransform2.js",
"../js/barmagnet/view/BarMagnetView.js",
"../js/barmagnet/BarMagnetScreen.js",
"../js/example-sim-main.js",
"../js/example-sim-config.js"
],
"names": [],
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjQA,ADkQA;ACjQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvEA,ADwEA;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxBA,ADyBA;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA,ADmCA;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvCA,ADwCA;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA,ADmBA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA,ADaA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA,ADaA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA,ADmCA;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9JA,AD+JA;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjNA,ADkNA;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9LA,AD+LA;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtLA,ADuLA;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpNA,ADqNA;ACpNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClcA,ADmcA;AClcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvBA,ADwBA;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnLA,ADoLA;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvTA,ADwTA;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChSA,ADiSA;AChSA;AACA;AACA;AACA;AACA;AACA;ACNA,ADOA;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9BA,AD+BA;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChGA,ADiGA;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrOA,ADsOA;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxOA,ADyOA;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtqFA,ADuqFA;ACtqFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA,ADqCA;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvKA,ADwKA;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/MA,ADgNA;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvPA,ADwPA;ACvPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzeA,AD0eA;ACzeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9CA,AD+CA;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA,ADsEA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChkDA,ADikDA;AChkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/BA,ADgCA;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9ZA,AD+ZA;AC9ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1HA,AD2HA;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClGA,ADmGA;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjMA,ADkMA;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtTA,ADuTA;ACtTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnLA,ADoLA;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7XA,AD8XA;AC7XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChCA,ADiCA;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3HA,AD4HA;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpPA,ADqPA;ACpPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtIA,ADuIA;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClDA,ADmDA;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClDA,ADmDA;AClDA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnOA,ADoOA;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3YA,AD4YA;AC3YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxIA,ADyIA;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClIA,ADmIA;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA,ADUA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1EA,AD2EA;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7BA,AD8BA;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzPA,AD0PA;ACzPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/CA,ADgDA;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA,ADsBA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3DA,AD4DA;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7BA,AD8BA;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7BA,AD8BA;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA,ADgBA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1BA,AD2BA;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzjBA,AD0jBA;ACzjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3CA,AD4CA;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/GA,ADgHA;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtiCA,ADuiCA;ACtiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzLA,AD0LA;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpHA,ADqHA;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA,ADqCA;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzCA,AD0CA;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA,ADmBA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7BA,AD8BA;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA,ADmCA;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA,ADaA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACdA,ADeA;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpFA,ADqFA;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpEA,ADqEA;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnEA,ADoEA;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACXA,ADYA;ACXA;AACA;AACA;AACA;ACJA,ADKA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClGA,ADmGA;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChLA,ADiLA;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9cA,AD+cA;AC9cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1CA,AD2CA;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/CA,ADgDA;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1BA,AD2BA;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5CA,AD6CA;AC5CA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3GA,AD4GA;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzCA,AD0CA;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5LA,AD6LA;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvCA,ADwCA;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/GA,ADgHA;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxCA,ADyCA;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7JA,AD8JA;AC7JA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9DA,AD+DA;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxIA,ADyIA;ACxIA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;ACJA,ADKA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpEA,ADqEA;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxUA,ADyUA;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA,ADgBA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA,ADmBA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA,ADiBA;AChBA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/BA,ADgCA;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzFA,AD0FA;ACzFA;AACA;AACA;ACHA,ADIA;ACHA;AACA;AACA;AACA;ACJA,ACAA,AFKA;AEJA;AACA;AACA;ACHA,ADIA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvFA,ADwFA;ACvFA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;ACLA,ADMA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA,AD0BA;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrCA,ADsCA;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClBA,ADmBA;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxCA,ADyCA;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1GA,AD2GA;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA,AD0BA;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA,ADkBA;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACbA,ADcA;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",
"sourcesContent": [
"\nvar requirejs, require, define;\n(function (undef) {\n var main, req, makeMap, handlers, defined = {}, waiting = {}, config = {}, defining = {}, hasOwn = Object.prototype.hasOwnProperty, aps = [].slice;\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n function normalize(name, baseName) {\n var nameParts, nameSegment, mapValue, foundMap, foundI, foundStarMap, starI, i, j, part, baseParts = baseName && baseName.split('/'), map = config.map, starMap = map && map['*'] || {};\n if (name && name.charAt(0) === '.') {\n if (baseName) {\n baseParts = baseParts.slice(0, baseParts.length - 1);\n name = baseParts.concat(name.split('/'));\n for (i = 0; i < name.length; i += 1) {\n part = name[i];\n if (part === '.') {\n name.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n if (i === 1 && (name[2] === '..' || name[0] === '..')) {\n break;\n } else if (i > 0) {\n name.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n name = name.join('/');\n } else if (name.indexOf('./') === 0) {\n name = name.substring(2);\n }\n }\n if ((baseParts || starMap) && map) {\n nameParts = name.split('/');\n for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join('/');\n if (baseParts) {\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = map[baseParts.slice(0, j).join('/')];\n if (mapValue) {\n mapValue = mapValue[nameSegment];\n if (mapValue) {\n foundMap = mapValue;\n foundI = i;\n break;\n }\n }\n }\n }\n if (foundMap) {\n break;\n }\n if (!foundStarMap && starMap && starMap[nameSegment]) {\n foundStarMap = starMap[nameSegment];\n starI = i;\n }\n }\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n return name;\n }\n function makeRequire(relName, forceSync) {\n return function () {\n return req.apply(undef, aps.call(arguments, 0).concat([\n relName,\n forceSync\n ]));\n };\n }\n function makeNormalize(relName) {\n return function (name) {\n return normalize(name, relName);\n };\n }\n function makeLoad(depName) {\n return function (value) {\n defined[depName] = value;\n };\n }\n function callDep(name) {\n if (hasProp(waiting, name)) {\n var args = waiting[name];\n delete waiting[name];\n defining[name] = true;\n main.apply(undef, args);\n }\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\n throw new Error('No ' + name);\n }\n return defined[name];\n }\n function splitPrefix(name) {\n var prefix, index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [\n prefix,\n name\n ];\n }\n makeMap = function (name, relName) {\n var plugin, parts = splitPrefix(name), prefix = parts[0];\n name = parts[1];\n if (prefix) {\n prefix = normalize(prefix, relName);\n plugin = callDep(prefix);\n }\n if (prefix) {\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, makeNormalize(relName));\n } else {\n name = normalize(name, relName);\n }\n } else {\n name = normalize(name, relName);\n parts = splitPrefix(name);\n prefix = parts[0];\n name = parts[1];\n if (prefix) {\n plugin = callDep(prefix);\n }\n }\n return {\n f: prefix ? prefix + '!' + name : name,\n n: name,\n pr: prefix,\n p: plugin\n };\n };\n function makeConfig(name) {\n return function () {\n return config && config.config && config.config[name] || {};\n };\n }\n handlers = {\n require: function (name) {\n return makeRequire(name);\n },\n exports: function (name) {\n var e = defined[name];\n if (typeof e !== 'undefined') {\n return e;\n } else {\n return defined[name] = {};\n }\n },\n module: function (name) {\n return {\n id: name,\n uri: '',\n exports: defined[name],\n config: makeConfig(name)\n };\n }\n };\n main = function (name, deps, callback, relName) {\n var cjsModule, depName, ret, map, i, args = [], usingExports;\n relName = relName || name;\n if (typeof callback === 'function') {\n deps = !deps.length && callback.length ? [\n 'require',\n 'exports',\n 'module'\n ] : deps;\n for (i = 0; i < deps.length; i += 1) {\n map = makeMap(deps[i], relName);\n depName = map.f;\n if (depName === 'require') {\n args[i] = handlers.require(name);\n } else if (depName === 'exports') {\n args[i] = handlers.exports(name);\n usingExports = true;\n } else if (depName === 'module') {\n cjsModule = args[i] = handlers.module(name);\n } else if (hasProp(defined, depName) || hasProp(waiting, depName) || hasProp(defining, depName)) {\n args[i] = callDep(depName);\n } else if (map.p) {\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n args[i] = defined[depName];\n } else {\n throw new Error(name + ' missing ' + depName);\n }\n }\n ret = callback.apply(defined[name], args);\n if (name) {\n if (cjsModule && cjsModule.exports !== undef && cjsModule.exports !== defined[name]) {\n defined[name] = cjsModule.exports;\n } else if (ret !== undef || !usingExports) {\n defined[name] = ret;\n }\n }\n } else if (name) {\n defined[name] = callback;\n }\n };\n requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\n if (typeof deps === 'string') {\n if (handlers[deps]) {\n return handlers[deps](callback);\n }\n return callDep(makeMap(deps, callback).f);\n } else if (!deps.splice) {\n config = deps;\n if (callback.splice) {\n deps = callback;\n callback = relName;\n relName = null;\n } else {\n deps = undef;\n }\n }\n callback = callback || function () {\n };\n if (typeof relName === 'function') {\n relName = forceSync;\n forceSync = alt;\n }\n if (forceSync) {\n main(undef, deps, callback, relName);\n } else {\n setTimeout(function () {\n main(undef, deps, callback, relName);\n }, 4);\n }\n return req;\n };\n req.config = function (cfg) {\n config = cfg;\n if (config.deps) {\n req(config.deps, config.callback);\n }\n return req;\n };\n define = function (name, deps, callback) {\n if (!deps.splice) {\n callback = deps;\n deps = [];\n }\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n waiting[name] = [\n name,\n deps,\n callback\n ];\n }\n };\n define.amd = { jQuery: true };\n}());\ndefine(\"almond\", function(){});\n",
"\ndefine('JOIST/SimLauncher',['require'],function (require) {\n 'use strict';\n var loadedResourceCount = 0;\n return {\n launch: function (simImageLoader, callback) {\n var pxLoader;\n var elementsToRemove = [];\n var delayCompletionEvent = false;\n function doneLoadingImages() {\n loadedResourceCount++;\n if (loadedResourceCount === 1) {\n $('#splash').remove();\n callback();\n }\n }\n function load(imageLoader, path) {\n var loadedImages = {};\n imageLoader.getImage = function (name) {\n return loadedImages[name];\n };\n imageLoader.imageNames.forEach(function (image) {\n var filename = path + '/' + image;\n loadedImages[image] = document.getElementById(filename);\n if (loadedImages[image]) {\n if (loadedImages[image].width === 0 || loadedImages[image].height === 0) {\n delayCompletionEvent = true;\n }\n elementsToRemove.push(loadedImages[image]);\n } else {\n window.console && console.log && console.log('WARNING: could not find image: ' + filename + ', using PxLoader');\n if (!pxLoader) {\n pxLoader = new PxLoader();\n }\n loadedImages[image] = pxLoader.addImage(filename);\n }\n });\n }\n load(simImageLoader, 'images');\n if (pxLoader) {\n pxLoader.addCompletionListener(doneLoadingImages);\n pxLoader.start();\n } else {\n if (!delayCompletionEvent) {\n var loaded = 0;\n if (window.phetImages) {\n for (var i = 0; i < window.phetImages.length; i++) {\n var phetImage = window.phetImages[i];\n phetImage.onload = function () {\n loaded++;\n if (loaded === window.phetImages.length) {\n doneLoadingImages();\n }\n };\n }\n } else {\n doneLoadingImages();\n }\n }\n }\n $(window).load(function () {\n if (delayCompletionEvent && !pxLoader) {\n doneLoadingImages();\n }\n _.each(elementsToRemove, function (element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n });\n });\n }\n };\n});",
"\ndefine('ASSERT/assert',['require'],function (require) {\n 'use strict';\n return function assert(name, excludeByDefault) {\n var hasName = 'assert.' + name;\n var flagDefined = window.has && window.has(hasName) !== undefined;\n var skipAssert = flagDefined ? !window.has(hasName) : excludeByDefault;\n if (skipAssert) {\n return null;\n } else {\n return function (predicate, message) {\n var result = typeof predicate === 'function' ? predicate() : predicate;\n if (!result) {\n if (window.navigator && window.navigator.appName === 'Microsoft Internet Explorer') {\n try {\n throw new Error();\n } catch (e) {\n message = message + ', stack=\\n' + e.stack;\n }\n }\n throw new Error('Assertion failed: ' + message);\n }\n };\n }\n };\n});",
"\ndefine('PHET_CORE/phetAllocation',['require'],function (require) {\n 'use strict';\n return function phetAllocation(name) {\n if (window.alloc) {\n var stack;\n try {\n throw new Error();\n } catch (e) {\n stack = e.stack;\n }\n if (!window.alloc[name]) {\n window.alloc[name] = {\n count: 0,\n stacks: {}\n };\n }\n var log = window.alloc[name];\n log.count++;\n if (!log.stacks[stack]) {\n log.stacks[stack] = 1;\n } else {\n log.stacks[stack] += 1;\n }\n log.report = function () {\n var stacks = Object.keys(log.stacks);\n stacks = _.sortBy(stacks, function (key) {\n return log.stacks[key];\n });\n _.each(stacks, function (stack) {\n console.log(log.stacks[stack] + ': ' + stack);\n });\n };\n }\n };\n});",
"\ndefine('SCENERY/scenery',['require','ASSERT/assert','PHET_CORE/phetAllocation'],function (require) {\n 'use strict';\n window.sceneryAssert = null;\n window.sceneryAssertExtra = require('ASSERT/assert')('scenery.extra');\n window.sceneryLayerLog = null;\n window.sceneryEventLog = null;\n window.sceneryAccessibilityLog = null;\n window.phetAllocation = require('PHET_CORE/phetAllocation');\n var scratchCanvas = document.createElement('canvas');\n var scratchContext = scratchCanvas.getContext('2d');\n return {\n assert: null,\n scratchCanvas: scratchCanvas,\n scratchContext: scratchContext,\n enableLayerLogging: function () {\n window.sceneryLayerLog = function (ob) {\n console.log(ob);\n };\n },\n disableLayerLogging: function () {\n window.sceneryLayerLog = null;\n },\n enableEventLogging: function () {\n window.sceneryEventLog = function (ob) {\n console.log(ob);\n };\n },\n disableEventLogging: function () {\n window.sceneryEventLog = null;\n },\n enableAccessibilityLogging: function () {\n window.sceneryAccessibilityLog = function (ob) {\n console.log(ob);\n };\n },\n disableAccessibilityLogging: function () {\n window.sceneryAccessibilityLog = null;\n }\n };\n});",
"\ndefine('DOT/dot',['require','PHET_CORE/phetAllocation'],function (require) {\n 'use strict';\n window.phetAllocation = require('PHET_CORE/phetAllocation');\n var dot = function dot() {\n switch (arguments.length) {\n case 2:\n return new dot.Vector2(arguments[0], arguments[1]);\n case 3:\n return new dot.Vector3(arguments[0], arguments[1], arguments[2]);\n case 4:\n return new dot.Vector4(arguments[0], arguments[1], arguments[2], arguments[3]);\n default:\n throw new Error('dot takes 2-4 arguments');\n }\n };\n dot.FastArray = window.Float64Array ? window.Float64Array : window.Array;\n dot.assert = null;\n return dot;\n});",
"\ndefine('PHET_CORE/extend',['require'],function (require) {\n 'use strict';\n return function extend(obj) {\n _.each(Array.prototype.slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n Object.defineProperty(obj, prop, Object.getOwnPropertyDescriptor(source, prop));\n }\n }\n });\n return obj;\n };\n});",
"\ndefine('PHET_CORE/inherit',['require','PHET_CORE/extend'],function (require) {\n 'use strict';\n var extend = require('PHET_CORE/extend');\n function inherit(supertype, subtype, prototypeProperties, staticProperties) {\n function F() {\n }\n F.prototype = supertype.prototype;\n subtype.prototype = extend(new F(), { constructor: subtype }, prototypeProperties);\n extend(subtype, staticProperties);\n return subtype;\n }\n return inherit;\n});",
"\ndefine('PHET_CORE/Poolable',['require','PHET_CORE/extend'],function (require) {\n 'use strict';\n var extend = require('PHET_CORE/extend');\n return function Poolable(type, options) {\n var proto = type.prototype;\n options = extend({\n maxPoolSize: 50,\n initialSize: 0\n }, options);\n var pool = type.pool = [];\n if (options.defaultFactory) {\n type.dirtyFromPool = function () {\n if (pool.length) {\n return pool.pop();\n } else {\n return options.defaultFactory();\n }\n };\n type.fillPool = function (n) {\n while (pool.length < n) {\n pool.push(options.defaultFactory());\n }\n };\n type.fillPool(options.initialSize);\n }\n if (options.constructorDuplicateFactory) {\n type.createFromPool = options.constructorDuplicateFactory(pool);\n }\n proto.freeToPool = function () {\n if (pool.length < options.maxPoolSize) {\n pool.push(this);\n }\n };\n };\n});",
"\ndefine('DOT/Util',['require','DOT/dot'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n dot.Util = {\n testAssert: function () {\n return 'assert.dot: ' + (null ? 'true' : 'false');\n },\n clamp: function (value, min, max) {\n if (value < min) {\n return min;\n } else if (value > max) {\n return max;\n } else {\n return value;\n }\n },\n moduloBetweenDown: function (value, min, max) {\n null;\n var divisor = max - min;\n var partial = (value - min) % divisor;\n if (partial < 0) {\n partial += divisor;\n }\n return partial + min;\n },\n moduloBetweenUp: function (value, min, max) {\n return -Util.moduloBetweenDown(-value, -max, -min);\n },\n rangeInclusive: function (a, b) {\n if (b < a) {\n return [];\n }\n var result = new Array(b - a + 1);\n for (var i = a; i <= b; i++) {\n result[i - a] = i;\n }\n return result;\n },\n rangeExclusive: function (a, b) {\n return Util.rangeInclusive(a + 1, b - 1);\n },\n toRadians: function (degrees) {\n return Math.PI * degrees / 180;\n },\n toDegrees: function (radians) {\n return 180 * radians / Math.PI;\n },\n lineLineIntersection: function (p1, p2, p3, p4) {\n var x12 = p1.x - p2.x;\n var x34 = p3.x - p4.x;\n var y12 = p1.y - p2.y;\n var y34 = p3.y - p4.y;\n var denom = x12 * y34 - y12 * x34;\n var a = p1.x * p2.y - p1.y * p2.x;\n var b = p3.x * p4.y - p3.y * p4.x;\n return new dot.Vector2((a * x34 - x12 * b) / denom, (a * y34 - y12 * b) / denom);\n },\n solveQuadraticRootsReal: function (a, b, c) {\n var epsilon = 10000000;\n if (a === 0 || Math.abs(b / a) > epsilon || Math.abs(c / a) > epsilon) {\n return [-c / b];\n }\n var discriminant = b * b - 4 * a * c;\n if (discriminant < 0) {\n return [];\n }\n var sqrt = Math.sqrt(discriminant);\n return [\n (-b - sqrt) / (2 * a),\n (-b + sqrt) / (2 * a)\n ];\n },\n solveCubicRootsReal: function (a, b, c, d) {\n var epsilon = 10000000;\n if (a === 0 || Math.abs(b / a) > epsilon || Math.abs(c / a) > epsilon || Math.abs(d / a) > epsilon) {\n return Util.solveQuadraticRootsReal(b, c, d);\n }\n if (d === 0 || Math.abs(a / d) > epsilon || Math.abs(b / d) > epsilon || Math.abs(c / d) > epsilon) {\n return Util.solveQuadraticRootsReal(a, b, c);\n }\n b /= a;\n c /= a;\n d /= a;\n var s, t;\n var q = (3 * c - b * b) / 9;\n var r = (-(27 * d) + b * (9 * c - 2 * (b * b))) / 54;\n var discriminant = q * q * q + r * r;\n var b3 = b / 3;\n if (discriminant > 0) {\n var dsqrt = Math.sqrt(discriminant);\n return [Util.cubeRoot(r + dsqrt) + Util.cubeRoot(r - dsqrt) - b3];\n }\n if (discriminant === 0) {\n var rsqrt = Util.cubeRoot(r);\n var doubleRoot = b3 - rsqrt;\n return [\n -b3 + 2 * rsqrt,\n doubleRoot,\n doubleRoot\n ];\n } else {\n var qX = -q * q * q;\n qX = Math.acos(r / Math.sqrt(qX));\n var rr = 2 * Math.sqrt(-q);\n return [\n -b3 + rr * Math.cos(qX / 3),\n -b3 + rr * Math.cos((qX + 2 * Math.PI) / 3),\n -b3 + rr * Math.cos((qX + 4 * Math.PI) / 3)\n ];\n }\n },\n cubeRoot: function (x) {\n return x >= 0 ? Math.pow(x, 1 / 3) : -Math.pow(-x, 1 / 3);\n },\n linear: function (a1, a2, b1, b2, a3) {\n return (b2 - b1) / (a2 - a1) * (a3 - a1) + b1;\n },\n toFixed: function (number, decimalPlaces) {\n var multiplier = Math.pow(10, decimalPlaces);\n return Math.round(number * multiplier) / multiplier;\n },\n isInteger: function (number) {\n return Math.floor(number) === number;\n },\n lineSegmentIntersection: function (x1, y1, x2, y2, x3, y3, x4, y4) {\n var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);\n var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);\n var denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n if (denom === 0) {\n return null;\n } else {\n var ua = numA / denom;\n var ub = numB / denom;\n if (!(ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1)) {\n return null;\n } else {\n var x = x1 + ua * (x2 - x1);\n var y = y1 + ua * (y2 - y1);\n return new dot.Vector2(x, y);\n }\n }\n }\n };\n var Util = dot.Util;\n dot.testAssert = Util.testAssert;\n dot.clamp = Util.clamp;\n dot.moduloBetweenDown = Util.moduloBetweenDown;\n dot.moduloBetweenUp = Util.moduloBetweenUp;\n dot.rangeInclusive = Util.rangeInclusive;\n dot.rangeExclusive = Util.rangeExclusive;\n dot.toRadians = Util.toRadians;\n dot.toDegrees = Util.toDegrees;\n dot.lineLineIntersection = Util.lineLineIntersection;\n dot.solveQuadraticRootsReal = Util.solveQuadraticRootsReal;\n dot.solveCubicRootsReal = Util.solveCubicRootsReal;\n dot.cubeRoot = Util.cubeRoot;\n dot.linear = Util.linear;\n return Util;\n});",
"\ndefine('DOT/Vector2',['require','DOT/dot','PHET_CORE/inherit','PHET_CORE/Poolable','DOT/Util'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n var inherit = require('PHET_CORE/inherit');\n var Poolable = require('PHET_CORE/Poolable');\n require('DOT/Util');\n dot.Vector2 = function Vector2(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n null;\n null;\n phetAllocation && phetAllocation('Vector2');\n };\n var Vector2 = dot.Vector2;\n Vector2.createPolar = function (magnitude, angle) {\n return new Vector2(magnitude * Math.cos(angle), magnitude * Math.sin(angle));\n };\n Vector2.prototype = {\n constructor: Vector2,\n isVector2: true,\n dimension: 2,\n magnitude: function () {\n return Math.sqrt(this.magnitudeSquared());\n },\n magnitudeSquared: function () {\n return this.x * this.x + this.y * this.y;\n },\n distance: function (point) {\n return Math.sqrt(this.distanceSquared(point));\n },\n distanceXY: function (x, y) {\n var dx = this.x - x;\n var dy = this.y - y;\n return Math.sqrt(dx * dx + dy * dy);\n },\n distanceSquared: function (point) {\n var dx = this.x - point.x;\n var dy = this.y - point.y;\n return dx * dx + dy * dy;\n },\n dot: function (v) {\n return this.x * v.x + this.y * v.y;\n },\n equals: function (other) {\n return this.x === other.x && this.y === other.y;\n },\n equalsEpsilon: function (other, epsilon) {\n if (!epsilon) {\n epsilon = 0;\n }\n return Math.max(Math.abs(this.x - other.x), Math.abs(this.y - other.y)) <= epsilon;\n },\n isFinite: function () {\n return isFinite(this.x) && isFinite(this.y);\n },\n copy: function () {\n return new Vector2(this.x, this.y);\n },\n crossScalar: function (v) {\n return this.x * v.y - this.y * v.x;\n },\n normalized: function () {\n var mag = this.magnitude();\n if (mag === 0) {\n throw new Error('Cannot normalize a zero-magnitude vector');\n } else {\n return new Vector2(this.x / mag, this.y / mag);\n }\n },\n timesScalar: function (scalar) {\n return new Vector2(this.x * scalar, this.y * scalar);\n },\n times: function (scalar) {\n null;\n return this.timesScalar(scalar);\n },\n componentTimes: function (v) {\n return new Vector2(this.x * v.x, this.y * v.y);\n },\n plus: function (v) {\n return new Vector2(this.x + v.x, this.y + v.y);\n },\n plusScalar: function (scalar) {\n return new Vector2(this.x + scalar, this.y + scalar);\n },\n minus: function (v) {\n return new Vector2(this.x - v.x, this.y - v.y);\n },\n minusScalar: function (scalar) {\n return new Vector2(this.x - scalar, this.y - scalar);\n },\n dividedScalar: function (scalar) {\n return new Vector2(this.x / scalar, this.y / scalar);\n },\n negated: function () {\n return new Vector2(-this.x, -this.y);\n },\n angle: function () {\n return Math.atan2(this.y, this.x);\n },\n perpendicular: function () {\n return new Vector2(this.y, -this.x);\n },\n angleBetween: function (v) {\n var thisMagnitude = this.magnitude();\n var vMagnitude = v.magnitude();\n return Math.acos(dot.clamp((this.x * v.x + this.y * v.y) / (thisMagnitude * vMagnitude), -1, 1));\n },\n rotated: function (angle) {\n var newAngle = this.angle() + angle;\n var mag = this.magnitude();\n return new Vector2(mag * Math.cos(newAngle), mag * Math.sin(newAngle));\n },\n blend: function (vector, ratio) {\n return new Vector2(this.x + (vector.x - this.x) * ratio, this.y + (vector.y - this.y) * ratio);\n },\n toString: function () {\n return 'Vector2(' + this.x + ', ' + this.y + ')';\n },\n toVector3: function () {\n return new dot.Vector3(this.x, this.y);\n },\n set: function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n },\n setX: function (x) {\n this.x = x;\n return this;\n },\n setY: function (y) {\n this.y = y;\n return this;\n },\n add: function (v) {\n this.x += v.x;\n this.y += v.y;\n return this;\n },\n addScalar: function (scalar) {\n this.x += scalar;\n this.y += scalar;\n return this;\n },\n subtract: function (v) {\n this.x -= v.x;\n this.y -= v.y;\n return this;\n },\n subtractScalar: function (scalar) {\n this.x -= scalar;\n this.y -= scalar;\n return this;\n },\n componentMultiply: function (v) {\n this.x *= v.x;\n this.y *= v.y;\n return this;\n },\n divideScalar: function (scalar) {\n this.x /= scalar;\n this.y /= scalar;\n return this;\n },\n negate: function () {\n this.x = -this.x;\n this.y = -this.y;\n return this;\n }\n };\n Poolable(Vector2, {\n defaultFactory: function () {\n return new Vector2();\n },\n constructorDuplicateFactory: function (pool) {\n return function (x, y) {\n if (pool.length) {\n return pool.pop().set(x, y);\n } else {\n return new Vector2(x, y);\n }\n };\n }\n });\n Vector2.Immutable = function ImmutableVector2(x, y) {\n Vector2.call(this, x, y);\n };\n var Immutable = Vector2.Immutable;\n inherit(Vector2, Immutable);\n Immutable.mutableOverrideHelper = function (mutableFunctionName) {\n Immutable.prototype[mutableFunctionName] = function () {\n throw new Error('Cannot call mutable method \\'' + mutableFunctionName + '\\' on immutable Vector2');\n };\n };\n Immutable.mutableOverrideHelper('set');\n Immutable.mutableOverrideHelper('setX');\n Immutable.mutableOverrideHelper('setY');\n Immutable.mutableOverrideHelper('add');\n Immutable.mutableOverrideHelper('addScalar');\n Immutable.mutableOverrideHelper('subtract');\n Immutable.mutableOverrideHelper('subtractScalar');\n Immutable.mutableOverrideHelper('componentMultiply');\n Immutable.mutableOverrideHelper('divideScalar');\n Immutable.mutableOverrideHelper('negate');\n Vector2.ZERO = new Immutable(0, 0);\n Vector2.X_UNIT = new Immutable(1, 0);\n Vector2.Y_UNIT = new Immutable(0, 1);\n return Vector2;\n});",
"\ndefine('DOT/Vector4',['require','DOT/dot','DOT/Util'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n require('DOT/Util');\n dot.Vector4 = function Vector4(x, y, z, w) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w !== undefined ? w : 1;\n };\n var Vector4 = dot.Vector4;\n Vector4.prototype = {\n constructor: Vector4,\n magnitude: function () {\n return Math.sqrt(this.magnitudeSquared());\n },\n magnitudeSquared: function () {\n this.dot(this);\n },\n distance: function (point) {\n return this.minus(point).magnitude();\n },\n distanceSquared: function (point) {\n return this.minus(point).magnitudeSquared();\n },\n dot: function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n isFinite: function () {\n return isFinite(this.x) && isFinite(this.y) && isFinite(this.z) && isFinite(this.w);\n },\n normalized: function () {\n var mag = this.magnitude();\n if (mag === 0) {\n throw new Error('Cannot normalize a zero-magnitude vector');\n } else {\n return new Vector4(this.x / mag, this.y / mag, this.z / mag, this.w / mag);\n }\n },\n timesScalar: function (scalar) {\n return new Vector4(this.x * scalar, this.y * scalar, this.z * scalar, this.w * scalar);\n },\n times: function (scalar) {\n null;\n return this.timesScalar(scalar);\n },\n componentTimes: function (v) {\n return new Vector4(this.x * v.x, this.y * v.y, this.z * v.z, this.w * v.w);\n },\n plus: function (v) {\n return new Vector4(this.x + v.x, this.y + v.y, this.z + v.z, this.w + v.w);\n },\n plusScalar: function (scalar) {\n return new Vector4(this.x + scalar, this.y + scalar, this.z + scalar, this.w + scalar);\n },\n minus: function (v) {\n return new Vector4(this.x - v.x, this.y - v.y, this.z - v.z, this.w - v.w);\n },\n minusScalar: function (scalar) {\n return new Vector4(this.x - scalar, this.y - scalar, this.z - scalar, this.w - scalar);\n },\n dividedScalar: function (scalar) {\n return new Vector4(this.x / scalar, this.y / scalar, this.z / scalar, this.w / scalar);\n },\n negated: function () {\n return new Vector4(-this.x, -this.y, -this.z, -this.w);\n },\n angleBetween: function (v) {\n return Math.acos(dot.clamp(this.normalized().dot(v.normalized()), -1, 1));\n },\n blend: function (vector, ratio) {\n return this.plus(vector.minus(this).times(ratio));\n },\n toString: function () {\n return 'Vector4(' + this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w + ')';\n },\n toVector3: function () {\n return new dot.Vector3(this.x, this.y, this.z);\n },\n set: function (x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n },\n setX: function (x) {\n this.x = x;\n },\n setY: function (y) {\n this.y = y;\n },\n setZ: function (z) {\n this.z = z;\n },\n setW: function (w) {\n this.w = w;\n },\n copy: function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n this.w = v.w;\n },\n add: function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n },\n addScalar: function (scalar) {\n this.x += scalar;\n this.y += scalar;\n this.z += scalar;\n this.w += scalar;\n },\n subtract: function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n },\n subtractScalar: function (scalar) {\n this.x -= scalar;\n this.y -= scalar;\n this.z -= scalar;\n this.w -= scalar;\n },\n componentMultiply: function (v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n this.w *= v.w;\n },\n divideScalar: function (scalar) {\n this.x /= scalar;\n this.y /= scalar;\n this.z /= scalar;\n this.w /= scalar;\n },\n negate: function () {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n },\n equals: function (other) {\n return this.x === other.x && this.y === other.y && this.z === other.z && this.w === other.w;\n },\n equalsEpsilon: function (other, epsilon) {\n if (!epsilon) {\n epsilon = 0;\n }\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y) + Math.abs(this.z - other.z) + Math.abs(this.w - other.w) <= epsilon;\n },\n isVector4: true,\n dimension: 4\n };\n Vector4.Immutable = function (x, y, z, w) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w !== undefined ? w : 1;\n };\n var Immutable = Vector4.Immutable;\n Immutable.prototype = new Vector4();\n Immutable.prototype.constructor = Immutable;\n Immutable.mutableOverrideHelper = function (mutableFunctionName) {\n Immutable.prototype[mutableFunctionName] = function () {\n throw new Error('Cannot call mutable method \\'' + mutableFunctionName + '\\' on immutable Vector4');\n };\n };\n Immutable.mutableOverrideHelper('set');\n Immutable.mutableOverrideHelper('setX');\n Immutable.mutableOverrideHelper('setY');\n Immutable.mutableOverrideHelper('setZ');\n Immutable.mutableOverrideHelper('setW');\n Immutable.mutableOverrideHelper('copy');\n Immutable.mutableOverrideHelper('add');\n Immutable.mutableOverrideHelper('addScalar');\n Immutable.mutableOverrideHelper('subtract');\n Immutable.mutableOverrideHelper('subtractScalar');\n Immutable.mutableOverrideHelper('componentMultiply');\n Immutable.mutableOverrideHelper('divideScalar');\n Immutable.mutableOverrideHelper('negate');\n Vector4.ZERO = new Immutable(0, 0, 0, 0);\n Vector4.X_UNIT = new Immutable(1, 0, 0, 0);\n Vector4.Y_UNIT = new Immutable(0, 1, 0, 0);\n Vector4.Z_UNIT = new Immutable(0, 0, 1, 0);\n Vector4.W_UNIT = new Immutable(0, 0, 0, 1);\n return Vector4;\n});",
"\ndefine('DOT/Vector3',['require','DOT/dot','DOT/Util','DOT/Vector2','DOT/Vector4'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n require('DOT/Util');\n require('DOT/Vector2');\n require('DOT/Vector4');\n dot.Vector3 = function Vector3(x, y, z) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n };\n var Vector3 = dot.Vector3;\n Vector3.prototype = {\n constructor: Vector3,\n magnitude: function () {\n return Math.sqrt(this.magnitudeSquared());\n },\n magnitudeSquared: function () {\n return this.dot(this);\n },\n distance: function (point) {\n return this.minus(point).magnitude();\n },\n distanceSquared: function (point) {\n return this.minus(point).magnitudeSquared();\n },\n dot: function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n isFinite: function () {\n return isFinite(this.x) && isFinite(this.y) && isFinite(this.z);\n },\n cross: function (v) {\n return new Vector3(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\n },\n normalized: function () {\n var mag = this.magnitude();\n if (mag === 0) {\n throw new Error('Cannot normalize a zero-magnitude vector');\n } else {\n return new Vector3(this.x / mag, this.y / mag, this.z / mag);\n }\n },\n timesScalar: function (scalar) {\n return new Vector3(this.x * scalar, this.y * scalar, this.z * scalar);\n },\n times: function (scalar) {\n null;\n return this.timesScalar(scalar);\n },\n componentTimes: function (v) {\n return new Vector3(this.x * v.x, this.y * v.y, this.z * v.z);\n },\n plus: function (v) {\n return new Vector3(this.x + v.x, this.y + v.y, this.z + v.z);\n },\n plusScalar: function (scalar) {\n return new Vector3(this.x + scalar, this.y + scalar, this.z + scalar);\n },\n minus: function (v) {\n return new Vector3(this.x - v.x, this.y - v.y, this.z - v.z);\n },\n minusScalar: function (scalar) {\n return new Vector3(this.x - scalar, this.y - scalar, this.z - scalar);\n },\n dividedScalar: function (scalar) {\n return new Vector3(this.x / scalar, this.y / scalar, this.z / scalar);\n },\n negated: function () {\n return new Vector3(-this.x, -this.y, -this.z);\n },\n angleBetween: function (v) {\n return Math.acos(dot.clamp(this.normalized().dot(v.normalized()), -1, 1));\n },\n blend: function (vector, ratio) {\n return this.plus(vector.minus(this).times(ratio));\n },\n toString: function () {\n return 'Vector3(' + this.x + ', ' + this.y + ', ' + this.z + ')';\n },\n toVector2: function () {\n return new dot.Vector2(this.x, this.y);\n },\n toVector4: function () {\n return new dot.Vector4(this.x, this.y, this.z);\n },\n set: function (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n },\n setX: function (x) {\n this.x = x;\n },\n setY: function (y) {\n this.y = y;\n },\n setZ: function (z) {\n this.z = z;\n },\n copy: function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n },\n add: function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n },\n addScalar: function (scalar) {\n this.x += scalar;\n this.y += scalar;\n this.z += scalar;\n },\n subtract: function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n },\n subtractScalar: function (scalar) {\n this.x -= scalar;\n this.y -= scalar;\n this.z -= scalar;\n },\n componentMultiply: function (v) {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z;\n },\n divideScalar: function (scalar) {\n this.x /= scalar;\n this.y /= scalar;\n this.z /= scalar;\n },\n negate: function () {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n },\n equals: function (other) {\n return this.x === other.x && this.y === other.y && this.z === other.z;\n },\n equalsEpsilon: function (other, epsilon) {\n if (!epsilon) {\n epsilon = 0;\n }\n return Math.abs(this.x - other.x) + Math.abs(this.y - other.y) + Math.abs(this.z - other.z) <= epsilon;\n },\n isVector3: true,\n dimension: 3\n };\n Vector3.Immutable = function (x, y, z) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n };\n var Immutable = Vector3.Immutable;\n Immutable.prototype = new Vector3();\n Immutable.prototype.constructor = Immutable;\n Immutable.mutableOverrideHelper = function (mutableFunctionName) {\n Immutable.prototype[mutableFunctionName] = function () {\n throw new Error('Cannot call mutable method \\'' + mutableFunctionName + '\\' on immutable Vector3');\n };\n };\n Immutable.mutableOverrideHelper('set');\n Immutable.mutableOverrideHelper('setX');\n Immutable.mutableOverrideHelper('setY');\n Immutable.mutableOverrideHelper('setZ');\n Immutable.mutableOverrideHelper('copy');\n Immutable.mutableOverrideHelper('add');\n Immutable.mutableOverrideHelper('addScalar');\n Immutable.mutableOverrideHelper('subtract');\n Immutable.mutableOverrideHelper('subtractScalar');\n Immutable.mutableOverrideHelper('componentMultiply');\n Immutable.mutableOverrideHelper('divideScalar');\n Immutable.mutableOverrideHelper('negate');\n Vector3.ZERO = new Immutable(0, 0, 0);\n Vector3.X_UNIT = new Immutable(1, 0, 0);\n Vector3.Y_UNIT = new Immutable(0, 1, 0);\n Vector3.Z_UNIT = new Immutable(0, 0, 1);\n return Vector3;\n});",
"\ndefine('DOT/Matrix4',['require','DOT/dot','DOT/Vector3','DOT/Vector4'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n require('DOT/Vector3');\n require('DOT/Vector4');\n var Float32Array = window.Float32Array || Array;\n dot.Matrix4 = function Matrix4(v00, v01, v02, v03, v10, v11, v12, v13, v20, v21, v22, v23, v30, v31, v32, v33, type) {\n this.entries = new Float32Array(16);\n this.rowMajor(v00 === undefined ? 1 : v00, v01 || 0, v02 || 0, v03 || 0, v10 || 0, v11 === undefined ? 1 : v11, v12 || 0, v13 || 0, v20 || 0, v21 || 0, v22 === undefined ? 1 : v22, v23 || 0, v30 || 0, v31 || 0, v32 || 0, v33 === undefined ? 1 : v33, type);\n };\n var Matrix4 = dot.Matrix4;\n Matrix4.Types = {\n OTHER: 0,\n IDENTITY: 1,\n TRANSLATION_3D: 2,\n SCALING: 3\n };\n var Types = Matrix4.Types;\n Matrix4.identity = function () {\n return new Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, Types.IDENTITY);\n };\n Matrix4.translation = function (x, y, z) {\n return new Matrix4(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1, Types.TRANSLATION_3D);\n };\n Matrix4.translationFromVector = function (v) {\n return Matrix4.translation(v.x, v.y, v.z);\n };\n Matrix4.scaling = function (x, y, z) {\n y = y === undefined ? x : y;\n z = z === undefined ? x : z;\n return new Matrix4(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1, Types.SCALING);\n };\n Matrix4.rotationAxisAngle = function (axis, angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var C = 1 - c;\n return new Matrix4(axis.x * axis.x * C + c, axis.x * axis.y * C - axis.z * s, axis.x * axis.z * C + axis.y * s, 0, axis.y * axis.x * C + axis.z * s, axis.y * axis.y * C + c, axis.y * axis.z * C - axis.x * s, 0, axis.z * axis.x * C - axis.y * s, axis.z * axis.y * C + axis.x * s, axis.z * axis.z * C + c, 0, 0, 0, 0, 1, Types.OTHER);\n };\n Matrix4.rotationX = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix4(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, Types.OTHER);\n };\n Matrix4.rotationY = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix4(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1, Types.OTHER);\n };\n Matrix4.rotationZ = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix4(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, Types.OTHER);\n };\n Matrix4.gluPerspective = function (fovYRadians, aspect, zNear, zFar) {\n var cotangent = Math.cos(fovYRadians) / Math.sin(fovYRadians);\n return new Matrix4(cotangent / aspect, 0, 0, 0, 0, cotangent, 0, 0, 0, 0, (zFar + zNear) / (zNear - zFar), 2 * zFar * zNear / (zNear - zFar), 0, 0, -1, 0);\n };\n Matrix4.prototype = {\n constructor: Matrix4,\n rowMajor: function (v00, v01, v02, v03, v10, v11, v12, v13, v20, v21, v22, v23, v30, v31, v32, v33, type) {\n this.entries[0] = v00;\n this.entries[1] = v10;\n this.entries[2] = v20;\n this.entries[3] = v30;\n this.entries[4] = v01;\n this.entries[5] = v11;\n this.entries[6] = v21;\n this.entries[7] = v31;\n this.entries[8] = v02;\n this.entries[9] = v12;\n this.entries[10] = v22;\n this.entries[11] = v32;\n this.entries[12] = v03;\n this.entries[13] = v13;\n this.entries[14] = v23;\n this.entries[15] = v33;\n this.type = type === undefined ? Types.OTHER : type;\n },\n columnMajor: function (v00, v10, v20, v30, v01, v11, v21, v31, v02, v12, v22, v32, v03, v13, v23, v33, type) {\n this.rowMajor(v00, v01, v02, v03, v10, v11, v12, v13, v20, v21, v22, v23, v30, v31, v32, v33, type);\n },\n m00: function () {\n return this.entries[0];\n },\n m01: function () {\n return this.entries[4];\n },\n m02: function () {\n return this.entries[8];\n },\n m03: function () {\n return this.entries[12];\n },\n m10: function () {\n return this.entries[1];\n },\n m11: function () {\n return this.entries[5];\n },\n m12: function () {\n return this.entries[9];\n },\n m13: function () {\n return this.entries[13];\n },\n m20: function () {\n return this.entries[2];\n },\n m21: function () {\n return this.entries[6];\n },\n m22: function () {\n return this.entries[10];\n },\n m23: function () {\n return this.entries[14];\n },\n m30: function () {\n return this.entries[3];\n },\n m31: function () {\n return this.entries[7];\n },\n m32: function () {\n return this.entries[11];\n },\n m33: function () {\n return this.entries[15];\n },\n plus: function (m) {\n return new Matrix4(this.m00() + m.m00(), this.m01() + m.m01(), this.m02() + m.m02(), this.m03() + m.m03(), this.m10() + m.m10(), this.m11() + m.m11(), this.m12() + m.m12(), this.m13() + m.m13(), this.m20() + m.m20(), this.m21() + m.m21(), this.m22() + m.m22(), this.m23() + m.m23(), this.m30() + m.m30(), this.m31() + m.m31(), this.m32() + m.m32(), this.m33() + m.m33());\n },\n minus: function (m) {\n return new Matrix4(this.m00() - m.m00(), this.m01() - m.m01(), this.m02() - m.m02(), this.m03() - m.m03(), this.m10() - m.m10(), this.m11() - m.m11(), this.m12() - m.m12(), this.m13() - m.m13(), this.m20() - m.m20(), this.m21() - m.m21(), this.m22() - m.m22(), this.m23() - m.m23(), this.m30() - m.m30(), this.m31() - m.m31(), this.m32() - m.m32(), this.m33() - m.m33());\n },\n transposed: function () {\n return new Matrix4(this.m00(), this.m10(), this.m20(), this.m30(), this.m01(), this.m11(), this.m21(), this.m31(), this.m02(), this.m12(), this.m22(), this.m32(), this.m03(), this.m13(), this.m23(), this.m33());\n },\n negated: function () {\n return new Matrix4(-this.m00(), -this.m01(), -this.m02(), -this.m03(), -this.m10(), -this.m11(), -this.m12(), -this.m13(), -this.m20(), -this.m21(), -this.m22(), -this.m23(), -this.m30(), -this.m31(), -this.m32(), -this.m33());\n },\n inverted: function () {\n var det = this.determinant();\n if (det !== 0) {\n return new Matrix4((-this.m31() * this.m22() * this.m13() + this.m21() * this.m32() * this.m13() + this.m31() * this.m12() * this.m23() - this.m11() * this.m32() * this.m23() - this.m21() * this.m12() * this.m33() + this.m11() * this.m22() * this.m33()) / det, (this.m31() * this.m22() * this.m03() - this.m21() * this.m32() * this.m03() - this.m31() * this.m02() * this.m23() + this.m01() * this.m32() * this.m23() + this.m21() * this.m02() * this.m33() - this.m01() * this.m22() * this.m33()) / det, (-this.m31() * this.m12() * this.m03() + this.m11() * this.m32() * this.m03() + this.m31() * this.m02() * this.m13() - this.m01() * this.m32() * this.m13() - this.m11() * this.m02() * this.m33() + this.m01() * this.m12() * this.m33()) / det, (this.m21() * this.m12() * this.m03() - this.m11() * this.m22() * this.m03() - this.m21() * this.m02() * this.m13() + this.m01() * this.m22() * this.m13() + this.m11() * this.m02() * this.m23() - this.m01() * this.m12() * this.m23()) / det, (this.m30() * this.m22() * this.m13() - this.m20() * this.m32() * this.m13() - this.m30() * this.m12() * this.m23() + this.m10() * this.m32() * this.m23() + this.m20() * this.m12() * this.m33() - this.m10() * this.m22() * this.m33()) / det, (-this.m30() * this.m22() * this.m03() + this.m20() * this.m32() * this.m03() + this.m30() * this.m02() * this.m23() - this.m00() * this.m32() * this.m23() - this.m20() * this.m02() * this.m33() + this.m00() * this.m22() * this.m33()) / det, (this.m30() * this.m12() * this.m03() - this.m10() * this.m32() * this.m03() - this.m30() * this.m02() * this.m13() + this.m00() * this.m32() * this.m13() + this.m10() * this.m02() * this.m33() - this.m00() * this.m12() * this.m33()) / det, (-this.m20() * this.m12() * this.m03() + this.m10() * this.m22() * this.m03() + this.m20() * this.m02() * this.m13() - this.m00() * this.m22() * this.m13() - this.m10() * this.m02() * this.m23() + this.m00() * this.m12() * this.m23()) / det, (-this.m30() * this.m21() * this.m13() + this.m20() * this.m31() * this.m13() + this.m30() * this.m11() * this.m23() - this.m10() * this.m31() * this.m23() - this.m20() * this.m11() * this.m33() + this.m10() * this.m21() * this.m33()) / det, (this.m30() * this.m21() * this.m03() - this.m20() * this.m31() * this.m03() - this.m30() * this.m01() * this.m23() + this.m00() * this.m31() * this.m23() + this.m20() * this.m01() * this.m33() - this.m00() * this.m21() * this.m33()) / det, (-this.m30() * this.m11() * this.m03() + this.m10() * this.m31() * this.m03() + this.m30() * this.m01() * this.m13() - this.m00() * this.m31() * this.m13() - this.m10() * this.m01() * this.m33() + this.m00() * this.m11() * this.m33()) / det, (this.m20() * this.m11() * this.m03() - this.m10() * this.m21() * this.m03() - this.m20() * this.m01() * this.m13() + this.m00() * this.m21() * this.m13() + this.m10() * this.m01() * this.m23() - this.m00() * this.m11() * this.m23()) / det, (this.m30() * this.m21() * this.m12() - this.m20() * this.m31() * this.m12() - this.m30() * this.m11() * this.m22() + this.m10() * this.m31() * this.m22() + this.m20() * this.m11() * this.m32() - this.m10() * this.m21() * this.m32()) / det, (-this.m30() * this.m21() * this.m02() + this.m20() * this.m31() * this.m02() + this.m30() * this.m01() * this.m22() - this.m00() * this.m31() * this.m22() - this.m20() * this.m01() * this.m32() + this.m00() * this.m21() * this.m32()) / det, (this.m30() * this.m11() * this.m02() - this.m10() * this.m31() * this.m02() - this.m30() * this.m01() * this.m12() + this.m00() * this.m31() * this.m12() + this.m10() * this.m01() * this.m32() - this.m00() * this.m11() * this.m32()) / det, (-this.m20() * this.m11() * this.m02() + this.m10() * this.m21() * this.m02() + this.m20() * this.m01() * this.m12() - this.m00() * this.m21() * this.m12() - this.m10() * this.m01() * this.m22() + this.m00() * this.m11() * this.m22()) / det);\n } else {\n throw new Error('Matrix could not be inverted, determinant === 0');\n }\n },\n timesMatrix: function (m) {\n var newType = Types.OTHER;\n if (this.type === Types.TRANSLATION_3D && m.type === Types.TRANSLATION_3D) {\n newType = Types.TRANSLATION_3D;\n }\n if (this.type === Types.SCALING && m.type === Types.SCALING) {\n newType = Types.SCALING;\n }\n if (this.type === Types.IDENTITY) {\n newType = m.type;\n }\n if (m.type === Types.IDENTITY) {\n newType = this.type;\n }\n return new Matrix4(this.m00() * m.m00() + this.m01() * m.m10() + this.m02() * m.m20() + this.m03() * m.m30(), this.m00() * m.m01() + this.m01() * m.m11() + this.m02() * m.m21() + this.m03() * m.m31(), this.m00() * m.m02() + this.m01() * m.m12() + this.m02() * m.m22() + this.m03() * m.m32(), this.m00() * m.m03() + this.m01() * m.m13() + this.m02() * m.m23() + this.m03() * m.m33(), this.m10() * m.m00() + this.m11() * m.m10() + this.m12() * m.m20() + this.m13() * m.m30(), this.m10() * m.m01() + this.m11() * m.m11() + this.m12() * m.m21() + this.m13() * m.m31(), this.m10() * m.m02() + this.m11() * m.m12() + this.m12() * m.m22() + this.m13() * m.m32(), this.m10() * m.m03() + this.m11() * m.m13() + this.m12() * m.m23() + this.m13() * m.m33(), this.m20() * m.m00() + this.m21() * m.m10() + this.m22() * m.m20() + this.m23() * m.m30(), this.m20() * m.m01() + this.m21() * m.m11() + this.m22() * m.m21() + this.m23() * m.m31(), this.m20() * m.m02() + this.m21() * m.m12() + this.m22() * m.m22() + this.m23() * m.m32(), this.m20() * m.m03() + this.m21() * m.m13() + this.m22() * m.m23() + this.m23() * m.m33(), this.m30() * m.m00() + this.m31() * m.m10() + this.m32() * m.m20() + this.m33() * m.m30(), this.m30() * m.m01() + this.m31() * m.m11() + this.m32() * m.m21() + this.m33() * m.m31(), this.m30() * m.m02() + this.m31() * m.m12() + this.m32() * m.m22() + this.m33() * m.m32(), this.m30() * m.m03() + this.m31() * m.m13() + this.m32() * m.m23() + this.m33() * m.m33(), newType);\n },\n timesVector4: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y + this.m02() * v.z + this.m03() * v.w;\n var y = this.m10() * v.x + this.m11() * v.y + this.m12() * v.z + this.m13() * v.w;\n var z = this.m20() * v.x + this.m21() * v.y + this.m22() * v.z + this.m23() * v.w;\n var w = this.m30() * v.x + this.m31() * v.y + this.m32() * v.z + this.m33() * v.w;\n return new dot.Vector4(x, y, z, w);\n },\n timesVector3: function (v) {\n return this.timesVector4(v.toVector4()).toVector3();\n },\n timesTransposeVector4: function (v) {\n var x = this.m00() * v.x + this.m10() * v.y + this.m20() * v.z + this.m30() * v.w;\n var y = this.m01() * v.x + this.m11() * v.y + this.m21() * v.z + this.m31() * v.w;\n var z = this.m02() * v.x + this.m12() * v.y + this.m22() * v.z + this.m32() * v.w;\n var w = this.m03() * v.x + this.m13() * v.y + this.m23() * v.z + this.m33() * v.w;\n return new dot.Vector4(x, y, z, w);\n },\n timesTransposeVector3: function (v) {\n return this.timesTransposeVector4(v.toVector4()).toVector3();\n },\n timesRelativeVector3: function (v) {\n var x = this.m00() * v.x + this.m10() * v.y + this.m20() * v.z;\n var y = this.m01() * v.y + this.m11() * v.y + this.m21() * v.z;\n var z = this.m02() * v.z + this.m12() * v.y + this.m22() * v.z;\n return new dot.Vector3(x, y, z);\n },\n determinant: function () {\n return this.m03() * this.m12() * this.m21() * this.m30() - this.m02() * this.m13() * this.m21() * this.m30() - this.m03() * this.m11() * this.m22() * this.m30() + this.m01() * this.m13() * this.m22() * this.m30() + this.m02() * this.m11() * this.m23() * this.m30() - this.m01() * this.m12() * this.m23() * this.m30() - this.m03() * this.m12() * this.m20() * this.m31() + this.m02() * this.m13() * this.m20() * this.m31() + this.m03() * this.m10() * this.m22() * this.m31() - this.m00() * this.m13() * this.m22() * this.m31() - this.m02() * this.m10() * this.m23() * this.m31() + this.m00() * this.m12() * this.m23() * this.m31() + this.m03() * this.m11() * this.m20() * this.m32() - this.m01() * this.m13() * this.m20() * this.m32() - this.m03() * this.m10() * this.m21() * this.m32() + this.m00() * this.m13() * this.m21() * this.m32() + this.m01() * this.m10() * this.m23() * this.m32() - this.m00() * this.m11() * this.m23() * this.m32() - this.m02() * this.m11() * this.m20() * this.m33() + this.m01() * this.m12() * this.m20() * this.m33() + this.m02() * this.m10() * this.m21() * this.m33() - this.m00() * this.m12() * this.m21() * this.m33() - this.m01() * this.m10() * this.m22() * this.m33() + this.m00() * this.m11() * this.m22() * this.m33();\n },\n toString: function () {\n return this.m00() + ' ' + this.m01() + ' ' + this.m02() + ' ' + this.m03() + '\\n' + this.m10() + ' ' + this.m11() + ' ' + this.m12() + ' ' + this.m13() + '\\n' + this.m20() + ' ' + this.m21() + ' ' + this.m22() + ' ' + this.m23() + '\\n' + this.m30() + ' ' + this.m31() + ' ' + this.m32() + ' ' + this.m33();\n },\n translation: function () {\n return new dot.Vector3(this.m03(), this.m13(), this.m23());\n },\n scaling: function () {\n return new dot.Vector3(this.m00(), this.m11(), this.m22());\n },\n makeImmutable: function () {\n this.rowMajor = function () {\n throw new Error('Cannot modify immutable matrix');\n };\n }\n };\n Matrix4.IDENTITY = new Matrix4();\n Matrix4.IDENTITY.makeImmutable();\n return Matrix4;\n});",
"\ndefine('DOT/Matrix3',['require','DOT/dot','DOT/Vector2','DOT/Vector3','DOT/Matrix4'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n var FastArray = dot.FastArray;\n require('DOT/Vector2');\n require('DOT/Vector3');\n require('DOT/Matrix4');\n dot.Matrix3 = function Matrix3(v00, v01, v02, v10, v11, v12, v20, v21, v22, type) {\n this.entries = new FastArray(9);\n this.rowMajor(v00 === undefined ? 1 : v00, v01 || 0, v02 || 0, v10 || 0, v11 === undefined ? 1 : v11, v12 || 0, v20 || 0, v21 || 0, v22 === undefined ? 1 : v22, type);\n phetAllocation && phetAllocation('Matrix3');\n };\n var Matrix3 = dot.Matrix3;\n Matrix3.Types = {\n OTHER: 0,\n IDENTITY: 1,\n TRANSLATION_2D: 2,\n SCALING: 3,\n AFFINE: 4\n };\n var Types = Matrix3.Types;\n Matrix3.identity = function () {\n return new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1, Types.IDENTITY);\n };\n Matrix3.translation = function (x, y) {\n return new Matrix3(1, 0, x, 0, 1, y, 0, 0, 1, Types.TRANSLATION_2D);\n };\n Matrix3.translationFromVector = function (v) {\n return Matrix3.translation(v.x, v.y);\n };\n Matrix3.scaling = function (x, y) {\n y = y === undefined ? x : y;\n return new Matrix3(x, 0, 0, 0, y, 0, 0, 0, 1, Types.SCALING);\n };\n Matrix3.scale = Matrix3.scaling;\n Matrix3.affine = function (m00, m10, m01, m11, m02, m12) {\n return new Matrix3(m00, m01, m02, m10, m11, m12, 0, 0, 1, Types.AFFINE);\n };\n Matrix3.rotationAxisAngle = function (axis, angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var C = 1 - c;\n return new Matrix3(axis.x * axis.x * C + c, axis.x * axis.y * C - axis.z * s, axis.x * axis.z * C + axis.y * s, axis.y * axis.x * C + axis.z * s, axis.y * axis.y * C + c, axis.y * axis.z * C - axis.x * s, axis.z * axis.x * C - axis.y * s, axis.z * axis.y * C + axis.x * s, axis.z * axis.z * C + c, Types.OTHER);\n };\n Matrix3.rotationX = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix3(1, 0, 0, 0, c, -s, 0, s, c, Types.OTHER);\n };\n Matrix3.rotationY = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix3(c, 0, s, 0, 1, 0, -s, 0, c, Types.OTHER);\n };\n Matrix3.rotationZ = function (angle) {\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n return new Matrix3(c, -s, 0, s, c, 0, 0, 0, 1, Types.AFFINE);\n };\n Matrix3.rotation2 = Matrix3.rotationZ;\n Matrix3.fromSVGMatrix = function (svgMatrix) {\n return new Matrix3(svgMatrix.a, svgMatrix.c, svgMatrix.e, svgMatrix.b, svgMatrix.d, svgMatrix.f, 0, 0, 1, Types.AFFINE);\n };\n Matrix3.rotateAToB = function (a, b) {\n var start = a;\n var end = b;\n var epsilon = 0.0001;\n var e, h, f;\n var v = start.cross(end);\n e = start.dot(end);\n f = e < 0 ? -e : e;\n if (f > 1 - epsilon) {\n var c1, c2, c3;\n var i, j;\n var x = new dot.Vector3(start.x > 0 ? start.x : -start.x, start.y > 0 ? start.y : -start.y, start.z > 0 ? start.z : -start.z);\n if (x.x < x.y) {\n if (x.x < x.z) {\n x = dot.Vector3.X_UNIT;\n } else {\n x = dot.Vector3.Z_UNIT;\n }\n } else {\n if (x.y < x.z) {\n x = dot.Vector3.Y_UNIT;\n } else {\n x = dot.Vector3.Z_UNIT;\n }\n }\n var u = x.minus(start);\n v = x.minus(end);\n c1 = 2 / u.dot(u);\n c2 = 2 / v.dot(v);\n c3 = c1 * c2 * u.dot(v);\n return Matrix3.IDENTITY.plus(Matrix3.rowMajor(-c1 * u.x * u.x - c2 * v.x * v.x + c3 * v.x * u.x, -c1 * u.x * u.y - c2 * v.x * v.y + c3 * v.x * u.y, -c1 * u.x * u.z - c2 * v.x * v.z + c3 * v.x * u.z, -c1 * u.y * u.x - c2 * v.y * v.x + c3 * v.y * u.x, -c1 * u.y * u.y - c2 * v.y * v.y + c3 * v.y * u.y, -c1 * u.y * u.z - c2 * v.y * v.z + c3 * v.y * u.z, -c1 * u.z * u.x - c2 * v.z * v.x + c3 * v.z * u.x, -c1 * u.z * u.y - c2 * v.z * v.y + c3 * v.z * u.y, -c1 * u.z * u.z - c2 * v.z * v.z + c3 * v.z * u.z));\n } else {\n var hvx, hvz, hvxy, hvxz, hvyz;\n h = 1 / (1 + e);\n hvx = h * v.x;\n hvz = h * v.z;\n hvxy = hvx * v.y;\n hvxz = hvx * v.z;\n hvyz = hvz * v.y;\n return Matrix3.rowMajor(e + hvx * v.x, hvxy - v.z, hvxz + v.y, hvxy + v.z, e + h * v.y * v.y, hvyz - v.x, hvxz - v.y, hvyz + v.x, e + hvz * v.z);\n }\n };\n Matrix3.prototype = {\n constructor: Matrix3,\n m00: function () {\n return this.entries[0];\n },\n m01: function () {\n return this.entries[3];\n },\n m02: function () {\n return this.entries[6];\n },\n m10: function () {\n return this.entries[1];\n },\n m11: function () {\n return this.entries[4];\n },\n m12: function () {\n return this.entries[7];\n },\n m20: function () {\n return this.entries[2];\n },\n m21: function () {\n return this.entries[5];\n },\n m22: function () {\n return this.entries[8];\n },\n isAffine: function () {\n return this.type === Types.AFFINE || this.m20() === 0 && this.m21() === 0 && this.m22() === 1;\n },\n isFinite: function () {\n return isFinite(this.m00()) && isFinite(this.m01()) && isFinite(this.m02()) && isFinite(this.m10()) && isFinite(this.m11()) && isFinite(this.m12()) && isFinite(this.m20()) && isFinite(this.m21()) && isFinite(this.m22());\n },\n getDeterminant: function () {\n return this.m00() * this.m11() * this.m22() + this.m01() * this.m12() * this.m20() + this.m02() * this.m10() * this.m21() - this.m02() * this.m11() * this.m20() - this.m01() * this.m10() * this.m22() - this.m00() * this.m12() * this.m21();\n },\n get determinant() {\n return this.getDeterminant();\n },\n getTranslation: function () {\n return new dot.Vector2(this.m02(), this.m12());\n },\n get translation() {\n return this.getTranslation();\n },\n getScaleVector: function () {\n return new dot.Vector2(Math.sqrt(this.m00() * this.m00() + this.m10() * this.m10()), Math.sqrt(this.m01() * this.m01() + this.m11() * this.m11()));\n },\n get scaleVector() {\n return this.getScaleVector();\n },\n getRotation: function () {\n var transformedVector = this.timesVector2(dot.Vector2.X_UNIT).minus(this.timesVector2(dot.Vector2.ZERO));\n return Math.atan2(transformedVector.y, transformedVector.x);\n },\n get rotation() {\n return this.getRotation();\n },\n toMatrix4: function () {\n return new dot.Matrix4(this.m00(), this.m01(), this.m02(), 0, this.m10(), this.m11(), this.m12(), 0, this.m20(), this.m21(), this.m22(), 0, 0, 0, 0, 1);\n },\n toString: function () {\n return this.m00() + ' ' + this.m01() + ' ' + this.m02() + '\\n' + this.m10() + ' ' + this.m11() + ' ' + this.m12() + '\\n' + this.m20() + ' ' + this.m21() + ' ' + this.m22();\n },\n toSVGMatrix: function () {\n var result = document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGMatrix();\n result.a = this.m00();\n result.b = this.m10();\n result.c = this.m01();\n result.d = this.m11();\n result.e = this.m02();\n result.f = this.m12();\n return result;\n },\n getCSSTransform: function () {\n return 'matrix(' + this.entries[0].toFixed(20) + ',' + this.entries[1].toFixed(20) + ',' + this.entries[3].toFixed(20) + ',' + this.entries[4].toFixed(20) + ',' + this.entries[6].toFixed(20) + ',' + this.entries[7].toFixed(20) + ')';\n },\n get cssTransform() {\n return this.getCSSTransform();\n },\n getSVGTransform: function () {\n function svgNumber(number) {\n return number.toFixed(20);\n }\n switch (this.type) {\n case Types.IDENTITY:\n return '';\n case Types.TRANSLATION_2D:\n return 'translate(' + svgNumber(this.entries[6]) + ',' + this.entries[7] + ')';\n case Types.SCALING:\n return 'scale(' + svgNumber(this.entries[0]) + (this.entries[0] === this.entries[4] ? '' : ',' + svgNumber(this.entries[4])) + ')';\n default:\n return 'matrix(' + svgNumber(this.entries[0]) + ',' + svgNumber(this.entries[1]) + ',' + svgNumber(this.entries[3]) + ',' + svgNumber(this.entries[4]) + ',' + svgNumber(this.entries[6]) + ',' + svgNumber(this.entries[7]) + ')';\n }\n },\n get svgTransform() {\n return this.getSVGTransform();\n },\n getCSSTransformStyles: function () {\n var transformCSS = this.getCSSTransform();\n return {\n '-webkit-perspective': 1000,\n '-webkit-backface-visibility': 'hidden',\n '-webkit-transform': transformCSS + ' translateZ(0)',\n '-moz-transform': transformCSS + ' translateZ(0)',\n '-ms-transform': transformCSS,\n '-o-transform': transformCSS,\n 'transform': transformCSS,\n 'transform-origin': 'top left',\n '-ms-transform-origin': 'top left'\n };\n },\n get cssTransformStyles() {\n return this.getCSSTransformStyles();\n },\n equals: function (m) {\n return this.m00() === m.m00() && this.m01() === m.m01() && this.m02() === m.m02() && this.m10() === m.m10() && this.m11() === m.m11() && this.m12() === m.m12() && this.m20() === m.m20() && this.m21() === m.m21() && this.m22() === m.m22();\n },\n equalsEpsilon: function (m, epsilon) {\n return Math.abs(this.m00() - m.m00()) < epsilon && Math.abs(this.m01() - m.m01()) < epsilon && Math.abs(this.m02() - m.m02()) < epsilon && Math.abs(this.m10() - m.m10()) < epsilon && Math.abs(this.m11() - m.m11()) < epsilon && Math.abs(this.m12() - m.m12()) < epsilon && Math.abs(this.m20() - m.m20()) < epsilon && Math.abs(this.m21() - m.m21()) < epsilon && Math.abs(this.m22() - m.m22()) < epsilon;\n },\n copy: function () {\n return new Matrix3(this.m00(), this.m01(), this.m02(), this.m10(), this.m11(), this.m12(), this.m20(), this.m21(), this.m22(), this.type);\n },\n plus: function (m) {\n return new Matrix3(this.m00() + m.m00(), this.m01() + m.m01(), this.m02() + m.m02(), this.m10() + m.m10(), this.m11() + m.m11(), this.m12() + m.m12(), this.m20() + m.m20(), this.m21() + m.m21(), this.m22() + m.m22());\n },\n minus: function (m) {\n return new Matrix3(this.m00() - m.m00(), this.m01() - m.m01(), this.m02() - m.m02(), this.m10() - m.m10(), this.m11() - m.m11(), this.m12() - m.m12(), this.m20() - m.m20(), this.m21() - m.m21(), this.m22() - m.m22());\n },\n transposed: function () {\n return new Matrix3(this.m00(), this.m10(), this.m20(), this.m01(), this.m11(), this.m21(), this.m02(), this.m12(), this.m22(), this.type === Types.IDENTITY || this.type === Types.SCALING ? this.type : undefined);\n },\n negated: function () {\n return new Matrix3(-this.m00(), -this.m01(), -this.m02(), -this.m10(), -this.m11(), -this.m12(), -this.m20(), -this.m21(), -this.m22());\n },\n inverted: function () {\n var det;\n switch (this.type) {\n case Types.IDENTITY:\n return this;\n case Types.TRANSLATION_2D:\n return new Matrix3(1, 0, -this.m02(), 0, 1, -this.m12(), 0, 0, 1, Types.TRANSLATION_2D);\n case Types.SCALING:\n return new Matrix3(1 / this.m00(), 0, 0, 0, 1 / this.m11(), 0, 0, 0, 1 / this.m22(), Types.SCALING);\n case Types.AFFINE:\n det = this.getDeterminant();\n if (det !== 0) {\n return new Matrix3((-this.m12() * this.m21() + this.m11() * this.m22()) / det, (this.m02() * this.m21() - this.m01() * this.m22()) / det, (-this.m02() * this.m11() + this.m01() * this.m12()) / det, (this.m12() * this.m20() - this.m10() * this.m22()) / det, (-this.m02() * this.m20() + this.m00() * this.m22()) / det, (this.m02() * this.m10() - this.m00() * this.m12()) / det, 0, 0, 1, Types.AFFINE);\n } else {\n throw new Error('Matrix could not be inverted, determinant === 0');\n }\n break;\n case Types.OTHER:\n det = this.getDeterminant();\n if (det !== 0) {\n return new Matrix3((-this.m12() * this.m21() + this.m11() * this.m22()) / det, (this.m02() * this.m21() - this.m01() * this.m22()) / det, (-this.m02() * this.m11() + this.m01() * this.m12()) / det, (this.m12() * this.m20() - this.m10() * this.m22()) / det, (-this.m02() * this.m20() + this.m00() * this.m22()) / det, (this.m02() * this.m10() - this.m00() * this.m12()) / det, (-this.m11() * this.m20() + this.m10() * this.m21()) / det, (this.m01() * this.m20() - this.m00() * this.m21()) / det, (-this.m01() * this.m10() + this.m00() * this.m11()) / det, Types.OTHER);\n } else {\n throw new Error('Matrix could not be inverted, determinant === 0');\n }\n break;\n default:\n throw new Error('Matrix3.inverted with unknown type: ' + this.type);\n }\n },\n timesMatrix: function (m) {\n if (this.type === Types.IDENTITY || m.type === Types.IDENTITY) {\n return this.type === Types.IDENTITY ? m : this;\n }\n if (this.type === m.type) {\n if (this.type === Types.TRANSLATION_2D) {\n return new Matrix3(1, 0, this.m02() + m.m02(), 0, 1, this.m12() + m.m12(), 0, 0, 1, Types.TRANSLATION_2D);\n } else if (this.type === Types.SCALING) {\n return new Matrix3(this.m00() * m.m00(), 0, 0, 0, this.m11() * m.m11(), 0, 0, 0, 1, Types.SCALING);\n }\n }\n if (this.type !== Types.OTHER && m.type !== Types.OTHER) {\n return new Matrix3(this.m00() * m.m00() + this.m01() * m.m10(), this.m00() * m.m01() + this.m01() * m.m11(), this.m00() * m.m02() + this.m01() * m.m12() + this.m02(), this.m10() * m.m00() + this.m11() * m.m10(), this.m10() * m.m01() + this.m11() * m.m11(), this.m10() * m.m02() + this.m11() * m.m12() + this.m12(), 0, 0, 1, Types.AFFINE);\n }\n return new Matrix3(this.m00() * m.m00() + this.m01() * m.m10() + this.m02() * m.m20(), this.m00() * m.m01() + this.m01() * m.m11() + this.m02() * m.m21(), this.m00() * m.m02() + this.m01() * m.m12() + this.m02() * m.m22(), this.m10() * m.m00() + this.m11() * m.m10() + this.m12() * m.m20(), this.m10() * m.m01() + this.m11() * m.m11() + this.m12() * m.m21(), this.m10() * m.m02() + this.m11() * m.m12() + this.m12() * m.m22(), this.m20() * m.m00() + this.m21() * m.m10() + this.m22() * m.m20(), this.m20() * m.m01() + this.m21() * m.m11() + this.m22() * m.m21(), this.m20() * m.m02() + this.m21() * m.m12() + this.m22() * m.m22());\n },\n timesVector2: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y + this.m02();\n var y = this.m10() * v.x + this.m11() * v.y + this.m12();\n return new dot.Vector2(x, y);\n },\n timesVector3: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y + this.m02() * v.z;\n var y = this.m10() * v.x + this.m11() * v.y + this.m12() * v.z;\n var z = this.m20() * v.x + this.m21() * v.y + this.m22() * v.z;\n return new dot.Vector3(x, y, z);\n },\n timesTransposeVector2: function (v) {\n var x = this.m00() * v.x + this.m10() * v.y;\n var y = this.m01() * v.x + this.m11() * v.y;\n return new dot.Vector2(x, y);\n },\n timesRelativeVector2: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y;\n var y = this.m10() * v.y + this.m11() * v.y;\n return new dot.Vector2(x, y);\n },\n makeImmutable: function () {\n this.rowMajor = function () {\n throw new Error('Cannot modify immutable matrix');\n };\n return this;\n },\n rowMajor: function (v00, v01, v02, v10, v11, v12, v20, v21, v22, type) {\n this.entries[0] = v00;\n this.entries[1] = v10;\n this.entries[2] = v20;\n this.entries[3] = v01;\n this.entries[4] = v11;\n this.entries[5] = v21;\n this.entries[6] = v02;\n this.entries[7] = v12;\n this.entries[8] = v22;\n this.type = type === undefined ? v20 === 0 && v21 === 0 && v22 === 1 ? Types.AFFINE : Types.OTHER : type;\n return this;\n },\n columnMajor: function (v00, v10, v20, v01, v11, v21, v02, v12, v22, type) {\n return this.rowMajor(v00, v01, v02, v10, v11, v12, v20, v21, v22, type);\n },\n add: function (m) {\n return this.rowMajor(this.m00() + m.m00(), this.m01() + m.m01(), this.m02() + m.m02(), this.m10() + m.m10(), this.m11() + m.m11(), this.m12() + m.m12(), this.m20() + m.m20(), this.m21() + m.m21(), this.m22() + m.m22());\n },\n subtract: function (m) {\n return this.rowMajor(this.m00() - m.m00(), this.m01() - m.m01(), this.m02() - m.m02(), this.m10() - m.m10(), this.m11() - m.m11(), this.m12() - m.m12(), this.m20() - m.m20(), this.m21() - m.m21(), this.m22() - m.m22());\n },\n transpose: function () {\n return this.rowMajor(this.m00(), this.m10(), this.m20(), this.m01(), this.m11(), this.m21(), this.m02(), this.m12(), this.m22(), this.type === Types.IDENTITY || this.type === Types.SCALING ? this.type : undefined);\n },\n negate: function () {\n return this.rowMajor(-this.m00(), -this.m01(), -this.m02(), -this.m10(), -this.m11(), -this.m12(), -this.m20(), -this.m21(), -this.m22());\n },\n invert: function () {\n var det;\n switch (this.type) {\n case Types.IDENTITY:\n return this;\n case Types.TRANSLATION_2D:\n return this.rowMajor(1, 0, -this.m02(), 0, 1, -this.m12(), 0, 0, 1, Types.TRANSLATION_2D);\n case Types.SCALING:\n return this.rowMajor(1 / this.m00(), 0, 0, 0, 1 / this.m11(), 0, 0, 0, 1 / this.m22(), Types.SCALING);\n case Types.AFFINE:\n det = this.getDeterminant();\n if (det !== 0) {\n return this.rowMajor((-this.m12() * this.m21() + this.m11() * this.m22()) / det, (this.m02() * this.m21() - this.m01() * this.m22()) / det, (-this.m02() * this.m11() + this.m01() * this.m12()) / det, (this.m12() * this.m20() - this.m10() * this.m22()) / det, (-this.m02() * this.m20() + this.m00() * this.m22()) / det, (this.m02() * this.m10() - this.m00() * this.m12()) / det, 0, 0, 1, Types.AFFINE);\n } else {\n throw new Error('Matrix could not be inverted, determinant === 0');\n }\n break;\n case Types.OTHER:\n det = this.getDeterminant();\n if (det !== 0) {\n return this.rowMajor((-this.m12() * this.m21() + this.m11() * this.m22()) / det, (this.m02() * this.m21() - this.m01() * this.m22()) / det, (-this.m02() * this.m11() + this.m01() * this.m12()) / det, (this.m12() * this.m20() - this.m10() * this.m22()) / det, (-this.m02() * this.m20() + this.m00() * this.m22()) / det, (this.m02() * this.m10() - this.m00() * this.m12()) / det, (-this.m11() * this.m20() + this.m10() * this.m21()) / det, (this.m01() * this.m20() - this.m00() * this.m21()) / det, (-this.m01() * this.m10() + this.m00() * this.m11()) / det, Types.OTHER);\n } else {\n throw new Error('Matrix could not be inverted, determinant === 0');\n }\n break;\n default:\n throw new Error('Matrix3.inverted with unknown type: ' + this.type);\n }\n },\n multiplyMatrix: function (m) {\n if (this.type === Types.IDENTITY || m.type === Types.IDENTITY) {\n return this.type === Types.IDENTITY ? m : this;\n }\n if (this.type === m.type) {\n if (this.type === Types.TRANSLATION_2D) {\n return this.rowMajor(1, 0, this.m02() + m.m02(), 0, 1, this.m12() + m.m12(), 0, 0, 1, Types.TRANSLATION_2D);\n } else if (this.type === Types.SCALING) {\n return this.rowMajor(this.m00() * m.m00(), 0, 0, 0, this.m11() * m.m11(), 0, 0, 0, 1, Types.SCALING);\n }\n }\n if (this.type !== Types.OTHER && m.type !== Types.OTHER) {\n return this.rowMajor(this.m00() * m.m00() + this.m01() * m.m10(), this.m00() * m.m01() + this.m01() * m.m11(), this.m00() * m.m02() + this.m01() * m.m12() + this.m02(), this.m10() * m.m00() + this.m11() * m.m10(), this.m10() * m.m01() + this.m11() * m.m11(), this.m10() * m.m02() + this.m11() * m.m12() + this.m12(), 0, 0, 1, Types.AFFINE);\n }\n return this.rowMajor(this.m00() * m.m00() + this.m01() * m.m10() + this.m02() * m.m20(), this.m00() * m.m01() + this.m01() * m.m11() + this.m02() * m.m21(), this.m00() * m.m02() + this.m01() * m.m12() + this.m02() * m.m22(), this.m10() * m.m00() + this.m11() * m.m10() + this.m12() * m.m20(), this.m10() * m.m01() + this.m11() * m.m11() + this.m12() * m.m21(), this.m10() * m.m02() + this.m11() * m.m12() + this.m12() * m.m22(), this.m20() * m.m00() + this.m21() * m.m10() + this.m22() * m.m20(), this.m20() * m.m01() + this.m21() * m.m11() + this.m22() * m.m21(), this.m20() * m.m02() + this.m21() * m.m12() + this.m22() * m.m22());\n },\n multiplyVector2: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y + this.m02();\n var y = this.m10() * v.x + this.m11() * v.y + this.m12();\n v.setX(x);\n v.setY(y);\n return v;\n },\n multiplyVector3: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y + this.m02() * v.z;\n var y = this.m10() * v.x + this.m11() * v.y + this.m12() * v.z;\n var z = this.m20() * v.x + this.m21() * v.y + this.m22() * v.z;\n v.setX(x);\n v.setY(y);\n v.setZ(z);\n return v;\n },\n multiplyTransposeVector2: function (v) {\n var x = this.m00() * v.x + this.m10() * v.y;\n var y = this.m01() * v.x + this.m11() * v.y;\n v.setX(x);\n v.setY(y);\n return v;\n },\n multiplyRelativeVector2: function (v) {\n var x = this.m00() * v.x + this.m01() * v.y;\n var y = this.m10() * v.y + this.m11() * v.y;\n v.setX(x);\n v.setY(y);\n return v;\n },\n canvasSetTransform: function (context) {\n context.setTransform(this.entries[0], this.entries[1], this.entries[3], this.entries[4], this.entries[6], this.entries[7]);\n },\n canvasAppendTransform: function (context) {\n if (this.type !== Types.IDENTITY) {\n context.transform(this.entries[0], this.entries[1], this.entries[3], this.entries[4], this.entries[6], this.entries[7]);\n }\n }\n };\n Matrix3.IDENTITY = new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1, Types.IDENTITY);\n Matrix3.IDENTITY.makeImmutable();\n Matrix3.X_REFLECTION = new Matrix3(-1, 0, 0, 0, 1, 0, 0, 0, 1, Types.AFFINE);\n Matrix3.X_REFLECTION.makeImmutable();\n Matrix3.Y_REFLECTION = new Matrix3(1, 0, 0, 0, -1, 0, 0, 0, 1, Types.AFFINE);\n Matrix3.Y_REFLECTION.makeImmutable();\n Matrix3.translationTimesMatrix = function (x, y, m) {\n var type;\n if (m.type === Types.IDENTITY || m.type === Types.TRANSLATION_2D) {\n return new Matrix3(1, 0, m.m02() + x, 0, 1, m.m12() + y, 0, 0, 1, Types.TRANSLATION_2D);\n } else if (m.type === Types.OTHER) {\n type = Types.OTHER;\n } else {\n type = Types.AFFINE;\n }\n return new Matrix3(m.m00(), m.m01(), m.m02() + x, m.m10(), m.m11(), m.m12() + y, m.m20(), m.m21(), m.m22(), type);\n };\n Matrix3.printer = {\n print: function (matrix) {\n console.log(matrix.toString());\n }\n };\n return Matrix3;\n});",
"\ndefine('DOT/Ray2',['require','DOT/dot'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n dot.Ray2 = function Ray2(pos, dir) {\n this.pos = pos;\n this.dir = dir;\n null;\n phetAllocation && phetAllocation('Ray2');\n };\n var Ray2 = dot.Ray2;\n Ray2.prototype = {\n constructor: Ray2,\n shifted: function (distance) {\n return new Ray2(this.pointAtDistance(distance), this.dir);\n },\n pointAtDistance: function (distance) {\n return this.pos.plus(this.dir.timesScalar(distance));\n },\n toString: function () {\n return this.pos.toString() + ' => ' + this.dir.toString();\n }\n };\n return Ray2;\n});",
"\ndefine('DOT/Transform3',['require','DOT/dot','DOT/Matrix3','DOT/Vector2','DOT/Ray2'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n require('DOT/Matrix3');\n require('DOT/Vector2');\n require('DOT/Ray2');\n dot.Transform3 = function Transform3(matrix) {\n this.listeners = [];\n this.set(matrix === undefined ? dot.Matrix3.IDENTITY : matrix);\n phetAllocation && phetAllocation('Transform3');\n };\n var Transform3 = dot.Transform3;\n Transform3.prototype = {\n constructor: Transform3,\n set: function (matrix) {\n null;\n var oldMatrix = this.matrix;\n var length = this.listeners.length;\n var i;\n for (i = 0; i < length; i++) {\n this.listeners[i].before(matrix, oldMatrix);\n }\n this.matrix = matrix;\n this.inverse = null;\n this.matrixTransposed = null;\n this.inverseTransposed = null;\n for (i = 0; i < length; i++) {\n this.listeners[i].after(matrix, oldMatrix);\n }\n },\n prepend: function (matrix) {\n this.set(matrix.timesMatrix(this.matrix));\n },\n prependTranslation: function (x, y) {\n this.set(dot.Matrix3.translationTimesMatrix(x, y, this.matrix));\n },\n append: function (matrix) {\n this.set(this.matrix.timesMatrix(matrix));\n },\n prependTransform: function (transform) {\n this.prepend(transform.matrix);\n },\n appendTransform: function (transform) {\n this.append(transform.matrix);\n },\n applyToCanvasContext: function (context) {\n context.setTransform(this.matrix.m00(), this.matrix.m10(), this.matrix.m01(), this.matrix.m11(), this.matrix.m02(), this.matrix.m12());\n },\n copy: function () {\n var transform = new Transform3(this.matrix);\n transform.inverse = this.inverse;\n transform.matrixTransposed = this.matrixTransposed;\n transform.inverseTransposed = this.inverseTransposed;\n },\n deepCopy: function () {\n var transform = new Transform3(this.matrix.copy());\n transform.inverse = this.inverse ? this.inverse.copy() : null;\n transform.matrixTransposed = this.matrixTransposed ? this.matrixTransposed.copy() : null;\n transform.inverseTransposed = this.inverseTransposed ? this.inverseTransposed.copy() : null;\n },\n getMatrix: function () {\n return this.matrix;\n },\n getInverse: function () {\n if (this.inverse === null) {\n this.inverse = this.matrix.inverted();\n }\n return this.inverse;\n },\n getMatrixTransposed: function () {\n if (this.matrixTransposed === null) {\n this.matrixTransposed = this.matrix.transposed();\n }\n return this.matrixTransposed;\n },\n getInverseTransposed: function () {\n if (this.inverseTransposed === null) {\n this.inverseTransposed = this.getInverse().transposed();\n }\n return this.inverseTransposed;\n },\n isIdentity: function () {\n return this.matrix.type === dot.Matrix3.Types.IDENTITY;\n },\n isFinite: function () {\n return this.matrix.isFinite();\n },\n transformPosition2: function (vec2) {\n return this.matrix.timesVector2(vec2);\n },\n transformDelta2: function (vec2) {\n var m = this.getMatrix();\n return new dot.Vector2(m.m00() * vec2.x + m.m01() * vec2.y, m.m10() * vec2.x + m.m11() * vec2.y);\n },\n transformNormal2: function (vec2) {\n return this.getInverse().timesTransposeVector2(vec2);\n },\n transformX: function (x) {\n var m = this.getMatrix();\n null;\n return m.m00() * x + m.m02();\n },\n transformY: function (y) {\n var m = this.getMatrix();\n null;\n return m.m11() * y + m.m12();\n },\n transformDeltaX: function (x) {\n var m = this.getMatrix();\n null;\n return m.m00() * x;\n },\n transformDeltaY: function (y) {\n var m = this.getMatrix();\n null;\n return m.m11() * y;\n },\n transformBounds2: function (bounds2) {\n return bounds2.transformed(this.matrix);\n },\n transformShape: function (shape) {\n return shape.transformed(this.matrix);\n },\n transformRay2: function (ray) {\n return new dot.Ray2(this.transformPosition2(ray.pos), this.transformDelta2(ray.dir).normalized());\n },\n inversePosition2: function (vec2) {\n return this.getInverse().timesVector2(vec2);\n },\n inverseDelta2: function (vec2) {\n var m = this.getInverse();\n return new dot.Vector2(m.m00() * vec2.x + m.m01() * vec2.y, m.m10() * vec2.x + m.m11() * vec2.y);\n },\n inverseNormal2: function (vec2) {\n return this.matrix.timesTransposeVector2(vec2);\n },\n inverseX: function (x) {\n var m = this.getInverse();\n null;\n return m.m00() * x + m.m02();\n },\n inverseY: function (y) {\n var m = this.getInverse();\n null;\n return m.m11() * y + m.m12();\n },\n inverseDeltaX: function (x) {\n var m = this.getInverse();\n null;\n return m.m00() * x;\n },\n inverseDeltaY: function (y) {\n var m = this.getInverse();\n null;\n return m.m11() * y;\n },\n inverseBounds2: function (bounds2) {\n return bounds2.transformed(this.getInverse());\n },\n inverseShape: function (shape) {\n return shape.transformed(this.getInverse());\n },\n inverseRay2: function (ray) {\n return new dot.Ray2(this.inversePosition2(ray.pos), this.inverseDelta2(ray.dir).normalized());\n },\n addTransformListener: function (listener) {\n null;\n this.listeners.push(listener);\n },\n prependTransformListener: function (listener) {\n null;\n this.listeners.unshift(listener);\n },\n removeTransformListener: function (listener) {\n null;\n this.listeners.splice(_.indexOf(this.listeners, listener), 1);\n }\n };\n return Transform3;\n});",
"\ndefine('DOT/Bounds2',['require','DOT/dot','DOT/Vector2'],function (require) {\n 'use strict';\n var dot = require('DOT/dot');\n require('DOT/Vector2');\n dot.Bounds2 = function Bounds2(minX, minY, maxX, maxY) {\n null;\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n phetAllocation && phetAllocation('Bounds2');\n };\n var Bounds2 = dot.Bounds2;\n Bounds2.prototype = {\n constructor: Bounds2,\n getWidth: function () {\n return this.maxX - this.minX;\n },\n get width() {\n return this.getWidth();\n },\n getHeight: function () {\n return this.maxY - this.minY;\n },\n get height() {\n return this.getHeight();\n },\n getX: function () {\n return this.minX;\n },\n get x() {\n return this.getX();\n },\n getY: function () {\n return this.minY;\n },\n get y() {\n return this.getY();\n },\n getMinX: function () {\n return this.minX;\n },\n getMinY: function () {\n return this.minY;\n },\n getMaxX: function () {\n return this.maxX;\n },\n getMaxY: function () {\n return this.maxY;\n },\n getCenterX: function () {\n return (this.maxX + this.minX) / 2;\n },\n get centerX() {\n return this.getCenterX();\n },\n getCenterY: function () {\n return (this.maxY + this.minY) / 2;\n },\n get centerY() {\n return this.getCenterY();\n },\n getUpperLeft: function () {\n return new dot.Vector2(this.minX, this.minY);\n },\n get upperLeft() {\n return this.getUpperLeft();\n },\n getUpperCenter: function () {\n return new dot.Vector2(this.getCenterX(), this.minY);\n },\n get upperCenter() {\n return this.getUpperCenter();\n },\n getUpperRight: function () {\n return new dot.Vector2(this.maxX, this.minY);\n },\n get upperRight() {\n return this.getUpperRight();\n },\n getCenterLeft: function () {\n return new dot.Vector2(this.minX, this.getCenterY);\n },\n get centerLeft() {\n return this.getCenterLeft();\n },\n getCenter: function () {\n return new dot.Vector2(this.getCenterX(), this.getCenterY());\n },\n get center() {\n return this.getCenter();\n },\n getCenterRight: function () {\n return new dot.Vector2(this.maxX, this.getCenterY);\n },\n get centerRight() {\n return this.getCenterRight();\n },\n getLowerLeft: function () {\n return new dot.Vector2(this.minX, this.maxY);\n },\n get lowerLeft() {\n return this.getLowerLeft();\n },\n getLowerCenter: function () {\n return new dot.Vector2(this.getCenterX(), this.maxY);\n },\n get lowerCenter() {\n return this.getLowerCenter();\n },\n getLowerRight: function () {\n return new dot.Vector2(this.maxX, this.maxY);\n },\n get lowerRight() {\n return this.getLowerRight();\n },\n isEmpty: function () {\n return this.getWidth() < 0 || this.getHeight() < 0;\n },\n isFinite: function () {\n return isFinite(this.minX) && isFinite(this.minY) && isFinite(this.maxX) && isFinite(this.maxY);\n },\n isValid: function () {\n return !this.isEmpty() && this.isFinite();\n },\n containsCoordinates: function (x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n },\n containsPoint: function (point) {\n return this.containsCoordinates(point.x, point.y);\n },\n containsBounds: function (bounds) {\n return this.minX <= bounds.minX && this.maxX >= bounds.maxX && this.minY <= bounds.minY && this.maxY >= bounds.maxY;\n },\n intersectsBounds: function (bounds) {\n return !this.intersection(bounds).isEmpty();\n },\n toString: function () {\n return '[x:(' + this.minX + ',' + this.maxX + '),y:(' + this.minY + ',' + this.maxY + ')]';\n },\n equals: function (other) {\n return this.minX === other.minX && this.minY === other.minY && this.maxX === other.maxX && this.maxY === other.maxY;\n },\n equalsEpsilon: function (other, epsilon) {\n epsilon = epsilon || 0;\n var thisFinite = this.isFinite();\n var otherFinite = other.isFinite();\n if (thisFinite && otherFinite) {\n return Math.abs(this.minX - other.minX) < epsilon && Math.abs(this.minY - other.minY) < epsilon && Math.abs(this.maxX - other.maxX) < epsilon && Math.abs(this.maxY - other.maxY) < epsilon;\n } else if (thisFinite !== otherFinite) {\n return false;\n } else if (this === other) {\n return true;\n } else {\n return (isFinite(this.minX + other.minX) ? Math.abs(this.minX - other.minX) < epsilon : this.minX === other.minX) && (isFinite(this.minY + other.minY) ? Math.abs(this.minY - other.minY) < epsilon : this.minY === other.minY) && (isFinite(this.maxX + other.maxX) ? Math.abs(this.maxX - other.maxX) < epsilon : this.maxX === other.maxX) && (isFinite(this.maxY + other.maxY) ? Math.abs(this.maxY - other.maxY) < epsilon : this.maxY === other.maxY);\n }\n },\n copy: function () {\n return new Bounds2(this.minX, this.minY, this.maxX, this.maxY);\n },\n union: function (bounds) {\n return new Bounds2(Math.min(this.minX, bounds.minX), Math.min(this.minY, bounds.minY), Math.max(this.maxX, bounds.maxX), Math.max(this.maxY, bounds.maxY));\n },\n intersection: function (bounds) {\n return new Bounds2(Math.max(this.minX, bounds.minX), Math.max(this.minY, bounds.minY), Math.min(this.maxX, bounds.maxX), Math.min(this.maxY, bounds.maxY));\n },\n withCoordinates: function (x, y) {\n return new Bounds2(Math.min(this.minX, x), Math.min(this.minY, y), Math.max(this.maxX, x), Math.max(this.maxY, y));\n },\n withPoint: function (point) {\n return this.withCoordinates(point.x, point.y);\n },\n withMinX: function (minX) {\n return new Bounds2(minX, this.minY, this.maxX, this.maxY);\n },\n withMinY: function (minY) {\n return new Bounds2(this.minX, minY, this.maxX, this.maxY);\n },\n withMaxX: function (maxX) {\n return new Bounds2(this.minX, this.minY, maxX, this.maxY);\n },\n withMaxY: function (maxY) {\n return new Bounds2(this.minX, this.minY, this.maxX, maxY);\n },\n roundedOut: function () {\n return new Bounds2(Math.floor(this.minX), Math.floor(this.minY), Math.ceil(this.maxX), Math.ceil(this.maxY));\n },\n roundedIn: function () {\n return new Bounds2(Math.ceil(this.minX), Math.ceil(this.minY), Math.floor(this.maxX), Math.floor(this.maxY));\n },\n transformed: function (matrix) {\n return this.copy().transform(matrix);\n },\n dilated: function (d) {\n return new Bounds2(this.minX - d, this.minY - d, this.maxX + d, this.maxY + d);\n },\n eroded: function (d) {\n return this.dilated(-d);\n },\n shiftedX: function (x) {\n return new Bounds2(this.minX + x, this.minY, this.maxX + x, this.maxY);\n },\n shiftedY: function (y) {\n return new Bounds2(this.minX, this.minY + y, this.maxX, this.maxY + y);\n },\n shifted: function (x, y) {\n return new Bounds2(this.minX + x, this.minY + y, this.maxX + x, this.maxY + y);\n },\n set: function (minX, minY, maxX, maxY) {\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n return this;\n },\n setBounds: function (bounds) {\n return this.set(bounds.minX, bounds.minY, bounds.maxX, bounds.maxY);\n },\n includeBounds: function (bounds) {\n this.minX = Math.min(this.minX, bounds.minX);\n this.minY = Math.min(this.minY, bounds.minY);\n this.maxX = Math.max(this.maxX, bounds.maxX);\n this.maxY = Math.max(this.maxY, bounds.maxY);\n return this;\n },\n constrainBounds: function (bounds) {\n this.minX = Math.max(this.minX, bounds.minX);\n this.minY = Math.max(this.minY, bounds.minY);\n this.maxX = Math.min(this.maxX, bounds.maxX);\n this.maxY = Math.min(this.maxY, bounds.maxY);\n return this;\n },\n addCoordinates: function (x, y) {\n this.minX = Math.min(this.minX, x);\n this.minY = Math.min(this.minY, y);\n this.maxX = Math.max(this.maxX, x);\n this.maxY = Math.max(this.maxY, y);\n return this;\n },\n addPoint: function (point) {\n return this.addCoordinates(point.x, point.y);\n },\n setMinX: function (minX) {\n this.minX = minX;\n return this;\n },\n setMinY: function (minY) {\n this.minY = minY;\n return this;\n },\n setMaxX: function (maxX) {\n this.maxX = maxX;\n return this;\n },\n setMaxY: function (maxY) {\n this.maxY = maxY;\n return this;\n },\n roundOut: function () {\n this.minX = Math.floor(this.minX);\n this.minY = Math.floor(this.minY);\n this.maxX = Math.ceil(this.maxX);\n this.maxY = Math.ceil(this.maxY);\n return this;\n },\n roundIn: function () {\n this.minX = Math.ceil(this.minX);\n this.minY = Math.ceil(this.minY);\n this.maxX = Math.floor(this.maxX);\n this.maxY = Math.floor(this.maxY);\n return this;\n },\n transform: function (matrix) {\n if (this.isEmpty()) {\n return this;\n }\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n var vector = new dot.Vector2();\n this.setBounds(Bounds2.NOTHING);\n this.addPoint(matrix.multiplyVector2(vector.set(minX, minY)));\n this.addPoint(matrix.multiplyVector2(vector.set(minX, maxY)));\n this.addPoint(matrix.multiplyVector2(vector.set(maxX, minY)));\n this.addPoint(matrix.multiplyVector2(vector.set(maxX, maxY)));\n return this;\n },\n dilate: function (d) {\n return this.set(this.minX - d, this.minY - d, this.maxX + d, this.maxY + d);\n },\n erode: function (d) {\n return this.dilate(-d);\n },\n shiftX: function (x) {\n return this.setMinX(this.minX + x).setMaxX(this.maxX + x);\n },\n shiftY: function (y) {\n return this.setMinY(this.minY + y).setMaxY(this.maxY + y);\n },\n shift: function (x, y) {\n return this.shiftX(x).shiftY(y);\n }\n };\n Bounds2.rect = function (x, y, width, height) {\n return new Bounds2(x, y, x + width, y + height);\n };\n Bounds2.EVERYTHING = new Bounds2(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n Bounds2.NOTHING = new Bounds2(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n return Bounds2;\n});",
"\ndefine('SCENERY/util/Util',['require','SCENERY/scenery','DOT/Matrix3','DOT/Transform3','DOT/Bounds2','DOT/Vector2'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n var Matrix3 = require('DOT/Matrix3');\n var Transform3 = require('DOT/Transform3');\n var Bounds2 = require('DOT/Bounds2');\n var Vector2 = require('DOT/Vector2');\n function p(x, y) {\n return new Vector2(x, y);\n }\n var debugChromeBoundsScanning = false;\n var transformProperty = '';\n var transformOriginProperty = '';\n var webkitHardwareAcceleration = false;\n var mozillaHardwareAcceleration = false;\n if (document && document.createElement) {\n var style = document.createElement('div').style;\n var transformNames = [\n 'transform',\n 'webkitTransform',\n 'oTransform',\n 'mozTransform',\n 'msTransform'\n ];\n var transformOriginNames = [\n 'transformOrigin',\n 'webkitTransformOrigin',\n 'oTransformOrigin',\n 'mozTransformOrigin',\n 'msTransformOrigin'\n ];\n var i;\n for (i = 0; i < transformNames.length; i++) {\n if (transformNames[i] in style) {\n transformProperty = transformNames[i];\n break;\n }\n }\n for (i = 0; i < transformOriginNames.length; i++) {\n if (transformOriginNames[i] in style) {\n transformOriginProperty = transformOriginNames[i];\n break;\n }\n }\n if (!transformOriginProperty) {\n transformOriginProperty = 'transformOrigin';\n }\n if ('webkitBackfaceVisibility' in style || 'webkitTransform' in style) {\n webkitHardwareAcceleration = true;\n }\n if ('mozTransform' in style) {\n mozillaHardwareAcceleration = true;\n }\n }\n scenery.Util = {\n extend: function (obj) {\n _.each(Array.prototype.slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n Object.defineProperty(obj, prop, Object.getOwnPropertyDescriptor(source, prop));\n }\n }\n });\n return obj;\n },\n objectCreate: Object.create || function (o) {\n if (arguments.length > 1) {\n throw new Error('Object.create implementation only accepts the first parameter.');\n }\n function F() {\n }\n F.prototype = o;\n return new F();\n },\n applyCSSTransform: function (matrix, element) {\n var transformCSS = matrix.getCSSTransform();\n if (webkitHardwareAcceleration || mozillaHardwareAcceleration) {\n transformCSS += ' translateZ(0)';\n }\n if (webkitHardwareAcceleration) {\n element.style.webkitBackfaceVisibility = 'hidden';\n }\n element.style[transformProperty] = transformCSS;\n element.style[transformOriginProperty] = 'top left';\n },\n testAssert: function () {\n return 'assert.scenery: ' + (sceneryAssert ? 'true' : 'false');\n },\n testAssertExtra: function () {\n return 'assert.scenery.extra: ' + (sceneryAssertExtra ? 'true' : 'false');\n },\n polyfillRequestAnimationFrame: function () {\n var lastTime = 0;\n var vendors = [\n 'ms',\n 'moz',\n 'webkit',\n 'o'\n ];\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\n window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\n }\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = function (callback) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window.setTimeout(function () {\n callback(currTime + timeToCall);\n }, timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n }\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id);\n };\n }\n },\n backingStorePixelRatio: function (context) {\n return context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n },\n backingScale: function (context) {\n if ('devicePixelRatio' in window) {\n var backingStoreRatio = Util.backingStorePixelRatio(context);\n return window.devicePixelRatio / backingStoreRatio;\n }\n return 1;\n },\n scanBounds: function (imageData, resolution, transform) {\n var dirtyX = _.map(_.range(resolution), function () {\n return false;\n });\n var dirtyY = _.map(_.range(resolution), function () {\n return false;\n });\n for (var x = 0; x < resolution; x++) {\n for (var y = 0; y < resolution; y++) {\n var offset = 4 * (y * resolution + x);\n if (imageData.data[offset] !== 0 || imageData.data[offset + 1] !== 0 || imageData.data[offset + 2] !== 0 || imageData.data[offset + 3] !== 0) {\n dirtyX[x] = true;\n dirtyY[y] = true;\n }\n }\n }\n var minX = _.indexOf(dirtyX, true);\n var maxX = _.lastIndexOf(dirtyX, true);\n var minY = _.indexOf(dirtyY, true);\n var maxY = _.lastIndexOf(dirtyY, true);\n var extraSpread = resolution / 16;\n return {\n minBounds: new Bounds2(minX < 1 || minX >= resolution - 1 ? Number.POSITIVE_INFINITY : transform.inversePosition2(p(minX + 1 + extraSpread, 0)).x, minY < 1 || minY >= resolution - 1 ? Number.POSITIVE_INFINITY : transform.inversePosition2(p(0, minY + 1 + extraSpread)).y, maxX < 1 || maxX >= resolution - 1 ? Number.NEGATIVE_INFINITY : transform.inversePosition2(p(maxX - extraSpread, 0)).x, maxY < 1 || maxY >= resolution - 1 ? Number.NEGATIVE_INFINITY : transform.inversePosition2(p(0, maxY - extraSpread)).y),\n maxBounds: new Bounds2(minX < 1 || minX >= resolution - 1 ? Number.NEGATIVE_INFINITY : transform.inversePosition2(p(minX - 1 - extraSpread, 0)).x, minY < 1 || minY >= resolution - 1 ? Number.NEGATIVE_INFINITY : transform.inversePosition2(p(0, minY - 1 - extraSpread)).y, maxX < 1 || maxX >= resolution - 1 ? Number.POSITIVE_INFINITY : transform.inversePosition2(p(maxX + 2 + extraSpread, 0)).x, maxY < 1 || maxY >= resolution - 1 ? Number.POSITIVE_INFINITY : transform.inversePosition2(p(0, maxY + 2 + extraSpread)).y)\n };\n },\n canvasAccurateBounds: function (renderToContext, options) {\n var precision = options && options.precision ? options.precision : 0.001;\n var resolution = options && options.resolution ? options.resolution : 128;\n var initialScale = options && options.initialScale ? options.initialScale : 1 / 16;\n var minBounds = Bounds2.NOTHING;\n var maxBounds = Bounds2.EVERYTHING;\n var canvas = document.createElement('canvas');\n canvas.width = resolution;\n canvas.height = resolution;\n var context = canvas.getContext('2d');\n if (debugChromeBoundsScanning) {\n $(window).ready(function () {\n var header = document.createElement('h2');\n $(header).text('Bounds Scan');\n $('#display').append(header);\n });\n }\n function scan(transform) {\n context.save();\n transform.matrix.canvasSetTransform(context);\n renderToContext(context);\n context.restore();\n var data = context.getImageData(0, 0, resolution, resolution);\n var minMaxBounds = Util.scanBounds(data, resolution, transform);\n function snapshotToCanvas(snapshot) {\n var canvas = document.createElement('canvas');\n canvas.width = resolution;\n canvas.height = resolution;\n var context = canvas.getContext('2d');\n context.putImageData(snapshot, 0, 0);\n $(canvas).css('border', '1px solid black');\n $(window).ready(function () {\n $('#display').append(canvas);\n });\n }\n if (debugChromeBoundsScanning) {\n snapshotToCanvas(data);\n }\n context.clearRect(0, 0, resolution, resolution);\n return minMaxBounds;\n }\n function idealTransform(bounds) {\n var borderSize = 2;\n var scaleX = (resolution - borderSize * 2) / (bounds.maxX - bounds.minX);\n var scaleY = (resolution - borderSize * 2) / (bounds.maxY - bounds.minY);\n var translationX = -scaleX * bounds.minX + borderSize;\n var translationY = -scaleY * bounds.minY + borderSize;\n return new Transform3(Matrix3.translation(translationX, translationY).timesMatrix(Matrix3.scaling(scaleX, scaleY)));\n }\n var initialTransform = new Transform3();\n initialTransform.append(Matrix3.translation(resolution / 2, resolution / 2));\n initialTransform.append(Matrix3.scaling(initialScale));\n var coarseBounds = scan(initialTransform);\n minBounds = minBounds.union(coarseBounds.minBounds);\n maxBounds = maxBounds.intersection(coarseBounds.maxBounds);\n var tempMin, tempMax, refinedBounds;\n tempMin = maxBounds.minY;\n tempMax = maxBounds.maxY;\n while (isFinite(minBounds.minX) && isFinite(maxBounds.minX) && Math.abs(minBounds.minX - maxBounds.minX) > precision) {\n refinedBounds = scan(idealTransform(new Bounds2(maxBounds.minX, tempMin, minBounds.minX, tempMax)));\n if (minBounds.minX <= refinedBounds.minBounds.minX && maxBounds.minX >= refinedBounds.maxBounds.minX) {\n if (debugChromeBoundsScanning) {\n console.log('warning, exiting infinite loop!');\n console.log('transformed \"min\" minX: ' + idealTransform(new Bounds2(maxBounds.minX, maxBounds.minY, minBounds.minX, maxBounds.maxY)).transformPosition2(p(minBounds.minX, 0)));\n console.log('transformed \"max\" minX: ' + idealTransform(new Bounds2(maxBounds.minX, maxBounds.minY, minBounds.minX, maxBounds.maxY)).transformPosition2(p(maxBounds.minX, 0)));\n }\n break;\n }\n minBounds = minBounds.withMinX(Math.min(minBounds.minX, refinedBounds.minBounds.minX));\n maxBounds = maxBounds.withMinX(Math.max(maxBounds.minX, refinedBounds.maxBounds.minX));\n tempMin = Math.max(tempMin, refinedBounds.maxBounds.minY);\n tempMax = Math.min(tempMax, refinedBounds.maxBounds.maxY);\n }\n tempMin = maxBounds.minY;\n tempMax = maxBounds.maxY;\n while (isFinite(minBounds.maxX) && isFinite(maxBounds.maxX) && Math.abs(minBounds.maxX - maxBounds.maxX) > precision) {\n refinedBounds = scan(idealTransform(new Bounds2(minBounds.maxX, tempMin, maxBounds.maxX, tempMax)));\n if (minBounds.maxX >= refinedBounds.minBounds.maxX && maxBounds.maxX <= refinedBounds.maxBounds.maxX) {\n if (debugChromeBoundsScanning) {\n console.log('warning, exiting infinite loop!');\n }\n break;\n }\n minBounds = minBounds.withMaxX(Math.max(minBounds.maxX, refinedBounds.minBounds.maxX));\n maxBounds = maxBounds.withMaxX(Math.min(maxBounds.maxX, refinedBounds.maxBounds.maxX));\n tempMin = Math.max(tempMin, refinedBounds.maxBounds.minY);\n tempMax = Math.min(tempMax, refinedBounds.maxBounds.maxY);\n }\n tempMin = maxBounds.minX;\n tempMax = maxBounds.maxX;\n while (isFinite(minBounds.minY) && isFinite(maxBounds.minY) && Math.abs(minBounds.minY - maxBounds.minY) > precision) {\n refinedBounds = scan(idealTransform(new Bounds2(tempMin, maxBounds.minY, tempMax, minBounds.minY)));\n if (minBounds.minY <= refinedBounds.minBounds.minY && maxBounds.minY >= refinedBounds.maxBounds.minY) {\n if (debugChromeBoundsScanning) {\n console.log('warning, exiting infinite loop!');\n }\n break;\n }\n minBounds = minBounds.withMinY(Math.min(minBounds.minY, refinedBounds.minBounds.minY));\n maxBounds = maxBounds.withMinY(Math.max(maxBounds.minY, refinedBounds.maxBounds.minY));\n tempMin = Math.max(tempMin, refinedBounds.maxBounds.minX);\n tempMax = Math.min(tempMax, refinedBounds.maxBounds.maxX);\n }\n tempMin = maxBounds.minX;\n tempMax = maxBounds.maxX;\n while (isFinite(minBounds.maxY) && isFinite(maxBounds.maxY) && Math.abs(minBounds.maxY - maxBounds.maxY) > precision) {\n refinedBounds = scan(idealTransform(new Bounds2(tempMin, minBounds.maxY, tempMax, maxBounds.maxY)));\n if (minBounds.maxY >= refinedBounds.minBounds.maxY && maxBounds.maxY <= refinedBounds.maxBounds.maxY) {\n if (debugChromeBoundsScanning) {\n console.log('warning, exiting infinite loop!');\n }\n break;\n }\n minBounds = minBounds.withMaxY(Math.max(minBounds.maxY, refinedBounds.minBounds.maxY));\n maxBounds = maxBounds.withMaxY(Math.min(maxBounds.maxY, refinedBounds.maxBounds.maxY));\n tempMin = Math.max(tempMin, refinedBounds.maxBounds.minX);\n tempMax = Math.min(tempMax, refinedBounds.maxBounds.maxX);\n }\n if (debugChromeBoundsScanning) {\n console.log('minBounds: ' + minBounds);\n console.log('maxBounds: ' + maxBounds);\n }\n var result = new Bounds2((minBounds.minX + maxBounds.minX) / 2, (minBounds.minY + maxBounds.minY) / 2, (minBounds.maxX + maxBounds.maxX) / 2, (minBounds.maxY + maxBounds.maxY) / 2);\n result.minBounds = minBounds;\n result.maxBounds = maxBounds;\n result.isConsistent = maxBounds.containsBounds(minBounds);\n result.precision = Math.max(Math.abs(minBounds.minX - maxBounds.minX), Math.abs(minBounds.minY - maxBounds.minY), Math.abs(minBounds.maxX - maxBounds.maxX), Math.abs(minBounds.maxY - maxBounds.maxY));\n return result;\n }\n };\n var Util = scenery.Util;\n return Util;\n});",
"\ndefine('KITE/kite',['require','PHET_CORE/phetAllocation'],function (require) {\n 'use strict';\n window.phetAllocation = require('PHET_CORE/phetAllocation');\n var kite = {};\n kite.assert = null;\n return kite;\n});",
"\ndefine('KITE/segments/Segment',['require','KITE/kite','DOT/Util'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var DotUtil = require('DOT/Util');\n kite.Segment = function Segment() {\n };\n var Segment = kite.Segment;\n Segment.prototype = {\n constructor: Segment,\n subdivisions: function (tList, skipComputation) {\n var right = this;\n var result = [];\n for (var i = 0; i < tList.length; i++) {\n var t = tList[i];\n var arr = right.subdivided(t, skipComputation);\n null;\n result.push(arr[0]);\n right = arr[1];\n for (var j = i + 1; j < tList.length; j++) {\n tList[j] = DotUtil.linear(t, 1, 0, 1, tList[j]);\n }\n }\n result.push(right);\n return result;\n },\n subdividedIntoMonotone: function () {\n return this.subdivisions(this.getInteriorExtremaTs());\n }\n };\n return Segment;\n});",
"\ndefine('KITE/segments/Line',['require','KITE/kite','PHET_CORE/inherit','DOT/Bounds2','DOT/Util','KITE/segments/Segment'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var inherit = require('PHET_CORE/inherit');\n var Bounds2 = require('DOT/Bounds2');\n var lineLineIntersection = require('DOT/Util').lineLineIntersection;\n var Segment = require('KITE/segments/Segment');\n Segment.Line = function Line(start, end) {\n this.start = start;\n this.end = end;\n if (start.equals(end, 0)) {\n this.invalid = true;\n return;\n }\n this.startTangent = end.minus(start).normalized();\n this.endTangent = this.startTangent;\n this.bounds = Bounds2.NOTHING.withPoint(start).withPoint(end);\n };\n inherit(Segment, Segment.Line, {\n positionAt: function (t) {\n return this.start.plus(this.end.minus(this.start).times(t));\n },\n tangentAt: function (t) {\n return this.startTangent;\n },\n curvatureAt: function (t) {\n return 0;\n },\n getSVGPathFragment: function () {\n return 'L ' + this.end.x + ' ' + this.end.y;\n },\n strokeLeft: function (lineWidth) {\n var offset = this.endTangent.perpendicular().negated().times(lineWidth / 2);\n return [new Segment.Line(this.start.plus(offset), this.end.plus(offset))];\n },\n strokeRight: function (lineWidth) {\n var offset = this.startTangent.perpendicular().times(lineWidth / 2);\n return [new Segment.Line(this.end.plus(offset), this.start.plus(offset))];\n },\n getInteriorExtremaTs: function () {\n return [];\n },\n subdivided: function (t) {\n var pt = this.positionAt(t);\n return [\n new Segment.Line(this.start, pt),\n new Segment.Line(pt, this.end)\n ];\n },\n intersectsBounds: function (bounds) {\n throw new Error('Segment.Line.intersectsBounds unimplemented');\n },\n intersection: function (ray) {\n var result = [];\n var start = this.start;\n var end = this.end;\n var intersection = lineLineIntersection(start, end, ray.pos, ray.pos.plus(ray.dir));\n if (!isFinite(intersection.x) || !isFinite(intersection.y)) {\n return result;\n }\n if (start.x !== end.x && (start.x > end.x ? intersection.x >= start.x || intersection.x < end.x : intersection.x <= start.x || intersection.x > end.x)) {\n return result;\n }\n if (start.y !== end.y && (start.y > end.y ? intersection.y >= start.y || intersection.y < end.y : intersection.y <= start.y || intersection.y > end.y)) {\n return result;\n }\n var t = intersection.minus(ray.pos).dot(ray.dir);\n if (t < 0) {\n return result;\n }\n var diff = end.minus(start);\n var perp = diff.perpendicular();\n result.push({\n distance: t,\n point: ray.pointAtDistance(t),\n normal: perp.dot(ray.dir) > 0 ? perp.negated() : perp,\n wind: ray.dir.perpendicular().dot(diff) < 0 ? 1 : -1\n });\n return result;\n },\n windingIntersection: function (ray) {\n var hits = this.intersection(ray);\n if (hits.length) {\n return hits[0].wind;\n } else {\n return 0;\n }\n },\n writeToContext: function (context) {\n context.lineTo(this.end.x, this.end.y);\n },\n transformed: function (matrix) {\n return new Segment.Line(matrix.timesVector2(this.start), matrix.timesVector2(this.end));\n }\n });\n return Segment.Line;\n});",
"\ndefine('KITE/segments/Arc',['require','KITE/kite','PHET_CORE/inherit','DOT/Vector2','DOT/Bounds2','DOT/Util','KITE/segments/Segment'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var inherit = require('PHET_CORE/inherit');\n var Vector2 = require('DOT/Vector2');\n var Bounds2 = require('DOT/Bounds2');\n var DotUtil = require('DOT/Util');\n var Segment = require('KITE/segments/Segment');\n Segment.Arc = function Arc(center, radius, startAngle, endAngle, anticlockwise) {\n if (radius < 0) {\n radius = -radius;\n startAngle += Math.PI;\n endAngle += Math.PI;\n }\n this.center = center;\n this.radius = radius;\n this.startAngle = startAngle;\n this.endAngle = endAngle;\n this.anticlockwise = anticlockwise;\n this.start = this.positionAtAngle(startAngle);\n this.end = this.positionAtAngle(endAngle);\n this.startTangent = this.tangentAtAngle(startAngle);\n this.endTangent = this.tangentAtAngle(endAngle);\n if (radius <= 0 || startAngle === endAngle) {\n this.invalid = true;\n return;\n }\n if (this.anticlockwise) {\n if (this.startAngle > this.endAngle) {\n this.actualEndAngle = this.endAngle;\n } else if (this.startAngle < this.endAngle) {\n this.actualEndAngle = this.endAngle - 2 * Math.PI;\n } else {\n this.actualEndAngle = this.startAngle;\n }\n } else {\n if (this.startAngle < this.endAngle) {\n this.actualEndAngle = this.endAngle;\n } else if (this.startAngle > this.endAngle) {\n this.actualEndAngle = this.endAngle + Math.PI * 2;\n } else {\n this.actualEndAngle = this.startAngle;\n }\n }\n null;\n null;\n var isFullPerimeter = !anticlockwise && endAngle - startAngle >= Math.PI * 2 || anticlockwise && startAngle - endAngle >= Math.PI * 2;\n this.angleDifference = this.anticlockwise ? this.startAngle - this.endAngle : this.endAngle - this.startAngle;\n if (this.angleDifference < 0) {\n this.angleDifference += Math.PI * 2;\n }\n null;\n this.bounds = Bounds2.NOTHING;\n this.bounds = this.bounds.withPoint(this.start);\n this.bounds = this.bounds.withPoint(this.end);\n var that = this;\n function boundsAtAngle(angle) {\n if (that.containsAngle(angle)) {\n that.bounds = that.bounds.withPoint(center.plus(Vector2.createPolar(radius, angle)));\n }\n }\n if (startAngle !== endAngle) {\n boundsAtAngle(0);\n boundsAtAngle(Math.PI / 2);\n boundsAtAngle(Math.PI);\n boundsAtAngle(3 * Math.PI / 2);\n }\n };\n inherit(Segment, Segment.Arc, {\n mapAngle: function (angle) {\n return this.startAngle > this.actualEndAngle ? DotUtil.moduloBetweenUp(angle, this.startAngle - 2 * Math.PI, this.startAngle) : DotUtil.moduloBetweenDown(angle, this.startAngle, this.startAngle + 2 * Math.PI);\n },\n tAtAngle: function (angle) {\n return (this.mapAngle(angle) - this.startAngle) / (this.actualEndAngle - this.startAngle);\n },\n angleAt: function (t) {\n return this.startAngle + (this.actualEndAngle - this.startAngle) * t;\n },\n positionAt: function (t) {\n return this.positionAtAngle(this.angleAt(t));\n },\n tangentAt: function (t) {\n return this.tangentAtAngle(this.angleAt(t));\n },\n curvatureAt: function (t) {\n return (this.anticlockwise ? -1 : 1) / this.radius;\n },\n positionAtAngle: function (angle) {\n return this.center.plus(Vector2.createPolar(this.radius, angle));\n },\n tangentAtAngle: function (angle) {\n var normal = Vector2.createPolar(1, angle);\n return this.anticlockwise ? normal.perpendicular() : normal.perpendicular().negated();\n },\n containsAngle: function (angle) {\n var normalizedAngle = this.anticlockwise ? angle - this.endAngle : angle - this.startAngle;\n var positiveMinAngle = DotUtil.moduloBetweenDown(normalizedAngle, 0, Math.PI * 2);\n return positiveMinAngle <= this.angleDifference;\n },\n getSVGPathFragment: function () {\n var epsilon = 0.01;\n var sweepFlag = this.anticlockwise ? '0' : '1';\n var largeArcFlag;\n if (this.angleDifference < Math.PI * 2 - epsilon) {\n largeArcFlag = this.angleDifference < Math.PI ? '0' : '1';\n return 'A ' + this.radius + ' ' + this.radius + ' 0 ' + largeArcFlag + ' ' + sweepFlag + ' ' + this.end.x + ' ' + this.end.y;\n } else {\n var splitOppositeAngle = (this.startAngle + this.endAngle) / 2;\n var splitPoint = this.center.plus(Vector2.createPolar(this.radius, splitOppositeAngle));\n largeArcFlag = '0';\n var firstArc = 'A ' + this.radius + ' ' + this.radius + ' 0 ' + largeArcFlag + ' ' + sweepFlag + ' ' + splitPoint.x + ' ' + splitPoint.y;\n var secondArc = 'A ' + this.radius + ' ' + this.radius + ' 0 ' + largeArcFlag + ' ' + sweepFlag + ' ' + this.end.x + ' ' + this.end.y;\n return firstArc + ' ' + secondArc;\n }\n },\n strokeLeft: function (lineWidth) {\n return [new Segment.Arc(this.center, this.radius + (this.anticlockwise ? 1 : -1) * lineWidth / 2, this.startAngle, this.endAngle, this.anticlockwise)];\n },\n strokeRight: function (lineWidth) {\n return [new Segment.Arc(this.center, this.radius + (this.anticlockwise ? -1 : 1) * lineWidth / 2, this.endAngle, this.startAngle, !this.anticlockwise)];\n },\n getInteriorExtremaTs: function () {\n var that = this;\n var result = [];\n _.each([\n 0,\n Math.PI / 2,\n Math.PI,\n 3 * Math.PI / 2\n ], function (angle) {\n if (that.containsAngle(angle)) {\n var t = that.tAtAngle(angle);\n var epsilon = 1e-10;\n if (t > epsilon && t < 1 - epsilon) {\n result.push(t);\n }\n }\n });\n return result.sort();\n },\n subdivided: function (t) {\n var angle0 = this.angleAt(0);\n var angleT = this.angleAt(t);\n var angle1 = this.angleAt(1);\n return [\n new Segment.Arc(this.center, this.radius, angle0, angleT, this.anticlockwise),\n new Segment.Arc(this.center, this.radius, angleT, angle1, this.anticlockwise)\n ];\n },\n intersectsBounds: function (bounds) {\n throw new Error('Segment.intersectsBounds unimplemented!');\n },\n intersection: function (ray) {\n var result = [];\n var epsilon = 0;\n var centerToRay = ray.pos.minus(this.center);\n var tmp = ray.dir.dot(centerToRay);\n var centerToRayDistSq = centerToRay.magnitudeSquared();\n var discriminant = 4 * tmp * tmp - 4 * (centerToRayDistSq - this.radius * this.radius);\n if (discriminant < epsilon) {\n return result;\n }\n var base = ray.dir.dot(this.center) - ray.dir.dot(ray.pos);\n var sqt = Math.sqrt(discriminant) / 2;\n var ta = base - sqt;\n var tb = base + sqt;\n if (tb < epsilon) {\n return result;\n }\n var pointB = ray.pointAtDistance(tb);\n var normalB = pointB.minus(this.center).normalized();\n if (ta < epsilon) {\n if (this.containsAngle(normalB.angle())) {\n result.push({\n distance: tb,\n point: pointB,\n normal: normalB.negated(),\n wind: this.anticlockwise ? -1 : 1\n });\n }\n } else {\n var pointA = ray.pointAtDistance(ta);\n var normalA = pointA.minus(this.center).normalized();\n if (this.containsAngle(normalA.angle())) {\n result.push({\n distance: ta,\n point: pointA,\n normal: normalA,\n wind: this.anticlockwise ? 1 : -1\n });\n }\n if (this.containsAngle(normalB.angle())) {\n result.push({\n distance: tb,\n point: pointB,\n normal: normalB.negated(),\n wind: this.anticlockwise ? -1 : 1\n });\n }\n }\n return result;\n },\n windingIntersection: function (ray) {\n var wind = 0;\n var hits = this.intersection(ray);\n _.each(hits, function (hit) {\n wind += hit.wind;\n });\n return wind;\n },\n writeToContext: function (context) {\n context.arc(this.center.x, this.center.y, this.radius, this.startAngle, this.endAngle, this.anticlockwise);\n },\n transformed: function (matrix) {\n var startAngle = matrix.timesVector2(Vector2.createPolar(1, this.startAngle)).minus(matrix.timesVector2(Vector2.ZERO)).angle();\n var endAngle = matrix.timesVector2(Vector2.createPolar(1, this.endAngle)).minus(matrix.timesVector2(Vector2.ZERO)).angle();\n var anticlockwise = matrix.getDeterminant() >= 0 ? this.anticlockwise : !this.anticlockwise;\n var scaleVector = matrix.getScaleVector();\n if (scaleVector.x !== scaleVector.y) {\n var radiusX = scaleVector.x * this.radius;\n var radiusY = scaleVector.y * this.radius;\n return new Segment.EllipticalArc(matrix.timesVector2(this.center), radiusX, radiusY, 0, startAngle, endAngle, anticlockwise);\n } else {\n var radius = scaleVector.x * this.radius;\n return new Segment.Arc(matrix.timesVector2(this.center), radius, startAngle, endAngle, anticlockwise);\n }\n }\n });\n return Segment.Arc;\n});",
"\ndefine('KITE/util/Subpath',['require','DOT/Vector2','DOT/Bounds2','DOT/Util','KITE/kite','KITE/segments/Line','KITE/segments/Arc'],function (require) {\n 'use strict';\n var Vector2 = require('DOT/Vector2');\n var Bounds2 = require('DOT/Bounds2');\n var lineLineIntersection = require('DOT/Util').lineLineIntersection;\n var kite = require('KITE/kite');\n require('KITE/segments/Line');\n require('KITE/segments/Arc');\n kite.Subpath = function Subpath(segments, points, closed) {\n this.segments = segments || [];\n this.points = points || (segments && segments.length ? _.map(segments, function (segment) {\n return segment.start;\n }).concat(segments[segments.length - 1].end) : []);\n this.closed = !!closed;\n this._strokedSubpaths = null;\n this._strokedSubpathsComputed = false;\n this._strokedStyles = null;\n };\n var Subpath = kite.Subpath;\n Subpath.prototype = {\n copy: function () {\n return new Subpath(this.segments.slice(0), this.points.slice(0), this.closed);\n },\n invalidate: function () {\n this._strokedSubpathsComputed = false;\n },\n addPoint: function (point) {\n this.points.push(point);\n return this;\n },\n addSegment: function (segment) {\n if (!segment.invalid) {\n null;\n null;\n null;\n null;\n null;\n this.segments.push(segment);\n this.invalidate();\n }\n return this;\n },\n close: function () {\n this.closed = true;\n },\n getLength: function () {\n return this.points.length;\n },\n getFirstPoint: function () {\n return _.first(this.points);\n },\n getLastPoint: function () {\n return _.last(this.points);\n },\n getFirstSegment: function () {\n return _.first(this.segments);\n },\n getLastSegment: function () {\n return _.last(this.segments);\n },\n isDrawable: function () {\n return this.segments.length > 0;\n },\n isClosed: function () {\n return this.closed;\n },\n hasClosingSegment: function () {\n return !this.getFirstPoint().equalsEpsilon(this.getLastPoint(), 1e-9);\n },\n getClosingSegment: function () {\n null;\n return new kite.Segment.Line(this.getLastPoint(), this.getFirstPoint());\n },\n writeToContext: function (context) {\n if (this.isDrawable()) {\n var startPoint = this.getFirstSegment().start;\n context.moveTo(startPoint.x, startPoint.y);\n var len = this.segments.length;\n for (var i = 0; i < len; i++) {\n this.segments[i].writeToContext(context);\n }\n if (this.closed) {\n context.closePath();\n }\n }\n },\n transformed: function (matrix) {\n return new Subpath(_.map(this.segments, function (segment) {\n return segment.transformed(matrix);\n }), _.map(this.points, function (point) {\n return matrix.timesVector2(point);\n }), this.closed);\n },\n computeBounds: function () {\n var bounds = Bounds2.NOTHING.copy();\n var len = this.segments.length;\n for (var i = 0; i < len; i++) {\n bounds.includeBounds(this.segments[i].bounds);\n }\n return bounds;\n },\n stroked: function (lineStyles) {\n if (!this.isDrawable()) {\n return [];\n }\n if (lineStyles === undefined) {\n lineStyles = new kite.LineStyles();\n }\n if (this._strokedSubpathsComputed && this._strokedStyles.equals(lineStyles)) {\n return this._strokedSubpaths;\n }\n var lineWidth = lineStyles.lineWidth;\n function join(center, fromTangent, toTangent) {\n var fromPoint = center.plus(fromTangent.perpendicular().negated().times(lineWidth / 2));\n var toPoint = center.plus(toTangent.perpendicular().negated().times(lineWidth / 2));\n var bevel = fromPoint.equals(toPoint) ? [] : [new kite.Segment.Line(fromPoint, toPoint)];\n if (fromTangent.perpendicular().dot(toTangent) > 0) {\n switch (lineStyles.lineJoin) {\n case 'round':\n var fromAngle = fromTangent.angle() + Math.PI / 2;\n var toAngle = toTangent.angle() + Math.PI / 2;\n return [new kite.Segment.Arc(center, lineWidth / 2, fromAngle, toAngle, true)];\n case 'miter':\n var theta = fromTangent.angleBetween(toTangent.negated());\n var notStraight = theta < Math.PI - 0.00001;\n if (1 / Math.sin(theta / 2) <= lineStyles.miterLimit && theta < Math.PI - 0.00001) {\n var miterPoint = lineLineIntersection(fromPoint, fromPoint.plus(fromTangent), toPoint, toPoint.plus(toTangent));\n return [\n new kite.Segment.Line(fromPoint, miterPoint),\n new kite.Segment.Line(miterPoint, toPoint)\n ];\n } else {\n return bevel;\n }\n break;\n case 'bevel':\n return bevel;\n }\n } else {\n return bevel;\n }\n }\n function cap(center, tangent) {\n var fromPoint = center.plus(tangent.perpendicular().times(-lineWidth / 2));\n var toPoint = center.plus(tangent.perpendicular().times(lineWidth / 2));\n switch (lineStyles.lineCap) {\n case 'butt':\n return [new kite.Segment.Line(fromPoint, toPoint)];\n case 'round':\n var tangentAngle = tangent.angle();\n return [new kite.Segment.Arc(center, lineWidth / 2, tangentAngle + Math.PI / 2, tangentAngle - Math.PI / 2, true)];\n case 'square':\n var toLeft = tangent.perpendicular().negated().times(lineWidth / 2);\n var toRight = tangent.perpendicular().times(lineWidth / 2);\n var toFront = tangent.times(lineWidth / 2);\n var left = center.plus(toLeft).plus(toFront);\n var right = center.plus(toRight).plus(toFront);\n return [\n new kite.Segment.Line(fromPoint, left),\n new kite.Segment.Line(left, right),\n new kite.Segment.Line(right, toPoint)\n ];\n }\n }\n var i;\n var leftSegments = [];\n var rightSegments = [];\n var firstSegment = this.getFirstSegment();\n var lastSegment = this.getLastSegment();\n function addLeftSegments(segments) {\n leftSegments = leftSegments.concat(segments);\n }\n function addRightSegments(segments) {\n rightSegments = rightSegments.concat(segments);\n }\n var alreadyClosed = lastSegment.end.equals(firstSegment.start);\n var closingSegment = alreadyClosed ? null : new kite.Segment.Line(this.segments[this.segments.length - 1].end, this.segments[0].start);\n for (i = 0; i < this.segments.length; i++) {\n if (i > 0) {\n addLeftSegments(join(this.segments[i].start, this.segments[i - 1].endTangent, this.segments[i].startTangent, true));\n }\n addLeftSegments(this.segments[i].strokeLeft(lineWidth));\n }\n for (i = this.segments.length - 1; i >= 0; i--) {\n if (i < this.segments.length - 1) {\n addRightSegments(join(this.segments[i].end, this.segments[i + 1].startTangent.negated(), this.segments[i].endTangent.negated(), false));\n }\n addRightSegments(this.segments[i].strokeRight(lineWidth));\n }\n var subpaths;\n if (this.closed) {\n if (alreadyClosed) {\n addLeftSegments(join(lastSegment.end, lastSegment.endTangent, firstSegment.startTangent));\n addRightSegments(join(lastSegment.end, firstSegment.startTangent.negated(), lastSegment.endTangent.negated()));\n } else {\n addLeftSegments(join(closingSegment.start, lastSegment.endTangent, closingSegment.startTangent));\n addLeftSegments(closingSegment.strokeLeft(lineWidth));\n addLeftSegments(join(closingSegment.end, closingSegment.endTangent, firstSegment.startTangent));\n addRightSegments(join(closingSegment.end, firstSegment.startTangent.negated(), closingSegment.endTangent.negated()));\n addRightSegments(closingSegment.strokeRight(lineWidth));\n addRightSegments(join(closingSegment.start, closingSegment.startTangent.negated(), lastSegment.endTangent.negated()));\n }\n subpaths = [\n new Subpath(leftSegments, null, true),\n new Subpath(rightSegments, null, true)\n ];\n } else {\n subpaths = [new Subpath(leftSegments.concat(cap(lastSegment.end, lastSegment.endTangent)).concat(rightSegments).concat(cap(firstSegment.start, firstSegment.startTangent.negated())), null, true)];\n }\n this._strokedSubpaths = subpaths;\n this._strokedSubpathsComputed = true;\n this._strokedStyles = new kite.LineStyles(lineStyles);\n return subpaths;\n }\n };\n function segmentStartLeft(segment, lineWidth) {\n null;\n return segment.start.plus(segment.startTangent.perpendicular().negated().times(lineWidth / 2));\n }\n function segmentEndLeft(segment, lineWidth) {\n null;\n return segment.end.plus(segment.endTangent.perpendicular().negated().times(lineWidth / 2));\n }\n function segmentStartRight(segment, lineWidth) {\n null;\n return segment.start.plus(segment.startTangent.perpendicular().times(lineWidth / 2));\n }\n function segmentEndRight(segment, lineWidth) {\n null;\n return segment.end.plus(segment.endTangent.perpendicular().times(lineWidth / 2));\n }\n return kite.Subpath;\n});",
"\ndefine('KITE/../parser/svgPath',['require','KITE/kite'],function (require) {\n var kite = require('KITE/kite');\n function quote(s) {\n return '\"' + s.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\x08/g, '\\\\b').replace(/\\t/g, '\\\\t').replace(/\\n/g, '\\\\n').replace(/\\f/g, '\\\\f').replace(/\\r/g, '\\\\r').replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape) + '\"';\n }\n kite.svgPath = {\n parse: function (input, startRule) {\n var parseFunctions = {\n 'svgPath': parse_svgPath,\n 'movetoDrawtoCommandGroups': parse_movetoDrawtoCommandGroups,\n 'movetoDrawtoCommandGroup': parse_movetoDrawtoCommandGroup,\n 'drawtoCommands': parse_drawtoCommands,\n 'drawtoCommand': parse_drawtoCommand,\n 'moveto': parse_moveto,\n 'movetoArgumentSequence': parse_movetoArgumentSequence,\n 'closepath': parse_closepath,\n 'lineto': parse_lineto,\n 'linetoArgumentSequence': parse_linetoArgumentSequence,\n 'horizontalLineto': parse_horizontalLineto,\n 'horizontalLinetoArgumentSequence': parse_horizontalLinetoArgumentSequence,\n 'verticalLineto': parse_verticalLineto,\n 'verticalLinetoArgumentSequence': parse_verticalLinetoArgumentSequence,\n 'curveto': parse_curveto,\n 'curvetoArgumentSequence': parse_curvetoArgumentSequence,\n 'curvetoArgument': parse_curvetoArgument,\n 'smoothCurveto': parse_smoothCurveto,\n 'smoothCurvetoArgumentSequence': parse_smoothCurvetoArgumentSequence,\n 'smoothCurvetoArgument': parse_smoothCurvetoArgument,\n 'quadraticBezierCurveto': parse_quadraticBezierCurveto,\n 'quadraticBezierCurvetoArgumentSequence': parse_quadraticBezierCurvetoArgumentSequence,\n 'quadraticBezierCurvetoArgument': parse_quadraticBezierCurvetoArgument,\n 'smoothQuadraticBezierCurveto': parse_smoothQuadraticBezierCurveto,\n 'smoothQuadraticBezierCurvetoArgumentSequence': parse_smoothQuadraticBezierCurvetoArgumentSequence,\n 'ellipticalArc': parse_ellipticalArc,\n 'ellipticalArcArgumentSequence': parse_ellipticalArcArgumentSequence,\n 'ellipticalArcArgument': parse_ellipticalArcArgument,\n 'coordinatePair': parse_coordinatePair,\n 'nonnegativeNumber': parse_nonnegativeNumber,\n 'number': parse_number,\n 'flag': parse_flag,\n 'commaWsp': parse_commaWsp,\n 'comma': parse_comma,\n 'floatingPointConstant': parse_floatingPointConstant,\n 'fractionalConstant': parse_fractionalConstant,\n 'exponent': parse_exponent,\n 'sign': parse_sign,\n 'digitSequence': parse_digitSequence,\n 'digit': parse_digit,\n 'wsp': parse_wsp\n };\n if (startRule !== undefined) {\n if (parseFunctions[startRule] === undefined) {\n throw new Error('Invalid rule name: ' + quote(startRule) + '.');\n }\n } else {\n startRule = 'svgPath';\n }\n var pos = 0;\n var reportFailures = 0;\n var rightmostFailuresPos = 0;\n var rightmostFailuresExpected = [];\n function padLeft(input, padding, length) {\n var result = input;\n var padLength = length - input.length;\n for (var i = 0; i < padLength; i++) {\n result = padding + result;\n }\n return result;\n }\n function escape(ch) {\n var charCode = ch.charCodeAt(0);\n var escapeChar;\n var length;\n if (charCode <= 255) {\n escapeChar = 'x';\n length = 2;\n } else {\n escapeChar = 'u';\n length = 4;\n }\n return '\\\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length);\n }\n function matchFailed(failure) {\n if (pos < rightmostFailuresPos) {\n return;\n }\n if (pos > rightmostFailuresPos) {\n rightmostFailuresPos = pos;\n rightmostFailuresExpected = [];\n }\n rightmostFailuresExpected.push(failure);\n }\n function parse_svgPath() {\n var result0, result1, result2, result3;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = [];\n result1 = parse_wsp();\n while (result1 !== null) {\n result0.push(result1);\n result1 = parse_wsp();\n }\n if (result0 !== null) {\n result1 = parse_movetoDrawtoCommandGroups();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = [];\n result3 = parse_wsp();\n while (result3 !== null) {\n result2.push(result3);\n result3 = parse_wsp();\n }\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, path) {\n return path ? path : [];\n }(pos0, result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_movetoDrawtoCommandGroups() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_movetoDrawtoCommandGroup();\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_movetoDrawtoCommandGroups();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return a.concat(b);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_movetoDrawtoCommandGroup();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return a;\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_movetoDrawtoCommandGroup() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_moveto();\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_drawtoCommands();\n result2 = result2 !== null ? result2 : '';\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, m, c) {\n return c.length ? m.concat(c) : m;\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_drawtoCommands() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_drawtoCommand();\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_drawtoCommands();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, cmd, cmds) {\n return cmd.concat(cmds);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_drawtoCommand();\n if (result0 !== null) {\n result0 = function (offset, cmd) {\n return cmd;\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_drawtoCommand() {\n var result0;\n result0 = parse_closepath();\n if (result0 === null) {\n result0 = parse_lineto();\n if (result0 === null) {\n result0 = parse_horizontalLineto();\n if (result0 === null) {\n result0 = parse_verticalLineto();\n if (result0 === null) {\n result0 = parse_curveto();\n if (result0 === null) {\n result0 = parse_smoothCurveto();\n if (result0 === null) {\n result0 = parse_quadraticBezierCurveto();\n if (result0 === null) {\n result0 = parse_smoothQuadraticBezierCurveto();\n if (result0 === null) {\n result0 = parse_ellipticalArc();\n }\n }\n }\n }\n }\n }\n }\n }\n return result0;\n }\n function parse_moveto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 77) {\n result0 = 'M';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"M\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_movetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return createMoveTo(args, false);\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 109) {\n result0 = 'm';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"m\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_movetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return createMoveTo(args, true);\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_movetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_linetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, pair, list) {\n return [pair].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result0 = function (offset, pair) {\n return [pair];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_closepath() {\n var result0;\n var pos0;\n pos0 = pos;\n if (input.charCodeAt(pos) === 90) {\n result0 = 'Z';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"Z\"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 122) {\n result0 = 'z';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"z\"');\n }\n }\n }\n if (result0 !== null) {\n result0 = function (offset, command) {\n return { cmd: 'close' };\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_lineto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 76) {\n result0 = 'L';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"L\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_linetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'lineTo',\n args: [\n arg.x,\n arg.y\n ]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 108) {\n result0 = 'l';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"l\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_linetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'lineToRelative',\n args: [\n arg.x,\n arg.y\n ]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_linetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_linetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return [a].concat(b);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_horizontalLineto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 72) {\n result0 = 'H';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"H\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_horizontalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'horizontalLineTo',\n args: [arg]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 104) {\n result0 = 'h';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"h\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_horizontalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'horizontalLineToRelative',\n args: [arg]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_horizontalLinetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_number();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_horizontalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return [a].concat(b);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_number();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_verticalLineto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 86) {\n result0 = 'V';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"V\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_verticalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'verticalLineTo',\n args: [arg]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 118) {\n result0 = 'v';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"v\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_verticalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'verticalLineToRelative',\n args: [arg]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_verticalLinetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_number();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_verticalLinetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return [a].concat(b);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_number();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_curveto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 67) {\n result0 = 'C';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"C\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_curvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'cubicCurveTo',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 99) {\n result0 = 'c';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"c\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_curvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'cubicCurveToRelative',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_curvetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_curvetoArgument();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_curvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, list) {\n return [a].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_curvetoArgument();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_curvetoArgument() {\n var result0, result1, result2, result3, result4;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_coordinatePair();\n if (result2 !== null) {\n result3 = parse_commaWsp();\n result3 = result3 !== null ? result3 : '';\n if (result3 !== null) {\n result4 = parse_coordinatePair();\n if (result4 !== null) {\n result0 = [\n result0,\n result1,\n result2,\n result3,\n result4\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b, c) {\n return [\n a.x,\n a.y,\n b.x,\n b.y,\n c.x,\n c.y\n ];\n }(pos0, result0[0], result0[2], result0[4]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_smoothCurveto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 83) {\n result0 = 'S';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"S\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_smoothCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'smoothCubicCurveTo',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 115) {\n result0 = 's';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"s\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_smoothCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'smoothCubicCurveToRelative',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_smoothCurvetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_smoothCurvetoArgument();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_smoothCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, list) {\n return [a].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_smoothCurvetoArgument();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_smoothCurvetoArgument() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_coordinatePair();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return [\n a.x,\n a.y,\n b.x,\n b.y\n ];\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_quadraticBezierCurveto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 81) {\n result0 = 'Q';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"Q\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_quadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'quadraticCurveTo',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 113) {\n result0 = 'q';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"q\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_quadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'quadraticCurveToRelative',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_quadraticBezierCurvetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_quadraticBezierCurvetoArgument();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_quadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, list) {\n return [a].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_quadraticBezierCurvetoArgument();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_quadraticBezierCurvetoArgument() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_coordinatePair();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return [\n a.x,\n a.y,\n b.x,\n b.y\n ];\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_smoothQuadraticBezierCurveto() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 84) {\n result0 = 'T';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"T\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_smoothQuadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'smoothQuadraticCurveTo',\n args: [\n arg.x,\n arg.y\n ]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 116) {\n result0 = 't';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"t\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_smoothQuadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'smoothQuadraticCurveToRelative',\n args: [\n arg.x,\n arg.y\n ]\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_smoothQuadraticBezierCurvetoArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_smoothQuadraticBezierCurvetoArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, list) {\n return [a].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_coordinatePair();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_ellipticalArc() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 65) {\n result0 = 'A';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"A\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_ellipticalArcArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'ellipticalArcTo',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 97) {\n result0 = 'a';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"a\"');\n }\n }\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result2 = parse_ellipticalArcArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, args) {\n return args.map(function (arg) {\n return {\n cmd: 'ellipticalArcToRelative',\n args: arg\n };\n });\n }(pos0, result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_ellipticalArcArgumentSequence() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_ellipticalArcArgument();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_ellipticalArcArgumentSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, list) {\n return [a].concat(list);\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_ellipticalArcArgument();\n if (result0 !== null) {\n result0 = function (offset, a) {\n return [a];\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_ellipticalArcArgument() {\n var result0, result1, result2, result3, result4, result5, result6, result7, result8, result9, result10;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_nonnegativeNumber();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_nonnegativeNumber();\n if (result2 !== null) {\n result3 = parse_commaWsp();\n result3 = result3 !== null ? result3 : '';\n if (result3 !== null) {\n result4 = parse_number();\n if (result4 !== null) {\n result5 = parse_commaWsp();\n if (result5 !== null) {\n result6 = parse_flag();\n if (result6 !== null) {\n result7 = parse_commaWsp();\n result7 = result7 !== null ? result7 : '';\n if (result7 !== null) {\n result8 = parse_flag();\n if (result8 !== null) {\n result9 = parse_commaWsp();\n result9 = result9 !== null ? result9 : '';\n if (result9 !== null) {\n result10 = parse_coordinatePair();\n if (result10 !== null) {\n result0 = [\n result0,\n result1,\n result2,\n result3,\n result4,\n result5,\n result6,\n result7,\n result8,\n result9,\n result10\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, rx, ry, rot, largeArc, sweep, to) {\n return [\n rx,\n ry,\n rot,\n largeArc,\n sweep,\n to.x,\n to.y\n ];\n }(pos0, result0[0], result0[2], result0[4], result0[6], result0[8], result0[10]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_coordinatePair() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_number();\n if (result0 !== null) {\n result1 = parse_commaWsp();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_number();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return {\n x: a,\n y: b\n };\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_nonnegativeNumber() {\n var result0;\n var pos0;\n pos0 = pos;\n result0 = parse_floatingPointConstant();\n if (result0 !== null) {\n result0 = function (offset, number) {\n return parseFloat(number, 10);\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_digitSequence();\n if (result0 !== null) {\n result0 = function (offset, number) {\n return parseInt(number, 10);\n }(pos0, result0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_number() {\n var result0, result1;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_sign();\n result0 = result0 !== null ? result0 : '';\n if (result0 !== null) {\n result1 = parse_floatingPointConstant();\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, sign, number) {\n return parseFloat(sign + number, 10);\n }(pos0, result0[0], result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n result0 = parse_sign();\n result0 = result0 !== null ? result0 : '';\n if (result0 !== null) {\n result1 = parse_digitSequence();\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, sign, number) {\n return parseInt(sign + number, 10);\n }(pos0, result0[0], result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_flag() {\n var result0;\n var pos0;\n pos0 = pos;\n if (input.charCodeAt(pos) === 48) {\n result0 = '0';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"0\"');\n }\n }\n if (result0 !== null) {\n result0 = function (offset) {\n return false;\n }(pos0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n if (input.charCodeAt(pos) === 49) {\n result0 = '1';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"1\"');\n }\n }\n if (result0 !== null) {\n result0 = function (offset) {\n return true;\n }(pos0);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_commaWsp() {\n var result0, result1, result2, result3;\n var pos0;\n pos0 = pos;\n result1 = parse_wsp();\n if (result1 !== null) {\n result0 = [];\n while (result1 !== null) {\n result0.push(result1);\n result1 = parse_wsp();\n }\n } else {\n result0 = null;\n }\n if (result0 !== null) {\n result1 = parse_comma();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = [];\n result3 = parse_wsp();\n while (result3 !== null) {\n result2.push(result3);\n result3 = parse_wsp();\n }\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos0;\n }\n } else {\n result0 = null;\n pos = pos0;\n }\n } else {\n result0 = null;\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n result0 = parse_comma();\n if (result0 !== null) {\n result1 = [];\n result2 = parse_wsp();\n while (result2 !== null) {\n result1.push(result2);\n result2 = parse_wsp();\n }\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos0;\n }\n } else {\n result0 = null;\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_comma() {\n var result0;\n if (input.charCodeAt(pos) === 44) {\n result0 = ',';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\",\"');\n }\n }\n return result0;\n }\n function parse_floatingPointConstant() {\n var result0, result1;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_fractionalConstant();\n if (result0 !== null) {\n result1 = parse_exponent();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return a + b;\n }(pos0, result0[0], result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n result0 = parse_digitSequence();\n if (result0 !== null) {\n result1 = parse_exponent();\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return a + b;\n }(pos0, result0[0], result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_fractionalConstant() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_digitSequence();\n result0 = result0 !== null ? result0 : '';\n if (result0 !== null) {\n if (input.charCodeAt(pos) === 46) {\n result1 = '.';\n pos++;\n } else {\n result1 = null;\n if (reportFailures === 0) {\n matchFailed('\".\"');\n }\n }\n if (result1 !== null) {\n result2 = parse_digitSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return a + '.' + b;\n }(pos0, result0[0], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n pos0 = pos;\n pos1 = pos;\n result0 = parse_digitSequence();\n if (result0 !== null) {\n if (input.charCodeAt(pos) === 46) {\n result1 = '.';\n pos++;\n } else {\n result1 = null;\n if (reportFailures === 0) {\n matchFailed('\".\"');\n }\n }\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a) {\n return a;\n }(pos0, result0[0]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n }\n return result0;\n }\n function parse_exponent() {\n var result0, result1, result2;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n if (input.charCodeAt(pos) === 101) {\n result0 = 'e';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"e\"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 69) {\n result0 = 'E';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"E\"');\n }\n }\n }\n if (result0 !== null) {\n result1 = parse_sign();\n result1 = result1 !== null ? result1 : '';\n if (result1 !== null) {\n result2 = parse_digitSequence();\n if (result2 !== null) {\n result0 = [\n result0,\n result1,\n result2\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b, c) {\n return a + b + c;\n }(pos0, result0[0], result0[1], result0[2]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n return result0;\n }\n function parse_sign() {\n var result0;\n if (input.charCodeAt(pos) === 43) {\n result0 = '+';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"+\"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 45) {\n result0 = '-';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"-\"');\n }\n }\n }\n return result0;\n }\n function parse_digitSequence() {\n var result0, result1;\n var pos0, pos1;\n pos0 = pos;\n pos1 = pos;\n result0 = parse_digit();\n if (result0 !== null) {\n result1 = parse_digitSequence();\n if (result1 !== null) {\n result0 = [\n result0,\n result1\n ];\n } else {\n result0 = null;\n pos = pos1;\n }\n } else {\n result0 = null;\n pos = pos1;\n }\n if (result0 !== null) {\n result0 = function (offset, a, b) {\n return a + b;\n }(pos0, result0[0], result0[1]);\n }\n if (result0 === null) {\n pos = pos0;\n }\n if (result0 === null) {\n result0 = parse_digit();\n }\n return result0;\n }\n function parse_digit() {\n var result0;\n if (/^[0-9]/.test(input.charAt(pos))) {\n result0 = input.charAt(pos);\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('[0-9]');\n }\n }\n return result0;\n }\n function parse_wsp() {\n var result0;\n if (input.charCodeAt(pos) === 32) {\n result0 = ' ';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\" \"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 9) {\n result0 = '\\t';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"\\\\t\"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 13) {\n result0 = '\\r';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"\\\\r\"');\n }\n }\n if (result0 === null) {\n if (input.charCodeAt(pos) === 10) {\n result0 = '\\n';\n pos++;\n } else {\n result0 = null;\n if (reportFailures === 0) {\n matchFailed('\"\\\\n\"');\n }\n }\n }\n }\n }\n return result0;\n }\n function cleanupExpected(expected) {\n expected.sort();\n var lastExpected = null;\n var cleanExpected = [];\n for (var i = 0; i < expected.length; i++) {\n if (expected[i] !== lastExpected) {\n cleanExpected.push(expected[i]);\n lastExpected = expected[i];\n }\n }\n return cleanExpected;\n }\n function computeErrorPosition() {\n var line = 1;\n var column = 1;\n var seenCR = false;\n for (var i = 0; i < Math.max(pos, rightmostFailuresPos); i++) {\n var ch = input.charAt(i);\n if (ch === '\\n') {\n if (!seenCR) {\n line++;\n }\n column = 1;\n seenCR = false;\n } else if (ch === '\\r' || ch === '\\u2028' || ch === '\\u2029') {\n line++;\n column = 1;\n seenCR = true;\n } else {\n column++;\n seenCR = false;\n }\n }\n return {\n line: line,\n column: column\n };\n }\n function createMoveTo(args, isRelative) {\n var result = [{\n cmd: isRelative ? 'moveToRelative' : 'moveTo',\n args: [\n args[0].x,\n args[0].y\n ]\n }];\n if (args.length > 1) {\n for (var i = 1; i < args.length; i++) {\n result.push({\n cmd: isRelative ? 'lineToRelative' : 'lineTo',\n args: [\n args[i].x,\n args[i].y\n ]\n });\n }\n }\n return result;\n }\n var result = parseFunctions[startRule]();\n if (result === null || pos !== input.length) {\n var offset = Math.max(pos, rightmostFailuresPos);\n var found = offset < input.length ? input.charAt(offset) : null;\n var errorPosition = computeErrorPosition();\n throw new this.SyntaxError(cleanupExpected(rightmostFailuresExpected), found, offset, errorPosition.line, errorPosition.column);\n }\n return result;\n },\n toSource: function () {\n return this._source;\n }\n };\n var result = kite.svgPath;\n result.SyntaxError = function (expected, found, offset, line, column) {\n function buildMessage(expected, found) {\n var expectedHumanized, foundHumanized;\n switch (expected.length) {\n case 0:\n expectedHumanized = 'end of input';\n break;\n case 1:\n expectedHumanized = expected[0];\n break;\n default:\n expectedHumanized = expected.slice(0, expected.length - 1).join(', ') + ' or ' + expected[expected.length - 1];\n }\n foundHumanized = found ? quote(found) : 'end of input';\n return 'Expected ' + expectedHumanized + ' but ' + foundHumanized + ' found.';\n }\n this.name = 'SyntaxError';\n this.expected = expected;\n this.found = found;\n this.message = buildMessage(expected, found);\n this.offset = offset;\n this.line = line;\n this.column = column;\n };\n result.SyntaxError.prototype = Error.prototype;\n return result;\n});",
"\ndefine('KITE/util/LineStyles',['require','KITE/kite'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n kite.LineStyles = function (args) {\n if (args === undefined) {\n args = {};\n }\n this.lineWidth = args.lineWidth !== undefined ? args.lineWidth : 1;\n this.lineCap = args.lineCap !== undefined ? args.lineCap : 'butt';\n this.lineJoin = args.lineJoin !== undefined ? args.lineJoin : 'miter';\n this.lineDash = args.lineDash ? args.lineDash : [];\n this.lineDashOffset = args.lineDashOffset !== undefined ? args.lineDashOffset : 0;\n this.miterLimit = args.miterLimit !== undefined ? args.miterLimit : 10;\n null;\n };\n var LineStyles = kite.LineStyles;\n LineStyles.prototype = {\n constructor: LineStyles,\n equals: function (other) {\n var typical = this.lineWidth === other.lineWidth && this.lineCap === other.lineCap && this.lineJoin === other.lineJoin && this.miterLimit === other.miterLimit && this.lineDashOffset === other.lineDashOffset;\n if (!typical) {\n return false;\n }\n if (this.lineDash.length === other.lineDash.length) {\n for (var i = 0; i < this.lineDash.length; i++) {\n if (this.lineDash[i] !== other.lineDash[i]) {\n return false;\n }\n }\n } else {\n return false;\n }\n return true;\n }\n };\n return kite.LineStyles;\n});",
"\ndefine('KITE/segments/Quadratic',['require','KITE/kite','PHET_CORE/inherit','DOT/Bounds2','DOT/Matrix3','DOT/Util','KITE/segments/Segment'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var inherit = require('PHET_CORE/inherit');\n var Bounds2 = require('DOT/Bounds2');\n var Matrix3 = require('DOT/Matrix3');\n var solveQuadraticRootsReal = require('DOT/Util').solveQuadraticRootsReal;\n var Segment = require('KITE/segments/Segment');\n Segment.Quadratic = function Quadratic(start, control, end, skipComputations) {\n this.start = start;\n this.control = control;\n this.end = end;\n if (start.equals(end) && start.equals(control)) {\n this.invalid = true;\n return;\n }\n var t;\n if (skipComputations) {\n return;\n }\n var controlIsStart = start.equals(control);\n var controlIsEnd = end.equals(control);\n null;\n this.startTangent = controlIsStart ? end.minus(start).normalized() : control.minus(start).normalized();\n this.endTangent = controlIsEnd ? end.minus(start).normalized() : end.minus(control).normalized();\n this.bounds = new Bounds2(Math.min(start.x, end.x), Math.min(start.y, end.y), Math.max(start.x, end.x), Math.max(start.y, end.y));\n var divisorX = 2 * (end.x - 2 * control.x + start.x);\n if (divisorX !== 0) {\n this.tCriticalX = -2 * (control.x - start.x) / divisorX;\n if (t > 0 && t < 1) {\n this.bounds = this.bounds.withPoint(this.positionAt(this.tCriticalX));\n }\n }\n var divisorY = 2 * (end.y - 2 * control.y + start.y);\n if (divisorY !== 0) {\n this.tCriticalY = -2 * (control.y - start.y) / divisorY;\n if (t > 0 && t < 1) {\n this.bounds = this.bounds.withPoint(this.positionAt(this.tCriticalY));\n }\n }\n };\n inherit(Segment, Segment.Quadratic, {\n degree: 2,\n positionAt: function (t) {\n var mt = 1 - t;\n return this.start.times(mt * mt).plus(this.control.times(2 * mt * t)).plus(this.end.times(t * t));\n },\n tangentAt: function (t) {\n return this.control.minus(this.start).times(2 * (1 - t)).plus(this.end.minus(this.control).times(2 * t));\n },\n curvatureAt: function (t) {\n var epsilon = 1e-7;\n if (Math.abs(t - 0.5) > 0.5 - epsilon) {\n var isZero = t < 0.5;\n var p0 = isZero ? this.start : this.end;\n var p1 = this.control;\n var p2 = isZero ? this.end : this.start;\n var d10 = p1.minus(p0);\n var a = d10.magnitude();\n var h = (isZero ? -1 : 1) * d10.perpendicular().normalized().dot(p2.minus(p1));\n return h * (this.degree - 1) / (this.degree * a * a);\n } else {\n return this.subdivided(t, true)[0].curvatureAt(1);\n }\n },\n offsetTo: function (r, reverse) {\n var curves = [this];\n var depth = 5;\n for (var i = 0; i < depth; i++) {\n curves = _.flatten(_.map(curves, function (curve) {\n return curve.subdivided(0.5, true);\n }));\n }\n var offsetCurves = _.map(curves, function (curve) {\n return curve.approximateOffset(r);\n });\n if (reverse) {\n offsetCurves.reverse();\n offsetCurves = _.map(offsetCurves, function (curve) {\n return curve.reversed(true);\n });\n }\n return offsetCurves;\n },\n subdivided: function (t, skipComputations) {\n var leftMid = this.start.blend(this.control, t);\n var rightMid = this.control.blend(this.end, t);\n var mid = leftMid.blend(rightMid, t);\n return [\n new Segment.Quadratic(this.start, leftMid, mid, skipComputations),\n new Segment.Quadratic(mid, rightMid, this.end, skipComputations)\n ];\n },\n reversed: function (skipComputations) {\n return new Segment.Quadratic(this.end, this.control, this.start);\n },\n approximateOffset: function (r) {\n return new Segment.Quadratic(this.start.plus((this.start.equals(this.control) ? this.end.minus(this.start) : this.control.minus(this.start)).perpendicular().normalized().times(r)), this.control.plus(this.end.minus(this.start).perpendicular().normalized().times(r)), this.end.plus((this.end.equals(this.control) ? this.end.minus(this.start) : this.end.minus(this.control)).perpendicular().normalized().times(r)));\n },\n getSVGPathFragment: function () {\n return 'Q ' + this.control.x + ' ' + this.control.y + ' ' + this.end.x + ' ' + this.end.y;\n },\n strokeLeft: function (lineWidth) {\n return this.offsetTo(-lineWidth / 2, false);\n },\n strokeRight: function (lineWidth) {\n return this.offsetTo(lineWidth / 2, true);\n },\n getInteriorExtremaTs: function () {\n var result = [];\n var epsilon = 1e-10;\n if (this.tCriticalX !== undefined && this.tCriticalX > epsilon && this.tCriticalX < 1 - epsilon) {\n result.push(this.tCriticalX);\n }\n if (this.tCriticalY !== undefined && this.tCriticalY > epsilon && this.tCriticalY < 1 - epsilon) {\n result.push(this.tCriticalY);\n }\n return result.sort();\n },\n intersectsBounds: function (bounds) {\n throw new Error('Segment.Quadratic.intersectsBounds unimplemented');\n },\n intersection: function (ray) {\n var self = this;\n var result = [];\n var inverseMatrix = Matrix3.rotation2(-ray.dir.angle()).timesMatrix(Matrix3.translation(-ray.pos.x, -ray.pos.y));\n var p0 = inverseMatrix.timesVector2(this.start);\n var p1 = inverseMatrix.timesVector2(this.control);\n var p2 = inverseMatrix.timesVector2(this.end);\n var a = p0.y - 2 * p1.y + p2.y;\n var b = -2 * p0.y + 2 * p1.y;\n var c = p0.y;\n var ts = solveQuadraticRootsReal(a, b, c);\n _.each(ts, function (t) {\n if (t >= 0 && t <= 1) {\n var hitPoint = self.positionAt(t);\n var unitTangent = self.tangentAt(t).normalized();\n var perp = unitTangent.perpendicular();\n var toHit = hitPoint.minus(ray.pos);\n if (toHit.dot(ray.dir) > 0) {\n result.push({\n distance: toHit.magnitude(),\n point: hitPoint,\n normal: perp.dot(ray.dir) > 0 ? perp.negated() : perp,\n wind: ray.dir.perpendicular().dot(unitTangent) < 0 ? 1 : -1\n });\n }\n }\n });\n return result;\n },\n windingIntersection: function (ray) {\n var wind = 0;\n var hits = this.intersection(ray);\n _.each(hits, function (hit) {\n wind += hit.wind;\n });\n return wind;\n },\n writeToContext: function (context) {\n context.quadraticCurveTo(this.control.x, this.control.y, this.end.x, this.end.y);\n },\n transformed: function (matrix) {\n return new Segment.Quadratic(matrix.timesVector2(this.start), matrix.timesVector2(this.control), matrix.timesVector2(this.end));\n }\n });\n return Segment.Quadratic;\n});",
"\ndefine('KITE/segments/Cubic',['require','KITE/kite','PHET_CORE/inherit','DOT/Bounds2','DOT/Vector2','DOT/Matrix3','DOT/Util','DOT/Util','KITE/segments/Segment','KITE/segments/Quadratic'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var inherit = require('PHET_CORE/inherit');\n var Bounds2 = require('DOT/Bounds2');\n var Vector2 = require('DOT/Vector2');\n var Matrix3 = require('DOT/Matrix3');\n var solveQuadraticRootsReal = require('DOT/Util').solveQuadraticRootsReal;\n var solveCubicRootsReal = require('DOT/Util').solveCubicRootsReal;\n var Segment = require('KITE/segments/Segment');\n require('KITE/segments/Quadratic');\n Segment.Cubic = function Cubic(start, control1, control2, end, skipComputations) {\n this.start = start;\n this.control1 = control1;\n this.control2 = control2;\n this.end = end;\n if (skipComputations) {\n return;\n }\n if (start.equals(end, 0) && start.equals(control1, 0) && start.equals(control2, 0)) {\n this.invalid = true;\n return;\n }\n this.startTangent = this.tangentAt(0).normalized();\n this.endTangent = this.tangentAt(1).normalized();\n this.r = control1.minus(start).normalized();\n this.s = this.r.perpendicular();\n var a = start.times(-1).plus(control1.times(3)).plus(control2.times(-3)).plus(end);\n var b = start.times(3).plus(control1.times(-6)).plus(control2.times(3));\n var c = start.times(-3).plus(control1.times(3));\n var d = start;\n var aPerp = a.perpendicular();\n var bPerp = b.perpendicular();\n var aPerpDotB = aPerp.dot(b);\n this.tCusp = -0.5 * (aPerp.dot(c) / aPerpDotB);\n this.tDeterminant = this.tCusp * this.tCusp - 1 / 3 * (bPerp.dot(c) / aPerpDotB);\n if (this.tDeterminant >= 0) {\n var sqrtDet = Math.sqrt(this.tDeterminant);\n this.tInflection1 = this.tCusp - sqrtDet;\n this.tInflection2 = this.tCusp + sqrtDet;\n }\n if (this.hasCusp()) {\n var subdividedAtCusp = this.subdivided(this.tCusp, true);\n this.startQuadratic = new Segment.Quadratic(subdividedAtCusp[0].start, subdividedAtCusp[0].control1, subdividedAtCusp[0].end, false);\n this.endQuadratic = new Segment.Quadratic(subdividedAtCusp[1].start, subdividedAtCusp[1].control2, subdividedAtCusp[1].end, false);\n }\n this.bounds = Bounds2.NOTHING;\n this.bounds = this.bounds.withPoint(this.start);\n this.bounds = this.bounds.withPoint(this.end);\n function extremaT(v0, v1, v2, v3) {\n var a = -3 * v0 + 9 * v1 - 9 * v2 + 3 * v3;\n var b = 6 * v0 - 12 * v1 + 6 * v2;\n var c = -3 * v0 + 3 * v1;\n return solveQuadraticRootsReal(a, b, c);\n }\n var cubic = this;\n this.xExtremaT = extremaT(this.start.x, this.control1.x, this.control2.x, this.end.x);\n _.each(this.xExtremaT, function (t) {\n if (t >= 0 && t <= 1) {\n cubic.bounds = cubic.bounds.withPoint(cubic.positionAt(t));\n }\n });\n this.yExtremaT = extremaT(this.start.y, this.control1.y, this.control2.y, this.end.y);\n _.each(this.yExtremaT, function (t) {\n if (t >= 0 && t <= 1) {\n cubic.bounds = cubic.bounds.withPoint(cubic.positionAt(t));\n }\n });\n if (this.hasCusp()) {\n this.bounds = this.bounds.withPoint(this.positionAt(this.tCusp));\n }\n };\n inherit(Segment, Segment.Cubic, {\n degree: 3,\n hasCusp: function () {\n var epsilon = 0.000001;\n return this.tangentAt(this.tCusp).magnitude() < epsilon && this.tCusp >= 0 && this.tCusp <= 1;\n },\n positionAt: function (t) {\n var mt = 1 - t;\n return this.start.times(mt * mt * mt).plus(this.control1.times(3 * mt * mt * t)).plus(this.control2.times(3 * mt * t * t)).plus(this.end.times(t * t * t));\n },\n tangentAt: function (t) {\n var mt = 1 - t;\n return this.start.times(-3 * mt * mt).plus(this.control1.times(3 * mt * mt - 6 * mt * t)).plus(this.control2.times(6 * mt * t - 3 * t * t)).plus(this.end.times(3 * t * t));\n },\n curvatureAt: function (t) {\n var epsilon = 1e-7;\n if (Math.abs(t - 0.5) > 0.5 - epsilon) {\n var isZero = t < 0.5;\n var p0 = isZero ? this.start : this.end;\n var p1 = isZero ? this.control1 : this.control2;\n var p2 = isZero ? this.control2 : this.control1;\n var d10 = p1.minus(p0);\n var a = d10.magnitude();\n var h = (isZero ? -1 : 1) * d10.perpendicular().normalized().dot(p2.minus(p1));\n return h * (this.degree - 1) / (this.degree * a * a);\n } else {\n return this.subdivided(t, true)[0].curvatureAt(1);\n }\n },\n toRS: function (point) {\n var firstVector = point.minus(this.start);\n return new Vector2(firstVector.dot(this.r), firstVector.dot(this.s));\n },\n subdivided: function (t, skipComputations) {\n var left = this.start.blend(this.control1, t);\n var right = this.control2.blend(this.end, t);\n var middle = this.control1.blend(this.control2, t);\n var leftMid = left.blend(middle, t);\n var rightMid = middle.blend(right, t);\n var mid = leftMid.blend(rightMid, t);\n return [\n new Segment.Cubic(this.start, left, leftMid, mid, skipComputations),\n new Segment.Cubic(mid, rightMid, right, this.end, skipComputations)\n ];\n },\n offsetTo: function (r, reverse) {\n var quantity = 32;\n var points = [];\n var result = [];\n for (var i = 0; i < quantity; i++) {\n var t = i / (quantity - 1);\n if (reverse) {\n t = 1 - t;\n }\n points.push(this.positionAt(t).plus(this.tangentAt(t).perpendicular().normalized().times(r)));\n if (i > 0) {\n result.push(new Segment.Line(points[i - 1], points[i]));\n }\n }\n return result;\n },\n getSVGPathFragment: function () {\n return 'C ' + this.control1.x + ' ' + this.control1.y + ' ' + this.control2.x + ' ' + this.control2.y + ' ' + this.end.x + ' ' + this.end.y;\n },\n strokeLeft: function (lineWidth) {\n return this.offsetTo(-lineWidth / 2, false);\n },\n strokeRight: function (lineWidth) {\n return this.offsetTo(lineWidth / 2, true);\n },\n getInteriorExtremaTs: function () {\n var ts = this.xExtremaT.concat(this.yExtremaT);\n var result = [];\n _.each(ts, function (t) {\n var epsilon = 1e-10;\n if (t > epsilon && t < 1 - epsilon) {\n if (_.every(result, function (otherT) {\n return Math.abs(t - otherT) > epsilon;\n })) {\n result.push(t);\n }\n }\n });\n return result.sort();\n },\n intersectsBounds: function (bounds) {\n throw new Error('Segment.Cubic.intersectsBounds unimplemented');\n },\n intersection: function (ray) {\n var self = this;\n var result = [];\n var inverseMatrix = Matrix3.rotation2(-ray.dir.angle()).timesMatrix(Matrix3.translation(-ray.pos.x, -ray.pos.y));\n var p0 = inverseMatrix.timesVector2(this.start);\n var p1 = inverseMatrix.timesVector2(this.control1);\n var p2 = inverseMatrix.timesVector2(this.control2);\n var p3 = inverseMatrix.timesVector2(this.end);\n var a = -p0.y + 3 * p1.y - 3 * p2.y + p3.y;\n var b = 3 * p0.y - 6 * p1.y + 3 * p2.y;\n var c = -3 * p0.y + 3 * p1.y;\n var d = p0.y;\n var ts = solveCubicRootsReal(a, b, c, d);\n _.each(ts, function (t) {\n if (t >= 0 && t <= 1) {\n var hitPoint = self.positionAt(t);\n var unitTangent = self.tangentAt(t).normalized();\n var perp = unitTangent.perpendicular();\n var toHit = hitPoint.minus(ray.pos);\n if (toHit.dot(ray.dir) > 0) {\n result.push({\n distance: toHit.magnitude(),\n point: hitPoint,\n normal: perp.dot(ray.dir) > 0 ? perp.negated() : perp,\n wind: ray.dir.perpendicular().dot(unitTangent) < 0 ? 1 : -1\n });\n }\n }\n });\n return result;\n },\n windingIntersection: function (ray) {\n var wind = 0;\n var hits = this.intersection(ray);\n _.each(hits, function (hit) {\n wind += hit.wind;\n });\n return wind;\n },\n writeToContext: function (context) {\n context.bezierCurveTo(this.control1.x, this.control1.y, this.control2.x, this.control2.y, this.end.x, this.end.y);\n },\n transformed: function (matrix) {\n return new Segment.Cubic(matrix.timesVector2(this.start), matrix.timesVector2(this.control1), matrix.timesVector2(this.control2), matrix.timesVector2(this.end));\n }\n });\n return Segment.Cubic;\n});",
"\ndefine('KITE/segments/EllipticalArc',['require','KITE/kite','PHET_CORE/inherit','DOT/Vector2','DOT/Bounds2','DOT/Matrix3','DOT/Transform3','DOT/Util','DOT/Util','KITE/segments/Segment','KITE/util/Subpath'],function (require) {\n 'use strict';\n var kite = require('KITE/kite');\n var inherit = require('PHET_CORE/inherit');\n var Vector2 = require('DOT/Vector2');\n var Bounds2 = require('DOT/Bounds2');\n var Matrix3 = require('DOT/Matrix3');\n var Transform3 = require('DOT/Transform3');\n var toDegrees = require('DOT/Util').toDegrees;\n var DotUtil = require('DOT/Util');\n var Segment = require('KITE/segments/Segment');\n require('KITE/util/Subpath');\n Segment.EllipticalArc = function EllipticalArc(center, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {\n if (radiusX < 0) {\n radiusX = -radiusX;\n startAngle = Math.PI - startAngle;\n endAngle = Math.PI - endAngle;\n anticlockwise = !anticlockwise;\n }\n if (radiusY < 0) {\n radiusY = -radiusY;\n startAngle = -startAngle;\n endAngle = -endAngle;\n anticlockwise = !anticlockwise;\n }\n if (radiusX < radiusY) {\n rotation += Math.PI / 2;\n startAngle -= Math.PI / 2;\n endAngle -= Math.PI / 2;\n var tmpR = radiusX;\n radiusX = radiusY;\n radiusY = tmpR;\n }\n this.center = center;\n this.radiusX = radiusX;\n this.radiusY = radiusY;\n this.rotation = rotation;\n this.startAngle = startAngle;\n this.endAngle = endAngle;\n this.anticlockwise = anticlockwise;\n this.unitTransform = Segment.EllipticalArc.computeUnitTransform(center, radiusX, radiusY, rotation);\n this.start = this.positionAtAngle(startAngle);\n this.end = this.positionAtAngle(endAngle);\n this.startTangent = this.tangentAtAngle(startAngle).normalized();\n this.endTangent = this.tangentAtAngle(endAngle).normalized();\n if (radiusX === 0 || radiusY === 0 || startAngle === endAngle) {\n this.invalid = true;\n return;\n }\n if (radiusX < radiusY) {\n throw new Error('Not verified to work if radiusX < radiusY');\n }\n if (this.anticlockwise) {\n if (this.startAngle > this.endAngle) {\n this.actualEndAngle = this.endAngle;\n } else if (this.startAngle < this.endAngle) {\n this.actualEndAngle = this.endAngle - 2 * Math.PI;\n } else {\n this.actualEndAngle = this.startAngle;\n }\n } else {\n if (this.startAngle < this.endAngle) {\n this.actualEndAngle = this.endAngle;\n } else if (this.startAngle > this.endAngle) {\n this.actualEndAngle = this.endAngle + Math.PI * 2;\n } else {\n this.actualEndAngle = this.startAngle;\n }\n }\n null;\n null;\n var isFullPerimeter = !anticlockwise && endAngle - startAngle >= Math.PI * 2 || anticlockwise && startAngle - endAngle >= Math.PI * 2;\n this.angleDifference = this.anticlockwise ? this.startAngle - this.endAngle : this.endAngle - this.startAngle;\n if (this.angleDifference < 0) {\n this.angleDifference += Math.PI * 2;\n }\n null;\n this.unitArcSegment = new Segment.Arc(Vector2.ZERO, 1, startAngle, endAngle, anticlockwise);\n this.bounds = Bounds2.NOTHING;\n this.bounds = this.bounds.withPoint(this.start);\n this.bounds = this.bounds.withPoint(this.end);\n var that = this;\n function boundsAtAngle(angle) {\n if (that.containsAngle(angle)) {\n that.bounds = that.bounds.withPoint(that.positionAtAngle(angle));\n }\n }\n if (startAngle !== endAngle) {\n var xAngle = Math.atan(-(radiusY / radiusX) * Math.tan(rotation));\n var yAngle = Math.atan(radiusY / radiusX / Math.tan(rotation));\n this.possibleExtremaAngles = [\n xAngle,\n xAngle + Math.PI,\n yAngle,\n yAngle + Math.PI\n ];\n _.each(this.possibleExtremaAngles, boundsAtAngle);\n }\n };\n inherit(Segment, Segment.EllipticalArc, {\n mapAngle: function (angle) {\n return this.startAngle > this.actualEndAngle ? DotUtil.moduloBetweenUp(angle, this.startAngle - 2 * Math.PI, this.startAngle) : DotUtil.moduloBetweenDown(angle, this.startAngle, this.startAngle + 2 * Math.PI);\n },\n tAtAngle: function (angle) {\n return (this.mapAngle(angle) - this.startAngle) / (this.actualEndAngle - this.startAngle);\n },\n angleAt: function (t) {\n return this.startAngle + (this.actualEndAngle - this.startAngle) * t;\n },\n positionAt: function (t) {\n return this.positionAtAngle(this.angleAt(t));\n },\n tangentAt: function (t) {\n return this.tangentAtAngle(this.angleAt(t));\n },\n curvatureAt: function (t) {\n var angle = this.angleAt(t);\n var aq = this.radiusX * Math.sin(angle);\n var bq = this.radiusY * Math.cos(angle);\n var denominator = Math.pow(bq * bq + aq * aq, 3 / 2);\n return (this.anticlockwise ? -1 : 1) * this.radiusX * this.radiusY / denominator;\n },\n positionAtAngle: function (angle) {\n return this.unitTransform.transformPosition2(Vector2.createPolar(1, angle));\n },\n tangentAtAngle: function (angle) {\n var normal = this.unitTransform.transformNormal2(Vector2.createPolar(1, angle));\n return this.anticlockwise ? normal.perpendicular() : normal.perpendicular().negated();\n },\n containsAngle: function (angle) {\n var normalizedAngle = this.anticlockwise ? angle - this.endAngle : angle - this.startAngle;\n var positiveMinAngle = normalizedAngle % (Math.PI * 2);\n if (positiveMinAngle < 0) {\n positiveMinAngle += Math.PI * 2;\n }\n return positiveMinAngle <= this.angleDifference;\n },\n offsetTo: function (r, reverse) {\n var quantity = 32;\n var points = [];\n var result = [];\n for (var i = 0; i < quantity; i++) {\n var ratio = i / (quantity - 1);\n if (reverse) {\n ratio = 1 - ratio;\n }\n var angle = this.angleAt(ratio);\n points.push(this.positionAtAngle(angle).plus(this.tangentAtAngle(angle).perpendicular().normalized().times(r)));\n if (i > 0) {\n result.push(new Segment.Line(points[i - 1], points[i]));\n }\n }\n return result;\n },\n getSVGPathFragment: function () {\n var epsilon = 0.01;\n var sweepFlag = this.anticlockwise ? '0' : '1';\n var largeArcFlag;\n var degreesRotation = toDegrees(this.rotation);\n if (this.angleDifference < Math.PI * 2 - epsilon) {\n largeArcFlag = this.angleDifference < Math.PI ? '0' : '1';\n return 'A ' + this.radiusX + ' ' + this.radiusY + ' ' + degreesRotation + ' ' + largeArcFlag + ' ' + sweepFlag + ' ' + this.end.x + ' ' + this.end.y;\n } else {\n var splitOppositeAngle = (this.startAngle + this.endAngle) / 2;\n var splitPoint = this.positionAtAngle(splitOppositeAngle);\n largeArcFlag = '0';\n var firstArc = 'A ' + this.radiusX + ' ' + this.radiusY + ' ' + degreesRotation + ' ' + largeArcFlag + ' ' + sweepFlag + ' ' + splitPoint.x + ' ' + splitPoint.y;\n var secondArc = 'A ' + this.radiusX + ' ' + this.radiusY + ' ' + degreesRotation + ' ' + largeArcFlag + ' ' + sweepFlag + ' ' + this.end.x + ' ' + this.end.y;\n return firstArc + ' ' + secondArc;\n }\n },\n strokeLeft: function (lineWidth) {\n return this.offsetTo(-lineWidth / 2, false);\n },\n strokeRight: function (lineWidth) {\n return this.offsetTo(lineWidth / 2, true);\n },\n getInteriorExtremaTs: function () {\n var that = this;\n var result = [];\n _.each(this.possibleExtremaAngles, function (angle) {\n if (that.containsAngle(angle)) {\n var t = that.tAtAngle(angle);\n var epsilon = 1e-10;\n if (t > epsilon && t < 1 - epsilon) {\n result.push(t);\n }\n }\n });\n return result.sort();\n },\n subdivided: function (t) {\n var angle0 = this.angleAt(0);\n var angleT = this.angleAt(t);\n var angle1 = this.angleAt(1);\n return [\n new Segment.EllipticalArc(this.center, this.radiusX, this.radiusY, this.rotation, angle0, angleT, this.anticlockwise),\n new Segment.EllipticalArc(this.center, this.radiusX, this.radiusY, this.rotation, angleT, angle1, this.anticlockwise)\n ];\n },\n intersectsBounds: function (bounds) {\n throw new Error('Segment.EllipticalArc.intersectsBounds unimplemented');\n },\n intersection: function (ray) {\n var unitTransform = this.unitTransform;\n var rayInUnitCircleSpace = unitTransform.inverseRay2(ray);\n var hits = this.unitArcSegment.intersection(rayInUnitCircleSpace);\n return _.map(hits, function (hit) {\n var transformedPoint = unitTransform.transformPosition2(hit.point);\n return {\n distance: ray.pos.distance(transformedPoint),\n point: transformedPoint,\n normal: unitTransform.inverseNormal2(hit.normal),\n wind: hit.wind\n };\n });\n },\n windingIntersection: function (ray) {\n var rayInUnitCircleSpace = this.unitTransform.inverseRay2(ray);\n return this.unitArcSegment.windingIntersection(rayInUnitCircleSpace);\n },\n writeToContext: function (context) {\n if (context.ellipse) {\n context.ellipse(this.center.x, this.center.y, this.radiusX, this.radiusY, this.rotation, this.startAngle, this.endAngle, this.anticlockwise);\n } else {\n this.unitTransform.getMatrix().canvasAppendTransform(context);\n context.arc(0, 0, 1, this.startAngle, this.endAngle, this.anticlockwise);\n this.unitTransform.getInverse().canvasAppendTransform(context);\n }\n },\n transformed: function (matrix) {\n var transformedSemiMajorAxis = matrix.timesVector2(Vector2.createPolar(this.radiusX, this.rotation)).minus(matrix.timesVector2(Vector2.ZERO));\n var transformedSemiMinorAxis = matrix.timesVector2(Vector2.createPolar(this.radiusY, this.rotation + Math.PI / 2)).minus(matrix.timesVector2(Vector2.ZERO));\n var rotation = transformedSemiMajorAxis.angle();\n var radiusX = transformedSemiMajorAxis.magnitude();\n var radiusY = transformedSemiMinorAxis.magnitude();\n var reflected = matrix.getDeterminant() < 0;\n var anticlockwise = reflected ? !this.anticlockwise : this.anticlockwise;\n var startAngle = reflected ? -this.startAngle : this.startAngle;\n var endAngle = reflected ? -this.endAngle : this.endAngle;\n return new Segment.EllipticalArc(matrix.timesVector2(this.center), radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);\n }\n });\n Segment.EllipticalArc.computeUnitTransform = function (center, radiusX, radiusY, rotation) {\n return new Transform3(Matrix3.translation(center.x, center.y).timesMatrix(Matrix3.rotation2(rotation)).timesMatrix(Matrix3.scaling(radiusX, radiusY)));\n };\n return Segment.EllipticalArc;\n});",
"\ndefine('KITE/Shape',['require','ASSERT/assert','KITE/kite','DOT/Vector2','DOT/Bounds2','DOT/Ray2','DOT/Matrix3','DOT/Transform3','DOT/Util','DOT/Util','KITE/util/Subpath','KITE/../parser/svgPath','KITE/util/LineStyles','KITE/segments/Arc','KITE/segments/Cubic','KITE/segments/EllipticalArc','KITE/segments/Line','KITE/segments/Quadratic'],function (require) {\n 'use strict';\n var assertExtra = require('ASSERT/assert')('kite.extra', true);\n var kite = require('KITE/kite');\n var Vector2 = require('DOT/Vector2');\n var Bounds2 = require('DOT/Bounds2');\n var Ray2 = require('DOT/Ray2');\n var Matrix3 = require('DOT/Matrix3');\n var Transform3 = require('DOT/Transform3');\n var toDegrees = require('DOT/Util').toDegrees;\n var lineLineIntersection = require('DOT/Util').lineLineIntersection;\n var Subpath = require('KITE/util/Subpath');\n var svgPath = require('KITE/../parser/svgPath');\n require('KITE/util/LineStyles');\n require('KITE/segments/Arc');\n require('KITE/segments/Cubic');\n require('KITE/segments/EllipticalArc');\n require('KITE/segments/Line');\n require('KITE/segments/Quadratic');\n function p(x, y) {\n return new Vector2(x, y);\n }\n function v(x, y) {\n return new Vector2(x, y);\n }\n kite.Shape = function Shape(subpaths, bounds) {\n this.subpaths = typeof subpaths === 'object' ? subpaths : [];\n null;\n this.bounds = bounds || Bounds2.NOTHING;\n var that = this;\n if (subpaths && typeof subpaths !== 'object') {\n null;\n _.each(svgPath.parse(subpaths), function (item) {\n null;\n that[item.cmd].apply(that, item.args);\n });\n }\n phetAllocation && phetAllocation('Shape');\n };\n var Shape = kite.Shape;\n Shape.prototype = {\n constructor: Shape,\n moveTo: function (x, y) {\n return this.moveToPoint(v(x, y));\n },\n moveToRelative: function (x, y) {\n return this.moveToPointRelative(v(x, y));\n },\n moveToPointRelative: function (point) {\n return this.moveToPoint(this.getRelativePoint().plus(point));\n },\n moveToPoint: function (point) {\n return this.addSubpath(new kite.Subpath().addPoint(point));\n },\n lineTo: function (x, y) {\n return this.lineToPoint(v(x, y));\n },\n lineToRelative: function (x, y) {\n return this.lineToPointRelative(v(x, y));\n },\n lineToPointRelative: function (point) {\n return this.lineToPoint(this.getRelativePoint().plus(point));\n },\n lineToPoint: function (point) {\n if (this.hasSubpaths()) {\n var start = this.getLastSubpath().getLastPoint();\n var end = point;\n var line = new kite.Segment.Line(start, end);\n this.getLastSubpath().addPoint(end);\n if (!line.invalid) {\n this.getLastSubpath().addSegment(line);\n this.bounds = this.bounds.withPoint(start).withPoint(end);\n null;\n }\n } else {\n this.ensure(point);\n }\n return this;\n },\n horizontalLineTo: function (x) {\n return this.lineTo(x, this.getRelativePoint().y);\n },\n horizontalLineToRelative: function (x) {\n return this.lineToRelative(x, 0);\n },\n verticalLineTo: function (y) {\n return this.lineTo(this.getRelativePoint().x, y);\n },\n verticalLineToRelative: function (y) {\n return this.lineToRelative(0, y);\n },\n quadraticCurveTo: function (cpx, cpy, x, y) {\n return this.quadraticCurveToPoint(v(cpx, cpy), v(x, y));\n },\n quadraticCurveToRelative: function (cpx, cpy, x, y) {\n return this.quadraticCurveToPointRelative(v(cpx, cpy), v(x, y));\n },\n quadraticCurveToPointRelative: function (controlPoint, point) {\n var relativePoint = this.getRelativePoint();\n return this.quadraticCurveToPoint(relativePoint.plus(controlPoint), relativePoint.plus(point));\n },\n smoothQuadraticCurveTo: function (x, y) {\n return this.quadraticCurveToPoint(this.getSmoothQuadraticControlPoint(), v(x, y));\n },\n smoothQuadraticCurveToRelative: function (x, y) {\n return this.quadraticCurveToPoint(this.getSmoothQuadraticControlPoint(), v(x, y).plus(this.getRelativePoint()));\n },\n quadraticCurveToPoint: function (controlPoint, point) {\n this.ensure(controlPoint);\n var start = this.getLastSubpath().getLastPoint();\n var quadratic = new kite.Segment.Quadratic(start, controlPoint, point);\n this.getLastSubpath().addPoint(point);\n if (!quadratic.invalid) {\n this.getLastSubpath().addSegment(quadratic);\n this.bounds = this.bounds.union(quadratic.bounds);\n }\n return this;\n },\n cubicCurveTo: function (cp1x, cp1y, cp2x, cp2y, x, y) {\n return this.cubicCurveToPoint(v(cp1x, cp1y), v(cp2x, cp2y), v(x, y));\n },\n cubicCurveToRelative: function (cp1x, cp1y, cp2x, cp2y, x, y) {\n return this.cubicCurveToPointRelative(v(cp1x, cp1y), v(cp2x, cp2y), v(x, y));\n },\n cubicCurveToPointRelative: function (control1, control2, point) {\n var relativePoint = this.getRelativePoint();\n return this.cubicCurveToPoint(relativePoint.plus(control1), relativePoint.plus(control2), relativePoint.plus(point));\n },\n smoothCubicCurveTo: function (cp2x, cp2y, x, y) {\n return this.cubicCurveToPoint(this.getSmoothCubicControlPoint(), v(cp2x, cp2y), v(x, y));\n },\n smoothCubicCurveToRelative: function (cp2x, cp2y, x, y) {\n return this.cubicCurveToPoint(this.getSmoothCubicControlPoint(), v(cp2x, cp2y).plus(this.getRelativePoint()), v(x, y).plus(this.getRelativePoint()));\n },\n cubicCurveToPoint: function (control1, control2, point) {\n this.ensure(control1);\n var start = this.getLastSubpath().getLastPoint();\n var cubic = new kite.Segment.Cubic(start, control1, control2, point);\n if (!cubic.invalid) {\n if (cubic.hasCusp()) {\n this.getLastSubpath().addSegment(cubic.startQuadratic);\n this.getLastSubpath().addSegment(cubic.endQuadratic);\n } else {\n this.getLastSubpath().addSegment(cubic);\n }\n this.bounds = this.bounds.union(cubic.bounds);\n }\n this.getLastSubpath().addPoint(point);\n return this;\n },\n arc: function (centerX, centerY, radius, startAngle, endAngle, anticlockwise) {\n return this.arcPoint(v(centerX, centerY), radius, startAngle, endAngle, anticlockwise);\n },\n arcPoint: function (center, radius, startAngle, endAngle, anticlockwise) {\n var arc = new kite.Segment.Arc(center, radius, startAngle, endAngle, anticlockwise);\n var startPoint = arc.start;\n var endPoint = arc.end;\n if (this.hasSubpaths() && this.getLastSubpath().getLength() > 0 && !startPoint.equals(this.getLastSubpath().getLastPoint(), 0)) {\n this.getLastSubpath().addSegment(new kite.Segment.Line(this.getLastSubpath().getLastPoint(), startPoint));\n }\n if (!this.hasSubpaths()) {\n this.addSubpath(new kite.Subpath());\n }\n this.getLastSubpath().addPoint(startPoint);\n this.getLastSubpath().addPoint(endPoint);\n if (!arc.invalid) {\n this.getLastSubpath().addSegment(arc);\n this.bounds = this.bounds.union(arc.bounds);\n }\n return this;\n },\n ellipticalArc: function (centerX, centerY, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {\n return this.ellipticalArcPoint(v(centerX, centerY), radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);\n },\n ellipticalArcPoint: function (center, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {\n var ellipticalArc = new kite.Segment.EllipticalArc(center, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);\n var startPoint = ellipticalArc.start;\n var endPoint = ellipticalArc.end;\n if (this.hasSubpaths() && this.getLastSubpath().getLength() > 0 && !startPoint.equals(this.getLastSubpath().getLastPoint(), 0)) {\n this.getLastSubpath().addSegment(new kite.Segment.Line(this.getLastSubpath().getLastPoint(), startPoint));\n }\n if (!this.hasSubpaths()) {\n this.addSubpath(new kite.Subpath());\n }\n this.getLastSubpath().addPoint(startPoint);\n this.getLastSubpath().addPoint(endPoint);\n if (!ellipticalArc.invalid) {\n this.getLastSubpath().addSegment(ellipticalArc);\n this.bounds = this.bounds.union(ellipticalArc.bounds);\n }\n return this;\n },\n close: function () {\n if (this.hasSubpaths()) {\n var previousPath = this.getLastSubpath();\n var nextPath = new kite.Subpath();\n previousPath.close();\n this.addSubpath(nextPath);\n nextPath.addPoint(previousPath.getFirstPoint());\n }\n return this;\n },\n ellipticalArcToRelative: function (radiusX, radiusY, rotation, largeArc, sweep, x, y) {\n var relativePoint = this.getRelativePoint();\n return this.ellipticalArcTo(radiusX, radiusY, rotation, largeArc, sweep, x + relativePoint.x, y + relativePoint.y);\n },\n ellipticalArcTo: function (radiusX, radiusY, rotation, largeArc, sweep, x, y) {\n throw new Error('ellipticalArcTo unimplemented');\n },\n circle: function (centerX, centerY, radius) {\n if (typeof centerX === 'object') {\n var center = centerX;\n radius = centerY;\n return this.arcPoint(center, radius, 0, Math.PI * 2, false);\n } else {\n return this.arcPoint(p(centerX, centerY), radius, 0, Math.PI * 2, false);\n }\n },\n ellipse: function (centerX, centerY, radiusX, radiusY, rotation) {\n if (typeof centerX === 'object') {\n var center = centerX;\n rotation = radiusY;\n radiusY = radiusX;\n radiusX = centerY;\n return this.ellipticalArcPoint(center, radiusX, radiusY, rotation || 0, 0, Math.PI * 2, false);\n } else {\n return this.ellipticalArcPoint(v(centerX, centerY), radiusX, radiusY, rotation || 0, 0, Math.PI * 2, false);\n }\n },\n rect: function (x, y, width, height) {\n var subpath = new kite.Subpath();\n this.addSubpath(subpath);\n subpath.addPoint(v(x, y));\n subpath.addPoint(v(x + width, y));\n subpath.addPoint(v(x + width, y + height));\n subpath.addPoint(v(x, y + height));\n subpath.addSegment(new kite.Segment.Line(subpath.points[0], subpath.points[1]));\n subpath.addSegment(new kite.Segment.Line(subpath.points[1], subpath.points[2]));\n subpath.addSegment(new kite.Segment.Line(subpath.points[2], subpath.points[3]));\n subpath.close();\n this.addSubpath(new kite.Subpath());\n this.getLastSubpath().addPoint(v(x, y));\n this.bounds = this.bounds.withCoordinates(x, y).withCoordinates(x + width, y + height);\n null;\n return this;\n },\n roundRect: function (x, y, width, height, arcw, arch) {\n var lowX = x + arcw;\n var highX = x + width - arcw;\n var lowY = y + arch;\n var highY = y + height - arch;\n if (arcw === arch) {\n this.arc(highX, lowY, arcw, -Math.PI / 2, 0, false).arc(highX, highY, arcw, 0, Math.PI / 2, false).arc(lowX, highY, arcw, Math.PI / 2, Math.PI, false).arc(lowX, lowY, arcw, Math.PI, Math.PI * 3 / 2, false).close();\n } else {\n this.ellipticalArc(highX, lowY, arcw, arch, 0, -Math.PI / 2, 0, false).ellipticalArc(highX, highY, arcw, arch, 0, 0, Math.PI / 2, false).ellipticalArc(lowX, highY, arcw, arch, 0, Math.PI / 2, Math.PI, false).ellipticalArc(lowX, lowY, arcw, arch, 0, Math.PI, Math.PI * 3 / 2, false).close();\n }\n return this;\n },\n polygon: function (vertices) {\n var length = vertices.length;\n if (length > 0) {\n this.moveToPoint(vertices[0]);\n for (var i = 1; i < length; i++) {\n this.lineToPoint(vertices[i]);\n }\n }\n return this.close();\n },\n copy: function () {\n return new Shape(_.map(this.subpaths, function (subpath) {\n return subpath.copy();\n }), this.bounds);\n },\n writeToContext: function (context) {\n var len = this.subpaths.length;\n for (var i = 0; i < len; i++) {\n this.subpaths[i].writeToContext(context);\n }\n },\n getSVGPath: function () {\n var subpathStrings = [];\n var len = this.subpaths.length;\n for (var i = 0; i < len; i++) {\n var subpath = this.subpaths[i];\n if (subpath.isDrawable()) {\n var startPoint = subpath.getFirstSegment().start;\n null;\n var string = 'M ' + startPoint.x + ' ' + startPoint.y + ' ';\n string += _.map(subpath.segments, function (segment) {\n return segment.getSVGPathFragment();\n }).join(' ');\n if (subpath.isClosed()) {\n string += ' Z';\n }\n subpathStrings.push(string);\n }\n }\n return subpathStrings.join(' ');\n },\n transformed: function (matrix) {\n var subpaths = _.map(this.subpaths, function (subpath) {\n return subpath.transformed(matrix);\n });\n var bounds = _.reduce(subpaths, function (bounds, subpath) {\n return bounds.union(subpath.computeBounds());\n }, Bounds2.NOTHING);\n return new Shape(subpaths, bounds);\n },\n computeBounds: function (lineStyles) {\n if (lineStyles) {\n return this.bounds.union(this.getStrokedShape(lineStyles).bounds);\n } else {\n return this.bounds;\n }\n },\n containsPoint: function (point) {\n var ray = new Ray2(point, Vector2.X_UNIT);\n return this.windingIntersection(ray) !== 0;\n },\n intersection: function (ray) {\n var hits = [];\n var numSubpaths = this.subpaths.length;\n for (var i = 0; i < numSubpaths; i++) {\n var subpath = this.subpaths[i];\n if (subpath.isDrawable()) {\n var numSegments = subpath.segments.length;\n for (var k = 0; k < numSegments; k++) {\n var segment = subpath.segments[k];\n hits = hits.concat(segment.intersection(ray));\n }\n if (subpath.hasClosingSegment()) {\n hits = hits.concat(subpath.getClosingSegment().intersection(ray));\n }\n }\n }\n return _.sortBy(hits, function (hit) {\n return hit.distance;\n });\n },\n windingIntersection: function (ray) {\n var wind = 0;\n var numSubpaths = this.subpaths.length;\n for (var i = 0; i < numSubpaths; i++) {\n var subpath = this.subpaths[i];\n if (subpath.isDrawable()) {\n var numSegments = subpath.segments.length;\n for (var k = 0; k < numSegments; k++) {\n wind += subpath.segments[k].windingIntersection(ray);\n }\n if (subpath.hasClosingSegment()) {\n wind += subpath.getClosingSegment().windingIntersection(ray);\n }\n }\n }\n return wind;\n },\n intersectsBounds: function (bounds) {\n var numSubpaths = this.subpaths.length;\n for (var i = 0; i < numSubpaths; i++) {\n var subpath = this.subpaths[i];\n if (subpath.isDrawable()) {\n var numSegments = subpath.segments.length;\n for (var k = 0; k < numSegments; k++) {\n if (subpath.segments[k].intersectsBounds(bounds)) {\n return true;\n }\n }\n if (subpath.hasClosingSegment()) {\n if (subpath.getClosingSegment().intersectsBounds(bounds)) {\n return true;\n }\n }\n }\n }\n return false;\n },\n getStrokedShape: function (lineStyles) {\n var subpaths = [];\n var bounds = Bounds2.NOTHING.copy();\n var subLen = this.subpaths.length;\n for (var i = 0; i < subLen; i++) {\n var subpath = this.subpaths[i];\n var strokedSubpath = subpath.stroked(lineStyles);\n subpaths = subpaths.concat(strokedSubpath);\n }\n subLen = subpaths.length;\n for (i = 0; i < subLen; i++) {\n bounds.includeBounds(subpaths[i].computeBounds());\n }\n return new Shape(subpaths, bounds);\n },\n toString: function () {\n return 'new kite.Shape( \\'' + this.getSVGPath() + '\\' )';\n },\n ensure: function (point) {\n if (!this.hasSubpaths()) {\n this.addSubpath(new Subpath());\n this.getLastSubpath().addPoint(point);\n }\n },\n addSubpath: function (subpath) {\n this.subpaths.push(subpath);\n return this;\n },\n hasSubpaths: function () {\n return this.subpaths.length > 0;\n },\n getLastSubpath: function () {\n return _.last(this.subpaths);\n },\n getLastPoint: function () {\n return this.hasSubpaths() ? this.getLastSubpath().getLastPoint() : null;\n },\n getLastSegment: function () {\n if (!this.hasSubpaths()) {\n return null;\n }\n var subpath = this.getLastSubpath();\n if (!subpath.isDrawable()) {\n return null;\n }\n return subpath.getLastSegment();\n },\n getSmoothQuadraticControlPoint: function () {\n var lastPoint = this.getLastPoint();\n var segment = this.getLastSegment();\n if (!segment || !(segment instanceof kite.Segment.Quadratic)) {\n return lastPoint;\n }\n return lastPoint.plus(lastPoint.minus(segment.control));\n },\n getSmoothCubicControlPoint: function () {\n var lastPoint = this.getLastPoint();\n var segment = this.getLastSegment();\n if (!segment || !(segment instanceof kite.Segment.Cubic)) {\n return lastPoint;\n }\n return lastPoint.plus(lastPoint.minus(segment.control2));\n },\n getRelativePoint: function () {\n var lastPoint = this.getLastPoint();\n return lastPoint ? lastPoint : Vector2.ZERO;\n }\n };\n Shape.rectangle = function (x, y, width, height) {\n return new Shape().rect(x, y, width, height);\n };\n Shape.rect = Shape.rectangle;\n Shape.roundRect = function (x, y, width, height, arcw, arch) {\n return new Shape().roundRect(x, y, width, height, arcw, arch);\n };\n Shape.roundRectangle = Shape.roundRect;\n Shape.polygon = function (vertices) {\n return new Shape().polygon(vertices);\n };\n Shape.bounds = function (bounds) {\n return new Shape().rect(bounds.minX, bounds.minY, bounds.maxX - bounds.minX, bounds.maxY - bounds.minY);\n };\n Shape.lineSegment = function (a, b, c, d) {\n if (typeof a === 'number') {\n return new Shape().moveTo(a, b).lineTo(c, d);\n } else {\n return new Shape().moveToPoint(a).lineToPoint(b);\n }\n };\n Shape.regularPolygon = function (sides, radius) {\n var shape = new Shape();\n _.each(_.range(sides), function (k) {\n var point = Vector2.createPolar(radius, 2 * Math.PI * k / sides);\n k === 0 ? shape.moveToPoint(point) : shape.lineToPoint(point);\n });\n return shape.close();\n };\n Shape.circle = function (centerX, centerY, radius) {\n if (centerY === undefined) {\n return new Shape().circle(0, 0, centerX);\n }\n return new Shape().circle(centerX, centerY, radius).close();\n };\n Shape.ellipse = function (centerX, centerY, radiusX, radiusY) {\n if (radiusX === undefined) {\n return new Shape().ellipse(0, 0, centerX, centerY);\n }\n return new Shape().ellipse(centerX, centerY, radiusX, radiusY).close();\n };\n Shape.arc = function (centerX, centerY, radius, startAngle, endAngle, anticlockwise) {\n return new Shape().arc(centerX, centerY, radius, startAngle, endAngle, anticlockwise);\n };\n return Shape;\n});",
"\ndefine('SCENERY/util/FixedNodeEvents',['require','SCENERY/scenery'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n var eventNames = [\n 'selfBounds',\n 'childBounds',\n 'bounds',\n 'resize',\n 'boundsAccuracy'\n ];\n scenery.FixedNodeEvents = function FixedNodeEvents(type) {\n var proto = type.prototype;\n proto.initializeNodeEvents = function () {\n this._events = {};\n var node = this;\n var len = eventNames.length;\n for (var i = 0; i < len; i++) {\n node._events[eventNames[i]] = [];\n }\n };\n proto.addEventListener = function (type, listener) {\n sceneryAssert && sceneryAssert(type !== undefined && listener !== undefined, 'Both a type and listener are required for addEventListener');\n sceneryAssert && sceneryAssert(_.indexOf(this._events[type], listener), 'Event listener was already there for addEventListener with type ' + type);\n this._events[type].push(listener);\n return this;\n };\n proto.removeEventListener = function (type, listener) {\n sceneryAssert && sceneryAssert(type !== undefined && listener !== undefined, 'Both a type and listener are required for removeEventListener');\n sceneryAssert && sceneryAssert(_.indexOf(this._events[type], listener) !== -1, 'Listener did not exist for type ' + type);\n this._events[type].splice(_.indexOf(this._events[type], listener), 1);\n return this;\n };\n proto.fireEvent = function (type, args) {\n sceneryAssert && sceneryAssert(_.contains(eventNames, type), 'unknown event type: ' + type);\n var events = this._events[type];\n var len = events.length;\n if (len) {\n var copy = events.slice(0);\n for (var i = 0; i < len; i++) {\n copy[i](args);\n }\n }\n };\n };\n var FixedNodeEvents = scenery.FixedNodeEvents;\n return FixedNodeEvents;\n});",
"\ndefine('SCENERY/layers/LayerStrategy',['require','SCENERY/scenery'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n scenery.LayerStrategy = {\n hasPreferredLayerType: function (pointer, layerBuilder) {\n return pointer.trail.lastNode().hasRenderer();\n },\n getPreferredLayerType: function (pointer, layerBuilder) {\n sceneryAssert && sceneryAssert(this.hasPreferredLayerType(pointer, layerBuilder));\n var node = pointer.trail.lastNode();\n var preferredLayerType;\n if (node.hasRendererLayerType()) {\n preferredLayerType = node.getRendererLayerType();\n } else {\n preferredLayerType = layerBuilder.bestPreferredLayerTypeFor([node.getRenderer()]);\n if (!preferredLayerType) {\n preferredLayerType = node.getRenderer().defaultLayerType;\n }\n }\n return preferredLayerType;\n },\n enter: function (pointer, layerBuilder) {\n var trail = pointer.trail;\n var node = trail.lastNode();\n var preferredLayerType;\n if (node.hasRenderer()) {\n preferredLayerType = this.getPreferredLayerType(pointer, layerBuilder);\n layerBuilder.pushPreferredLayerType(preferredLayerType);\n if (layerBuilder.getCurrentLayerType() !== preferredLayerType) {\n layerBuilder.switchToType(pointer, preferredLayerType);\n }\n } else if (node.isPainted()) {\n var supportedRenderers = node._supportedRenderers;\n var currentType = layerBuilder.getCurrentLayerType();\n preferredLayerType = layerBuilder.bestPreferredLayerTypeFor(supportedRenderers);\n if (preferredLayerType) {\n if (currentType !== preferredLayerType) {\n layerBuilder.switchToType(pointer, preferredLayerType);\n }\n } else {\n if (!currentType || !currentType.supportsNode(node)) {\n layerBuilder.switchToType(pointer, supportedRenderers[0].defaultLayerType);\n }\n }\n }\n if (node.isLayerSplitBefore() || this.hasSplitFlags(node)) {\n layerBuilder.switchToType(pointer, layerBuilder.getCurrentLayerType());\n }\n if (node.isPainted()) {\n layerBuilder.markPainted(pointer);\n }\n },\n exit: function (pointer, layerBuilder) {\n var trail = pointer.trail;\n var node = trail.lastNode();\n if (node.hasRenderer()) {\n layerBuilder.popPreferredLayerType();\n }\n if (node.isLayerSplitAfter() || this.hasSplitFlags(node)) {\n layerBuilder.switchToType(pointer, layerBuilder.getCurrentLayerType());\n }\n },\n hasSplitFlags: function (node) {\n var rendererOptions = node.getRendererOptions();\n return node.hasRenderer() && rendererOptions && (rendererOptions.cssTranslation || rendererOptions.cssRotation || rendererOptions.cssScale || rendererOptions.cssTransform);\n }\n };\n var LayerStrategy = scenery.LayerStrategy;\n return LayerStrategy;\n});",
"\ndefine('SCENERY/nodes/Node',['require','DOT/Bounds2','DOT/Transform3','DOT/Matrix3','DOT/Vector2','DOT/Util','KITE/Shape','SCENERY/scenery','SCENERY/util/FixedNodeEvents','SCENERY/layers/LayerStrategy'],function (require) {\n 'use strict';\n var Bounds2 = require('DOT/Bounds2');\n var Transform3 = require('DOT/Transform3');\n var Matrix3 = require('DOT/Matrix3');\n var Vector2 = require('DOT/Vector2');\n var clamp = require('DOT/Util').clamp;\n var Shape = require('KITE/Shape');\n var scenery = require('SCENERY/scenery');\n var NodeEvents = require('SCENERY/util/FixedNodeEvents');\n var LayerStrategy = require('SCENERY/layers/LayerStrategy');\n var globalIdCounter = 1;\n scenery.Node = function Node(options) {\n var self = this;\n this._id = globalIdCounter++;\n this._instances = [];\n this._visible = true;\n this._opacity = 1;\n this._pickable = true;\n this._clipShape = null;\n this._mouseArea = null;\n this._touchArea = null;\n this._cursor = null;\n this._children = [];\n this._parents = [];\n this._peers = [];\n this._liveRegions = [];\n this._transform = new Transform3();\n this._transformListener = {\n before: function () {\n self.beforeTransformChange();\n },\n after: function () {\n self.afterTransformChange();\n }\n };\n this._transform.addTransformListener(this._transformListener);\n this._inputListeners = [];\n this.initializeNodeEvents();\n this._includeStrokeInHitRegion = false;\n this._bounds = Bounds2.NOTHING;\n this._selfBounds = Bounds2.NOTHING;\n this._childBounds = Bounds2.NOTHING;\n this._boundsDirty = true;\n this._selfBoundsDirty = this.isPainted();\n this._childBoundsDirty = true;\n this._mouseBounds = null;\n this._mouseBoundsDirty = true;\n this._touchBounds = null;\n this._touchBoundsDirty = true;\n this._paintDirty = false;\n this._subtreePaintDirty = false;\n this._childPaintDirty = false;\n this._renderer = null;\n this._rendererOptions = null;\n this._rendererLayerType = null;\n this._layerSplitBefore = false;\n this._layerSplitAfter = false;\n if (options) {\n this.mutate(options);\n }\n phetAllocation && phetAllocation('Node');\n };\n var Node = scenery.Node;\n Node.prototype = {\n constructor: Node,\n insertChild: function (index, node) {\n sceneryAssert && sceneryAssert(node !== null && node !== undefined, 'insertChild cannot insert a null/undefined child');\n sceneryAssert && sceneryAssert(!_.contains(this._children, node), 'Parent already contains child');\n sceneryAssert && sceneryAssert(node !== this, 'Cannot add self as a child');\n node._parents.push(this);\n this._children.splice(index, 0, node);\n node.invalidateBounds();\n this._boundsDirty = true;\n this.markForInsertion(node, index);\n this.notifyStitch(false);\n node.invalidateSubtreePaint();\n },\n addChild: function (node) {\n this.insertChild(this._children.length, node);\n },\n removeChild: function (node) {\n sceneryAssert && sceneryAssert(node);\n sceneryAssert && sceneryAssert(this.isChild(node));\n var indexOfChild = _.indexOf(this._children, node);\n this.removeChildWithIndex(node, indexOfChild);\n },\n removeChildAt: function (index) {\n sceneryAssert && sceneryAssert(index >= 0);\n sceneryAssert && sceneryAssert(index < this._children.length);\n var node = this._children[index];\n this.removeChildWithIndex(node, index);\n },\n removeChildWithIndex: function (node, indexOfChild) {\n sceneryAssert && sceneryAssert(node);\n sceneryAssert && sceneryAssert(this.isChild(node));\n sceneryAssert && sceneryAssert(this._children[indexOfChild] === node);\n node.markOldPaint(false);\n var indexOfParent = _.indexOf(node._parents, this);\n this.markForRemoval(node, indexOfChild);\n node._parents.splice(indexOfParent, 1);\n this._children.splice(indexOfChild, 1);\n this.invalidateBounds();\n this._childBoundsDirty = true;\n this.notifyStitch(false);\n },\n removeAllChildren: function () {\n this.setChildren([]);\n },\n setChildren: function (children) {\n if (this._children !== children) {\n while (this._children.length) {\n this.removeChild(this._children[this._children.length - 1]);\n }\n var len = children.length;\n for (var i = 0; i < len; i++) {\n this.addChild(children[i]);\n }\n }\n },\n getChildren: function () {\n return this._children.slice(0);\n },\n getChildrenCount: function () {\n return this._children.length;\n },\n getParents: function () {\n return this._parents.slice(0);\n },\n getParent: function () {\n sceneryAssert && sceneryAssert(this._parents.length <= 1, 'Cannot call getParent on a node with multiple parents');\n return this._parents.length ? this._parents[0] : null;\n },\n getChildAt: function (index) {\n return this._children[index];\n },\n indexOfParent: function (parent) {\n return _.indexOf(this._parents, parent);\n },\n indexOfChild: function (child) {\n return _.indexOf(this._children, child);\n },\n moveToFront: function () {\n var self = this;\n _.each(this._parents.slice(0), function (parent) {\n parent.moveChildToFront(self);\n });\n },\n moveChildToFront: function (child) {\n if (this.indexOfChild(child) !== this._children.length - 1) {\n this.removeChild(child);\n this.addChild(child);\n }\n },\n moveToBack: function () {\n var self = this;\n _.each(this._parents.slice(0), function (parent) {\n parent.moveChildToBack(self);\n });\n },\n moveChildToBack: function (child) {\n if (this.indexOfChild(child) !== 0) {\n this.removeChild(child);\n this.insertChild(0, child);\n }\n },\n detach: function () {\n var that = this;\n _.each(this._parents.slice(0), function (parent) {\n parent.removeChild(that);\n });\n },\n addPeer: function (element, options) {\n sceneryAssert && sceneryAssert(!this.instances.length, 'Cannot call addPeer after a node has instances (yet)');\n this._peers.push({\n element: element,\n options: options\n });\n },\n addLiveRegion: function (property, options) {\n this._liveRegions.push({\n property: property,\n options: options\n });\n },\n validateBounds: function () {\n var that = this;\n var i;\n if (this._selfBoundsDirty) {\n this._selfBoundsDirty = false;\n this.fireEvent('selfBounds', this._selfBounds);\n }\n if (this._childBoundsDirty) {\n i = this._children.length;\n while (i--) {\n this._children[i].validateBounds();\n }\n var oldChildBounds = this._childBounds;\n this._childBounds = Bounds2.NOTHING.copy();\n i = this._children.length;\n while (i--) {\n this._childBounds.includeBounds(this._children[i]._bounds);\n }\n this._childBoundsDirty = false;\n if (!this._childBounds.equals(oldChildBounds)) {\n this.fireEvent('childBounds', this._childBounds);\n }\n }\n if (this._boundsDirty) {\n this._boundsDirty = false;\n var oldBounds = this._bounds;\n var newBounds = this.transformBoundsFromLocalToParent(this._selfBounds.copy().includeBounds(this._childBounds));\n var changed = !newBounds.equals(oldBounds);\n if (changed) {\n this._bounds = newBounds;\n i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateBounds();\n }\n this.fireEvent('bounds', this._bounds);\n }\n }\n if (this._selfBoundsDirty || this._childBoundsDirty || this._boundsDirty) {\n this.validateBounds();\n }\n if (sceneryAssertExtra) {\n (function () {\n var epsilon = 0.000001;\n var childBounds = Bounds2.NOTHING.copy();\n _.each(that.children, function (child) {\n childBounds.includeBounds(child._bounds);\n });\n var fullBounds = that.localToParentBounds(that._selfBounds).union(that.localToParentBounds(childBounds));\n sceneryAssertExtra && sceneryAssertExtra(that._childBounds.equalsEpsilon(childBounds, epsilon), 'Child bounds mismatch after validateBounds: ' + that._childBounds.toString() + ', expected: ' + childBounds.toString());\n sceneryAssertExtra && sceneryAssertExtra(that._bounds.equalsEpsilon(fullBounds, epsilon), 'Bounds mismatch after validateBounds: ' + that._bounds.toString() + ', expected: ' + fullBounds.toString());\n }());\n }\n },\n validateMouseBounds: function () {\n var that = this;\n sceneryAssert && sceneryAssert(!this._selfBoundsDirty && !this._childBoundsDirty && !this._boundsDirty, 'Bounds must be validated before calling validateMouseBounds');\n if (this._mouseBoundsDirty) {\n var hasMouseAreas = false;\n this._mouseBounds = this._selfBounds.copy();\n var i = this._children.length;\n while (i--) {\n var child = this._children[i];\n child.validateMouseBounds();\n if (child._mouseBounds) {\n hasMouseAreas = true;\n that._mouseBounds.includeBounds(child._mouseBounds);\n }\n }\n if (this._mouseArea) {\n hasMouseAreas = true;\n this._mouseBounds.includeBounds(this._mouseArea.bounds);\n }\n if (hasMouseAreas) {\n this.transformBoundsFromLocalToParent(this._mouseBounds);\n this._mouseBounds.includeBounds(this._bounds);\n } else {\n this._mouseBounds = null;\n }\n this._mouseBoundsDirty = false;\n }\n },\n validateTouchBounds: function () {\n var that = this;\n sceneryAssert && sceneryAssert(!this._selfBoundsDirty && !this._childBoundsDirty && !this._boundsDirty, 'Bounds must be validated before calling validateTouchBounds');\n if (this._touchBoundsDirty) {\n var hasTouchAreas = false;\n this._touchBounds = this._selfBounds.copy();\n var i = this._children.length;\n while (i--) {\n var child = this._children[i];\n child.validateTouchBounds();\n if (child._touchBounds) {\n hasTouchAreas = true;\n that._touchBounds.includeBounds(child._touchBounds);\n }\n }\n if (this._touchArea) {\n hasTouchAreas = true;\n this._touchBounds.includeBounds(this._touchArea.bounds);\n }\n if (hasTouchAreas) {\n this.transformBoundsFromLocalToParent(this._touchBounds);\n this._touchBounds.includeBounds(this._bounds);\n } else {\n this._touchBounds = null;\n }\n this._touchBoundsDirty = false;\n }\n },\n validatePaint: function () {\n if (this._paintDirty) {\n sceneryAssert && sceneryAssert(this.isPainted(), 'Only painted nodes can have self dirty paint');\n if (!this._subtreePaintDirty) {\n this.notifyDirtySelfPaint();\n }\n this._paintDirty = false;\n }\n if (this._subtreePaintDirty) {\n this.notifyDirtySubtreePaint();\n this._subtreePaintDirty = false;\n }\n if (this._childPaintDirty) {\n this._childPaintDirty = false;\n var children = this._children;\n var length = children.length;\n for (var i = 0; i < length; i++) {\n children[i].validatePaint();\n }\n }\n },\n invalidateBounds: function () {\n this._boundsDirty = true;\n this._mouseBoundsDirty = true;\n this._touchBoundsDirty = true;\n var i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateChildBounds();\n }\n },\n invalidateChildBounds: function () {\n if (!this._childBoundsDirty) {\n this._childBoundsDirty = true;\n this._mouseBoundsDirty = true;\n this._touchBoundsDirty = true;\n var i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateChildBounds();\n }\n }\n },\n invalidatePaint: function () {\n sceneryAssert && sceneryAssert(this.isPainted(), 'Can only call invalidatePaint on a painted node');\n this._paintDirty = true;\n var i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateChildPaint();\n }\n },\n invalidateSubtreePaint: function () {\n this._subtreePaintDirty = true;\n var i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateChildPaint();\n }\n },\n invalidateChildPaint: function () {\n if (!this._childPaintDirty) {\n this._childPaintDirty = true;\n var i = this._parents.length;\n while (i--) {\n this._parents[i].invalidateChildPaint();\n }\n }\n },\n invalidateSelf: function (newBounds) {\n sceneryAssert && sceneryAssert(newBounds.isEmpty() || newBounds.isFinite(), 'Bounds must be empty or finite in invalidateSelf');\n this.notifyBeforeSelfChange();\n if (!this._selfBounds.equals(newBounds)) {\n this._selfBoundsDirty = true;\n this.invalidateBounds();\n this._selfBounds = newBounds;\n }\n this.invalidatePaint();\n },\n markOldSelfPaint: function () {\n this.notifyBeforeSelfChange();\n },\n markLayerRefreshNeeded: function () {\n this.markForLayerRefresh();\n this.notifyStitch(true);\n },\n markOldPaint: function (justSelf) {\n if (justSelf) {\n this.notifyBeforeSelfChange();\n } else {\n this.notifyBeforeSubtreeChange();\n }\n },\n isChild: function (potentialChild) {\n var ourChild = _.contains(this._children, potentialChild);\n var itsParent = _.contains(potentialChild._parents, this);\n sceneryAssert && sceneryAssert(ourChild === itsParent);\n return ourChild;\n },\n getSelfBounds: function () {\n return this._selfBounds;\n },\n getChildBounds: function () {\n this.validateBounds();\n return this._childBounds;\n },\n getBounds: function () {\n this.validateBounds();\n return this._bounds;\n },\n getVisibleBounds: function () {\n var bounds = this._selfBounds.copy();\n var i = this._children.length;\n while (i--) {\n var child = this._children[i];\n if (child.isVisible()) {\n bounds.includeBounds(child.getVisibleBounds());\n }\n }\n sceneryAssert && sceneryAssert(bounds.isFinite() || bounds.isEmpty(), 'Visible bounds should not be infinite');\n return this.localToParentBounds(bounds);\n },\n trailUnderPointer: function (pointer) {\n var options = {};\n if (pointer.isMouse) {\n options.isMouse = true;\n }\n if (pointer.isTouch) {\n options.isTouch = true;\n }\n if (pointer.isPen) {\n options.isPen = true;\n }\n return this.trailUnderPoint(pointer.point, options);\n },\n trailUnderPoint: function (point, options, recursive) {\n sceneryAssert && sceneryAssert(point, 'trailUnderPointer requires a point');\n if (options === undefined) {\n options = {};\n }\n var pruneInvisible = options.pruneInvisible === undefined ? true : options.pruneInvisible;\n var pruneUnpickable = options.pruneUnpickable === undefined ? true : options.pruneUnpickable;\n if (pruneInvisible && !this.isVisible()) {\n return null;\n }\n if (pruneUnpickable && !this.isPickable()) {\n return null;\n }\n this.validateBounds();\n if (options.isMouse) {\n this.validateMouseBounds();\n }\n if (options.isTouch) {\n this.validateTouchBounds();\n }\n var hasHitAreas = options && (options.isMouse && this._mouseBounds || options.isTouch && this._touchBounds || options.isPen);\n if (hasHitAreas ? options.isMouse && !this._mouseBounds.containsPoint(point) || options.isTouch && !this._touchBounds.containsPoint(point) : !this._bounds.containsPoint(point)) {\n return null;\n }\n var result = null;\n var localPoint = this._transform.getInverse().multiplyVector2(Vector2.createFromPool(point.x, point.y));\n if (this._children.length > 0 && (hasHitAreas || this._childBounds.containsPoint(localPoint))) {\n for (var i = this._children.length - 1; i >= 0; i--) {\n var child = this._children[i];\n var childHit = child.trailUnderPoint(localPoint, options);\n if (childHit) {\n childHit.addAncestor(this, i);\n localPoint.freeToPool();\n return childHit;\n }\n }\n }\n if (hasHitAreas) {\n if (options.isMouse && this._mouseArea) {\n result = this._mouseArea.containsPoint(localPoint) ? new scenery.Trail(this) : null;\n localPoint.freeToPool();\n return result;\n }\n if ((options.isTouch || options.isPen) && this._touchArea) {\n result = this._touchArea.containsPoint(localPoint) ? new scenery.Trail(this) : null;\n localPoint.freeToPool();\n return result;\n }\n }\n if (hasHitAreas || this._selfBounds.containsPoint(localPoint)) {\n if (this.containsPointSelf(localPoint)) {\n localPoint.freeToPool();\n return new scenery.Trail(this);\n }\n }\n localPoint.freeToPool();\n return null;\n },\n containsPoint: function (point) {\n return this.trailUnderPoint(point) !== null;\n },\n containsPointSelf: function (point) {\n return this._selfBounds.containsPoint(point);\n },\n intersectsBoundsSelf: function (bounds) {\n return this._selfBounds.intersectsBounds(bounds);\n },\n isPainted: function () {\n return false;\n },\n hasParent: function () {\n return this._parents.length !== 0;\n },\n hasChildren: function () {\n return this._children.length > 0;\n },\n walkDepthFirst: function (callback) {\n callback(this);\n var length = this._children.length;\n for (var i = 0; i < length; i++) {\n this._children[i].walkDepthFirst(callback);\n }\n },\n getChildrenWithinBounds: function (bounds) {\n var result = [];\n var length = this._children.length;\n for (var i = 0; i < length; i++) {\n var child = this._children[i];\n if (!child._bounds.intersection(bounds).isEmpty()) {\n result.push(child);\n }\n }\n return result;\n },\n addInputListener: function (listener) {\n if (_.indexOf(this._inputListeners, listener) === -1) {\n this._inputListeners.push(listener);\n }\n return this;\n },\n removeInputListener: function (listener) {\n sceneryAssert && sceneryAssert(_.indexOf(this._inputListeners, listener) !== -1);\n this._inputListeners.splice(_.indexOf(this._inputListeners, listener), 1);\n return this;\n },\n getInputListeners: function () {\n return this._inputListeners.slice(0);\n },\n dispatchEvent: function (type, args) {\n sceneryEventLog && sceneryEventLog(this.constructor.name + '.dispatchEvent ' + type);\n var trail = new scenery.Trail();\n trail.setMutable();\n args.trail = trail;\n var branches = false;\n function recursiveEventDispatch(node) {\n trail.addAncestor(node);\n node.fireEvent(type, args);\n var parents = node._parents;\n var length = parents.length;\n branches = branches || length > 1;\n for (var i = 0; i < length; i++) {\n recursiveEventDispatch(parents[i]);\n }\n if (branches) {\n trail.removeAncestor();\n }\n }\n recursiveEventDispatch(this);\n },\n translate: function (x, y, prependInstead) {\n if (typeof x === 'number') {\n if (!x && !y) {\n return;\n }\n if (prependInstead) {\n this.prependTranslation(x, y);\n } else {\n this.appendMatrix(Matrix3.translation(x, y));\n }\n } else {\n var vector = x;\n if (!vector.x && !vector.y) {\n return;\n }\n this.translate(vector.x, vector.y, y);\n }\n },\n scale: function (x, y, prependInstead) {\n if (typeof x === 'number') {\n if (y === undefined) {\n if (x === 1) {\n return;\n }\n this.appendMatrix(Matrix3.scaling(x, x));\n } else {\n if (x === 1 && y === 1) {\n return;\n }\n if (prependInstead) {\n this.prependMatrix(Matrix3.scaling(x, y));\n } else {\n this.appendMatrix(Matrix3.scaling(x, y));\n }\n }\n } else {\n var vector = x;\n this.scale(vector.x, vector.y, y);\n }\n },\n rotate: function (angle, prependInstead) {\n if (angle % (2 * Math.PI) === 0) {\n return;\n }\n if (prependInstead) {\n this.prependMatrix(Matrix3.rotation2(angle));\n } else {\n this.appendMatrix(Matrix3.rotation2(angle));\n }\n },\n rotateAround: function (point, angle) {\n var matrix = Matrix3.translation(-point.x, -point.y);\n matrix = Matrix3.rotation2(angle).timesMatrix(matrix);\n matrix = Matrix3.translation(point.x, point.y).timesMatrix(matrix);\n this.prependMatrix(matrix);\n },\n getX: function () {\n return this._transform.getMatrix().m02();\n },\n setX: function (x) {\n sceneryAssert && sceneryAssert(typeof x === 'number');\n this.translate(x - this.getX(), 0, true);\n return this;\n },\n getY: function () {\n return this._transform.getMatrix().m12();\n },\n setY: function (y) {\n sceneryAssert && sceneryAssert(typeof y === 'number');\n this.translate(0, y - this.getY(), true);\n return this;\n },\n getScaleVector: function () {\n return this._transform.getMatrix().getScaleVector();\n },\n setScaleMagnitude: function (a, b) {\n var currentScale = this.getScaleVector();\n if (typeof a === 'number') {\n if (b === undefined) {\n b = a;\n }\n this.appendMatrix(Matrix3.scaling(a / currentScale.x, b / currentScale.y));\n } else {\n this.appendMatrix(Matrix3.scaling(a.x / currentScale.x, a.y / currentScale.y));\n }\n return this;\n },\n getRotation: function () {\n return this._transform.getMatrix().getRotation();\n },\n setRotation: function (rotation) {\n sceneryAssert && sceneryAssert(typeof rotation === 'number');\n this.appendMatrix(Matrix3.rotation2(rotation - this.getRotation()));\n return this;\n },\n setTranslation: function (a, b) {\n var m = this._transform.getMatrix();\n var tx = m.m02();\n var ty = m.m12();\n var dx, dy;\n if (typeof a === 'number') {\n dx = a - tx;\n dy = b - ty;\n } else {\n dx = a.x - tx;\n dy = a.y - ty;\n }\n this.translate(dx, dy, true);\n return this;\n },\n getTranslation: function () {\n var matrix = this._transform.getMatrix();\n return new Vector2(matrix.m02(), matrix.m12());\n },\n appendMatrix: function (matrix) {\n this._transform.append(matrix);\n },\n prependMatrix: function (matrix) {\n this._transform.prepend(matrix);\n },\n prependTranslation: function (x, y) {\n this._transform.prependTranslation(x, y);\n },\n setMatrix: function (matrix) {\n this._transform.set(matrix);\n },\n getMatrix: function () {\n return this._transform.getMatrix();\n },\n setTransform: function (transform) {\n sceneryAssert && sceneryAssert(transform.isFinite(), 'Transform should not have infinite/NaN values');\n if (this._transform !== transform) {\n this.beforeTransformChange();\n this._transform.removeTransformListener(this._transformListener);\n this._transform = transform;\n this._transform.prependTransformListener(this._transformListener);\n this.afterTransformChange();\n }\n },\n getTransform: function () {\n return this._transform;\n },\n resetTransform: function () {\n this.setMatrix(Matrix3.IDENTITY);\n },\n beforeTransformChange: function () {\n this.notifyBeforeSubtreeChange();\n },\n afterTransformChange: function () {\n this.notifyTransformChange();\n this.invalidateBounds();\n this.invalidateSubtreePaint();\n },\n getLeft: function () {\n return this.getBounds().minX;\n },\n setLeft: function (left) {\n sceneryAssert && sceneryAssert(typeof left === 'number');\n this.translate(left - this.getLeft(), 0, true);\n return this;\n },\n getRight: function () {\n return this.getBounds().maxX;\n },\n setRight: function (right) {\n sceneryAssert && sceneryAssert(typeof right === 'number');\n this.translate(right - this.getRight(), 0, true);\n return this;\n },\n getCenter: function () {\n return this.getBounds().getCenter();\n },\n setCenter: function (center) {\n sceneryAssert && sceneryAssert(center instanceof Vector2);\n this.translate(center.minus(this.getCenter()), true);\n return this;\n },\n getCenterX: function () {\n return this.getBounds().getCenterX();\n },\n setCenterX: function (x) {\n sceneryAssert && sceneryAssert(typeof x === 'number');\n this.translate(x - this.getCenterX(), 0, true);\n return this;\n },\n getCenterY: function () {\n return this.getBounds().getCenterY();\n },\n setCenterY: function (y) {\n sceneryAssert && sceneryAssert(typeof y === 'number');\n this.translate(0, y - this.getCenterY(), true);\n return this;\n },\n getTop: function () {\n return this.getBounds().minY;\n },\n setTop: function (top) {\n sceneryAssert && sceneryAssert(typeof top === 'number');\n this.translate(0, top - this.getTop(), true);\n return this;\n },\n getBottom: function () {\n return this.getBounds().maxY;\n },\n setBottom: function (bottom) {\n sceneryAssert && sceneryAssert(typeof bottom === 'number');\n this.translate(0, bottom - this.getBottom(), true);\n return this;\n },\n getWidth: function () {\n return this.getBounds().getWidth();\n },\n getHeight: function () {\n return this.getBounds().getHeight();\n },\n getId: function () {\n return this._id;\n },\n isVisible: function () {\n return this._visible;\n },\n setVisible: function (visible) {\n sceneryAssert && sceneryAssert(typeof visible === 'boolean');\n if (visible !== this._visible) {\n if (this._visible) {\n this.notifyBeforeSubtreeChange();\n }\n this._visible = visible;\n this.notifyVisibilityChange();\n }\n return this;\n },\n getOpacity: function () {\n return this._opacity;\n },\n setOpacity: function (opacity) {\n sceneryAssert && sceneryAssert(typeof opacity === 'number');\n var clampedOpacity = clamp(opacity, 0, 1);\n if (clampedOpacity !== this._opacity) {\n this.notifyBeforeSubtreeChange();\n this._opacity = clampedOpacity;\n this.notifyOpacityChange();\n }\n },\n isPickable: function () {\n return this._pickable;\n },\n setPickable: function (pickable) {\n sceneryAssert && sceneryAssert(typeof pickable === 'boolean');\n if (this._pickable !== pickable) {\n this._pickable = pickable;\n }\n },\n setCursor: function (cursor) {\n sceneryAssert && sceneryAssert(typeof cursor === 'string' || cursor === null);\n this._cursor = cursor === 'auto' ? null : cursor;\n },\n getCursor: function () {\n return this._cursor;\n },\n setMouseArea: function (shape) {\n sceneryAssert && sceneryAssert(shape === null || shape instanceof Shape, 'mouseArea needs to be a kite.Shape, or null');\n if (this._mouseArea !== shape) {\n this._mouseArea = shape;\n this.invalidateBounds();\n }\n },\n getMouseArea: function () {\n return this._mouseArea;\n },\n setTouchArea: function (shape) {\n sceneryAssert && sceneryAssert(shape === null || shape instanceof Shape, 'touchArea needs to be a kite.Shape, or null');\n if (this._touchArea !== shape) {\n this._touchArea = shape;\n this.invalidateBounds();\n }\n },\n getTouchArea: function () {\n return this._touchArea;\n },\n updateLayerType: function () {\n if (this._renderer && this._rendererOptions) {\n if (this._rendererOptions.cssTransform || this._rendererOptions.cssTranslation || this._rendererOptions.cssRotation || this._rendererOptions.cssScale) {\n this._rendererOptions.baseNode = this;\n } else if (this._rendererOptions.hasOwnProperty('baseNode')) {\n delete this._rendererOptions.baseNode;\n }\n this._rendererLayerType = this._renderer.createLayerType(this._rendererOptions);\n } else {\n this._rendererLayerType = null;\n }\n },\n getRendererLayerType: function () {\n return this._rendererLayerType;\n },\n hasRendererLayerType: function () {\n return !!this._rendererLayerType;\n },\n setRenderer: function (renderer) {\n var newRenderer;\n if (typeof renderer === 'string') {\n sceneryAssert && sceneryAssert(scenery.Renderer[renderer], 'unknown renderer in setRenderer: ' + renderer);\n newRenderer = scenery.Renderer[renderer];\n } else if (renderer instanceof scenery.Renderer) {\n newRenderer = renderer;\n } else if (!renderer) {\n newRenderer = null;\n } else {\n throw new Error('unrecognized type of renderer: ' + renderer);\n }\n if (newRenderer !== this._renderer) {\n sceneryAssert && sceneryAssert(!this.isPainted() || !newRenderer || _.contains(this._supportedRenderers, newRenderer), 'renderer ' + newRenderer + ' not supported by ' + this.constructor.name);\n this._renderer = newRenderer;\n this.updateLayerType();\n this.markLayerRefreshNeeded();\n }\n },\n getRenderer: function () {\n return this._renderer;\n },\n hasRenderer: function () {\n return !!this._renderer;\n },\n setRendererOptions: function (options) {\n this._rendererOptions = options;\n this.updateLayerType();\n this.markLayerRefreshNeeded();\n },\n getRendererOptions: function () {\n return this._rendererOptions;\n },\n hasRendererOptions: function () {\n return !!this._rendererOptions;\n },\n setLayerSplitBefore: function (split) {\n sceneryAssert && sceneryAssert(typeof split === 'boolean');\n if (this._layerSplitBefore !== split) {\n this._layerSplitBefore = split;\n this.markLayerRefreshNeeded();\n }\n },\n isLayerSplitBefore: function () {\n return this._layerSplitBefore;\n },\n setLayerSplitAfter: function (split) {\n sceneryAssert && sceneryAssert(typeof split === 'boolean');\n if (this._layerSplitAfter !== split) {\n this._layerSplitAfter = split;\n this.markLayerRefreshNeeded();\n }\n },\n isLayerSplitAfter: function () {\n return this._layerSplitAfter;\n },\n setLayerSplit: function (split) {\n sceneryAssert && sceneryAssert(typeof split === 'boolean');\n if (split !== this._layerSplitBefore || split !== this._layerSplitAfter) {\n this._layerSplitBefore = split;\n this._layerSplitAfter = split;\n this.markLayerRefreshNeeded();\n }\n },\n getUniqueTrail: function () {\n var trail = new scenery.Trail();\n var node = this;\n while (node) {\n trail.addAncestor(node);\n sceneryAssert && sceneryAssert(node._parents.length <= 1);\n node = node._parents[0];\n }\n return trail;\n },\n getConnectedNodes: function () {\n var result = [];\n var fresh = this._children.concat(this._parents).concat(this);\n while (fresh.length) {\n var node = fresh.pop();\n if (!_.contains(result, node)) {\n result.push(node);\n fresh = fresh.concat(node._children, node._parents);\n }\n }\n return result;\n },\n getTopologicallySortedNodes: function () {\n var edges = {};\n var s = [];\n var l = [];\n var n;\n _.each(this.getConnectedNodes(), function (node) {\n edges[node.id] = {};\n _.each(node.children, function (m) {\n edges[node.id][m.id] = true;\n });\n if (!node.parents.length) {\n s.push(node);\n }\n });\n function handleChild(m) {\n delete edges[n.id][m.id];\n if (_.every(edges, function (children) {\n return !children[m.id];\n })) {\n s.push(m);\n }\n }\n while (s.length) {\n n = s.pop();\n l.push(n);\n _.each(n.children, handleChild);\n }\n sceneryAssert && sceneryAssert(_.every(edges, function (children) {\n return _.every(children, function (final) {\n return false;\n });\n }), 'circular reference check');\n return l;\n },\n canAddChild: function (child) {\n if (this === child || _.contains(this.children, child)) {\n return false;\n }\n var edges = {};\n var s = [];\n var l = [];\n var n;\n _.each(this.getConnectedNodes().concat(child.getConnectedNodes()), function (node) {\n edges[node.id] = {};\n _.each(node.children, function (m) {\n edges[node.id][m.id] = true;\n });\n if (!node.parents.length && node !== child) {\n s.push(node);\n }\n });\n edges[this.id][child.id] = true;\n function handleChild(m) {\n delete edges[n.id][m.id];\n if (_.every(edges, function (children) {\n return !children[m.id];\n })) {\n s.push(m);\n }\n }\n while (s.length) {\n n = s.pop();\n l.push(n);\n _.each(n.children, handleChild);\n if (n === this) {\n handleChild(child);\n }\n }\n return _.every(edges, function (children) {\n return _.every(children, function (final) {\n return false;\n });\n });\n },\n debugText: function () {\n var startPointer = new scenery.TrailPointer(new scenery.Trail(this), true);\n var endPointer = new scenery.TrailPointer(new scenery.Trail(this), false);\n var depth = 0;\n startPointer.depthFirstUntil(endPointer, function (pointer) {\n if (pointer.isBefore) {\n var padding = new Array(depth * 2).join(' ');\n console.log(padding + pointer.trail.lastNode().getId() + ' ' + pointer.trail.toString());\n }\n depth += pointer.isBefore ? 1 : -1;\n }, false);\n },\n toCanvas: function (callback, x, y, width, height) {\n var self = this;\n var padding = 2;\n var bounds = this.getBounds();\n x = x !== undefined ? x : Math.ceil(padding - bounds.minX);\n y = y !== undefined ? y : Math.ceil(padding - bounds.minY);\n width = width !== undefined ? width : Math.ceil(x + bounds.getWidth() + padding);\n height = height !== undefined ? height : Math.ceil(y + bounds.getHeight() + padding);\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n var context = canvas.getContext('2d');\n var $div = $(document.createElement('div'));\n $div.width(width).height(height);\n var scene = new scenery.Scene($div);\n scene.addChild(self);\n scene.x = x;\n scene.y = y;\n scene.updateScene();\n scene.renderToCanvas(canvas, context, function () {\n callback(canvas, x, y);\n scene.removeChild(self);\n });\n },\n toDataURL: function (callback, x, y, width, height) {\n this.toCanvas(function (canvas, x, y) {\n callback(canvas.toDataURL(), x, y);\n }, x, y, width, height);\n },\n toImage: function (callback, x, y, width, height) {\n this.toDataURL(function (url, x, y) {\n var img = document.createElement('img');\n img.onload = function () {\n callback(img, x, y);\n try {\n delete img.onload;\n } catch (e) {\n }\n };\n img.src = url;\n }, x, y, width, height);\n },\n toImageNodeAsynchronous: function (callback, x, y, width, height) {\n this.toImage(function (image, x, y) {\n callback(new scenery.Node({\n children: [new scenery.Image(image, {\n x: -x,\n y: -y\n })]\n }));\n }, x, y, width, height);\n },\n toCanvasNodeSynchronous: function (x, y, width, height) {\n var result;\n this.toCanvas(function (canvas, x, y) {\n result = new scenery.Node({\n children: [new scenery.Image(canvas, {\n x: -x,\n y: -y\n })]\n });\n }, x, y, width, height);\n sceneryAssert && sceneryAssert(result, 'toCanvasNodeSynchronous requires that the node can be rendered only using Canvas');\n return result;\n },\n toDataURLNodeSynchronous: function (x, y, width, height) {\n var result;\n this.toDataURL(function (dataURL, x, y) {\n result = new scenery.Node({\n children: [new scenery.Image(dataURL, {\n x: -x,\n y: -y\n })]\n });\n }, x, y, width, height);\n sceneryAssert && sceneryAssert(result, 'toDataURLNodeSynchronous requires that the node can be rendered only using Canvas');\n return result;\n },\n getInstances: function () {\n return this._instances;\n },\n addInstance: function (instance) {\n sceneryAssert && sceneryAssert(instance.getNode() === this, 'Must be an instance of this Node');\n sceneryAssert && sceneryAssert(!_.find(this._instances, function (other) {\n return instance.equals(other);\n }), 'Cannot add duplicates of an instance to a Node');\n this._instances.push(instance);\n if (this._instances.length === 1) {\n this.firstInstanceAdded();\n }\n },\n firstInstanceAdded: function () {\n },\n getInstanceFromTrail: function (trail) {\n var result;\n var len = this._instances.length;\n if (len === 1) {\n result = this._instances[0];\n } else {\n var i = len;\n while (i--) {\n if (this._instances[i].trail.equals(trail)) {\n result = this._instances[i];\n break;\n }\n }\n }\n sceneryAssert && sceneryAssert(result, 'Could not find an instance for the trail ' + trail.toString());\n sceneryAssert && sceneryAssert(result.trail.equals(trail), 'Instance has an incorrect Trail');\n return result;\n },\n removeInstance: function (instance) {\n var index = _.indexOf(this._instances, instance);\n sceneryAssert && sceneryAssert(index !== -1, 'Cannot remove an Instance from a Node if it was not there');\n this._instances.splice(index, 1);\n if (this._instances.length === 0) {\n this.lastInstanceRemoved();\n }\n },\n lastInstanceRemoved: function () {\n },\n notifyVisibilityChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyVisibilityChange();\n }\n },\n notifyOpacityChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyOpacityChange();\n }\n },\n notifyBeforeSelfChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyBeforeSelfChange();\n }\n },\n notifyBeforeSubtreeChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyBeforeSubtreeChange();\n }\n },\n notifyDirtySelfPaint: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyDirtySelfPaint();\n }\n },\n notifyDirtySubtreePaint: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyDirtySubtreePaint();\n }\n },\n notifyTransformChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyTransformChange();\n }\n },\n notifyBoundsAccuracyChange: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyBoundsAccuracyChange();\n }\n },\n notifyStitch: function (match) {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].notifyStitch(match);\n }\n },\n markForLayerRefresh: function () {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].markForLayerRefresh();\n }\n },\n markForInsertion: function (child, index) {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].markForInsertion(child, index);\n }\n },\n markForRemoval: function (child, index) {\n var i = this._instances.length;\n while (i--) {\n this._instances[i].markForRemoval(child, index);\n }\n },\n localToParentPoint: function (point) {\n return this._transform.transformPosition2(point);\n },\n localToParentBounds: function (bounds) {\n return this._transform.transformBounds2(bounds);\n },\n parentToLocalPoint: function (point) {\n return this._transform.inversePosition2(point);\n },\n parentToLocalBounds: function (bounds) {\n return this._transform.inverseBounds2(bounds);\n },\n transformBoundsFromLocalToParent: function (bounds) {\n return bounds.transform(this._transform.getMatrix());\n },\n transformBoundsFromParentToLocal: function (bounds) {\n return bounds.transform(this._transform.getInverse());\n },\n getLocalToGlobalMatrix: function () {\n var node = this;\n var matrices = [];\n while (node) {\n matrices.push(node._transform.getMatrix());\n sceneryAssert && sceneryAssert(node._parents[1] === undefined, 'getLocalToGlobalMatrix unable to work for DAG');\n node = node._parents[0];\n }\n var matrix = new Matrix3();\n for (var i = matrices.length - 1; i >= 0; i--) {\n matrix.multiplyMatrix(matrices[i]);\n }\n return matrix;\n },\n getUniqueTransform: function () {\n return new Transform3(this.getLocalToGlobalMatrix());\n },\n getGlobalToLocalMatrix: function () {\n return this.getLocalToGlobalMatrix().invert();\n },\n localToGlobalPoint: function (point) {\n var node = this;\n var resultPoint = point.copy();\n while (node) {\n node._transform.getMatrix().multiplyVector2(resultPoint);\n sceneryAssert && sceneryAssert(node._parents[1] === undefined, 'localToGlobalPoint unable to work for DAG');\n node = node._parents[0];\n }\n return resultPoint;\n },\n globalToLocalPoint: function (point) {\n var node = this;\n var transforms = [];\n while (node) {\n transforms.push(node._transform);\n sceneryAssert && sceneryAssert(node._parents[1] === undefined, 'globalToLocalPoint unable to work for DAG');\n node = node._parents[0];\n }\n var resultPoint = point.copy();\n for (var i = transforms.length - 1; i >= 0; i--) {\n transforms[i].getInverse().multiplyVector2(resultPoint);\n }\n return resultPoint;\n },\n localToGlobalBounds: function (bounds) {\n return bounds.transformed(this.getLocalToGlobalMatrix());\n },\n globalToLocalBounds: function (bounds) {\n return bounds.transformed(this.getGlobalToLocalMatrix());\n },\n parentToGlobalPoint: function (point) {\n sceneryAssert && sceneryAssert(this.parents.length <= 1, 'parentToGlobalPoint unable to work for DAG');\n return this.parents.length ? this.parents[0].localToGlobalPoint(point) : point;\n },\n parentToGlobalBounds: function (bounds) {\n sceneryAssert && sceneryAssert(this.parents.length <= 1, 'parentToGlobalBounds unable to work for DAG');\n return this.parents.length ? this.parents[0].localToGlobalBounds(bounds) : bounds;\n },\n globalToParentPoint: function (point) {\n sceneryAssert && sceneryAssert(this.parents.length <= 1, 'globalToParentPoint unable to work for DAG');\n return this.parents.length ? this.parents[0].globalToLocalPoint(point) : point;\n },\n globalToParentBounds: function (bounds) {\n sceneryAssert && sceneryAssert(this.parents.length <= 1, 'globalToParentBounds unable to work for DAG');\n return this.parents.length ? this.parents[0].globalToLocalBounds(bounds) : bounds;\n },\n getGlobalBounds: function () {\n sceneryAssert && sceneryAssert(this.parents.length <= 1, 'globalBounds unable to work for DAG');\n return this.parentToGlobalBounds(this.getBounds());\n },\n boundsOf: function (node) {\n return this.globalToLocalBounds(node.getGlobalBounds());\n },\n boundsTo: function (node) {\n return node.globalToLocalBounds(this.getGlobalBounds());\n },\n set layerSplit(value) {\n this.setLayerSplit(value);\n },\n get layerSplit() {\n throw new Error('You can\\'t get a layerSplit property, since it modifies two separate properties');\n },\n set layerSplitBefore(value) {\n this.setLayerSplitBefore(value);\n },\n get layerSplitBefore() {\n return this.isLayerSplitBefore();\n },\n set layerSplitAfter(value) {\n this.setLayerSplitAfter(value);\n },\n get layerSplitAfter() {\n return this.isLayerSplitAfter();\n },\n set renderer(value) {\n this.setRenderer(value);\n },\n get renderer() {\n return this.getRenderer();\n },\n set rendererOptions(value) {\n this.setRendererOptions(value);\n },\n get rendererOptions() {\n return this.getRendererOptions();\n },\n set cursor(value) {\n this.setCursor(value);\n },\n get cursor() {\n return this.getCursor();\n },\n set mouseArea(value) {\n this.setMouseArea(value);\n },\n get mouseArea() {\n return this.getMouseArea();\n },\n set touchArea(value) {\n this.setTouchArea(value);\n },\n get touchArea() {\n return this.getTouchArea();\n },\n set visible(value) {\n this.setVisible(value);\n },\n get visible() {\n return this.isVisible();\n },\n set opacity(value) {\n this.setOpacity(value);\n },\n get opacity() {\n return this.getOpacity();\n },\n set pickable(value) {\n this.setPickable(value);\n },\n get pickable() {\n return this.isPickable();\n },\n set transform(value) {\n this.setTransform(value);\n },\n get transform() {\n return this.getTransform();\n },\n set matrix(value) {\n this.setMatrix(value);\n },\n get matrix() {\n return this.getMatrix();\n },\n set translation(value) {\n this.setTranslation(value);\n },\n get translation() {\n return this.getTranslation();\n },\n set rotation(value) {\n this.setRotation(value);\n },\n get rotation() {\n return this.getRotation();\n },\n set x(value) {\n this.setX(value);\n },\n get x() {\n return this.getX();\n },\n set y(value) {\n this.setY(value);\n },\n get y() {\n return this.getY();\n },\n set left(value) {\n this.setLeft(value);\n },\n get left() {\n return this.getLeft();\n },\n set right(value) {\n this.setRight(value);\n },\n get right() {\n return this.getRight();\n },\n set top(value) {\n this.setTop(value);\n },\n get top() {\n return this.getTop();\n },\n set bottom(value) {\n this.setBottom(value);\n },\n get bottom() {\n return this.getBottom();\n },\n set center(value) {\n this.setCenter(value);\n },\n get center() {\n return this.getCenter();\n },\n set centerX(value) {\n this.setCenterX(value);\n },\n get centerX() {\n return this.getCenterX();\n },\n set centerY(value) {\n this.setCenterY(value);\n },\n get centerY() {\n return this.getCenterY();\n },\n set children(value) {\n this.setChildren(value);\n },\n get children() {\n return this.getChildren();\n },\n get parents() {\n return this.getParents();\n },\n get width() {\n return this.getWidth();\n },\n get height() {\n return this.getHeight();\n },\n get bounds() {\n return this.getBounds();\n },\n get selfBounds() {\n return this.getSelfBounds();\n },\n get childBounds() {\n return this.getChildBounds();\n },\n get globalBounds() {\n return this.getGlobalBounds();\n },\n get visibleBounds() {\n return this.getVisibleBounds();\n },\n get id() {\n return this.getId();\n },\n get instances() {\n return this.getInstances();\n },\n mutate: function (options) {\n if (!options) {\n return this;\n }\n var node = this;\n _.each(this._mutatorKeys, function (key) {\n if (options[key] !== undefined) {\n var descriptor = Object.getOwnPropertyDescriptor(Node.prototype, key);\n if (descriptor && typeof descriptor.value === 'function') {\n node[key](options[key]);\n } else {\n node[key] = options[key];\n }\n }\n });\n return this;\n },\n toString: function (spaces, includeChildren) {\n spaces = spaces || '';\n var props = this.getPropString(spaces + ' ', includeChildren === undefined ? true : includeChildren);\n return spaces + this.getBasicConstructor(props ? '\\n' + props + '\\n' + spaces : '');\n },\n getBasicConstructor: function (propLines) {\n return 'new scenery.Node( {' + propLines + '} )';\n },\n getPropString: function (spaces, includeChildren) {\n var self = this;\n var result = '';\n function addProp(key, value, nowrap) {\n if (result) {\n result += ',\\n';\n }\n if (!nowrap && typeof value === 'string') {\n result += spaces + key + ': \\'' + value + '\\'';\n } else {\n result += spaces + key + ': ' + value;\n }\n }\n if (this._children.length && includeChildren) {\n var childString = '';\n _.each(this._children, function (child) {\n if (childString) {\n childString += ',\\n';\n }\n childString += child.toString(spaces + ' ');\n });\n addProp('children', '[\\n' + childString + '\\n' + spaces + ']', true);\n }\n if (this.cursor) {\n addProp('cursor', this.cursor);\n }\n if (!this.visible) {\n addProp('visible', this.visible);\n }\n if (!this.pickable) {\n addProp('pickable', this.pickable);\n }\n if (this.opacity !== 1) {\n addProp('opacity', this.opacity);\n }\n if (!this.transform.isIdentity()) {\n var m = this.transform.getMatrix();\n addProp('matrix', 'new dot.Matrix3( ' + m.m00() + ', ' + m.m01() + ', ' + m.m02() + ', ' + m.m10() + ', ' + m.m11() + ', ' + m.m12() + ', ' + m.m20() + ', ' + m.m21() + ', ' + m.m22() + ' )', true);\n }\n if (this.renderer) {\n addProp('renderer', this.renderer.name);\n if (this.rendererOptions) {\n }\n }\n if (this._layerSplitBefore) {\n addProp('layerSplitBefore', true);\n }\n if (this._layerSplitAfter) {\n addProp('layerSplitAfter', true);\n }\n return result;\n }\n };\n Node.prototype._mutatorKeys = [\n 'children',\n 'cursor',\n 'visible',\n 'pickable',\n 'opacity',\n 'matrix',\n 'translation',\n 'x',\n 'y',\n 'rotation',\n 'scale',\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'center',\n 'centerX',\n 'centerY',\n 'renderer',\n 'rendererOptions',\n 'layerSplit',\n 'layerSplitBefore',\n 'layerSplitAfter',\n 'mouseArea',\n 'touchArea'\n ];\n Node.prototype._supportedRenderers = [];\n Node.prototype.layerStrategy = LayerStrategy;\n NodeEvents(Node);\n return Node;\n});",
"\ndefine('SCENERY/layers/LayerType',['require','SCENERY/scenery'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n scenery.LayerType = function LayerType(Constructor, name, renderer, args) {\n this.Constructor = Constructor;\n this.name = name;\n this.renderer = renderer;\n this.args = args;\n };\n var LayerType = scenery.LayerType;\n LayerType.prototype = {\n constructor: LayerType,\n supportsRenderer: function (renderer) {\n return this.renderer === renderer;\n },\n supportsNode: function (node) {\n var supportedRenderers = node._supportedRenderers;\n var i = supportedRenderers.length;\n while (i--) {\n if (this.supportsRenderer(supportedRenderers[i])) {\n return true;\n }\n }\n return false;\n },\n createLayer: function (args) {\n var Constructor = this.Constructor;\n return new Constructor(_.extend({}, args, this.args));\n }\n };\n return LayerType;\n});",
"\ndefine('SCENERY/util/Trail',['require','DOT/Matrix3','DOT/Transform3','SCENERY/scenery','SCENERY/nodes/Node'],function (require) {\n 'use strict';\n var Matrix3 = require('DOT/Matrix3');\n var Transform3 = require('DOT/Transform3');\n var scenery = require('SCENERY/scenery');\n require('SCENERY/nodes/Node');\n scenery.Trail = function Trail(nodes) {\n if (sceneryAssert) {\n this.immutable = undefined;\n }\n if (nodes instanceof Trail) {\n var otherTrail = nodes;\n this.nodes = otherTrail.nodes.slice(0);\n this.length = otherTrail.length;\n this.uniqueId = otherTrail.uniqueId;\n this.indices = otherTrail.indices.slice(0);\n return;\n }\n this.nodes = [];\n this.length = 0;\n this.uniqueId = '';\n this.indices = [];\n var trail = this;\n if (nodes) {\n if (nodes instanceof scenery.Node) {\n var node = nodes;\n trail.addDescendant(node);\n } else {\n var len = nodes.length;\n for (var i = 0; i < len; i++) {\n trail.addDescendant(nodes[i]);\n }\n }\n }\n phetAllocation && phetAllocation('Trail');\n };\n var Trail = scenery.Trail;\n Trail.prototype = {\n constructor: Trail,\n copy: function () {\n return new Trail(this);\n },\n isPainted: function () {\n return this.lastNode().isPainted();\n },\n isVisible: function () {\n var i = this.nodes.length;\n while (i--) {\n if (!this.nodes[i].isVisible()) {\n return false;\n }\n }\n return true;\n },\n getOpacity: function () {\n var opacity = 1;\n var i = this.nodes.length;\n while (i--) {\n opacity *= this.nodes[i].getOpacity();\n }\n return opacity;\n },\n get: function (index) {\n if (index >= 0) {\n return this.nodes[index];\n } else {\n return this.nodes[this.nodes.length + index];\n }\n },\n slice: function (startIndex, endIndex) {\n return new Trail(this.nodes.slice(startIndex, endIndex));\n },\n subtrailTo: function (node, excludeNode) {\n return this.slice(0, _.indexOf(this.nodes, node) + (excludeNode ? 0 : 1));\n },\n isEmpty: function () {\n return this.nodes.length === 0;\n },\n getInstance: function () {\n return this.lastNode().getInstanceFromTrail(this);\n },\n getMatrix: function () {\n var matrix = new Matrix3();\n var nodes = this.nodes;\n var length = nodes.length;\n for (var i = 0; i < length; i++) {\n matrix.multiplyMatrix(nodes[i]._transform.getMatrix());\n }\n return matrix;\n },\n getParentMatrix: function () {\n var matrix = new Matrix3();\n var nodes = this.nodes;\n var length = nodes.length;\n for (var i = 0; i < length - 1; i++) {\n matrix.multiplyMatrix(nodes[i]._transform.getMatrix());\n }\n return matrix;\n },\n getTransform: function () {\n return new Transform3(this.getMatrix());\n },\n getParentTransform: function () {\n return new Transform3(this.getParentMatrix());\n },\n addAncestor: function (node, index) {\n sceneryAssert && sceneryAssert(!this.immutable, 'cannot modify an immutable Trail with addAncestor');\n sceneryAssert && sceneryAssert(node, 'cannot add falsy value to a Trail');\n if (this.nodes.length) {\n var oldRoot = this.nodes[0];\n this.indices.unshift(index === undefined ? _.indexOf(node._children, oldRoot) : index);\n }\n this.nodes.unshift(node);\n this.length++;\n this.uniqueId = this.uniqueId ? node._id + '-' + this.uniqueId : node._id + '';\n return this;\n },\n removeAncestor: function () {\n sceneryAssert && sceneryAssert(!this.immutable, 'cannot modify an immutable Trail with removeAncestor');\n sceneryAssert && sceneryAssert(this.length > 0, 'cannot remove a Node from an empty trail');\n this.nodes.shift();\n if (this.indices.length) {\n this.indices.shift();\n }\n this.length--;\n this.updateUniqueId();\n return this;\n },\n addDescendant: function (node, index) {\n sceneryAssert && sceneryAssert(!this.immutable, 'cannot modify an immutable Trail with addDescendant');\n sceneryAssert && sceneryAssert(node, 'cannot add falsy value to a Trail');\n if (this.nodes.length) {\n var parent = this.lastNode();\n this.indices.push(index === undefined ? _.indexOf(parent._children, node) : index);\n }\n this.nodes.push(node);\n this.length++;\n this.uniqueId = this.uniqueId ? this.uniqueId + '-' + node._id : node._id + '';\n return this;\n },\n removeDescendant: function () {\n sceneryAssert && sceneryAssert(!this.immutable, 'cannot modify an immutable Trail with removeDescendant');\n sceneryAssert && sceneryAssert(this.length > 0, 'cannot remove a Node from an empty trail');\n this.nodes.pop();\n if (this.indices.length) {\n this.indices.pop();\n }\n this.length--;\n this.updateUniqueId();\n return this;\n },\n reindex: function () {\n var length = this.length;\n for (var i = 1; i < length; i++) {\n var currentIndex = this.indices[i - 1];\n var baseNode = this.nodes[i - 1];\n if (baseNode._children[currentIndex] !== this.nodes[i]) {\n this.indices[i - 1] = _.indexOf(baseNode._children, this.nodes[i]);\n }\n }\n },\n setImmutable: function () {\n if (sceneryAssert) {\n sceneryAssert(this.immutable !== false, 'A trail cannot be made immutable after being flagged as mutable');\n this.immutable = true;\n }\n return this;\n },\n setMutable: function () {\n if (sceneryAssert) {\n sceneryAssert(this.immutable !== true, 'A trail cannot be made mutable after being flagged as immutable');\n this.immutable = false;\n }\n return this;\n },\n areIndicesValid: function () {\n for (var i = 1; i < this.length; i++) {\n var currentIndex = this.indices[i - 1];\n if (this.nodes[i - 1]._children[currentIndex] !== this.nodes[i]) {\n return false;\n }\n }\n return true;\n },\n equals: function (other) {\n if (this.length !== other.length) {\n return false;\n }\n for (var i = 0; i < this.nodes.length; i++) {\n if (this.nodes[i] !== other.nodes[i]) {\n return false;\n }\n }\n return true;\n },\n upToNode: function (node) {\n var nodeIndex = _.indexOf(this.nodes, node);\n sceneryAssert && sceneryAssert(nodeIndex >= 0, 'Trail does not contain the node');\n return this.slice(0, _.indexOf(this.nodes, node) + 1);\n },\n isExtensionOf: function (other, allowSameTrail) {\n sceneryAssertExtra && sceneryAssertExtra(this.areIndicesValid(), 'Trail.compare this.areIndicesValid() failed');\n sceneryAssertExtra && sceneryAssertExtra(other.areIndicesValid(), 'Trail.compare other.areIndicesValid() failed');\n if (this.length <= other.length - (allowSameTrail ? 1 : 0)) {\n return false;\n }\n for (var i = 0; i < other.nodes.length; i++) {\n if (this.nodes[i] !== other.nodes[i]) {\n return false;\n }\n }\n return true;\n },\n getTransformTo: function (otherTrail) {\n return new Transform3(this.getMatrixTo(otherTrail));\n },\n getMatrixTo: function (otherTrail) {\n this.reindex();\n otherTrail.reindex();\n var branchIndex = this.getBranchIndexTo(otherTrail);\n var idx;\n var matrix = Matrix3.IDENTITY;\n for (idx = this.length - 1; idx >= branchIndex; idx--) {\n matrix = this.nodes[idx].getTransform().getMatrix().timesMatrix(matrix);\n }\n for (idx = branchIndex; idx < otherTrail.length; idx++) {\n matrix = otherTrail.nodes[idx].getTransform().getInverse().timesMatrix(matrix);\n }\n return matrix;\n },\n getBranchIndexTo: function (otherTrail) {\n sceneryAssert && sceneryAssert(this.nodes[0] === otherTrail.nodes[0], 'To get a branch index, the trails must have the same root');\n var branchIndex;\n for (branchIndex = 0; branchIndex < Math.min(this.length, otherTrail.length); branchIndex++) {\n if (this.nodes[branchIndex] !== otherTrail.nodes[branchIndex]) {\n break;\n }\n }\n return branchIndex;\n },\n nodeFromTop: function (offset) {\n return this.nodes[this.length - 1 - offset];\n },\n lastNode: function () {\n return this.nodeFromTop(0);\n },\n rootNode: function () {\n return this.nodes[0];\n },\n previous: function () {\n if (this.nodes.length <= 1) {\n return null;\n }\n var top = this.nodeFromTop(0);\n var parent = this.nodeFromTop(1);\n var parentIndex = _.indexOf(parent._children, top);\n sceneryAssert && sceneryAssert(parentIndex !== -1);\n var arr = this.nodes.slice(0, this.nodes.length - 1);\n if (parentIndex === 0) {\n return new Trail(arr);\n } else {\n arr.push(parent._children[parentIndex - 1]);\n while (arr[arr.length - 1]._children.length !== 0) {\n var last = arr[arr.length - 1];\n arr.push(last._children[last._children.length - 1]);\n }\n return new Trail(arr);\n }\n },\n previousPainted: function () {\n var result = this.previous();\n while (result && !result.isPainted()) {\n result = result.previous();\n }\n return result;\n },\n next: function () {\n var arr = this.nodes.slice(0);\n var top = this.nodeFromTop(0);\n if (top._children.length > 0) {\n arr.push(top._children[0]);\n return new Trail(arr);\n } else {\n var depth = this.nodes.length - 1;\n while (depth > 0) {\n var node = this.nodes[depth];\n var parent = this.nodes[depth - 1];\n arr.pop();\n var index = _.indexOf(parent._children, node);\n if (index !== parent._children.length - 1) {\n arr.push(parent._children[index + 1]);\n return new Trail(arr);\n } else {\n depth--;\n }\n }\n return null;\n }\n },\n nextPainted: function () {\n var result = this.next();\n while (result && !result.isPainted()) {\n result = result.next();\n }\n return result;\n },\n eachTrailUnder: function (callback) {\n new scenery.TrailPointer(this, true).eachTrailBetween(new scenery.TrailPointer(this, false), callback);\n },\n compare: function (other) {\n sceneryAssert && sceneryAssert(!this.isEmpty(), 'cannot compare with an empty trail');\n sceneryAssert && sceneryAssert(!other.isEmpty(), 'cannot compare with an empty trail');\n sceneryAssert && sceneryAssert(this.nodes[0] === other.nodes[0], 'for Trail comparison, trails must have the same root node');\n sceneryAssertExtra && sceneryAssertExtra(this.areIndicesValid(), 'Trail.compare this.areIndicesValid() failed on ' + this.toString());\n sceneryAssertExtra && sceneryAssertExtra(other.areIndicesValid(), 'Trail.compare other.areIndicesValid() failed on ' + other.toString());\n var minNodeIndex = Math.min(this.indices.length, other.indices.length);\n for (var i = 0; i < minNodeIndex; i++) {\n if (this.indices[i] !== other.indices[i]) {\n if (this.indices[i] < other.indices[i]) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n if (this.nodes.length < other.nodes.length) {\n return -1;\n } else if (this.nodes.length > other.nodes.length) {\n return 1;\n } else {\n return 0;\n }\n },\n isBefore: function (other) {\n return this.compare(other) === -1;\n },\n isAfter: function (other) {\n return this.compare(other) === 1;\n },\n localToGlobalPoint: function (point) {\n return this.getMatrix().timesVector2(point);\n },\n localToGlobalBounds: function (bounds) {\n return bounds.transformed(this.getMatrix());\n },\n globalToLocalPoint: function (point) {\n return this.getTransform().inversePosition2(point);\n },\n globalToLocalBounds: function (bounds) {\n return this.getTransform().inverseBounds2(bounds);\n },\n parentToGlobalPoint: function (point) {\n return this.getParentMatrix().timesVector2(point);\n },\n parentToGlobalBounds: function (bounds) {\n return bounds.transformed(this.getParentMatrix());\n },\n globalToParentPoint: function (point) {\n return this.getParentTransform().inversePosition2(point);\n },\n globalToParentBounds: function (bounds) {\n return this.getParentTransform().inverseBounds2(bounds);\n },\n updateUniqueId: function () {\n var result = '';\n var len = this.nodes.length;\n if (len > 0) {\n result += this.nodes[0]._id;\n }\n for (var i = 1; i < len; i++) {\n result += '-' + this.nodes[i]._id;\n }\n this.uniqueId = result;\n },\n getUniqueId: function () {\n if (sceneryAssert) {\n var oldUniqueId = this.uniqueId;\n this.updateUniqueId();\n sceneryAssert(oldUniqueId === this.uniqueId);\n }\n return this.uniqueId;\n },\n toString: function () {\n this.reindex();\n if (!this.length) {\n return 'Empty Trail';\n }\n return '[Trail ' + this.indices.join('.') + ' ' + this.getUniqueId() + ']';\n }\n };\n Trail.eachPaintedTrailBetween = function (a, b, callback, excludeEndTrails, scene) {\n Trail.eachTrailBetween(a, b, function (trail) {\n if (trail && trail.isPainted()) {\n callback(trail);\n }\n }, excludeEndTrails, scene);\n };\n Trail.eachTrailBetween = function (a, b, callback, excludeEndTrails, scene) {\n var aPointer = a ? new scenery.TrailPointer(a.copy(), true) : new scenery.TrailPointer(new scenery.Trail(scene), true);\n var bPointer = b ? new scenery.TrailPointer(b.copy(), true) : new scenery.TrailPointer(new scenery.Trail(scene), false);\n if (excludeEndTrails) {\n aPointer.nestedForwards();\n bPointer.nestedBackwards();\n if (aPointer.compareNested(bPointer) === 1) {\n return;\n }\n }\n aPointer.depthFirstUntil(bPointer, function (pointer) {\n if (pointer.isBefore) {\n callback(pointer.trail);\n }\n }, false);\n };\n return Trail;\n});",
"\ndefine('SCENERY/layers/Layer',['require','DOT/Bounds2','DOT/Transform3','SCENERY/scenery','SCENERY/util/Trail'],function (require) {\n 'use strict';\n var Bounds2 = require('DOT/Bounds2');\n var Transform3 = require('DOT/Transform3');\n var scenery = require('SCENERY/scenery');\n require('SCENERY/util/Trail');\n var globalIdCounter = 1;\n scenery.Layer = function Layer(args) {\n this._id = globalIdCounter++;\n this.$main = args.$main;\n this.scene = args.scene;\n this.baseNode = args.baseNode;\n this.usesPartialCSSTransforms = args.cssTranslation || args.cssRotation || args.cssScale;\n this.cssTranslation = args.cssTranslation;\n this.cssRotation = args.cssRotation;\n this.cssScale = args.cssScale;\n this.cssTransform = args.cssTransform;\n sceneryAssert && sceneryAssert(!(this.usesPartialCSSTransforms && this.cssTransform), 'Do not specify both partial and complete CSS transform arguments.');\n this.dirtyBounds = Bounds2.EVERYTHING;\n this.setStartBoundary(args.startBoundary);\n this.setEndBoundary(args.endBoundary);\n if (this.baseNode === this.scene) {\n this.baseTrail = new scenery.Trail(this.scene);\n } else {\n this.baseTrail = this.startPaintedTrail.upToNode(this.baseNode);\n sceneryAssert && sceneryAssert(this.baseTrail.lastNode() === this.baseNode);\n }\n this._layerTrails = [];\n this._instanceCount = 0;\n var layer = this;\n this.baseNodeBoundsListener = function (bounds) {\n layer.baseNodeInternalBoundsChange();\n };\n this.baseNode.addEventListener('selfBounds', this.baseNodeBoundsListener);\n this.baseNode.addEventListener('childBounds', this.baseNodeBoundsListener);\n this.fitToBounds = this.usesPartialCSSTransforms || this.cssTransform;\n sceneryAssert && sceneryAssert(this.fitToBounds || this.baseNode === this.scene, 'If the baseNode is not the scene, we need to fit the bounds');\n this.baseNodeTransform = new Transform3();\n this.disposed = false;\n };\n var Layer = scenery.Layer;\n Layer.prototype = {\n constructor: Layer,\n setStartBoundary: function (boundary) {\n this.startBoundary = boundary;\n this.startPaintedTrail = this.startBoundary.nextPaintedTrail;\n this.startPaintedTrail.setImmutable();\n },\n setEndBoundary: function (boundary) {\n this.endBoundary = boundary;\n this.endPaintedTrail = this.endBoundary.previousPaintedTrail;\n this.endPaintedTrail.setImmutable();\n },\n toString: function () {\n return this.getName() + ' ' + (this.startPaintedTrail ? this.startPaintedTrail.toString() : '!') + ' => ' + (this.endPaintedTrail ? this.endPaintedTrail.toString() : '!');\n },\n getId: function () {\n return this._id;\n },\n get id() {\n return this._id;\n },\n getLayerTrails: function () {\n return this._layerTrails.slice(0);\n },\n getPaintedTrailCount: function () {\n return this._layerTrails.length;\n },\n render: function (state) {\n throw new Error('Layer.render unimplemented');\n },\n applyTransformationMatrix: function (matrix) {\n throw new Error('Layer.applyTransformationMatrix unimplemented');\n },\n addInstance: function (instance) {\n var trail = instance.trail;\n if (sceneryAssert) {\n _.each(this._layerTrails, function (otherTrail) {\n sceneryAssert(!trail.equals(otherTrail), 'trail in addInstance should not already exist in a layer');\n });\n }\n this._layerTrails.push(trail);\n trail.setImmutable();\n },\n removeInstance: function (instance) {\n var i;\n for (i = 0; i < this._layerTrails.length; i++) {\n this._layerTrails[i].reindex();\n if (this._layerTrails[i].compare(instance.trail) === 0) {\n break;\n }\n }\n sceneryAssert && sceneryAssert(i < this._layerTrails.length);\n this._layerTrails.splice(i, 1);\n },\n reindex: function (zIndex) {\n this.startBoundary.reindex();\n this.endBoundary.reindex();\n },\n pushClipShape: function (shape) {\n throw new Error('Layer.pushClipShape unimplemented');\n },\n popClipShape: function () {\n throw new Error('Layer.popClipShape unimplemented');\n },\n renderToCanvas: function (canvas, context, delayCounts) {\n throw new Error('Layer.renderToCanvas unimplemented');\n },\n dispose: function () {\n sceneryAssert && sceneryAssert(!this.disposed, 'Layer has already been disposed!');\n this.disposed = true;\n this.baseNode.removeEventListener('selfBounds', this.baseNodeBoundsListener);\n this.baseNode.removeEventListener('childBounds', this.baseNodeBoundsListener);\n },\n getName: function () {\n throw new Error('Layer.getName unimplemented');\n },\n baseNodeInternalBoundsChange: function () {\n }\n };\n Layer.cssTransformPadding = 3;\n return Layer;\n});",
"\ndefine('SCENERY/util/CanvasContextWrapper',['require','SCENERY/scenery'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n scenery.CanvasContextWrapper = function CanvasContextWrapper(canvas, context) {\n this.canvas = canvas;\n this.context = context;\n this.resetStyles();\n phetAllocation && phetAllocation('CanvasContextWrapper');\n };\n var CanvasContextWrapper = scenery.CanvasContextWrapper;\n CanvasContextWrapper.prototype = {\n constructor: CanvasContextWrapper,\n resetStyles: function () {\n this.fillStyle = undefined;\n this.strokeStyle = undefined;\n this.lineWidth = undefined;\n this.lineCap = undefined;\n this.lineJoin = undefined;\n this.lineDash = undefined;\n this.lineDashOffset = undefined;\n this.miterLimit = undefined;\n this.font = undefined;\n this.direction = undefined;\n },\n setDimensions: function (width, height) {\n this.canvas.width = width;\n this.canvas.height = height;\n this.resetStyles();\n },\n setFillStyle: function (style) {\n if (this.fillStyle !== style) {\n this.fillStyle = style;\n this.context.fillStyle = style && style.getCanvasStyle ? style.getCanvasStyle() : style;\n }\n },\n setStrokeStyle: function (style) {\n if (this.strokeStyle !== style) {\n this.strokeStyle = style;\n this.context.strokeStyle = style && style.getCanvasStyle ? style.getCanvasStyle() : style;\n }\n },\n setLineWidth: function (width) {\n if (this.lineWidth !== width) {\n this.lineWidth = width;\n this.context.lineWidth = width;\n }\n },\n setLineCap: function (cap) {\n if (this.lineCap !== cap) {\n this.lineCap = cap;\n this.context.lineCap = cap;\n }\n },\n setLineJoin: function (join) {\n if (this.lineJoin !== join) {\n this.lineJoin = join;\n this.context.lineJoin = join;\n }\n },\n setLineDash: function (dash) {\n sceneryAssert && sceneryAssert(dash !== undefined, 'undefined line dash would cause hard-to-trace errors');\n if (this.lineDash !== dash) {\n this.lineDash = dash;\n if (this.context.setLineDash) {\n this.context.setLineDash(dash === null ? [] : dash);\n } else if (this.context.mozDash !== undefined) {\n this.context.mozDash = dash;\n } else if (this.context.webkitLineDash !== undefined) {\n this.context.webkitLineDash = dash ? dash : [];\n } else {\n }\n }\n },\n setLineDashOffset: function (lineDashOffset) {\n if (this.lineDashOffset !== lineDashOffset) {\n this.lineDashOffset = lineDashOffset;\n if (this.context.lineDashOffset !== undefined) {\n this.context.lineDashOffset = lineDashOffset;\n } else if (this.context.webkitLineDashOffset !== undefined) {\n this.context.webkitLineDashOffset = lineDashOffset;\n } else {\n }\n }\n },\n setFont: function (font) {\n if (this.font !== font) {\n this.font = font;\n this.context.font = font;\n }\n },\n setDirection: function (direction) {\n if (this.direction !== direction) {\n this.direction = direction;\n this.context.direction = direction;\n }\n }\n };\n return CanvasContextWrapper;\n});",
"\ndefine('SCENERY/util/TrailPointer',['require','SCENERY/scenery','SCENERY/util/Trail'],function (require) {\n 'use strict';\n var scenery = require('SCENERY/scenery');\n require('SCENERY/util/Trail');\n scenery.TrailPointer = function TrailPointer(trail, isBefore) {\n sceneryAssert && sceneryAssert(trail instanceof scenery.Trail, 'trail is not a trail');\n this.trail = trail;\n this.setBefore(isBefore);\n phetAllocation && phetAllocation('TrailPointer');\n };\n var TrailPointer = scenery.TrailPointer;\n TrailPointer.prototype = {\n constructor: TrailPointer,\n copy: function () {\n return new TrailPointer(this.trail.copy(), this.isBefore);\n },\n setBefore: function (isBefore) {\n this.isBefore = isBefore;\n this.isAfter = !isBefore;\n },\n getRenderSwappedPointer: function () {\n var newTrail = this.isBefore ? this.trail.previous() : this.trail.next();\n if (newTrail === null) {\n return null;\n } else {\n return new TrailPointer(newTrail, !this.isBefore);\n }\n },\n getRenderBeforePointer: function () {\n return this.isBefore ? this : this.getRenderSwappedPointer();\n },\n getRenderAfterPointer: function () {\n return this.isAfter ? this : this.getRenderSwappedPointer();\n },\n compareRender: function (other) {\n sceneryAssert && sceneryAssert(other !== null);\n var a = this.getRenderBeforePointer();\n var b = other.getRenderBeforePointer();\n if (a !== null && b !== null) {\n return a.trail.compare(b.trail);\n } else {\n if (a === b) {\n return 0;\n } else {\n return a === null ? 1 : -1;\n }\n }\n },\n compareNested: function (other) {\n sceneryAssert && sceneryAssert(other);\n var comparison = this.trail.compare(other.trail);\n if (comparison === 0) {\n if (this.isBefore === other.isBefore) {\n return 0;\n } else {\n return this.isBefore ? -1 : 1;\n }\n } else {\n if (this.trail.isExtensionOf(other.trail)) {\n return other.isBefore ? 1 : -1;\n } else if (other.trail.isExtensionOf(this.trail)) {\n return this.isBefore ? -1 : 1;\n } else {\n return comparison;\n }\n }\n },\n equalsRender: function (other) {\n return this.compareRender(other) === 0;\n },\n equalsNested: function (other) {\n return this.compareNested(other) === 0;\n },\n hasTrail: function () {\n return !!this.trail;\n },\n nestedForwards: function () {\n if (this.isBefore) {\n if (this.trail.lastNode()._children.length > 0) {\n this.trail.addDescendant(this.trail.lastNode()._children[0], 0);\n } else {\n this.setBefore(false);\n }\n } else {\n if (this.trail.indices.length === 0) {\n this.trail = null;\n return null;\n } else {\n var index = this.trail.indices[this.trail.indices.length - 1];\n this.trail.removeDescendant();\n if (this.trail.lastNode()._children.length > index + 1) {\n this.trail.addDescendant(this.trail.lastNode()._children[index + 1], index + 1);\n this.setBefore(true);\n } else {\n }\n }\n }\n return this;\n },\n nestedBackwards: function () {\n if (this.isBefore) {\n if (this.trail.indices.length === 0) {\n this.trail = null;\n return null;\n } else {\n var index = this.trail.indices[this.trail.indices.length - 1];\n this.trail.removeDescendant();\n if (index - 1 >= 0) {\n this.trail.addDescendant(this.trail.lastNode()._children[index - 1], index - 1);\n this.setBefore(false);\n } else {\n }\n }\n } else {\n if (this.trail.lastNode()._children.length > 0) {\n var children = this.trail.lastNode()._children;\n this.trail.addDescendant(children[children.length - 1], children.length - 1);\n } else {\n this.setBefore(true);\n }\n }\n return this;\n },\n eachNodeBetween: function (other, callback) {\n this.eachTrailBetween(other, function (trail) {\n callback(trail.lastNode());\n });\n },\n eachTrailBetween: function (other, callback) {\n if (this.isBefore) {\n callback(this.trail);\n }\n this.depthFirstUntil(other, function (pointer) {\n if (pointer.isBefore) {\n callback(pointer.trail);\n }\n }, true);\n },\n depthFirstUntil: function (other, callback, excludeEndpoints) {\n sceneryAssert && sceneryAssert(this.compareNested(other) <= (excludeEndpoints ? -1 : 0), 'TrailPointer.depthFirstUntil pointers out of order, possibly in both meanings of the phrase!');\n sceneryAssert && sceneryAssert(this.trail.rootNode() === other.trail.rootNode(), 'TrailPointer.depthFirstUntil takes pointers with the same root');\n this.trail.reindex();\n other.trail.reindex();\n var pointer = this.copy();\n pointer.trail.setMutable();\n var first = true;\n while (!pointer.equalsNested(other)) {\n sceneryAssert && sceneryAssert(pointer.compareNested(other) !== 1, 'skipped in depthFirstUntil');\n var skipSubtree = false;\n if (first) {\n if (!excludeEndpoints) {\n skipSubtree = callback(pointer);\n }\n first = false;\n } else {\n skipSubtree = callback(pointer);\n }\n if (skipSubtree && pointer.isBefore) {\n pointer.setBefore(false);\n if (pointer.compareNested(other) === 1) {\n break;\n }\n } else {\n pointer.nestedForwards();\n }\n }\n if (!excludeEndpoints) {\n callback(pointer);\n }\n },\n toString: function () {\n return '[' + (this.isBefore ? 'before' : 'after') + ' ' + this.trail.toString().slice(1);\n }\n };\n TrailPointer.compareNested = function (trailA, isBeforeA, trailB, isBeforeB) {\n var comparison = trailA.compare(trailB);\n if (comparison === 0) {\n if (isBeforeA === isBeforeB) {\n return 0;\n } else {\n return isBeforeA ? -1 : 1;\n }\n } else {\n if (trailA.isExtensionOf(trailB)) {\n return isBeforeB ? 1 : -1;\n } else if (trailB.isExtensionOf(trailA)) {\n return isBeforeA ? -1 : 1;\n } else {\n return comparison;\n }\n }\n };\n return TrailPointer;\n});",
"\ndefine('SCENERY/layers/CanvasLayer',['require','PHET_CORE/inherit','DOT/Bounds2','SCENERY/scenery','KITE/Shape','SCENERY/layers/Layer','SCENERY/util/CanvasContextWrapper','SCENERY/util/Trail','SCENERY/util/TrailPointer','SCENERY/util/Util'],function (require) {\n 'use strict';\n var inherit = require('PHET_CORE/inherit');\n var Bounds2 = require('DOT/Bounds2');\n var scenery = require('SCENERY/scenery');\n var Shape = require('KITE/Shape');\n var Layer = require('SCENERY/layers/Layer');\n require('SCENERY/util/CanvasContextWrapper');\n require('SCENERY/util/Trail');\n require('SCENERY/util/TrailPointer');\n require('SCENERY/util/Util');\n var canvasContextPool = [];\n scenery.CanvasLayer = function CanvasLayer(args) {\n sceneryLayerLog && sceneryLayerLog('CanvasLayer #' + this.id + ' constructor');\n Layer.call(this, args);\n this.backingScale = args.scene.backingScale;\n if (args.fullResolution !== undefined) {\n this.backingScale = args.fullResolution ? scenery.Util.backingScale(document.createElement('canvas').getContext('2d')) : 1;\n }\n this.logicalWidth = this.scene.sceneBounds.width;\n this.logicalHeight = this.scene.sceneBounds.height;\n var canvas = document.createElement('canvas');\n canvas.width = this.logicalWidth * this.backingScale;\n canvas.height = this.logicalHeight * this.backingScale;\n canvas.style.width = this.logicalWidth + 'px';\n canvas.style.height = this.logicalHeight + 'px';\n canvas.style.position = 'absolute';\n canvas.style.left = '0';\n canvas.style.top = '0';\n this.$main.append(canvas);\n this.canvas = canvas;\n this.context = canvas.getContext('2d');\n this.scene = args.scene;\n this.context.miterLimit = 20;\n this.context.miterLimit = 10;\n this.isCanvasLayer = true;\n this.wrapper = new scenery.CanvasContextWrapper(this.canvas, this.context);\n this.boundlessCount = 0;\n };\n var CanvasLayer = scenery.CanvasLayer;\n inherit(Layer, CanvasLayer, {\n render: function (scene, args) {\n args = args || {};\n var dirtyBoundsEnabled = this.canUseDirtyRegions() && !args.fullRender;\n if (dirtyBoundsEnabled && this.dirtyBounds.isEmpty()) {\n return;\n }\n this.context.setTransform(this.backingScale, 0, 0, this.backingScale, 0, 0);\n var visibleDirtyBounds = dirtyBoundsEnabled ? this.dirtyBounds.intersection(scene.sceneBounds) : scene.sceneBounds;\n if (!visibleDirtyBounds.isEmpty()) {\n this.clearGlobalBounds(visibleDirtyBounds);\n if (dirtyBoundsEnabled) {\n this.pushClipShape(Shape.bounds(visibleDirtyBounds));\n }\n this.recursiveRender(scene, args);\n if (dirtyBoundsEnabled) {\n this.popClipShape();\n }\n }\n this.dirtyBounds = Bounds2.NOTHING;\n },\n recursiveRender: function (scene, args) {\n var layer = this;\n var i;\n var startPointer = new scenery.TrailPointer(this.startPaintedTrail, true);\n var endPointer = new scenery.TrailPointer(this.endPaintedTrail, true);\n var wrapperStack = [this.wrapper];\n this.wrapper.resetStyles();\n function requiresScratchCanvas(trail) {\n return trail.lastNode().getOpacity() < 1;\n }\n function getCanvasWrapper() {\n var width = layer.logicalWidth * layer.backingScale;\n var height = layer.logicalHeight * layer.backingScale;\n if (canvasContextPool.length) {\n var wrapper = canvasContextPool.pop();\n wrapper.setDimensions(width, height);\n return wrapper;\n } else {\n var canvas = document.createElement('canvas');\n canvas.width = layer.logicalWidth * layer.backingScale;\n canvas.height = layer.logicalHeight * layer.backingScale;\n var context = canvas.getContext('2d');\n return new scenery.CanvasContextWrapper(canvas, context);\n }\n }\n function topWrapper() {\n return wrapperStack[wrapperStack.length - 1];\n }\n function enter(trail) {\n var node = trail.lastNode();\n if (requiresScratchCanvas(trail)) {\n var wrapper = getCanvasWrapper();\n wrapperStack.push(wrapper);\n var newContext = wrapper.context;\n newContext.setTransform(layer.backingScale, 0, 0, layer.backingScale, 0, 0);\n var length = trail.nodes.length;\n for (var i = 0; i < length; i++) {\n trail.nodes[i].transform.getMatrix().canvasAppendTransform(newContext);\n }\n } else {\n node.transform.getMatrix().canvasAppendTransform(topWrapper().context);\n }\n if (node._clipShape) {\n layer.pushClipShape(node._clipShape);\n }\n }\n function exit(trail) {\n var node = trail.lastNode();\n if (node._clipShape) {\n layer.popClipShape();\n }\n if (requiresScratchCanvas(trail)) {\n var baseContext = wrapperStack[wrapperStack.length - 2].context;\n var topCanvas = wrapperStack[wrapperStack.length - 1].canvas;\n var opacityChange = trail.lastNode().getOpacity() < 1;\n if (opacityChange) {\n baseContext.globalAlpha = trail.lastNode().getOpacity();\n }\n baseContext.save();\n baseContext.setTransform(1, 0, 0, 1, 0, 0);\n baseContext.drawImage(topCanvas, 0, 0);\n baseContext.restore();\n if (opacityChange) {\n baseContext.globalAlpha = 1;\n }\n var wrapper = wrapperStack.pop();\n if (wrapper !== layer.wrapper) {\n canvasContextPool.push(wrapper);\n }\n } else {\n node.transform.getInverse().canvasAppendTransform(topWrapper().context);\n }\n }\n var invisibleCount = 0;\n var boundaryTrail;\n startPointer.trail.reindex();\n endPointer.trail.reindex();\n var startWalkLength = startPointer.trail.length - (startPointer.isBefore ? 1 : 0);\n boundaryTrail = new scenery.Trail();\n for (i = 0; i < startWalkLength; i++) {\n var startNode = startPointer.trail.nodes[i];\n boundaryTrail.addDescendant(startNode);\n invisibleCount += startNode.isVisible() ? 0 : 1;\n if (invisibleCount === 0) {\n enter(boundaryTrail);\n }\n }\n startPointer.depthFirstUntil(endPointer, function renderPointer(pointer) {\n var node = pointer.trail.lastNode();\n if (pointer.isBefore) {\n invisibleCount += node.isVisible() ? 0 : 1;\n if (invisibleCount === 0) {\n enter(pointer.trail);\n if (node.isPainted()) {\n var wrapper = wrapperStack[wrapperStack.length - 1];\n node.paintCanvas(wrapper);\n }\n } else {\n return true;\n }\n } else {\n if (invisibleCount === 0) {\n exit(pointer.trail);\n }\n invisibleCount -= node.isVisible() ? 0 : 1;\n }\n }, false);\n boundaryTrail = endPointer.trail.copy();\n var endWalkLength = endPointer.trail.length - (endPointer.isAfter ? 1 : 0);\n for (i = endWalkLength - 1; i >= 0; i--) {\n var endNode = endPointer.trail.nodes[i];\n invisibleCount -= endNode.isVisible() ? 0 : 1;\n if (invisibleCount === 0) {\n exit(boundaryTrail);\n }\n boundaryTrail.removeDescendant();\n }\n },\n dispose: function () {\n Layer.prototype.dispose.call(this);\n this.canvas.parentNode.removeChild(this.canvas);\n },\n applyTransformationMatrix: function (matrix) {\n matrix.canvasAppendTransform(this.context);\n },\n reindex: function (zIndex) {\n Layer.prototype.reindex.call(this, zIndex);\n if (this.zIndex !== zIndex) {\n this.canvas.style.zIndex = zIndex;\n this.zIndex = zIndex;\n }\n return zIndex + 1;\n },\n pushClipShape: function (shape) {\n this.context.save();\n this.writeClipShape(shape);\n },\n popClipShape: function () {\n this.context.restore();\n },\n writeClipShape: function (shape) {\n this.context.beginPath();\n shape.writeToContext(this.context);\n this.context.clip();\n },\n clearGlobalBounds: function (bounds) {\n if (!bounds.isEmpty()) {\n this.context.save();\n this.context.setTransform(this.backingScale, 0, 0, this.backingScale, 0, 0);\n this.context.clearRect(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());\n this.context.restore();\n }\n },\n getSVGString: function () {\n return '
Approximate frames per second: ' + fps.toFixed(1) + '
' + 'Average time per frame (ms/frame): ' + (elapsedTime / index).toFixed(1) + '
' + 'Elapsed time: ' + elapsedTime + 'ms
' + 'Number of frames: ' + index + '
' + '