Scenery Debug Snapshot'+this.getDebugHTML()+"";window.open("data:text/html;charset=utf-8,"+encodeURIComponent(t))},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,a=(r=r.replace(/\>\\n<")).split("\n"),o="",l=0;l",u||(o+=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)}E.DOMDrawable&&t instanceof E.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 a=document.implementation.createHTMLDocument("");a.documentElement.innerHTML=this.domElement.outerHTML,a.documentElement.setAttribute("xmlns",a.documentElement.namespaceURI);var o=a.documentElement.getElementsByTagName("canvas");o=Array.prototype.slice.call(o);for(var l=0;l
'+(new window.XMLSerializer).serializeToString(t)+"
",o=new window.Image;o.onload=function(){s.drawImage(o,0,0),n(r.toDataURL())},o.onerror=function(){n(null)};var l=new window.TextEncoderLite("utf-8").encode(a),h=window.fromByteArray(l);o.src="data:image/svg+xml;base64,"+h},set focus(t){var e;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 c(null,{tandem:p.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:d(w(A)),phetioState:!1,phetioReadOnly:!0}),e.userGestureEmitter=new r,e.keyStateTracker=new h,e.assertSubtreeDisposed=function(t){},e}),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,a=0;a=0?i.substring(0,i.indexOf("?")):i)+"/../"}}),function(){function t(t){var e=t.split("."),i={png:"image/png",svg:"image/svg+xml",jpg:"image/jpeg",gif:"image/gif",cur:"image/x-icon",mp3:"audio/mpeg",m4a:"audio/mp4",ogg:"audio/ogg",oga:"audio/ogg",bma:"audio/webm",wav:"audio/wav",woff:"application/x-font-woff"}[e[e.length-1]];if(!i)throw new Error("Unknown mime type for filename: "+t);return"data:"+i+";base64,"+Buffer.from(global.phet.chipper.fs.readFileSync(t)).toString("base64")}void 0!==i&&i("../../chipper/js/common/loadFileAsDataURI",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),i("../../chipper/js/requirejs-plugins/registerLicenseEntry",[],function(){"use strict";return function(t,e,i,n,r){!function(t,e,i){var n=function(t,e){return"phet"!==e&&"phet-io"!==e||t&&("http://phet.colorado.edu"===t.projectURL||"Public Domain"===t.license||"NASA"===t.license)}(e,i)||e&&!!e.exception;if(n&&e&&e.exception){var r="license exception for "+t+": "+e.exception;global.phet.chipper.grunt?global.phet.chipper.grunt.log.warn(r):console.log("WARNING: "+r)}return n}(t,e,i)?r.error(new Error("unacceptable license entry for "+t)):(global.phet.chipper.licenseEntries=global.phet.chipper.licenseEntries||{},global.phet.chipper.licenseEntries[n]=global.phet.chipper.licenseEntries[n]||{},global.phet.chipper.licenseEntries[n][t]=e,r(null))}}),i("sound",{load:function(t){throw new Error("Dynamic load not allowed: "+t)}}),i("sound!TAMBO/empty_apartment_bedroom_06_resampled.mp3",function(){return{base64:"data:audio/mpeg;base64,//twxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAvAAA6xgAFBQoKEBAVFRsbICAmJisrKzExNjY7O0FBRkZMTFFRV1dXXFxiYmdnbGxycnd3fX2CgoKIiI2Nk5OYmJ2do6OoqK6urrOzubm+vsTEycnOztTU2dnZ39/k5Orq7+/19fr6//8AAAA5TEFNRTMuOTlyAc0AAAAAAAAAABRgJAW0QgAAYAAAOsbaTGT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7cMQAAA7dBSqUMwACca6u+zCwACApgAAXXczyPLdxZhAGAydwQABDIj/xEZEREf+Lu7u7/u7ve0Rd3etERv//7EAGAydsYQhyCEf3va73/vdxEREREE78RGRBMmnYPg+DgIHC5QH3rB/EAIHCCgQBAoCDsEFAgCBQ5BAMS4P8Hwff8Tg+/Ln/wfw/dtCpCmhkRCphx5RJJZZeBkRuh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qqqqqqqqg=="}}),i("TAMBO/soundManager",["require","TAMBO/audioContextStateChangeMonitor","AXON/BooleanProperty","SCENERY/display/Display","SCENERY/util/DisplayedProperty","TAMBO/phetAudioContext","PHET_CORE/platform","AXON/Property","TAMBO/soundConstants","TAMBO/soundInfoDecoder","TAMBO/SoundLevelEnum","TAMBO/tambo","TAMBO/TamboQueryParameters","TANDEM/Tandem","sound!TAMBO/empty_apartment_bedroom_06_resampled.mp3"],function(t){"use strict";var e=t("TAMBO/audioContextStateChangeMonitor"),i=t("AXON/BooleanProperty"),n=t("SCENERY/display/Display"),r=t("SCENERY/util/DisplayedProperty"),s=t("TAMBO/phetAudioContext"),a=t("PHET_CORE/platform"),o=t("AXON/Property"),l=t("TAMBO/soundConstants"),h=t("TAMBO/soundInfoDecoder"),u=t("TAMBO/SoundLevelEnum"),c=t("TAMBO/tambo"),d=t("TAMBO/TamboQueryParameters"),p=t("TANDEM/Tandem"),f=t("sound!TAMBO/empty_apartment_bedroom_06_resampled.mp3"),m=.02,g=l.DEFAULT_LINEAR_GAIN_CHANGE_TIME,E=new(function(){function t(){_classCallCheck(this,t),this.enabledProperty=new i("enabled"===phet.chipper.queryParameters.sound,{tandem:p.generalTandem.createTandem("soundEnabledProperty")}),this.enhancedSoundEnabledProperty=new i(phet.chipper.queryParameters.enhancedSoundInitiallyEnabled),this.soundGeneratorInfoArray=[],this._masterOutputLevel=1,this._reverbLevel=m,this.gainNodesForClasses={},this.initialized=!1}return _createClass(t,[{key:"initialize",value:function(t,i,r){var l=this,u=this;r=_.extend({classes:["sim-specific","user-interface"]},r);var c=s.currentTime,d=s.createDynamicsCompressor();if(d.threshold.setValueAtTime(-6,c),d.knee.setValueAtTime(5,c),d.ratio.setValueAtTime(12,c),d.attack.setValueAtTime(0,c),d.release.setValueAtTime(.25,c),d.connect(s.destination),this.masterGainNode=s.createGain(),this.masterGainNode.connect(d),this.convolver=s.createConvolver(),this.reverbGainNode=s.createGain(),this.reverbGainNode.connect(this.masterGainNode),this.reverbGainNode.gain.setValueAtTime(this._reverbLevel,s.currentTime),this.convolver.connect(this.reverbGainNode),this.dryGainNode=s.createGain(),this.dryGainNode.gain.setValueAtTime(1-this._reverbLevel,s.currentTime),this.dryGainNode.gain.linearRampToValueAtTime(1-this._reverbLevel,s.currentTime+g),this.dryGainNode.connect(this.masterGainNode),h.decode(f,s,function(t){u.convolver.buffer=t},function(){console.log("Error: Unable to decode audio data.")}),r.classes.forEach(function(t){var e=s.createGain();e.connect(l.convolver),e.connect(l.dryGainNode),l.gainNodesForClasses[t]=e}),o.multilink([this.enabledProperty,t,i],function(t,e,i){var n=t&&e&&i?l._masterOutputLevel:0;l.masterGainNode.gain.linearRampToValueAtTime(n,s.currentTime+g)}),!s.isStubbed){if(a.mobileSafari){var p=function t(){"running"!==s.state&&s.resume().catch(function(t){}),window.removeEventListener("touchstart",t,!1),n.userGestureEmitter.removeListener(t)};window.addEventListener("touchstart",p,!1),n.userGestureEmitter.addListener(p)}else"running"!==s.state?(phet.log&&phet.log("The audio context was not running when soundManager.init was called, adding user gesture listener to resume"),n.userGestureEmitter.addListener(function t(){phet.log&&phet.log("userGestureEmitter fired, phetAudioContext.state = "+s.state),"running"!==s.state?(phet.log&&phet.log("attempting to resume audio context after user gesture, current state = "+s.state),s.resume().then(function(){phet.log&&phet.log("resume of audio context completed, state = "+s.state),n.userGestureEmitter.hasListener(t)?(n.userGestureEmitter.removeListener(t),phet.log&&phet.log("removed resumption listener after state change")):phet.log&&phet.log("resumption listener was already removed")}).catch(function(t){})):(phet.log&&phet.log("audio context was (apparently) automatically resumed, removing resumption listener"),n.userGestureEmitter.removeListener(t))})):phet.log&&phet.log("audio context was running at load time for soundManager");var m=s.state;e.addStateChangeListener(s,function(t){phet.log&&phet.log("audio context state changed, old state = "+m+", new state = "+t+", audio context time = "+s.currentTime),"running"===m&&"running"!==t&&(phet.log&&phet.log("attempting to resume audio context in "+t+" state"),s.resume().then(function(){phet.log&&phet.log("resume of audio context completed, state = "+s.state)}).catch(function(t){})),m=t})}this.initialized=!0}},{key:"addSoundGenerator",value:function(t,e){if(!this.initialized)return console.warn("an attempt was made to add a sound generator to an uninitialized sound manager, ignoring (sound will not be produced)"),null;_.some(this.soundGeneratorInfoArray,function(e){return e.soundGenerator===t});null===(e=_.extend({sonificationLevel:u.BASIC,associatedViewNode:null,className:null},e)).className?(t.connect(this.convolver),t.connect(this.dryGainNode)):t.connect(this.gainNodesForClasses[e.className]);var i={soundGenerator:t,sonificationLevel:e.sonificationLevel};this.soundGeneratorInfoArray.push(i),t.addEnableControlProperty(this.enabledProperty),e.sonificationLevel===u.ENHANCED&&t.addEnableControlProperty(this.enhancedSoundEnabledProperty),e.associatedViewNode&&t.addEnableControlProperty(new r(e.associatedViewNode,phet.joist.display))}},{key:"removeSoundGenerator",value:function(t){if(!this.initialized)return console.warn("an attempt was made to remove a sound generator from an uninitialized sound manager, ignoring"),null;for(var e=null,i=0;i=1&&e.isEmbeddingMark(t.charAt(n-1));)n--;if(i>=n||i>=t.length)return"";for(var a=0;a=0;){a.push(e.embeddedSlice(t,l,l+s.index));var h=s.index+s.length;o=o.slice(h),l+=h}return a.push(e.embeddedSlice(t,l)),void 0!==n&&(a=_.first(a,n)),a},stripEmbeddingMarks:function(t){return t.replace(/\u202a|\u202b|\u202c/g,"")},embeddedDebugString:function(t){return t.replace(/\u202a/g,"[LTR]").replace(/\u202b/g,"[RTL]").replace(/\u202c/g,"[POP]")},endsWith:function(t,e,i){var n=t.toString();("number"!=typeof i||!isFinite(i)||Math.floor(i)!==i||i>n.length)&&(i=n.length),i-=e.length;var r=n.indexOf(e,i);return-1!==r&&r===i},assertContainsKey:function(t,e){}};return t("PHETCOMMON/phetcommon").register("StringUtils",e),e}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function r(t,e){for(var i=-1,n=null==t?0:t.length;++i"']/g,z=RegExp(H.source),G=RegExp(U.source),X=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,j=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$=/[\\^$.*+?()[\]{}|]/g,tt=RegExp($.source),et=/^\s+|\s+$/g,it=/^\s+/,nt=/\s+$/,rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ot=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ut=/\w*$/,ct=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,ft=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,yt=/['\n\r\u2028\u2029\\]/g,vt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",bt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+vt,St=RegExp("['’]","g"),Tt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Ct=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+vt,"g"),At=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",bt].join("|"),"g"),Nt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),wt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_t="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Pt={};Pt["[object Float32Array]"]=Pt["[object Float64Array]"]=Pt["[object Int8Array]"]=Pt["[object Int16Array]"]=Pt["[object Int32Array]"]=Pt["[object Uint8Array]"]=Pt["[object Uint8ClampedArray]"]=Pt["[object Uint16Array]"]=Pt["[object Uint32Array]"]=!0,Pt["[object Arguments]"]=Pt["[object Array]"]=Pt["[object ArrayBuffer]"]=Pt["[object Boolean]"]=Pt["[object DataView]"]=Pt["[object Date]"]=Pt["[object Error]"]=Pt["[object Function]"]=Pt["[object Map]"]=Pt["[object Number]"]=Pt["[object Object]"]=Pt["[object RegExp]"]=Pt["[object Set]"]=Pt["[object String]"]=Pt["[object WeakMap]"]=!1;var Rt={};Rt["[object Arguments]"]=Rt["[object Array]"]=Rt["[object ArrayBuffer]"]=Rt["[object DataView]"]=Rt["[object Boolean]"]=Rt["[object Date]"]=Rt["[object Float32Array]"]=Rt["[object Float64Array]"]=Rt["[object Int8Array]"]=Rt["[object Int16Array]"]=Rt["[object Int32Array]"]=Rt["[object Map]"]=Rt["[object Number]"]=Rt["[object Object]"]=Rt["[object RegExp]"]=Rt["[object Set]"]=Rt["[object String]"]=Rt["[object Symbol]"]=Rt["[object Uint8Array]"]=Rt["[object Uint8ClampedArray]"]=Rt["[object Uint16Array]"]=Rt["[object Uint32Array]"]=!0,Rt["[object Error]"]=Rt["[object Function]"]=Rt["[object WeakMap]"]=!1;var Ot,It={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xt=parseFloat,Dt=parseInt,kt="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,Mt="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,qt=kt||Mt||Function("return this")(),Lt="object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&exports&&!exports.nodeType&&exports,Yt=Lt&&"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module&&!module.nodeType&&module,Bt=Yt&&Yt.exports===Lt,Vt=Bt&&kt.process;t:{try{Ot=Vt&&Vt.binding&&Vt.binding("util");break t}catch(t){}Ot=void 0}var Ft=Ot&&Ot.isArrayBuffer,Ht=Ot&&Ot.isDate,Ut=Ot&&Ot.isMap,zt=Ot&&Ot.isRegExp,Gt=Ot&&Ot.isSet,Xt=Ot&&Ot.isTypedArray,Wt=y("length"),jt=v({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Kt=v({"&":"&","<":"<",">":">",'"':""","'":"'"}),Jt=v({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qt=function i(v){function vt(t){if(Hn(t)&&!Ra(t)&&!(t instanceof Ot)){if(t instanceof Ct)return t;if(Or.call(t,"__wrapped__"))return dn(t)}return new Ct(t)}function bt(){}function Ct(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=M}function Ot(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function It(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function se(t,e,i,n,s,a){var o,l=1&e,h=2&e,u=4&e;if(i&&(o=s?i(t,n,s,a):i(t)),o!==M)return o;if(!Fn(t))return t;if(n=Ra(t)){if(o=function(t){var e=t.length,i=t.constructor(e);return e&&"string"==typeof t[0]&&Or.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(t),!l)return ci(t,o)}else{var c=Bs(t),d="[object Function]"==c||"[object GeneratorFunction]"==c;if(Ia(t))return si(t,l);if("[object Object]"==c||"[object Arguments]"==c||d&&!s){if(o=h||d?{}:Ki(t),!l)return h?function(t,e){return di(t,Ys(t),e)}(t,function(t,e){return t&&di(e,nr(e),t)}(o,t)):function(t,e){return di(t,Ls(t),e)}(t,ee(o,t))}else{if(!Rt[c])return s?t:{};o=Ji(t,c,se,l)}}if(a||(a=new Yt),s=a.get(t))return s;a.set(t,o);var h=u?h?Fi:Vi:h?nr:ir,p=n?M:h(t);return r(p||t,function(n,r){p&&(r=n,n=t[r]),$t(o,r,se(n,e,i,r,t,a))}),o}function ae(t,e,i){var n=i.length;if(null==t)return!n;for(t=Tr(t);n--;){var r=i[n],s=e[r],a=t[r];if(a===M&&!(r in t)||!s(a))return!1}return!0}function oe(t,e,i){if("function"!=typeof t)throw new Nr("Expected a function");return Hs(function(){t.apply(M,i)},e)}function le(t,e,i,n){var r=-1,s=o,a=!0,u=t.length,c=[],d=e.length;if(!u)return c;i&&(e=h(e,C(i))),n?(s=l,a=!1):200<=e.length&&(s=N,a=!1,e=new Lt(e));t:for(;++re}function ve(t,e){return null!=t&&Or.call(t,e)}function be(t,e){return null!=t&&e in Tr(t)}function Se(t,e,i){for(var n=i?l:o,r=t[0].length,s=t.length,a=s,u=Er(s),c=1/0,d=[];a--;){p=t[a];a&&e&&(p=h(p,C(e))),c=as(p.length,c),u[a]=!i&&(e||120<=r&&120<=p.length)?new Lt(a&&p):M}var p=t[0],f=-1,m=u[0];t:for(;++fe.length?t:me(t,Ue(e,0,-1)),null==(e=null==t?t:t[hn(En(e))])?M:n(e,t,i)}function Ce(t){return Hn(t)&&"[object Arguments]"==Ee(t)}function Ae(t,e,i,n,r){if(t===e)e=!0;else if(null==t||null==e||!Hn(t)&&!Hn(e))e=t!=t&&e!=e;else t:{var s=Ra(t),a=Ra(e),o=s?"[object Array]":Bs(t),l=a?"[object Array]":Bs(e),h="[object Object]"==(o="[object Arguments]"==o?"[object Object]":o),a="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l);if((l=o==l)&&Ia(t)){if(!Ia(e)){e=!1;break t}s=!0,h=!1}if(l&&!h)r||(r=new Yt),e=s||qa(t)?Yi(t,e,i,n,Ae,r):function(t,e,i,n,r,s,a){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!s(new Br(t),new Br(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return kn(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=R;case"[object Set]":if(o||(o=x),t.size!=e.size&&!(1&n))break;return(i=a.get(t))?i==e:(n|=2,a.set(t,e),e=Yi(o(t),o(e),n,r,s,a),a.delete(t),e);case"[object Symbol]":if(Ns)return Ns.call(t)==Ns.call(e)}return!1}(t,e,o,i,n,Ae,r);else{if(!(1&i)&&(s=h&&Or.call(t,"__wrapped__"),o=a&&Or.call(e,"__wrapped__"),s||o)){t=s?t.value():t,e=o?e.value():e,r||(r=new Yt),e=Ae(t,e,i,n,r);break t}if(l)e:if(r||(r=new Yt),s=1&i,o=Vi(t),a=o.length,l=Vi(e).length,a==l||s){for(h=a;h--;){c=o[h];if(!(s?c in e:Or.call(e,c))){e=!1;break e}}if((l=r.get(t))&&r.get(e))e=l==e;else{l=!0,r.set(t,e),r.set(e,t);for(var u=s;++he?i:0,Zi(e,i)?t[e]:M}function Me(t,e,i){var n=-1;return e=h(e.length?e:[ur],C(zi())),t=Oe(t,function(t){return{a:h(e,function(e){return e(t)}),b:++n,c:t}}),function(t,e){var i=t.length;for(t.sort(e);i--;)t[i]=t[i].c;return t}(t,function(t,e){var n;t:{n=-1;for(var r=t.a,s=e.a,a=r.length,o=i.length;++n=o?l:l*("desc"==i[n]?-1:1);break t}}n=t.b-e.b}return n})}function qe(t,e,i){for(var n=-1,r=e.length,s={};++ne||9007199254740991e&&(e=-e>r?0:r+e),0>(i=i>r?r:i)&&(i+=r),r=e>i?0:i-e>>>0,e>>>=0,i=Er(r);++n=r){for(;n>>1,a=t[s];null!==a&&!Xn(a)&&(i?a<=e:ae.length?t:me(t,Ue(e,0,-1)))||delete t[hn(En(e))]}function Qe(t,e,i,n){for(var r=t.length,s=n?r:-1;(n?s--:++sn)return n?Ke(t[0]):[];for(var r=-1,s=Er(n);++r=n?t:Ue(t,e,i)}function si(t,e){if(e)return t.slice();var i=t.length,i=Vr?Vr(i):new t.constructor(i);return t.copy(i),i}function ai(t){var e=new t.constructor(t.byteLength);return new Br(e).set(new Br(t)),e}function oi(t,e){return new t.constructor(e?ai(t.buffer):t.buffer,t.byteOffset,t.length)}function li(t,e){if(t!==e){var i=t!==M,n=null===t,r=t==t,s=Xn(t),a=e!==M,o=null===e,l=e==e,h=Xn(e);if(!o&&!h&&!s&&t>e||s&&a&&l&&!o&&!h||n&&a&&l||!i&&l||!r)return 1;if(!n&&!s&&!h&&tr?M:s,r=1),e=Tr(e);++na&&o[0]!==h&&o[a-1]!==h?[]:I(o,h),(a-=l.length)i?i?Ve(e,t):e:(i=Ve(e,Zr(t/D(e))),Nt.test(e)?ri(k(i),0,t).join(""):i.slice(0,t))}function Pi(t,e,i,r){function s(){for(var e=-1,l=arguments.length,h=-1,u=r.length,c=Er(u+l),d=this&&this!==qt&&this instanceof s?o:t;++he||n)&&(1&t&&(s[2]=d[2],e|=1&i?0:4),(i=d[3])&&(n=s[3],s[3]=n?hi(n,i,d[4]):i,s[4]=n?I(s[3],"__lodash_placeholder__"):d[4]),(i=d[5])&&(n=s[5],s[5]=n?ui(n,i,d[6]):i,s[6]=n?I(s[5],"__lodash_placeholder__"):d[6]),(i=d[7])&&(s[7]=i),128&t&&(s[8]=null==s[8]?d[8]:as(s[8],d[8])),null==s[9]&&(s[9]=d[9]),s[0]=d[0],s[1]=e),t=s[0],e=s[1],i=s[2],n=s[3],r=s[4],!(o=s[9]=s[9]===M?l?0:t.length:ss(s[9]-h,0))&&24&e&&(e&=-25),an((d?xs:Fs)(e&&1!=e?8==e||16==e?bi(t,e,o):32!=e&&33!=e||r.length?Ci.apply(M,s):Pi(t,e,i,n):function(t,e,i){function n(){return(this&&this!==qt&&this instanceof n?s:t).apply(r?i:this,arguments)}var r=1&e,s=vi(t);return n}(t,e,i),s),t,e)}function Mi(t,e,i,n){return t===M||kn(t,_r[i])&&!Or.call(n,i)?e:t}function qi(t,e,i,n,r,s){return Fn(t)&&Fn(e)&&(s.set(e,t),De(t,e,M,qi,s),s.delete(e)),t}function Li(t){return zn(t)?M:t}function Yi(t,e,i,n,r,s){var a=1&i,o=t.length;if(o!=(l=e.length)&&!(a&&l>o))return!1;if((l=s.get(t))&&s.get(e))return l==e;var l=-1,h=!0,u=2&i?new Lt:M;for(s.set(t,e),s.set(e,t);++l(i=null==i?0:Kn(i))&&(i=ss(n+i,0)),f(t,zi(e,3),i)):-1}function fn(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var r=n-1;return i!==M&&(r=Kn(i),r=0>i?ss(n+r,0):as(r,n-1)),f(t,zi(e,3),r,!0)}function mn(t){return(null==t?0:t.length)?ce(t,1):[]}function gn(t){return t&&t.length?t[0]:M}function En(t){var e=null==t?0:t.length;return e?t[e-1]:M}function yn(t,e){return t&&t.length&&e&&e.length?Le(t,e):t}function vn(t){return null==t?t:us.call(t)}function bn(t){if(!t||!t.length)return[];var e=0;return t=a(t,function(t){if(qn(t))return e=ss(t.length,e),!0}),T(e,function(e){return h(t,y(e))})}function Sn(t,e){if(!t||!t.length)return[];var i=bn(t);return null==e?i:h(i,function(t){return n(e,M,t)})}function Tn(t){return t=vt(t),t.__chain__=!0,t}function Cn(t,e){return e(t)}function An(t,e){return(Ra(t)?r:Ps)(t,zi(e,3))}function Nn(t,e){return(Ra(t)?function(t,e){for(var i=null==t?0:t.length;i--&&!1!==e(t[i],i,t););return t}:Rs)(t,zi(e,3))}function wn(t,e){return(Ra(t)?h:Oe)(t,zi(e,3))}function _n(t,e,i){return e=i?M:e,e=t&&null==e?t.length:e,ki(t,128,M,M,M,M,e)}function Pn(t,e){var i;if("function"!=typeof e)throw new Nr("Expected a function");return t=Kn(t),function(){return 0<--t&&(i=e.apply(this,arguments)),1>=t&&(e=M),i}}function Rn(t,e,i){return e=i?M:e,t=ki(t,8,M,M,M,M,M,e),t.placeholder=Rn.placeholder,t}function On(t,e,i){return e=i?M:e,t=ki(t,16,M,M,M,M,M,e),t.placeholder=On.placeholder,t}function In(t,e,i){function n(e){var i=l,n=h;return l=h=M,f=e,c=t.apply(n,i)}function r(t){var i=t-p;return t-=f,p===M||i>=e||0>i||g&&t>=u}function s(){var t=Ea();if(r(t))return a(t);var i,n=Hs;i=t-f,t=e-(t-p),i=g?as(t,u-i):t,d=n(s,i)}function a(t){return d=M,E&&l?n(t):(l=h=M,c)}function o(){var t=Ea(),i=r(t);if(l=arguments,h=this,p=t,i){if(d===M)return f=t=p,d=Hs(s,e),m?n(t):c;if(g)return d=Hs(s,e),n(p)}return d===M&&(d=Hs(s,e)),c}var l,h,u,c,d,p,f=0,m=!1,g=!1,E=!0;if("function"!=typeof t)throw new Nr("Expected a function");return e=Qn(e)||0,Fn(i)&&(m=!!i.leading,u=(g="maxWait"in i)?ss(Qn(i.maxWait)||0,e):u,E="trailing"in i?!!i.trailing:E),o.cancel=function(){d!==M&&ks(d),f=0,l=p=h=d=M},o.flush=function(){return d===M?c:a(Ea())},o}function xn(t,e){function i(){var n=arguments,r=e?e.apply(this,n):n[0],s=i.cache;return s.has(r)?s.get(r):(n=t.apply(this,n),i.cache=s.set(r,n)||s,n)}if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Nr("Expected a function");return i.cache=new(xn.Cache||Mt),i}function Dn(t){if("function"!=typeof t)throw new Nr("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function kn(t,e){return t===e||t!=t&&e!=e}function Mn(t){return null!=t&&Vn(t.length)&&!Yn(t)}function qn(t){return Hn(t)&&Mn(t)}function Ln(t){if(!Hn(t))return!1;var e=Ee(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!zn(t)}function Yn(t){return!!Fn(t)&&("[object Function]"==(t=Ee(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function Bn(t){return"number"==typeof t&&t==Kn(t)}function Vn(t){return"number"==typeof t&&-1=t}function Fn(t){var e=void 0===t?"undefined":_typeof(t);return null!=t&&("object"==e||"function"==e)}function Hn(t){return null!=t&&"object"==(void 0===t?"undefined":_typeof(t))}function Un(t){return"number"==typeof t||Hn(t)&&"[object Number]"==Ee(t)}function zn(t){return!(!Hn(t)||"[object Object]"!=Ee(t))&&(null===(t=Fr(t))||"function"==typeof(t=Or.call(t,"constructor")&&t.constructor)&&t instanceof t&&Rr.call(t)==kr)}function Gn(t){return"string"==typeof t||!Ra(t)&&Hn(t)&&"[object String]"==Ee(t)}function Xn(t){return"symbol"==(void 0===t?"undefined":_typeof(t))||Hn(t)&&"[object Symbol]"==Ee(t)}function Wn(t){if(!t)return[];if(Mn(t))return Gn(t)?k(t):ci(t);if(Xr&&t[Xr]){t=t[Xr]();for(var e,i=[];!(e=t.next()).done;)i.push(e.value);return i}return("[object Map]"==(e=Bs(t))?R:"[object Set]"==e?x:sr)(t)}function jn(t){return t?(t=Qn(t))===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t==t?t:0:0===t?t:0}function Kn(t){var e=(t=jn(t))%1;return t==t?e?t-e:t:0}function Jn(t){return t?re(Kn(t),0,4294967295):0}function Qn(t){if("number"==typeof t)return t;if(Xn(t))return L;if(Fn(t)&&(t="function"==typeof t.valueOf?t.valueOf():t,t=Fn(t)?t+"":t),"string"!=typeof t)return 0===t?t:+t;t=t.replace(et,"");var e=dt.test(t);return e||ft.test(t)?Dt(t.slice(2),e?2:8):ct.test(t)?L:+t}function Zn(t){return di(t,nr(t))}function $n(t){return null==t?"":je(t)}function tr(t,e,i){return(t=null==t?M:me(t,e))===M?i:t}function er(t,e){return null!=t&&ji(t,e,be)}function ir(t){return Mn(t)?Vt(t):Pe(t)}function nr(t){if(Mn(t))t=Vt(t,!0);else if(Fn(t)){var e,i=nn(t),n=[];for(e in t)("constructor"!=e||!i&&Or.call(t,e))&&n.push(e);t=n}else{if(e=[],null!=t)for(i in Tr(t))e.push(i);t=e}return t}function rr(t,e){if(null==t)return{};var i=h(Fi(t),function(t){return[t]});return e=zi(e),qe(t,i,function(t,i){return e(t,i[0])})}function sr(t){return null==t?[]:A(t,ir(t))}function ar(t){return lo($n(t).toLowerCase())}function or(t){return(t=$n(t))&&t.replace(gt,jt).replace(Tt,"")}function lr(t,e,i){return t=$n(t),(e=i?M:e)===M?wt.test(t)?t.match(At)||[]:t.match(ot)||[]:t.match(e)||[]}function hr(t){return function(){return t}}function ur(t){return t}function cr(t){return _e("function"==typeof t?t:se(t,1))}function dr(t,e,i){var n=ir(e),s=fe(e,n);null!=i||Fn(e)&&(s.length||!n.length)||(i=e,e=t,t=this,s=fe(e,ir(e)));var a=!(Fn(i)&&"chain"in i&&!i.chain),o=Yn(t);return r(s,function(i){var n=e[i];t[i]=n,o&&(t.prototype[i]=function(){var e=this.__chain__;if(a||e){var i=t(this.__wrapped__);return(i.__actions__=ci(this.__actions__)).push({func:n,args:arguments,thisArg:t}),i.__chain__=e,i}return n.apply(t,u([this.value()],arguments))})}),t}function pr(){}function fr(t){return tn(t)?y(hn(t)):function(t){return function(e){return me(e,t)}}(t)}function mr(){return[]}function gr(){return!1}var Er=(v=null==v?qt:Qt.defaults(qt.Object(),v,Qt.pick(qt,_t))).Array,yr=v.Date,vr=v.Error,br=v.Function,Sr=v.Math,Tr=v.Object,Cr=v.RegExp,Ar=v.String,Nr=v.TypeError,wr=Er.prototype,_r=Tr.prototype,Pr=v["__core-js_shared__"],Rr=br.prototype.toString,Or=_r.hasOwnProperty,Ir=0,xr=function(){var t=/[^.]+$/.exec(Pr&&Pr.keys&&Pr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Dr=_r.toString,kr=Rr.call(Tr),Mr=qt._,qr=Cr("^"+Rr.call(Or).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lr=Bt?v.Buffer:M,Yr=v.Symbol,Br=v.Uint8Array,Vr=Lr?Lr.f:M,Fr=O(Tr.getPrototypeOf,Tr),Hr=Tr.create,Ur=_r.propertyIsEnumerable,zr=wr.splice,Gr=Yr?Yr.isConcatSpreadable:M,Xr=Yr?Yr.iterator:M,Wr=Yr?Yr.toStringTag:M,jr=function(){try{var t=Wi(Tr,"defineProperty");return t({},"",{}),t}catch(t){}}(),Kr=v.clearTimeout!==qt.clearTimeout&&v.clearTimeout,Jr=yr&&yr.now!==qt.Date.now&&yr.now,Qr=v.setTimeout!==qt.setTimeout&&v.setTimeout,Zr=Sr.ceil,$r=Sr.floor,ts=Tr.getOwnPropertySymbols,es=Lr?Lr.isBuffer:M,is=v.isFinite,ns=wr.join,rs=O(Tr.keys,Tr),ss=Sr.max,as=Sr.min,os=yr.now,ls=v.parseInt,hs=Sr.random,us=wr.reverse,cs=Wi(v,"DataView"),ds=Wi(v,"Map"),ps=Wi(v,"Promise"),fs=Wi(v,"Set"),ms=Wi(v,"WeakMap"),gs=Wi(Tr,"create"),Es=ms&&new ms,ys={},vs=un(cs),bs=un(ds),Ss=un(ps),Ts=un(fs),Cs=un(ms),As=Yr?Yr.prototype:M,Ns=As?As.valueOf:M,ws=As?As.toString:M,_s=function(){function t(){}return function(e){return Fn(e)?Hr?Hr(e):(t.prototype=e,e=new t,t.prototype=M,e):{}}}();vt.templateSettings={escape:X,evaluate:W,interpolate:j,variable:"",imports:{_:vt}},(vt.prototype=bt.prototype).constructor=vt,(Ct.prototype=_s(bt.prototype)).constructor=Ct,(Ot.prototype=_s(bt.prototype)).constructor=Ot,It.prototype.clear=function(){this.__data__=gs?gs(null):{},this.size=0},It.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},It.prototype.get=function(t){var e=this.__data__;return gs?"__lodash_hash_undefined__"===(t=e[t])?M:t:Or.call(e,t)?e[t]:M},It.prototype.has=function(t){var e=this.__data__;return gs?e[t]!==M:Or.call(e,t)},It.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=gs&&e===M?"__lodash_hash_undefined__":e,this},kt.prototype.clear=function(){this.__data__=[],this.size=0},kt.prototype.delete=function(t){var e=this.__data__;return!(0>(t=te(e,t))||(t==e.length-1?e.pop():zr.call(e,t,1),--this.size,0))},kt.prototype.get=function(t){var e=this.__data__;return 0>(t=te(e,t))?M:e[t][1]},kt.prototype.has=function(t){return-1n?(++this.size,i.push([t,e])):i[n][1]=e,this},Mt.prototype.clear=function(){this.size=0,this.__data__={hash:new It,map:new(ds||kt),string:new It}},Mt.prototype.delete=function(t){return t=Gi(this,t).delete(t),this.size-=t?1:0,t},Mt.prototype.get=function(t){return Gi(this,t).get(t)},Mt.prototype.has=function(t){return Gi(this,t).has(t)},Mt.prototype.set=function(t,e){var i=Gi(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this},Lt.prototype.add=Lt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Lt.prototype.has=function(t){return this.__data__.has(t)},Yt.prototype.clear=function(){this.__data__=new kt,this.size=0},Yt.prototype.delete=function(t){var e=this.__data__;return t=e.delete(t),this.size=e.size,t},Yt.prototype.get=function(t){return this.__data__.get(t)},Yt.prototype.has=function(t){return this.__data__.has(t)},Yt.prototype.set=function(t,e){var i=this.__data__;if(i instanceof kt){var n=i.__data__;if(!ds||199>n.length)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new Mt(n)}return i.set(t,e),this.size=i.size,this};var Ps=mi(de),Rs=mi(pe,!0),Os=gi(),Is=gi(!0),xs=Es?function(t,e){return Es.set(t,e),t}:ur,Ds=jr?function(t,e){return jr(t,"toString",{configurable:!0,enumerable:!1,value:hr(e),writable:!0})}:ur,ks=Kr||function(t){return qt.clearTimeout(t)},Ms=fs&&1/x(new fs([,-0]))[1]==q?function(t){return new fs(t)}:pr,qs=Es?function(t){return Es.get(t)}:pr,Ls=ts?function(t){return null==t?[]:(t=Tr(t),a(ts(t),function(e){return Ur.call(t,e)}))}:mr,Ys=ts?function(t){for(var e=[];t;)u(e,Ls(t)),t=Fr(t);return e}:mr,Bs=Ee;(cs&&"[object DataView]"!=Bs(new cs(new ArrayBuffer(1)))||ds&&"[object Map]"!=Bs(new ds)||ps&&"[object Promise]"!=Bs(ps.resolve())||fs&&"[object Set]"!=Bs(new fs)||ms&&"[object WeakMap]"!=Bs(new ms))&&(Bs=function(t){var e=Ee(t);if(t=(t="[object Object]"==e?t.constructor:M)?un(t):"")switch(t){case vs:return"[object DataView]";case bs:return"[object Map]";case Ss:return"[object Promise]";case Ts:return"[object Set]";case Cs:return"[object WeakMap]"}return e});var Vs=Pr?Yn:gr,Fs=on(xs),Hs=Qr||function(t,e){return qt.setTimeout(t,e)},Us=on(Ds),zs=function(t){var e=(t=xn(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}(function(t){var e=[];return Q.test(t)&&e.push(""),t.replace(Z,function(t,i,n,r){e.push(n?r.replace(lt,"$1"):i||t)}),e}),Gs=Fe(function(t,e){return qn(t)?le(t,ce(e,1,qn,!0)):[]}),Xs=Fe(function(t,e){var i=En(e);return qn(i)&&(i=M),qn(t)?le(t,ce(e,1,qn,!0),zi(i,2)):[]}),Ws=Fe(function(t,e){var i=En(e);return qn(i)&&(i=M),qn(t)?le(t,ce(e,1,qn,!0),M,i):[]}),js=Fe(function(t){var e=h(t,ei);return e.length&&e[0]===t[0]?Se(e):[]}),Ks=Fe(function(t){var e=En(t),i=h(t,ei);return e===En(i)?e=M:i.pop(),i.length&&i[0]===t[0]?Se(i,zi(e,2)):[]}),Js=Fe(function(t){var e=En(t),i=h(t,ei);return(e="function"==typeof e?e:M)&&i.pop(),i.length&&i[0]===t[0]?Se(i,M,e):[]}),Qs=Fe(yn),Zs=Bi(function(t,e){var i=null==t?0:t.length,n=ne(t,e);return Ye(t,h(e,function(t){return Zi(t,i)?+t:t}).sort(li)),n}),$s=Fe(function(t){return Ke(ce(t,1,qn,!0))}),ta=Fe(function(t){var e=En(t);return qn(e)&&(e=M),Ke(ce(t,1,qn,!0),zi(e,2))}),ea=Fe(function(t){var e="function"==typeof(e=En(t))?e:M;return Ke(ce(t,1,qn,!0),M,e)}),ia=Fe(function(t,e){return qn(t)?le(t,e):[]}),na=Fe(function(t){return $e(a(t,qn))}),ra=Fe(function(t){var e=En(t);return qn(e)&&(e=M),$e(a(t,qn),zi(e,2))}),sa=Fe(function(t){var e="function"==typeof(e=En(t))?e:M;return $e(a(t,qn),M,e)}),aa=Fe(bn),oa=Fe(function(t){var e=t.length;return Sn(t,e="function"==typeof(e=1=e}),Pa=Ce(function(){return arguments}())?Ce:function(t){return Hn(t)&&Or.call(t,"callee")&&!Ur.call(t,"callee")},Ra=Er.isArray,Oa=Ft?C(Ft):function(t){return Hn(t)&&"[object ArrayBuffer]"==Ee(t)},Ia=es||gr,xa=Ht?C(Ht):function(t){return Hn(t)&&"[object Date]"==Ee(t)},Da=Ut?C(Ut):function(t){return Hn(t)&&"[object Map]"==Bs(t)},ka=zt?C(zt):function(t){return Hn(t)&&"[object RegExp]"==Ee(t)},Ma=Gt?C(Gt):function(t){return Hn(t)&&"[object Set]"==Bs(t)},qa=Xt?C(Xt):function(t){return Hn(t)&&Vn(t.length)&&!!Pt[Ee(t)]},La=Oi(Re),Ya=Oi(function(t,e){return t<=e}),Ba=fi(function(t,e){if(nn(e)||Mn(e))di(e,ir(e),t);else for(var i in e)Or.call(e,i)&&$t(t,i,e[i])}),Va=fi(function(t,e){di(e,nr(e),t)}),Fa=fi(function(t,e,i,n){di(e,nr(e),t,n)}),Ha=fi(function(t,e,i,n){di(e,ir(e),t,n)}),Ua=Bi(ne),za=Fe(function(t){return t.push(M,Mi),n(Fa,M,t)}),Ga=Fe(function(t){return t.push(M,qi),n(Ja,M,t)}),Xa=Ai(function(t,e,i){t[e]=i},hr(ur)),Wa=Ai(function(t,e,i){Or.call(t,e)?t[e].push(i):t[e]=[i]},zi),ja=Fe(Te),Ka=fi(function(t,e,i){De(t,e,i)}),Ja=fi(function(t,e,i,n){De(t,e,i,n)}),Qa=Bi(function(t,e){var i={};if(null==t)return i;var n=!1;e=h(e,function(e){return e=ni(e,t),n||(n=1--t)return e.apply(this,arguments)}},vt.ary=_n,vt.assign=Ba,vt.assignIn=Va,vt.assignInWith=Fa,vt.assignWith=Ha,vt.at=Ua,vt.before=Pn,vt.bind=ya,vt.bindAll=uo,vt.bindKey=va,vt.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ra(t)?t:[t]},vt.chain=Tn,vt.chunk=function(t,e,i){if(e=(i?$i(t,e,i):e===M)?1:ss(Kn(e),0),!(i=null==t?0:t.length)||1>e)return[];for(var n=0,r=0,s=Er(Zr(i/e));ne?0:e,n)):[]},vt.dropRight=function(t,e,i){var n=null==t?0:t.length;return n?(e=i||e===M?1:Kn(e),e=n-e,Ue(t,0,0>e?0:e)):[]},vt.dropRightWhile=function(t,e){return t&&t.length?Qe(t,zi(e,3),!0,!0):[]},vt.dropWhile=function(t,e){return t&&t.length?Qe(t,zi(e,3),!0):[]},vt.fill=function(t,e,i,n){var r=null==t?0:t.length;if(!r)return[];for(i&&"number"!=typeof i&&$i(t,e,i)&&(i=0,n=r),r=t.length,0>(i=Kn(i))&&(i=-i>r?0:r+i),0>(n=n===M||n>r?r:Kn(n))&&(n+=r),n=i>n?0:Jn(n);i>>0)?(t=$n(t))&&("string"==typeof e||null!=e&&!ka(e))&&!(e=je(e))&&Nt.test(t)?ri(k(t),0,i):t.split(e,i):[]},vt.spread=function(t,e){if("function"!=typeof t)throw new Nr("Expected a function");return e=null==e?0:ss(Kn(e),0),Fe(function(i){var r=i[e];return i=ri(i,0,e),r&&u(i,r),n(t,this,i)})},vt.tail=function(t){var e=null==t?0:t.length;return e?Ue(t,1,e):[]},vt.take=function(t,e,i){return t&&t.length?(e=i||e===M?1:Kn(e),Ue(t,0,0>e?0:e)):[]},vt.takeRight=function(t,e,i){var n=null==t?0:t.length;return n?(e=i||e===M?1:Kn(e),e=n-e,Ue(t,0>e?0:e,n)):[]},vt.takeRightWhile=function(t,e){return t&&t.length?Qe(t,zi(e,3),!1,!0):[]},vt.takeWhile=function(t,e){return t&&t.length?Qe(t,zi(e,3)):[]},vt.tap=function(t,e){return e(t),t},vt.throttle=function(t,e,i){var n=!0,r=!0;if("function"!=typeof t)throw new Nr("Expected a function");return Fn(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),In(t,e,{leading:n,maxWait:e,trailing:r})},vt.thru=Cn,vt.toArray=Wn,vt.toPairs=$a,vt.toPairsIn=to,vt.toPath=function(t){return Ra(t)?h(t,hn):Xn(t)?[t]:ci(zs($n(t)))},vt.toPlainObject=Zn,vt.transform=function(t,e,i){var n=Ra(t),s=n||Ia(t)||qa(t);if(e=zi(e,4),null==i){var a=t&&t.constructor;i=s?n?new a:[]:Fn(t)&&Yn(a)?_s(Fr(t)):{}}return(s?r:de)(t,function(t,n,r){return e(i,t,n,r)}),i},vt.unary=function(t){return _n(t,1)},vt.union=$s,vt.unionBy=ta,vt.unionWith=ea,vt.uniq=function(t){return t&&t.length?Ke(t):[]},vt.uniqBy=function(t,e){return t&&t.length?Ke(t,zi(e,2)):[]},vt.uniqWith=function(t,e){return e="function"==typeof e?e:M,t&&t.length?Ke(t,M,e):[]},vt.unset=function(t,e){return null==t||Je(t,e)},vt.unzip=bn,vt.unzipWith=Sn,vt.update=function(t,e,i){return null==t?t:He(t,e,ii(i)(me(t,e)),void 0)},vt.updateWith=function(t,e,i,n){return n="function"==typeof n?n:M,null!=t&&(t=He(t,e,ii(i)(me(t,e)),n)),t},vt.values=sr,vt.valuesIn=function(t){return null==t?[]:A(t,nr(t))},vt.without=ia,vt.words=lr,vt.wrap=function(t,e){return Ca(ii(e),t)},vt.xor=na,vt.xorBy=ra,vt.xorWith=sa,vt.zip=aa,vt.zipObject=function(t,e){return ti(t||[],e||[],$t)},vt.zipObjectDeep=function(t,e){return ti(t||[],e||[],He)},vt.zipWith=oa,vt.entries=$a,vt.entriesIn=to,vt.extend=Va,vt.extendWith=Fa,dr(vt,vt),vt.add=So,vt.attempt=ho,vt.camelCase=eo,vt.capitalize=ar,vt.ceil=To,vt.clamp=function(t,e,i){return i===M&&(i=e,e=M),i!==M&&(i=Qn(i),i=i==i?i:0),e!==M&&(e=Qn(e),e=e==e?e:0),re(Qn(t),e,i)},vt.clone=function(t){return se(t,4)},vt.cloneDeep=function(t){return se(t,5)},vt.cloneDeepWith=function(t,e){return e="function"==typeof e?e:M,se(t,5,e)},vt.cloneWith=function(t,e){return e="function"==typeof e?e:M,se(t,4,e)},vt.conformsTo=function(t,e){return null==e||ae(t,e,ir(e))},vt.deburr=or,vt.defaultTo=function(t,e){return null==t||t!=t?e:t},vt.divide=Co,vt.endsWith=function(t,e,i){t=$n(t),e=je(e);var n=t.length,n=i=i===M?n:re(Kn(i),0,n);return 0<=(i-=e.length)&&t.slice(i,n)==e},vt.eq=kn,vt.escape=function(t){return(t=$n(t))&&G.test(t)?t.replace(U,Kt):t},vt.escapeRegExp=function(t){return(t=$n(t))&&tt.test(t)?t.replace($,"\\$&"):t},vt.every=function(t,e,i){var n=Ra(t)?s:function(t,e){var i=!0;return Ps(t,function(t,n,r){return i=!!e(t,n,r)}),i};return i&&$i(t,e,i)&&(e=M),n(t,zi(e,3))},vt.find=ua,vt.findIndex=pn,vt.findKey=function(t,e){return p(t,zi(e,3),de)},vt.findLast=ca,vt.findLastIndex=fn,vt.findLastKey=function(t,e){return p(t,zi(e,3),pe)},vt.floor=Ao,vt.forEach=An,vt.forEachRight=Nn,vt.forIn=function(t,e){return null==t?t:Os(t,zi(e,3),nr)},vt.forInRight=function(t,e){return null==t?t:Is(t,zi(e,3),nr)},vt.forOwn=function(t,e){return t&&de(t,zi(e,3))},vt.forOwnRight=function(t,e){return t&&pe(t,zi(e,3))},vt.get=tr,vt.gt=wa,vt.gte=_a,vt.has=function(t,e){return null!=t&&ji(t,e,ve)},vt.hasIn=er,vt.head=gn,vt.identity=ur,vt.includes=function(t,e,i,n){return t=Mn(t)?t:sr(t),i=i&&!n?Kn(i):0,n=t.length,0>i&&(i=ss(n+i,0)),Gn(t)?i<=n&&-1(i=null==i?0:Kn(i))&&(i=ss(n+i,0)),m(t,e,i)):-1},vt.inRange=function(t,e,i){return e=jn(e),i===M?(i=e,e=0):i=jn(i),(t=Qn(t))>=as(e,i)&&t=t},vt.isSet=Ma,vt.isString=Gn,vt.isSymbol=Xn,vt.isTypedArray=qa,vt.isUndefined=function(t){return t===M},vt.isWeakMap=function(t){return Hn(t)&&"[object WeakMap]"==Bs(t)},vt.isWeakSet=function(t){return Hn(t)&&"[object WeakSet]"==Ee(t)},vt.join=function(t,e){return null==t?"":ns.call(t,e)},vt.kebabCase=io,vt.last=En,vt.lastIndexOf=function(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var r=n;if(i!==M&&(r=Kn(i),r=0>r?ss(n+r,0):as(r,n-1)),e==e){for(i=r+1;i--&&t[i]!==e;);t=i}else t=f(t,g,r,!0);return t},vt.lowerCase=no,vt.lowerFirst=ro,vt.lt=La,vt.lte=Ya,vt.max=function(t){return t&&t.length?he(t,ur,ye):M},vt.maxBy=function(t,e){return t&&t.length?he(t,zi(e,2),ye):M},vt.mean=function(t){return E(t,ur)},vt.meanBy=function(t,e){return E(t,zi(e,2))},vt.min=function(t){return t&&t.length?he(t,ur,Re):M},vt.minBy=function(t,e){return t&&t.length?he(t,zi(e,2),Re):M},vt.stubArray=mr,vt.stubFalse=gr,vt.stubObject=function(){return{}},vt.stubString=function(){return""},vt.stubTrue=function(){return!0},vt.multiply=No,vt.nth=function(t,e){return t&&t.length?ke(t,Kn(e)):M},vt.noConflict=function(){return qt._===this&&(qt._=Mr),this},vt.noop=pr,vt.now=Ea,vt.pad=function(t,e,i){t=$n(t);var n=(e=Kn(e))?D(t):0;return!e||n>=e?t:(e=(e-n)/2,_i($r(e),i)+t+_i(Zr(e),i))},vt.padEnd=function(t,e,i){t=$n(t);var n=(e=Kn(e))?D(t):0;return e&&ne){var n=t;t=e,e=n}return i||t%1||e%1?(i=hs(),as(t+i*(e-t+xt("1e-"+((i+"").length-1))),e)):Be(t,e)},vt.reduce=function(t,e,i){var n=Ra(t)?c:b,r=3>arguments.length;return n(t,zi(e,4),i,r,Ps)},vt.reduceRight=function(t,e,i){var n=Ra(t)?function(t,e,i,n){var r=null==t?0:t.length;for(n&&r&&(i=t[--r]);r--;)i=e(i,t[r],r,t);return i}:b,r=3>arguments.length;return n(t,zi(e,4),i,r,Rs)},vt.repeat=function(t,e,i){return e=(i?$i(t,e,i):e===M)?1:Kn(e),Ve($n(t),e)},vt.replace=function(){var t=arguments,e=$n(t[0]);return 3>t.length?e:e.replace(t[1],t[2])},vt.result=function(t,e,i){var n=-1,r=(e=ni(e,t)).length;for(r||(r=1,t=M);++n(t=Kn(t))||9007199254740991=a)return t;if(1>(a=i-D(n)))return n;if(i=s?ri(s,0,a).join(""):t.slice(0,a),r===M)return i+n;if(s&&(a+=i.length-a),ka(r)){if(t.slice(a).search(r)){var o=i;for(r.global||(r=Cr(r.source,$n(ut.exec(r))+"g")),r.lastIndex=0;s=r.exec(o);)var l=s.index;i=i.slice(0,l===M?a:l)}}else t.indexOf(je(r),a)!=a&&-1<(r=i.lastIndexOf(r))&&(i=i.slice(0,r));return i+n},vt.unescape=function(t){return(t=$n(t))&&z.test(t)?t.replace(H,Jt):t},vt.uniqueId=function(t){var e=++Ir;return $n(t)+e},vt.upperCase=oo,vt.upperFirst=lo,vt.each=An,vt.eachRight=Nn,vt.first=gn,dr(vt,function(){var t={};return de(vt,function(e,i){Or.call(vt.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),vt.VERSION="4.17.4",r("bind bindKey curry curryRight partial partialRight".split(" "),function(t){vt[t].placeholder=vt}),r(["drop","take"],function(t,e){Ot.prototype[t]=function(i){i=i===M?1:ss(Kn(i),0);var n=this.__filtered__&&!e?new Ot(this):this.clone();return n.__filtered__?n.__takeCount__=as(i,n.__takeCount__):n.__views__.push({size:as(i,4294967295),type:t+(0>n.__dir__?"Right":"")}),n},Ot.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),r(["filter","map","takeWhile"],function(t,e){var i=e+1,n=1==i||3==i;Ot.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:zi(t,3),type:i}),e.__filtered__=e.__filtered__||n,e}}),r(["head","last"],function(t,e){var i="take"+(e?"Right":"");Ot.prototype[t]=function(){return this[i](1).value()[0]}}),r(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");Ot.prototype[t]=function(){return this.__filtered__?new Ot(this):this[i](1)}}),Ot.prototype.compact=function(){return this.filter(ur)},Ot.prototype.find=function(t){return this.filter(t).head()},Ot.prototype.findLast=function(t){return this.reverse().find(t)},Ot.prototype.invokeMap=Fe(function(t,e){return"function"==typeof t?new Ot(this):this.map(function(i){return Te(i,t,e)})}),Ot.prototype.reject=function(t){return this.filter(Dn(zi(t)))},Ot.prototype.slice=function(t,e){t=Kn(t);var i=this;return i.__filtered__&&(0e)?new Ot(i):(0>t?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==M&&(e=Kn(e),i=0>e?i.dropRight(-e):i.take(e-t)),i)},Ot.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ot.prototype.toArray=function(){return this.take(4294967295)},de(Ot.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),r=vt[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);r&&(vt.prototype[e]=function(){function e(t){return t=r.apply(vt,u([t],o)),n&&d?t[0]:t}var a=this.__wrapped__,o=n?[1]:arguments,l=a instanceof Ot,h=o[0],c=l||Ra(a);c&&i&&"function"==typeof h&&1!=h.length&&(l=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=s&&!d,l=l&&!p;return!s&&c?(a=l?a:new Ot(this),(a=t.apply(a,o)).__actions__.push({func:Cn,args:[e],thisArg:M}),new Ct(a,d)):h&&l?t.apply(this,o):(a=this.thru(e),h?n?a.value()[0]:a.value():a)})}),r("pop push shift sort splice unshift".split(" "),function(t){var e=wr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);vt.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var r=this.value();return e.apply(Ra(r)?r:[],t)}return this[i](function(i){return e.apply(Ra(i)?i:[],t)})}}),de(Ot.prototype,function(t,e){var i=vt[e];if(i){var n=i.name+"";(ys[n]||(ys[n]=[])).push({name:e,func:i})}}),ys[Ci(M,2).name]=[{name:"wrapper",func:M}],Ot.prototype.clone=function(){var t=new Ot(this.__wrapped__);return t.__actions__=ci(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ci(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ci(this.__views__),t},Ot.prototype.reverse=function(){if(this.__filtered__){var t=new Ot(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t},Ot.prototype.value=function(){var t,e=this.__wrapped__.value(),i=this.__dir__,n=Ra(e),r=0>i,s=n?e.length:0;t=s;for(var a=this.__views__,o=0,l=-1,h=a.length;++l=this.__values__.length;return{done:t,value:t?M:this.__values__[this.__index__++]}},vt.prototype.plant=function(t){for(var e,i=this;i instanceof bt;){var n=dn(i);n.__index__=0,n.__values__=M,e?r.__wrapped__=n:e=n;var r=n,i=i.__wrapped__}return r.__wrapped__=t,e},vt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Ot?(this.__actions__.length&&(t=new Ot(this)),(t=t.reverse()).__actions__.push({func:Cn,args:[vn],thisArg:M}),new Ct(t,this.__chain__)):this.thru(vn)},vt.prototype.toJSON=vt.prototype.valueOf=vt.prototype.value=function(){return Ze(this.__wrapped__,this.__actions__)},vt.prototype.first=vt.prototype.head,Xr&&(vt.prototype[Xr]=function(){return this}),vt}();"function"==typeof i&&"object"==_typeof(i.amd)&&i.amd?(qt._=Qt,i("../../sherpa/lib/lodash-4.17.4.min",[],function(){return Qt})):Yt?((Yt.exports=Qt)._=Qt,Lt._=Qt):qt._=Qt}.call(this),function(){var t={FALLBACK_LOCALE:"en",MEDIA_TYPES:["sounds","images"],START_THIRD_PARTY_LICENSE_ENTRIES:"### START THIRD PARTY LICENSE ENTRIES ###",END_THIRD_PARTY_LICENSE_ENTRIES:"### END THIRD PARTY LICENSE ENTRIES ###",A11Y_VIEW_HTML_SUFFIX:"_a11y_view.html",BRANDS:["phet","phet-io","adapted-from-phet"]};void 0!==i&&i("../../chipper/js/common/ChipperConstants",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),function(){var t={addDirectionalFormatting:function(t,e){return t.length>0?(e?"‫":"‪")+t+"‬":t},padString:function(t,e){for(;t.length=0;)t=t.slice(0,r)+n+t.slice(r+i.length)}),Object.keys(e).forEach(function(e){if(t.indexOf("{{"+e+"}}")>=0)throw new Error("Template string detected in placeholders: "+e+"\n\n"+t.slice(0,t.indexOf("{{"+e+"}}")+10))}),t},firstLineThatContains:function(t,e){var i=".*"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+".*",n=t.match(new RegExp(i,"g"));return n?n[0]:null}};void 0!==i&&i("../../chipper/js/common/ChipperStringUtils",[],function(){return t}),"undefined"!=typeof module&&(module.exports=t)}(),function(t){var e={aa:{name:"Afar",localizedName:"Afar",direction:"ltr"},ab:{name:"Abkhazian",localizedName:"Abkhazian",direction:"ltr"},ae:{name:"Avestan",localizedName:"Avestan",direction:"rtl"},af:{name:"Afrikaans",localizedName:"Afrikaans",direction:"ltr"},ak:{name:"Akan",localizedName:"Akan",direction:"ltr"},am:{name:"Amharic",localizedName:"Amharic",direction:"ltr"},an:{name:"Aragonese",localizedName:"Aragonese",direction:"ltr"},ar:{name:"Arabic",localizedName:"العربية",direction:"rtl"},ar_MA:{name:"Arabic, Morocco",localizedName:"العربية (المغرب)",direction:"rtl"},ar_SA:{name:"Arabic, Saudi Arabia",localizedName:"العربية (السعودية)",direction:"rtl"},as:{name:"Assamese",localizedName:"Assamese",direction:"ltr"},av:{name:"Avaric",localizedName:"Avaric",direction:"ltr"},ay:{name:"Aymara",localizedName:"Aymara",direction:"ltr"},az:{name:"Azerbaijani",localizedName:"Azerbaijani",direction:"ltr"},ba:{name:"Bashkir",localizedName:"Bashkir",direction:"ltr"},be:{name:"Belarusian",localizedName:"беларускі",direction:"ltr"},bg:{name:"Bulgarian",localizedName:"български",direction:"ltr"},bh:{name:"Bihari",localizedName:"Bihari",direction:"ltr"},bi:{name:"Bislama",localizedName:"Bislama",direction:"ltr"},bm:{name:"Bambara",localizedName:"Bambara",direction:"ltr"},bn:{name:"Bengali",localizedName:"Bengali",direction:"ltr"},bo:{name:"Tibetan",localizedName:"Tibetan",direction:"ltr"},br:{name:"Breton",localizedName:"Breton",direction:"ltr"},bs:{name:"Bosnian",localizedName:"Bosnian",direction:"ltr"},ca:{name:"Catalan",localizedName:"català",direction:"ltr"},ce:{name:"Chechen",localizedName:"Chechen",direction:"ltr"},ch:{name:"Chamorro",localizedName:"Chamorro",direction:"ltr"},co:{name:"Corsican",localizedName:"Corsican",direction:"ltr"},cr:{name:"Cree",localizedName:"Cree",direction:"ltr"},cs:{name:"Czech",localizedName:"čeština",direction:"ltr"},cu:{name:"Church Slavic",localizedName:"Church Slavic",direction:"ltr"},cv:{name:"Chuvash",localizedName:"Chuvash",direction:"ltr"},cy:{name:"Welsh",localizedName:"Welsh",direction:"ltr"},da:{name:"Danish",localizedName:"Dansk",direction:"ltr"},de:{name:"German",localizedName:"Deutsch",direction:"ltr"},dv:{name:"Divehi",localizedName:"Divehi",direction:"ltr"},dz:{name:"Dzongkha",localizedName:"Dzongkha",direction:"ltr"},ee:{name:"Ewe",localizedName:"Ewe",direction:"ltr"},el:{name:"Greek",localizedName:"Ελληνικά",direction:"ltr"},en:{name:"English",localizedName:"English",direction:"ltr"},en_CA:{name:"English, Canada",localizedName:"English (Canada)",direction:"ltr"},en_GB:{name:"English, United Kingdom",localizedName:"English (United Kingdom)",direction:"ltr"},eo:{name:"Esperanto",localizedName:"Esperanto",direction:"ltr"},es:{name:"Spanish",localizedName:"español",direction:"ltr"},es_CO:{name:"Spanish, Colombia",localizedName:"español (Colombia)",direction:"ltr"},es_CR:{name:"Spanish, Costa Rica",localizedName:"español (Costa Rica)",direction:"ltr"},es_ES:{name:"Spanish, Spain",localizedName:"español (España)",direction:"ltr"},es_MX:{name:"Spanish, Mexico",localizedName:"español (México)",direction:"ltr"},es_PE:{name:"Spanish, Peru",localizedName:"español (Perú)",direction:"ltr"},et:{name:"Estonian",localizedName:"Eesti",direction:"ltr"},eu:{name:"Basque",localizedName:"Basque",direction:"ltr"},fa:{name:"Persian",localizedName:"Persian",direction:"rtl"},ff:{name:"Fulah",localizedName:"Fulah",direction:"ltr"},fi:{name:"Finnish",localizedName:"suomi",direction:"ltr"},fj:{name:"Fijian",localizedName:"Fijian",direction:"ltr"},fo:{name:"Faroese",localizedName:"Faroese",direction:"ltr"},fr:{name:"French",localizedName:"français",direction:"ltr"},fu:{name:"Friulian",localizedName:"fu",direction:"ltr"},fy:{name:"Western Frisian",localizedName:"Frisian",direction:"ltr"},ga:{name:"Irish",localizedName:"Gaeilge",direction:"ltr"},gd:{name:"Scottish Gaelic",localizedName:"Scottish Gaelic",direction:"ltr"},gl:{name:"Galician",localizedName:"Gallegan",direction:"ltr"},gn:{name:"Guarani",localizedName:"Guarani",direction:"ltr"},gu:{name:"Gujarati",localizedName:"Gujarati",direction:"ltr"},gv:{name:"Manx",localizedName:"Manx",direction:"ltr"},ha:{name:"Hausa",localizedName:"Hausa",direction:"ltr"},hi:{name:"Hindi",localizedName:"हिंदी",direction:"ltr"},ho:{name:"Hiri Motu",localizedName:"Hiri Motu",direction:"ltr"},hr:{name:"Croatian",localizedName:"hrvatski",direction:"ltr"},ht:{name:"Haitian",localizedName:"Haitian",direction:"ltr"},hu:{name:"Hungarian",localizedName:"magyar",direction:"ltr"},hy:{name:"Armenian",localizedName:"Armenian",direction:"ltr"},hz:{name:"Herero",localizedName:"Herero",direction:"ltr"},ia:{name:"Interlingua",localizedName:"Interlingua",direction:"ltr"},ie:{name:"Interlingue",localizedName:"Interlingue",direction:"ltr"},ig:{name:"Igbo",localizedName:"Igbo",direction:"ltr"},ii:{name:"Sichuan Yi",localizedName:"Sichuan Yi",direction:"ltr"},ik:{name:"Inupiaq",localizedName:"Inupiaq",direction:"ltr"},in:{name:"Indonesian",localizedName:"Bahasa Indonesia",direction:"ltr"},io:{name:"Ido",localizedName:"Ido",direction:"ltr"},is:{name:"Icelandic",localizedName:"íslenska",direction:"ltr"},it:{name:"Italian",localizedName:"italiano",direction:"ltr"},iu:{name:"Inuktitut",localizedName:"Inuktitut",direction:"ltr"},iw:{name:"Hebrew",localizedName:"עברית",direction:"rtl"},ja:{name:"Japanese",localizedName:"日本語",direction:"ltr"},ji:{name:"Yiddish",localizedName:"Yiddish",direction:"ltr"},jv:{name:"Javanese",localizedName:"Javanese",direction:"ltr"},ka:{name:"Georgian",localizedName:"Georgian",direction:"ltr"},kg:{name:"Kongo",localizedName:"Kongo",direction:"ltr"},ki:{name:"Kikuyu",localizedName:"Kikuyu",direction:"ltr"},kj:{name:"Kwanyama",localizedName:"Kwanyama",direction:"ltr"},kk:{name:"Kazakh",localizedName:"Kazakh",direction:"ltr"},kl:{name:"Kalaallisut",localizedName:"Greenlandic",direction:"ltr"},km:{name:"Khmer",localizedName:"Khmer",direction:"ltr"},kn:{name:"Kannada",localizedName:"Kannada",direction:"ltr"},ko:{name:"Korean",localizedName:"한국어",direction:"ltr"},kr:{name:"Kanuri",localizedName:"Kanuri",direction:"ltr"},ks:{name:"Kashmiri",localizedName:"Kashmiri",direction:"ltr"},ku:{name:"Kurdish",localizedName:"Kurdish",direction:"ltr"},ku_TR:{name:"Kurdish, Turkey",localizedName:"Kurdish (Turkey)",direction:"ltr"},kv:{name:"Komi",localizedName:"Komi",direction:"ltr"},kw:{name:"Cornish",localizedName:"Cornish",direction:"ltr"},ky:{name:"Kirghiz",localizedName:"Kirghiz",direction:"ltr"},la:{name:"Latin",localizedName:"Latin",direction:"ltr"},lb:{name:"Luxembourgish",localizedName:"Luxembourgish",direction:"ltr"},lg:{name:"Ganda",localizedName:"Ganda",direction:"ltr"},li:{name:"Limburgish",localizedName:"Limburgish",direction:"ltr"},lk:{name:"Lakota",localizedName:"Lakota",direction:"ltr"},ln:{name:"Lingala",localizedName:"Lingala",direction:"ltr"},lo:{name:"Lao",localizedName:"Lao",direction:"ltr"},lt:{name:"Lithuanian",localizedName:"Lietuvių",direction:"ltr"},lu:{name:"Luba-Katanga",localizedName:"Luba-Katanga",direction:"ltr"},lv:{name:"Latvian",localizedName:"Latviešu",direction:"ltr"},mg:{name:"Malagasy",localizedName:"Malagasy",direction:"ltr"},mh:{name:"Marshallese",localizedName:"Marshallese",direction:"ltr"},mi:{name:"Maori",localizedName:"Maori",direction:"ltr"},mk:{name:"Macedonian",localizedName:"македонски",direction:"ltr"},ml:{name:"Malayalam",localizedName:"Malayalam",direction:"ltr"},mn:{name:"Mongolian",localizedName:"Mongolian",direction:"ltr"},mo:{name:"Moldavian",localizedName:"Moldavian",direction:"ltr"},mr:{name:"Marathi",localizedName:"Marathi",direction:"ltr"},ms:{name:"Malay",localizedName:"Bahasa Melayu",direction:"ltr"},mt:{name:"Maltese",localizedName:"Malti",direction:"ltr"},my:{name:"Burmese",localizedName:"Burmese",direction:"ltr"},na:{name:"Nauru",localizedName:"Nauru",direction:"ltr"},nb:{name:"Norwegian Bokmal",localizedName:"Norwegian Bokmål",direction:"ltr"},nd:{name:"North Ndebele",localizedName:"North Ndebele",direction:"ltr"},ne:{name:"Nepali",localizedName:"Nepali",direction:"ltr"},ng:{name:"Ndonga",localizedName:"Ndonga",direction:"ltr"},nl:{name:"Dutch",localizedName:"Nederlands",direction:"ltr"},nn:{name:"Norwegian Nynorsk",localizedName:"Norwegian Nynorsk",direction:"ltr"},nr:{name:"South Ndebele",localizedName:"South Ndebele",direction:"ltr"},nv:{name:"Navajo",localizedName:"Navajo",direction:"ltr"},ny:{name:"Chichewa",localizedName:"Nyanja",direction:"ltr"},oc:{name:"Occitan",localizedName:"Occitan",direction:"ltr"},oj:{name:"Ojibwa",localizedName:"Ojibwa",direction:"ltr"},om:{name:"Oromo",localizedName:"Oromo",direction:"ltr"},or:{name:"Oriya",localizedName:"Oriya",direction:"ltr"},os:{name:"Ossetian",localizedName:"Ossetian",direction:"ltr"},pa:{name:"Panjabi",localizedName:"Panjabi",direction:"ltr"},pi:{name:"Pali",localizedName:"Pali",direction:"ltr"},pl:{name:"Polish",localizedName:"polski",direction:"ltr"},ps:{name:"Pashto",localizedName:"Pushto",direction:"ltr"},pt:{name:"Portuguese",localizedName:"português",direction:"ltr"},pt_BR:{name:"Portuguese, Brazil",localizedName:"português (Brasil)",direction:"ltr"},qu:{name:"Quechua",localizedName:"Quechua",direction:"ltr"},rm:{name:"Raeto-Romance",localizedName:"Raeto-Romance",direction:"ltr"},rn:{name:"Kirundi",localizedName:"Rundi",direction:"ltr"},ro:{name:"Romanian",localizedName:"română",direction:"ltr"},ru:{name:"Russian",localizedName:"русский",direction:"ltr"},rw:{name:"Kinyarwanda",localizedName:"Kinyarwanda",direction:"ltr"},ry:{name:"Rusyn",localizedName:"ry",direction:"ltr"},sa:{name:"Sanskrit",localizedName:"Sanskrit",direction:"ltr"},sc:{name:"Sardinian",localizedName:"Sardinian",direction:"ltr"},sd:{name:"Sindhi",localizedName:"Sindhi",direction:"ltr"},se:{name:"Northern Sami",localizedName:"Northern Sami",direction:"ltr"},sg:{name:"Sango",localizedName:"Sango",direction:"ltr"},sh:{name:"Serbo-Croatian",localizedName:"sh",direction:"ltr"},si:{name:"Sinhalese",localizedName:"Sinhalese",direction:"ltr"},sk:{name:"Slovak",localizedName:"Slovenčina",direction:"ltr"},sl:{name:"Slovenian",localizedName:"Slovenščina",direction:"ltr"},sm:{name:"Samoan",localizedName:"Samoan",direction:"ltr"},sn:{name:"Shona",localizedName:"Shona",direction:"ltr"},so:{name:"Somali",localizedName:"Somali",direction:"ltr"},sq:{name:"Albanian",localizedName:"shqipe",direction:"ltr"},sr:{name:"Serbian",localizedName:"Српски",direction:"ltr"},ss:{name:"Swati",localizedName:"Swati",direction:"ltr"},st:{name:"Sotho",localizedName:"Southern Sotho",direction:"ltr"},su:{name:"Sundanese",localizedName:"Sundanese",direction:"ltr"},sv:{name:"Swedish",localizedName:"svenska",direction:"ltr"},sw:{name:"Swahili",localizedName:"Swahili",direction:"ltr"},ta:{name:"Tamil",localizedName:"Tamil",direction:"ltr"},te:{name:"Telugu",localizedName:"Telugu",direction:"ltr"},tg:{name:"Tajik",localizedName:"Tajik",direction:"ltr"},th:{name:"Thai",localizedName:"ไทย",direction:"ltr"},ti:{name:"Tigrinya",localizedName:"Tigrinya",direction:"ltr"},tk:{name:"Turkmen",localizedName:"Turkmen",direction:"ltr"},tl:{name:"Tagalog",localizedName:"Tagalog",direction:"ltr"},tn:{name:"Tswana",localizedName:"Tswana",direction:"ltr"},to:{name:"Tonga",localizedName:"Tonga",direction:"ltr"},tr:{name:"Turkish",localizedName:"Türkçe",direction:"ltr"},ts:{name:"Tsonga",localizedName:"Tsonga",direction:"ltr"},tt:{name:"Tatar",localizedName:"Tatar",direction:"ltr"},tw:{name:"Twi",localizedName:"Twi",direction:"ltr"},ty:{name:"Tahitian",localizedName:"Tahitian",direction:"ltr"},ug:{name:"Uighur",localizedName:"Uighur",direction:"ltr"},uk:{name:"Ukrainian",localizedName:"українська",direction:"ltr"},ur:{name:"Urdu",localizedName:"Urdu",direction:"rtl"},uz:{name:"Uzbek",localizedName:"Uzbek",direction:"ltr"},ve:{name:"Venda",localizedName:"Venda",direction:"ltr"},vi:{name:"Vietnamese",localizedName:"Tiếng Việt",direction:"ltr"},vo:{name:"Volapuk",localizedName:"Volapük",direction:"ltr"},wa:{name:"Walloon",localizedName:"Walloon",direction:"ltr"},wo:{name:"Wolof",localizedName:"Wolof",direction:"ltr"},xh:{name:"Xhosa",localizedName:"Xhosa",direction:"ltr"},yo:{name:"Yoruba",localizedName:"Yoruba",direction:"ltr"},za:{name:"Zhuang",localizedName:"Zhuang",direction:"ltr"},zh_CN:{name:"Chinese, Simplified",localizedName:"中文 (中国)",direction:"ltr"},zh_HK:{name:"Chinese, Hong Kong",localizedName:"中文 (香港)",direction:"ltr"},zh_TW:{name:"Chinese, Traditional",localizedName:"中文 (台灣)",direction:"ltr"},zu:{name:"Zulu",localizedName:"Zulu",direction:"ltr"}};t.define&&t.define(function(){return e}),"undefined"!=typeof module&&(module.exports=e)}((0,eval)("this")),i("../../chipper/js/data/localeInfo",function(){}),i("string",{load:function(t){throw new Error("Dynamic load not allowed: "+t)}}),i("string!VEGAS/pattern.0hours.1minutes.2seconds",function(){return window.phet.chipper.strings.get("VEGAS/pattern.0hours.1minutes.2seconds")}),i("string!VEGAS/pattern.0minutes.1seconds",function(){return window.phet.chipper.strings.get("VEGAS/pattern.0minutes.1seconds")}),i("VEGAS/GameTimer",["require","PHET_CORE/inherit","AXON/Property","PHETCOMMON/util/StringUtils","AXON/timer","VEGAS/vegas","string!VEGAS/pattern.0hours.1minutes.2seconds","string!VEGAS/pattern.0minutes.1seconds"],function(t){"use strict";function e(){this.elapsedTimeProperty=new n(0),this.isRunningProperty=new n(!1),this.intervalId=null}var i=t("PHET_CORE/inherit"),n=t("AXON/Property"),r=t("PHETCOMMON/util/StringUtils"),s=t("AXON/timer"),a=t("VEGAS/vegas"),o=t("string!VEGAS/pattern.0hours.1minutes.2seconds"),l=t("string!VEGAS/pattern.0minutes.1seconds");return a.register("GameTimer",e),i(Object,e,{reset:function(){this.elapsedTimeProperty.reset(),this.isRunningProperty.reset()},start:function(){if(!this.isRunningProperty.value){var t=this;t.elapsedTimeProperty.value=0,t.intervalId=s.setInterval(function(){t.elapsedTimeProperty.value=t.elapsedTimeProperty.value+1},1e3),t.isRunningProperty.value=!0}},stop:function(){this.isRunningProperty.value&&(s.clearInterval(this.intervalId),this.intervalId=null,this.isRunningProperty.value=!1)},restart:function(){this.stop(),this.start()}},{formatTime:function(t){var e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),n=Math.floor(t-3600*e-60*i),s=i>9||0===e?i:"0"+i,a=n>9?n:"0"+n;return e>0?r.format(o,e,s,a):r.format(l,s,a)}})}),i("SCENERY/display/drawables/RectangleCanvasDrawable",["require","SCENERY/display/CanvasSelfDrawable","PHET_CORE/inherit","SCENERY/display/drawables/PaintableStatelessDrawable","PHET_CORE/Poolable","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e)}var i=t("SCENERY/display/CanvasSelfDrawable"),n=t("PHET_CORE/inherit"),r=t("SCENERY/display/drawables/PaintableStatelessDrawable"),s=t("PHET_CORE/Poolable");return t("SCENERY/scenery").register("RectangleCanvasDrawable",e),n(i,e,{writeRectangularPath:function(t,e){t.beginPath(),t.moveTo(e._rectX,e._rectY),t.lineTo(e._rectX+e._rectWidth,e._rectY),t.lineTo(e._rectX+e._rectWidth,e._rectY+e._rectHeight),t.lineTo(e._rectX,e._rectY+e._rectHeight),t.closePath()},paintCanvas:function(t,e,i){var n=t.context;if(e.isRounded()){n.beginPath();var r=e.getMaximumArcSize(),s=Math.min(e._cornerXRadius,r),a=Math.min(e._cornerYRadius,r),o=e._rectX+s,l=e._rectX+e._rectWidth-s,h=e._rectY+a,u=e._rectY+e._rectHeight-a;s===a?(n.arc(l,h,s,-Math.PI/2,0,!1),n.arc(l,u,s,0,Math.PI/2,!1),n.arc(o,u,s,Math.PI/2,Math.PI,!1),n.arc(o,h,s,Math.PI,3*Math.PI/2,!1)):(n.ellipse(l,h,s,a,0,-Math.PI/2,0,!1),n.ellipse(l,u,s,a,0,0,Math.PI/2,!1),n.ellipse(o,u,s,a,0,Math.PI/2,Math.PI,!1),n.ellipse(o,h,s,a,0,Math.PI,3*Math.PI/2,!1)),n.closePath(),e.hasFill()&&(e.beforeCanvasFill(t),n.fill(),e.afterCanvasFill(t)),e.hasPaintableStroke()&&(e.beforeCanvasStroke(t),n.stroke(),e.afterCanvasStroke(t))}else e.hasFill()&&(e.getFillValue().transformMatrix?(this.writeRectangularPath(n,e),e.beforeCanvasFill(t),n.fill(),e.afterCanvasFill(t)):(e.beforeCanvasFill(t),n.fillRect(e._rectX,e._rectY,e._rectWidth,e._rectHeight),e.afterCanvasFill(t))),e.hasPaintableStroke()&&(e.getStrokeValue().transformMatrix?(this.writeRectangularPath(n,e),e.beforeCanvasStroke(t),n.stroke(),e.afterCanvasStroke(t)):(e.beforeCanvasStroke(t),n.strokeRect(e._rectX,e._rectY,e._rectWidth,e._rectHeight),e.afterCanvasStroke(t)))},markDirtyRectangle:function(){this.markPaintDirty()},markDirtyX:function(){this.markDirtyRectangle()},markDirtyY:function(){this.markDirtyRectangle()},markDirtyWidth:function(){this.markDirtyRectangle()},markDirtyHeight:function(){this.markDirtyRectangle()},markDirtyCornerXRadius:function(){this.markDirtyRectangle()},markDirtyCornerYRadius:function(){this.markDirtyRectangle()},dispose:function(){i.prototype.dispose.call(this),this.disposePaintableStateless()}}),r.mixInto(e),s.mixInto(e),e}),i("SCENERY/display/drawables/RectangleStatefulDrawable",["require","PHET_CORE/inheritance","SCENERY/display/drawables/PaintableStatefulDrawable","SCENERY/scenery","SCENERY/display/SelfDrawable"],function(t){"use strict";t("PHET_CORE/inheritance");var e=t("SCENERY/display/drawables/PaintableStatefulDrawable"),i=t("SCENERY/scenery"),n=(t("SCENERY/display/SelfDrawable"),{mixInto:function(t){var i=t.prototype;i.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyX=!0,this.dirtyY=!0,this.dirtyWidth=!0,this.dirtyHeight=!0,this.dirtyCornerXRadius=!0,this.dirtyCornerYRadius=!0,this.initializePaintableState(t,e),this},i.disposeState=function(){this.disposePaintableState()},i.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},i.markDirtyRectangle=function(){this.dirtyX=!0,this.dirtyY=!0,this.dirtyWidth=!0,this.dirtyHeight=!0,this.dirtyCornerXRadius=!0,this.dirtyCornerYRadius=!0,this.markPaintDirty()},i.markDirtyX=function(){this.dirtyX=!0,this.markPaintDirty()},i.markDirtyY=function(){this.dirtyY=!0,this.markPaintDirty()},i.markDirtyWidth=function(){this.dirtyWidth=!0,this.markPaintDirty()},i.markDirtyHeight=function(){this.dirtyHeight=!0,this.markPaintDirty()},i.markDirtyCornerXRadius=function(){this.dirtyCornerXRadius=!0,this.markPaintDirty()},i.markDirtyCornerYRadius=function(){this.dirtyCornerYRadius=!0,this.markPaintDirty()},i.setToCleanState=function(){this.paintDirty=!1,this.dirtyX=!1,this.dirtyY=!1,this.dirtyWidth=!1,this.dirtyHeight=!1,this.dirtyCornerXRadius=!1,this.dirtyCornerYRadius=!1},e.mixInto(t)}});return i.register("RectangleStatefulDrawable",n),n}),i("SCENERY/display/drawables/RectangleDOMDrawable",["require","SCENERY/display/DOMSelfDrawable","SCENERY/util/Features","PHET_CORE/inherit","DOT/Matrix3","PHET_CORE/Poolable","SCENERY/display/drawables/RectangleStatefulDrawable","SCENERY/scenery"],function(t){"use strict";function e(t,e){if(this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),!this.fillElement||!this.strokeElement){var i=this.fillElement=document.createElement("div");i.style.display="block",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.pointerEvents="none";var n=this.strokeElement=document.createElement("div");n.style.display="block",n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.pointerEvents="none",i.appendChild(n)}this.domElement=this.fillElement,l.Util.prepareForTransform(this.domElement,this.forceAcceleration)}var i=t("SCENERY/display/DOMSelfDrawable"),n=t("SCENERY/util/Features"),r=t("PHET_CORE/inherit"),s=t("DOT/Matrix3"),a=t("PHET_CORE/Poolable"),o=t("SCENERY/display/drawables/RectangleStatefulDrawable"),l=t("SCENERY/scenery"),h=s.dirtyFromPool();return l.register("RectangleDOMDrawable",e),r(i,e,{updateDOM:function(){var t=this.node,e=this.fillElement,i=this.strokeElement;if(this.paintDirty){var r=Math.min(t._cornerXRadius,t._cornerYRadius),a=this.dirtyCornerXRadius||this.dirtyCornerYRadius;if(this.dirtyWidth&&(e.style.width=t._rectWidth+"px"),this.dirtyHeight&&(e.style.height=t._rectHeight+"px"),a&&(e.style[n.borderRadius]=r+"px"),this.dirtyFill&&(e.style.backgroundColor=t.getCSSFill()),this.dirtyStroke&&(t.hasStroke()?i.style.borderStyle="solid":i.style.borderStyle="none"),t.hasStroke()){var o=!this.hadStroke;(o||this.dirtyWidth||this.dirtyLineWidth)&&(i.style.width=t._rectWidth-t.getLineWidth()+"px"),(o||this.dirtyHeight||this.dirtyLineWidth)&&(i.style.height=t._rectHeight-t.getLineWidth()+"px"),(o||this.dirtyLineWidth)&&(i.style.left=-t.getLineWidth()/2+"px",i.style.top=-t.getLineWidth()/2+"px",i.style.borderWidth=t.getLineWidth()+"px"),(o||this.dirtyStroke)&&(i.style.borderColor=t.getSimpleCSSStroke()),(o||a||this.dirtyLineWidth||this.dirtyLineOptions)&&(i.style[n.borderRadius]=t.isRounded()||"round"===t.getLineJoin()?r+t.getLineWidth()/2+"px":"0")}}if(this.transformDirty||this.dirtyX||this.dirtyY){h.set(this.getTransformMatrix());var u=s.translation(t._rectX,t._rectY);h.multiplyMatrix(u),u.freeToPool(),l.Util.applyPreparedTransform(h,this.fillElement,this.forceAcceleration)}this.setToCleanState(),this.cleanPaintableState(),this.transformDirty=!1},dispose:function(){this.disposeState(),i.prototype.dispose.call(this)}}),o.mixInto(e),a.mixInto(e),e}),i("SCENERY/display/drawables/RectangleSVGDrawable",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/display/drawables/RectangleStatefulDrawable","SCENERY/scenery","SCENERY/display/SVGSelfDrawable"],function(t){"use strict";function e(t,e){this.initializeSVGSelfDrawable(t,e,!0,o),this.lastArcW=-1,this.lastArcH=-1,this.svgElement=this.svgElement||document.createElementNS(s.svgns,"rect")}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/display/drawables/RectangleStatefulDrawable"),s=t("SCENERY/scenery"),a=t("SCENERY/display/SVGSelfDrawable"),o=!0;return s.register("RectangleSVGDrawable",e),i(a,e,{updateSVGSelf:function(){var t=this.svgElement;if(this.dirtyX&&t.setAttribute("x",this.node._rectX),this.dirtyY&&t.setAttribute("y",this.node._rectY),this.dirtyWidth&&t.setAttribute("width",this.node._rectWidth),this.dirtyHeight&&t.setAttribute("height",this.node._rectHeight),this.dirtyCornerXRadius||this.dirtyCornerYRadius||this.dirtyWidth||this.dirtyHeight){var e=0,i=0;if(this.node.isRounded()){var n=this.node.getMaximumArcSize();e=Math.min(this.node._cornerXRadius,n),i=Math.min(this.node._cornerYRadius,n)}e!==this.lastArcW&&(this.lastArcW=e,t.setAttribute("rx",e)),i!==this.lastArcH&&(this.lastArcH=i,t.setAttribute("ry",i))}this.updateFillStrokeStyle(t)}}),r.mixInto(e),n.mixInto(e),e}),i("SCENERY/display/WebGLSelfDrawable",["require","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/SelfDrawable"],function(t){"use strict";function e(t,e){throw this.initializeWebGLSelfDrawable(t,e),new Error("Should use initialization and pooling")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/scenery"),r=t("SCENERY/display/SelfDrawable");return n.register("WebGLSelfDrawable",e),i(r,e,{initializeWebGLSelfDrawable:function(t,e){return this.initializeSelfDrawable(t,e),this.transformListener=this.transformListener||this.markTransformDirty.bind(this),e.relativeTransform.addListener(this.transformListener),e.relativeTransform.addPrecompute(),this},markTransformDirty:function(){this.markDirty()},updateSelfVisibility:function(){r.prototype.updateSelfVisibility.call(this),this.markDirty()},dispose:function(){this.instance.relativeTransform.removeListener(this.transformListener),this.instance.relativeTransform.removePrecompute(),r.prototype.dispose.call(this)}}),e}),i("SCENERY/display/drawables/RectangleWebGLDrawable",["require","SCENERY/util/Color","PHET_CORE/inherit","PHET_CORE/Poolable","AXON/Property","SCENERY/display/drawables/RectangleStatefulDrawable","SCENERY/display/Renderer","SCENERY/scenery","DOT/Vector2","SCENERY/display/WebGLSelfDrawable"],function(t){"use strict";function e(t,e){this.initializeWebGLSelfDrawable(t,e),this.initializeState(t,e),this.vertexArray||(this.vertexArray=new Float32Array(36)),this.upperLeft=new h(0,0),this.lowerLeft=new h(0,0),this.upperRight=new h(0,0),this.lowerRight=new h(0,0),this.transformDirty=!0,this.includeVertices=!0}var i=t("SCENERY/util/Color"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable"),s=t("AXON/Property"),a=t("SCENERY/display/drawables/RectangleStatefulDrawable"),o=t("SCENERY/display/Renderer"),l=t("SCENERY/scenery"),h=t("DOT/Vector2"),u=t("SCENERY/display/WebGLSelfDrawable"),c=new i("transparent");return l.register("RectangleWebGLDrawable",e),n(u,e,{webglRenderer:o.webglVertexColorPolygons,onAddToBlock:function(t){this.webglBlock=t,this.markDirty()},onRemoveFromBlock:function(t){},markTransformDirty:function(){this.transformDirty=!0,u.prototype.markTransformDirty.call(this)},update:function(){if(!u.prototype.update.call(this))return!1;if(this.dirtyFill&&(this.includeVertices=this.node.hasFill(),this.includeVertices))for(var t=this.node.fill instanceof s?this.node.fill.value:this.node.fill,e=c.set(t),i=e.red/255,n=e.green/255,r=e.blue/255,a=e.alpha,o=0;o<6;o++){var l=6*o;this.vertexArray[2+l]=i,this.vertexArray[3+l]=n,this.vertexArray[4+l]=r,this.vertexArray[5+l]=a}if(this.transformDirty||this.dirtyX||this.dirtyY||this.dirtyWidth||this.dirtyHeight){this.transformDirty=!1;var h=this.node._rectX,d=this.node._rectY,p=this.node._rectWidth,f=this.node._rectHeight,m=this.instance.relativeTransform.matrix;m.multiplyVector2(this.upperLeft.setXY(h,d)),m.multiplyVector2(this.lowerLeft.setXY(h,d+f)),m.multiplyVector2(this.upperRight.setXY(h+p,d)),m.multiplyVector2(this.lowerRight.setXY(h+p,d+f)),this.vertexArray[0]=this.upperLeft.x,this.vertexArray[1]=this.upperLeft.y,this.vertexArray[6]=this.lowerLeft.x,this.vertexArray[7]=this.lowerLeft.y,this.vertexArray[12]=this.upperRight.x,this.vertexArray[13]=this.upperRight.y,this.vertexArray[18]=this.upperRight.x,this.vertexArray[19]=this.upperRight.y,this.vertexArray[24]=this.lowerLeft.x,this.vertexArray[25]=this.lowerLeft.y,this.vertexArray[30]=this.lowerRight.x,this.vertexArray[31]=this.lowerRight.y}return this.setToCleanState(),this.cleanPaintableState(),!0},dispose:function(){this.disposeState(),u.prototype.dispose.call(this)}}),a.mixInto(e),r.mixInto(e),e}),i("SCENERY/nodes/Rectangle",["require","DOT/Bounds2","DOT/Dimension2","PHET_CORE/extendDefined","SCENERY/util/Features","PHET_CORE/inherit","SCENERY/nodes/Path","SCENERY/display/drawables/RectangleCanvasDrawable","SCENERY/display/drawables/RectangleDOMDrawable","SCENERY/display/drawables/RectangleSVGDrawable","SCENERY/display/drawables/RectangleWebGLDrawable","SCENERY/display/Renderer","SCENERY/scenery","KITE/Shape"],function(t){"use strict";function e(t,e,n,s,a,l,h){this._rectX=0,this._rectY=0,this._rectWidth=0,this._rectHeight=0,this._cornerXRadius=0,this._cornerYRadius=0,h="object"===(void 0===t?"undefined":_typeof(t))?t instanceof i?"number"!=typeof e?r({rectBounds:t},e):r({rectBounds:t,cornerXRadius:e,cornerYRadius:n},s):t:void 0===l?r({rectX:t,rectY:e,rectWidth:n,rectHeight:s},a):r({rectX:t,rectY:e,rectWidth:n,rectHeight:s,cornerXRadius:a,cornerYRadius:l},h),o.call(this,null,h)}var i=t("DOT/Bounds2"),n=t("DOT/Dimension2"),r=t("PHET_CORE/extendDefined"),s=t("SCENERY/util/Features"),a=t("PHET_CORE/inherit"),o=t("SCENERY/nodes/Path"),l=t("SCENERY/display/drawables/RectangleCanvasDrawable"),h=t("SCENERY/display/drawables/RectangleDOMDrawable"),u=t("SCENERY/display/drawables/RectangleSVGDrawable"),c=t("SCENERY/display/drawables/RectangleWebGLDrawable"),d=t("SCENERY/display/Renderer"),p=t("SCENERY/scenery"),f=t("KITE/Shape");return p.register("Rectangle",e),a(o,e,{_mutatorKeys:["rectBounds","rectSize","rectX","rectY","rectWidth","rectHeight","cornerRadius","cornerXRadius","cornerYRadius"].concat(o.prototype._mutatorKeys),drawableMarkFlags:o.prototype.drawableMarkFlags.concat(["x","y","width","height","cornerXRadius","cornerYRadius"]).filter(function(t){return"shape"!==t}),getMaximumArcSize:function(){return Math.min(this._rectWidth/2,this._rectHeight/2)},getStrokeRendererBitmask:function(){var t=o.prototype.getStrokeRendererBitmask.call(this);return!this.hasStroke()||this.getStroke().isGradient||this.getStroke().isPattern||this.hasLineDash()||("miter"===this.getLineJoin()||"round"===this.getLineJoin()&&s.borderRadius)&&(t|=d.bitmaskDOM),this.hasStroke()||(t|=d.bitmaskWebGL),t},getPathRendererBitmask:function(){var t=d.bitmaskCanvas|d.bitmaskSVG,e=this.getMaximumArcSize();return(!this.hasStroke()||this.getLineWidth()<=this._rectHeight&&this.getLineWidth()<=this._rectWidth)&&(!this.isRounded()||s.borderRadius&&this._cornerXRadius===this._cornerYRadius)&&this._cornerYRadius<=e&&this._cornerXRadius<=e&&(t|=d.bitmaskDOM),this.hasStroke()||this.isRounded()||(t|=d.bitmaskWebGL),t},setRect:function(t,e,i,n,r,s){var a=void 0!==r,o=void 0!==s;if(this._rectX!==t||this._rectY!==e||this._rectWidth!==i||this._rectHeight!==n||a&&this._cornerXRadius!==r||o&&this._cornerYRadius!==s){this._rectX=t,this._rectY=e,this._rectWidth=i,this._rectHeight=n,this._cornerXRadius=a?r:this._cornerXRadius,this._cornerYRadius=o?s:this._cornerYRadius;for(var l=this._drawables.length,h=0;h=t&&a.x<=t+i&&a.y>=e&&a.y<=e+n;if(!o||r<=0||s<=0)return o;var l=Math.min(i/2,n/2);r=Math.min(l,r),s=Math.min(l,s);var h,u,c=!1;if(a.x=h):(h=t+i-r,c=c||a.x<=h),c)return!0;if(a.y=u):(u=e+n-s,c=c||a.y<=u),c)return!0;var d=a.x-h,p=a.y-u;return d/=r,p/=s,d*=d,p*=p,d+p<=1},e.rect=function(t,i,n,r,s){return new e(t,i,n,r,0,0,s)},e.roundedRect=function(t,i,n,r,s,a,o){return new e(t,i,n,r,s,a,o)},e.bounds=function(t,i){return new e(t.minX,t.minY,t.width,t.height,i)},e.roundedBounds=function(t,i,n,r){return new e(t.minX,t.minY,t.width,t.height,i,n,r)},e.dimension=function(t,i){return new e(0,0,t.width,t.height,0,0,i)},e}),i("VEGAS/StatusBar",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","SCENERY/nodes/Rectangle","VEGAS/vegas"],function(t){"use strict";function e(t,e,i){var r=this;i=_.extend({barHeight:50,xMargin:10,yMargin:8,barFill:"lightGray",barStroke:null,floatToTop:!1,dynamicAlignment:!0},i),this.layoutBounds=t,this.xMargin=i.xMargin,this.yMargin=i.yMargin,this.dynamicAlignment=i.dynamicAlignment,this.barNode=new s({fill:i.barFill,stroke:i.barStroke}),i.children=[this.barNode].concat(i.children||[]),n.call(this,i);var a=function(e){var n=i.floatToTop?e.top:t.top;r.barNode.setRect(e.minX,n,e.width,i.barHeight),r.updateLayout()};e.link(a),this.disposeStatusBar=function(){e.hasListener(a)&&e.unlink(a)}}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/Rectangle"),a=t("VEGAS/vegas"),o=new r(20);return a.register("StatusBar",e),i(n,e,{dispose:function(){this.disposeStatusBar(),n.prototype.dispose.call(this)},updateLayout:function(){var t=(this.dynamicAlignment?this.barNode.left:this.layoutBounds.minX)+this.xMargin,e=(this.dynamicAlignment?this.barNode.right:this.layoutBounds.maxX)-this.xMargin;this.updateLayoutProtected(t,e,this.barNode.centerY)},updateLayoutProtected:function(t,e,i){throw new Error("updateLayout must be implemented by subtypes")}},{DEFAULT_FONT:o})}),i("SCENERY/util/TextBounds",["require","DOT/Bounds2","SCENERY/util/CanvasContextWrapper","SCENERY/util/Font","SCENERY/scenery","SCENERY/util/Util"],function(t){"use strict";var e,i,n=t("DOT/Bounds2"),r=t("SCENERY/util/CanvasContextWrapper"),s=(t("SCENERY/util/Font"),t("SCENERY/scenery")),a=t("SCENERY/util/Util"),o={},l={approximateSVGBounds:function(t,r){if(!e.parentNode){if(!document.body)throw new Error("No document.body and trying to get approximate SVG bounds of a Text node");document.body.appendChild(e)}l.setSVGTextAttributes(i,t,r);var s=i.getBBox();return new n(s.x,s.y,s.x+s.width,s.y+s.height)},accurateCanvasBounds:function(t){var e=l.approximateSVGBounds(t._font,t.renderedText);if(!t.renderedText.length||0===e.width)return e;var i=a.canvasAccurateBounds(function(e){if(e.font=t._font.toCSS(),e.direction="ltr",e.fillText(t.renderedText,0,0),t.hasPaintableStroke()){var i=new r(null,e);t.beforeCanvasStroke(i),e.strokeText(t.renderedText,0,0),t.afterCanvasStroke(i)}},{precision:.5,resolution:128,initialScale:32/Math.max(Math.abs(e.minX),Math.abs(e.minY),Math.abs(e.maxX),Math.abs(e.maxY))});return i.isFinite()?i:e},getVerticalBounds:function(t){var e=t.toCSS(),i=o[e];return i||(i=o[e]=l.approximateSVGBounds(t,"m")),i},approximateCanvasWidth:function(t,e){var i=s.scratchContext;return i.font=t.toCSS(),i.direction="ltr",i.measureText(e).width},approximateHybridBounds:function(t,e){var i=l.getVerticalBounds(t),r=l.approximateCanvasWidth(t,e);return new n(0,i.minY,r,i.maxY)},approximateDOMBounds:function(t,e){var i=document.createElement("div");$(i).css({position:"absolute",left:0,top:0,padding:"0 !important",margin:"0 !important",display:"hidden"});var r=document.createElement("span");$(r).css("font",t.toCSS()),r.appendChild(e),r.setAttribute("direction","ltr");var s=document.createElement("div");$(s).css({"vertical-align":"baseline",display:"inline-block",width:0,height:"1024px",margin:"0 !important",padding:"0 !important"}),i.appendChild(r),i.appendChild(s),document.body.appendChild(i);var a=r.getBoundingClientRect(),o=i.getBoundingClientRect(),l=new n(a.left,a.top-1024,a.right+1,a.bottom-1024).shifted(-o.left,-o.top);return document.body.removeChild(i),l},approximateImprovedDOMBounds:function(t,e){var i=document.createElement("div");i.style.display="inline-block",i.style.font=t.toCSS(),i.style.color="transparent",i.style.padding="0 !important",i.style.margin="0 !important",i.style.position="absolute",i.style.left="0",i.style.top="0",i.setAttribute("direction","ltr"),i.appendChild(e),document.body.appendChild(i);var r=new n(i.offsetLeft,i.offsetTop,i.offsetLeft+i.offsetWidth+1,i.offsetTop+i.offsetHeight+1);document.body.removeChild(i);var s=l.getVerticalBounds(t);return r.shiftedY(s.minY)},setSVGTextAttributes:function(t,e,i){t.setAttribute("direction","ltr"),t.setAttribute("font-family",e.getFamily()),t.setAttribute("font-size",e.getSize()),t.setAttribute("font-style",e.getStyle()),t.setAttribute("font-weight",e.getWeight()),t.setAttribute("font-stretch",e.getStretch()),t.lastChild.nodeValue=i},initializeTextBounds:function(){(e=document.getElementById("sceneryTextSizeContainer"))||((e=document.createElementNS(s.svgns,"svg")).setAttribute("width","2"),e.setAttribute("height","2"),e.setAttribute("id","sceneryTextSizeContainer"),e.setAttribute("style","visibility: hidden; pointer-events: none; position: absolute; left: -65535px; right: -65535px;")),(i=document.getElementById("sceneryTextSizeElement"))||((i=document.createElementNS(s.svgns,"text")).appendChild(document.createTextNode("")),i.setAttribute("dominant-baseline","alphabetic"),i.setAttribute("text-rendering","geometricPrecision"),i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("id","sceneryTextSizeElement"),e.appendChild(i))}};return s.register("TextBounds",l),l}),i("SCENERY/display/drawables/TextCanvasDrawable",["require","SCENERY/display/CanvasSelfDrawable","PHET_CORE/inherit","SCENERY/display/drawables/PaintableStatelessDrawable","PHET_CORE/Poolable","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e)}var i=t("SCENERY/display/CanvasSelfDrawable"),n=t("PHET_CORE/inherit"),r=t("SCENERY/display/drawables/PaintableStatelessDrawable"),s=t("PHET_CORE/Poolable");return t("SCENERY/scenery").register("TextCanvasDrawable",e),n(i,e,{paintCanvas:function(t,e,i){var n=t.context;(e.hasFill()||e.hasPaintableStroke())&&(t.setFont(e._font.getFont()),t.setDirection("ltr")),e.hasFill()&&(e.beforeCanvasFill(t),n.fillText(e.renderedText,0,0),e.afterCanvasFill(t)),e.hasPaintableStroke()&&(e.beforeCanvasStroke(t),n.strokeText(e.renderedText,0,0),e.afterCanvasStroke(t))},markDirtyText:function(){this.markPaintDirty()},markDirtyFont:function(){this.markPaintDirty()},markDirtyBounds:function(){this.markPaintDirty()},dispose:function(){i.prototype.dispose.call(this),this.disposePaintableStateless()}}),r.mixInto(e),s.mixInto(e),e}),i("SCENERY/display/drawables/TextStatefulDrawable",["require","PHET_CORE/inheritance","SCENERY/display/drawables/PaintableStatefulDrawable","SCENERY/scenery","SCENERY/display/SelfDrawable"],function(t){"use strict";t("PHET_CORE/inheritance");var e=t("SCENERY/display/drawables/PaintableStatefulDrawable"),i=t("SCENERY/scenery"),n=(t("SCENERY/display/SelfDrawable"),{mixInto:function(t){var i=t.prototype;i.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyText=!0,this.dirtyFont=!0,this.dirtyBounds=!0,this.initializePaintableState(t,e),this},i.disposeState=function(){this.disposePaintableState()},i.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},i.markDirtyText=function(){this.dirtyText=!0,this.markPaintDirty()},i.markDirtyFont=function(){this.dirtyFont=!0,this.markPaintDirty()},i.markDirtyBounds=function(){this.dirtyBounds=!0,this.markPaintDirty()},i.setToCleanState=function(){this.paintDirty=!1,this.dirtyText=!1,this.dirtyFont=!1,this.dirtyBounds=!1},e.mixInto(t)}});return i.register("TextStatefulDrawable",n),n}),i("SCENERY/display/drawables/TextDOMDrawable",["require","SCENERY/display/DOMSelfDrawable","PHET_CORE/inherit","DOT/Matrix3","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/drawables/TextStatefulDrawable","SCENERY/util/Util"],function(t){"use strict";function e(t,e){this.initializeDOMSelfDrawable(t,e),this.initializeState(t,e),this.domElement||(this.domElement=document.createElement("div"),this.domElement.style.display="block",this.domElement.style.position="absolute",this.domElement.style.pointerEvents="none",this.domElement.style.left="0",this.domElement.style.top="0",this.domElement.setAttribute("dir","ltr")),a.Util.prepareForTransform(this.domElement,this.forceAcceleration)}var i=t("SCENERY/display/DOMSelfDrawable"),n=t("PHET_CORE/inherit"),r=t("DOT/Matrix3"),s=t("PHET_CORE/Poolable"),a=t("SCENERY/scenery"),o=t("SCENERY/display/drawables/TextStatefulDrawable");t("SCENERY/util/Util");var l=r.dirtyFromPool();return a.register("TextDOMDrawable",e),n(i,e,{updateDOM:function(){var t=this.node,e=this.domElement;if(this.paintDirty&&(this.dirtyFont&&(e.style.font=t.getFont()),this.dirtyStroke&&(e.style.color=t.getCSSFill()),this.dirtyBounds&&(e.style.width=t.getSelfBounds().width+"px",e.style.height=t.getSelfBounds().height+"px"),this.dirtyText&&(e.textContent=t.renderedText)),this.transformDirty||this.dirtyText||this.dirtyFont||this.dirtyBounds){var i=t.getSelfBounds().minY;l.set(this.getTransformMatrix());var n=r.translation(0,i);l.multiplyMatrix(n),n.freeToPool(),a.Util.applyPreparedTransform(l,e,this.forceAcceleration)}this.setToCleanState(),this.cleanPaintableState(),this.transformDirty=!1},dispose:function(){this.disposeState(),i.prototype.dispose.call(this)}}),o.mixInto(e),s.mixInto(e),e}),i("SCENERY/nodes/TextIO",["require","SCENERY/util/FontIO","SCENERY/nodes/NodeIO","SCENERY/util/NodeProperty","TANDEM/types/NumberIO","TANDEM/phetioInherit","AXON/PropertyIO","SCENERY/scenery","TANDEM/types/StringIO","TANDEM/types/VoidIO"],function(t){"use strict";function e(t,e){n.call(this,t,e);var i=new r(t,"text","text",_.extend({phetioReadOnly:t.phetioReadOnly,phetioState:!0,phetioType:o(h),tandem:t.tandem.createTandem("textProperty"),phetioDocumentation:"Property for the displayed text"},t.phetioComponentOptions,t.phetioComponentOptions.textProperty));this.disposeTextIO=function(){i.dispose()}}var i=t("SCENERY/util/FontIO"),n=t("SCENERY/nodes/NodeIO"),r=t("SCENERY/util/NodeProperty"),s=t("TANDEM/types/NumberIO"),a=t("TANDEM/phetioInherit"),o=t("AXON/PropertyIO"),l=t("SCENERY/scenery"),h=t("TANDEM/types/StringIO"),u=t("TANDEM/types/VoidIO");return a(n,"TextIO",e,{dispose:function(){this.disposeTextIO(),n.prototype.dispose.call(this)},setFontOptions:{returnType:u,parameterTypes:[i],implementation:function(t){this.instance.setFont(t)},documentation:"Sets font options for this TextIO instance, e.g. {size: 16, weight: bold}. If increasing the font size does not make the text size larger, you may need to increase the maxWidth of the TextIO also.",invocableForReadOnlyElements:!1},getFontOptions:{returnType:i,parameterTypes:[],implementation:function(){return this.instance.getFont()},documentation:"Gets font options for this TextIO instance as an object"},setMaxWidth:{returnType:u,parameterTypes:[s],implementation:function(t){this.instance.setMaxWidth(t)},documentation:"Sets the maximum width of text box. If the text width exceeds maxWidth, it is scaled down to fit.",invocableForReadOnlyElements:!1},getMaxWidth:{returnType:s,parameterTypes:[],implementation:function(){return this.instance.maxWidth},documentation:"Gets the maximum width of text box"}},{documentation:"Text that is displayed in the simulation. TextIO has a nested PropertyIO.<String> for the current string value.",validator:{valueType:l.Text}}),l.register("TextIO",e),e}),i("SCENERY/display/drawables/TextSVGDrawable",["require","PHET_CORE/inherit","PHET_CORE/platform","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/SVGSelfDrawable","SCENERY/display/drawables/TextStatefulDrawable"],function(t){"use strict";function e(t,e){if(this.initializeSVGSelfDrawable(t,e,!0,l),!this.svgElement){var i=this.svgElement=document.createElementNS(s.svgns,"text");i.appendChild(document.createTextNode("")),i.setAttribute("dominant-baseline","alphabetic"),i.setAttribute("text-rendering","geometricPrecision"),h&&i.setAttribute("lengthAdjust","spacingAndGlyphs"),i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("direction","ltr")}}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/platform"),r=t("PHET_CORE/Poolable"),s=t("SCENERY/scenery"),a=t("SCENERY/display/SVGSelfDrawable"),o=t("SCENERY/display/drawables/TextStatefulDrawable"),l=!0,h=!n.ie&&!n.edge;return s.register("TextSVGDrawable",e),i(a,e,{updateSVGSelf:function(){var t=this.svgElement;this.dirtyFont&&(t.setAttribute("font-family",this.node._font.getFamily()),t.setAttribute("font-size",this.node._font.getSize()),t.setAttribute("font-style",this.node._font.getStyle()),t.setAttribute("font-weight",this.node._font.getWeight()),t.setAttribute("font-stretch",this.node._font.getStretch())),this.dirtyText&&(t.lastChild.nodeValue=this.node.renderedText),this.dirtyBounds&&h&&isFinite(this.node.selfBounds.width)&&t.setAttribute("textLength",this.node.selfBounds.width),this.updateFillStrokeStyle(t)}}),o.mixInto(e),r.mixInto(e),e}),i("SCENERY/nodes/Text",["require","PHET_CORE/escapeHTML","PHET_CORE/extendDefined","SCENERY/util/Font","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Paintable","PHET_CORE/platform","SCENERY/display/Renderer","SCENERY/scenery","TANDEM/Tandem","SCENERY/util/TextBounds","SCENERY/display/drawables/TextCanvasDrawable","SCENERY/display/drawables/TextDOMDrawable","SCENERY/nodes/TextIO","SCENERY/display/drawables/TextSVGDrawable"],function(t){"use strict";function e(t,e){this._text="",this._font=r.DEFAULT,this._boundsMethod="hybrid",this._isHTML=void 0!==this._isHTML&&this._isHTML,this._cachedRenderedText=null,this.initializePaintable(),e=n({fill:"#000000",text:t,tandem:c.optional,phetioType:m},e),this.textTandem=e.tandem,a.call(this,e),this.invalidateSupportedRenderers()}var i=t("PHET_CORE/escapeHTML"),n=t("PHET_CORE/extendDefined"),r=t("SCENERY/util/Font"),s=t("PHET_CORE/inherit"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/nodes/Paintable"),l=t("PHET_CORE/platform"),h=t("SCENERY/display/Renderer"),u=t("SCENERY/scenery"),c=t("TANDEM/Tandem"),d=t("SCENERY/util/TextBounds"),p=t("SCENERY/display/drawables/TextCanvasDrawable"),f=t("SCENERY/display/drawables/TextDOMDrawable"),m=t("SCENERY/nodes/TextIO"),g=t("SCENERY/display/drawables/TextSVGDrawable"),E=-1!==window.navigator.userAgent.indexOf("like Gecko) Version/5")&&-1!==window.navigator.userAgent.indexOf("Safari/");u.register("Text",e),s(a,e,{_mutatorKeys:["boundsMethod","text","font","fontWeight","fontFamily","fontStretch","fontStyle","fontSize"].concat(a.prototype._mutatorKeys),drawableMarkFlags:a.prototype.drawableMarkFlags.concat(["text","font","bounds"]),setText:function(t){if((t=""+t)!==this._text){var e=this._text;this._text=t,this._cachedRenderedText=null;for(var i=this._drawables.length,n=0;n=1;i--){var n=t.children[i-1],r=t.children[i];r.dir&&n.dir===r.dir&&(n.children=n.children.concat(r.children),t.children.splice(i,1),e(n))}}function i(t){if("string"!=typeof t){for(var n=0;n=0;e--){var i=t.children[e];t.dir===i.dir&&Array.prototype.splice.apply(t.children,[e,1].concat(i.children))}}(t),e(t),t}}function n(t){if("string"==typeof t)return t;var e=t.children.map(n).join("");return t.dir?t.dir+e+"‬":e}for(var r={dir:null,children:[],parent:null},s=r,a=0;a1e-6&&i.push(new r(_.extend({value:u},e.starNodeOptions)));var c=s-i.length;for(h=0;h=0&&-1===i&&(r.ie9||r.ie10?t.setAttribute("transform",""):t.removeAttribute("transform")),this._mipmapLevel=i,this.node._mipmap&&this.node.hasMipmaps()){var n=this.node.getMipmapURL(i),s=this.node.getMipmapCanvas(i);t.setAttribute("width",s.width+"px"),t.setAttribute("height",s.height+"px"),t.setAttribute("transform","scale("+Math.pow(2,i).toFixed(20)+")"),t.setAttributeNS(a.xlinkns,"xlink:href",n)}else t.setAttribute("width",this.node.getImageWidth()+"px"),t.setAttribute("height",this.node.getImageHeight()+"px"),t.setAttributeNS(a.xlinkns,"xlink:href",this.node.getImageURL())},updateMipmapStatus:function(t){this._usingMipmap!==t&&(this._usingMipmap=t,t?(this.instance.relativeTransform.addListener(this._mipmapTransformListener),this.instance.relativeTransform.addPrecompute()):(this.instance.relativeTransform.removeListener(this._mipmapTransformListener),this.instance.relativeTransform.removePrecompute()),this.markDirtyMipmap())},dispose:function(){this.updateMipmapStatus(!1),this.node.offStatic("mipmap",this._mipmapListener),o.prototype.dispose.call(this)}}),i.mixInto(e),s.mixInto(e),e}),i("SCENERY/display/drawables/ImageWebGLDrawable",["require","SCENERY/display/drawables/ImageStatefulDrawable","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/display/Renderer","SCENERY/scenery","DOT/Vector2","SCENERY/display/WebGLSelfDrawable"],function(t){"use strict";function e(t,e){this.initializeWebGLSelfDrawable(t,e),this.vertexArray||(this.vertexArray=new Float32Array(6*h)),this.upperLeft=new o(0,0),this.lowerLeft=new o(0,0),this.upperRight=new o(0,0),this.lowerRight=new o(0,0),this.xyDirty=!0,this.uvDirty=!0,this.updatedOnce=!1,this.sprite=null}var i=t("SCENERY/display/drawables/ImageStatefulDrawable"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable"),s=t("SCENERY/display/Renderer"),a=t("SCENERY/scenery"),o=t("DOT/Vector2"),l=t("SCENERY/display/WebGLSelfDrawable"),h=5,u=0*h,c=1*h,d=2*h,p=3*h,f=4*h,m=5*h;return a.register("ImageWebGLDrawable",e),n(l,e,{webglRenderer:s.webglTexturedTriangles,onAddToBlock:function(t){this.webglBlock=t,this.markDirty(),this.reserveSprite()},onRemoveFromBlock:function(t){this.unreserveSprite()},reserveSprite:function(){if(this.sprite){if(this.sprite.image===this.node._image)return;this.unreserveSprite()}var t=this.node.getImageWidth(),e=this.node.getImageHeight();this.sprite=t>0&&e>0?this.webglBlock.addSpriteSheetImage(this.node._image,t,e):null,this.xyDirty=!0,this.uvDirty=!0},unreserveSprite:function(){this.sprite&&this.webglBlock.removeSpriteSheetImage(this.sprite),this.sprite=null},markTransformDirty:function(){this.xyDirty=!0,l.prototype.markTransformDirty.call(this)},markPaintDirty:function(){this.xyDirty=!0,this.uvDirty=!0,this.markDirty()},update:function(){if(!l.prototype.update.call(this))return!1;if(this.reserveSprite(),!this.dirtyImageOpacity&&this.updatedOnce||(this.vertexArray[u+4]=this.node._imageOpacity,this.vertexArray[c+4]=this.node._imageOpacity,this.vertexArray[d+4]=this.node._imageOpacity,this.vertexArray[p+4]=this.node._imageOpacity,this.vertexArray[f+4]=this.node._imageOpacity,this.vertexArray[m+4]=this.node._imageOpacity),this.updatedOnce=!0,!this.sprite)return!1;if(this.uvDirty){this.uvDirty=!1;var t=this.sprite.uvBounds;this.vertexArray[u+2]=t.minX,this.vertexArray[u+3]=t.minY,this.vertexArray[c+2]=t.minX,this.vertexArray[c+3]=t.maxY,this.vertexArray[d+2]=t.maxX,this.vertexArray[d+3]=t.minY,this.vertexArray[p+2]=t.maxX,this.vertexArray[p+3]=t.minY,this.vertexArray[f+2]=t.minX,this.vertexArray[f+3]=t.maxY,this.vertexArray[m+2]=t.maxX,this.vertexArray[m+3]=t.maxY}if(this.xyDirty){this.xyDirty=!1;var e=this.node.getImageWidth(),i=this.node.getImageHeight(),n=this.instance.relativeTransform.matrix;n.multiplyVector2(this.upperLeft.setXY(0,0)),n.multiplyVector2(this.lowerLeft.setXY(0,i)),n.multiplyVector2(this.upperRight.setXY(e,0)),n.multiplyVector2(this.lowerRight.setXY(e,i)),this.vertexArray[u+0]=this.upperLeft.x,this.vertexArray[u+1]=this.upperLeft.y,this.vertexArray[c+0]=this.lowerLeft.x,this.vertexArray[c+1]=this.lowerLeft.y,this.vertexArray[d+0]=this.upperRight.x,this.vertexArray[d+1]=this.upperRight.y,this.vertexArray[p+0]=this.upperRight.x,this.vertexArray[p+1]=this.upperRight.y,this.vertexArray[f+0]=this.lowerLeft.x,this.vertexArray[f+1]=this.lowerLeft.y,this.vertexArray[m+0]=this.lowerRight.x,this.vertexArray[m+1]=this.lowerRight.y}return!0},dispose:function(){l.prototype.dispose.call(this)}}),i.mixInto(e),r.mixInto(e),e}),i("SCENERY/nodes/Image",["require","DOT/Bounds2","PHET_CORE/cleanArray","PHET_CORE/extendDefined","SCENERY/display/drawables/ImageCanvasDrawable","SCENERY/display/drawables/ImageDOMDrawable","SCENERY/display/drawables/ImageSVGDrawable","SCENERY/display/drawables/ImageWebGLDrawable","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/display/Renderer","SCENERY/scenery","SCENERY/util/SpriteSheet","DOT/Util"],function(t){"use strict";function e(t,e){this._initialWidth=g.initialWidth,this._initialHeight=g.initialHeight,this._imageOpacity=g.imageOpacity,this._mipmap=g.mipmap,this._mipmapBias=g.mipmapBias,this._mipmapInitialLevel=g.mipmapInitialLevel,this._mipmapMaxLevel=g.mipmapMaxLevel,this._mipmapCanvases=[],this._mipmapURLs=[],this._mipmapData=null,this._imageLoadListener=this.onImageLoad.bind(this),this._imageLoadListenerAttached=!1,e=r({image:t},e),u.call(this,e),this.invalidateSupportedRenderers()}var i=t("DOT/Bounds2"),n=t("PHET_CORE/cleanArray"),r=t("PHET_CORE/extendDefined"),s=t("SCENERY/display/drawables/ImageCanvasDrawable"),a=t("SCENERY/display/drawables/ImageDOMDrawable"),o=t("SCENERY/display/drawables/ImageSVGDrawable"),l=t("SCENERY/display/drawables/ImageWebGLDrawable"),h=t("PHET_CORE/inherit"),u=t("SCENERY/nodes/Node"),c=t("SCENERY/display/Renderer"),d=t("SCENERY/scenery"),p=t("SCENERY/util/SpriteSheet"),f=t("DOT/Util"),m=Math.log2||function(t){return Math.log(t)/Math.LN2},g={imageOpacity:1,initialWidth:0,initialHeight:0,mipmap:!1,mipmapBias:0,mipmapInitialLevel:4,mipmapMaxLevel:5};return d.register("Image",e),h(u,e,{_mutatorKeys:["image","imageOpacity","initialWidth","initialHeight","mipmap","mipmapBias","mipmapInitialLevel","mipmapMaxLevel"].concat(u.prototype._mutatorKeys),drawableMarkFlags:u.prototype.drawableMarkFlags.concat(["image","imageOpacity","mipmap"]),setImage:function(t){var e=this._image!==t;if(e&&"string"==typeof t&&(this._image&&t===this._image.src&&(e=!1),t===this._mipmapData&&(e=!1)),e){if(this._initialWidth=0,this._initialHeight=0,this._image&&this._imageLoadListenerAttached&&this.detachImageLoadListener(),this._mipmapData=null,"string"==typeof t){var i=t;(t=document.createElement("img")).src=i}else Array.isArray(t)&&(this._mipmapData=t,t=t[0].img,this._mipmapInitialLevel=this._mipmapMaxLevel=this._mipmapData.length,this._mipmap=!0);this._image=t,!(this._image instanceof HTMLImageElement)||this._image.width&&this._image.height||this.attachImageLoadListener(),this.invalidateImage()}return this},set image(t){this.setImage(t)},getImage:function(){return this._image},get image(){return this.getImage()},invalidateImage:function(){this._image?this.invalidateSelf(new i(0,0,this.getImageWidth(),this.getImageHeight())):this.invalidateSelf(i.NOTHING);for(var t=this._drawables.length,e=0;e2){var i=document.createElement("canvas");if(i.width=Math.ceil(e.width/2),i.height=Math.ceil(e.height/2),i.width>0&&i.height>0){var n=i.getContext("2d");n.scale(.5,.5),n.drawImage(e,0,0),this._mipmapCanvases.push(i),this._mipmapURLs.push(i.toDataURL())}}},invalidateMipmaps:function(){if(n(this._mipmapCanvases),n(this._mipmapURLs),this._image&&this._mipmap)if(this._mipmapData)for(var t=0;t=1)return 0;var i=m(1/e);if((i=f.roundSymmetric(i+this._mipmapBias-.7))<0&&(i=0),i>this._mipmapMaxLevel&&(i=this._mipmapMaxLevel),this.mipmap&&!this._mipmapCanvases[i]){for(var n=this._mipmapCanvases.length-1;++n<=i;)this.constructNextMipmap();return Math.min(i,this._mipmapCanvases.length-1)}return i},getMipmapCanvas:function(t){return this._mipmapData&&this._mipmapData[t]&&this._mipmapData[t].updateCanvas&&this._mipmapData[t].updateCanvas(),this._mipmapCanvases[t]},getMipmapURL:function(t){return this._mipmapURLs[t]},hasMipmaps:function(){return this._mipmapCanvases.length>0},getImageWidth:function(){var t=this._mipmapData?this._mipmapData[0].width:this._image.naturalWidth||this._image.width;return 0===t?this._initialWidth:t},get imageWidth(){return this.getImageWidth()},getImageHeight:function(){var t=this._mipmapData?this._mipmapData[0].height:this._image.naturalHeight||this._image.height;return 0===t?this._initialHeight:t},get imageHeight(){return this.getImageHeight()},getImageURL:function(){return this._image.src},isPainted:function(){return!0},canvasPaintSelf:function(t,e){s.prototype.paintCanvas(t,this,e)},createDOMDrawable:function(t,e){return a.createFromPool(t,e)},createSVGDrawable:function(t,e){return o.createFromPool(t,e)},createCanvasDrawable:function(t,e){return s.createFromPool(t,e)},createWebGLDrawable:function(t,e){return l.createFromPool(t,e)},attachImageLoadListener:function(){this.isDisposed||(this._image.addEventListener("load",this._imageLoadListener),this._imageLoadListenerAttached=!0)},detachImageLoadListener:function(){this._image.removeEventListener("load",this._imageLoadListener),this._imageLoadListenerAttached=!1},onImageLoad:function(){this.invalidateImage(),this.detachImageLoadListener()},dispose:function(){this._image&&this._imageLoadListenerAttached&&this.detachImageLoadListener(),u.prototype.dispose.call(this)}}),e.createSVGImage=function(t,e,i){var n=document.createElementNS(d.svgns,"image");return n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("width",e+"px"),n.setAttribute("height",i+"px"),n.setAttributeNS(d.xlinkns,"xlink:href",t),n},e.createFastMipmapFromCanvas=function(t){var e=[],i=t.toDataURL(),n=new window.Image;n.src=i,e.push({img:n,url:i,width:t.width,height:t.height,canvas:t});for(var r=t;r.width>=2&&r.height>=2;){var s={},a=document.createElement("canvas");a.width=s.width=Math.ceil(r.width/2),a.height=s.height=Math.ceil(r.height/2);var o=a.getContext("2d");o.setTransform(.5,0,0,.5,0,0),o.drawImage(r,0,0),s.canvas=a,s.url=a.toDataURL(),s.img=new window.Image,s.img.src=s.url,r=a,e.push(s)}return e},e.DEFAULT_OPTIONS=_.extend({},u.DEFAULT_OPTIONS,g),e}),i("SUN/Panel",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Rectangle","SUN/sun","TANDEM/Tandem"],function(t){"use strict";function e(t,e){e=_.extend({},a,e),n.call(this);var i=new r(0,0,1,1,{lineWidth:e.lineWidth,pickable:e.backgroundPickable,lineDash:e.lineDash,cornerRadius:e.cornerRadius});this.background=i,this.setStroke(e.stroke),this.setFill(e.fill),this.addChild(i),this.addChild(t);var s=!1,o=function(){if(!s&&(i.visible=t.bounds.isValid(),i.visible)){s=!0;var n=Math.max(e.minWidth,t.width+2*e.xMargin);i.setRect(0,0,n,t.height+2*e.yMargin),"center"===e.align?t.center=i.center:"left"===e.align?(t.left=i.centerX-n/2+e.xMargin,t.centerY=i.centerY):(t.right=i.centerX+n/2-e.xMargin,t.centerY=i.centerY),s=!1}};e.resize&&t.on("bounds",o),o(),this.disposePanel=function(){e.resize&&t.off("bounds",o)},this.mutate(e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY/nodes/Rectangle"),s=t("SUN/sun"),a={fill:"white",stroke:"black",lineWidth:1,xMargin:5,yMargin:5,cornerRadius:10,resize:!0,backgroundPickable:!1,align:"left",minWidth:0,tandem:t("TANDEM/Tandem").optional};return s.register("Panel",e),i(n,e,{dispose:function(){this.disposePanel(),n.prototype.dispose.call(this)},setStroke:function(t){this.background.stroke=t},getStroke:function(){return this.background.stroke},set stroke(t){this.setStroke(t)},get stroke(){return this.getStroke()},setFill:function(t){this.background.fill=t},getFill:function(){return this.background.fill},set fill(t){this.setFill(t)},get fill(){return this.getFill()}},{DEFAULT_OPTIONS:a}),e}),i("SCENERY/input/ButtonListenerIO",["require","TANDEM/types/ObjectIO","TANDEM/phetioInherit","SCENERY/scenery"],function(t){"use strict";function e(t,e){i.call(this,t,e)}var i=t("TANDEM/types/ObjectIO"),n=t("TANDEM/phetioInherit"),r=t("SCENERY/scenery");return n(i,"ButtonListenerIO",e,{},{documentation:"Button listener",events:["up","over","down","out","fire"],validator:{valueType:r.ButtonListener}}),r.register("ButtonListenerIO",e),e}),i("SCENERY/input/DownUpListener",["require","PHET_CORE/inherit","SCENERY/input/Mouse","TANDEM/PhetioObject","SCENERY/scenery","SCENERY/util/Trail","SCENERY/util/Trail"],function(t){"use strict";function e(t){var e=this;t=_.extend({mouseButton:0},t),r.call(this,t),this.options=t,this.isDown=!1,this.downCurrentTarget=null,this.downTrail=null,this.pointer=null,this.interrupted=!1,this.downListener={up:function(t){t.pointer instanceof n&&t.domEvent.button!==e.options.mouseButton||e.buttonUp(t)},cancel:function(t){e.buttonUp(t)}}}var i=t("PHET_CORE/inherit"),n=t("SCENERY/input/Mouse"),r=t("TANDEM/PhetioObject"),s=t("SCENERY/scenery"),a=t("SCENERY/util/Trail");return t("SCENERY/util/Trail"),s.register("DownUpListener",e),i(r,e,{buttonDown:function(t){this.isDown||t.pointer instanceof n&&t.domEvent.button!==this.options.mouseButton||(t.pointer.addInputListener(this.downListener),this.isDown=!0,this.downCurrentTarget=t.currentTarget,this.downTrail=t.trail.subtrailTo(t.currentTarget,!1),this.pointer=t.pointer,this.options.down&&this.options.down(t,this.downTrail))},buttonUp:function(t){this.isDown=!1,this.pointer.removeInputListener(this.downListener);var e=t.currentTarget;if(t.currentTarget=this.downCurrentTarget,this.options.upInside||this.options.upOutside){var i=t.trail.isExtensionOf(this.downTrail,!0)&&!this.interrupted;i&&this.options.upInside?this.options.upInside(t,this.downTrail):!i&&this.options.upOutside&&this.options.upOutside(t,this.downTrail)}this.options.up&&this.options.up(t,this.downTrail),t.currentTarget=e},down:function(t){this.buttonDown(t)},interrupt:function(){this.isDown&&(this.interrupted=!0,this.buttonUp({trail:new a,currentTarget:this.downCurrentTarget,pointer:this.pointer}),this.interrupted=!1)}}),e}),i("SCENERY/input/ButtonListener",["require","SCENERY/input/ButtonListenerIO","SCENERY/input/DownUpListener","PHET_CORE/inherit","TANDEM/PhetioObject","SCENERY/scenery","TANDEM/Tandem"],function(t){"use strict";function e(t){var e=this;t=_.extend({tandem:o.optional,phetioType:i,phetioState:!1,phetioEventType:s.EventType.USER},t),this.buttonState="up",this._overCount=0,this._buttonOptions=t,n.call(this,{tandem:t.tandem,phetioType:t.phetioType,phetioState:t.phetioState,mouseButton:t.mouseButton||0,down:function(t,i){e.setButtonState(t,"down")},up:function(t,i){e.setButtonState(t,e._overCount>0?"over":"up")}})}var i=t("SCENERY/input/ButtonListenerIO"),n=t("SCENERY/input/DownUpListener"),r=t("PHET_CORE/inherit"),s=t("TANDEM/PhetioObject"),a=t("SCENERY/scenery"),o=t("TANDEM/Tandem");return a.register("ButtonListener",e),r(n,e,{setButtonState:function(t,e){if(e!==this.buttonState){var i=this.buttonState;this.buttonState=e,this._buttonOptions[e]&&(this.phetioStartEvent(e),this._buttonOptions[e](t,i),this.phetioEndEvent()),this._buttonOptions.fire&&this._overCount>0&&(this._buttonOptions.fireOnDown?"down"===e:"down"===i)&&(this.phetioStartEvent("fire"),this._buttonOptions.fire(t),this.phetioEndEvent())}},enter:function(t){this._overCount++,1===this._overCount&&this.setButtonState(t,this.isDown?"down":"over")},exit:function(t){this._overCount--,0===this._overCount&&this.setButtonState(t,this.isDown?"out":"up")},focus:function(t){this.enter(t)},blur:function(t){this.exit(t)},click:function(t){this.setButtonState(t,"down"),this.setButtonState(t,"up")}}),e}),i("SCENERY/display/drawables/LineCanvasDrawable",["require","SCENERY/display/CanvasSelfDrawable","PHET_CORE/inherit","SCENERY/display/drawables/PaintableStatelessDrawable","PHET_CORE/Poolable","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.initializeCanvasSelfDrawable(t,e),this.initializePaintableStateless(t,e)}var i=t("SCENERY/display/CanvasSelfDrawable"),n=t("PHET_CORE/inherit"),r=t("SCENERY/display/drawables/PaintableStatelessDrawable"),s=t("PHET_CORE/Poolable");return t("SCENERY/scenery").register("LineCanvasDrawable",e),n(i,e,{paintCanvas:function(t,e,i){var n=t.context;n.beginPath(),n.moveTo(e._x1,e._y1),n.lineTo(e._x2,e._y2),e.hasPaintableStroke()&&(e.beforeCanvasStroke(t),n.stroke(),e.afterCanvasStroke(t))},markDirtyLine:function(){this.markPaintDirty()},markDirtyP1:function(){this.markPaintDirty()},markDirtyP2:function(){this.markPaintDirty()},markDirtyX1:function(){this.markPaintDirty()},markDirtyY1:function(){this.markPaintDirty()},markDirtyX2:function(){this.markPaintDirty()},markDirtyY2:function(){this.markPaintDirty()},dispose:function(){i.prototype.dispose.call(this),this.disposePaintableStateless()}}),r.mixInto(e),s.mixInto(e),e}),i("SCENERY/display/drawables/LineStatefulDrawable",["require","PHET_CORE/inheritance","SCENERY/display/drawables/PaintableStatefulDrawable","SCENERY/scenery","SCENERY/display/SelfDrawable"],function(t){"use strict";t("PHET_CORE/inheritance");var e=t("SCENERY/display/drawables/PaintableStatefulDrawable"),i=t("SCENERY/scenery"),n=(t("SCENERY/display/SelfDrawable"),{mixInto:function(t){var i=t.prototype;i.initializeState=function(t,e){return this.paintDirty=!0,this.dirtyX1=!0,this.dirtyY1=!0,this.dirtyX2=!0,this.dirtyY2=!0,this.initializePaintableState(t,e),this},i.disposeState=function(){this.disposePaintableState()},i.markPaintDirty=function(){this.paintDirty=!0,this.markDirty()},i.markDirtyLine=function(){this.dirtyX1=!0,this.dirtyY1=!0,this.dirtyX2=!0,this.dirtyY2=!0,this.markPaintDirty()},i.markDirtyP1=function(){this.dirtyX1=!0,this.dirtyY1=!0,this.markPaintDirty()},i.markDirtyP2=function(){this.dirtyX2=!0,this.dirtyY2=!0,this.markPaintDirty()},i.markDirtyX1=function(){this.dirtyX1=!0,this.markPaintDirty()},i.markDirtyY1=function(){this.dirtyY1=!0,this.markPaintDirty()},i.markDirtyX2=function(){this.dirtyX2=!0,this.markPaintDirty()},i.markDirtyY2=function(){this.dirtyY2=!0,this.markPaintDirty()},i.setToCleanState=function(){this.paintDirty=!1,this.dirtyX1=!1,this.dirtyY1=!1,this.dirtyX2=!1,this.dirtyY2=!1},e.mixInto(t)}});return i.register("LineStatefulDrawable",n),n}),i("SCENERY/display/drawables/LineSVGDrawable",["require","PHET_CORE/inherit","SCENERY/display/drawables/LineStatefulDrawable","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/SVGSelfDrawable"],function(t){"use strict";function e(t,e){this.initializeSVGSelfDrawable(t,e,!0,o),this.svgElement=this.svgElement||document.createElementNS(s.svgns,"line")}var i=t("PHET_CORE/inherit"),n=t("SCENERY/display/drawables/LineStatefulDrawable"),r=t("PHET_CORE/Poolable"),s=t("SCENERY/scenery"),a=t("SCENERY/display/SVGSelfDrawable"),o=!0;return s.register("LineSVGDrawable",e),i(a,e,{updateSVGSelf:function(){var t=this.svgElement;this.dirtyX1&&t.setAttribute("x1",this.node._x1),this.dirtyY1&&t.setAttribute("y1",this.node._y1),this.dirtyX2&&t.setAttribute("x2",this.node._x2),this.dirtyY2&&t.setAttribute("y2",this.node._y2),this.updateFillStrokeStyle(t)}}),n.mixInto(e),r.mixInto(e),e}),i("SCENERY/nodes/Line",["require","DOT/Bounds2","PHET_CORE/extendDefined","PHET_CORE/inherit","KITE/segments/Line","SCENERY/display/drawables/LineCanvasDrawable","SCENERY/display/drawables/LineSVGDrawable","SCENERY/nodes/Path","SCENERY/display/Renderer","SCENERY/scenery","KITE/Shape","DOT/Vector2"],function(t){"use strict";function e(t,e,i,r,s){this._x1=0,this._y1=0,this._x2=0,this._y2=0,s="object"===(void 0===t?"undefined":_typeof(t))?t instanceof d?n({x1:t.x,y1:t.y,x2:e.x,y2:e.y},i):t:n({x1:t,y1:e,x2:i,y2:r},s),l.call(this,null,s)}var i=t("DOT/Bounds2"),n=t("PHET_CORE/extendDefined"),r=t("PHET_CORE/inherit"),s=t("KITE/segments/Line"),a=t("SCENERY/display/drawables/LineCanvasDrawable"),o=t("SCENERY/display/drawables/LineSVGDrawable"),l=t("SCENERY/nodes/Path"),h=t("SCENERY/display/Renderer"),u=t("SCENERY/scenery"),c=t("KITE/Shape"),d=t("DOT/Vector2");return u.register("Line",e),r(l,e,{_mutatorKeys:["p1","p2","x1","y1","x2","y2"].concat(l.prototype._mutatorKeys),drawableMarkFlags:l.prototype.drawableMarkFlags.concat(["line","p1","p2","x1","x2","y1","y2"]).filter(function(t){return"shape"!==t}),setLine:function(t,e,i,n){this._x1=t,this._y1=e,this._x2=i,this._y2=n;for(var r=this._drawables.length,s=0;s').replace(/\u202b/g,'').replace(/\u202c/g,""),n=himalaya.parse(e);this._linkItems.length=0;var s=null===this._lineWrap?Number.POSITIVE_INFINITY:this._lineWrap,a=i.createFromPool(!0);for(this._hasAddedLeafToLine=!1;n.length;){var o=n[0],l=a.bounds.isValid()?a.width:0,h=this.appendElement(a,o,this._font,this._fill,!0,s-l);h!==S.NONE&&(a.bounds.isValid()?this.appendLine(a):this.appendLine(new y(T.setText("X").setFont(this._font).height)),a=i.createFromPool(!0),this._hasAddedLeafToLine=!1),h!==S.INCOMPLETE&&n.splice(0,1)}for(a.bounds.isValid()&&this.appendLine(a),0===this.lineContainer.getChildrenCount()&&this.appendEmptyLeaf(),this.alignLines();this._linkItems.length;)!function(){var e,i=t._linkItems[0].element,n=t._linkItems[0].href,s=[];for(e=t._linkItems.length-1;e>=0;e--){var a=t._linkItems[e];a.element===i&&(s.push(a.node),t._linkItems.splice(e,1))}var o=r.createFromPool(i.innerContent,n);for(t.lineContainer.addChild(o),e=0;e1){var m=[],g=!1;for(m.unshift(f.pop());f.length;){if((c=n.createFromPool(f.join(" "),l,s,this._boundsMethod,o,this._stroke)).fitsIn(h-p,this._hasAddedLeafToLine,l)||!(this._hasAddedLeafToLine||f.length>1)){g=!0;break}m.unshift(f.pop())}if(!g)return S.INCOMPLETE;d=S.INCOMPLETE,r.content=m.join(" ")}}this._hasAddedLeafToLine=!0}else if("Element"===r.type){if("br"===r.tagName)return S.COMPLETE;if("span"===r.tagName&&r.attributes.dir&&(l="ltr"===r.attributes.dir),c=i.createFromPool(l),r.attributes.style){var E=r.attributes.style;E.color&&(o=new a(E.color));for(var y={},v=0;v"+t+""},himalayaElementToString:function(t,i){return"Text"===t.type?e.contentToString(t.content,i):"Element"===t.type?("span"===t.tagName&&t.attributes.dir&&(i="ltr"===t.attributes.dir),t.children.map(function(t){return e.himalayaElementToString(t,i)}).join("")):""},himalayaElementToAccessibleString:function(t,i){if("Text"===t.type)return e.contentToString(t.content,i);if("Element"===t.type){"span"===t.tagName&&t.attributes.dir&&(i="ltr"===t.attributes.dir);var n=t.children.map(function(t){return e.himalayaElementToAccessibleString(t,i)}).join("");return _.includes(b,t.tagName)?"<"+t.tagName+">"+n+"":n}return""},contentToString:function(t,e){var i=he.decode(t);return e?"‪"+i+"‬":"‫"+i+"‬"}}),h(d,i,{initialize:function(t){return this.isLTR=t,this.leftSpacing=0,this.rightSpacing=0,this},clean:function(){for(;this._children.length;){var t=this._children[this._children.length-1];this.removeChild(t),t.clean()}this.matrix=c.IDENTITY,this.freeToPool()},addElement:function(t){var e=this.children.length>0,i=t.width>0,n=t.getScaleVector().x,r=t.leftSpacing*n,s=t.rightSpacing*n;if(e||i)return e?i?(this.isLTR?(t.left=this.localBounds.right+this.rightSpacing+r,this.rightSpacing=s):(t.right=this.localBounds.left-this.leftSpacing-s,this.leftSpacing=r),this.addChild(t),!0):(this.isLTR?this.rightSpacing+=r+s:this.leftSpacing+=r+s,!1):(this.isLTR?(t.left=0,this.rightSpacing=s):(t.right=0,this.leftSpacing=r),this.addChild(t),!0)},addExtraBeforeSpacing:function(t){this.isLTR?this.leftSpacing+=t:this.rightSpacing+=t}}),p.mixInto(i,{initialize:i.prototype.initialize}),h(E,n,{initialize:function(t,i,n,r,s,a){for(var o="";" "===t[0];)o+=" ",t=t.slice(1);for(var l="";" "===t[t.length-1];)l=" ",t=t.slice(0,t.length-1);this.text=e.contentToString(t,i),this.boundsMethod=r,this.font=n,this.fill=s,this.stroke=a;var h=o.length?T.setText(o).setFont(n).width:0,u=l.length?T.setText(l).setFont(n).width:0;return this.leftSpacing=i?h:u,this.rightSpacing=i?u:h,this},clean:function(){this.fill=null,this.stroke=null,this.matrix=c.IDENTITY,this.freeToPool()},fitsIn:function(t,e,i){return this.width+(e?i?this.leftSpacing:this.rightSpacing:0)<=t}}),p.mixInto(n,{initialize:n.prototype.initialize}),h(d,r,{initialize:function(t,e){return this.innerContent=t,"function"==typeof e?(this.buttonListener=new s({fire:e}),this.addInputListener(this.buttonListener),this.setAccessibleAttribute("href","#"),this.setAccessibleAttribute("target","_self"),this.accessibleInputListener={click:function(t){t.domEvent.preventDefault(),e()}},this.addInputListener(this.accessibleInputListener)):(this.buttonListener=new s({fire:function(t){self._linkEventsHandled&&t.handle();var i=window.open(e,"_blank");i&&i.focus()}}),this.addInputListener(this.buttonListener),this.setAccessibleAttribute("href",e),this.setAccessibleAttribute("target","_blank")),this},clean:function(){for(;this._children.length;){var t=this._children[this._children.length-1];this.removeChild(t),t.clean()}this.removeInputListener(this.buttonListener),this.buttonListener=null,this.accessibleInputListener&&(this.removeInputListener(this.accessibleInputListener),this.accessibleInputListener=null),this.matrix=c.IDENTITY,this.freeToPool()}}),p.mixInto(r,{initialize:r.prototype.initialize}),e}),i("SUN/buttons/TextPushButton",["require","PHET_CORE/inherit","SUN/buttons/RectangularPushButton","SUN/sun","TANDEM/Tandem","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e){e=_.extend({textFill:"black",maxTextWidth:null,tandem:s.required,innerContent:t},e);var i=new a(t,{font:e.font,fill:e.textFill,maxWidth:e.maxTextWidth,tandem:e.tandem.createTandem("textNode")});n.call(this,_.extend({content:i},e)),this.disposeTextPushButton=function(){i.dispose()}}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RectangularPushButton"),r=t("SUN/sun"),s=t("TANDEM/Tandem"),a=t("SCENERY/nodes/Text");return r.register("TextPushButton",e),i(n,e,{dispose:function(){this.disposeTextPushButton(),n.prototype.dispose.call(this)}})}),i("SCENERY/nodes/VBox",["require","PHET_CORE/inherit","SCENERY/nodes/LayoutBox","SCENERY/scenery"],function(t){"use strict";function e(t){(t=t||{}).orientation="vertical",n.call(this,t)}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/LayoutBox");return t("SCENERY/scenery").register("VBox",e),i(n,e)}),i("string!VEGAS/continue",function(){return window.phet.chipper.strings.get("VEGAS/continue")}),i("string!VEGAS/excellent",function(){return window.phet.chipper.strings.get("VEGAS/excellent")}),i("string!VEGAS/good",function(){return window.phet.chipper.strings.get("VEGAS/good")}),i("string!VEGAS/great",function(){return window.phet.chipper.strings.get("VEGAS/great")}),i("string!VEGAS/keepTrying",function(){return window.phet.chipper.strings.get("VEGAS/keepTrying")}),i("string!VEGAS/label.level",function(){return window.phet.chipper.strings.get("VEGAS/label.level")}),i("string!VEGAS/label.score.max",function(){return window.phet.chipper.strings.get("VEGAS/label.score.max")}),i("string!VEGAS/label.time",function(){return window.phet.chipper.strings.get("VEGAS/label.time")}),i("string!VEGAS/pattern.0yourBest",function(){return window.phet.chipper.strings.get("VEGAS/pattern.0yourBest")}),i("string!VEGAS/yourNewBest",function(){return window.phet.chipper.strings.get("VEGAS/yourNewBest")}),i("VEGAS/LevelCompletedNode",["require","SCENERY/util/Color","VEGAS/GameTimer","PHET_CORE/inherit","SUN/Panel","SCENERY_PHET/PhetFont","AXON/Property","SCENERY/nodes/RichText","VEGAS/ScoreDisplayStars","PHETCOMMON/util/StringUtils","TANDEM/Tandem","SCENERY/nodes/Text","SUN/buttons/TextPushButton","SCENERY/nodes/VBox","VEGAS/vegas","string!VEGAS/continue","string!VEGAS/excellent","string!VEGAS/good","string!VEGAS/great","string!VEGAS/keepTrying","string!VEGAS/label.level","string!VEGAS/label.score.max","string!VEGAS/label.time","string!VEGAS/pattern.0yourBest","string!VEGAS/yourNewBest"],function(t){"use strict";function e(t,e,r,m,w,P,R,O,I,x){x=_.extend({levelVisible:!0,fill:new i(180,205,255),stroke:"black",lineWidth:2,cornerRadius:35,xMargin:20,yMargin:20,ySpacing:30,titleFont:new a({size:28,weight:"bold"}),infoFont:new a({size:22,weight:"bold"}),buttonFont:new a(26),buttonFill:new i(255,255,0),starDiameter:62,contentMaxWidth:null,tandem:c.required},x);var D=[],k=e/r,M=b;k>.95?M=E:k>.75?M=v:k>=.5&&(M=y);var q=new d(M,{font:x.titleFont,maxWidth:x.contentMaxWidth});D.push(q),this.scoreDisplayStars=new h(new o(e),{numberOfStars:m,perfectScore:r,starNodeOptions:{innerRadius:x.starDiameter/4,outerRadius:x.starDiameter/2},maxWidth:x.contentMaxWidth}),D.push(this.scoreDisplayStars),x.levelVisible&&D.push(new d(u.format(S,t),{font:x.infoFont,maxWidth:x.contentMaxWidth})),D.push(new d(u.format(T,e,r),{font:x.infoFont,maxWidth:x.contentMaxWidth})),w&&(this.timeRichText=new l(u.format(C,n.formatTime(P)),{font:x.infoFont,align:"center",maxWidth:x.contentMaxWidth}),O?this.timeRichText.text=this.timeRichText.text+"
"+N:null!==R&&(this.timeRichText.text=this.timeRichText.text+"
"+u.format(A,n.formatTime(R))),D.push(this.timeRichText)),this.continueButton=new p(g,{listener:I,font:x.buttonFont,baseColor:x.buttonFill,tandem:x.tandem.createTandem("continueButton"),maxWidth:x.contentMaxWidth}),D.push(this.continueButton),s.call(this,new f({children:D,spacing:x.ySpacing}),x)}var i=t("SCENERY/util/Color"),n=t("VEGAS/GameTimer"),r=t("PHET_CORE/inherit"),s=t("SUN/Panel"),a=t("SCENERY_PHET/PhetFont"),o=t("AXON/Property"),l=t("SCENERY/nodes/RichText"),h=t("VEGAS/ScoreDisplayStars"),u=t("PHETCOMMON/util/StringUtils"),c=t("TANDEM/Tandem"),d=t("SCENERY/nodes/Text"),p=t("SUN/buttons/TextPushButton"),f=t("SCENERY/nodes/VBox"),m=t("VEGAS/vegas"),g=t("string!VEGAS/continue"),E=t("string!VEGAS/excellent"),y=t("string!VEGAS/good"),v=t("string!VEGAS/great"),b=t("string!VEGAS/keepTrying"),S=t("string!VEGAS/label.level"),T=t("string!VEGAS/label.score.max"),C=t("string!VEGAS/label.time"),A=t("string!VEGAS/pattern.0yourBest"),N=t("string!VEGAS/yourNewBest");return m.register("LevelCompletedNode",e),r(s,e,{dispose:function(){this.timeRichText&&this.timeRichText.dispose(),this.continueButton.dispose(),this.scoreDisplayStars.dispose(),s.prototype.dispose.call(this)}})}),i("TWIXT/AnimationTarget",["require","TWIXT/Easing","PHET_CORE/inherit","AXON/Property","TWIXT/twixt"],function(t){"use strict";function e(t){(t=_.extend({setValue:null,getValue:null,property:null,object:null,attribute:null,to:null,delta:null,speed:null,from:null,easing:i.CUBIC_IN_OUT,blend:e.DEFAULT_BLEND,distance:e.DEFAULT_DISTANCE,add:e.DEFAULT_ADD},t)).object&&(t.setValue=e.OBJECT_SET(t.object,t.attribute),t.getValue=e.OBJECT_GET(t.object,t.attribute)),t.property&&(t.setValue=e.PROPERTY_SET(t.property),t.getValue=e.PROPERTY_GET(t.property)),this.getValue=t.getValue,this.setValue=t.setValue,this.easing=t.easing,this.from=t.from,this.to=t.to,this.delta=t.delta,this.speed=t.speed,this.blend=t.blend,this.distance=t.distance,this.add=t.add,this.startingValue=null,this.endingValue=null}var i=t("TWIXT/Easing"),n=t("PHET_CORE/inherit");t("AXON/Property");return t("TWIXT/twixt").register("AnimationTarget",e),n(Object,e,{computeStartEnd:function(){this.startingValue=null!==this.from?this.from:this.getValue(),this.endingValue=null!==this.to?this.to:this.add(this.startingValue,this.delta)},update:function(t){this.setValue(this.blend(this.startingValue,this.endingValue,this.easing.value(t)))},hasPreferredDuration:function(){return null!==this.speed},getPreferredDuration:function(){return null===this.speed?null:this.speed*this.distance(this.startingValue,this.delta)}},{DEFAULT_BLEND:function(t,e,i){if(0===i)return t;if(1===i)return e;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*i;if("object"===(void 0===t?"undefined":_typeof(t))&&"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof t.blend)return t.blend(e,i);throw new Error("Blending not supported for: "+t+", "+e+", pass in a blend option")},DEFAULT_DISTANCE:function(t,e){if("number"==typeof t&&"number"==typeof e)return Math.abs(t-e);if("object"===(void 0===t?"undefined":_typeof(t))&&"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof t.distance)return t.distance(e);throw new Error("Distance (required for speed) by default not supported for: "+t+", "+e+", pass in a distance option")},DEFAULT_ADD:function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"===(void 0===t?"undefined":_typeof(t))&&"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof t.plus)return t.plus(e);throw new Error("Addition (required for delta) by default not supported for: "+t+", "+e+", pass in an add option")},OBJECT_SET:function(t,e){return function(i){t[e]=i}},OBJECT_GET:function(t,e){return function(){return t[e]}},PROPERTY_SET:function(t){return function(e){t.value=e}},PROPERTY_GET:function(t){return function(){return t.value}}}),e}),i("TWIXT/Animation",["require","TWIXT/AnimationTarget","AXON/BooleanProperty","AXON/Emitter","PHET_CORE/inherit","AXON/timer","TWIXT/twixt","DOT/Util"],function(t){"use strict";function e(t){if(t=_.extend({targets:null,duration:null,delay:0,stepEmitter:a},t),this.targets=_.map(null===t.targets?[t]:t.targets,function(t){return new i(t)}),this.duration=t.duration,this.delay=t.delay,this.length=0,this.remainingDelay=0,this.remainingAnimation=0,this.runningProperty=new n(!1),this.animatingProperty=new n(!1),this.startEmitter=new r,this.beginEmitter=new r,this.finishEmitter=new r({validators:[{valueType:"number"}]}),this.stopEmitter=new r,this.endedEmitter=new r,this.updateEmitter=new r,t.stepEmitter){var e=this.step.bind(this);this.runningProperty.link(function(i){i&&!t.stepEmitter.hasListener(e)?t.stepEmitter.addListener(e):!i&&t.stepEmitter.hasListener(e)&&t.stepEmitter.removeListener(e)})}}var i=t("TWIXT/AnimationTarget"),n=t("AXON/BooleanProperty"),r=t("AXON/Emitter"),s=t("PHET_CORE/inherit"),a=t("AXON/timer"),o=t("TWIXT/twixt"),l=t("DOT/Util");return o.register("Animation",e),s(Object,e,{start:function(t){return this.runningProperty.value?this:(this.remainingDelay=this.delay,this.runningProperty.value=!0,this.startEmitter.emit(),this.step(void 0!==t?t:0),this)},stop:function(){return this.runningProperty.value?(this.runningProperty.value=!1,this.stopEmitter.emit(),this.endedEmitter.emit(),this):this},step:function(t){if(!this.runningProperty.value)return this;if(!this.animatingProperty.value){if(this.remainingDelay-=t,t=-this.remainingDelay,this.remainingDelay>0)return this;this.length=this.duration;for(var e=0;en,this.visible=!0}},{key:"step",value:function(t){this.animation&&this.animation.step(t)}},{key:"reset",value:function(){this.rectLeft.y=0,this.rectRight.y=0,this.rectLeft.rectHeight=0,this.rectRight.rectHeight=0,this.less.visible=!1,this.eq.visible=!1,this.more.visible=!1,this.visible=!1}}]),n}();return n.register("MatchChartNode",y)}),i("SCENERY/listeners/DragListener",["require","AXON/Action","AXON/ActionIO","DOT/Bounds2","SCENERY/input/EventIO","PHET_CORE/inherit","TANDEM/PhetioObject","SCENERY/listeners/PressListener","AXON/Property","SCENERY/scenery","TANDEM/Tandem","SCENERY/input/Touch","DOT/Transform3","SCENERY/util/TransformTracker","DOT/Vector2"],function(t){"use strict";function e(t){var e=this;t=_.extend({allowTouchSnag:!0,applyOffset:!0,trackAncestors:!1,translateNode:!1,transform:null,locationProperty:null,dragBoundsProperty:null,mapLocation:null,offsetLocation:null,start:null,end:null,tandem:u.required,phetioReadOnly:a.DEFAULT_OPTIONS.phetioReadOnly,phetioFeatured:a.DEFAULT_OPTIONS.phetioFeatured},t),o.call(this,t),this._allowTouchSnag=t.allowTouchSnag,this._applyOffset=t.applyOffset,this._trackAncestors=t.trackAncestors,this._translateNode=t.translateNode,this._transform=t.transform,this._locationProperty=t.locationProperty,this._mapLocation=t.mapLocation,this._offsetLocation=t.offsetLocation,this._dragBoundsProperty=t.dragBoundsProperty||new l(null),this._start=t.start,this._end=t.end,this.isUserControlledProperty=this.isPressedProperty,this._globalPoint=new p(0,0),this._localPoint=new p(0,0),this._parentPoint=new p(0,0),this._modelPoint=new p(0,0),this._transformTracker=null,this._transformTrackerListener=this.ancestorTransformed.bind(this),this._lastInterruptedTouchPointer=null,this._dragAction=new i(function(t){e._globalPoint.equals(e.pointer.point)||e.reposition(e.pointer.point),o.prototype.drag.call(e,t)},{phetioFeatured:t.phetioFeatured,tandem:t.tandem.createTandem("dragAction"),phetioHighFrequency:!0,phetioDocumentation:"Emits whenever a drag occurs with an EventIO argument.",phetioReadOnly:t.phetioReadOnly,phetioEventType:a.EventType.USER,phetioType:m})}var i=t("AXON/Action"),n=t("AXON/ActionIO"),r=(t("DOT/Bounds2"),t("SCENERY/input/EventIO")),s=t("PHET_CORE/inherit"),a=t("TANDEM/PhetioObject"),o=t("SCENERY/listeners/PressListener"),l=t("AXON/Property"),h=t("SCENERY/scenery"),u=t("TANDEM/Tandem"),c=t("SCENERY/input/Touch"),d=(t("DOT/Transform3"),t("SCENERY/util/TransformTracker")),p=t("DOT/Vector2"),f=new p(0,0),m=n([{name:"event",type:r}]);return h.register("DragListener",e),s(o,e,{press:function(t,e,i){var n=this;return o.prototype.press.call(this,t,e,function(){n.attachTransformTracker(),n.parentToLocalPoint(n.globalToParentPoint(n._localPoint.set(n.pointer.point))),n.reposition(n.pointer.point),n._start&&n._start(t,n),i&&i()})},canClick:function(){return!1},release:function(t,e){var i=this;o.prototype.release.call(this,t,function(){i.detachTransformTracker(),i._end&&i._end(i),e&&e()})},drag:function(t){this._globalPoint.equals(this.pointer.point)||this._dragAction.execute(t)},tryTouchSnag:function(t){this._allowTouchSnag&&!t.pointer.isAttached()&&this.press(t)},getGlobalPoint:function(){return this._globalPoint.copy()},get globalPoint(){return this.getGlobalPoint()},getLocalPoint:function(){return this._localPoint.copy()},get localPoint(){return this.getLocalPoint()},getParentPoint:function(){return this._parentPoint.copy()},get parentPoint(){return this.getParentPoint()},getModelPoint:function(){return this._modelPoint.copy()},get modelPoint(){return this.getModelPoint()},globalToParentPoint:function(t){return this.pressedTrail.getParentTransform().getInverse().multiplyVector2(t),t},parentToLocalPoint:function(t){return this.pressedTrail.lastNode().getTransform().getInverse().multiplyVector2(t),t},localToParentPoint:function(t){return this.pressedTrail.lastNode().getMatrix().multiplyVector2(t),t},parentToModelPoint:function(t){return this._transform&&this._transform.getInverse().multiplyVector2(t),t},modelToParentPoint:function(t){return this._transform&&this._transform.getMatrix().multiplyVector2(t),t},mapModelPoint:function(t){return this._mapLocation?this._mapLocation(t):this._dragBoundsProperty.value?this._dragBoundsProperty.value.closestPointTo(t):t},applyParentOffset:function(t){this._offsetLocation&&t.add(this._offsetLocation(t,this)),this._applyOffset&&(t.subtract(this.localToParentPoint(f.set(this._localPoint))),t.add(this.localToParentPoint(f.setXY(0,0))))},reposition:function(t){this._globalPoint.set(t),this.applyParentOffset(this.globalToParentPoint(this._parentPoint.set(t))),this._modelPoint=this.mapModelPoint(this.parentToModelPoint(f.set(this._parentPoint))),this.modelToParentPoint(this._parentPoint.set(this._modelPoint)),this._translateNode&&(this.pressedTrail.lastNode().translation=this._parentPoint),this._locationProperty&&(this._locationProperty.value=this._modelPoint.copy())},touchenter:function(t){this.tryTouchSnag(t)},touchmove:function(t){this.tryTouchSnag(t)},ancestorTransformed:function(){this.reposition(this.pointer.point)},attachTransformTracker:function(){this._trackAncestors&&(this._transformTracker=new d(this.pressedTrail.copy().removeDescendant()),this._transformTracker.addListener(this._transformTrackerListener))},detachTransformTracker:function(){this._transformTracker&&(this._transformTracker.removeListener(this._transformTrackerListener),this._transformTracker.dispose(),this._transformTracker=null)},setDragBounds:function(t){this._dragBoundsProperty.value=t},set dragBounds(t){this.setDragBounds(t)},getDragBounds:function(){return this._dragBoundsProperty.value},get dragBounds(){return this.getDragBounds()},interrupt:function(){this.pointer&&this.pointer instanceof c&&(this._lastInterruptedTouchPointer=this.pointer),o.prototype.interrupt.call(this)},canPress:function(t){return t.pointer!==this._lastInterruptedTouchPointer&&o.prototype.canPress.call(this,t)},dispose:function(){this._dragAction.dispose(),this.detachTransformTracker(),o.prototype.dispose.call(this)}},{createForwardingListener:function(t,e){return e=_.extend({allowTouchSnag:!1},e),{down:function(e){e.canStartPress()&&t(e)},touchenter:function(t){e.allowTouchSnag&&this.down(t)},touchmove:function(t){e.allowTouchSnag&&this.down(t)}}}}),e}),i("FRACTIONS_COMMON/common/view/MixedFractionNode",["require","SCENERY/nodes/AlignBox","DOT/Bounds2","FRACTIONS_COMMON/fractionsCommon","SCENERY/nodes/HBox","SCENERY/nodes/Line","SCENERY_PHET/PhetFont","SCENERY/nodes/Text","SCENERY/nodes/VBox"],function(t){"use strict";var e=t("SCENERY/nodes/AlignBox"),i=t("DOT/Bounds2"),n=t("FRACTIONS_COMMON/fractionsCommon"),r=t("SCENERY/nodes/HBox"),s=t("SCENERY/nodes/Line"),a=t("SCENERY_PHET/PhetFont"),o=t("SCENERY/nodes/Text"),l=t("SCENERY/nodes/VBox"),h=function(t){function n(t){_classCallCheck(this,n);var r=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,{spacing:5}));t=_.extend({whole:null,numerator:null,denominator:null,maxWhole:null,maxNumerator:null,maxDenominator:null,wholeFill:"black",numeratorFill:"black",denominatorFill:"black",separatorFill:"black",vinculumExtension:0,vinculumLineCap:"butt"},t),r.wholeText=new o("1",{font:new a(50),fill:t.wholeFill}),r.numeratorText=new o("1",{font:new a(30),fill:t.numeratorFill}),r.denominatorText=new o("1",{font:new a(30),fill:t.denominatorFill});var h=function(t,e){return _.reduce(_.range(0,e+1),function(e,i){return t.text=i,e.union(t.bounds)},i.NOTHING)};return r.wholeContainer=t.maxWhole?new e(r.wholeText,{alignBounds:h(r.wholeText,t.maxWhole)}):r.wholeText,r.numeratorContainer=t.maxNumerator?new e(r.numeratorText,{alignBounds:h(r.numeratorText,t.maxNumerator)}):r.numeratorText,r.denominatorContainer=t.maxDenominator?new e(r.denominatorText,{alignBounds:h(r.denominatorText,t.maxDenominator)}):r.denominatorText,r.vinculumNode=new s(0,0,10,0,{stroke:t.separatorFill,lineWidth:2,lineCap:t.vinculumLineCap}),r.vbox=new l({children:[r.numeratorContainer,r.vinculumNode,r.denominatorContainer],spacing:1}),r._whole=t.whole,r._numerator=t.numerator,r._denominator=t.denominator,r._vinculumExtension=t.vinculumExtension,r.update(),r.mutate(t),r}return _inherits(n,r),_createClass(n,[{key:"update",value:function(){var t=null!==this._whole,e=null!==this._numerator,i=null!==this._denominator;this.children=[].concat(_toConsumableArray(t?[this.wholeContainer]:[]),_toConsumableArray(e||i?[this.vbox]:[])),this.wholeText.text=t?this._whole:" ",this.numeratorText.text=e?this._numerator:" ",this.denominatorText.text=i?this._denominator:" ",this.vinculumNode.x1=-this._vinculumExtension,this.vinculumNode.x2=Math.max(this.numeratorContainer.width,this.denominatorContainer.width)+2+this._vinculumExtension}},{key:"whole",set:function(t){this._whole!==t&&(this._whole=t,this.update())},get:function(){return this._whole}},{key:"numerator",set:function(t){this._numerator!==t&&(this._numerator=t,this.update())},get:function(){return this._numerator}},{key:"denominator",set:function(t){this._denominator!==t&&(this._denominator=t,this.update())},get:function(){return this._denominator}}]),n}();return n.register("MixedFractionNode",h)}),i("FRACTIONS_COMMON/matching/view/MatchPieceNode",["require","DOT/Bounds2","DOT/Dimension2","SCENERY/listeners/DragListener","FRACTIONS_COMMON/game/view/FilledPartitionNode","PHETCOMMON/model/Fraction","FRACTIONS_COMMON/fractionsCommon","FRACTIONS_COMMON/common/FractionsCommonConstants","SCENERY/nodes/HBox","FRACTIONS_COMMON/common/view/MixedFractionNode","SCENERY/nodes/Node","DOT/Vector2"],function(t){"use strict";var e=t("DOT/Bounds2"),i=t("DOT/Dimension2"),n=t("SCENERY/listeners/DragListener"),r=t("FRACTIONS_COMMON/game/view/FilledPartitionNode"),s=t("PHETCOMMON/model/Fraction"),a=t("FRACTIONS_COMMON/fractionsCommon"),o=t("FRACTIONS_COMMON/common/FractionsCommonConstants"),l=t("SCENERY/nodes/HBox"),h=t("FRACTIONS_COMMON/common/view/MixedFractionNode"),u=t("SCENERY/nodes/Node"),c=t("DOT/Vector2"),d=function(t){function i(t){_classCallCheck(this,i);var a=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,{cursor:"pointer"}));if(a.piece=t,t.filledPartitions)a.addChild(new l({spacing:7,children:t.filledPartitions.map(function(t){return new r(t,{borderLineWidth:o.MATCHING_BORDER})}),center:c.ZERO,scale:t.hasGreaterThanOne?.68:1}));else{var u=t.fraction.isInteger(),d=t.hasMixedNumbers&&s.ONE.isLessThan(t.fraction)?{whole:Math.floor(t.fraction.value),numerator:u?null:t.fraction.numerator%t.fraction.denominator,denominator:u?null:t.fraction.denominator}:{numerator:t.fraction.numerator,denominator:t.fraction.denominator};a.addChild(new h(_.extend(d,{center:c.ZERO,scale:1.3})))}return a.positionListener=function(t){a.translation=t},a.scaleListener=function(t){a.setScaleMagnitude(t)},a.piece.positionProperty.link(a.positionListener),a.piece.scaleProperty.link(a.scaleListener),a.spotListener=function(t){t&&t.isTarget&&(a.pickable=!1)},a.piece.spotProperty.link(a.spotListener),a.mouseArea=a.touchArea=new e(-i.DIMENSION.width/2,-i.DIMENSION.height/2,i.DIMENSION.width/2,i.DIMENSION.height/2),a.dragListener=new n({targetNode:a,locationProperty:t.positionProperty,start:function(){a.moveToFront(),t.grab()},end:function(){return t.drop()}}),a.addInputListener(a.dragListener),a.piece.localBounds=a.localBounds,a}return _inherits(i,u),_createClass(i,[{key:"dispose",value:function(){this.piece.positionProperty.unlink(this.positionListener),this.piece.scaleProperty.unlink(this.scaleListener),this.piece.spotProperty.unlink(this.spotListener),this.dragListener.dispose(),_get(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"dispose",this).call(this)}}]),i}();return d.DIMENSION=new i(150,120),a.register("MatchPieceNode",d)}),i("string!SCENERY_PHET/symbol.ohms",function(){return window.phet.chipper.strings.get("SCENERY_PHET/symbol.ohms")}),i("string!SCENERY_PHET/symbol.resistivity",function(){return window.phet.chipper.strings.get("SCENERY_PHET/symbol.resistivity")}),i("SCENERY_PHET/MathSymbols",["require","SCENERY_PHET/sceneryPhet","string!SCENERY_PHET/symbol.ohms","string!SCENERY_PHET/symbol.resistivity"],function(t){"use strict";var e=t("SCENERY_PHET/sceneryPhet"),i={PLUS:"+",MINUS:"−",TIMES:"×",DIVIDE:"÷",DOT:"⋅",UNARY_PLUS:"+",UNARY_MINUS:"-",EQUAL_TO:"=",NOT_EQUAL_TO:"≠",GREATER_THAN:">",LESS_THAN:"<",LESS_THAN_OR_EQUAL:"≤",GREATER_THAN_OR_EQUAL:"≥",PERCENT:"%",INFINITY:"∞",PI:"π",PLUS_MINUS:"±",THETA:"θ",NO_VALUE:"—",OHMS:t("string!SCENERY_PHET/symbol.ohms"),RESISTIVITY:t("string!SCENERY_PHET/symbol.resistivity")};return e.register("MathSymbols",i)}),i("SCENERY/display/drawables/CanvasNodeDrawable",["require","SCENERY/display/CanvasSelfDrawable","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery"],function(t){"use strict";function e(t,e){this.initializeCanvasSelfDrawable(t,e)}var i=t("SCENERY/display/CanvasSelfDrawable"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/Poolable"),s=[];return t("SCENERY/scenery").register("CanvasNodeDrawable",e),n(i,e,{paintCanvas:function(t,e,i){if(!e.selfBounds.isEmpty()){var n=t.context;n.save(),n.fillStyle="black",n.strokeStyle="black",n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.lineDash=s,n.lineDashOffset=0,n.miterLimit=10,e.paintCanvas(n),n.restore()}}}),r.mixInto(e),e}),i("SCENERY/nodes/CanvasNode",["require","KITE/Shape","PHET_CORE/inherit","SCENERY/scenery","SCENERY/display/drawables/CanvasNodeDrawable","SCENERY/nodes/Node","SCENERY/display/Renderer"],function(t){"use strict";function e(t){a.call(this,t),this.setRendererBitmask(o.bitmaskCanvas)}var i=t("KITE/Shape"),n=t("PHET_CORE/inherit"),r=t("SCENERY/scenery"),s=t("SCENERY/display/drawables/CanvasNodeDrawable"),a=t("SCENERY/nodes/Node"),o=t("SCENERY/display/Renderer");return r.register("CanvasNode",e),n(a,e,{_mutatorKeys:["canvasBounds"].concat(a.prototype._mutatorKeys),setCanvasBounds:function(t){this.invalidateSelf(t)},set canvasBounds(t){this.setCanvasBounds(t)},getCanvasBounds:function(){return this.getSelfBounds()},get canvasBounds(){return this.getCanvasBounds()},isPainted:function(){return!0},paintCanvas:function(t){throw new Error("CanvasNode needs paintCanvas implemented")},invalidatePaint:function(){for(var t=this._drawables.length,e=0;e';return e.register("SceneryPhetA11yStrings",i),i}),i("SCENERY_PHET/accessibility/nodes/ScreenSummaryNode",["require","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/sceneryPhet","SCENERY_PHET/SceneryPhetA11yStrings","PHETCOMMON/util/StringUtils"],function(t){"use strict";function e(){n.call(this),this.openingSummaryNode=new n({tagName:"p"});var t=new n({tagName:"p",innerContent:l});this.addChild(this.openingSummaryNode),this.addChild(t),this.accessibleOrder=[this.openingSummaryNode,null,t]}var i=t("PHET_CORE/inherit"),n=t("SCENERY/nodes/Node"),r=t("SCENERY_PHET/sceneryPhet"),s=t("SCENERY_PHET/SceneryPhetA11yStrings"),a=t("PHETCOMMON/util/StringUtils"),o=s.screenSummaryMultiScreenIntro.value,l=s.screenSummaryKeyboardShortcutsHint.value,h=s.screenSummarySingleScreenIntroPattern.value;return r.register("ScreenSummaryNode",e),i(n,e,{setIntroString:function(t,e){this.openingSummaryNode.innerContent=e>1?o:a.fillIn(h,{sim:t})}})}),i("JOIST/ScreenView",["require","DOT/Bounds2","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","AXON/Property","SCENERY_PHET/accessibility/nodes/ScreenSummaryNode","TANDEM/Tandem"],function(t){"use strict";function e(t){t=_.extend({layoutBounds:h.copy(),addScreenSummaryNode:!1},t),this.layoutBounds=t.layoutBounds,s.call(this,_.extend({layerSplit:!0,excludeInvisible:!0,tandem:l.optional,containerTagName:"article",tagName:"div",labelTagName:"h1"},t)),this.visibleBoundsProperty=new a(t.layoutBounds),this.screenSummaryNode=null,t.addScreenSummaryNode&&(this.screenSummaryNode=new o,this.addChild(this.screenSummaryNode))}var i=t("DOT/Bounds2"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/nodes/Node"),a=t("AXON/Property"),o=t("SCENERY_PHET/accessibility/nodes/ScreenSummaryNode"),l=t("TANDEM/Tandem"),h=new i(0,0,1024,618);return r.register("ScreenView",e),n(s,e,{getLayoutScale:function(t,e){return Math.min(t/this.layoutBounds.width,e/this.layoutBounds.height)},layout:function(t,e){this.resetTransform();var n=this.getLayoutScale(t,e);this.setScaleMagnitude(n);var r=0,s=0;n===t/this.layoutBounds.width?s=(e/n-this.layoutBounds.height)/2:n===e/this.layoutBounds.height&&(r=(t/n-this.layoutBounds.width)/2),this.translate(r,s),this.visibleBoundsProperty.set(new i(-r,-s,t/n-r,e/n-s))},dispose:function(){s.prototype.dispose.call(this),this.disposeScreenView()}},{DEFAULT_LAYOUT_BOUNDS:h})}),i("VEGAS/RewardNode",["require","DOT/Bounds2","SCENERY/nodes/CanvasNode","SCENERY_PHET/FaceNode","PHET_CORE/inherit","SCENERY/nodes/Node","JOIST/ScreenView","SCENERY_PHET/StarNode","VEGAS/vegas","ifphetio!PHET_IO/phetioEngine"],function(t){"use strict";function e(t){var s=this;this.canvasDisplayBounds=new i(0,0,0,0),this.options=t=_.extend({scaleForResolution:2,nodes:e.createRandomNodes([new r(40,{headStroke:"black",headLineWidth:1.5}),new l],150),stepEmitter:null},t),t.stepEmitter&&(this.stepCallback=function(t){s.step(t)},t.stepEmitter.addListener(this.stepCallback)),this.imageWrappers=[];_.uniq(this.options.nodes).forEach(function(e,i){s.imageWrappers.push({image:null,width:e.width,height:e.height,node:e});var n=new a({children:[e],scale:t.scaleForResolution});n.toImage(function(t){s.imageWrappers[i].image=t,n.dispose()})}),n.call(this,t),this.inited=!1,u.phetioStateEngine&&(this.initializationVerifier=function(){s.inited||s.init()},u.phetioStateEngine.setStateEmitter.addListener(this.initializationVerifier))}var i=t("DOT/Bounds2"),n=t("SCENERY/nodes/CanvasNode"),r=t("SCENERY_PHET/FaceNode"),s=t("PHET_CORE/inherit"),a=t("SCENERY/nodes/Node"),o=t("JOIST/ScreenView"),l=t("SCENERY_PHET/StarNode"),h=t("VEGAS/vegas"),u=t("ifphetio!PHET_IO/phetioEngine");return h.register("RewardNode",e),s(n,e,{paintCanvas:function(t){if(t.scale(1/this.options.scaleForResolution,1/this.options.scaleForResolution),this.rewards)for(var e=0;ee&&(n.x=this.sampleImageXValue(n.imageWrapper),n.y=this.sampleImageYValue(n.imageWrapper))}this.invalidatePaint()},dispose:function(){this.stop(),this.screenView&&this.screenView.off("transform",this.updateBounds),this.initializationVerifier&&u.phetioStateEngine.setStateEmitter.removeListener(this.initializationVerifier),n.prototype.dispose.call(this)}},{createRandomNodes:function(t,e){for(var i=[],n=0;n0,e!==u.State.COMPARISON&&e!==u.State.NO_COMPARISON||(H.chartNode.visible=!1),H.pieceLayer.pickable=e!==u.State.SHOW_ANSWER&&e!==u.State.MATCHED&&null},H.challenge.stateProperty.link(H.stateListener),H.disposeEmitter.addListener(function(){H.challenge.stateProperty.unlink(H.stateListener)});var nt=function(){return V.correctAnswer()},rt=function(){return V.wrongAnswer()};H.challenge.correctEmitter.addListener(nt),H.challenge.incorrectEmitter.addListener(rt),H.disposeEmitter.addListener(function(){H.challenge.correctEmitter.removeListener(nt),H.challenge.incorrectEmitter.removeListener(rt)}),H.lastScoreGainListener=function(t){Q.setPoints(t)},H.challenge.lastScoreGainProperty.link(H.lastScoreGainListener),H.disposeEmitter.addListener(function(){H.challenge.lastScoreGainProperty.unlink(H.lastScoreGainListener)});var st=[];t.pieces.forEach(function(t){var e=new d(t);st.push(e),H.pieceLayer.addChild(e)}),H.disposeEmitter.addListener(function(){H.pieceLayer.children.forEach(function(t){return t.dispose()})});var at=function(){12===t.scoreProperty.value&&(V.gameOverPerfectScore(),H.rewardNode=new E({pickable:!1,nodes:[].concat(_toConsumableArray(_.times(8,function(){return new y})),_toConsumableArray(_.times(8,function(){return new n(40,{headStroke:"black",headLineWidth:1.5})})),_toConsumableArray(E.createRandomNodes(t.pieces.map(function(t){return new d(t.copy())}),100)))}),F.rewardContainer.addChild(H.rewardNode));var e=12===t.scoreProperty.value?T.toFixed(Math.min(t.elapsedTimeProperty.value,t.previousBestTime),0):null,i=new h(t.levelNumber,t.scoreProperty.value,12,3,t.timeVisibleProperty.value,T.toFixed(t.elapsedTimeProperty.value,0),e,t.isNewBestTime,F.onContinue,{center:o.center,contentMaxWidth:600});H.addChild(i),H.disposeEmitter.addListener(function(){i.dispose(),H.rewardNode&&(H.rewardNode.dispose(),H.rewardNode=null)})};return H.challenge.completedEmitter.addListener(at),H.disposeEmitter.addListener(function(){H.challenge.completedEmitter.removeListener(at)}),U.emit(),H}return _inherits(s,f),_createClass(s,[{key:"step",value:function(t){this.rewardNode&&this.rewardNode.step(t),this.chartNode.step(t)}},{key:"dispose",value:function(){this.disposeEmitter.emit(),_get(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"dispose",this).call(this)}}]),s}();return s.register("MatchingChallengeNode",V)}),i("SUN/FontAwesomeNode",["require","PHET_CORE/inherit","DOT/Matrix3","SCENERY/nodes/Path","KITE/Shape","SUN/sun"],function(t){"use strict";function e(t,i){var n;(i=_.extend({fill:"#000",pickable:!1,enableCache:!0},i)).enableCache?(h[t]||(h[t]=e.createShape(t)),n=h[t]):n=e.createShape(t),r.call(this,n,i)}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("SCENERY/nodes/Path"),s=t("KITE/Shape"),a=t("SUN/sun"),o={camera:"M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z",check:"M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z",check_empty:"M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z",check_square_o:"M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z",cut:"M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z",eye_close:"M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z",eye_open:"M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z",exchange:"M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z",home:"M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z",info_circle:"M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z",level_down:"M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z",pencil_square_o:"M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z",refresh:"M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z",reply:"M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z",times:"M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z",times_circle:"M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z",trash:"M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z",undo:"M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-179 0 -336.5 76t-266 213t-147.5 312q-3 14 7 27q9 12 25 12h199q23 0 30 -23q50 -162 185 -261.5t304 -99.5q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5 t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z",volume_off:"M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z",volume_up:"M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z",warning_sign:"M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z"},l=n.createFromPool(.025,0,0,0,-.025,0,0,0,1),h={};return a.register("FontAwesomeNode",e),i(r,e,{},{createShape:function(t){return new s(o[t]).transformed(l).makeImmutable()}})}),i("SCENERY_PHET/buttons/RefreshButton",["require","SUN/FontAwesomeNode","PHET_CORE/inherit","SCENERY_PHET/PhetColorScheme","SUN/buttons/RectangularPushButton","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t){(t=_.extend({baseColor:r.BUTTON_YELLOW,iconScale:1},t)).content=new i("refresh",{scale:t.iconScale}),s.call(this,t)}var i=t("SUN/FontAwesomeNode"),n=t("PHET_CORE/inherit"),r=t("SCENERY_PHET/PhetColorScheme"),s=t("SUN/buttons/RectangularPushButton");return t("SCENERY_PHET/sceneryPhet").register("RefreshButton",e),n(s,e)}),i("SCENERY_PHET/accessibility/Utterance",["require","SCENERY_PHET/sceneryPhet"],function(t){"use strict";var e=t("SCENERY_PHET/sceneryPhet"),i=0,n=function(){function t(e){_classCallCheck(this,t),e=_.extend({alert:null,loopAlerts:!1,predicate:function(){return!0},alertStable:!0,alertStableDelay:200,alertMaximumDelay:Number.MAX_VALUE},e),this._alert=e.alert,this.numberOfTimesAlerted=0,this.loopAlerts=e.loopAlerts,this.predicate=e.predicate,this.timeInQueue=0,this.stableTime=0,this.alertStable=e.alertStable,this.uniqueId=i++,this.alertStableDelay=e.alertStableDelay,this.alertMaximumDelay=e.alertMaximumDelay}return _createClass(t,[{key:"getTextToAlert",value:function(){var t=void 0;if("string"==typeof this._alert)t=this._alert;else if(this.loopAlerts)t=this._alert[this.numberOfTimesAlerted%this._alert.length];else{var e=Math.min(this.numberOfTimesAlerted,this._alert.length-1);t=this._alert[e]}return this.numberOfTimesAlerted++,t}},{key:"reset",value:function(){this.numberOfTimesAlerted=0}},{key:"alert",set:function(t){this._alert=t},get:function(){return this._alert}}]),t}();return e.register("Utterance",n)}),i("SCENERY_PHET/accessibility/ActivationUtterance",["require","SCENERY_PHET/sceneryPhet","SCENERY_PHET/accessibility/Utterance"],function(t){"use strict";var e=t("SCENERY_PHET/sceneryPhet"),i=t("SCENERY_PHET/accessibility/Utterance"),n=function(t){function e(t){return _classCallCheck(this,e),t=_.extend({alertStableDelay:500},t),t.alertStable=!0,_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return _inherits(e,i),e}();return e.register("ActivationUtterance",n)}),i("SCENERY_PHET/ResetShape",["require","PHET_CORE/inherit","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t){r.call(this);var e=.4*t,i=.625*t,n=2.25*(i-e),s=.35*-Math.PI,a=-2*Math.PI*.85,o=.18*-Math.PI;this.moveTo(e*Math.cos(s),e*Math.sin(s)),this.lineTo(i*Math.cos(s),i*Math.sin(s));var l=s+a;this.arc(0,0,i,s,l,!0);var h=(n-(i-e))/2;this.lineTo((i+h)*Math.cos(l),(i+h)*Math.sin(l));var u=.55*(i+e);this.lineTo(u*Math.cos(l+o),u*Math.sin(l+o)),this.lineTo((e-h)*Math.cos(l),(e-h)*Math.sin(l)),this.lineTo(e*Math.cos(l),e*Math.sin(l)),this.arc(0,0,e,l,s),this.close()}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("KITE/Shape");return n.register("ResetShape",e),i(r,e)}),i("SCENERY/display/SVGRadialGradient",["require","PHET_CORE/inherit","PHET_CORE/Poolable","SCENERY/scenery","SCENERY/display/SVGGradient"],function(t){"use strict";function e(t,e){this.initialize(t,e)}var i=t("PHET_CORE/inherit"),n=t("PHET_CORE/Poolable"),r=t("SCENERY/scenery"),s=t("SCENERY/display/SVGGradient");return r.register("SVGRadialGradient",e),i(s,e,{initialize:function(t,e){return s.prototype.initialize.call(this,t,e),this.definition.setAttribute("cx",e.largePoint.x),this.definition.setAttribute("cy",e.largePoint.y),this.definition.setAttribute("r",e.maxRadius),this.definition.setAttribute("fx",e.focalPoint.x),this.definition.setAttribute("fy",e.focalPoint.y),this},createDefinition:function(){return document.createElementNS(r.svgns,"radialGradient")}}),n.mixInto(e,{initialize:e.prototype.initialize}),e}),i("SCENERY/util/RadialGradient",["require","SCENERY/util/Gradient","PHET_CORE/inherit","PHET_CORE/platform","SCENERY/scenery","SCENERY/display/SVGRadialGradient","DOT/Vector2"],function(t){"use strict";function e(t,e,n,s,a,l){if(this.start=new o(t,e),this.end=new o(s,a),r.safari){var h=(t+s)/2,u=(e+a)/2;this.start.x=h,this.start.y=u,this.end.x=h,this.end.y=u}this.startRadius=n,this.endRadius=l,this.focalPoint=this.start.plus(this.end.minus(this.start).times(this.startRadius/(this.startRadius-this.endRadius))),this.startIsLarger=this.startRadius>this.endRadius,this.largePoint=this.startIsLarger?this.start:this.end,this.maxRadius=Math.max(this.startRadius,this.endRadius),this.minRadius=Math.min(this.startRadius,this.endRadius),this.startRadius,this.endRadius,i.call(this)}var i=t("SCENERY/util/Gradient"),n=t("PHET_CORE/inherit"),r=t("PHET_CORE/platform"),s=t("SCENERY/scenery"),a=t("SCENERY/display/SVGRadialGradient"),o=t("DOT/Vector2");return s.register("RadialGradient",e),n(i,e,{isRadialGradient:!0,createCanvasGradient:function(){return s.scratchContext.createRadialGradient(this.start.x,this.start.y,this.startRadius,this.end.x,this.end.y,this.endRadius)},createSVGPaint:function(t){return a.createFromPool(t,this)},getSVGStops:function(){var t=this.startIsLarger,e=this.maxRadius,i=this.minRadius,n=this.stops.map(function(n){var r=t?1-n.ratio:n.ratio;return i>0&&(r=function(t,e,i,n,s){return i+(r-t)*(1-i)/(1-t)}(0,0,i/e)),{ratio:r,color:n.color}});return t&&n.reverse(),n},toString:function(){var t="new scenery.RadialGradient( "+this.start.x+", "+this.start.y+", "+this.startRadius+", "+this.end.x+", "+this.end.y+", "+this.endRadius+" )";return _.each(this.stops,function(e){t+=".addColorStop( "+e.ratio+", '"+e.color.toString()+"' )"}),t}}),e}),i("SUN/buttons/RoundButtonView",["require","SUN/buttons/ButtonInteractionState","SCENERY/nodes/Circle","SUN/ColorConstants","AXON/DerivedProperty","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/util/PaintColorProperty","SCENERY/util/RadialGradient","KITE/Shape","SUN/sun","TANDEM/Tandem","DOT/Vector2"],function(t){"use strict";function e(t,s,a){function h(t){S.cursor=t===i.DISABLED||t===i.DISABLED_PRESSED?null:"pointer"}this.buttonModel=t,(a=_.extend({radius:a&&a.content?void 0:30,content:null,cursor:"pointer",baseColor:f,disabledBaseColor:r.LIGHT_GRAY,minXMargin:5,minYMargin:5,fireOnDown:!1,touchAreaDilation:0,mouseAreaDilation:0,touchAreaXShift:0,touchAreaYShift:0,mouseAreaXShift:0,mouseAreaYShift:0,stroke:void 0,lineWidth:.5,xContentOffset:0,yContentOffset:0,buttonAppearanceStrategy:e.ThreeDAppearanceStrategy,contentAppearanceStrategy:e.FadeContentWhenDisabled,listenerOptions:null,tandem:d.optional,phetioComponentOptions:{visibleProperty:{phetioFeatured:!0}},tagName:"button",focusHighlightDilation:5},a)).listenerOptions=_.extend({tandem:a.tandem.createTandem("pressListener")},a.listenerOptions),o.call(this);var c=a.content,m=new p(a.xContentOffset,a.yContentOffset);c&&(c.pickable=!1),this.baseColorProperty=new l(a.baseColor);var g=t.createListener(a.listenerOptions);this.addInputListener(g);var E=a.radius||Math.max(c.width+2*a.minXMargin,c.height+2*a.minYMargin)/2,y=new n(E,{fill:a.baseColor,lineWidth:a.lineWidth});this.addChild(y);var v=new a.buttonAppearanceStrategy(y,s,this.baseColorProperty,a);c&&(c.center=m,this.addChild(c));var b=new a.contentAppearanceStrategy(c,s),S=this;s.link(h),this.touchArea=u.circle(a.touchAreaXShift,a.touchAreaYShift,E+a.touchAreaDilation),this.mouseArea=u.circle(a.mouseAreaXShift,a.mouseAreaYShift,E+a.mouseAreaDilation),this.pickable=null,this.focusHighlight=new u.circle(0,0,E+a.focusHighlightDilation),this.mutate(a),this.disposeRoundButtonView=function(){v.dispose(),b.dispose(),g.dispose(),s.hasListener(h)&&s.unlink(h),this.baseColorProperty.dispose()}}var i=t("SUN/buttons/ButtonInteractionState"),n=t("SCENERY/nodes/Circle"),r=t("SUN/ColorConstants"),s=t("AXON/DerivedProperty"),a=t("PHET_CORE/inherit"),o=t("SCENERY/nodes/Node"),l=t("SCENERY/util/PaintColorProperty"),h=t("SCENERY/util/RadialGradient"),u=t("KITE/Shape"),c=t("SUN/sun"),d=t("TANDEM/Tandem"),p=t("DOT/Vector2"),f=r.LIGHT_BLUE;return c.register("RoundButtonView",e),e.ThreeDAppearanceStrategy=function(t,e,r,a){function o(e){switch(e){case i.IDLE:t.fill=R,B.stroke=L,B.fill=O;break;case i.OVER:t.fill=I,B.stroke=L,B.fill=x;break;case i.PRESSED:t.fill=D,B.stroke=L,B.fill=x;break;case i.DISABLED:t.fill=k,B.stroke=Y,B.fill=M;break;case i.DISABLED_PRESSED:t.fill=q,B.stroke=Y,B.fill=M;break;default:throw new Error("upsupported interactionState: "+e)}}var u=new l(r,{luminanceFactor:.8}),c=new l(r,{luminanceFactor:.7}),d=new l(r,{luminanceFactor:.3}),p=new l(r,{luminanceFactor:-.1}),f=new l(r,{luminanceFactor:-.2}),m=new l(r,{luminanceFactor:-.4}),g=new l(r,{luminanceFactor:-.5}),E=new l(a.disabledBaseColor),y=new l(a.disabledBaseColor,{luminanceFactor:.8}),v=new l(a.disabledBaseColor,{luminanceFactor:.5}),b=new l(a.disabledBaseColor,{luminanceFactor:-.1}),S=new l(a.disabledBaseColor,{luminanceFactor:-.2}),T=new l(a.disabledBaseColor,{luminanceFactor:-.4}),C=new l(a.disabledBaseColor,{luminanceFactor:-.5}),A=new s([r],function(t){return t.withAlpha(0)}),N=new s([E],function(t){return t.withAlpha(0)}),w=t.width/2,_=w-2.5,P=w+2.5,R=new h(2.5,2.5,_,2.5,2.5,P).addColorStop(0,r).addColorStop(1,c),O=new h(-2.5,-2.5,_,-2.5,-2.5,P).addColorStop(0,A).addColorStop(1,g),I=new h(2.5,2.5,_,2.5,2.5,P).addColorStop(0,d).addColorStop(1,u),x=new h(-2.5,-2.5,_,-2.5,-2.5,P).addColorStop(0,A).addColorStop(1,g),D=new h(-2.5,-2.5,0,0,0,P).addColorStop(0,p).addColorStop(.6,f).addColorStop(.8,r).addColorStop(1,u),k=new h(2.5,2.5,_,2.5,2.5,P).addColorStop(0,a.disabledBaseColor).addColorStop(1,v),M=new h(-2.5,-2.5,_,-2.5,-2.5,P).addColorStop(0,N).addColorStop(1,C),q=new h(-2.5,-2.5,0,0,0,P).addColorStop(0,b).addColorStop(.6,S).addColorStop(.8,a.disabledBaseColor).addColorStop(1,y),L=null,Y=null;null===a.stroke?(L=null,Y=null):void 0===a.stroke?(L=m,Y=T):(L=a.stroke,Y=T);var B=new n(w,{lineWidth:a.lineWidth,pickable:!1});t.addChild(B),t.cachedPaints=[R,I,D,k,q],B.cachedPaints=[O,x,M,L,Y],e.link(o),this.dispose=function(){e.hasListener(o)&&e.unlink(o),A.dispose(),N.dispose(),E.dispose(),u.dispose(),c.dispose(),d.dispose(),p.dispose(),f.dispose(),m.dispose(),g.dispose(),y.dispose(),v.dispose(),b.dispose(),S.dispose(),T.dispose(),C.dispose()}},e.FlatAppearanceStrategy=function(t,e,n,r){function s(e){switch(e){case i.IDLE:t.fill=u,t.stroke=m;break;case i.OVER:t.fill=c,t.stroke=m;break;case i.PRESSED:t.fill=d,t.stroke=m;break;case i.DISABLED:t.fill=p,t.stroke=g;break;case i.DISABLED_PRESSED:t.fill=f,t.stroke=g;break;default:throw new Error("upsupported interactionState: "+e)}}var a=new l(n,{luminanceFactor:.4}),o=new l(n,{luminanceFactor:-.4}),h=new l(r.disabledBaseColor,{luminanceFactor:-.4}),u=n,c=a,d=o,p=r.disabledBaseColor,f=p,m=null,g=null;null===r.stroke?(m=null,g=null):void 0===r.stroke?(m=o,g=h):(m=r.stroke,g=h),t.cachedPaints=[u,c,d,p,f,m,g],e.link(s),this.dispose=function(){e.hasListener(s)&&e.unlink(s),a.dispose(),o.dispose(),h.dispose()}},e.FadeContentWhenDisabled=function(t,e){function n(e){t&&(t.opacity=e===i.DISABLED||e===i.DISABLED_PRESSED?.3:1)}e.link(n),this.dispose=function(){e.hasListener(n)&&e.unlink(n)}},a(o,e,{setEnabled:function(t){this.buttonModel.enabledProperty.set(t)},set enabled(t){this.setEnabled(t)},getEnabled:function(){return this.buttonModel.enabledProperty.get()},get enabled(){return this.getEnabled()},setBaseColor:function(t){this.baseColorProperty.paint=t},set baseColor(t){this.setBaseColor(t)},getBaseColor:function(){return this.baseColorProperty.paint},get baseColor(){return this.getBaseColor()},dispose:function(){this.disposeRoundButtonView(),o.prototype.dispose.call(this)}})}),i("SUN/buttons/RoundPushButton",["require","PHET_CORE/inherit","PHET_CORE/documentation/InstanceRegistry","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","SUN/buttons/RoundButtonView","SUN/sun","TANDEM/Tandem"],function(t){"use strict";function e(t){var e=this,i=(t=_.extend({tandem:o.required},t)).listener;t=_.omit(t,["listener"]),this.buttonModel=new r(t),s.call(this,this.buttonModel,new n(this.buttonModel),t),i&&this.addListener(i),this.disposeRoundPushButton=function(){e.buttonModel.dispose()}}var i=t("PHET_CORE/inherit"),n=(t("PHET_CORE/documentation/InstanceRegistry"),t("SUN/buttons/PushButtonInteractionStateProperty")),r=t("SUN/buttons/PushButtonModel"),s=t("SUN/buttons/RoundButtonView"),a=t("SUN/sun"),o=t("TANDEM/Tandem");return a.register("RoundPushButton",e),i(s,e,{dispose:function(){s.prototype.dispose.call(this),this.disposeRoundPushButton()},addListener:function(t){this.buttonModel.addListener(t)},removeListener:function(t){this.buttonModel.removeListener(t)}})}),i("SCENERY_PHET/buttons/ResetButton",["require","PHET_CORE/inherit","DOT/Matrix3","SCENERY/nodes/Path","SCENERY_PHET/ResetShape","SUN/buttons/RoundPushButton","SCENERY_PHET/sceneryPhet","TANDEM/Tandem"],function(t){"use strict";function e(t){var e=t&&t.radius?t.radius:24;t=_.extend({radius:e,minXMargin:.2*e,baseColor:"white",arrowColor:"black",xContentOffset:-.03*e,yContentOffset:-.0125*e,tandem:l.required},t);var i=new r(new s(t.radius),{fill:t.arrowColor}),o=new r(i.shape.transformed(n.scaling(-1,-1)));i.localBounds=i.localBounds.union(o.localBounds),t.content=i,a.call(this,t)}var i=t("PHET_CORE/inherit"),n=t("DOT/Matrix3"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/ResetShape"),a=t("SUN/buttons/RoundPushButton"),o=t("SCENERY_PHET/sceneryPhet"),l=t("TANDEM/Tandem");return o.register("ResetButton",e),i(a,e)}),i("SCENERY_PHET/accessibility/AlertableDef",["require","SCENERY_PHET/sceneryPhet","SCENERY_PHET/accessibility/Utterance"],function(t){"use strict";var e=t("SCENERY_PHET/sceneryPhet"),i=t("SCENERY_PHET/accessibility/Utterance"),n={isAlertableDef:function(t){var e=!0;if(Array.isArray(t))for(var i=0;in.alertStableDelay,a=n.timeInQueue>n.alertMaximumDelay;if(!r||s||a){t=n,this.queue.splice(i,1),t.alertStable&&(t.timeInQueue=0);break}}if(t&&this.canAlertUtterance(t)){var o=t.getTextToAlert();this.phetioStartEvent("announced",{utterance:o}),e.announcePolite(o),this.phetioEndEvent()}}},{key:"clearUtterance",value:function(t){if(t.alertStable){t.stableTime=0;for(var e=t.uniqueId,i=this.queue.length-1;i>=0;i--){this.queue[i].uniqueId===e&&this.queue.splice(i,1)}}}},{key:"clear",value:function(){this.queue=[]}},{key:"setMuted",value:function(t){this._muted=t}},{key:"getMuted",value:function(){return this._muted}},{key:"setEnabled",value:function(t){this._enabled=t}},{key:"getEnabled",value:function(){return this._enabled}},{key:"stepQueue",value:function(t){if(this._enabled){t*=1e3;for(var e=0;e';return e.register("JoistA11yStrings",i),i}),i("JOIST/Screen",["require","AXON/BooleanProperty","DOT/Dimension2","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","SCENERY/nodes/Path","AXON/Property","SCENERY/nodes/Rectangle","SCENERY_PHET/accessibility/nodes/ScreenSummaryNode","KITE/Shape","PHETCOMMON/util/StringUtils","TANDEM/Tandem"],function(t){"use strict";function e(t,e,n){(n=_.extend({name:null,backgroundColorProperty:new l("white"),homeScreenIcon:null,showUnselectedHomeScreenIconFrame:!1,navigationBarIcon:null,showScreenIconFrameForNavigationBarFill:null,maxDT:.5,tandem:d.required,descriptionContent:null},n)).homeScreenIcon||(n.homeScreenIcon=new h(0,0,g.width,g.height,{fill:n.backgroundColorProperty.value,stroke:"black"})),n.navigationBarIcon||(n.navigationBarIcon=n.homeScreenIcon),b(n.homeScreenIcon,g,v,"homeScreenIcon"),b(n.navigationBarIcon,E,y,"navigationBarIcon"),this.screenTandem=n.tandem,this.backgroundColorProperty=n.backgroundColorProperty,this.name=n.name,this.homeScreenIcon=n.homeScreenIcon,this.navigationBarIcon=n.navigationBarIcon,this.showUnselectedHomeScreenIconFrame=n.showUnselectedHomeScreenIconFrame,this.showScreenIconFrameForNavigationBarFill=n.showScreenIconFrameForNavigationBarFill,this.maxDT=n.maxDT,this.createModel=t,this.createView=e,this._model=null,this._view=null,this.activeProperty=new i(!0,{tandem:n.tandem.createTandem("activeProperty"),phetioReadOnly:!0,phetioDocumentation:"Indicates whether the screen is active. For single-screen simulations, the screen is always active."}),this.descriptionContent="",n.descriptionContent?this.descriptionContent=n.descriptionContent:this.name?this.descriptionContent=c.fillIn(p,{name:this.name}):this.descriptionContent=m}var i=t("AXON/BooleanProperty"),n=t("DOT/Dimension2"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),a=t("JOIST/JoistA11yStrings"),o=t("SCENERY/nodes/Path"),l=t("AXON/Property"),h=t("SCENERY/nodes/Rectangle"),u=(t("SCENERY_PHET/accessibility/nodes/ScreenSummaryNode"),t("KITE/Shape")),c=t("PHETCOMMON/util/StringUtils"),d=t("TANDEM/Tandem"),p=a.screenNamePattern.value,f=a.screenSimPattern.value,m=a.simScreen.value,g=new n(548,373),E=new n(147,100),y=E.width/E.height,v=g.width/g.height;s.register("Screen",e);var b=function(t,e,i,n){t.width,t.height};return r(Object,e,{reset:function(){},get model(){return this._model},get view(){return this._view},initializeModel:function(){this._model=this.createModel()},initializeView:function(t,e){if(this._view=this.createView(this.model),this._view.setVisible(!1),phet.chipper.queryParameters.dev&&this._view.addChild(function(t){return new o(u.bounds(t),{stroke:"red",lineWidth:3,pickable:!1})}(this._view.layoutBounds)),phet.chipper.queryParameters.showVisibleBounds&&this._view.addChild(function(t){var e=new o(u.bounds(t.visibleBoundsProperty.value),{stroke:"blue",lineWidth:6,pickable:!1});return t.visibleBoundsProperty.link(function(t){e.shape=u.bounds(t)}),e}(this._view)),t){if(1===e)this._view.labelContent=t;else{var i=c.fillIn(p,{name:this.name});this._view.labelContent=c.fillIn(f,{screenName:i,simName:t})}this._view.screenSummaryNode&&this._view.screenSummaryNode.setIntroString(t,e)}},initializeModelAndView:function(){this.initializeModel(),this.initializeView()}},{MINIMUM_HOME_SCREEN_ICON_SIZE:g,HOME_SCREEN_ICON_ASPECT_RATIO:v,MINIMUM_NAVBAR_ICON_SIZE:E})}),i("SUN/ToggleNode",["require","TANDEM/Tandem","PHET_CORE/inherit","SCENERY/nodes/Node","SUN/sun"],function(t){"use strict";function e(t,n,s){s=_.extend({alignChildren:e.CENTER,tandem:i.optional},s);var a=function(t){for(var e=0;e0}}}),r.register("ToggleButtonIO",e),e}),i("SUN/buttons/ToggleButtonModel",["require","SUN/buttons/ButtonModel","AXON/Emitter","PHET_CORE/inherit","TANDEM/PhetioObject","SUN/sun","TANDEM/Tandem"],function(t){"use strict";function e(t,e,r,a){var l=this;a=_.extend({tandem:o.required},a),this.valueOff=t,this.valueOn=e,this.valueProperty=r,i.call(this,a);var h=function(t){l.enabledProperty.get()&&l.overProperty.get()&&(t||l.toggle())};this.downProperty.link(h),this.toggledEmitter=new n({tandem:a.tandem.createTandem("toggledEmitter"),phetioDocumentation:"Emits when the button is toggled",phetioEventType:s.EventType.USER});var u=function(){l.valueProperty.value=l.valueProperty.value===l.valueOff?l.valueOn:l.valueOff};this.toggledEmitter.addListener(u),this.disposeToggleButtonModel=function(){l.downProperty.unlink(h),l.toggledEmitter.removeListener(u)}}var i=t("SUN/buttons/ButtonModel"),n=t("AXON/Emitter"),r=t("PHET_CORE/inherit"),s=t("TANDEM/PhetioObject"),a=t("SUN/sun"),o=t("TANDEM/Tandem");return a.register("ToggleButtonModel",e),r(i,e,{dispose:function(){this.disposeToggleButtonModel(),i.prototype.dispose.call(this)},toggle:function(){this.toggledEmitter.emit()}})}),i("SUN/buttons/RectangularToggleButton",["require","PHET_CORE/inherit","SUN/buttons/RectangularButtonView","SUN/sun","TANDEM/Tandem","SUN/buttons/ToggleButtonInteractionStateProperty","SUN/buttons/ToggleButtonIO","SUN/buttons/ToggleButtonModel"],function(t){"use strict";function e(t,e,i,r){r=_.extend({tandem:s.required,phetioType:o},r),this.toggleButtonModel=new l(t,e,i,r);var h=new a(this.toggleButtonModel);n.call(this,this.toggleButtonModel,h,r),this.disposeRectangularToggleButton=function(){h.dispose()}}var i=t("PHET_CORE/inherit"),n=t("SUN/buttons/RectangularButtonView"),r=t("SUN/sun"),s=t("TANDEM/Tandem"),a=t("SUN/buttons/ToggleButtonInteractionStateProperty"),o=t("SUN/buttons/ToggleButtonIO"),l=t("SUN/buttons/ToggleButtonModel");return r.register("RectangularToggleButton",e),i(n,e,{dispose:function(){this.disposeRectangularToggleButton(),n.prototype.dispose&&n.prototype.dispose.call(this)}})}),i("SUN/buttons/BooleanRectangularToggleButton",["require","SUN/BooleanToggleNode","PHET_CORE/inherit","SUN/buttons/RectangularToggleButton","SUN/sun","TANDEM/Tandem"],function(t){"use strict";function e(t,e,n,s){(s=_.extend({tandem:a.required},s)).content=new i(t,e,n),r.call(this,!1,!0,n,s),this.disposeBooleanRectangularToggleButton=function(){s.content.dispose()}}var i=t("SUN/BooleanToggleNode"),n=t("PHET_CORE/inherit"),r=t("SUN/buttons/RectangularToggleButton"),s=t("SUN/sun"),a=t("TANDEM/Tandem");return s.register("BooleanRectangularToggleButton",e),n(r,e,{dispose:function(){this.disposeBooleanRectangularToggleButton(),r.prototype.dispose.call(this)}})}),i("SCENERY_PHET/SimpleClockIcon",["require","SCENERY/nodes/Circle","PHET_CORE/inherit","SCENERY/nodes/Line","SCENERY/nodes/Node","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){s.call(this),e=_.extend({fill:"white",stroke:"black",lineWidth:2},e),this.addChild(new i(t,e)),this.addChild(new i(.15*t,{fill:e.stroke}));var n={stroke:e.stroke,lineWidth:e.lineWidth,lineCap:"round",lineJoin:"round"};this.addChild(new r(0,0,0,.75*-t,n)),this.addChild(new r(0,0,.45*t,.3*t,n)),this.centerX=t,this.centerY=t,this.mutate(e)}var i=t("SCENERY/nodes/Circle"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Line"),s=t("SCENERY/nodes/Node");return t("SCENERY_PHET/sceneryPhet").register("SimpleClockIcon",e),n(s,e)}),i("SCENERY_PHET/buttons/TimerToggleButton",["require","SUN/buttons/BooleanRectangularToggleButton","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY_PHET/PhetColorScheme","SCENERY_PHET/sceneryPhet","KITE/Shape","SCENERY_PHET/SimpleClockIcon"],function(t){"use strict";function e(t,e){var n=.35*u,o=new h(n),f=new r,m=new h(n,{opacity:.8});f.addChild(m);var g=new l,E=.8*f.width;g.moveTo(0,0),g.lineTo(E,E),g.moveTo(0,E),g.lineTo(E,0),f.addChild(new s(g,{stroke:"red",opacity:.55,lineWidth:p,lineCap:"round",centerX:f.width/2,centerY:f.height/2})),i.call(this,o,f,t,_.extend({baseColor:a.BUTTON_YELLOW,minWidth:u,minHeight:c,xMargin:d,yMargin:d},e))}var i=t("SUN/buttons/BooleanRectangularToggleButton"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Node"),s=t("SCENERY/nodes/Path"),a=t("SCENERY_PHET/PhetColorScheme"),o=t("SCENERY_PHET/sceneryPhet"),l=t("KITE/Shape"),h=t("SCENERY_PHET/SimpleClockIcon"),u=45,c=45,d=4,p=6;return o.register("TimerToggleButton",e),n(i,e)}),i("TWIXT/Transition",["require","TWIXT/Animation","PHET_CORE/inherit","KITE/Shape","TWIXT/twixt"],function(t){"use strict";function e(t,e,n){var r={fromTargets:null,toTargets:null,resetNode:null,targetOptions:null};n=_.extend({},r,n);var s=_.extend({},n.targetOptions),a=[];t&&(a=a.concat(n.fromTargets.map(function(e){return _.extend(e,{object:t},s)}))),e&&(a=a.concat(n.toTargets.map(function(t){return _.extend(t,{object:e},s)}))),i.call(this,_.extend({targets:a},_.omit(n,_.keys(r)))),this.endedEmitter.addListener(function(){t&&n.resetNode(t),e&&n.resetNode(e)})}var i=t("TWIXT/Animation"),n=t("PHET_CORE/inherit"),r=t("KITE/Shape");return t("TWIXT/twixt").register("Transition",e),n(i,e,{},{slideLeft:function(t,i,n,r){return e.createSlide(i,n,"x",t.width,!0,r)},slideRight:function(t,i,n,r){return e.createSlide(i,n,"x",t.width,!1,r)},slideUp:function(t,i,n,r){return e.createSlide(i,n,"y",t.height,!0,r)},slideDown:function(t,i,n,r){return e.createSlide(i,n,"y",t.height,!1,r)},wipeLeft:function(t,i,n,r){return e.createWipe(t,i,n,"maxX","minX",r)},wipeRight:function(t,i,n,r){return e.createWipe(t,i,n,"minX","maxX",r)},wipeUp:function(t,i,n,r){return e.createWipe(t,i,n,"maxY","minY",r)},wipeDown:function(t,i,n,r){return e.createWipe(t,i,n,"minY","maxY",r)},dissolve:function(t,i,n){function r(t,e,i){return Math.pow((1-i)*t+i*e,n.gamma)}return n=_.extend({gamma:1},n),new e(t,i,_.extend({fromTargets:[{attribute:"opacity",from:1,to:0,blend:r}],toTargets:[{attribute:"opacity",from:0,to:1,blend:r}],resetNode:function(t){t.opacity=1}},n))},createSlide:function(t,i,n,r,s,a){var o=s?-1:1;return new e(t,i,_.extend({fromTargets:[{attribute:n,from:0,to:r*o}],toTargets:[{attribute:n,from:-r*o,to:0}],resetNode:function(t){t[n]=0}},a))},createWipe:function(t,i,n,s,a,o){function l(t,e,i){return r.bounds(t.blend(e,i))}var h=t.copy(),u=t.copy();return h[s]=t[a],u[a]=t[s],new e(i,n,_.extend({fromTargets:[{attribute:"clipArea",from:t,to:h,blend:l}],toTargets:[{attribute:"clipArea",from:u,to:t,blend:l}],resetNode:function(t){t.clipArea=null}},o))}}),e}),i("TWIXT/TransitionNode",["require","PHET_CORE/inherit","SCENERY/nodes/Node","KITE/Shape","TWIXT/Transition","TWIXT/twixt"],function(t){"use strict";function e(t,e){e=_.extend({content:null,useBoundsClip:!0,cachedNodes:[]},e),n.call(this),this.boundsProperty=t,this.useBoundsClip=e.useBoundsClip,this.cachedNodes=e.cachedNodes,this.fromContent=e.content,this.toContent=null,this.children=this.cachedNodes;for(var i=0;i0};return t.lengthProperty.link(o),a.addInputListener(new e({tandem:n.tandem.createTandem("inputListener"),fire:function(){t.get(t.length-1).hide()}})),a.disposeBarrierRectangle=function(){t.lengthProperty.unlink(o)},a}return _inherits(r,n),_createClass(r,[{key:"dispose",value:function(){this.disposeBarrierRectangle(),_get(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"dispose",this).call(this)}}]),r}();return r.register("BarrierRectangle",a)}),i("BRAND/../../js/brand",["require","PHET_CORE/Namespace"],function(t){"use strict";return new(t("PHET_CORE/Namespace"))("brand")}),i("string!JOIST/termsPrivacyAndLicensing",function(){return window.phet.chipper.strings.get("JOIST/termsPrivacyAndLicensing")}),i("string!JOIST/translation.credits.link",function(){return window.phet.chipper.strings.get("JOIST/translation.credits.link")}),i("string!JOIST/thirdParty.credits.link",function(){return window.phet.chipper.strings.get("JOIST/thirdParty.credits.link")}),i("BRAND/Brand",["require","BRAND/../../js/brand","string!JOIST/termsPrivacyAndLicensing","string!JOIST/translation.credits.link","string!JOIST/thirdParty.credits.link"],function(t){"use strict";var e=t("BRAND/../../js/brand"),i=t("string!JOIST/termsPrivacyAndLicensing"),n=t("string!JOIST/translation.credits.link"),r=t("string!JOIST/thirdParty.credits.link"),s={id:"phet",name:"PhET™ Interactive Simulations",copyright:"Copyright © 2002-{{year}} University of Colorado Boulder",isPhetApp:phet.chipper.queryParameters["phet-app"]||phet.chipper.queryParameters["phet-android-app"],getLinks:function(t,e){return[{text:i,url:"http://phet.colorado.edu/en/licensing/html"},{text:n,url:"http://phet.colorado.edu/translation-credits?simName="+encodeURIComponent(t)+"&locale="+encodeURIComponent(e)},{text:r,url:"http://phet.colorado.edu/third-party-credits?simName="+encodeURIComponent(t)+"&locale="+encodeURIComponent(e)+"#"+t}]}};return e.register("Brand",s),s}),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","SCENERY/nodes/Node","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e){e=_.extend({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 o(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 l=i.rect(this.rectangle.x,this.rectangle.y,this.frameWidth,this.frameHeight);this.highlightRectangle=o.bounds(l.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"),a=t("SCENERY/nodes/Node"),o=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","SCENERY/listeners/FireListener","JOIST/Frame","PHET_CORE/inherit","JOIST/joist","SCENERY/nodes/Node","SCENERY_PHET/PhetColorScheme","SCENERY_PHET/PhetFont","TANDEM/PhetioObject","SCENERY/nodes/Rectangle","KITE/Shape","SCENERY/nodes/Text","SCENERY/input/Touch","DOT/Util","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,e,r,s,E,y){y=_.extend({showUnselectedHomeScreenIconFrame:!1,opacity:1,tandem:E,phetioEventType:h.EventType.USER,phetioDocumentation:"A pressable button in the simulation, in the home screen"},y);var v=e.screens[r],b=f.linear(2,4,.875,.5,e.screens.length);e.screens.length>=5&&(b=.4);var S=t?g:b*g,T=new a({opacity:y.opacity,children:[v.homeScreenIcon],scale:S/v.homeScreenIcon.height}),C=t?new n(T):new u(0,0,T.width,T.height,{stroke:y.showUnselectedHomeScreenIconFrame?o.SCREEN_ICON_FRAME:null,lineWidth:.7}),A=new a({opacity:y.opacity,children:[C,T]}),N=new d(v.name,{font:new l(t?42:18),fill:t?o.BUTTON_YELLOW:"gray",tandem:E.createTandem("text")});N.maxWidth=A.width,s.link(function(e){var i=e===r;C.setHighlighted&&C.setHighlighted(i),T.opacity=t||i?1:.5,N.fill=t||i?"white":"gray"}),m.call(this,{children:[A,N]});var w=new i({fireOnDown:!0,fire:t?function(){e.showHomeScreenProperty.value=!1,s.value=-1}:function(){e.screenIndexProperty.value=r},tandem:y.tandem.createTandem("inputListener")});this.addInputListener(w),this.addInputListener({click:function(){t&&w.fire()}}),this.addInputListener({focus:function(){!t&&w.fire()}}),this.addInputListener({focus:function(){s.value=r},blur:function(){s.value=-1}}),t||(this.highlightListener={over:function(t){s.value=r},out:function(t){s.value=-1}},this.addInputListener({over:function(t){t.pointer instanceof p&&(e.screenIndexProperty.value=r)}})),this.mouseArea=this.touchArea=c.bounds(this.bounds),this.disposeScreenButton=function(){s.unlink()},this.mutate(y)}var i=t("SCENERY/listeners/FireListener"),n=t("JOIST/Frame"),r=t("PHET_CORE/inherit"),s=t("JOIST/joist"),a=t("SCENERY/nodes/Node"),o=t("SCENERY_PHET/PhetColorScheme"),l=t("SCENERY_PHET/PhetFont"),h=t("TANDEM/PhetioObject"),u=t("SCENERY/nodes/Rectangle"),c=t("KITE/Shape"),d=t("SCENERY/nodes/Text"),p=t("SCENERY/input/Touch"),f=t("DOT/Util"),m=t("SCENERY/nodes/VBox"),g=140;return s.register("ScreenButton",e),r(m,e,{dispose:function(){this.disposeScreenButton(),m.prototype.dispose.call(this)}})}),i("JOIST/HomeScreenView",["require","DOT/Bounds2","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","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=_.extend({warningNode:null},i),c.call(this,{layoutBounds:E,tandem:e,labelContent:t.name,descriptionContent:d.fillIn(g,{name:t.name,screens:t.screens.length})});var s=new p(t.name,{font:new l({size:52,family:y}),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 a=new h(-1),v=_.map(t.screens,function(i,n){var r=e.createTandem(i.screenTandem.tail+"LargeButton"),s={tagName:"button",innerContent:i.name,descriptionContent:i.descriptionContent,appendDescription:!0,containerTagName:"li"},o=new u(!0,t,n,a,r,_.extend(s,{resize:!1,cursor:"pointer"})),l=e.createTandem(i.screenTandem.tail+"SmallButton"),h=new u(!1,t,n,a,l,_.extend(s,{spacing:3,cursor:"pointer",showUnselectedHomeScreenIconFrame:i.showUnselectedHomeScreenIconFrame}));h.addInputListener(h.highlightListener),o.addInputListener(h.highlightListener);var c=function(){h.visible&&h.focus(),o.visible&&o.focus()};return h.addInputListener({focus:c}),o.addInputListener({click:c}),h.setAccessibleAttribute("aria-roledescription",m),o.setAccessibleAttribute("aria-roledescription",m),{screen:i,small:h,large:o,index:n}}),b=new o({tagName:"nav",ariaLabel:f}),S=new o({tagName:"ol"});b.addChild(S),this.addChild(b);var T=60;4===t.screens.length&&(T=33),t.screens.length>=5&&(T=20);var C=null;if(this.highlightedScreenButton=null,t.screenIndexProperty.link(function(t){C&&(C.removeAllChildren(),S.removeChild(C));var e=_.map(v,function(e){return e.index===t&&(r.highlightedScreenButton=e.large),e.index===t?e.large:e.small});C=new n({spacing:T,children:e,align:"top",resize:!1,maxWidth:r.layoutBounds.width-118}),S.addChild(C),S.centerX=r.layoutBounds.width/2,S.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"),a=t("JOIST/JoistA11yStrings"),o=t("SCENERY/nodes/Node"),l=t("SCENERY_PHET/PhetFont"),h=t("AXON/Property"),u=t("JOIST/ScreenButton"),c=t("JOIST/ScreenView"),d=t("PHETCOMMON/util/StringUtils"),p=t("SCENERY/nodes/Text"),f=a.simScreens.value,m=a.simScreen.value,g=a.homeScreenDescriptionPattern.value,E=new i(0,0,768,504),y="Century Gothic, Futura";return s.register("HomeScreenView",e),r(c,e,{focusHighlightedScreenButton:function(){this.highlightedScreenButton.focus()}},{TITLE_FONT_FAMILY:y,LAYOUT_BOUNDS:E})}),i("JOIST/HomeScreen",["require","JOIST/HomeScreenView","PHET_CORE/inherit","JOIST/joist","AXON/Property","JOIST/Screen"],function(t){"use strict";function e(t,e,n){(n=_.extend({backgroundColorProperty:new s(o)},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("AXON/Property"),a=t("JOIST/Screen"),o="black";return r.register("HomeScreen",e),n(a,e,{},{BACKGROUND_COLOR:o})}),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","DOT/RunningAverage"],function(t){"use strict";var e=t("JOIST/joist"),i=t("DOT/RunningAverage"),n=1048576,r=!1,s=function(){function t(e){_classCallCheck(this,t),e=_.extend({windowSize:2e3,memoryLimit:phet.chipper.queryParameters.memoryLimit},e),this.memoryLimit=e.memoryLimit*n,this.runningAverage=new i(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()&&!r&&i>this.memoryLimit&&e>.5*this.memoryLimit)throw r=!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/n)+"MB"}}]),t}();return e.register("MemoryMonitor",s)}),i("JOIST/HighlightNode",["require","SCENERY/util/Color","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","SCENERY/util/LinearGradient","SCENERY/nodes/Rectangle"],function(t){"use strict";function e(t,e,r){var s=(r=_.extend({fill:"white",highlightWidth:1,pickable:!1},r)).fill,l=i.toColor(s).withAlpha(0),h={fill:new a(0,0,0,e).addColorStop(0,l).addColorStop(.5,s).addColorStop(1,l)},u=new o(0,0,r.highlightWidth,e,h),c=new o(0,0,r.highlightWidth,e,h);r.children=[u,c],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"),a=t("SCENERY/util/LinearGradient"),o=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","SCENERY/nodes/Node","AXON/Property","SUN/buttons/PushButtonInteractionStateProperty","SUN/buttons/PushButtonModel","KITE/Shape"],function(t){"use strict";function e(t,e,s,a){(a=_.extend({cursor:"pointer",listener:null,highlightExtensionWidth:0,highlightExtensionHeight:0,highlightCenterOffsetX:0,highlightCenterOffsetY:0},a)).tandem=s,this.buttonModel=new u(a);var d=function(e){return new r(t.width+a.highlightExtensionWidth,t.height+a.highlightExtensionHeight,{centerX:t.centerX+a.highlightCenterOffsetX,centerY:t.centerY+a.highlightCenterOffsetY,fill:e,pickable:!1})},p=d("white"),f=d("black");o.call(this,_.extend({children:[t,p,f]}));var m=new h(this.buttonModel);this.interactionStateProperty=m,l.multilink([m,e],function(t,e){var n="black"!==e;p.visible=!n&&(t===i.OVER||t===i.PRESSED),f.visible=n&&(t===i.OVER||t===i.PRESSED)});var g=this.buttonModel.createListener({tandem:s.createTandem("pressListener")});this.addInputListener(g),this.mouseArea=this.touchArea=c.bounds(this.bounds),this.mutate(a);var E=n.getOuterLineWidthFromNode(this);this.focusHighlight=c.bounds(this.bounds.shiftedY(-E))}var i=t("SUN/buttons/ButtonInteractionState"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("SCENERY/nodes/Node"),l=t("AXON/Property"),h=t("SUN/buttons/PushButtonInteractionStateProperty"),u=t("SUN/buttons/PushButtonModel"),c=t("KITE/Shape");return a.register("JoistButton",e),s(o,e)}),i("SUN/DialogIO",["require","SCENERY/nodes/NodeIO","TANDEM/phetioInherit","SUN/sun"],function(t){"use strict";function e(t,e){i.call(this,t,e)}var i=t("SCENERY/nodes/NodeIO"),n=t("TANDEM/phetioInherit"),r=t("SUN/sun");return n(i,"DialogIO",e,{},{documentation:"A dialog panel",validator:{isValidValue:function(t){return t instanceof phet.sun.Dialog}}}),r.register("DialogIO",e),e}),i("SUN/SunA11yStrings",["require","SUN/sun"],function(t){"use strict";var e=t("SUN/sun"),i={accordionBoxCollapse:{value:"Collapse"},accordionBoxExpand:{value:"Expand"},numberSpinnerRoleDescription:{value:"number spinner"},close:{value:"Close"}};if("xss"===phet.chipper.queryParameters.stringTest)for(var n in i)i[n].value+='';return e.register("SunA11yStrings",i),i}),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","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=_.extend({xSpacing:10,ySpacing:10,topMargin:15,bottomMargin:15,leftMargin:null,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,tandem:S.optional,phetioType:o,phetioReadOnly:!1,phetioState:!1,tagName:"div",ariaRole:"dialog",focusOnCloseNode:null,addAriaLabelledByFromTitle:!0},c)).tandem=S.optional,c.xMargin=0,c.yMargin=0,null===c.leftMargin&&(c.leftMargin=c.xSpacing+A+c.closeButtonRightMargin),this.isModal=c.modal,this.showCallback=c.showCallback,this.hideCallback=c.hideCallback,this.isShowingProperty=new a(!1,{tandem:c.tandem.createTandem("isShowingProperty"),phetioReadOnly:!0,phetioState:c.phetioState});var g=new i({iconLength:A,listener:function(){c.closeButtonListener(),g.buttonModel.isA11yClicking()&&f.focusActiveElement()},tandem:c.tandem.createTandem("closeButton"),phetioReadOnly:c.phetioReadOnly,phetioState:c.phetioState,tagName:"button",innerContent:C});g.touchArea=g.bounds.dilatedXY(c.closeButtonTouchAreaXDilation,c.closeButtonTouchAreaYDilation),g.mouseArea=g.bounds.dilatedXY(c.closeButtonMouseAreaXDilation,c.closeButtonMouseAreaYDilation),this.closeButton=g;var E=new T({children:c.title?[c.title,t]:[t],spacing:c.ySpacing,align:c.titleAlign}),y=new s(E,{topMargin:c.topMargin,bottomMargin:c.bottomMargin,leftMargin:c.leftMargin}),v=new s(g,{topMargin:c.closeButtonTopMargin,rightMargin:c.closeButtonRightMargin}),b=new u({children:[y,v],spacing:c.xSpacing,align:"top"});p.call(this,b,c);var N=window.phet.joist.sim;this.updateLayoutMultilink=m.multilink([N.boundsProperty,N.screenBoundsProperty,N.scaleProperty],function(t,e,i){t&&e&&i&&c.layoutStrategy(f,t,e,i)}),this.sim=N,this.accessibleOrder=[g,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(),g.dispose(),b.removeAllChildren(),b.detach()}}function i(t){t=_.extend({iconLength:7,baseColor:"transparent",buttonAppearanceStrategy:g.FlatAppearanceStrategy,xMargin:0,yMargin:0,listener:null},t);var e=(new y).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}),E.call(this,t)}var n=t("SCENERY/accessibility/AccessibilityUtil"),r=t("SCENERY/accessibility/AccessiblePeer"),s=t("SCENERY/nodes/AlignBox"),a=t("AXON/BooleanProperty"),o=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("SUN/Panel"),f=t("SCENERY/nodes/Path"),m=t("AXON/Property"),g=t("SUN/buttons/RectangularButtonView"),E=t("SUN/buttons/RectangularPushButton"),y=t("KITE/Shape"),v=t("SUN/sun"),b=t("SUN/SunA11yStrings"),S=t("TANDEM/Tandem"),T=t("SCENERY/nodes/VBox"),C=b.close.value,A=14;return v.register("Dialog",e),e.DEFAULT_LAYOUT_STRATEGY=function(t,e,i,n){t.center=e.center.times(1/n)},c(p,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(),p.prototype.dispose.call(this)},focusActiveElement:function(){this.activeElement&&this.activeElement.focus()},focusCloseButton:function(){this.closeButton.focus()}}),c(E,i),e}),i("SCENERY/nodes/AlignGroup",["require","SCENERY/nodes/AlignBox","PHET_CORE/arrayRemove","DOT/Bounds2","PHET_CORE/inherit","SCENERY/nodes/Node","AXON/NumberProperty","SCENERY/scenery"],function(t){"use strict";function e(t){t=_.extend({matchHorizontal:!0,matchVertical:!0},t),this._alignBoxes=[],this._matchHorizontal=t.matchHorizontal,this._matchVertical=t.matchVertical,this._resizeLock=!1,this._maxWidthProperty=new a(0),this._maxHeightProperty=new a(0),this.id=o++}var i=t("SCENERY/nodes/AlignBox"),n=t("PHET_CORE/arrayRemove"),r=t("DOT/Bounds2"),s=t("PHET_CORE/inherit"),a=(t("SCENERY/nodes/Node"),t("AXON/NumberProperty")),o=1;return t("SCENERY/scenery").register("AlignGroup",e),s(Object,e,{getMaxWidth:function(){return this._maxWidthProperty.value},get maxWidth(){return this.getMaxWidth()},getMaxWidthProperty:function(){return this._maxWidthProperty},get maxWidthProperty(){return this.getMaxWidthProperty()},getMaxHeight:function(){return this._maxHeightProperty.value},get maxHeight(){return this.getMaxHeight()},getMaxHeightProperty:function(){return this._maxHeightProperty},get maxHeightProperty(){return this.getMaxHeightProperty()},createBox:function(t,e){return new i(t,_.extend({group:this},e))},setMatchHorizontal:function(t){return this._matchHorizontal!==t&&(this._matchHorizontal=t,this.updateLayout()),this},set matchHorizontal(t){this.setMatchHorizontal(t)},getMatchHorizontal:function(){return this._matchHorizontal},get matchHorizontal(){return this.getMatchHorizontal()},setMatchVertical:function(t){return this._matchVertical!==t&&(this._matchVertical=t,this.updateLayout()),this},set matchVertical(t){this.setMatchVertical(t)},getMatchVertical:function(){return this._matchVertical},get matchVertical(){return this.getMatchVertical()},dispose:function(){for(var t=this._alignBoxes.length-1;t>=0;t--)this._alignBoxes[t].dispose()},updateLayout:function(){if(!this._resizeLock){this._resizeLock=!0;for(var t=0,e=0,i=0;i0&&e>0)for(i=0;il&&(r=l/t.height);var h=new s({children:[t],scale:r}),u=Math.max(e.minKeyWidth,h.width+e.xPadding);if(e.forceSquareKey){var c=e.minKeyWidth-e.xPadding,d=1;t.width>c&&(d=c/t.width),h=new s({children:[h],scale:d}),u=e.keyHeight}var p=new i(h,{alignBounds:new n(0,0,u,e.keyHeight),xAlign:e.xAlign,yAlign:e.yAlign,xMargin:e.xMargin,yMargin:e.yMargin});e.children=[a.roundedBounds(p.bounds.shifted(e.xShadowOffset,e.yShadowOffset),e.cornerRadius,e.cornerRadius,{fill:e.keyShadowFill}),a.roundedBounds(p.bounds,e.cornerRadius,e.cornerRadius,{fill:e.keyFill,stroke:"black",lineWidth:e.lineWidth}),p],s.call(this,e)}var i=t("SCENERY/nodes/AlignBox"),n=t("DOT/Bounds2"),r=t("PHET_CORE/inherit"),s=t("SCENERY/nodes/Node"),a=t("SCENERY/nodes/Rectangle"),o={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(s,e)}),i("SCENERY_PHET/keyboard/ArrowKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t,e){var i=(e=_.extend({arrowFill:"black",arrowStroke:"black",arrowLineJoin:"round",arrowLineWidth:3,arrowHeight:o,arrowWidth:l,yPadding:10,forceSquareKey:!0},e)).arrowHeight,s=e.arrowWidth,u=e.arrowLineJoin,c=e.arrowLineWidth,d=e.arrowFill,p=e.arrowStroke,f=new a;f.moveTo(i/2,0).lineTo(i,s+0).lineTo(0,s+0).close();var m=new r(f,{fill:d,stroke:p,lineJoin:u,lineWidth:c,rotation:h[t]});n.call(this,m,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/keyboard/KeyNode"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape"),o=10,l=.6*Math.sqrt(3)*o,h={up:0,down:Math.PI,left:-Math.PI/2,right:Math.PI/2};return s.register("ArrowKeyNode",e),i(n,e)}),i("SCENERY_PHET/keyboard/TextKeyNode",["require","PHET_CORE/inherit","SCENERY_PHET/keyboard/KeyNode","SCENERY_PHET/PhetFont","SCENERY/nodes/RichText","SCENERY_PHET/sceneryPhet"],function(t){"use strict";function e(t,e){e=_.extend({font:new r({size:12}),fill:"black",textMaxWidth:35,xPadding:8},e);var i=new s(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("SCENERY_PHET/PhetFont"),s=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","SCENERY_PHET/sceneryPhet","SCENERY_PHET/keyboard/TextKeyNode"],function(t){"use strict";function e(t,e){e=_.extend({xPadding:5,forceSquareKey:!0},e),r.call(this,t,e)}var i=t("PHET_CORE/inherit"),n=t("SCENERY_PHET/sceneryPhet"),r=t("SCENERY_PHET/keyboard/TextKeyNode");return n.register("LetterKeyNode",e),i(r,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","SCENERY/nodes/Path","SCENERY_PHET/sceneryPhet","KITE/Shape"],function(t){"use strict";function e(t){var e=(t=_.extend({size:new i(20,5),fill:"black"},t)).size.width/2-t.size.height/2,n=t.size.width/2+t.size.height/2,s=(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();r.call(this,s,t)}var i=t("DOT/Dimension2"),n=t("PHET_CORE/inherit"),r=t("SCENERY/nodes/Path"),s=t("SCENERY_PHET/sceneryPhet"),a=t("KITE/Shape");return s.register("PlusNode",e),n(r,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","SCENERY_PHET/keyboard/PageDownKeyNode","SCENERY_PHET/keyboard/PageUpKeyNode","SCENERY_PHET/PhetFont","SCENERY_PHET/PlusNode","SCENERY_PHET/sceneryPhet","SCENERY_PHET/SceneryPhetA11yStrings","SCENERY_PHET/keyboard/ShiftKeyNode","SCENERY_PHET/keyboard/SpaceKeyNode","PHETCOMMON/util/StringUtils","SCENERY/nodes/Text","SCENERY/nodes/RichText","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=_.extend({headingContentSpacing:N,headingFont:w,headingMaxWidth:D,labelMaxWidth:x,align:P,a11yContentTagName:"ul"},i);for(var n=new y(t,{font:i.headingFont,maxWidth:i.headingMaxWidth,tagName:"h2",innerContent:t}),r=[],s=[],o=0;o0)&&(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","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,d=null;(r=_.extend({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:2,tagName:"button",innerContent:u},r)).listener=function(){d||(d=new o(t,{focusOnCloseNode:s,tandem:n.createTandem("keyboardHelpDialog")})),d.show(),s.buttonModel.isA11yClicking()&&d.focusCloseButton()};var p=new i(l,{scale:c,pickable:!1});a.call(this,p,e,n,r),e.link(function(t){p.image="black"===t?l:h})}var i=t("SCENERY/nodes/Image"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),a=t("JOIST/JoistButton"),o=t("JOIST/KeyboardHelpDialog"),l=t("mipmap!JOIST/keyboard-icon.png"),h=t("mipmap!JOIST/keyboard-icon-on-white.png"),u=s.hotKeysAndHelp.value,c=.3/l[0].height*67;return r.register("KeyboardHelpButton",e),n(a,e)}),i("JOIST/NavigationBarSoundToggleButton",["require","SCENERY_PHET/accessibility/ActivationUtterance","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","SCENERY/nodes/Node","SCENERY/nodes/Path","SCENERY/nodes/Rectangle","KITE/Shape","SUN/ToggleNode","SCENERY_PHET/accessibility/utteranceQueue","DOT/Vector2"],function(t){"use strict";function e(t,e,n,r){var s=this;r=_.extend({highlightExtensionWidth:5,highlightExtensionHeight:10,highlightCenterOffsetY:0,listener:function(){t.set(!t.get())},tagName:"button",innerContent:f},r);var P=new o,D=new o,k=new h(0,0,y,E,{fill:"transparent"});P.addChild(k),D.addChild(k);var M=new l((new u).moveTo(b,0).lineTo(S,C).lineTo(A,C).arc(A,C+A,A,1.5*Math.PI,Math.PI,!0).lineToRelative(0,T-2*A).arc(A,C+T-A,A,Math.PI,.5*Math.PI,!0).lineToRelative(S-A,0).lineTo(b,v).lineTo(b,0).close(),{stroke:"black",lineWidth:1.5,lineJoin:"round",centerY:D.centerY,left:0});P.addChild(M),D.addChild(M);var q=new l((new u).moveTo(0,0).lineTo(N,N).moveTo(0,N).lineTo(N,0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:D.width,centerY:D.centerY});D.addChild(q);var L=new l((new u).arc(0,0,w,I,x,!0).moveToPoint(new p(R,0).rotated(I)).arc(0,0,R,I,x,!0).moveToPoint(new p(O,0).rotated(I)).arc(0,0,O,I,x,!0),{stroke:"black",lineWidth:1.7,lineCap:"round",right:P.width,centerY:P.centerY});P.addChild(L);var Y=new c(t,[{value:!0,node:P},{value:!1,node:D}],{maxHeight:E});a.call(this,Y,e,n,r);var B=new i;t.lazyLink(function(t){s.setAccessibleAttribute("aria-pressed",!t),B.alert=t?m:g,d.addToBack(B)}),this.setAccessibleAttribute("aria-pressed",!t.get()),e.link(function(t){var e="black"===t?"white":"black";M.stroke=e,q.stroke=e,L.stroke=e})}var i=t("SCENERY_PHET/accessibility/ActivationUtterance"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/JoistA11yStrings"),a=t("JOIST/JoistButton"),o=t("SCENERY/nodes/Node"),l=t("SCENERY/nodes/Path"),h=t("SCENERY/nodes/Rectangle"),u=t("KITE/Shape"),c=t("SUN/ToggleNode"),d=t("SCENERY_PHET/accessibility/utteranceQueue"),p=t("DOT/Vector2"),f=s.soundOnOffButton.value,m=s.simSoundOnString.value,g=s.simSoundOffString.value,E=22,y=1.13*E,v=.77*E,b=.58*v,S=.46*b,T=.35*v,C=(v-T)/2,A=1,N=.52*v,w=.63*v,P=.23*v,R=w-P,O=R-P,I=Math.PI/2.7,x=-1*I;return r.register("NavigationBarSoundToggleButton",e),n(a,e)}),i("JOIST/A11yButtonsHBox",["require","SCENERY/nodes/HBox","PHET_CORE/inherit","JOIST/joist","JOIST/KeyboardHelpButton","JOIST/NavigationBarSoundToggleButton","PHET_CORE/platform","TAMBO/soundManager","TANDEM/Tandem"],function(t){"use strict";function e(t,e,n,r){r=_.extend({align:"center",spacing:6},r);var u=[];if(t.supportsSound){var c=new a(l.enabledProperty,e,h.optional);u.push(c)}phet.chipper.accessibility&&t.keyboardHelpNode&&!o.mobileSafari&&(this.keyboardHelpButton=new s(t.keyboardHelpNode,e,n.createTandem("keyboardHelpButton")),u.push(this.keyboardHelpButton)),r.children=u,i.call(this,r)}var i=t("SCENERY/nodes/HBox"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/KeyboardHelpButton"),a=t("JOIST/NavigationBarSoundToggleButton"),o=t("PHET_CORE/platform"),l=t("TAMBO/soundManager"),h=t("TANDEM/Tandem");return r.register("A11yButtonsHBox",e),n(i,e)}),i("JOIST/HomeButton",["require","SUN/buttons/ButtonInteractionState","SCENERY/accessibility/FocusHighlightPath","SUN/FontAwesomeNode","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","JOIST/JoistButton","SCENERY/nodes/Node","AXON/Property","SCENERY/nodes/Rectangle","KITE/Shape"],function(t){"use strict";function e(t,e,s,a){a=_.extend({highlightExtensionWidth:4,listener:null,tagName:"button",innerContent:p,containerTagName:"li",descriptionContent:m,appendDescription:!0},a);var o=new r("home");o.setScaleMagnitude(.48*t/o.height);var g=new c(0,0,o.width+12,t);o.center=g.center;var E=new h({children:[g,o]});l.call(this,E,e,s,a);var y=n.getOuterLineWidthFromNode(this);this.focusHighlight=d.bounds(this.bounds.setMaxY(this.bounds.maxY-y/2)),this.setAccessibleAttribute("aria-roledescription",f),u.multilink([this.interactionStateProperty,e],function(t,e){o.fill="black"===e?t===i.PRESSED?"gray":"white":t===i.PRESSED?"#444":"#222"})}var i=t("SUN/buttons/ButtonInteractionState"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("SUN/FontAwesomeNode"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("JOIST/JoistA11yStrings"),l=t("JOIST/JoistButton"),h=t("SCENERY/nodes/Node"),u=t("AXON/Property"),c=t("SCENERY/nodes/Rectangle"),d=t("KITE/Shape"),p=o.home.value,f=o.homeScreen.value,m=o.homeScreenDescription.value;return a.register("HomeButton",e),s(l,e)}),i("JOIST/NavigationBarScreenButton",["require","AXON/DerivedProperty","SCENERY/accessibility/FocusHighlightPath","JOIST/HighlightNode","PHET_CORE/inherit","JOIST/joist","JOIST/JoistA11yStrings","SCENERY/nodes/Node","SCENERY_PHET/PhetColorScheme","SCENERY_PHET/PhetFont","AXON/Property","SUN/buttons/PushButtonModel","SCENERY/nodes/Rectangle","KITE/Shape","PHETCOMMON/util/StringUtils","TANDEM/Tandem","SCENERY/nodes/Text","DOT/Util","SCENERY/nodes/VBox"],function(t){"use strict";function e(t,e,s,a,o,T){var C=s.indexOf(a);T=_.extend({cursor:"pointer",tandem:g.required,phetioDocumentation:"Button in the navigation bar that selects the '"+a.screenTandem.tail+"' screen",maxButtonWidth:null,tagName:"button",containerTagName:"li",descriptionContent:a.descriptionContent,appendDescription:!0,innerContent:m.fillIn(S,{number:C+1})},T),l.call(this);var A=new l({children:[a.navigationBarIcon],maxHeight:.625*o,tandem:T.tandem.createTandem("icon")}),N=new p(0,0,A.width,A.height),w=new l({children:[A,N]}),P=new i([e],function(t){return t===s.indexOf(a)});this.buttonModel=new d({listener:function(){e.value=C},tandem:T.tandem});var R=this.buttonModel.createListener({tandem:T.tandem.createTandem("pressListener"),phetioDocumentation:"Indicates when the screen button has been pressed or released"});this.addInputListener(R);var O=new E(a.name,{font:new u(10),tandem:T.tandem.createTandem("text")}),I=new y({children:[w,O],pickable:!1,spacing:Math.max(0,12-O.height),usesOpacity:!0,maxHeight:o}),x=new p(0,0,I.width,I.height,{center:I.center}),D=x.width+2*v,k=new r(D,x.height,{center:I.center,fill:"white"}),M=new r(D,x.height,{center:I.center,fill:"black"});this.addChild(I),this.addChild(x),this.addChild(k),this.addChild(M),c.multilink([P,this.buttonModel.looksPressedProperty,this.buttonModel.overProperty,t],function(t,e,i,n){var r="black"!==n,s=r?"black":h.BUTTON_YELLOW,o=r?"gray":"white";O.fill=t?s:o,I.opacity=t?1:e?.65:.5,k.visible=!r&&(i||e),M.visible=r&&(i||e);var l=null;"black"===a.showScreenIconFrameForNavigationBarFill&&"black"===n?l=h.SCREEN_ICON_FRAME:"white"===a.showScreenIconFrameForNavigationBarFill&&"white"===n&&(l="black"),N.stroke=l}),T.maxButtonWidth&&this.width>T.maxButtonWidth?(O.maxWidth=A.maxWidth=T.maxButtonWidth-(this.width-I.width),x.setRect(0,0,I.width,x.height),x.center=I.center,k.spacing=M.spacing=x.width+2*v,k.center=M.center=I.center):O.maxWidth=this.width,this.setAccessibleAttribute("aria-roledescription",b);var q=n.getOuterLineWidthFromNode(this);this.focusHighlight=f.bounds(this.bounds.setMinY(this.bounds.minY-q/2)),this.mutate(T)}var i=t("AXON/DerivedProperty"),n=t("SCENERY/accessibility/FocusHighlightPath"),r=t("JOIST/HighlightNode"),s=t("PHET_CORE/inherit"),a=t("JOIST/joist"),o=t("JOIST/JoistA11yStrings"),l=t("SCENERY/nodes/Node"),h=t("SCENERY_PHET/PhetColorScheme"),u=t("SCENERY_PHET/PhetFont"),c=t("AXON/Property"),d=t("SUN/buttons/PushButtonModel"),p=t("SCENERY/nodes/Rectangle"),f=t("KITE/Shape"),m=t("PHETCOMMON/util/StringUtils"),g=t("TANDEM/Tandem"),E=t("SCENERY/nodes/Text"),y=(t("DOT/Util"),t("SCENERY/nodes/VBox")),v=4,b=o.simScreen.value,S=o.screenNumberPattern.value;return a.register("NavigationBarScreenButton",e),s(l,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","TANDEM/phetioInherit","AXON/PropertyIO"],function(t){"use strict";function e(t,e){a.call(this,t,e);var n=new r(t,"pickability","pickable",{phetioReadOnly:t.phetioReadOnly,tandem:t.tandem.createTandem("pickableProperty"),phetioType:l(s(i)),phetioDocumentation:"Set whether the phetButton will be pickable (and hence interactive), see the NodeIO documentation for more details"});this.disposePhetButtonIO=function(){n.dispose()}}var i=t("TANDEM/types/BooleanIO"),n=t("JOIST/joist"),r=t("SCENERY/util/NodeProperty"),s=t("TANDEM/types/NullableIO"),a=t("TANDEM/types/ObjectIO"),o=t("TANDEM/phetioInherit"),l=t("AXON/PropertyIO");o(a,"PhetButtonIO",e,{dispose:function(){this.disposePhetButtonIO()}},{documentation:"The PhET Button in the bottom right of the screen",validator:{isValidValue:function(t){return t instanceof phet.joist.PhetButton}},toStateObject:function(){},fromStateObject:function(t){return t}}),n.register("PhetButtonIO",e);return function t(){_classCallCheck(this,t)}.hello="true",e}),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","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=_.extend({align:"left",spacing:1,maxWidth:550},e);var i=new r({size:14,weight:"bold"}),n={font:new r(12),align:"left",lineWrap:e.maxWidth,tagName:"p"},b=[];if(b.push(new o(y,{font:i,tagName:"h2",innerContent:y})),t.leadDesign){var S=a.format(d,"‪"+t.leadDesign+"‬");b.push(new s(S,_.extend({innerContent:S},n)))}if(t.softwareDevelopment){var T=a.format(f,"‪"+t.softwareDevelopment+"‬");b.push(new s(T,_.extend({innerContent:T},n)))}if(t.team){var C=a.format(g,"‪"+t.team+"‬");b.push(new s(C,_.extend({innerContent:C},n)))}if(t.contributors){var A=a.format(u,"‪"+t.contributors+"‬");b.push(new s(A,_.extend({innerContent:A},n)))}if(t.qualityAssurance){var N=a.format(p,"‪"+t.qualityAssurance+"‬");b.push(new s(N,_.extend({innerContent:N},n)))}if(t.graphicArts){var w=a.format(c,"‪"+t.graphicArts+"‬");b.push(new s(w,_.extend({innerContent:w},n)))}if(t.soundDesign){var P=a.format(m,"‪"+t.soundDesign+"‬");b.push(new s(P,_.extend({innerContent:P},n)))}if(t.translation&&(b.length>0&&b.push(new h(10)),b.push(new o(v,{font:i,tagName:"h2",innerContent:v})),b.push(new s(t.translation,n))),t.thanks){b.length>0&&b.push(new h(10)),b.push(new o(E,{font:i,tagName:"h2",innerContent:E}));var R=new s(t.thanks,n);R.innerContent=t.thanks,b.push(R)}e.children=b,l.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("SCENERY_PHET/PhetFont"),s=t("SCENERY/nodes/RichText"),a=t("PHETCOMMON/util/StringUtils"),o=t("SCENERY/nodes/Text"),l=t("SCENERY/nodes/VBox"),h=t("SCENERY/nodes/VStrut"),u=t("string!JOIST/credits.contributors"),c=t("string!JOIST/credits.graphicArts"),d=t("string!JOIST/credits.leadDesign"),p=t("string!JOIST/credits.qualityAssurance"),f=t("string!JOIST/credits.softwareDevelopment"),m=t("string!JOIST/credits.soundDesign"),g=t("string!JOIST/credits.team"),E=t("string!JOIST/credits.thanks"),y=t("string!JOIST/credits.title"),v=t("string!JOIST/credits.translation");return n.register("CreditsNode",e),i(l,e,{dispose:function(){this.disposeCreditsNode(),l.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/SimVersion",["require","PHET_CORE/inherit","JOIST/joist"],function(t){"use strict";function e(t){this.major=t.major,this.minor=t.minor,this.maintenance=t.maintenance,this.suffix=t.suffix,this.buildTimestamp=t.buildTimestamp}var i=t("PHET_CORE/inherit");return t("JOIST/joist").register("SimVersion",e),i(Object,e,{compare:function(t){return this.majort.major?1:this.minort.minor?1:this.maintenancet.maintenance?1:0},get isSimNotPublished(){return this.major<1||1===this.major&&0===this.minor&&0===this.maintenance&&this.suffix},toString:function(){return this.major+"."+this.minor+"."+this.maintenance+(this.suffix?"-"+this.suffix:"")}},{parse:function(t,i){var n=t.match(/(\d+)\.(\d+)\.(\d+)(-(.+))?/);if(!n)throw new Error("could not parse version: "+t);return new e({major:parseInt(n[1],10),minor:parseInt(n[2],10),maintenance:parseInt(n[3],10),suffix:n[5],buildTimestamp:i})}})}),i("JOIST/UpdateCheck",["require","BRAND/Brand","PHET_CORE/inherit","JOIST/joist","JOIST/packageJSON","AXON/Property","JOIST/SimVersion"],function(t){"use strict";function e(){this.stateProperty=new a("unchecked",{validValues:["up-to-date","out-of-date","checking","offline","unchecked"]}),this.latestVersionProperty=new a(null),this.ourVersion=h,this.timeoutCallback=this.timeout.bind(this)}var i=t("BRAND/Brand"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/packageJSON"),a=t("AXON/Property"),o=t("JOIST/SimVersion"),l=s.name,h=o.parse(s.version,phet.chipper.buildTimestamp),u="https:"===document.location.protocol?"https:":"http:";n(Object,e,{areUpdatesChecked:"phet"===i.id&&!i.isPhetApp,updateURL:"http://phet.colorado.edu/html-sim-update?simulation="+encodeURIComponent(l)+"&version="+encodeURIComponent(h.toString())+"&buildTimestamp="+encodeURIComponent(""+phet.chipper.buildTimestamp),timeoutId:-1,timeoutMilliseconds:15e3,clearTimeout:function(){window.clearTimeout(this.timeoutId)},setTimeout:function(){this.timeoutId=window.setTimeout(this.timeoutCallback,this.timeoutMilliseconds)},resetTimeout:function(){"checking"===this.stateProperty.value&&(this.clearTimeout(),this.setTimeout())},timeout:function(){this.stateProperty.value="offline"},check:function(){var t=this;if(this.areUpdatesChecked&&("unchecked"===t.stateProperty.value||"offline"===t.stateProperty.value))if(this.ourVersion.isSimNotPublished)t.stateProperty.value="up-to-date";else{var e=new XMLHttpRequest;"withCredentials"in e&&(t.stateProperty.value="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="offline"):(t.updateURL&&(t.updateURL=i.updateURL),t.latestVersion=o.parse(i.latestVersion,i.buildTimestamp),"out-of-date"===i.state||"up-to-date"===i.state?t.stateProperty.value=i.state:(console.log("Failed to get proper state: "+i.state),t.stateProperty.value="offline"))}catch(e){t.stateProperty.value="offline"}},e.onerror=function(){t.clearTimeout(),t.stateProperty.value="offline"},e.open("post",u+"//phet.colorado.edu/services/check-html-updates",!0),e.send(JSON.stringify({api:"1.0",simulation:l,locale:phet.joist.sim.locale,currentVersion:t.ourVersion.toString(),buildTimestamp:phet.chipper.buildTimestamp})))}}});var c=new e;return r.register("UpdateCheck",c),c}),i("SCENERY_PHET/SpinningIndicatorNode",["require","SCENERY/nodes/Circle","SCENERY/util/Color","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY/util/PaintColorProperty","SCENERY/nodes/Rectangle","SCENERY_PHET/sceneryPhet","TANDEM/Tandem"],function(t){"use strict";function e(t){h.indicateUninstrumentedCode(),t=_.extend({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,s.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'+v+"",{links:{url:c.updateURL},font:T})],tagName:"div"},t))},createOutOfDateDialogNode:function(t,e,n,s){return new d(_.extend({spacing:15,maxWidth:550,children:[new d({spacing:5,align:"left",children:[new h(l.format(g,n),{font:new r(16),fontWeight:"bold"}),new h(l.format(S,e),{font:T})]}),new i({spacing:25,children:[new u(m,{baseColor:"#6f6",font:T,listener:function(){var t=window.open(c.updateURL,"_blank");t&&t.focus()}}),new u(E,{baseColor:"#ddd",font:T,listener:function(){t.hide()}})]})]},s))},createOfflineNode:function(t){return new i(_.extend({spacing:0,maxWidth:550,children:[new p(20),new h(y,{font:new r(t.big?16:14),fontWeight:t.big?"bold":"normal"})],tagName:"p",innerContent:y},t))}};return n.register("UpdateNodes",C),C}),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","SCENERY/nodes/VBox","SCENERY/nodes/VStrut","string!JOIST/versionPattern"],function(t){"use strict";function e(t,e,s,a,p,S){var T=[],C=new d(t,{font:new h(28),maxWidth:v,tagName:"h1",innerContent:t});T.push(C);var A=c.format(y,e);if(T.push(new d(A,{font:new h(20),maxWidth:v,tagName:"p",innerContent:A})),phet.chipper.buildTimestamp&&T.push(new d(phet.chipper.buildTimestamp,{font:new h(13),maxWidth:v,tagName:"p",innerContent:phet.chipper.buildTimestamp})),f.areUpdatesChecked){var N={left:0,top:0},w=m.createCheckingNode(N),_=m.createUpToDateNode(N),P=m.createOutOfDateAboutNode(N),R=m.createOfflineNode(N);this.updateStepListener=w.stepListener,this.updateVisibilityListener=function(t){w.visible="checking"===t,_.visible="up-to-date"===t,P.visible="out-of-date"===t,R.visible="offline"===t,w.accessibleContentDisplayed=w.visible,_.accessibleContentDisplayed=_.visible,P.accessibleContentDisplayed=P.visible,R.accessibleContentDisplayed=R.visible},T.push(new o({children:[w,_,P,R],maxWidth:v}))}var O=[];if(a.name&&O.push(new u(a.name,{font:new h(16),supScale:.5,supYOffset:2,maxWidth:v,tagName:"h2",innerContent:a.name})),a.copyright){var I=phet.chipper.buildTimestamp?phet.chipper.buildTimestamp.split("-")[0]:(new Date).getFullYear(),x=c.fillIn(a.copyright,{year:I});O.push(new d(x,{font:new h(12),maxWidth:v,tagName:"p",innerContent:x}))}a.additionalLicenseStatement&&(this.additionalLicenseStatement=new u(a.additionalLicenseStatement,{font:new h(10),fill:"gray",align:"left",maxWidth:v,tagName:"p",innerContent:a.additionalLicenseStatement}),O.push(this.additionalLicenseStatement)),O.length>0&&(T.push(new E(15)),T=T.concat(O)),!s||"phet"!==a.id&&"phet-io"!==a.id||(T.push(new E(15)),this.creditsNode=new n(s,{maxWidth:v}),T.push(this.creditsNode));var D=a.getLinks(l.name,p);if(D&&D.length>0){T.push(new E(15));for(var k=0;k'+M.text+"",{links:{url:M.url},font:new h(14),maxWidth:v}))}}var q=new g({align:"left",spacing:5,children:T,tagName:"div"});r.call(this,q,{focusOnCloseNode:S,xSpacing:20,topMargin:20,bottomMargin:20,leftMargin:20,rightMargin:20,maxHeight:464-2*b,layoutStrategy:function(t,e,i,n){t.center=i.center.times(1/n)}}),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"),a=t("JOIST/joist"),o=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"),f=t("JOIST/UpdateCheck"),m=t("JOIST/UpdateNodes"),g=t("SCENERY/nodes/VBox"),E=t("SCENERY/nodes/VStrut"),y=t("string!JOIST/versionPattern"),v=550,b=12;return a.register("AboutDialog",e),s(r,e,{show:function(){f.areUpdatesChecked&&!this.isShowingProperty.value&&(f.resetTimeout(),"offline"!==f.stateProperty.value&&"unchecked"!==f.stateProperty.value||f.check(),p.addListener(this.updateStepListener),f.stateProperty.link(this.updateVisibilityListener)),r.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(r.prototype.hide.call(this),f.areUpdatesChecked&&(f.stateProperty.unlink(this.updateVisibilityListener),p.removeListener(this.updateStepListener)))},dispose:function(){this.disposeAboutDialog(),r.prototype.dispose.call(this)}})}),i("SUN/MenuItem",["require","SCENERY/accessibility/AccessibilityUtil","SCENERY/listeners/FireListener","SUN/FontAwesomeNode","PHET_CORE/inherit","SCENERY/nodes/Node","SCENERY_PHET/PhetFont","TANDEM/PhetioObject","SCENERY/nodes/Rectangle","SUN/sun","TANDEM/Tandem","SCENERY/nodes/Text"],function(t){"use strict";function e(t,e,r,s,u,C){var A=this;C=_.extend({cursor:"pointer",tandem:c.optional,textFill:"black",phetioDocumentation:"Item buttons shown in a popup menu",phetioEventType:l.EventType.USER,tagName:"button",focusAfterCallback:!1,containerTagName:"li",containerAriaRole:"none",innerContent:s,ariaRole:"menuitem"},C),a.call(this);var N=new d(s,{font:new o(f),fill:C.textFill,maxWidth:g}),w=new h(0,0,t+v+b+y,e+S+S,T,T);this.addChild(w),this.addChild(N),N.left=w.left+v+y,N.centerY=w.centerY,this.addInputListener({enter:function(){w.fill=m},exit:function(){w.fill=null}});var P=function(t){r(t),u(t)};this.addInputListener(new n({tandem:C.tandem.createTandem("inputListener"),fire:P})),this.separatorBefore=C.separatorBefore;var R;if(C.checkedProperty){var O=new a({children:[p],right:N.left-E,centerY:N.centerY});R=function(t){O.visible=t},C.checkedProperty.link(R),this.addChild(O)}var I={click:function(t){P();var e=phet.joist.display.accessibleDOMElement;C.focusAfterCallback&&i.getNextFocusable(e).focus()}};this.addInputListener(I),this.mutate(C),this.disposeMenuItem=function(){C.checkedProperty&&C.checkedProperty.unlink(R),A.removeInputListener(I)}}var i=t("SCENERY/accessibility/AccessibilityUtil"),n=t("SCENERY/listeners/FireListener"),r=t("SUN/FontAwesomeNode"),s=t("PHET_CORE/inherit"),a=t("SCENERY/nodes/Node"),o=t("SCENERY_PHET/PhetFont"),l=t("TANDEM/PhetioObject"),h=t("SCENERY/nodes/Rectangle"),u=t("SUN/sun"),c=t("TANDEM/Tandem"),d=t("SCENERY/nodes/Text"),p=new r("check",{fill:"rgba(0,0,0,0.7)",scale:.4}),f=18,m="#a6d2f4",g=400,E=2,y=p.width+E,v=2,b=5,S=3,T=5;return u.register("MenuItem",e),s(a,e,{dispose:function(){this.disposeMenuItem(),a.prototype.dispose.call(this)}})}),i("JOIST/OptionsDialogIO",["require","SUN/DialogIO","JOIST/joist","TANDEM/phetioInherit"],function(t){"use strict";function e(t,e){i.call(this,t,e)}var i=t("SUN/DialogIO"),n=t("JOIST/joist");return t("TANDEM/phetioInherit")(i,"OptionsDialogIO",e,{},{documentation:"A dialog panel",validator:{isValidValue:function(t){return t instanceof phet.joist.OptionsDialog}}}),n.register("OptionsDialogIO",e),e}),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","JOIST/OptionsDialogIO","SCENERY_PHET/PhetFont","TANDEM/Tandem","SCENERY/nodes/Text","string!JOIST/options.title"],function(t){"use strict";function e(t,e){(e=_.extend({titleAlign:"center",bottomMargin:20,ySpacing:20,tandem:o.required,phetioType:s},e)).title||(e.title=new l(h,{font:new a(30),maxWidth:400})),i.call(this,t,e),this.disposeOptionsDialog=function(){e.title&&e.title.dispose()}}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("JOIST/OptionsDialogIO"),a=t("SCENERY_PHET/PhetFont"),o=t("TANDEM/Tandem"),l=t("SCENERY/nodes/Text"),h=t("string!JOIST/options.title");return r.register("OptionsDialog",e),n(i,e,{dispose:function(){this.disposeOptionsDialog(),i.prototype.dispose.call(this)}},{DEFAULT_FONT:new a(15),DEFAULT_SPACING:10})}),i("JOIST/PhetMenuIO",["require","JOIST/joist","TANDEM/types/ObjectIO","TANDEM/phetioInherit"],function(t){"use strict";function e(t,e){n.call(this,t,e)}var i=t("JOIST/joist"),n=t("TANDEM/types/ObjectIO");return t("TANDEM/phetioInherit")(n,"PhetMenuIO",e,{},{documentation:"The PhET Menu in the bottom right of the screen",validator:{isValidValue:function(t){return t instanceof phet.joist.PhetMenu}}}),i.register("PhetMenuIO",e),e}),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"],function(t){"use strict";function e(t){function e(){var t=o.latestVersion?o.latestVersion.toString():"x.x.xx",e=o.ourVersion.toString();u.children=[l.createOutOfDateDialogNode(n,e,t,r)]}var n=this,r={centerX:0,centerY:0,big:!0},a=l.createCheckingNode(r),h=l.createUpToDateNode(r),u=new s({tagName:"div"}),c=l.createOfflineNode(r);e(),this.updateStepListener=a.stepListener,this.updateVisibilityListener=function(t){"out-of-date"===t&&e(),a.visible="checking"===t,h.visible="up-to-date"===t,u.visible="out-of-date"===t,c.visible="offline"===t,a.accessibleContentDisplayed=a.visible,h.accessibleContentDisplayed=h.visible,u.accessibleContentDisplayed=u.visible,c.accessibleContentDisplayed=c.visible};var d=new s({children:[a,h,u,c],tagName:"div"});i.call(this,d,{focusOnCloseNode:t})}var i=t("SUN/Dialog"),n=t("PHET_CORE/inherit"),r=t("JOIST/joist"),s=t("SCENERY/nodes/Node"),a=t("AXON/timer"),o=t("JOIST/UpdateCheck"),l=t("JOIST/UpdateNodes");return r.register("UpdateDialog",e),n(i,e,{show:function(){o.areUpdatesChecked&&!this.isShowingProperty.value&&(o.resetTimeout(),"offline"!==o.stateProperty.value&&"unchecked"!==o.stateProperty||o.check(),a.addListener(this.updateStepListener),o.stateProperty.link(this.updateVisibilityListener)),i.prototype.show.call(this)},hide:function(){this.isShowingProperty.value&&(i.prototype.hide.call(this),o.areUpdatesChecked&&(o.stateProperty.unlink(this.updateVisibilityListener),a.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","SCENERY/nodes/Node","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","SCENERY/nodes/Text","JOIST/UpdateCheck","JOIST/UpdateDialog","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 y="phet"===r.id,H=r.isPhetApp;(h=_.extend({showSaveAndLoad:!1,phetioType:g,phetioState:!1,phetioDocumentation:"This menu is displayed when the PhET button is pressed.",tagName:"ul",ariaRole:"menu"},h)).tandem=l;var U=this;d.call(this);var z,G=null,X=null,W=null,j=[{text:x,present:!!t.options.optionsNode,callback:function(){X||(X=new p(t.options.optionsNode,{tandem:l.createTandem("optionsDialog")})),X.show()},tandem:l.createTandem("optionsMenuItem"),phetioDocumentation:"This menu item shows an options dialog.",phetioState:!1,tagName:"button",focusAfterCallback:!0},{text:k,present:y,callback:function(){if(!V){var e=window.open("http://phet.colorado.edu/"+t.locale,"_blank");e&&e.focus()}},tagName:"button"},{text:D,present:!!t.options.recordInputEventLog,callback:function(){console.log(t.getRecordedInputEventLogString())},tagName:"button"},{text:L,present:!!t.options.recordInputEventLog,callback:function(){t.submitEventLog()},tagName:"button"},{text:I,present:!!t.options.recordInputEventLog,callback:function(){t.mailEventLog()},tagName:"button"},{text:M,present:y&&!H,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({}));if(!V){var i=window.open(e,"_blank");i&&i.focus()}},tagName:"button"},{text:"QR code",present:phet.chipper.queryParameters.qrCode,callback:function(){if(!V){var t=window.open("http://api.qrserver.com/v1/create-qr-code/?data="+encodeURIComponent(window.location.href)+"&size=220x220&margin=0","_blank");t&&t.focus()}},tagName:"button"},{text:O,present:A.areUpdatesChecked,textFill:new s([A.stateProperty],function(t){return"out-of-date"===t?"#0a0":"#000"}),callback:function(){W||(W=new N(e)),W.show()},tagName:"button",focusAfterCallback:!0},{text:q,present:!E.ie9&&!H,callback:function(){var e=v.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","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",tagName:"button",innerContent:p},E=new i(f,{scale:g,pickable:!1}),y=new o({left:E.width+8,bottom:E.bottom-.5,pickable:!1}),v=new l({children:[E,y]});a.call(this,v,e,n,s),c.multilink([e,t.showHomeScreenProperty,d.stateProperty],function(t,e,i){var n="black"!==t&&!e,r="out-of-date"===i;y.fill=n?r?"#0a0":"#222":r?"#3F3":"white",E.image=n?m:f}),this.buttonModel.enabledProperty.link(function(t){y.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"),a=t("JOIST/JoistButton"),o=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=s.phet.value,f=t("mipmap!BRAND/logo.png"),m=t("mipmap!BRAND/logo-on-white.png"),g=.28/f[0].height*108;return r.register("PhetButton",e),n(a,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?S:b}),this.navigationBarFillProperty=new r([s,t.lookAndFeel.navigationBarFillProperty],function(t,e){return t?o.BACKGROUND_COLOR:e}),this.background=new g(0,0,C.width,C.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 m(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 f(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-A-N-w-this.a11yButtonsHBox.width-w-this.phetButton.width-P;else{var k=Math.min(this.titleTextNode.width,.2*l.LAYOUT_BOUNDS.width),M=new p({tagName:"nav",ariaLabel:T}),q=new p({tagName:"ol"});M.addChild(q),M.setVisible(!1),this.barContents.addChild(M),this.homeButton=new a(C.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&&q.addChild(this.homeButton);for(var L=l.LAYOUT_BOUNDS.width/2-A-k-N-O-this.homeButton.width-I,Y=l.LAYOUT_BOUNDS.width/2-w-this.a11yButtonsHBox.width-w-this.phetButton.width-P,B=2*Math.min(L,Y),V=(B-(e.length-1)*x)/e.length,F=_.map(e,function(e){return new d(t.lookAndFeel.navigationBarFillProperty,t.screenIndexProperty,t.screens,e,C.height,{maxButtonWidth:V,tandem:h.createTandem(e.screenTandem.tail+"Button")})}),H=Math.max(D,_.maxBy(F,function(t){return t.width}).width)+x,U=0;U0&&(this.a11yButtonsHBox.centerY=this.phetButton.centerY),1!==this.screens.length&&(this.screenButtonsContainer.centerY=C.height/2,this.homeButton.centerY=C.height/2),this.layout(1,C.width,C.height),this.accessibleOrder=[M,this.a11yButtonsHBox,this.phetButton].filter(function(t){return void 0!==t}),s.link(function(t){u.titleTextNode.setVisible(!t),M&&M.setVisible(!t)})}var i=t("JOIST/A11yButtonsHBox"),n=t("SCENERY/accessibility/AccessiblePeer"),r=t("AXON/DerivedProperty"),s=t("DOT/Dimension2"),a=t("JOIST/HomeButton"),o=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"),f=t("JOIST/PhetButton"),m=t("SCENERY_PHET/PhetFont"),g=t("SCENERY/nodes/Rectangle"),E=t("PHETCOMMON/util/StringUtils"),y=t("SCENERY/nodes/Text"),v=t("string!JOIST/simTitleWithScreenNamePattern"),b=c.simScreensResourcesAndTools.value,S=c.simResourcesAndTools.value,T=c.simScreens.value,C=new s(l.LAYOUT_BOUNDS.width,40),A=10,N=25,w=6,P=10,R=0,O=5,I=O,x=0,D=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;n=C.width*t0&&(this.a11yButtonsHBox.right=this.phetButton.left-w),1!==this.screens.length&&(this.screenButtonsContainer.x=n/2,this.homeButton.right=this.screenButtonsContainer.left-I,this.titleTextNode.maxWidth=this.homeButton.left-A-N)}},{NAVIGATION_BAR_SIZE:C})}),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);R.push(e[i])}),0!==E){var x=_.indexOf(R,e[E-1]);E=x+1}e=R}s=_.extend({showHomeScreen:e.length>1&&v&&0===E,screenIndex:0===E?0:E-1,credits:{},optionsNode:null,homeScreenWarningNode:null,recordInputEventLog:!1,inputEventLogName:void 0,showSaveAndLoad:!1,accessibility:!1,keyboardHelpNode:null,supportsSound:!1,supportsEnhancedSound:!1,rootRenderer:"svg",allowBackingScaleAntialiasing:!0},s),this.options=s,s.rootRenderer=phet.chipper.queryParameters.rootRenderer||s.rootRenderer,this.showHomeScreenProperty=new a(s.showHomeScreen,e.length>1?{tandem:q.generalTandem.createTandem("showHomeScreenProperty"),phetioFeatured:!0}:{}),this.screenIndexProperty=new P(s.screenIndex,{tandem:q.generalTandem.createTandem("screenIndexProperty"),phetioFeatured:!0,phetioDocumentation:"Indicates which screen is selected (0-indexed)",validValues:_.range(0,e.length),numberType:"Integer"}),this.activeProperty=new a(!phet.joist.playbackModeEnabledProperty.value,{tandem:q.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 a(!0,{tandem:q.generalTandem.createTandem("browserTabVisibleProperty"),phetioDocumentation:"Indicates whether the browser tab containing the simulation is currently visible",phetioReadOnly:!0}),document.addEventListener("visibilitychange",function(){c.browserTabVisibleProperty.set("visible"===document.visibilityState)},!1),this.scaleProperty=new D(1),this.boundsProperty=new D(null),this.screenBoundsProperty=new D(null),this.currentScreenProperty=new D(null),this.lookAndFeel=new T,this.destroyed=!1,this.memoryMonitor=new C,phet.chipper.accessibility=phet.chipper.accessibility||s.accessibility,phet.chipper.accessibility&&(r.initialize(),V.initialize()),this.keyboardHelpNode=s.keyboardHelpNode,this.supportsSound=(phet.chipper.queryParameters.supportsSound||s.supportsSound)&&("enabled"===phet.chipper.queryParameters.sound||"muted"===phet.chipper.queryParameters.sound)&&!I.ie,this.supportsEnhancedSound=this.supportsSound&&(phet.chipper.queryParameters.supportsEnhancedSound||s.supportsEnhancedSound),this.supportsSound&&M.initialize(this.browserTabVisibleProperty,this.activeProperty),window.phet.joist.sim=this,window.phet.joist.ScreenshotGenerator=k,this.name=t,this.version=O.version,this.credits=s.credits,this.frameCounter=0,this.resizePending=!0,this.locale=phet.chipper.locale||"en",QueryStringMachine.containsKey("locale")&&$("title").html(t),phet.chipper.queryParameters.recordInputEventLog&&(s.recordInputEventLog=!0,s.inputEventLogName=phet.chipper.queryParameters.recordInputEventLog),phet.chipper.queryParameters.playbackInputEventLog&&(s.playbackInputEventLog=!0,s.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 Y=document.getElementById("aria-live-elements");Y&&(Y.style[p.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 N({renderer:s.rootRenderer}),this.display=new u(c.rootNode,{allowSceneOverflow:!1,allowWebGL:phet.chipper.queryParameters.webgl,accessibility:phet.chipper.accessibility,isApplication:!1,assumeFullWindow:!0,allowBackingScaleAntialiasing:s.allowBackingScaleAntialiasing});var H=phet.chipper.queryParameters.randomSeed*Math.PI;this.inputFuzzer=new y(this.display,H),this.keyboardFuzzer=new b(this.display,H),this.activeProperty.link(function(t){c.display.interactive=t}),c.display.domElement.id="sim",document.body.appendChild(c.display.domElement),f.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:q.generalTandem.createTandem("controller").createTandem("input")}),window.phet.joist.rootNode=this.rootNode,window.phet.joist.display=this.display,c.display.setPointerDisplayVisible(phet.chipper.queryParameters.showPointers),c.display.setPointerAreaDisplayVisible(phet.chipper.queryParameters.showPointerAreas),c.display.setHitAreaDisplayVisible(phet.chipper.queryParameters.showHitAreas),c.display.setCanvasNodeBoundsVisible(phet.chipper.queryParameters.showCanvasNodeBounds),c.display.setFittedBlockBoundsVisible(phet.chipper.queryParameters.showFittedBlockBounds),this.screens=e,e.length>1?(this.homeScreen=new m(this,q.rootTandem.createTandem("homeScreen"),{warningNode:s.homeScreenWarningNode}),this.homeScreen.initializeModelAndView()):this.homeScreen=null,this.navigationBar=new A(this,e,this.showHomeScreenProperty,q.rootTandem.createTandem("navigationBar")),this.updateBackground=function(){c.lookAndFeel.backgroundColorProperty.value=c.currentScreenProperty.value?c.currentScreenProperty.value.backgroundColorProperty.value:c.homeScreen.backgroundColorProperty.value},this.lookAndFeel.backgroundColorProperty.link(function(t){c.display.backgroundColor=t}),phet.phetio&&F.initializeSim(),D.multilink([this.showHomeScreenProperty,this.screenIndexProperty],function(t,i){c.currentScreenProperty.value=t&&c.homeScreen?null:e[i],c.updateBackground()}),this.currentScreenProperty.lazyLink(function(t,e){null===e?c.homeScreen.view.interruptSubtreeInput():e.view.interruptSubtreeInput()}),window.addEventListener("pageshow",function(t){t.persisted&&window.location.reload()}),phet.chipper.queryParameters.legendsOfLearning&&new S(this).start()}var i=t("AXON/Action"),n=t("AXON/ActionIO"),r=t("SCENERY_PHET/accessibility/ariaHerald"),s=t("SCENERY_PHET/BarrierRectangle"),a=t("AXON/BooleanProperty"),o=t("DOT/Bounds2"),l=t("BRAND/Brand"),h=t("DOT/Dimension2"),u=t("SCENERY/display/Display"),c=t("DOT/Util"),d=t("AXON/Emitter"),p=t("SCENERY/util/Features"),f=t("JOIST/Heartbeat"),m=t("JOIST/HomeScreen"),g=t("JOIST/HomeScreenView"),E=t("PHET_CORE/inherit"),y=t("SCENERY/input/InputFuzzer"),v=t("JOIST/joist"),b=t("SCENERY/accessibility/KeyboardFuzzer"),S=t("JOIST/thirdPartySupport/LegendsOfLearningSupport"),T=t("JOIST/LookAndFeel"),C=t("JOIST/MemoryMonitor"),A=t("JOIST/NavigationBar"),N=t("SCENERY/nodes/Node"),w=t("TANDEM/types/NumberIO"),P=t("AXON/NumberProperty"),R=t("AXON/ObservableArray"),O=t("JOIST/packageJSON"),I=t("PHET_CORE/platform"),x=t("JOIST/Profiler"),D=t("AXON/Property"),k=t("JOIST/ScreenshotGenerator"),M=t("TAMBO/soundManager"),q=t("TANDEM/Tandem"),L=t("AXON/timer"),Y=t("JOIST/UpdateCheck"),B=t("SCENERY/util/Util"),V=t("SCENERY_PHET/accessibility/utteranceQueue"),F=t("ifphetio!PHET_IO/phetioEngine");return phet.joist.elapsedTime=0,phet.joist.playbackModeEnabledProperty=new a(phet.chipper.queryParameters.playbackMode),v.register("Sim",e),E(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),D.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;r=0&&this.stepSimulation(i)},getSelectedScreen:function(){return this.showHomeScreenProperty.value?null:this.screens[this.screenIndexProperty.value]},stepSimulation:function(t){this.stepSimulationAction.execute(t),this.frameEndedEmitter.emit()},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("_"),a=[s[0]].concat(s.slice(1).map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("");if(r!==a&&r!==a+"Namespace"){var o=phet[a]&&phet[a][r];o||e("not namespaced: "+a+"."+r),o&&o!==t[i]&&e(a+"."+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"),a={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&&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 a(t){return!!t.complete&&(void 0===t.naturalWidth||0!==t.naturalWidth)}window.phet.joist.launchCalled=!0;var o=[],l=0;if(window.phetImages)for(var h=0;h