Scenery Debug Snapshot'+this.getDebugHTML()+"")},popupDebug:function(){window.open(this.getDebugURI())},iframeDebug:function(){var t=document.createElement("iframe");t.width=window.innerWidth,t.height=window.innerHeight,t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.zIndex="10000",document.body.appendChild(t),t.contentWindow.document.open(),t.contentWindow.document.write(this.getDebugHTML()),t.contentWindow.document.close(),t.contentWindow.document.body.style.background="white";var e=document.createElement("button");e.style.position="absolute",e.style.top="0",e.style.right="0",e.style.zIndex="10001",document.body.appendChild(e),e.textContent="close",["pointerdown","click","touchdown"].forEach(function(i){e.addEventListener(i,function(){document.body.removeChild(t),document.body.removeChild(e)},!0)})},getAccessibleDebugHTML:function(){function t(i,r){e+=r+s((i.isRootInstance?"":i.node.tagName)+" "+i.toString())+"
",i.children.forEach(function(e){t(e,r+n)})}var e="",i="font-weight: bold; font-size: 120%; margin-top: 5px;",n="    ";e+='
Accessible Instances

',t(this._rootAccessibleInstance,""),e+='
Parallel DOM

';for(var r=this._rootAccessibleInstance.peer.primarySibling.outerHTML,o=(r=r.replace(/>\n<")).split("\n"),a="",l=0;l",u||(a+=n)}return e},foreignObjectRasterization:function(t){function i(t){t.id||(t.id="unknown-canvas-"+s++),r[t.id]=t.toDataURL()}function n(t){if(t.blocks)_.each(t.blocks,function(t){n(t)});else if(t.firstDrawable&&t.lastDrawable){for(var e=t.firstDrawable;e!==t.lastDrawable;e=e.nextDrawable)n(e);n(t.lastDrawable),t.canvas&&t.canvas instanceof window.HTMLCanvasElement&&i(t.canvas)}y.DOMDrawable&&t instanceof y.DOMDrawable&&(t.domElement instanceof window.HTMLCanvasElement&&i(t.domElement),Array.prototype.forEach.call(t.domElement.getElementsByTagName("canvas"),function(t){i(t)}))}var r={},s=0;n(this._rootBackbone);var o=document.implementation.createHTMLDocument("");o.documentElement.innerHTML=this.domElement.outerHTML,o.documentElement.setAttribute("xmlns",o.documentElement.namespaceURI);var a=o.documentElement.getElementsByTagName("canvas");a=Array.prototype.slice.call(a);for(var l=0;l
'+(new window.XMLSerializer).serializeToString(t)+"
",a=new window.Image;a.onload=function(){s.drawImage(a,0,0),n(r.toDataURL())},a.onerror=function(){n(null)};var l=new window.TextEncoderLite("utf-8").encode(o),h=window.fromByteArray(l);a.src="data:image/svg+xml;base64,"+h},set focus(t){var e=void 0;this.focusProperty.value&&(e=this.focusedNode),this.focusProperty.value=t,e&&!t&&e.blur()},get focus(){return this.focusProperty.value},getFocusedNode:function(){var t=null,e=this.focusProperty.get();return e&&(t=e.trail.lastNode()),t},get focusedNode(){return this.getFocusedNode()}}),e.prototype.dispose=function(){this._input&&this.detachEvents(),this._rootNode.removeRootedDisplay(this),this._accessible&&this._rootAccessibleInstance.dispose()},e.customCursors={"scenery-grab-pointer":["grab","-moz-grab","-webkit-grab","pointer"],"scenery-grabbing-pointer":["grabbing","-moz-grabbing","-webkit-grabbing","pointer"]},e.focusProperty=new d(null,{tandem:m.generalTandem.createTandem("focusProperty"),phetioDocumentation:"Stores the current focus for the simulation, null if there is not focus. This is not updated based on mouse or touch input, only keyboard and other alternative inputs.",phetioType:p(R(A)),phetioState:!1,phetioReadOnly:!0}),e.userGestureEmitter=new r,e.keyStateTracker=new h,e.assertSubtreeDisposed=function(t){},e}),i("JOIST/Heartbeat",["require","JOIST/joist"],function(t){"use strict";var e=!1,i={start:function(t){e=!0;var i=document.createElement("div");i.style.opacity=0,i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width="0",i.style.height="0",i.style.clip="rect(0,0,0,0)",i.setAttribute("aria-hidden",!0),t.display.domElement.appendChild(i),t.frameStartedEmitter.addListener(function(){t.frameCounter%1e3==0&&(i.innerHTML=phet.joist.random.nextDouble())})}};return t("JOIST/joist").register("Heartbeat",i),i}),i("JOIST/Frame",["require","DOT/Bounds2","PHET_CORE/inherit","JOIST/joist","SCENERY/util/LinearGradient","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e){e=o({xMargin1:6,yMargin1:6,cornerRadius:0},e),a.call(this);var n=t.width+2*e.xMargin1,r=t.height+2*e.yMargin1;this.gradient=new s(0,0,n,0).addColorStop(0,"#fbff41").addColorStop(.1475,"#fef98b").addColorStop(.465,"#feff40").addColorStop(.77,"#fffccd").addColorStop(1,"#fbff41"),this.rectangle=new l(0,0,n,r,e.cornerRadius,e.cornerRadius,{stroke:this.gradient,lineWidth:3,x:t.x-e.xMargin1,y:t.y-e.yMargin1}),this.addChild(this.rectangle),this.mutate(e),this.frameWidth=n,this.frameHeight=r;var h=i.rect(this.rectangle.x,this.rectangle.y,this.frameWidth,this.frameHeight);this.highlightRectangle=l.bounds(h.dilated(.75),{stroke:"transparent",lineWidth:4.5}),this.addChild(this.highlightRectangle)}var i=t("DOT/Bounds2"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/util/LinearGradient"),o=t("PHET_CORE/merge"),a=t("SCENERY/nodes/Node"),l=t("SCENERY/nodes/Rectangle");return r.register("Frame",e),n(a,e,{setHighlighted:function(t){this.highlightRectangle.stroke=t?this.gradient:"transparent"}}),e}),i("JOIST/ScreenButton",["require","TANDEM/EventType","SCENERY/listeners/FireListener","JOIST/Frame","PHET_CORE/inherit","JOIST/joist","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY_PHET/PhetColorScheme","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","KITE/Shape","SCENERY/nodes/Text","SCENERY/input/Touch","DOT/Util","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,e,s,o,y,v){v=a({showUnselectedHomeScreenIconFrame:!1,opacity:1,tandem:y,phetioEventType:i.USER,phetioDocumentation:"A pressable button in the simulation, in the home screen"},v);var T=e.screens[s],b=f.linear(2,4,.875,.5,e.screens.length);e.screens.length>=5&&(b=.4);var _=t?E:b*E,C=new l({opacity:v.opacity,children:[T.homeScreenIcon],scale:_/T.homeScreenIcon.height}),S=t?new r(C):new c(0,0,C.width,C.height,{stroke:v.showUnselectedHomeScreenIconFrame?h.SCREEN_ICON_FRAME:null,lineWidth:.7}),O=new l({opacity:v.opacity,children:[S,C]}),A=new p(T.name,{font:new u(t?42:18),fill:t?h.BUTTON_YELLOW:"gray",tandem:y.createTandem("text")});A.maxWidth=O.width,o.link(function(e){var i=e===s;S.setHighlighted&&S.setHighlighted(i),C.opacity=t||i?1:.5,A.fill=t||i?"white":"gray"}),g.call(this,{children:[O,A]});var N=new n({fireOnDown:!0,fire:t?function(){e.showHomeScreenProperty.value=!1,o.value=-1}:function(){e.screenIndexProperty.value=s},tandem:v.tandem.createTandem("inputListener")});this.addInputListener(N),this.addInputListener({click:function(){t&&N.fire()}}),this.addInputListener({focus:function(){!t&&N.fire()}}),this.addInputListener({focus:function(){o.value=s},blur:function(){o.value=-1}}),t||(this.highlightListener={over:function(t){o.value=s},out:function(t){o.value=-1}},this.addInputListener({over:function(t){t.pointer instanceof m&&(e.screenIndexProperty.value=s)}})),this.mouseArea=this.touchArea=d.bounds(this.bounds),this.disposeScreenButton=function(){o.unlink()},this.mutate(v)}var i=t("TANDEM/EventType"),n=t("SCENERY/listeners/FireListener"),r=t("JOIST/Frame"),s=t("PHET_CORE/inherit"),o=t("JOIST/joist"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Node"),h=t("SCENERY_PHET/PhetColorScheme"),u=t("SCENERY_PHET/PhetFont"),c=t("SCENERY/nodes/Rectangle"),d=t("KITE/Shape"),p=t("SCENERY/nodes/Text"),m=t("SCENERY/input/Touch"),f=t("DOT/Util"),g=t("SCENERY/nodes/VBox"),E=140;return o.register("ScreenButton",e),s(g,e,{dispose:function(){this.disposeScreenButton(),g.prototype.dispose.call(this)}})}),i("JOIST/HomeScreenView",["require","DOT/Bounds2","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","AXON/Property","JOIST/ScreenButton","JOIST/ScreenView","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e,i){var r=this;i=a({warningNode:null},i),d.call(this,{layoutBounds:y,tandem:e,labelContent:t.name,descriptionContent:p.fillIn(E,{name:t.name,screens:t.screens.length})});var s=new m(t.name,{font:new h({size:52,family:v}),fill:"white",y:130,tandem:e.createTandem("title")});this.addChild(s),s.scale(Math.min(1,.9*this.layoutBounds.width/s.width)),s.centerX=this.layoutBounds.centerX;var o=new u(-1),T=_.map(t.screens,function(i,n){var r=e.createTandem(i.screenTandem.name+"LargeButton"),s={tagName:"button",innerContent:i.name,descriptionContent:i.descriptionContent,appendDescription:!0,containerTagName:"li"},l=new c(!0,t,n,o,r,a(s,{resize:!1,cursor:"pointer"})),h=e.createTandem(i.screenTandem.name+"SmallButton"),u=new c(!1,t,n,o,h,a(s,{spacing:3,cursor:"pointer",showUnselectedHomeScreenIconFrame:i.showUnselectedHomeScreenIconFrame}));u.addInputListener(u.highlightListener),l.addInputListener(u.highlightListener);var d=function(){u.visible&&u.focus(),l.visible&&l.focus()};return u.addInputListener({focus:d}),l.addInputListener({click:d}),u.setAccessibleAttribute("aria-roledescription",g),l.setAccessibleAttribute("aria-roledescription",g),{screen:i,small:u,large:l,index:n}}),b=new l({tagName:"nav",ariaLabel:f}),C=new l({tagName:"ol"});b.addChild(C),this.addChild(b);var S=60;4===t.screens.length&&(S=33),t.screens.length>=5&&(S=20);var O=null;if(this.highlightedScreenButton=null,t.screenIndexProperty.link(function(t){O&&(O.removeAllChildren(),C.removeChild(O));var e=_.map(T,function(e){return e.index===t&&(r.highlightedScreenButton=e.large),e.index===t?e.large:e.small});O=new n({spacing:S,children:e,align:"top",resize:!1,maxWidth:r.layoutBounds.width-118}),C.addChild(O),C.centerX=r.layoutBounds.width/2,C.top=r.layoutBounds.height/3+20}),i.warningNode){var A=i.warningNode;this.addChild(A),A.centerX=this.layoutBounds.centerX,A.bottom=this.layoutBounds.maxY-2}}var i=t("DOT/Bounds2"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),o=t("JOIST/JoistA11yStrings"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Node"),h=t("SCENERY_PHET/PhetFont"),u=t("AXON/Property"),c=t("JOIST/ScreenButton"),d=t("JOIST/ScreenView"),p=t("PHETCOMMON/util/StringUtils"),m=t("SCENERY/nodes/Text"),f=o.simScreens.value,g=o.simScreen.value,E=o.homeScreenDescriptionPattern.value,y=new i(0,0,768,504),v="Century Gothic, Futura";return s.register("HomeScreenView",e),r(d,e,{focusHighlightedScreenButton:function(){this.highlightedScreenButton.focus()}},{TITLE_FONT_FAMILY:v,LAYOUT_BOUNDS:y})}),i("JOIST/HomeScreen",["require","JOIST/HomeScreenView","PHET_CORE/inherit","JOIST/joist","PHET_CORE/merge","AXON/Property","JOIST/Screen"],function(t){"use strict";function e(t,e,n){(n=s({backgroundColorProperty:new o(l)},n)).tandem=e,a.call(this,function(){return{}},function(){return new i(t,e.createTandem("view"),_.pick(n,["warningNode"]))},n)}var i=t("JOIST/HomeScreenView"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("PHET_CORE/merge"),o=t("AXON/Property"),a=t("JOIST/Screen"),l="black";return r.register("HomeScreen",e),n(a,e,{},{BACKGROUND_COLOR:l})}),i("SCENERY/input/InputFuzzer",["require","PHET_CORE/inherit","DOT/Random","SCENERY/scenery","DOT/Vector2"],function(t){"use strict";function e(t,e){var i=this;this.display=t,this.touches=[],this.nextTouchID=1,this.isMouseDown=!1,this.mousePosition=new s(0,0),this.random=new n({seed:e}),this.mouseToggleAction=function(){i.mouseToggle()},this.mouseMoveAction=function(){i.mouseMove()},this.touchStartAction=function(){var t=i.createTouch(i.getRandomPosition());i.touchStart(t)},this.touchMoveAction=function(){var t=i.random.sample(i.touches);i.touchMove(t)},this.touchEndAction=function(){var t=i.random.sample(i.touches);i.touchEnd(t),i.removeTouch(t)},this.touchCancelAction=function(){var t=i.random.sample(i.touches);i.touchCancel(t),i.removeTouch(t)}}var i=t("PHET_CORE/inherit"),n=t("DOT/Random"),r=t("SCENERY/scenery"),s=t("DOT/Vector2");return r.register("InputFuzzer",e),i(Object,e,{fuzzEvents:function(t,e,i,n){for(;this.random.nextDouble()<1-1/(t+1);){var r=this.touches.length+(this.isMouseDown?1:0)=this.windowSize},updateRunningAverage:function(t){return this.numSamples=Math.min(this.windowSize,this.numSamples+1),this.total-=this.samples[this.sampleIndex],this.total+=t,this.samples[this.sampleIndex]=t,this.sampleIndex=(this.sampleIndex+1)%this.windowSize,this.getRunningAverage()}})}),i("JOIST/MemoryMonitor",["require","JOIST/joist","PHET_CORE/merge","DOT/RunningAverage"],function(t){"use strict";var e=t("JOIST/joist"),i=t("PHET_CORE/merge"),n=t("DOT/RunningAverage"),r=1048576,s=!1,o=function(){function t(e){_classCallCheck(this,t),e=i({windowSize:2e3,memoryLimit:phet.chipper.queryParameters.memoryLimit},e),this.memoryLimit=e.memoryLimit*r,this.runningAverage=new n(e.windowSize),this.lastMemory=0}return _createClass(t,[{key:"measure",value:function(){if(window.performance&&window.performance.memory&&window.performance.memory.usedJSHeapSize){var e=window.performance.memory.usedJSHeapSize;this.lastMemory=e;var i=this.runningAverage.updateRunningAverage(e);if(this.memoryLimit&&this.runningAverage.isSaturated()&&!s&&i>this.memoryLimit&&e>.5*this.memoryLimit)throw s=!0,new Error("Average memory used ("+t.memoryString(i)+") is above our memoryLimit ("+t.memoryString(this.memoryLimit)+"). Current memory: "+t.memoryString(e)+".")}}}],[{key:"memoryString",value:function(t){return Math.ceil(t/r)+"MB"}}]),t}();return e.register("MemoryMonitor",o)}),i("JOIST/HighlightNode",["require","SCENERY/util/Color","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","SCENERY/util/LinearGradient","PHET_CORE/merge","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e,r){var s=(r=a({fill:"white",highlightWidth:1,pickable:!1},r)).fill,h=i.toColor(s).withAlpha(0),u={fill:new o(0,0,0,e).addColorStop(0,h).addColorStop(.5,s).addColorStop(1,h)},c=new l(0,0,r.highlightWidth,e,u),d=new l(0,0,r.highlightWidth,e,u);r.children=[c,d],r.spacing=t,n.call(this,r)}var i=t("SCENERY/util/Color"),n=t("SCENERY/nodes/HBox"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),o=t("SCENERY/util/LinearGradient"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Rectangle");return s.register("HighlightNode",e),r(n,e)}),i("JOIST/JoistButton",["require","SUN/buttons/ButtonInteractionState","SCENERY/accessibility/FocusHighlightPath","JOIST/HighlightNode","PHET_CORE/inherit","JOIST/joist","PHET_CORE/merge","SCENERY/nodes/Node","AXON/Property","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","KITE/Shape"],function(t){"use strict";function e(t,e,s,o){var p=this;(o=a({cursor:"pointer",listener:null,highlightExtensionWidth:0,highlightExtensionHeight:0,highlightCenterOffsetX:0,highlightCenterOffsetY:0},o)).tandem=s,this.buttonModel=new c(o);var m=function(e){return new r(t.width+o.highlightExtensionWidth,t.height+o.highlightExtensionHeight,{centerX:t.centerX+o.highlightCenterOffsetX,centerY:t.centerY+o.highlightCenterOffsetY,fill:e,pickable:!1})},f=m("white"),g=m("black");l.call(this,{children:[t,f,g]});var E=new u(this.buttonModel);this.interactionStateProperty=E,h.multilink([E,e],function(t,e){var n="black"!==e;f.visible=!n&&(t===i.OVER||t===i.PRESSED),g.visible=n&&(t===i.OVER||t===i.PRESSED)}),this.buttonModel.enabledProperty.link(function(t){p.cursor=t?"pointer":null});var y=this.buttonModel.createListener({tandem:s.createTandem("pressListener")});this.addInputListener(y),this.mouseArea=this.touchArea=d.bounds(this.bounds),this.mutate(o);var v=n.getOuterLineWidthFromNode(this);this.focusHighlight=d.bounds(this.bounds.shiftedY(-v))}var i=t("SUN/buttons/ButtonInteractionState"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),o=t("JOIST/joist"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Node"),h=t("AXON/Property"),u=t("SUN/buttons/PushButtonInteractionStateProperty"),c=t("SUN/buttons/PushButtonModel"),d=t("KITE/Shape");return o.register("JoistButton",e),s(l,e)}),i("SUN/DialogIO",["require","SCENERY/nodes/NodeIO","TANDEM/types/ObjectIO","SUN/sun"],function(t){"use strict";var e=t("SCENERY/nodes/NodeIO"),i=t("TANDEM/types/ObjectIO"),n=t("SUN/sun"),r=function(t){function i(){return _classCallCheck(this,i),_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return _inherits(i,e),i}();return r.documentation="A dialog panel",r.validator={isValidValue:function(t){return t instanceof phet.sun.Dialog}},r.typeName="DialogIO",i.validateSubtype(r),n.register("DialogIO",r)}),i("SUN/Dialog",["require","SCENERY/accessibility/AccessibilityUtil","SCENERY/accessibility/AccessiblePeer","SCENERY/nodes/AlignBox","AXON/BooleanProperty","SUN/DialogIO","SCENERY/display/Display","SCENERY/util/FullScreen","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY/accessibility/KeyboardUtil","PHET_CORE/merge","SUN/Panel","SCENERY/nodes/Path","AXON/Property","SUN/buttons/RectangularButtonView","SUN/buttons/RectangularPushButton","KITE/Shape","SUN/sun","SUN/SunA11yStrings","TANDEM/Tandem","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,c){var f=this;(c=p({xSpacing:10,ySpacing:10,topMargin:15,bottomMargin:15,leftMargin:null,maxWidthMargin:12,maxHeightMargin:12,closeButtonTopMargin:10,closeButtonRightMargin:10,modal:!0,title:null,titleAlign:"center",layoutStrategy:e.DEFAULT_LAYOUT_STRATEGY,closeButtonListener:function(){return f.hide()},closeButtonTouchAreaXDilation:0,closeButtonTouchAreaYDilation:0,closeButtonMouseAreaXDilation:0,closeButtonMouseAreaYDilation:0,showCallback:null,hideCallback:null,cornerRadius:10,resize:!0,fill:"white",stroke:"black",backgroundPickable:!0,maxHeight:null,maxWidth:null,tandem:_.optional,phetioType:a,phetioReadOnly:!1,phetioState:!1,tagName:"div",ariaRole:"dialog",focusOnCloseNode:null,addAriaLabelledByFromTitle:!0},c)).tandem=_.optional,c.xMargin=0,c.yMargin=0,null===c.leftMargin&&(c.leftMargin=c.xSpacing+O+c.closeButtonRightMargin),this.isModal=c.modal,this.showCallback=c.showCallback,this.hideCallback=c.hideCallback,this.isShowingProperty=new o(!1,{tandem:c.tandem.createTandem("isShowingProperty"),phetioReadOnly:!0,phetioState:c.phetioState});var E=!!c.maxHeight,y=!!c.maxWidth,v=new i({iconLength:O,listener:function(){c.closeButtonListener(),v.buttonModel.isA11yClicking()&&f.focusActiveElement()},tandem:c.tandem.createTandem("closeButton"),phetioReadOnly:c.phetioReadOnly,phetioState:c.phetioState,tagName:"button",innerContent:S});v.touchArea=v.bounds.dilatedXY(c.closeButtonTouchAreaXDilation,c.closeButtonTouchAreaYDilation),v.mouseArea=v.bounds.dilatedXY(c.closeButtonMouseAreaXDilation,c.closeButtonMouseAreaYDilation),this.closeButton=v;var T=new C({children:c.title?[c.title,t]:[t],spacing:c.ySpacing,align:c.titleAlign}),b=new s(T,{topMargin:c.topMargin,bottomMargin:c.bottomMargin,leftMargin:c.leftMargin}),N=new s(v,{topMargin:c.closeButtonTopMargin,rightMargin:c.closeButtonRightMargin}),R=new u({children:[b,N],spacing:c.xSpacing,align:"top"});m.call(this,R,c);var P=window.phet.joist.sim;this.updateLayoutMultilink=g.multilink([P.boundsProperty,P.screenBoundsProperty,P.scaleProperty,P.currentScreenProperty],function(t,e,i,n){if(t&&e&&i){var r=(n||P.homeScreen).view,s=Math.min(t.width/r.layoutBounds.width,t.height/r.layoutBounds.height),o=r.localToGlobalBounds(r.layoutBounds);if(!E){var a=o.height/s;f.maxHeight=A(a,c.maxHeightMargin)}if(!y){var l=o.width/s;f.maxWidth=A(l,c.maxWidthMargin)}c.layoutStrategy(f,t,e,i)}}),this.sim=P,this.accessibleOrder=[v,c.title,t].filter(function(t){return void 0!==t}),c.title&&c.title.tagName&&c.addAriaLabelledByFromTitle&&this.addAriaLabelledbyAssociation({thisElementName:r.PRIMARY_SIBLING,otherNode:c.title,otherElementName:r.PRIMARY_SIBLING}),this.activeElement=c.focusOnCloseNode||null;var w={keydown:function(t){var e=t.domEvent;if(e.keyCode===d.KEY_ESCAPE)e.preventDefault(),f.hide(),f.focusActiveElement();else if(e.keyCode===d.KEY_TAB&&h.isFullScreen()){var i=l.focus.trail.getUniqueId(),r=n.getNextFocusable().id===i,s=n.getPreviousFocusable().id===i;r&&s&&e.preventDefault()}}};this.addInputListener(w),this.disposeDialog=function(){f.updateLayoutMultilink.dispose(),f.removeInputListener(w),f.isShowingProperty.dispose(),v.dispose(),R.removeAllChildren(),R.detach()}}function i(t){t=p({iconLength:7,baseColor:"transparent",buttonAppearanceStrategy:E.FlatAppearanceStrategy,xMargin:0,yMargin:0,listener:null},t);var e=(new v).moveTo(-t.iconLength/2,-t.iconLength/2).lineTo(t.iconLength/2,t.iconLength/2).moveTo(t.iconLength/2,-t.iconLength/2).lineTo(-t.iconLength/2,t.iconLength/2);t.content=new f(e,{stroke:"black",lineCap:"round",lineWidth:2}),y.call(this,t)}var n=t("SCENERY/accessibility/AccessibilityUtil"),r=t("SCENERY/accessibility/AccessiblePeer"),s=t("SCENERY/nodes/AlignBox"),o=t("AXON/BooleanProperty"),a=t("SUN/DialogIO"),l=t("SCENERY/display/Display"),h=t("SCENERY/util/FullScreen"),u=t("SCENERY/nodes/HBox"),c=t("PHET_CORE/inherit"),d=t("SCENERY/accessibility/KeyboardUtil"),p=t("PHET_CORE/merge"),m=t("SUN/Panel"),f=t("SCENERY/nodes/Path"),g=t("AXON/Property"),E=t("SUN/buttons/RectangularButtonView"),y=t("SUN/buttons/RectangularPushButton"),v=t("KITE/Shape"),T=t("SUN/sun"),b=t("SUN/SunA11yStrings"),_=t("TANDEM/Tandem"),C=t("SCENERY/nodes/VBox"),S=b.close.value,O=14;T.register("Dialog",e),c(m,e,{show:function(){this.isShowingProperty.value||(window.phet.joist.sim.showPopup(this,this.isModal),this.isShowingProperty.value=!0,this.activeElement=this.activeElement||l.focusedNode,this.sim.setAccessibleViewsVisible(!1),this.showCallback&&this.showCallback())},hide:function(){this.isShowingProperty.value&&(window.phet.joist.sim.hidePopup(this,this.isModal),this.isShowingProperty.value=!1,this.sim.setAccessibleViewsVisible(!0),this.hideCallback&&this.hideCallback())},dispose:function(){this.hide(),this.disposeDialog(),m.prototype.dispose.call(this)},focusActiveElement:function(){this.activeElement&&this.activeElement.focus()},focusCloseButton:function(){this.closeButton.focus()}}),e.DEFAULT_LAYOUT_STRATEGY=function(t,e,i,n){t.center=i.center.times(1/n)};var A=function(t,e){return t>2*e?t-2*e:t};return c(y,i),e}),i("SCENERY_PHET/keyboard/KeyNode",["require","SCENERY/nodes/AlignBox","DOT/Bounds2","PHET_CORE/inherit","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){var r=1,h=(e=s({},l,e)).keyHeight-e.yPadding;t.height>h&&(r=h/t.height);var u=new o({children:[t],scale:r}),c=Math.max(e.minKeyWidth,u.width+e.xPadding);if(e.forceSquareKey){var d=e.minKeyWidth-e.xPadding,p=1;t.width>d&&(p=d/t.width),u=new o({children:[u],scale:p}),c=e.keyHeight}var m=new i(u,{alignBounds:new n(0,0,c,e.keyHeight),xAlign:e.xAlign,yAlign:e.yAlign,xMargin:e.xMargin,yMargin:e.yMargin});e.children=[a.roundedBounds(m.bounds.shifted(e.xShadowOffset,e.yShadowOffset),e.cornerRadius,e.cornerRadius,{fill:e.keyShadowFill}),a.roundedBounds(m.bounds,e.cornerRadius,e.cornerRadius,{fill:e.keyFill,stroke:"black",lineWidth:e.lineWidth}),m],o.call(this,e)}var i=t("SCENERY/nodes/AlignBox"),n=t("DOT/Bounds2"),r=t("PHET_CORE/inherit"),s=t("PHET_CORE/merge"),o=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Rectangle"),l={keyFill:"white",keyShadowFill:"black",lineWidth:1,cornerRadius:2,xShadowOffset:1.3,yShadowOffset:1.3,xMargin:0,yMargin:0,xAlign:"center",yAlign:"center",xPadding:3,yPadding:3,minKeyWidth:17,keyHeight:17,forceSquareKey:!1};return t("SCENERY_PHET/sceneryPhet").register("KeyNode",e),r(o,e)}),i("SCENERY_PHET/keyboard/ArrowKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","PHET_CORE/merge","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t,e){var i=(e=r({arrowFill:"black",arrowStroke:"black",arrowLineJoin:"round",arrowLineWidth:3,arrowHeight:l,arrowWidth:h,yPadding:10,forceSquareKey:!0},e)).arrowHeight,o=e.arrowWidth,c=e.arrowLineJoin,d=e.arrowLineWidth,p=e.arrowFill,m=e.arrowStroke,f=new a;f.moveTo(i/2,0).lineTo(i,o+0).lineTo(0,o+0).close();var g=new s(f,{fill:p,stroke:m,lineJoin:c,lineWidth:d,rotation:u[t]});n.call(this,g,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/keyboard/KeyNode"),r=t("PHET_CORE/merge"),s=t("SCENERY/nodes/Path"),o=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape"),l=10,h=.6*Math.sqrt(3)*l,u={up:0,down:Math.PI,left:-Math.PI/2,right:Math.PI/2};return o.register("ArrowKeyNode",e),i(n,e)}),i("SCENERY_PHET/keyboard/TextKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","PHET_CORE/merge","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){e=r({font:new s({size:12}),fill:"black",textMaxWidth:35,xPadding:8},e);var i=new o(t,{font:e.font,fill:e.fill,maxWidth:e.textMaxWidth});n.call(this,i,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/keyboard/KeyNode"),r=t("PHET_CORE/merge"),s=t("SCENERY_PHET/PhetFont"),o=t("SCENERY/nodes/RichText");return t("SCENERY_PHET/sceneryPhet").register("TextKeyNode",e),i(n,e)}),i("string!SCENERY_PHET/key.enter",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.enter")}),i("SCENERY_PHET/keyboard/EnterKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.enter"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.enter");return n.register("EnterKeyNode",e),i(r,e)}),i("SCENERY_PHET/keyboard/LetterKeyNode",["require","PHET_CORE/inherit","PHET_CORE/merge","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode"],function(t){"use strict";function e(t,e){e=n({xPadding:5,forceSquareKey:!0},e),s.call(this,t,e)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/merge"),r=t("SCENERY_PHET/sceneryPhet"),s=t("SCENERY_PHET/keyboard/TextKeyNode");return r.register("LetterKeyNode",e),i(s,e)}),i("string!SCENERY_PHET/key.pageDown",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.pageDown")}),i("SCENERY_PHET/keyboard/PageDownKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.pageDown"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.pageDown");return n.register("PageDownKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/key.pageUp",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.pageUp")}),i("SCENERY_PHET/keyboard/PageUpKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.pageUp"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.pageUp");return n.register("PageUpKeyNode",e),i(r,e)}),i("SCENERY_PHET/PlusNode",["require","DOT/Dimension2","PHET_CORE/inherit","PHET_CORE/merge","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t){var e=(t=r({size:new i(20,5),fill:"black"},t)).size.width/2-t.size.height/2,n=t.size.width/2+t.size.height/2,o=(new a).moveTo(e,0).lineTo(n,0).lineTo(n,e).lineTo(t.size.width,e).lineTo(t.size.width,n).lineTo(n,n).lineTo(n,t.size.width).lineTo(e,t.size.width).lineTo(e,n).lineTo(0,n).lineTo(0,e).lineTo(e,e).close();s.call(this,o,t)}var i=t("DOT/Dimension2"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/merge"),s=t("SCENERY/nodes/Path"),o=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape");return o.register("PlusNode",e),n(s,e)}),i("string!SCENERY_PHET/key.shift",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.shift")}),i("SCENERY_PHET/keyboard/ShiftKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.shift"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.shift");return n.register("ShiftKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/key.space",function(){return window.phet.chipper.strings.get("SCENERY_PHET/key.space")}),i("SCENERY_PHET/keyboard/SpaceKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode","string!SCENERY_PHET/key.space"],function(t){"use strict";function e(t){r.call(this,s,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode"),s=t("string!SCENERY_PHET/key.space");return n.register("SpaceKeyNode",e),i(r,e)}),i("string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern")}),i("string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern")}),i("string!SCENERY_PHET/keyboardHelpDialog.or",function(){return window.phet.chipper.strings.get("SCENERY_PHET/keyboardHelpDialog.or")}),i("SCENERY_PHET/keyboard/help/KeyboardHelpSection",["require","SCENERY/nodes/AlignGroup","SCENERY_PHET/keyboard/ArrowKeyNode","DOT/Dimension2","SCENERY_PHET/keyboard/EnterKeyNode","SCENERY/nodes/HBox","PHET_CORE/inherit","SCENERY_PHET/keyboard/LetterKeyNode","PHET_CORE/merge","SCENERY_PHET/keyboard/PageDownKeyNode","SCENERY_PHET/keyboard/PageUpKeyNode","SCENERY_PHET/PhetFont","SCENERY_PHET/PlusNode","SCENERY/nodes/RichText","SCENERY_PHET/sceneryPhet","SCENERY_PHET/SceneryPhetA11yStrings","SCENERY_PHET/keyboard/ShiftKeyNode","SCENERY_PHET/keyboard/SpaceKeyNode","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","SCENERY/nodes/VBox","string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseHeadingPattern","string!SCENERY_PHET/keyboardHelpDialog.grabOrReleaseLabelPattern","string!SCENERY_PHET/keyboardHelpDialog.or"],function(t){"use strict";function e(t,e,i){i=h({headingContentSpacing:N,headingFont:R,headingMaxWidth:k,labelMaxWidth:x,align:P,a11yContentTagName:"ul"},i);for(var n=new T(t,{font:i.headingFont,maxWidth:i.headingMaxWidth,tagName:"h2",innerContent:t}),r=[],s=[],a=0;a0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("mipmap!JOIST/keyboard-icon-on-white.png",function(){var t=window.phet.chipper.mipmaps["JOIST/keyboard-icon-on-white.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url,t.canvas=document.createElement("canvas"),t.canvas.width=t.width,t.canvas.height=t.height;var e=t.canvas.getContext("2d");t.updateCanvas=function(){t.img.complete&&(void 0===t.img.naturalWidth||t.img.naturalWidth>0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("JOIST/KeyboardHelpButton",["require","SCENERY/nodes/Image","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","JOIST/KeyboardHelpDialog","PHET_CORE/merge","mipmap!JOIST/keyboard-icon.png","mipmap!JOIST/keyboard-icon-on-white.png"],function(t){"use strict";function e(t,e,n,r){var s=this,p=null;(r=l({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:2,tagName:"button",innerContent:c},r)).listener=function(){p||(p=new a(t,{focusOnCloseNode:s,tandem:n.createTandem("keyboardHelpDialog")})),p.show(),s.buttonModel.isA11yClicking()&&p.focusCloseButton()};var m=new i(h,{scale:d,pickable:!1});o.call(this,m,e,n,r),e.link(function(t){m.image="black"===t?h:u})}var i=t("SCENERY/nodes/Image"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),o=t("JOIST/JoistButton"),a=t("JOIST/KeyboardHelpDialog"),l=t("PHET_CORE/merge"),h=t("mipmap!JOIST/keyboard-icon.png"),u=t("mipmap!JOIST/keyboard-icon-on-white.png"),c=s.hotKeysAndHelp.value,d=.3/h[0].height*67;return r.register("KeyboardHelpButton",e),n(o,e)}),i("JOIST/NavigationBarSoundToggleButton",["require","UTTERANCE_QUEUE/ActivationUtterance","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY/nodes/Rectangle","KITE/Shape","SUN/ToggleNode","UTTERANCE_QUEUE/utteranceQueue","DOT/Vector2"],function(t){"use strict";function e(t,e,n,r){var s=this;r=a({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:0,listener:function(){t.set(!t.get())},tagName:"button",innerContent:f},r);var R=new l,x=new l,k=new u(0,0,v,y,{fill:"transparent"});R.addChild(k),x.addChild(k);var L=new h((new c).moveTo(b,0).lineTo(_,S).lineTo(O,S).arc(O,S+O,O,1.5*Math.PI,Math.PI,!0).lineToRelative(0,C-2*O).arc(O,S+C-O,O,Math.PI,.5*Math.PI,!0).lineToRelative(_-O,0).lineTo(b,T).lineTo(b,0).close(),{stroke:"black",lineWidth:1.5,lineJoin:"round",centerY:x.centerY,left:0});R.addChild(L),x.addChild(L);var M=new h((new c).moveTo(0,0).lineTo(A,A).moveTo(0,A).lineTo(A,0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:x.width,centerY:x.centerY});x.addChild(M);var Y=new h((new c).arc(0,0,N,I,D,!0).moveToPoint(new m(P,0).rotated(I)).arc(0,0,P,I,D,!0).moveToPoint(new m(w,0).rotated(I)).arc(0,0,w,I,D,!0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:R.width,centerY:R.centerY});R.addChild(Y);var V=new d(t,[{value:!0,node:R},{value:!1,node:x}],{maxHeight:y});o.call(this,V,e,n,r);var B=new i;t.lazyLink(function(t){s.setAccessibleAttribute("aria-pressed",!t),B.alert=t?g:E,p.addToBack(B)}),this.setAccessibleAttribute("aria-pressed",!t.get()),e.link(function(t){var e="black"===t?"white":"black";L.stroke=e,M.stroke=e,Y.stroke=e})}var i=t("UTTERANCE_QUEUE/ActivationUtterance"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),o=t("JOIST/JoistButton"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Node"),h=t("SCENERY/nodes/Path"),u=t("SCENERY/nodes/Rectangle"),c=t("KITE/Shape"),d=t("SUN/ToggleNode"),p=t("UTTERANCE_QUEUE/utteranceQueue"),m=t("DOT/Vector2"),f=s.soundOnOffButton.value,g=s.simSoundOnString.value,E=s.simSoundOffString.value,y=22,v=1.13*y,T=.77*y,b=.58*T,_=.46*b,C=.35*T,S=(T-C)/2,O=1,A=.52*T,N=.63*T,R=.23*T,P=N-R,w=P-R,I=Math.PI/2.7,D=-1*I;return r.register("NavigationBarSoundToggleButton",e),n(o,e)}),i("TAMBO/tambo",["require","PHET_CORE/Namespace"],function(t){"use strict";return new(t("PHET_CORE/Namespace"))("tambo")}),i("TAMBO/audioContextStateChangeMonitor",["require","TAMBO/tambo"],function(t){"use strict";var e=[],i=[],n={addStateChangeListener:function(t,n){var r=e.indexOf(t),s=void 0;-1===r?(e.push(t),r=e.length-1,s=[],i.push(s),t.onstatechange=function(){_.clone(s).forEach(function(e){e(t.state)})}):s=i[r],s.push(n)},removeStateChangeListener:function(t,n){var r=e.indexOf(t),s=i[r],o=s.indexOf(n);s.splice(o,1)},hasListener:function(t,n){var r=!1,s=e.indexOf(t);if(s>=0){var o=i[s];o&&(r=o.indexOf(n)>=0)}return r}};return t("TAMBO/tambo").register("audioContextStateChangeMonitor",n),n}),i("SCENERY/util/DisplayedProperty",["require","AXON/BooleanProperty","SCENERY/scenery"],function(t){"use strict";var e=t("AXON/BooleanProperty"),i=t("SCENERY/scenery"),n=function(t){function i(t,e,n){_classCallCheck(this,i);var r=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,!1,n));r.node=t,r.display=e,r.updateListener=r.updateValue.bind(r),r.addedInstancelistener=r.addedInstance.bind(r),r.removedInstancelistener=r.removedInstance.bind(r),t.onStatic("addedInstance",r.addedInstancelistener),t.onStatic("removedInstance",r.removedInstancelistener);for(var s=t.instances,o=0;o=0?t.url.lastIndexOf("?"):t.url.length):t.base64.slice(t.base64.indexOf(":")+1,t.base64.indexOf(";")),i.canPlayType&&i.canPlayType(s))if(t.url){var o=new XMLHttpRequest;o.open("GET",t.url,!0),o.responseType="arraybuffer",o.onload=function(){e.decodeAudioData(o.response,n,r)},o.onerror=function(e){console.error("unable to obtain sound data, url = "+t.url+", err = "+e)},o.send()}else{for(var a=t.base64.replace(new RegExp("^.*,"),""),l=atob(a),h=new Uint8Array(l.length),u=0;uC.maxButtonWidth?(w.maxWidth=O.maxWidth=C.maxButtonWidth-(this.width-I.width),D.setRect(0,0,I.width,D.height),D.center=I.center,k.spacing=L.spacing=D.width+2*T,k.center=L.center=I.center):w.maxWidth=this.width,this.setAccessibleAttribute("aria-roledescription",b);var M=n.getOuterLineWidthFromNode(this);this.focusHighlight=f.bounds(this.bounds.setMinY(this.bounds.minY-M/2)),this.mutate(C)}var i=t("AXON/DerivedProperty"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),o=t("JOIST/joist"),a=t("JOIST/JoistA11yStrings"),l=t("PHET_CORE/merge"),h=t("SCENERY/nodes/Node"),u=t("SCENERY_PHET/PhetColorScheme"),c=t("SCENERY_PHET/PhetFont"),d=t("AXON/Property"),p=t("SUN/buttons/PushButtonModel"),m=t("SCENERY/nodes/Rectangle"),f=t("KITE/Shape"),g=t("PHETCOMMON/util/StringUtils"),E=t("TANDEM/Tandem"),y=t("SCENERY/nodes/Text"),v=(t("DOT/Util"),t("SCENERY/nodes/VBox")),T=4,b=a.simScreen.value,_=a.screenNumberPattern.value;return o.register("NavigationBarScreenButton",e),s(h,e)}),i("JOIST/KebabMenuIcon",["require","JOIST/joist","SCENERY/nodes/Path","KITE/Shape"],function(t){"use strict";var e=t("JOIST/joist"),i=t("SCENERY/nodes/Path"),n=t("KITE/Shape"),r=2.5,s=function(t){function e(t){_classCallCheck(this,e);for(var i=new n,s=0;s<3;s++)i.circle(0,3.543*s*r,r);return _possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,i,t))}return _inherits(e,i),e}();return e.register("KebabMenuIcon",s)}),i("JOIST/PhetButtonIO",["require","TANDEM/types/BooleanIO","JOIST/joist","SCENERY/util/NodeProperty","TANDEM/types/NullableIO","TANDEM/types/ObjectIO","AXON/PropertyIO"],function(t){"use strict";var e=t("TANDEM/types/BooleanIO"),i=t("JOIST/joist"),n=t("SCENERY/util/NodeProperty"),r=t("TANDEM/types/NullableIO"),s=t("TANDEM/types/ObjectIO"),o=t("AXON/PropertyIO"),a=function(t){function i(t,s){_classCallCheck(this,i);var a=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,s)),l=new n(t,"pickability","pickable",{phetioReadOnly:t.phetioReadOnly,tandem:t.tandem.createTandem("pickableProperty"),phetioType:o(r(e)),phetioDocumentation:"Set whether the phetButton will be pickable (and hence interactive), see the NodeIO documentation for more details"});return a.disposePhetButtonIO=function(){l.dispose()},a}return _inherits(i,s),_createClass(i,[{key:"dispose",value:function(){this.disposePhetButtonIO()}}],[{key:"toStateObject",value:function(){}},{key:"fromStateObject",value:function(t){return t}}]),i}();return a.documentation="The PhET Button in the bottom right of the screen",a.validator={isValidValue:function(t){return t instanceof phet.joist.PhetButton}},a.typeName="PhetButtonIO",s.validateSubtype(a),i.register("PhetButtonIO",a)}),i("string!JOIST/credits.contributors",function(){return window.phet.chipper.strings.get("JOIST/credits.contributors")}),i("string!JOIST/credits.graphicArts",function(){return window.phet.chipper.strings.get("JOIST/credits.graphicArts")}),i("string!JOIST/credits.leadDesign",function(){return window.phet.chipper.strings.get("JOIST/credits.leadDesign")}),i("string!JOIST/credits.qualityAssurance",function(){return window.phet.chipper.strings.get("JOIST/credits.qualityAssurance")}),i("string!JOIST/credits.softwareDevelopment",function(){return window.phet.chipper.strings.get("JOIST/credits.softwareDevelopment")}),i("string!JOIST/credits.soundDesign",function(){return window.phet.chipper.strings.get("JOIST/credits.soundDesign")}),i("string!JOIST/credits.team",function(){return window.phet.chipper.strings.get("JOIST/credits.team")}),i("string!JOIST/credits.thanks",function(){return window.phet.chipper.strings.get("JOIST/credits.thanks")}),i("string!JOIST/credits.title",function(){return window.phet.chipper.strings.get("JOIST/credits.title")}),i("string!JOIST/credits.translation",function(){return window.phet.chipper.strings.get("JOIST/credits.translation")}),i("JOIST/CreditsNode",["require","PHET_CORE/inherit","JOIST/joist","PHET_CORE/merge","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","SCENERY/nodes/VBox","SCENERY/nodes/VStrut","string!JOIST/credits.contributors","string!JOIST/credits.graphicArts","string!JOIST/credits.leadDesign","string!JOIST/credits.qualityAssurance","string!JOIST/credits.softwareDevelopment","string!JOIST/credits.soundDesign","string!JOIST/credits.team","string!JOIST/credits.thanks","string!JOIST/credits.title","string!JOIST/credits.translation"],function(t){"use strict";function e(t,e){e=r({align:"left",spacing:1,maxWidth:550},e);var i=new s({size:14,weight:"bold"}),n={font:new s(12),align:"left",lineWrap:e.maxWidth,tagName:"p"},b=[];if(b.push(new l(v,{font:i,tagName:"h2",innerContent:v})),t.leadDesign){var _=a.format(p,"‪"+t.leadDesign+"‬");b.push(new o(_,r({innerContent:_},n)))}if(t.softwareDevelopment){var C=a.format(f,"‪"+t.softwareDevelopment+"‬");b.push(new o(C,r({innerContent:C},n)))}if(t.team){var S=a.format(E,"‪"+t.team+"‬");b.push(new o(S,r({innerContent:S},n)))}if(t.contributors){var O=a.format(c,"‪"+t.contributors+"‬");b.push(new o(O,r({innerContent:O},n)))}if(t.qualityAssurance){var A=a.format(m,"‪"+t.qualityAssurance+"‬");b.push(new o(A,r({innerContent:A},n)))}if(t.graphicArts){var N=a.format(d,"‪"+t.graphicArts+"‬");b.push(new o(N,r({innerContent:N},n)))}if(t.soundDesign){var R=a.format(g,"‪"+t.soundDesign+"‬");b.push(new o(R,r({innerContent:R},n)))}if(t.translation&&(b.length>0&&b.push(new u(10)),b.push(new l(T,{font:i,tagName:"h2",innerContent:T})),b.push(new o(t.translation,n))),t.thanks){b.length>0&&b.push(new u(10)),b.push(new l(y,{font:i,tagName:"h2",innerContent:y}));var P=new o(t.thanks,n);P.innerContent=t.thanks,b.push(P)}e.children=b,h.call(this,e),this.disposeCreditsNode=function(){b.forEach(function(t){t.dispose&&t.dispose()})}}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist"),r=t("PHET_CORE/merge"),s=t("SCENERY_PHET/PhetFont"),o=t("SCENERY/nodes/RichText"),a=t("PHETCOMMON/util/StringUtils"),l=t("SCENERY/nodes/Text"),h=t("SCENERY/nodes/VBox"),u=t("SCENERY/nodes/VStrut"),c=t("string!JOIST/credits.contributors"),d=t("string!JOIST/credits.graphicArts"),p=t("string!JOIST/credits.leadDesign"),m=t("string!JOIST/credits.qualityAssurance"),f=t("string!JOIST/credits.softwareDevelopment"),g=t("string!JOIST/credits.soundDesign"),E=t("string!JOIST/credits.team"),y=t("string!JOIST/credits.thanks"),v=t("string!JOIST/credits.title"),T=t("string!JOIST/credits.translation");return n.register("CreditsNode",e),i(h,e,{dispose:function(){this.disposeCreditsNode(),h.prototype.dispose.call(this)}})}),i("JOIST/packageJSON",["require","JOIST/joist","text!REPOSITORY/package.json"],function(t){"use strict";var e=t("JOIST/joist"),i=t("text!REPOSITORY/package.json"),n=JSON.parse(i);return e.register("packageJSON",n),n}),i("JOIST/UpdateState",["require","PHET_CORE/Enumeration","JOIST/joist"],function(t){"use strict";var e=t("PHET_CORE/Enumeration");return t("JOIST/joist").register("UpdateState",new e(["UP_TO_DATE","OUT_OF_DATE","CHECKING","OFFLINE","UNCHECKED"]))}),i("JOIST/updateCheck",["require","BRAND/Brand","AXON/EnumerationProperty","JOIST/joist","JOIST/packageJSON","JOIST/UpdateState"],function(t){"use strict";var e=t("BRAND/Brand"),i=t("AXON/EnumerationProperty"),n=t("JOIST/joist"),r=t("JOIST/packageJSON"),s=phet.preloads.chipper.SimVersion,o=t("JOIST/UpdateState"),a=r.name,l=s.parse(r.version,phet.chipper.buildTimestamp),h="https:"===document.location.protocol?"https:":"http:",u=function(){function t(){_classCallCheck(this,t),this.stateProperty=new i(o,o.UNCHECKED),this.latestVersion=null,this.ourVersion=l,this.timeoutCallback=this.timeout.bind(this),this.areUpdatesChecked="phet"===e.id&&!e.isPhetApp,this.updateURL="http://phet.colorado.edu/html-sim-update?simulation="+encodeURIComponent(a)+"&version="+encodeURIComponent(l.toString())+"&buildTimestamp="+encodeURIComponent(""+phet.chipper.buildTimestamp),this.timeoutId=-1}return _createClass(t,[{key:"clearTimeout",value:function(){window.clearTimeout(this.timeoutId)}},{key:"setTimeout",value:function(){this.timeoutId=window.setTimeout(this.timeoutCallback,15e3)}},{key:"resetTimeout",value:function(){this.stateProperty.value===o.CHECKING&&(this.clearTimeout(),this.setTimeout())}},{key:"timeout",value:function(){this.stateProperty.value=o.OFFLINE}},{key:"check",value:function(){var t=this;if(this.areUpdatesChecked&&(t.stateProperty.value===o.UNCHECKED||t.stateProperty.value===o.OFFLINE))if(this.ourVersion.isSimNotPublished)t.stateProperty.value=o.UP_TO_DATE;else{var e=new XMLHttpRequest;"withCredentials"in e&&(t.stateProperty.value=o.CHECKING,t.setTimeout(),e.onload=function(){t.clearTimeout();try{var i=JSON.parse(e.responseText);i.error?(console.log("Update check failure: "+i.error),t.stateProperty.value=o.OFFLINE):(t.updateURL&&(t.updateURL=i.updateURL),t.latestVersion=s.parse(i.latestVersion,i.buildTimestamp),"out-of-date"===i.state?t.stateProperty.value=o.OUT_OF_DATE:"up-to-date"===i.state?t.stateProperty.value=o.UP_TO_DATE:(console.log("Failed to get proper state: "+i.state),t.stateProperty.value=o.OFFLINE))}catch(e){t.stateProperty.value=o.OFFLINE}},e.onerror=function(){t.clearTimeout(),t.stateProperty.value=o.OFFLINE},e.open("post",h+"//phet.colorado.edu/services/check-html-updates",!0),e.send(JSON.stringify({api:"1.0",simulation:a,locale:phet.joist.sim.locale,currentVersion:t.ourVersion.toString(),buildTimestamp:phet.chipper.buildTimestamp})))}}}]),t}();return n.register("updateCheck",new u)}),i("SCENERY_PHET/SpinningIndicatorNode",["require","SCENERY/nodes/Circle","SCENERY/util/Color","PHET_CORE/inherit","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY/util/PaintColorProperty","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){t=s({indicatorSize:15,indicatorSpeed:1,elementFactory:e.rectangleFactory,elementQuantity:16,activeColor:"rgba(0,0,0,1)",inactiveColor:"rgba(0,0,0,0.15)"},t),this.options=t,o.call(this,t),this.indicatorRotation=2*Math.PI,this.activeColorProperty=new a(t.activeColor),this.inactiveColorProperty=new a(t.inactiveColor),this.angleDelta=2*Math.PI/t.elementQuantity,this.elements=[];for(var i=0,n=0;n'+_+"",{links:{url:p.updateURL},font:O})],tagName:"div"},t))},createOutOfDateDialogNode:function(t,e,n,a){return new f(r({spacing:15,maxWidth:550,children:[new f({spacing:5,align:"left",children:[new c(u.format(v,n),{font:new o(16),fontWeight:"bold"}),new c(u.format(S,e),{font:O})]}),new i({spacing:25,children:[new d(y,{baseColor:"#6f6",font:O,listener:function(){s(p.updateURL)}}),new d(T,{baseColor:"#ddd",font:O,listener:function(){t.hide()}})]})]},a))},createOfflineNode:function(t){return new i(r({spacing:0,maxWidth:550,children:[new g(20),new c(b,{font:new o(t.big?16:14),fontWeight:t.big?"bold":"normal"})],tagName:"p",innerContent:b},t))}};return n.register("UpdateNodes",A),A}),i("string!JOIST/versionPattern",function(){return window.phet.chipper.strings.get("JOIST/versionPattern")}),i("JOIST/AboutDialog",["require","SCENERY/accessibility/AccessiblePeer","JOIST/CreditsNode","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","JOIST/packageJSON","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","AXON/timer","JOIST/updateCheck","JOIST/UpdateNodes","JOIST/UpdateState","SCENERY/nodes/VBox","SCENERY/nodes/VStrut","string!JOIST/versionPattern"],function(t){"use strict";function e(t,e,s,o,p,b){var _=[],C=new d(t,{font:new h(28),maxWidth:T,tagName:"h1",innerContent:t});_.push(C);var S=c.format(v,e);if(_.push(new d(S,{font:new h(20),maxWidth:T,tagName:"p",innerContent:S})),phet.chipper.buildTimestamp&&_.push(new d(phet.chipper.buildTimestamp,{font:new h(13),maxWidth:T,tagName:"p",innerContent:phet.chipper.buildTimestamp})),m.areUpdatesChecked){var O={left:0,top:0},A=f.createCheckingNode(O),N=f.createUpToDateNode(O),R=f.createOutOfDateAboutNode(O),P=f.createOfflineNode(O);this.updateStepListener=A.stepListener,this.updateVisibilityListener=function(t){A.visible=t===g.CHECKING,N.visible=t===g.UP_TO_DATE,R.visible=t===g.OUT_OF_DATE,P.visible=t===g.OFFLINE,A.accessibleContentDisplayed=A.visible,N.accessibleContentDisplayed=N.visible,R.accessibleContentDisplayed=R.visible,P.accessibleContentDisplayed=P.visible},_.push(new a({children:[A,N,R,P],maxWidth:T}))}var w=[];if(o.name&&w.push(new u(o.name,{font:new h(16),supScale:.5,supYOffset:2,maxWidth:T,tagName:"h2",innerContent:o.name})),o.copyright){var I=phet.chipper.buildTimestamp?phet.chipper.buildTimestamp.split("-")[0]:(new Date).getFullYear(),D=c.fillIn(o.copyright,{year:I});w.push(new d(D,{font:new h(12),maxWidth:T,tagName:"p",innerContent:D}))}o.additionalLicenseStatement&&(this.additionalLicenseStatement=new u(o.additionalLicenseStatement,{font:new h(10),fill:"gray",align:"left",maxWidth:T,tagName:"p",innerContent:o.additionalLicenseStatement}),w.push(this.additionalLicenseStatement)),w.length>0&&(_.push(new y(15)),_=_.concat(w)),!s||"phet"!==o.id&&"phet-io"!==o.id||(_.push(new y(15)),this.creditsNode=new n(s,{maxWidth:T}),_.push(this.creditsNode));var x=o.getLinks(l.name,p);if(x&&x.length>0){_.push(new y(15));for(var k=0;k'+L.text+"",{links:{url:L.url},font:new h(14),maxWidth:T}))}}var M=new E({align:"left",spacing:5,children:_,tagName:"div"});r.call(this,M,{focusOnCloseNode:b,xSpacing:20,topMargin:20,bottomMargin:20,leftMargin:20,rightMargin:20}),this.addAriaLabelledbyAssociation({thisElementName:i.PRIMARY_SIBLING,otherNode:C,otherElementName:i.PRIMARY_SIBLING}),this.disposeAboutDialog=function(){this.creditsNode&&this.creditsNode.dispose(),this.additionalLicenseStatement&&this.additionalLicenseStatement.dispose()}}var i=t("SCENERY/accessibility/AccessiblePeer"),n=t("JOIST/CreditsNode"),r=t("SUN/Dialog"),s=t("PHET_CORE/inherit"),o=t("JOIST/joist"),a=t("SCENERY/nodes/Node"),l=t("JOIST/packageJSON"),h=t("SCENERY_PHET/PhetFont"),u=t("SCENERY/nodes/RichText"),c=t("PHETCOMMON/util/StringUtils"),d=t("SCENERY/nodes/Text"),p=t("AXON/timer"),m=t("JOIST/updateCheck"),f=t("JOIST/UpdateNodes"),g=t("JOIST/UpdateState"),E=t("SCENERY/nodes/VBox"),y=t("SCENERY/nodes/VStrut"),v=t("string!JOIST/versionPattern"),T=550;return o.register("AboutDialog",e),s(r,e,{show:function(){m.areUpdatesChecked&&!this.isShowingProperty.value&&(m.resetTimeout(),m.stateProperty.value!==g.OFFLINE&&m.stateProperty.value!==g.UNCHECKED||m.check(),p.addListener(this.updateStepListener),m.stateProperty.link(this.updateVisibilityListener)),r.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(r.prototype.hide.call(this),m.areUpdatesChecked&&(m.stateProperty.unlink(this.updateVisibilityListener),p.removeListener(this.updateStepListener)))},dispose:function(){this.disposeAboutDialog(),r.prototype.dispose.call(this)}})}),i("SUN/MenuItem",["require","SCENERY/accessibility/AccessibilityUtil","TANDEM/EventType","SCENERY/listeners/FireListener","SUN/FontAwesomeNode","PHET_CORE/inherit","PHET_CORE/merge","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","SUN/sun","TANDEM/Tandem","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e,s,o,c,S){var O=this;S=a({cursor:"pointer",tandem:d.optional,textFill:"black",phetioDocumentation:"Item buttons shown in a popup menu",phetioEventType:n.USER,tagName:"button",focusAfterCallback:!1,containerTagName:"li",containerAriaRole:"none",innerContent:o,ariaRole:"menuitem"},S),l.call(this);var A=new p(o,{font:new h(f),fill:S.textFill,maxWidth:E}),N=new u(0,0,t+T+b+v,e+_+_,C,C);this.addChild(N),this.addChild(A),A.left=N.left+T+v,A.centerY=N.centerY,this.addInputListener({enter:function(){N.fill=g},exit:function(){N.fill=null}});var R=function(t){s(t),c(t)};this.addInputListener(new r({tandem:S.tandem.createTandem("inputListener"),fire:R})),this.separatorBefore=S.separatorBefore;var P=void 0;if(S.checkedProperty){var w=new l({children:[m],right:A.left-y,centerY:A.centerY});P=function(t){w.visible=t},S.checkedProperty.link(P),this.addChild(w)}var I={click:function(t){R();var e=phet.joist.display.accessibleDOMElement;S.focusAfterCallback&&i.getNextFocusable(e).focus()}};this.addInputListener(I),this.mutate(S),this.disposeMenuItem=function(){S.checkedProperty&&S.checkedProperty.unlink(P),O.removeInputListener(I)}}var i=t("SCENERY/accessibility/AccessibilityUtil"),n=t("TANDEM/EventType"),r=t("SCENERY/listeners/FireListener"),s=t("SUN/FontAwesomeNode"),o=t("PHET_CORE/inherit"),a=t("PHET_CORE/merge"),l=t("SCENERY/nodes/Node"),h=t("SCENERY_PHET/PhetFont"),u=t("SCENERY/nodes/Rectangle"),c=t("SUN/sun"),d=t("TANDEM/Tandem"),p=t("SCENERY/nodes/Text"),m=new s("check",{fill:"rgba(0,0,0,0.7)",scale:.4}),f=18,g="#a6d2f4",E=400,y=2,v=m.width+y,T=2,b=5,_=3,C=5;return c.register("MenuItem",e),o(l,e,{dispose:function(){this.disposeMenuItem(),l.prototype.dispose.call(this)}})}),i("string!JOIST/options.title",function(){return window.phet.chipper.strings.get("JOIST/options.title")}),i("JOIST/OptionsDialog",["require","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","PHET_CORE/merge","SCENERY_PHET/PhetFont","TANDEM/Tandem","SCENERY/nodes/Text","string!JOIST/options.title"],function(t){"use strict";function e(t,e){(e=s({titleAlign:"center",bottomMargin:20,ySpacing:20,tandem:a.required},e)).title=new l(h,{font:new o(30),maxWidth:400,tandem:e.tandem.createTandem("title")});var n=t(e.tandem.createTandem("content"));i.call(this,n,e)}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("PHET_CORE/merge"),o=t("SCENERY_PHET/PhetFont"),a=t("TANDEM/Tandem"),l=t("SCENERY/nodes/Text"),h=t("string!JOIST/options.title");return r.register("OptionsDialog",e),n(i,e,{},{DEFAULT_FONT:new o(15),DEFAULT_SPACING:10})}),i("JOIST/PhetMenuIO",["require","JOIST/joist","TANDEM/types/ObjectIO"],function(t){"use strict";var e=t("JOIST/joist"),i=t("TANDEM/types/ObjectIO"),n=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,i),e}();return n.documentation="The PhET Menu in the bottom right of the screen",n.validator={isValidValue:function(t){return t instanceof phet.joist.PhetMenu}},n.typeName="PhetMenuIO",i.validateSubtype(n),e.register("PhetMenuIO",n)}),i("JOIST/ScreenshotGenerator",["require","SCENERY/util/CanvasContextWrapper","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(){}var i=t("SCENERY/util/CanvasContextWrapper"),n=t("PHET_CORE/inherit");return t("JOIST/joist").register("ScreenshotGenerator",e),n(Object,e,{},{generateScreenshot:function(t,e){e=e||"image/png";var n=document.createElement("canvas");n.width=t.display.width,n.height=t.display.height;var r=n.getContext("2d");r.fillStyle=t.display.domElement.style.backgroundColor,r.fillRect(0,0,n.width,n.height);var s=new i(n,r);t.rootNode.renderToCanvasSubtree(s);return n.toDataURL(e)}})}),i("JOIST/UpdateDialog",["require","SUN/Dialog","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","AXON/timer","JOIST/updateCheck","JOIST/UpdateNodes","JOIST/UpdateState"],function(t){"use strict";function e(t){function e(){var t=a.latestVersion?a.latestVersion.toString():"x.x.xx",e=a.ourVersion.toString();c.children=[l.createOutOfDateDialogNode(n,e,t,r)]}var n=this,r={centerX:0,centerY:0,big:!0},o=l.createCheckingNode(r),u=l.createUpToDateNode(r),c=new s({tagName:"div"}),d=l.createOfflineNode(r);e(),this.updateStepListener=o.stepListener,this.updateVisibilityListener=function(t){t===h.OUT_OF_DATE&&e(),o.visible=t===h.CHECKING,u.visible=t===h.UP_TO_DATE,c.visible=t===h.OUT_OF_DATE,d.visible=t===h.OFFLINE,o.accessibleContentDisplayed=o.visible,u.accessibleContentDisplayed=u.visible,c.accessibleContentDisplayed=c.visible,d.accessibleContentDisplayed=d.visible};var p=new s({children:[o,u,c,d],tagName:"div"});i.call(this,p,{focusOnCloseNode:t})}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/nodes/Node"),o=t("AXON/timer"),a=t("JOIST/updateCheck"),l=t("JOIST/UpdateNodes"),h=t("JOIST/UpdateState");return r.register("UpdateDialog",e),n(i,e,{show:function(){a.areUpdatesChecked&&!this.isShowingProperty.value&&(a.resetTimeout(),a.stateProperty.value!==h.OFFLINE&&a.stateProperty.value!==h.UNCHECKED||a.check(),o.addListener(this.updateStepListener),a.stateProperty.link(this.updateVisibilityListener)),i.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(i.prototype.hide.call(this),a.areUpdatesChecked&&(a.stateProperty.unlink(this.updateVisibilityListener),o.removeListener(this.updateStepListener)))}})}),i("string!JOIST/menuItem.about",function(){return window.phet.chipper.strings.get("JOIST/menuItem.about")}),i("string!JOIST/menuItem.enhancedSound",function(){return window.phet.chipper.strings.get("JOIST/menuItem.enhancedSound")}),i("string!JOIST/menuItem.fullscreen",function(){return window.phet.chipper.strings.get("JOIST/menuItem.fullscreen")}),i("string!JOIST/menuItem.getUpdate",function(){return window.phet.chipper.strings.get("JOIST/menuItem.getUpdate")}),i("string!JOIST/menuItem.mailInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.mailInputEventsLog")}),i("string!JOIST/menuItem.options",function(){return window.phet.chipper.strings.get("JOIST/menuItem.options")}),i("string!JOIST/menuItem.outputInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.outputInputEventsLog")}),i("string!JOIST/menuItem.phetWebsite",function(){return window.phet.chipper.strings.get("JOIST/menuItem.phetWebsite")}),i("string!JOIST/menuItem.reportAProblem",function(){return window.phet.chipper.strings.get("JOIST/menuItem.reportAProblem")}),i("string!JOIST/menuItem.screenshot",function(){return window.phet.chipper.strings.get("JOIST/menuItem.screenshot")}),i("string!JOIST/menuItem.submitInputEventsLog",function(){return window.phet.chipper.strings.get("JOIST/menuItem.submitInputEventsLog")}),i("JOIST/PhetMenu",["require","JOIST/AboutDialog","SCENERY/accessibility/AccessibilityUtil","BRAND/Brand","AXON/DerivedProperty","SCENERY/display/Display","SCENERY/util/FullScreen","PHET_CORE/inherit","JOIST/joist","SCENERY/accessibility/KeyboardUtil","SUN/MenuItem","PHET_CORE/merge","SCENERY/nodes/Node","PHET_CORE/openPopup","JOIST/OptionsDialog","SCENERY/nodes/Path","SCENERY_PHET/PhetFont","JOIST/PhetMenuIO","PHET_CORE/platform","SCENERY/nodes/Rectangle","JOIST/ScreenshotGenerator","KITE/Shape","TAMBO/soundManager","PHETCOMMON/util/StringUtils","TANDEM/Tandem","SCENERY/nodes/Text","JOIST/updateCheck","JOIST/UpdateDialog","JOIST/UpdateState","string!JOIST/menuItem.about","string!JOIST/menuItem.enhancedSound","string!JOIST/menuItem.fullscreen","string!JOIST/menuItem.getUpdate","string!JOIST/menuItem.mailInputEventsLog","string!JOIST/menuItem.options","string!JOIST/menuItem.outputInputEventsLog","string!JOIST/menuItem.phetWebsite","string!JOIST/menuItem.reportAProblem","string!JOIST/menuItem.screenshot","string!JOIST/menuItem.submitInputEventsLog"],function(t){"use strict";function e(t,e,l,h){var T="phet"===r.id,G=r.isPhetApp;(h=d({showSaveAndLoad:!1,phetioType:y,phetioState:!1,phetioDocumentation:"This menu is displayed when the PhET button is pressed.",tagName:"ul",ariaRole:"menu"},h)).tandem=l;var W=this;p.call(this);var j=null,K=null,J=null,Q=[{text:M,present:!!t.options.createOptionsDialogContent,callback:function(){K||(K=new f(t.options.createOptionsDialogContent,{tandem:A.optional})),K.show()},tandem:l.createTandem("optionsMenuItem"),phetioDocumentation:"This menu item shows an options dialog.",phetioState:!1,tagName:"button",focusAfterCallback:!0},{text:V,present:T,callback:function(){X||m("http://phet.colorado.edu/"+t.locale)},tagName:"button"},{text:Y,present:!!t.options.recordInputEventLog,callback:function(){console.log(t.getRecordedInputEventLogString())},tagName:"button"},{text:q,present:!!t.options.recordInputEventLog,callback:function(){t.submitEventLog()},tagName:"button"},{text:L,present:!!t.options.recordInputEventLog,callback:function(){t.mailEventLog()},tagName:"button"},{text:B,present:T&&!G,callback:function(){var e="http://phet.colorado.edu/files/troubleshooting/?sim="+encodeURIComponent(t.name)+"&version="+encodeURIComponent(t.version+" "+(phet.chipper.buildTimestamp?phet.chipper.buildTimestamp:"(require.js)"))+"&url="+encodeURIComponent(window.location.href)+"&dependencies="+encodeURIComponent(JSON.stringify({}));X||m(e)},tagName:"button"},{text:"QR code",present:phet.chipper.queryParameters.qrCode,callback:function(){X||m("http://api.qrserver.com/v1/create-qr-code/?data="+encodeURIComponent(window.location.href)+"&size=220x220&margin=0")},tagName:"button"},{text:k,present:R.areUpdatesChecked,textFill:new s([R.stateProperty],function(t){return t===w.OUT_OF_DATE?"#0a0":"#000"}),callback:function(){J||(J=new P(e)),J.show()},tagName:"button",focusAfterCallback:!0},{text:H,present:!v.ie9&&!G,callback:function(){var e=b.generateScreenshot(t);if(window.Blob&&new window.Blob){for(var i=e.slice("data:image/png;base64,".length),n=window.atob(i),r=new window.Uint8Array(n.length),s=0;s0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("mipmap!BRAND/logo-on-white.png",function(){var t=window.phet.chipper.mipmaps["BRAND/logo-on-white.png"];return window.phetImages=window.phetImages||[],t.forEach(function(t){t.img=new Image,window.phetImages.push(t.img),t.img.src=t.url,t.canvas=document.createElement("canvas"),t.canvas.width=t.width,t.canvas.height=t.height;var e=t.canvas.getContext("2d");t.updateCanvas=function(){t.img.complete&&(void 0===t.img.naturalWidth||t.img.naturalWidth>0)&&(e.drawImage(t.img,0,0),delete t.updateCanvas)}}),t}),i("JOIST/PhetButton",["require","SCENERY/nodes/Image","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","JOIST/KebabMenuIcon","SCENERY/nodes/Node","JOIST/PhetButtonIO","JOIST/PhetMenu","AXON/Property","JOIST/updateCheck","JOIST/UpdateState","mipmap!BRAND/logo.png","mipmap!BRAND/logo-on-white.png"],function(t){"use strict";function e(t,e,n){var r=new u(t,this,n.createTandem("phetMenu"),{showSaveAndLoad:t.options.showSaveAndLoad,closeCallback:function(){r.hide()}});c.multilink([t.boundsProperty,t.screenBoundsProperty,t.scaleProperty],function(t,e,i){if(t&&e&&i){r.right=t.right/i-2/i;var n=t.height-e.height;r.bottom=e.bottom/i+n/2/i}});var s={highlightExtensionWidth:6,highlightExtensionHeight:5,highlightCenterOffsetY:4,listener:function(){r.show()},phetioType:h,phetioDocumentation:"The button that appears at the right side of the navigation bar, which shows a menu when pressed",enabledPropertyOptions:{phetioFeatured:!0},tagName:"button",innerContent:m},y=new i(f,{scale:E,pickable:!1}),v=new a({left:y.width+8,bottom:y.bottom-.5,pickable:!1}),T=new l({children:[y,v]});o.call(this,T,e,n,s),c.multilink([e,t.showHomeScreenProperty,d.stateProperty],function(t,e,i){var n="black"!==t&&!e,r=i===p.OUT_OF_DATE;v.fill=n?r?"#0a0":"#222":r?"#3F3":"white",y.image=n?g:f}),this.buttonModel.enabledProperty.link(function(t){v.visible=t}),this.addInputListener({click:function(){r.show(),r.items[0].focus()}}),this.setAccessibleAttribute("aria-haspopup",!0)}var i=t("SCENERY/nodes/Image"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),o=t("JOIST/JoistButton"),a=t("JOIST/KebabMenuIcon"),l=t("SCENERY/nodes/Node"),h=t("JOIST/PhetButtonIO"),u=t("JOIST/PhetMenu"),c=t("AXON/Property"),d=t("JOIST/updateCheck"),p=t("JOIST/UpdateState"),m=s.phet.value,f=t("mipmap!BRAND/logo.png"),g=t("mipmap!BRAND/logo-on-white.png"),E=.28/f[0].height*108;return r.register("PhetButton",e),n(o,e)}),i("string!JOIST/simTitleWithScreenNamePattern",function(){return window.phet.chipper.strings.get("JOIST/simTitleWithScreenNamePattern")}),i("JOIST/NavigationBar",["require","JOIST/A11yButtonsHBox","SCENERY/accessibility/AccessiblePeer","AXON/DerivedProperty","DOT/Dimension2","JOIST/HomeButton","JOIST/HomeScreen","JOIST/HomeScreenView","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/NavigationBarScreenButton","SCENERY/nodes/Node","JOIST/PhetButton","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","string!JOIST/simTitleWithScreenNamePattern"],function(t){"use strict";function e(t,e,s,h){var u=this;this.screens=e,p.call(this,{tagName:"div",ariaRole:"region",labelTagName:"h2",labelContent:1===e.length?b:T}),this.navigationBarFillProperty=new r([s,t.lookAndFeel.navigationBarFillProperty],function(t,e){return t?a.BACKGROUND_COLOR:e}),this.background=new g(0,0,S.width,S.height,{pickable:!0,fill:this.navigationBarFillProperty}),this.addChild(this.background),this.barContents=new p,this.addChild(this.barContents);var c=t.name;if(phet.chipper.queryParameters.screens&&1===phet.chipper.queryParameters.screens.length&&e[0].name&&(c=E.fillIn(v,{simName:t.name,screenName:e[0].name})),this.titleTextNode=new y(c,{font:new f(16),fill:t.lookAndFeel.navigationBarTextFillProperty,tandem:h.createTandem("titleTextNode"),phetioDocumentation:"Displays the title of the simulation in the navigation bar (bottom left)"}),this.titleTextNode.setVisible(!1),this.barContents.addChild(this.titleTextNode),this.phetButton=new m(t,this.navigationBarFillProperty,h.createTandem("phetButton")),this.barContents.addChild(this.phetButton),this.a11yButtonsHBox=new i(t,this.navigationBarFillProperty,h.createTandem("a11yButtonsHBox")),this.barContents.addChild(this.a11yButtonsHBox),this.addAriaLabelledbyAssociation({thisElementName:n.PRIMARY_SIBLING,otherNode:this,otherElementName:n.LABEL_SIBLING}),1===e.length)this.titleTextNode.maxWidth=l.LAYOUT_BOUNDS.width-O-A-N-this.a11yButtonsHBox.width-N-this.phetButton.width-R;else{var k=Math.min(this.titleTextNode.width,.2*l.LAYOUT_BOUNDS.width),L=new p({tagName:"nav",ariaLabel:C}),M=new p({tagName:"ol"});L.addChild(M),L.setVisible(!1),this.barContents.addChild(L),this.homeButton=new o(S.height,t.lookAndFeel.navigationBarFillProperty,h.createTandem("homeButton"),{listener:function(){t.showHomeScreenProperty.value=!0,u.homeButton.buttonModel.isA11yClicking()&&t.homeScreen.view.focusHighlightedScreenButton()}}),phet.chipper.queryParameters.homeScreen&&M.addChild(this.homeButton);for(var Y=l.LAYOUT_BOUNDS.width/2-O-k-A-w-this.homeButton.width-I,V=l.LAYOUT_BOUNDS.width/2-N-this.a11yButtonsHBox.width-N-this.phetButton.width-R,B=2*Math.min(Y,V),H=(B-(e.length-1)*D)/e.length,q=_.map(e,function(e){return new d(t.lookAndFeel.navigationBarFillProperty,t.screenIndexProperty,t.screens,e,S.height,{maxButtonWidth:H,tandem:h.createTandem(e.screenTandem.name+"Button")})}),F=Math.max(x,_.maxBy(q,function(t){return t.width}).width)+D,U=0;U0&&(this.a11yButtonsHBox.centerY=this.phetButton.centerY),1!==this.screens.length&&(this.screenButtonsContainer.centerY=S.height/2,this.homeButton.centerY=S.height/2),this.layout(1,S.width,S.height),this.accessibleOrder=[L,this.a11yButtonsHBox,this.phetButton].filter(function(t){return void 0!==t}),s.link(function(t){u.titleTextNode.setVisible(!t),L&&L.setVisible(!t)})}var i=t("JOIST/A11yButtonsHBox"),n=t("SCENERY/accessibility/AccessiblePeer"),r=t("AXON/DerivedProperty"),s=t("DOT/Dimension2"),o=t("JOIST/HomeButton"),a=t("JOIST/HomeScreen"),l=t("JOIST/HomeScreenView"),h=t("PHET_CORE/inherit"),u=t("JOIST/joist"),c=t("JOIST/JoistA11yStrings"),d=t("JOIST/NavigationBarScreenButton"),p=t("SCENERY/nodes/Node"),m=t("JOIST/PhetButton"),f=t("SCENERY_PHET/PhetFont"),g=t("SCENERY/nodes/Rectangle"),E=t("PHETCOMMON/util/StringUtils"),y=t("SCENERY/nodes/Text"),v=t("string!JOIST/simTitleWithScreenNamePattern"),T=c.simScreensResourcesAndTools.value,b=c.simResourcesAndTools.value,C=c.simScreens.value,S=new s(l.LAYOUT_BOUNDS.width,40),O=10,A=25,N=6,R=10,P=0,w=5,I=w,D=0,x=60;return u.register("NavigationBar",e),h(p,e,{layout:function(t,e,i){this.background.rectWidth=e,this.background.rectHeight=i,this.barContents.setScaleMagnitude(t);var n=void 0;n=S.width*t0&&(this.a11yButtonsHBox.right=this.phetButton.left-N),1!==this.screens.length&&(this.screenButtonsContainer.x=n/2,this.homeButton.right=this.screenButtonsContainer.left-I,this.titleTextNode.maxWidth=this.homeButton.left-O-A)}},{NAVIGATION_BAR_SIZE:S})}),i("JOIST/Profiler",["require","PHET_CORE/inherit","JOIST/joist","DOT/Util"],function(t){"use strict";function e(){this.allTimes=[],this.histogram=[],this.longTimes=[],this.frameStartTime=0,this.previousFrameStartTime=0;for(var t=0;t')}var i=t("PHET_CORE/inherit"),n=t("JOIST/joist"),r=t("DOT/Util"),s=30;return n.register("Profiler",e),i(Object,e,{frameStarted:function(){this.frameStartTime=Date.now()},frameEnded:function(){if(this.allTimes.length>0&&this.allTimes.length%60==0){for(var t=0,e=0;e0&&(this.longTimes.sort(function(t,e){return e-t}),i=i+" — "+this.longTimes),$("#phetProfiler").html(i),e=0;ee.length-1)throw new Error("invalid screen index: "+t);P.push(e[i])}),0!==g){var D=_.indexOf(P,e[g-1]);g=D+1}e=P}r=S({showHomeScreen:e.length>1&&y&&0===g,screenIndex:0===g?0:g-1,credits:{},createOptionsDialogContent:null,homeScreenWarningNode:null,recordInputEventLog:!1,inputEventLogName:void 0,showSaveAndLoad:!1,accessibility:!1,keyboardHelpNode:null,supportsSound:!1,supportsEnhancedSound:!1,rootRenderer:"svg",vibrationManager:null,allowBackingScaleAntialiasing:!0},r),this.options=r,r.rootRenderer=phet.chipper.queryParameters.rootRenderer||r.rootRenderer,this.showHomeScreenProperty=new s(r.showHomeScreen,e.length>1?{tandem:M.generalTandem.createTandem("showHomeScreenProperty"),phetioFeatured:!0}:{}),this.screenIndexProperty=new R(r.screenIndex,{tandem:M.generalTandem.createTandem("screenIndexProperty"),phetioFeatured:!0,phetioDocumentation:"Indicates which screen is selected (0-indexed)",validValues:_.range(0,e.length),numberType:"Integer"}),this.activeProperty=new s(!phet.joist.playbackModeEnabledProperty.value,{tandem:M.generalTandem.createTandem("activeProperty"),phetioFeatured:!0,phetioDocumentation:"Determines whether the entire simulation is running and processing user input. Setting this property to false pauses the simulation, and prevents user interaction."}),this.browserTabVisibleProperty=new s(!0,{tandem:M.generalTandem.createTandem("browserTabVisibleProperty"),phetioDocumentation:"Indicates whether the browser tab containing the simulation is currently visible",phetioReadOnly:!0}),document.addEventListener("visibilitychange",function(){u.browserTabVisibleProperty.set("visible"===document.visibilityState)},!1),this.scaleProperty=new R(1),this.boundsProperty=new x(null),this.screenBoundsProperty=new x(null),this.currentScreenProperty=new x(null),this.lookAndFeel=new b,this.destroyed=!1,this.memoryMonitor=new C,this.isAccessible=phet.chipper.queryParameters.accessibility||phet.chipper.queryParameters.a11y||r.accessibility,this.supportsTouchA11y=this.isAccessible&&F,this.isAccessible&&(n.initialize(),H.initialize()),this.keyboardHelpNode=r.keyboardHelpNode,this.supportsSound=(phet.chipper.queryParameters.supportsSound||r.supportsSound)&&("enabled"===phet.chipper.queryParameters.sound||"muted"===phet.chipper.queryParameters.sound)&&!I.ie,this.supportsEnhancedSound=this.supportsSound&&(phet.chipper.queryParameters.supportsEnhancedSound||r.supportsEnhancedSound),this.supportsSound&&L.initialize(this.browserTabVisibleProperty,this.activeProperty),this.vibrationManager=r.vibrationManager,this.vibrationManager&&this.vibrationManager.initialize(this.browserTabVisibleProperty,this.activeProperty),window.phet.joist.sim=this,window.phet.joist.ScreenshotGenerator=k,this.name=t,this.version=w.version,this.credits=r.credits,this.frameCounter=0,this.resizePending=!0,this.locale=phet.chipper.locale||"en",QueryStringMachine.containsKey("locale")&&$("title").html(t),phet.chipper.queryParameters.recordInputEventLog&&(r.recordInputEventLog=!0,r.inputEventLogName=phet.chipper.queryParameters.recordInputEventLog),phet.chipper.queryParameters.playbackInputEventLog&&(r.playbackInputEventLog=!0,r.inputEventLogName=phet.chipper.queryParameters.playbackInputEventLog),(phet.chipper.queryParameters.fuzz||phet.chipper.queryParameters.fuzzMouse||phet.chipper.queryParameters.fuzzTouch||phet.chipper.queryParameters.fuzzBoard)&&(window.open=function(){return{focus:function(){},blur:function(){}}});$("body").css("padding","0").css("margin","0").css("overflow","hidden");var V=document.getElementById("aria-live-elements");V&&(V.style[d.userSelect]="none"),document.getElementById("sim")&&document.getElementById("sim").parentNode===document.body&&document.body.removeChild(document.getElementById("sim")),document.onselectstart=function(){return!1},this.rootNode=new A({renderer:r.rootRenderer}),this.display=new h(u.rootNode,{allowSceneOverflow:!1,allowWebGL:phet.chipper.queryParameters.webgl,accessibility:this.isAccessible,isApplication:!1,assumeFullWindow:!0,allowBackingScaleAntialiasing:r.allowBackingScaleAntialiasing});var U=phet.chipper.queryParameters.randomSeed*Math.PI;this.inputFuzzer=new E(this.display,U),this.keyboardFuzzer=new v(this.display,U),this.activeProperty.link(function(t){u.display.interactive=t}),u.display.domElement.id="sim",document.body.appendChild(u.display.domElement),p.start(this),phet.chipper.queryParameters.sceneryLog&&this.display.scenery.enableLogging(phet.chipper.queryParameters.sceneryLog),phet.chipper.queryParameters.sceneryStringLog&&this.display.scenery.switchLogToString(),this.display.initializeEvents({tandem:M.generalTandem.createTandem("controller").createTandem("input")}),window.phet.joist.rootNode=this.rootNode,window.phet.joist.display=this.display,u.display.setPointerDisplayVisible(phet.chipper.queryParameters.showPointers),u.display.setPointerAreaDisplayVisible(phet.chipper.queryParameters.showPointerAreas),u.display.setHitAreaDisplayVisible(phet.chipper.queryParameters.showHitAreas),u.display.setCanvasNodeBoundsVisible(phet.chipper.queryParameters.showCanvasNodeBounds),u.display.setFittedBlockBoundsVisible(phet.chipper.queryParameters.showFittedBlockBounds),this.screens=e,e.length>1?(this.homeScreen=new m(this,M.rootTandem.createTandem("homeScreen"),{warningNode:r.homeScreenWarningNode}),this.homeScreen.initializeModelAndView()):this.homeScreen=null,this.navigationBar=new O(this,e,this.showHomeScreenProperty,M.generalTandem.createTandem("navigationBar")),this.updateBackground=function(){u.lookAndFeel.backgroundColorProperty.value=u.currentScreenProperty.value?u.currentScreenProperty.value.backgroundColorProperty.value:u.homeScreen.backgroundColorProperty.value},this.lookAndFeel.backgroundColorProperty.link(function(t){u.display.backgroundColor=t}),M.PHET_IO_ENABLED&&q.initialize(),x.multilink([this.showHomeScreenProperty,this.screenIndexProperty],function(t,i){u.currentScreenProperty.value=t&&u.homeScreen?null:e[i],u.updateBackground()}),this.currentScreenProperty.lazyLink(function(t,e){null===e?u.homeScreen.view.interruptSubtreeInput():e.view.interruptSubtreeInput()}),window.addEventListener("pageshow",function(t){t.persisted&&window.location.reload()}),phet.chipper.queryParameters.legendsOfLearning&&new T(this).start()}var i=t("AXON/Action"),n=t("UTTERANCE_QUEUE/ariaHerald"),r=t("SCENERY_PHET/BarrierRectangle"),s=t("AXON/BooleanProperty"),o=t("DOT/Bounds2"),a=t("BRAND/Brand"),l=t("DOT/Dimension2"),h=t("SCENERY/display/Display"),u=t("DOT/Util"),c=t("AXON/Emitter"),d=t("SCENERY/util/Features"),p=t("JOIST/Heartbeat"),m=t("JOIST/HomeScreen"),f=t("JOIST/HomeScreenView"),g=t("PHET_CORE/inherit"),E=t("SCENERY/input/InputFuzzer"),y=t("JOIST/joist"),v=t("SCENERY/accessibility/KeyboardFuzzer"),T=t("JOIST/thirdPartySupport/LegendsOfLearningSupport"),b=t("JOIST/LookAndFeel"),C=t("JOIST/MemoryMonitor"),S=t("PHET_CORE/merge"),O=t("JOIST/NavigationBar"),A=t("SCENERY/nodes/Node"),N=t("TANDEM/types/NumberIO"),R=t("AXON/NumberProperty"),P=t("AXON/ObservableArray"),w=t("JOIST/packageJSON"),I=t("PHET_CORE/platform"),D=t("JOIST/Profiler"),x=t("AXON/Property"),k=t("JOIST/ScreenshotGenerator"),L=t("TAMBO/soundManager"),M=t("TANDEM/Tandem"),Y=t("AXON/timer"),V=t("JOIST/updateCheck"),B=t("SCENERY/util/Util"),H=t("UTTERANCE_QUEUE/utteranceQueue"),q=t("ifphetio!PHET_IO/phetioEngine"),F=I.android||I.mobileSafari;return phet.joist.elapsedTime=0,phet.joist.playbackModeEnabledProperty=new s(phet.chipper.queryParameters.playbackMode),y.register("Sim",e),g(Object,e,{finishInit:function(t){var e=this;this.homeScreen&&this.rootNode.addChild(this.homeScreen.view),_.each(t,function(t){t.view.layerSplit=!0,e.rootNode.addChild(t.view)}),this.rootNode.addChild(this.navigationBar),x.multilink([this.showHomeScreenProperty,this.screenIndexProperty],function(i,n){e.homeScreen&&(i?(e.homeScreen.activeProperty.set(!0),e.homeScreen.view.setVisible(!0)):(e.homeScreen.view.setVisible(!1),e.homeScreen.activeProperty.set(!1)));for(var r=0;r0&&this.stepSimulation(i)},getSelectedScreen:function(){return this.showHomeScreenProperty.value?null:this.screens[this.screenIndexProperty.value]},stepSimulation:function(t){this.stepSimulationAction.execute(t)},setAccessibleViewsVisible:function(t){for(var e=0;e=0||i.indexOf("/")<0||i.indexOf("..")>=0)){var n=i.slice(0,i.indexOf("/")),r=i.slice(i.lastIndexOf("/")+1),s=n.toLowerCase().split("_"),o=[s[0]].concat(s.slice(1).map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("");if(r!==o&&r!==o+"Namespace"){var a=phet[o]&&phet[o][r];a||e("not namespaced: "+o+"."+r),a&&a!==t[i]&&e(o+"."+r+" is different than the expected namespaced object")}}};e(function(t){console.log(t)}),e(function(t){})};return t("JOIST/joist").register("checkNamespaces",e),e}),i("PHET_IO/phetioCommandProcessor",function(){return function(){return function(){}}}),i("JOIST/SimLauncher",["require","TANDEM/Tandem","JOIST/checkNamespaces","JOIST/joist","DOT/Random","ifphetio!PHET_IO/dataStream","ifphetio!PHET_IO/phetioCommandProcessor"],function(t){"use strict";var e=t("TANDEM/Tandem"),i=(t("JOIST/checkNamespaces"),t("JOIST/joist")),n=t("DOT/Random"),r=t("ifphetio!PHET_IO/dataStream"),s=t("ifphetio!PHET_IO/phetioCommandProcessor"),o={launch:function(t){function i(){window.phet.joist.launchSimulation=function(){e.launch(),r.launch&&r.launch(),phet.joist.random=new n({staticSeed:!0}),t()},phet.phetio&&s.initialize(),phet.chipper.queryParameters.postMessageOnReady&&window.parent&&window.parent.postMessage(JSON.stringify({type:"ready",url:window.location.href}),"*"),phet.phetio&&!phet.phetio.queryParameters.phetioStandalone||phet.chipper.queryParameters.playbackMode||window.phet.joist.launchSimulation()}function o(t){return!!t.complete&&(void 0===t.naturalWidth||0!==t.naturalWidth)}window.phet.joist.launchCalled=!0;var a=[],l=0;if(window.phetImages)for(var h=0;h