Free javascript Hosting


c-game-scripts.js

Uploaded on May 02 2022 10:14 by 028.pattern

var Ga=pc.createScript("ga");function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-V14PW9KP86",{transport_type:"beacon"}),gtag("config","G-KTR4FK8WC0",{transport_type:"beacon"}),gtag("config","UA-22781363-1",{page_path:"/bullet-bonanza/",transport_type:"beacon"});var Globals=pc.createScript("globals");Globals.attributes.add("clientVersionNumber",{type:"number",default:1,title:"Client Version Number"}),Globals.attributes.add("testModeEnabled",{type:"boolean",default:!0,title:"Test Mode Enabled"}),Globals.attributes.add("soundEnabled",{type:"boolean",default:!1,title:"Sound Enabled"}),Globals.attributes.add("musicEnabled",{type:"boolean",default:!1,title:"Music Enabled"});var AdsProviders={none:0,crazyGames:1,gameDistribution:2};Globals.attributes.add("adsProvider",{type:"number",enum:[{none:AdsProviders.none},{crazyGames:AdsProviders.crazyGames},{gameDistribution:AdsProviders.gameDistribution}],default:AdsProviders.none,title:"Ads Provider"});var DeployPlatforms={all_except_facebook:1,facebook:2};Globals.attributes.add("deployPlatform",{type:"number",enum:[{"all-except-facebook":DeployPlatforms.all_except_facebook},{facebook:DeployPlatforms.facebook}],default:DeployPlatforms.all_except_facebook,title:"Deployment Platform"}),Globals.attributes.add("backendType",{type:"number",enum:[{"kiloo-production":1},{"kiloo-external":2},{"kiloo-development":3},{"glitch-master":4},{"glitch-alex1":5},{"glitch-alex2":6},{"glitch-lars":7}],title:"Game Server - Backend"});var mouseSensitivity,FirebaseBackendType={production:1,test:2};Globals.attributes.add("firebaseBackendType",{type:"number",enum:[{production:FirebaseBackendType.production},{development:FirebaseBackendType.test}],default:FirebaseBackendType.production,title:"Firebase DB - Backend"}),Globals.attributes.add("serverCommunicationSecurity",{type:"number",enum:[{none:1},{obfuscated:2},{encrypted:3}],title:"Server Com Security"});var isLocalPlayerAlive,DefaultMouseSensitivity=.1,invertedMouse=!1,soundEnabled=null,musicEnabled=null,isChatModeEnabled=!1,WATER_COLLIDER_NAME="WaterCollider",deviceHasNotch=null,hasSubscribedToNotchEvents=!1,notchTopSize=-16,notchBottomSize=-16,notchLeftSize=-16,notchRightSize=-16,isSafari=!1,ObjectMaterials={material_dirt:1,material_wood:2,material_metal:3,material_water:4,material_glass:5,material_rock:6,material_rope:7,material_flesh:8};function checkNotchPresence(){root=window.document.documentElement,root.style.setProperty("--notch-top","env(safe-area-inset-top)"),root.style.setProperty("--notch-right","env(safe-area-inset-right)"),root.style.setProperty("--notch-bottom","env(safe-area-inset-bottom)"),root.style.setProperty("--notch-left","env(safe-area-inset-left)");var e=window.getComputedStyle(root);notchTopSize=parseInt(e.getPropertyValue("--notch-top")||"-1",10),notchRightSize=parseInt(e.getPropertyValue("--notch-right")||"-1",10),notchBottomSize=parseInt(e.getPropertyValue("--notch-bottom")||"-1",10),notchLeftSize=parseInt(e.getPropertyValue("--notch-left")||"-1",10),(deviceHasNotch=[notchTopSize,notchRightSize,notchBottomSize,notchLeftSize].some((function(e){return e>0})))&&!hasSubscribedToNotchEvents&&(hasSubscribedToNotchEvents=!0,root.setAttribute("data-notch","true"),window.dispatchEvent(new CustomEvent("notch-detected",{bubbles:!0,cancelable:!0})),window.addEventListener("resize",updateOrientationAttribute),updateOrientationAttribute()),pc.app.fire("notchValuesUpdated")}function updateOrientationAttribute(){root.setAttribute("data-orientation",window.innerHeight>window.innerWidth?"portrait":"landscape")}function getWindowHeight(){return window.innerHeight||window.document.documentElement.clientHeight||window.document.body.clientHeight}function getWindowWidth(){return window.innerWidth||window.document.documentElement.clientWidth||window.document.body.clientWidth}function checkAllNumeric(e){return"string"==typeof e&&e.match(/^[0-9]+$/)}function updateQueryStringParameter(e,t,o){var n=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(n)?e.replace(n,"$1"+t+"="+o+"$2"):e+a+t+"="+o}function removeParam(e,t){var o=t.split("?")[0],n=[],a=-1!==t.indexOf("?")?t.split("?")[1]:"";if(""!==a){for(var r=(n=a.split("&")).length-1;r>=0;r-=1)n[r].split("=")[0]===e&&n.splice(r,1);o=o+"?"+n.join("&")}return o}function generateUUID(){var e=(new Date).getTime(),t=performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(o){var n=16*generateRandomNumber();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===o?n:3&n|8).toString(16)}))}!function(e,t){if(pc.platform.ios){"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var n=t.createEvent("CustomEvent");return n.initCustomEvent(e,o.bubbles,o.cancelable,o.detail),n},e.CustomEvent.prototype=e.Event.prototype),pc.Application.getApplication().once("postrender",checkNotchPresence),e.addEventListener("resize",checkNotchPresence)}}(this,window.document);var StorageManager=pc.createScript("storageManager"),STORAGE_PlayerName_KEY="playerName",STORAGE_PlayerGuid_KEY="playerGuid",STORAGE_PlayerCreatedPrivateArena_KEY="hasCreatedPrivateArena",STORAGE_PlayerJoinedPrivateArena_KEY="hasJoinedPrivateArena",STORAGE_PlayerCharacter_KEY="playerCharacter",STORAGE_PlayerHighscore_KEY="phsk",STORAGE_PlayerEloRating_KEY="perk",STORAGE_SoundOn_KEY="soundOn",STORAGE_MusicOn_KEY="musicOn",STORAGE_PlayerOutfits_KEY="playerOutfits",STORAGE_PlayerHats_KEY="playerHats",_localStorageTypeString="localStorage",_isLocalStorageAvailable=!1;function storageAvailable(a){var e;try{e=window[a];var t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(a){return a instanceof DOMException&&(22===a.code||1014===a.code||"QuotaExceededError"===a.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.name)&&e&&0!==e.length}}StorageManager.prototype.init=function(a,e){this.firebase=e,this.firebase.on("userChanged",this._onUserChanged,this),this._onUserChanged(e.isLoggedIn()),this.globalsController=a,storageAvailable(_localStorageTypeString)?_isLocalStorageAvailable=!0:(_isLocalStorageAvailable=!1,console.error("StorageManager: Storage is NOT available!"))},StorageManager.prototype._onUserChanged=function(a){this.fire("onUserChanged",a)},StorageManager.prototype.save=function(a,e){this.firebase.authenticated?this.firebase.save(a,e):this.localSave(a,e)},StorageManager.prototype.load=function(a){return this.firebase.authenticated?this.firebase.get(a):this.localLoad(a)},StorageManager.prototype.remove=function(a){this.firebase.authenticated?this.firebase.delete(a):this.localRemove(a)},StorageManager.prototype.localSave=function(a,e){_isLocalStorageAvailable?(a="bulletbonanza_"+a,window[_localStorageTypeString].setItem(a,e)):console.error("StorageManager: Cannot save locally. Storage is NOT available!")},StorageManager.prototype.localLoad=function(a){return _isLocalStorageAvailable?(a="bulletbonanza_"+a,window[_localStorageTypeString].getItem(a)):(console.error("StorageManager: Cannot load locally. Storage is NOT available!"),"")},StorageManager.prototype.localRemove=function(a){_isLocalStorageAvailable?(a="bulletbonanza_"+a,window[_localStorageTypeString].removeItem(a)):console.error("StorageManager: Cannot remove locally. Storage is NOT available!")},StorageManager.prototype.localLoadObfKey=function(a,e){var t=0,r=this.localLoad(a);if(null===r||"undefined"===r)this.localSaveObfKey(a,0,e);else{var o=deobfuscateParams(r),l=NaN;switch(e){case"int":l=parseInt(o);break;case"float":l=parseFloat(o);break;default:l=NaN,console.log("Error. Cannot read value of type: "+e)}t=isNaN(l)?0:l}return t},StorageManager.prototype.localSaveObfKey=function(a,e,t){if(void 0!==e){switch(t){case"int":e=parseInt(e);break;case"float":e=parseFloat(e);break;default:e=NaN,console.log("Error. Cannot save value of type: "+t)}if(!isNaN(e)){var r=obfuscateParams(e);this.localSave(a,r)}}},StorageManager.prototype.loadObfKey=function(a,e){var t=0,r=this.load(a);if(null===r||"undefined"===r)this.saveObfKey(a,0,e);else{var o=deobfuscateParams(r),l=NaN;switch(e){case"int":l=parseInt(o);break;case"float":l=parseFloat(o);break;default:l=NaN,console.log("Error. Cannot read value of type: "+e)}t=isNaN(l)?0:l}return t},StorageManager.prototype.saveObfKey=function(a,e,t){if(void 0!==e){switch(t){case"int":e=parseInt(e);break;case"float":e=parseFloat(e);break;default:e=NaN,console.log("Error. Cannot save value of type: "+t)}if(!isNaN(e)){var r=obfuscateParams(e);this.save(a,r)}}},StorageManager.prototype.loadPlayerGuid=function(){var a=null;if(this.firebase.authenticated)a=this.firebase.getUserGuid();else{var e=this.getPlayerGuidStorageKey();(null==(a=this.localLoad(e))||a.length<=0)&&(a=generateUUID(),this.savePlayerGuid(a))}return a},StorageManager.prototype.savePlayerGuid=function(a){if(!this.firebase.authenticated){var e=this.getPlayerGuidStorageKey();this.localSave(e,a)}},StorageManager.prototype.getPlayerGuidStorageKey=function(){var a=STORAGE_PlayerGuid_KEY;if(this.globalsController.testModeEnabled){var e=this.localLoad(STORAGE_PlayerName_KEY);null!=e&&(a=e+"_"+STORAGE_PlayerGuid_KEY)}return a};var Housekeeper=pc.createScript("housekeeper");function generateRandomNumber(){return(new Math.seedrandom)()}Housekeeper.attributes.add("targetMobileFps",{type:"number",default:30}),Housekeeper.attributes.add("globalsControllerEntity",{type:"entity",title:"Globals Controller"}),Housekeeper.attributes.add("networkControllerEntity",{type:"entity",title:"Network Controller"}),Housekeeper.attributes.add("loadAssetManagerEntity",{type:"entity",title:"Load Asset Manager"}),Housekeeper.attributes.add("gameControllerEntity",{type:"entity",title:"Game Controller"}),Housekeeper.attributes.add("uiControllerEntity",{type:"entity",title:"UI Controller"}),Housekeeper.attributes.add("storageManagerEntity",{type:"entity",title:"Storage Manager"}),Housekeeper.attributes.add("enemiesControllerEntity",{type:"entity",title:"Enemies Controller"}),Housekeeper.attributes.add("npcsControllerEntity",{type:"entity",title:"Npcs Controller"}),Housekeeper.attributes.add("weaponControllerEntity",{type:"entity",title:"Weapon Controller"}),Housekeeper.attributes.add("ambientSoundEntity",{type:"entity",title:"Ambient Sound Manager"}),Housekeeper.attributes.add("musicManagerEntity",{type:"entity",title:"Music Manager"}),Housekeeper.attributes.add("analyticsControllerEntity",{type:"entity",title:"Analytics Controller"}),Housekeeper.attributes.add("performanceControllerEntity",{type:"entity",title:"Performance Controller"}),Housekeeper.attributes.add("mobileControllerEntity",{type:"entity",title:"Mobile Controller"}),Housekeeper.attributes.add("propsControllerEntity",{type:"entity",title:"Props Controller"}),Housekeeper.attributes.add("globalLeaderboardsManagerEntity",{type:"entity",title:"Global Leaderboards Manager"}),Housekeeper.attributes.add("grassTestEntity",{type:"entity",title:"Grass Test"}),Housekeeper.attributes.add("specksTestEntity",{type:"entity",title:"SpecksTest"}),Housekeeper.attributes.add("placers",{type:"entity",array:"true",title:"Placers Parents"}),Housekeeper.attributes.add("weaponPickupPoints",{type:"entity",title:"Weapon Pickup Points"}),Housekeeper.attributes.add("gameOverCameraController",{type:"entity",title:"Game Over Camera Controller"}),Housekeeper.attributes.add("introCharactersParent",{type:"entity",title:"Intro Characters Parent"}),Housekeeper.attributes.add("effectController",{type:"entity",title:"Effect Controller"}),Housekeeper.attributes.add("voiceOverController",{type:"entity",title:"Voice Over Controller"}),Housekeeper.attributes.add("rankManager",{type:"entity",title:"Rank Manager"}),Housekeeper.attributes.add("itemDataManager",{type:"entity",title:"Item Data Manager"}),Housekeeper.attributes.add("statsManager",{type:"entity",title:"Stats Manager"}),Housekeeper.attributes.add("currencyManager",{type:"entity",title:"Currency Manager"}),Housekeeper.attributes.add("purchaseManager",{type:"entity",title:"Purchase Manager"}),Housekeeper.attributes.add("adsManager",{type:"entity",title:"Ads Manager"}),Housekeeper.prototype.initialize=function(){this.url=window.location.href,this.queryParameter=window.location.search,this.timeSinceStartup=0;var t=navigator.userAgent.toLowerCase();isSafari=t.indexOf("safari/")>=0&&t.indexOf("chrome")<0,this.globalsControllerScript=this.globalsControllerEntity.script.globals,this.analyticsControllerScript=this.analyticsControllerEntity.script.trackEvents,this.storageManagerScript=this.storageManagerEntity.script.storageManager,this.loadAssetManagerScript=this.loadAssetManagerEntity.script.loadAssetManager,this.networkControllerScript=this.networkControllerEntity.script.network,this.gameControllerScript=this.gameControllerEntity.script.gameController,this.enemiesControllerScript=this.enemiesControllerEntity.script.enemiesController,this.npcsControllerScript=this.npcsControllerEntity.script.remoteNpcsController,this.mobileControllerScript=this.mobileControllerEntity.script.mobileController,this.performanceControllerScript=this.performanceControllerEntity.script.performanceController,this.uiControllerScript=this.uiControllerEntity.script.uiController,this.weaponControllerScript=this.weaponControllerEntity.script.firstPersonWeaponController,this.ambientSoundManagerScript=this.ambientSoundEntity.script.ambientSoundManager,this.musicManagerScript=this.musicManagerEntity.script.musicManager,this.propsControllerScript=this.propsControllerEntity.script.propsController,this.grassTestScript=this.grassTestEntity.script.grassTest,this.specksTestScript=this.specksTestEntity.script.specksOfDust,this.gameOverCameraControllerScript=this.gameOverCameraController.script.gameOverCameraPath,this.effectControllerScript=this.effectController.script.effectController,this.voiceOverControllerScript=this.voiceOverController.script.vomanager,this.globalLeaderboardsManagerScript=this.globalLeaderboardsManagerEntity.script.globalLeaderboardsManager,this.rankManagerScript=this.rankManager.script.rankManager,this.itemDataManagerScript=this.itemDataManager.script.itemDataManager,this.statsManagerScript=this.statsManager.script.statsManager,this.currencyManagerScript=this.currencyManager.script.currencyManager,this.purchaseManagerScript=this.purchaseManager.script.purchaseManager,this.adsManagerScript=this.adsManager.script.adsManager;var e=new Firebase(this.globalsControllerScript);this.storageManagerScript.init(this.globalsControllerScript,e),this.analyticsControllerScript.init(),this.entity.script.profanityFilter.init(),this.loadAssetManagerScript.init(this.propsControllerScript,this.grassTestScript,this.specksTestScript,this.gameControllerScript,this.placers,this.weaponPickupPoints,this.effectControllerScript,this.introCharactersParent),this.networkControllerScript.init(this.globalsControllerScript),this.rankManagerScript.init(e,this.storageManagerScript),this.statsManagerScript.init(e,this.storageManagerScript),this.itemDataManagerScript.init(this.storageManagerScript,this.statsManagerScript),this.currencyManagerScript.init(this.storageManagerScript,this.statsManagerScript),this.purchaseManagerScript.init(this.storageManagerScript,this.currencyManagerScript),this.gameControllerScript.init(this.networkControllerScript,this.loadAssetManagerScript,this.storageManagerScript,this.rankManagerScript,this.itemDataManagerScript),this.enemiesControllerScript.init(this.networkControllerScript),this.npcsControllerScript.init(this.networkControllerScript),this.adsManagerScript.init(this.globalsControllerScript),this.musicManagerScript.init(this.globalsControllerScript,this.loadAssetManagerScript,this.storageManagerScript,this.adsManagerScript),this.mobileControllerScript.init(),this.performanceControllerScript.init(),this.globalLeaderboardsManagerScript.init(this.storageManagerScript),this.uiControllerScript.init(this.globalsControllerScript,this.storageManagerScript,this.loadAssetManagerScript,this.globalLeaderboardsManagerScript,this.musicManagerScript,e,this.rankManagerScript,this.itemDataManagerScript,this.statsManagerScript,this.currencyManagerScript,this.purchaseManagerScript,this.adsManagerScript),this.weaponControllerScript.init(this.globalsControllerScript,this.loadAssetManagerScript,this.itemDataManagerScript),this.ambientSoundManagerScript.init(this.loadAssetManagerScript),this.gameOverCameraControllerScript.init(this.loadAssetManagerScript,this.itemDataManagerScript),this.voiceOverControllerScript.init(this.loadAssetManagerScript),mouseSensitivity=this.storageManagerScript.load("cl_sensitivty"),(isNaN(mouseSensitivity)||null==mouseSensitivity)&&(mouseSensitivity=DefaultMouseSensitivity),invertedMouse="true"==this.storageManagerScript.load("cl_invertedmouse"),this.storageManagerScript.on("onUserChanged",this.onUserChanged,this),this.app.on("mouseSensitivityChanged",this.onMouseSensitivityChanged,this),this.app.on("invertedMouseChanged",this.onMouseInvertedChanged,this);var r=console.warn;if(console.warn=function(t){t.includes("Unknown skeleton node name")||t.includes("Multiple animation curves with the")||r(t)},!this.globalsControllerScript.testModeEnabled){window.onbeforeunload=function ConfirmQuitPrompt(t){t||(t=window.event),t.cancelBubble=!0,t.returnValue="You sure you want to leave?",t.stopPropagation&&(t.stopPropagation(),t.preventDefault())}}if(MobileController.instance.active){var i=this.app;this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.targetMobileFps>=60?i.autoRender=!0:(i.autoRender=!1,this.intervalId=setInterval((function(){i.renderNextFrame=!0}),1e3/this.targetMobileFps))}},Housekeeper.prototype.onUserChanged=function(){mouseSensitivity=this.storageManagerScript.load("cl_sensitivty"),(isNaN(mouseSensitivity)||null==mouseSensitivity)&&(mouseSensitivity=DefaultMouseSensitivity),invertedMouse="true"==this.storageManagerScript.load("cl_invertedmouse")},Housekeeper.prototype.onMouseSensitivityChanged=function(t){mouseSensitivity=parseFloat(t.toFixed(4)),this.storageManagerScript.save("cl_sensitivty",mouseSensitivity)},Housekeeper.prototype.onMouseInvertedChanged=function(t){invertedMouse=t,this.storageManagerScript.save("cl_invertedmouse",invertedMouse)};var TrackEvents=pc.createScript("trackEvents"),Detailed_FPS_Fraction_Size=10,event_game_stats_object={isActive:!1,startTimestamp:null,endTimestamp:null,duration:null,frameCount:0,averageFPS:null,detailedFPSFrameCount:0,detailedFPSTime:0,detailedFPS:[],characterUsed:null,outfitUsed:null,totalPlayers:null,timeLostFocus:null,totalTimeOutOfFocus:0},event_session_stats_object={startTimestamp:null,endTimestamp:null,duration:null,gamesPlayed:0};function resetGameStatsEventObject(){event_game_stats_object.startTimestamp=null,event_game_stats_object.endTimestamp=null,event_game_stats_object.duration=null,event_game_stats_object.frameCount=0,event_game_stats_object.averageFPS=null,event_game_stats_object.detailedFPSFrameCount=0,event_game_stats_object.detailedFPSTime=0,event_game_stats_object.detailedFPS.splice(0,event_game_stats_object.detailedFPS.length),event_game_stats_object.characterUsed=null,event_game_stats_object.outfitUsed=null,event_game_stats_object.totalPlayers=null,event_game_stats_object.timeLostFocus=null,event_game_stats_object.totalTimeOutOfFocus=0}function prepareAndSendGameStatsEvent(e){if(event_game_stats_object.isActive&&event_game_stats_object.startTimestamp){if(event_game_stats_object.isActive=!1,null!==event_game_stats_object.timeLostFocus){var t=Date.now()-event_game_stats_object.timeLostFocus;event_game_stats_object.totalTimeOutOfFocus+=t,event_game_stats_object.timeLostFocus=null}event_game_stats_object.endTimestamp=Date.now();var a=event_game_stats_object.endTimestamp-event_game_stats_object.startTimestamp-event_game_stats_object.totalTimeOutOfFocus;if(event_game_stats_object.duration=a/1e3,event_game_stats_object.averageFPS=event_game_stats_object.frameCount/event_game_stats_object.duration,event_game_stats_object.detailedFPSTime>0){var s=event_game_stats_object.detailedFPSFrameCount/event_game_stats_object.detailedFPSTime;event_game_stats_object.detailedFPS.push(Math.round(s)),event_game_stats_object.detailedFPSFrameCount=0,event_game_stats_object.detailedFPSTime=0}gtag("event","game_ended",{game_ended_duration:Math.round(event_game_stats_object.duration),game_ended_avg_fps:""+Math.round(event_game_stats_object.averageFPS),game_ended_avg_fps_detailed:event_game_stats_object.detailedFPS.join(";"),game_ended_characterUsed:event_game_stats_object.characterUsed,game_ended_outfitUsed:event_game_stats_object.outfitUsed,game_ended_total_players:event_game_stats_object.totalPlayers,game_ended_reasonForExit:e}),resetGameStatsEventObject()}}TrackEvents.prototype.init=function(){this.isInFocus=!0,window.addEventListener("beforeunload",(function(e){event_session_stats_object.endTimestamp=Date.now(),event_session_stats_object.duration=Math.round((event_session_stats_object.endTimestamp-event_session_stats_object.startTimestamp)/1e3),gtag("event","session_ended",{session_ended_duration:event_session_stats_object.duration,session_ended_games_played:""+event_session_stats_object.gamesPlayed}),prepareAndSendGameStatsEvent("tabClosed")})),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("respawn",this.onRespawn,this),this.app.on("localPlayerInitialized",this.onLocalPlayerInitialized,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("playersUpdated",this.onPlayersUpdated,this),this.app.on("playerNameRejected",this.onPlayerNameRejected,this),this.app.on("leaderboardsButtonClicked",this.onLeaderboardsButtonClicked,this),this.app.on("responsePurchaseItem",this.onResponsePurchaseItem,this),this.app.on("windowLostFocus",this.onWindowLostFocus,this),this.app.on("windowGainedFocus",this.onWindowGainedFocus,this)},TrackEvents.prototype.update=function(e){if(this.isInFocus&&event_game_stats_object.isActive&&(event_game_stats_object.frameCount++,event_game_stats_object.detailedFPSFrameCount++,event_game_stats_object.detailedFPSTime+=e,event_game_stats_object.detailedFPSTime>=Detailed_FPS_Fraction_Size)){var t=event_game_stats_object.detailedFPSFrameCount/event_game_stats_object.detailedFPSTime;event_game_stats_object.detailedFPS.push(Math.round(t)),event_game_stats_object.detailedFPSFrameCount=0,event_game_stats_object.detailedFPSTime=0}},TrackEvents.prototype.onResponsePurchaseItem=function(e){if(e.purchaseSuccessful){let t=e.itemCategory,a=e.itemType,s=e.characterID;if(null==t||null==a)return;switch(t){case PurchasableItemCategories.hat:gtag("event","hatPurchased",{hatPurchased_type:a});break;case PurchasableItemCategories.outfit:gtag("event","outfitPurchased",{outfitPurchased_type:s+"."+a})}}},TrackEvents.prototype.onLocalPlayerInitialized=function(e,t,a,s){var n=null;switch(a){case CharacterID.Fox:n="Fox";break;case CharacterID.Bull:n="Bull";break;case CharacterID.Chicken:n="Chicken";break;case CharacterID.Rhino:n="Rhino";break;case CharacterID.Ape:n="Ape";break;case CharacterID.Lion:n="Lion";break;case CharacterID.Toucan:n="Toucan";break;case CharacterID.Dog:n="Dog"}null===n&&(n="unknownIndex: "+a),event_game_stats_object.characterUsed=n,event_game_stats_object.outfitUsed=s},TrackEvents.prototype.onSessionStarted=function(e,t,a,s,n){a&&this.activateGameStatsEventObject()},TrackEvents.prototype.onCooldownStarted=function(){prepareAndSendGameStatsEvent("roundEnded")},TrackEvents.prototype.onRespawn=function(e,t){t&&this.activateGameStatsEventObject()},TrackEvents.prototype.onLeftGame=function(){prepareAndSendGameStatsEvent("leftEarly")},TrackEvents.prototype.onConnectionLost=function(){prepareAndSendGameStatsEvent("connectionLost")},TrackEvents.prototype.onPlayersUpdated=function(e,t,a){if(t){var s=0;for(var n in t)t[n].isConnected&&s++;event_game_stats_object.totalPlayers=s}},TrackEvents.prototype.onPlayerNameRejected=function(e){gtag("event","playerNameRejected",{playerNameRejected_name:e})},TrackEvents.prototype.onLeaderboardsButtonClicked=function(){gtag("event","leaderboardsButtonClicked")},TrackEvents.prototype.onWindowLostFocus=function(){this.isInFocus=!1,event_game_stats_object.isActive&&(event_game_stats_object.timeLostFocus=Date.now())},TrackEvents.prototype.onWindowGainedFocus=function(){if(this.isInFocus=!0,null!==event_game_stats_object.timeLostFocus){var e=Date.now()-event_game_stats_object.timeLostFocus;event_game_stats_object.totalTimeOutOfFocus+=e,event_game_stats_object.timeLostFocus=null}},pc.Application.getApplication().once("postrender",(function(){if(event_session_stats_object.startTimestamp=Date.now(),loadingStartTime>0){var e=Date.now(),t=Math.round((e-loadingStartTime)/1e3);gtag("event","app_loaded",{app_loaded_duration:t})}})),TrackEvents.prototype.activateGameStatsEventObject=function(){event_game_stats_object.isActive||(event_game_stats_object.isActive=!0,event_session_stats_object.gamesPlayed++,event_game_stats_object.startTimestamp=Date.now(),this.isInFocus||(event_game_stats_object.timeLostFocus=Date.now()))};/*!
* Socket.IO v2.3.0
* (c) 2014-2019 Guillermo Rauch
* Released under the MIT License.
*/
!function(f,l){"object"==typeof exports&&"object"==typeof module?module.exports=l():"function"==typeof define&&define.amd?define([],l):"object"==typeof exports?exports.io=l():f.io=l()}(this,(function(){return function(f){function e(d){if(l[d])return l[d].exports;var y=l[d]={exports:{},id:d,loaded:!1};return f[d].call(y.exports,y,y.exports,e),y.loaded=!0,y.exports}var l={};return e.m=f,e.c=l,e.p="",e(0)}([function(f,l,d){function r(f,l){"object"==typeof f&&(l=f,f=void 0),l=l||{};var d,m=y(f),C=m.source,w=m.id,k=m.path,x=b[w]&&k in b[w].nsps;return l.forceNew||l["force new connection"]||!1===l.multiplex||x?(v("ignoring socket cache for %s",C),d=g(C,l)):(b[w]||(v("new io instance for %s",C),b[w]=g(C,l)),d=b[w]),m.query&&!l.query&&(l.query=m.query),d.socket(m.path,l)}var y=d(1),m=d(7),g=d(15),v=d(3)("socket.io-client");f.exports=l=r;var b=l.managers={};l.protocol=m.protocol,l.connect=r,l.Manager=d(15),l.Socket=d(39)},function(f,l,d){var y=d(2),m=d(3)("socket.io-client:url");f.exports=function r(f,l){var d=f;l=l||"undefined"!=typeof location&&location,null==f&&(f=l.protocol+"//"+l.host),"string"==typeof f&&("/"===f.charAt(0)&&(f="/"===f.charAt(1)?l.protocol+f:l.host+f),/^(https?|wss?):\/\//.test(f)||(m("protocol-less url %s",f),f=void 0!==l?l.protocol+"//"+f:"https://"+f),m("parse %s",f),d=y(f)),d.port||(/^(http|ws)$/.test(d.protocol)?d.port="80":/^(http|ws)s$/.test(d.protocol)&&(d.port="443")),d.path=d.path||"/";var g=-1!==d.host.indexOf(":")?"["+d.host+"]":d.host;return d.id=d.protocol+"://"+g+":"+d.port,d.href=d.protocol+"://"+g+(l&&l.port===d.port?"":":"+d.port),d}},function(f,l){var d=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,y=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];f.exports=function(f){var l=f,m=f.indexOf("["),g=f.indexOf("]");-1!=m&&-1!=g&&(f=f.substring(0,m)+f.substring(m,g).replace(/:/g,";")+f.substring(g,f.length));for(var v=d.exec(f||""),b={},C=14;C--;)b[y[C]]=v[C]||"";return-1!=m&&-1!=g&&(b.source=l,b.host=b.host.substring(1,b.host.length-1).replace(/;/g,":"),b.authority=b.authority.replace("[","").replace("]","").replace(/;/g,":"),b.ipv6uri=!0),b}},function(f,l,d){(function(y){"use strict";var m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};l.log=function s(){var f;return"object"===("undefined"==typeof console?"undefined":m(console))&&console.log&&(f=console).log.apply(f,arguments)},l.formatArgs=function i(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+f.exports.humanize(this.diff),this.useColors){var d="color: "+this.color;l.splice(1,0,d,"color: inherit");var y=0,m=0;l[0].replace(/%[a-zA-Z%]/g,(function(f){"%%"!==f&&(y++,"%c"===f&&(m=y))})),l.splice(m,0,d)}},l.save=function a(f){try{f?l.storage.setItem("debug",f):l.storage.removeItem("debug")}catch(f){}},l.load=function c(){var f=void 0;try{f=l.storage.getItem("debug")}catch(f){}return!f&&void 0!==y&&"env"in y&&(f=y.env.DEBUG),f},l.useColors=function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},l.storage=function u(){try{return localStorage}catch(f){}}(),l.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],f.exports=d(5)(l),f.exports.formatters.j=function(f){try{return JSON.stringify(f)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(l,d(4))},function(f,l){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(f){if(d===setTimeout)return setTimeout(f,0);if((d===n||!d)&&setTimeout)return d=setTimeout,setTimeout(f,0);try{return d(f,0)}catch(l){try{return d.call(null,f,0)}catch(l){return d.call(this,f,0)}}}function s(){b&&g&&(b=!1,g.length?v=g.concat(v):C=-1,v.length&&a())}function a(){if(!b){var f=o(s);b=!0;for(var l=v.length;l;){for(g=v,v=[];++C<l;)g&&g[C].run();C=-1,l=v.length}g=null,b=!1,function i(f){if(y===clearTimeout)return clearTimeout(f);if((y===r||!y)&&clearTimeout)return y=clearTimeout,clearTimeout(f);try{return y(f)}catch(l){try{return y.call(null,f)}catch(l){return y.call(this,f)}}}(f)}}function c(f,l){this.fun=f,this.array=l}function u(){}var d,y,m=f.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:n}catch(f){d=n}try{y="function"==typeof clearTimeout?clearTimeout:r}catch(f){y=r}}();var g,v=[],b=!1,C=-1;m.nextTick=function(f){var l=new Array(arguments.length-1);if(arguments.length>1)for(var d=1;d<arguments.length;d++)l[d-1]=arguments[d];v.push(new c(f,l)),1!==v.length||b||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=u,m.addListener=u,m.once=u,m.off=u,m.removeListener=u,m.removeAllListeners=u,m.emit=u,m.prependListener=u,m.prependOnceListener=u,m.listeners=function(f){return[]},m.binding=function(f){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(f){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(f,l,d){"use strict";function r(f){if(Array.isArray(f)){for(var l=0,d=Array(f.length);l<f.length;l++)d[l]=f[l];return d}return Array.from(f)}f.exports=function o(f){function e(f){for(var l=0,d=0;d<f.length;d++)l=(l<<5)-l+f.charCodeAt(d),l|=0;return o.colors[Math.abs(l)%o.colors.length]}function o(f){function n(){for(var f=arguments.length,d=Array(f),y=0;y<f;y++)d[y]=arguments[y];if(n.enabled){var m=n,g=Number(new Date),v=g-(l||g);m.diff=v,m.prev=l,m.curr=g,l=g,d[0]=o.coerce(d[0]),"string"!=typeof d[0]&&d.unshift("%O");var b=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,(function(f,l){if("%%"===f)return f;b++;var y=o.formatters[l];if("function"==typeof y){var g=d[b];f=y.call(m,g),d.splice(b,1),b--}return f})),o.formatArgs.call(m,d);var C=m.log||o.log;C.apply(m,d)}}var l=void 0;return n.namespace=f,n.enabled=o.enabled(f),n.useColors=o.useColors(),n.color=e(f),n.destroy=i,n.extend=s,"function"==typeof o.init&&o.init(n),o.instances.push(n),n}function i(){var f=o.instances.indexOf(this);return-1!==f&&(o.instances.splice(f,1),!0)}function s(f,l){var d=o(this.namespace+(void 0===l?":":l)+f);return d.log=this.log,d}function p(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function h(f){return f instanceof Error?f.stack||f.message:f},o.disable=function c(){var f=[].concat(r(o.names.map(p)),r(o.skips.map(p).map((function(f){return"-"+f})))).join(",");return o.enable(""),f},o.enable=function a(f){o.save(f),o.names=[],o.skips=[];var l=void 0,d=("string"==typeof f?f:"").split(/[\s,]+/),y=d.length;for(l=0;l<y;l++)d[l]&&("-"===(f=d[l].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+f.substr(1)+"$")):o.names.push(new RegExp("^"+f+"$")));for(l=0;l<o.instances.length;l++){var m=o.instances[l];m.enabled=o.enabled(m.namespace)}},o.enabled=function u(f){if("*"===f[f.length-1])return!0;var l=void 0,d=void 0;for(l=0,d=o.skips.length;l<d;l++)if(o.skips[l].test(f))return!1;for(l=0,d=o.names.length;l<d;l++)if(o.names[l].test(f))return!0;return!1},o.humanize=d(6),Object.keys(f).forEach((function(l){o[l]=f[l]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=e,o.enable(o.load()),o}},function(f,l){function o(f){var l=Math.abs(f);return l>=g?i(f,l,g,"day"):l>=m?i(f,l,m,"hour"):l>=y?i(f,l,y,"minute"):l>=d?i(f,l,d,"second"):f+" ms"}function i(f,l,d,y){var m=l>=1.5*d;return Math.round(f/d)+" "+y+(m?"s":"")}var d=1e3,y=60*d,m=60*y,g=24*m,v=7*g,b=365.25*g;f.exports=function(f,l){l=l||{};var C=typeof f;if("string"===C&&f.length>0)return function n(f){if(!((f=String(f)).length>100)){var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(f);if(l){var C=parseFloat(l[1]);switch((l[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return C*b;case"weeks":case"week":case"w":return C*v;case"days":case"day":case"d":return C*g;case"hours":case"hour":case"hrs":case"hr":case"h":return C*m;case"minutes":case"minute":case"mins":case"min":case"m":return C*y;case"seconds":case"second":case"secs":case"sec":case"s":return C*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return C;default:return}}}}(f);if("number"===C&&isFinite(f))return l.long?o(f):function r(f){var l=Math.abs(f);return l>=g?Math.round(f/g)+"d":l>=m?Math.round(f/m)+"h":l>=y?Math.round(f/y)+"m":l>=d?Math.round(f/d)+"s":f+"ms"}(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},function(f,l,d){function r(){}function o(f){var d=""+f.type;if(l.BINARY_EVENT!==f.type&&l.BINARY_ACK!==f.type||(d+=f.attachments+"-"),f.nsp&&"/"!==f.nsp&&(d+=f.nsp+","),null!=f.id&&(d+=f.id),null!=f.data){var m=function i(f){try{return JSON.stringify(f)}catch(f){return!1}}(f.data);if(!1===m)return C;d+=m}return y("encoded %j as %s",f,d),d}function a(){this.reconstructor=null}function c(f){var d=0,m={type:Number(f.charAt(0))};if(null==l.types[m.type])return h("unknown packet type "+m.type);if(l.BINARY_EVENT===m.type||l.BINARY_ACK===m.type){for(var g="";"-"!==f.charAt(++d)&&(g+=f.charAt(d),d!=f.length););if(g!=Number(g)||"-"!==f.charAt(d))throw new Error("Illegal attachments");m.attachments=Number(g)}if("/"===f.charAt(d+1))for(m.nsp="";++d;){if(","===(C=f.charAt(d)))break;if(m.nsp+=C,d===f.length)break}else m.nsp="/";var b=f.charAt(d+1);if(""!==b&&Number(b)==b){for(m.id="";++d;){var C;if(null==(C=f.charAt(d))||Number(C)!=C){--d;break}if(m.id+=f.charAt(d),d===f.length)break}m.id=Number(m.id)}if(f.charAt(++d)){var w=function u(f){try{return JSON.parse(f)}catch(f){return!1}}(f.substr(d));if(!(!1!==w&&(m.type===l.ERROR||v(w))))return h("invalid payload");m.data=w}return y("decoded %s as %j",f,m),m}function p(f){this.reconPack=f,this.buffers=[]}function h(f){return{type:l.ERROR,data:"parser error: "+f}}var y=d(8)("socket.io-parser"),m=d(11),g=d(12),v=d(13),b=d(14);l.protocol=4,l.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],l.CONNECT=0,l.DISCONNECT=1,l.EVENT=2,l.ACK=3,l.ERROR=4,l.BINARY_EVENT=5,l.BINARY_ACK=6,l.Encoder=r,l.Decoder=a;var C=l.ERROR+'"encode error"';r.prototype.encode=function(f,d){(y("encoding packet %j",f),l.BINARY_EVENT===f.type||l.BINARY_ACK===f.type)?function s(f,l){g.removeBlobs(f,(function n(f){var d=g.deconstructPacket(f),y=o(d.packet),m=d.buffers;m.unshift(y),l(m)}))}(f,d):d([o(f)])},m(a.prototype),a.prototype.add=function(f){var d;if("string"==typeof f)d=c(f),l.BINARY_EVENT===d.type||l.BINARY_ACK===d.type?(this.reconstructor=new p(d),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",d)):this.emit("decoded",d);else{if(!b(f)&&!f.base64)throw new Error("Unknown type: "+f);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(d=this.reconstructor.takeBinaryData(f))&&(this.reconstructor=null,this.emit("decoded",d))}},a.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){var l=g.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(f,l,d){(function(y){"use strict";function c(){var f;try{f=l.storage.debug}catch(f){}return!f&&void 0!==y&&"env"in y&&(f=y.env.DEBUG),f}var m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};(l=f.exports=d(9)).log=function s(){return"object"===("undefined"==typeof console?"undefined":m(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},l.formatArgs=function i(f){var d=this.useColors;if(f[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+f[0]+(d?"%c ":" ")+"+"+l.humanize(this.diff),d){var y="color: "+this.color;f.splice(1,0,y,"color: inherit");var m=0,g=0;f[0].replace(/%[a-zA-Z%]/g,(function(f){"%%"!==f&&(m++,"%c"===f&&(g=m))})),f.splice(g,0,y)}},l.save=function a(f){try{null==f?l.storage.removeItem("debug"):l.storage.debug=f}catch(f){}},l.load=c,l.useColors=function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},l.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function u(){try{return window.localStorage}catch(f){}}(),l.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],l.formatters.j=function(f){try{return JSON.stringify(f)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}},l.enable(c())}).call(l,d(4))},function(f,l,d){"use strict";function o(f){function n(){if(n.enabled){var f=n,y=+new Date,m=y-(d||y);f.diff=m,f.prev=d,f.curr=y,d=y;for(var g=new Array(arguments.length),v=0;v<g.length;v++)g[v]=arguments[v];g[0]=l.coerce(g[0]),"string"!=typeof g[0]&&g.unshift("%O");var b=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(function(d,y){if("%%"===d)return d;b++;var m=l.formatters[y];if("function"==typeof m){var v=g[b];d=m.call(f,v),g.splice(b,1),b--}return d})),l.formatArgs.call(f,g);var C=n.log||l.log||console.log.bind(console);C.apply(f,g)}}var d;return n.namespace=f,n.enabled=l.enabled(f),n.useColors=l.useColors(),n.color=function r(f){var d,y=0;for(d in f)y=(y<<5)-y+f.charCodeAt(d),y|=0;return l.colors[Math.abs(y)%l.colors.length]}(f),n.destroy=i,"function"==typeof l.init&&l.init(n),l.instances.push(n),n}function i(){var f=l.instances.indexOf(this);return-1!==f&&(l.instances.splice(f,1),!0)}(l=f.exports=o.debug=o.default=o).coerce=function u(f){return f instanceof Error?f.stack||f.message:f},l.disable=function a(){l.enable("")},l.enable=function s(f){l.save(f),l.names=[],l.skips=[];var d,y=("string"==typeof f?f:"").split(/[\s,]+/),m=y.length;for(d=0;d<m;d++)y[d]&&("-"===(f=y[d].replace(/\*/g,".*?"))[0]?l.skips.push(new RegExp("^"+f.substr(1)+"$")):l.names.push(new RegExp("^"+f+"$")));for(d=0;d<l.instances.length;d++){var g=l.instances[d];g.enabled=l.enabled(g.namespace)}},l.enabled=function c(f){if("*"===f[f.length-1])return!0;var d,y;for(d=0,y=l.skips.length;d<y;d++)if(l.skips[d].test(f))return!1;for(d=0,y=l.names.length;d<y;d++)if(l.names[d].test(f))return!0;return!1},l.humanize=d(10),l.instances=[],l.names=[],l.skips=[],l.formatters={}},function(f,l){function o(f){return i(f,g,"day")||i(f,m,"hour")||i(f,y,"minute")||i(f,d,"second")||f+" ms"}function i(f,l,d){if(!(f<l))return f<1.5*l?Math.floor(f/l)+" "+d:Math.ceil(f/l)+" "+d+"s"}var d=1e3,y=60*d,m=60*y,g=24*m,v=365.25*g;f.exports=function(f,l){l=l||{};var b=typeof f;if("string"===b&&f.length>0)return function n(f){if(!((f=String(f)).length>100)){var l=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(l){var b=parseFloat(l[1]);switch((l[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return b*v;case"days":case"day":case"d":return b*g;case"hours":case"hour":case"hrs":case"hr":case"h":return b*m;case"minutes":case"minute":case"mins":case"min":case"m":return b*y;case"seconds":case"second":case"secs":case"sec":case"s":return b*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return b;default:return}}}}(f);if("number"===b&&!1===isNaN(f))return l.long?o(f):function r(f){return f>=g?Math.round(f/g)+"d":f>=m?Math.round(f/m)+"h":f>=y?Math.round(f/y)+"m":f>=d?Math.round(f/d)+"s":f+"ms"}(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},function(f,l,d){function r(f){if(f)return function o(f){for(var l in r.prototype)f[l]=r.prototype[l];return f}(f)}f.exports=r,r.prototype.on=r.prototype.addEventListener=function(f,l){return this._callbacks=this._callbacks||{},(this._callbacks["$"+f]=this._callbacks["$"+f]||[]).push(l),this},r.prototype.once=function(f,l){function n(){this.off(f,n),l.apply(this,arguments)}return n.fn=l,this.on(f,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(f,l){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var d=this._callbacks["$"+f];if(!d)return this;if(1==arguments.length)return delete this._callbacks["$"+f],this;for(var y,m=0;m<d.length;m++)if((y=d[m])===l||y.fn===l){d.splice(m,1);break}return this},r.prototype.emit=function(f){this._callbacks=this._callbacks||{};var l=[].slice.call(arguments,1),d=this._callbacks["$"+f];if(d)for(var y=0,m=(d=d.slice(0)).length;y<m;++y)d[y].apply(this,l);return this},r.prototype.listeners=function(f){return this._callbacks=this._callbacks||{},this._callbacks["$"+f]||[]},r.prototype.hasListeners=function(f){return!!this.listeners(f).length}},function(f,l,d){function r(f,l){if(!f)return f;if(m(f)){var d={_placeholder:!0,num:l.length};return l.push(f),d}if(y(f)){for(var g=new Array(f.length),v=0;v<f.length;v++)g[v]=r(f[v],l);return g}if("object"==typeof f&&!(f instanceof Date)){g={};for(var b in f)g[b]=r(f[b],l);return g}return f}function o(f,l){if(!f)return f;if(f&&f._placeholder)return l[f.num];if(y(f))for(var d=0;d<f.length;d++)f[d]=o(f[d],l);else if("object"==typeof f)for(var m in f)f[m]=o(f[m],l);return f}var y=d(13),m=d(14),g=Object.prototype.toString,v="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===g.call(Blob),b="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===g.call(File);l.deconstructPacket=function(f){var l=[],d=f.data,y=f;return y.data=r(d,l),y.attachments=l.length,{packet:y,buffers:l}},l.reconstructPacket=function(f,l){return f.data=o(f.data,l),f.attachments=void 0,f},l.removeBlobs=function(f,l){var d=0,g=f;(function n(f,C,w){if(!f)return f;if(v&&f instanceof Blob||b&&f instanceof File){d++;var k=new FileReader;k.onload=function(){w?w[C]=this.result:g=this.result,--d||l(g)},k.readAsArrayBuffer(f)}else if(y(f))for(var x=0;x<f.length;x++)n(f[x],x,f);else if("object"==typeof f&&!m(f))for(var A in f)n(f[A],A,f)})(g),d||l(g)}},function(f,l){var d={}.toString;f.exports=Array.isArray||function(f){return"[object Array]"==d.call(f)}},function(f,l){f.exports=function n(f){return d&&Buffer.isBuffer(f)||y&&(f instanceof ArrayBuffer||i(f))};var d="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,y="function"==typeof ArrayBuffer,i=function(f){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(f):f.buffer instanceof ArrayBuffer}},function(f,l,d){function r(f,l){if(!(this instanceof r))return new r(f,l);f&&"object"==typeof f&&(l=f,f=void 0),(l=l||{}).path=l.path||"/socket.io",this.nsps={},this.subs=[],this.opts=l,this.reconnection(!1!==l.reconnection),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor(l.randomizationFactor||.5),this.backoff=new x({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==l.timeout?2e4:l.timeout),this.readyState="closed",this.uri=f,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var d=l.parser||v;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this.autoConnect=!1!==l.autoConnect,this.autoConnect&&this.open()}var y=d(16),m=d(39),g=d(11),v=d(7),b=d(41),C=d(42),w=d(3)("socket.io-client:manager"),k=d(38),x=d(43),A=Object.prototype.hasOwnProperty;f.exports=r,r.prototype.emitAll=function(){for(var f in this.emit.apply(this,arguments),this.nsps)A.call(this.nsps,f)&&this.nsps[f].emit.apply(this.nsps[f],arguments)},r.prototype.updateSocketIds=function(){for(var f in this.nsps)A.call(this.nsps,f)&&(this.nsps[f].id=this.generateId(f))},r.prototype.generateId=function(f){return("/"===f?"":f+"#")+this.engine.id},g(r.prototype),r.prototype.reconnection=function(f){return arguments.length?(this._reconnection=!!f,this):this._reconnection},r.prototype.reconnectionAttempts=function(f){return arguments.length?(this._reconnectionAttempts=f,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(f){return arguments.length?(this._reconnectionDelay=f,this.backoff&&this.backoff.setMin(f),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(f){return arguments.length?(this._randomizationFactor=f,this.backoff&&this.backoff.setJitter(f),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(f){return arguments.length?(this._reconnectionDelayMax=f,this.backoff&&this.backoff.setMax(f),this):this._reconnectionDelayMax},r.prototype.timeout=function(f){return arguments.length?(this._timeout=f,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(f,l){if(w("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;w("opening %s",this.uri),this.engine=y(this.uri,this.opts);var d=this.engine,m=this;this.readyState="opening",this.skipReconnect=!1;var g=b(d,"open",(function(){m.onopen(),f&&f()})),v=b(d,"error",(function(l){if(w("connect_error"),m.cleanup(),m.readyState="closed",m.emitAll("connect_error",l),f){var d=new Error("Connection error");d.data=l,f(d)}else m.maybeReconnectOnOpen()}));if(!1!==this._timeout){var C=this._timeout;w("connect attempt will timeout after %d",C);var k=setTimeout((function(){w("connect attempt timed out after %d",C),g.destroy(),d.close(),d.emit("error","timeout"),m.emitAll("connect_timeout",C)}),C);this.subs.push({destroy:function(){clearTimeout(k)}})}return this.subs.push(g),this.subs.push(v),this},r.prototype.onopen=function(){w("open"),this.cleanup(),this.readyState="open",this.emit("open");var f=this.engine;this.subs.push(b(f,"data",C(this,"ondata"))),this.subs.push(b(f,"ping",C(this,"onping"))),this.subs.push(b(f,"pong",C(this,"onpong"))),this.subs.push(b(f,"error",C(this,"onerror"))),this.subs.push(b(f,"close",C(this,"onclose"))),this.subs.push(b(this.decoder,"decoded",C(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(f){this.decoder.add(f)},r.prototype.ondecoded=function(f){this.emit("packet",f)},r.prototype.onerror=function(f){w("error",f),this.emitAll("error",f)},r.prototype.socket=function(f,l){function n(){~k(y.connecting,d)||y.connecting.push(d)}var d=this.nsps[f];if(!d){d=new m(this,f,l),this.nsps[f]=d;var y=this;d.on("connecting",n),d.on("connect",(function(){d.id=y.generateId(f)})),this.autoConnect&&n()}return d},r.prototype.destroy=function(f){var l=k(this.connecting,f);~l&&this.connecting.splice(l,1),this.connecting.length||this.close()},r.prototype.packet=function(f){w("writing packet %j",f);var l=this;f.query&&0===f.type&&(f.nsp+="?"+f.query),l.encoding?l.packetBuffer.push(f):(l.encoding=!0,this.encoder.encode(f,(function(d){for(var y=0;y<d.length;y++)l.engine.write(d[y],f.options);l.encoding=!1,l.processPacketQueue()})))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var f=this.packetBuffer.shift();this.packet(f)}},r.prototype.cleanup=function(){w("cleanup");for(var f=this.subs.length,l=0;l<f;l++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){w("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(f){w("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",f),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var f=this;if(this.backoff.attempts>=this._reconnectionAttempts)w("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var l=this.backoff.duration();w("will wait %dms before reconnect attempt",l),this.reconnecting=!0;var d=setTimeout((function(){f.skipReconnect||(w("attempting reconnect"),f.emitAll("reconnect_attempt",f.backoff.attempts),f.emitAll("reconnecting",f.backoff.attempts),f.skipReconnect||f.open((function(l){l?(w("reconnect attempt error"),f.reconnecting=!1,f.reconnect(),f.emitAll("reconnect_error",l.data)):(w("reconnect success"),f.onreconnect())})))}),l);this.subs.push({destroy:function(){clearTimeout(d)}})}},r.prototype.onreconnect=function(){var f=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",f)}},function(f,l,d){f.exports=d(17),f.exports.parser=d(24)},function(f,l,d){function r(f,l){return this instanceof r?(l=l||{},f&&"object"==typeof f&&(l=f,f=null),f?(f=C(f),l.hostname=f.host,l.secure="https"===f.protocol||"wss"===f.protocol,l.port=f.port,f.query&&(l.query=f.query)):l.host&&(l.hostname=C(l.host).host),this.secure=null!=l.secure?l.secure:"undefined"!=typeof location&&"https:"===location.protocol,l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.agent=l.agent||!1,this.hostname=l.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=l.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=l.query||{},"string"==typeof this.query&&(this.query=w.decode(this.query)),this.upgrade=!1!==l.upgrade,this.path=(l.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!l.forceJSONP,this.jsonp=!1!==l.jsonp,this.forceBase64=!!l.forceBase64,this.enablesXDR=!!l.enablesXDR,this.withCredentials=!1!==l.withCredentials,this.timestampParam=l.timestampParam||"t",this.timestampRequests=l.timestampRequests,this.transports=l.transports||["polling","websocket"],this.transportOptions=l.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=l.policyPort||843,this.rememberUpgrade=l.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=l.onlyBinaryUpgrades,this.perMessageDeflate=!1!==l.perMessageDeflate&&(l.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=l.pfx||null,this.key=l.key||null,this.passphrase=l.passphrase||null,this.cert=l.cert||null,this.ca=l.ca||null,this.ciphers=l.ciphers||null,this.rejectUnauthorized=void 0===l.rejectUnauthorized||l.rejectUnauthorized,this.forceNode=!!l.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(l.extraHeaders&&Object.keys(l.extraHeaders).length>0&&(this.extraHeaders=l.extraHeaders),l.localAddress&&(this.localAddress=l.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,void this.open()):new r(f,l)}var y=d(18),m=d(11),g=d(3)("engine.io-client:socket"),v=d(38),b=d(24),C=d(2),w=d(32);f.exports=r,r.priorWebsocketSuccess=!1,m(r.prototype),r.protocol=b.protocol,r.Socket=r,r.Transport=d(23),r.transports=d(18),r.parser=d(24),r.prototype.createTransport=function(f){g('creating transport "%s"',f);var l=function o(f){var l={};for(var d in f)f.hasOwnProperty(d)&&(l[d]=f[d]);return l}(this.query);l.EIO=b.protocol,l.transport=f;var d=this.transportOptions[f]||{};return this.id&&(l.sid=this.id),new y[f]({query:l,socket:this,agent:d.agent||this.agent,hostname:d.hostname||this.hostname,port:d.port||this.port,secure:d.secure||this.secure,path:d.path||this.path,forceJSONP:d.forceJSONP||this.forceJSONP,jsonp:d.jsonp||this.jsonp,forceBase64:d.forceBase64||this.forceBase64,enablesXDR:d.enablesXDR||this.enablesXDR,withCredentials:d.withCredentials||this.withCredentials,timestampRequests:d.timestampRequests||this.timestampRequests,timestampParam:d.timestampParam||this.timestampParam,policyPort:d.policyPort||this.policyPort,pfx:d.pfx||this.pfx,key:d.key||this.key,passphrase:d.passphrase||this.passphrase,cert:d.cert||this.cert,ca:d.ca||this.ca,ciphers:d.ciphers||this.ciphers,rejectUnauthorized:d.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:d.perMessageDeflate||this.perMessageDeflate,extraHeaders:d.extraHeaders||this.extraHeaders,forceNode:d.forceNode||this.forceNode,localAddress:d.localAddress||this.localAddress,requestTimeout:d.requestTimeout||this.requestTimeout,protocols:d.protocols||void 0,isReactNative:this.isReactNative})},r.prototype.open=function(){var f;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))f="websocket";else{if(0===this.transports.length){var l=this;return void setTimeout((function(){l.emit("error","No transports available")}),0)}f=this.transports[0]}this.readyState="opening";try{f=this.createTransport(f)}catch(f){return this.transports.shift(),void this.open()}f.open(),this.setTransport(f)},r.prototype.setTransport=function(f){g("setting transport %s",f.name);var l=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",(function(){l.onDrain()})).on("packet",(function(f){l.onPacket(f)})).on("error",(function(f){l.onError(f)})).on("close",(function(){l.onClose("transport close")}))},r.prototype.probe=function(f){function e(){if(y.onlyBinaryUpgrades){var m=!this.supportsBinary&&y.transport.supportsBinary;d=d||m}d||(g('probe transport "%s" opened',f),l.send([{type:"ping",data:"probe"}]),l.once("packet",(function(m){if(!d)if("pong"===m.type&&"probe"===m.data){if(g('probe transport "%s" pong',f),y.upgrading=!0,y.emit("upgrading",l),!l)return;r.priorWebsocketSuccess="websocket"===l.name,g('pausing current transport "%s"',y.transport.name),y.transport.pause((function(){d||"closed"!==y.readyState&&(g("changing transport and sending upgrade packet"),u(),y.setTransport(l),l.send([{type:"upgrade"}]),y.emit("upgrade",l),l=null,y.upgrading=!1,y.flush())}))}else{g('probe transport "%s" failed',f);var v=new Error("probe error");v.transport=l.name,y.emit("upgradeError",v)}})))}function n(){d||(d=!0,u(),l.close(),l=null)}function o(d){var m=new Error("probe error: "+d);m.transport=l.name,n(),g('probe transport "%s" failed because of error: %s',f,d),y.emit("upgradeError",m)}function i(){o("transport closed")}function s(){o("socket closed")}function c(f){l&&f.name!==l.name&&(g('"%s" works - aborting "%s"',f.name,l.name),n())}function u(){l.removeListener("open",e),l.removeListener("error",o),l.removeListener("close",i),y.removeListener("close",s),y.removeListener("upgrading",c)}g('probing transport "%s"',f);var l=this.createTransport(f,{probe:1}),d=!1,y=this;r.priorWebsocketSuccess=!1,l.once("open",e),l.once("error",o),l.once("close",i),this.once("close",s),this.once("upgrading",c),l.open()},r.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var f=0,l=this.upgrades.length;f<l;f++)this.probe(this.upgrades[f])}},r.prototype.onPacket=function(f){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(g('socket receive: type "%s", data "%s"',f.type,f.data),this.emit("packet",f),this.emit("heartbeat"),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var l=new Error("server error");l.code=f.data,this.onError(l);break;case"message":this.emit("data",f.data),this.emit("message",f.data)}else g('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(f){this.emit("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(f){clearTimeout(this.pingTimeoutTimer);var l=this;l.pingTimeoutTimer=setTimeout((function(){"closed"!==l.readyState&&l.onClose("ping timeout")}),f||l.pingInterval+l.pingTimeout)},r.prototype.setPing=function(){var f=this;clearTimeout(f.pingIntervalTimer),f.pingIntervalTimer=setTimeout((function(){g("writing ping packet - expecting pong within %sms",f.pingTimeout),f.ping(),f.onHeartbeat(f.pingTimeout)}),f.pingInterval)},r.prototype.ping=function(){var f=this;this.sendPacket("ping",(function(){f.emit("ping")}))},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(g("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(f,l,d){return this.sendPacket("message",f,l,d),this},r.prototype.sendPacket=function(f,l,d,y){if("function"==typeof l&&(y=l,l=void 0),"function"==typeof d&&(y=d,d=null),"closing"!==this.readyState&&"closed"!==this.readyState){(d=d||{}).compress=!1!==d.compress;var m={type:f,data:l,options:d};this.emit("packetCreate",m),this.writeBuffer.push(m),y&&this.once("flush",y),this.flush()}},r.prototype.close=function(){function t(){f.onClose("forced close"),g("socket closing - telling transport to close"),f.transport.close()}function e(){f.removeListener("upgrade",e),f.removeListener("upgradeError",e),t()}function n(){f.once("upgrade",e),f.once("upgradeError",e)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var f=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?n():t()})):this.upgrading?n():t()}return this},r.prototype.onError=function(f){g("socket error %j",f),r.priorWebsocketSuccess=!1,this.emit("error",f),this.onClose("transport error",f)},r.prototype.onClose=function(f,l){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){g('socket close with reason: "%s"',f);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",f,l),this.writeBuffer=[],this.prevBufferLen=0}},r.prototype.filterUpgrades=function(f){for(var l=[],d=0,y=f.length;d<y;d++)~v(this.transports,f[d])&&l.push(f[d]);return l}},function(f,l,d){var y=d(19),m=d(21),g=d(35),v=d(36);l.polling=function r(f){var l=!1,d=!1,v=!1!==f.jsonp;if("undefined"!=typeof location){var b="https:"===location.protocol,C=location.port;C||(C=b?443:80),l=f.hostname!==location.hostname||C!==f.port,d=f.secure!==b}if(f.xdomain=l,f.xscheme=d,"open"in new y(f)&&!f.forceJSONP)return new m(f);if(!v)throw new Error("JSONP disabled");return new g(f)},l.websocket=v},function(f,l,d){var y=d(20);f.exports=function(f){var l=f.xdomain,d=f.xscheme,m=f.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!l||y))return new XMLHttpRequest}catch(f){}try{if("undefined"!=typeof XDomainRequest&&!d&&m)return new XDomainRequest}catch(f){}if(!l)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(f){}}},function(f,l){try{f.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(l){f.exports=!1}},function(f,l,d){function r(){}function o(f){if(m.call(this,f),this.requestTimeout=f.requestTimeout,this.extraHeaders=f.extraHeaders,"undefined"!=typeof location){var l="https:"===location.protocol,d=location.port;d||(d=l?443:80),this.xd="undefined"!=typeof location&&f.hostname!==location.hostname||d!==f.port,this.xs=f.secure!==l}}function i(f){this.method=f.method||"GET",this.uri=f.uri,this.xd=!!f.xd,this.xs=!!f.xs,this.async=!1!==f.async,this.data=void 0!==f.data?f.data:null,this.agent=f.agent,this.isBinary=f.isBinary,this.supportsBinary=f.supportsBinary,this.enablesXDR=f.enablesXDR,this.withCredentials=f.withCredentials,this.requestTimeout=f.requestTimeout,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized,this.extraHeaders=f.extraHeaders,this.create()}function s(){for(var f in i.requests)i.requests.hasOwnProperty(f)&&i.requests[f].abort()}var y=d(19),m=d(22),g=d(11),v=d(33),b=d(3)("engine.io-client:polling-xhr");if(f.exports=o,f.exports.Request=i,v(o,m),o.prototype.supportsBinary=!0,o.prototype.request=function(f){return(f=f||{}).uri=this.uri(),f.xd=this.xd,f.xs=this.xs,f.agent=this.agent||!1,f.supportsBinary=this.supportsBinary,f.enablesXDR=this.enablesXDR,f.withCredentials=this.withCredentials,f.pfx=this.pfx,f.key=this.key,f.passphrase=this.passphrase,f.cert=this.cert,f.ca=this.ca,f.ciphers=this.ciphers,f.rejectUnauthorized=this.rejectUnauthorized,f.requestTimeout=this.requestTimeout,f.extraHeaders=this.extraHeaders,new i(f)},o.prototype.doWrite=function(f,l){var d="string"!=typeof f&&void 0!==f,y=this.request({method:"POST",data:f,isBinary:d}),m=this;y.on("success",l),y.on("error",(function(f){m.onError("xhr post error",f)})),this.sendXhr=y},o.prototype.doPoll=function(){b("xhr poll");var f=this.request(),l=this;f.on("data",(function(f){l.onData(f)})),f.on("error",(function(f){l.onError("xhr poll error",f)})),this.pollXhr=f},g(i.prototype),i.prototype.create=function(){var f={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};f.pfx=this.pfx,f.key=this.key,f.passphrase=this.passphrase,f.cert=this.cert,f.ca=this.ca,f.ciphers=this.ciphers,f.rejectUnauthorized=this.rejectUnauthorized;var l=this.xhr=new y(f),d=this;try{b("xhr open %s: %s",this.method,this.uri),l.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var m in l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(m)&&l.setRequestHeader(m,this.extraHeaders[m])}catch(f){}if("POST"===this.method)try{this.isBinary?l.setRequestHeader("Content-type","application/octet-stream"):l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(f){}try{l.setRequestHeader("Accept","*/*")}catch(f){}"withCredentials"in l&&(l.withCredentials=this.withCredentials),this.requestTimeout&&(l.timeout=this.requestTimeout),this.hasXDR()?(l.onload=function(){d.onLoad()},l.onerror=function(){d.onError(l.responseText)}):l.onreadystatechange=function(){if(2===l.readyState)try{var f=l.getResponseHeader("Content-Type");(d.supportsBinary&&"application/octet-stream"===f||"application/octet-stream; charset=UTF-8"===f)&&(l.responseType="arraybuffer")}catch(f){}4===l.readyState&&(200===l.status||1223===l.status?d.onLoad():setTimeout((function(){d.onError("number"==typeof l.status?l.status:0)}),0))},b("xhr data %s",this.data),l.send(this.data)}catch(f){return void setTimeout((function(){d.onError(f)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(f){this.emit("data",f),this.onSuccess()},i.prototype.onError=function(f){this.emit("error",f),this.cleanup(!0)},i.prototype.cleanup=function(f){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,f)try{this.xhr.abort()}catch(f){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var f;try{var l;try{l=this.xhr.getResponseHeader("Content-Type")}catch(f){}f=("application/octet-stream"===l||"application/octet-stream; charset=UTF-8"===l)&&this.xhr.response||this.xhr.responseText}catch(f){this.onError(f)}null!=f&&this.onData(f)},i.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},i.requestsCount=0,i.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",s);else if("function"==typeof addEventListener){var C="onpagehide"in self?"pagehide":"unload";addEventListener(C,s,!1)}},function(f,l,d){function r(f){var l=f&&f.forceBase64;w&&!l||(this.supportsBinary=!1),y.call(this,f)}var y=d(23),m=d(32),g=d(24),v=d(33),b=d(34),C=d(3)("engine.io-client:polling");f.exports=r;var w=null!=new(d(19))({xdomain:!1}).responseType;v(r,y),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(f){function e(){C("paused"),l.readyState="paused",f()}var l=this;if(this.readyState="pausing",this.polling||!this.writable){var d=0;this.polling&&(C("we are currently polling - waiting to pause"),d++,this.once("pollComplete",(function(){C("pre-pause polling complete"),--d||e()}))),this.writable||(C("we are currently writing - waiting to pause"),d++,this.once("drain",(function(){C("pre-pause writing complete"),--d||e()})))}else e()},r.prototype.poll=function(){C("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(f){var l=this;C("polling got data %s",f);g.decodePayload(f,this.socket.binaryType,(function(f,d,y){return"opening"===l.readyState&&l.onOpen(),"close"===f.type?(l.onClose(),!1):void l.onPacket(f)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():C('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){C("writing close packet"),f.write([{type:"close"}])}var f=this;"open"===this.readyState?(C("transport open - closing"),t()):(C("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(f){var l=this;this.writable=!1;var n=function(){l.writable=!0,l.emit("drain")};g.encodePayload(f,this.supportsBinary,(function(f){l.doWrite(f,n)}))},r.prototype.uri=function(){var f=this.query||{},l=this.secure?"https":"http",d="";return!1!==this.timestampRequests&&(f[this.timestampParam]=b()),this.supportsBinary||f.sid||(f.b64=1),f=m.encode(f),this.port&&("https"===l&&443!==Number(this.port)||"http"===l&&80!==Number(this.port))&&(d=":"+this.port),f.length&&(f="?"+f),l+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+d+this.path+f}},function(f,l,d){function r(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.withCredentials=f.withCredentials,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized,this.forceNode=f.forceNode,this.isReactNative=f.isReactNative,this.extraHeaders=f.extraHeaders,this.localAddress=f.localAddress}var y=d(24),m=d(11);f.exports=r,m(r.prototype),r.prototype.onError=function(f,l){var d=new Error(f);return d.type="TransportError",d.description=l,this.emit("error",d),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(f){if("open"!==this.readyState)throw new Error("Transport not open");this.write(f)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(f){var l=y.decodePacket(f,this.socket.binaryType);this.onPacket(l)},r.prototype.onPacket=function(f){this.emit("packet",f)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(f,l,d){function r(f,d){return d("b"+l.packets[f.type]+f.data.data)}function o(f,d,y){if(!d)return l.encodeBase64Packet(f,y);var m=f.data,g=new Uint8Array(m),v=new Uint8Array(1+m.byteLength);v[0]=A[f.type];for(var b=0;b<g.length;b++)v[b+1]=g[b];return y(v.buffer)}function s(f,d,y){if(!d)return l.encodeBase64Packet(f,y);if(x)return function i(f,d,y){if(!d)return l.encodeBase64Packet(f,y);var m=new FileReader;return m.onload=function(){l.encodePacket({type:f.type,data:m.result},d,!0,y)},m.readAsArrayBuffer(f.data)}(f,d,y);var m=new Uint8Array(1);return m[0]=A[f.type],y(new S([m.buffer,f.data]))}function c(f,l,d){for(var y=new Array(f.length),m=b(f.length,d),i=function(f,d,m){l(d,(function(l,d){y[f]=d,m(l,y)}))},g=0;g<f.length;g++)i(g,f[g],m)}var y,m=d(25),g=d(26),v=d(27),b=d(28),C=d(29);"undefined"!=typeof ArrayBuffer&&(y=d(30));var w="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),k="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),x=w||k;l.protocol=3;var A=l.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},F=m(A),B={type:"error",data:"parser error"},S=d(31);l.encodePacket=function(f,l,d,y){"function"==typeof l&&(y=l,l=!1),"function"==typeof d&&(y=d,d=null);var m=void 0===f.data?void 0:f.data.buffer||f.data;if("undefined"!=typeof ArrayBuffer&&m instanceof ArrayBuffer)return o(f,l,y);if(void 0!==S&&m instanceof S)return s(f,l,y);if(m&&m.base64)return r(f,y);var g=A[f.type];return void 0!==f.data&&(g+=d?C.encode(String(f.data),{strict:!1}):String(f.data)),y(""+g)},l.encodeBase64Packet=function(f,d){var y,m="b"+l.packets[f.type];if(void 0!==S&&f.data instanceof S){var g=new FileReader;return g.onload=function(){var f=g.result.split(",")[1];d(m+f)},g.readAsDataURL(f.data)}try{y=String.fromCharCode.apply(null,new Uint8Array(f.data))}catch(l){for(var v=new Uint8Array(f.data),b=new Array(v.length),C=0;C<v.length;C++)b[C]=v[C];y=String.fromCharCode.apply(null,b)}return m+=btoa(y),d(m)},l.decodePacket=function(f,d,y){if(void 0===f)return B;if("string"==typeof f){if("b"===f.charAt(0))return l.decodeBase64Packet(f.substr(1),d);if(y&&!1===(f=function a(f){try{f=C.decode(f,{strict:!1})}catch(f){return!1}return f}(f)))return B;var m=f.charAt(0);return Number(m)==m&&F[m]?f.length>1?{type:F[m],data:f.substring(1)}:{type:F[m]}:B}m=new Uint8Array(f)[0];var g=v(f,1);return S&&"blob"===d&&(g=new S([g])),{type:F[m],data:g}},l.decodeBase64Packet=function(f,l){var d=F[f.charAt(0)];if(!y)return{type:d,data:{base64:!0,data:f.substr(1)}};var m=y.decode(f.substr(1));return"blob"===l&&S&&(m=new S([m])),{type:d,data:m}},l.encodePayload=function(f,d,y){"function"==typeof d&&(y=d,d=null);var m=g(f);return d&&m?S&&!x?l.encodePayloadAsBlob(f,y):l.encodePayloadAsArrayBuffer(f,y):f.length?void c(f,(function i(f,y){l.encodePacket(f,!!m&&d,!1,(function(f){y(null,function o(f){return f.length+":"+f}(f))}))}),(function(f,l){return y(l.join(""))})):y("0:")},l.decodePayload=function(f,d,y){if("string"!=typeof f)return l.decodePayloadAsBinary(f,d,y);var m;if("function"==typeof d&&(y=d,d=null),""===f)return y(B,0,1);for(var g,v,b="",C=0,w=f.length;C<w;C++){var k=f.charAt(C);if(":"===k){if(""===b||b!=(g=Number(b)))return y(B,0,1);if(b!=(v=f.substr(C+1,g)).length)return y(B,0,1);if(v.length){if(m=l.decodePacket(v,d,!1),B.type===m.type&&B.data===m.data)return y(B,0,1);if(!1===y(m,C+g,w))return}C+=g,b=""}else b+=k}return""!==b?y(B,0,1):void 0},l.encodePayloadAsArrayBuffer=function(f,d){return f.length?void c(f,(function r(f,d){l.encodePacket(f,!0,!0,(function(f){return d(null,f)}))}),(function(f,l){var y=l.reduce((function(f,l){var d;return f+(d="string"==typeof l?l.length:l.byteLength).toString().length+d+2}),0),m=new Uint8Array(y),g=0;return l.forEach((function(f){var l="string"==typeof f,d=f;if(l){for(var y=new Uint8Array(f.length),v=0;v<f.length;v++)y[v]=f.charCodeAt(v);d=y.buffer}m[g++]=l?0:1;var b=d.byteLength.toString();for(v=0;v<b.length;v++)m[g++]=parseInt(b[v]);m[g++]=255;for(y=new Uint8Array(d),v=0;v<y.length;v++)m[g++]=y[v]})),d(m.buffer)})):d(new ArrayBuffer(0))},l.encodePayloadAsBlob=function(f,d){c(f,(function r(f,d){l.encodePacket(f,!0,!0,(function(f){var l=new Uint8Array(1);if(l[0]=1,"string"==typeof f){for(var y=new Uint8Array(f.length),m=0;m<f.length;m++)y[m]=f.charCodeAt(m);f=y.buffer,l[0]=0}var g=(f instanceof ArrayBuffer?f.byteLength:f.size).toString(),v=new Uint8Array(g.length+1);for(m=0;m<g.length;m++)v[m]=parseInt(g[m]);if(v[g.length]=255,S){var b=new S([l.buffer,v.buffer,f]);d(null,b)}}))}),(function(f,l){return d(new S(l))}))},l.decodePayloadAsBinary=function(f,d,y){"function"==typeof d&&(y=d,d=null);for(var m=f,g=[];m.byteLength>0;){for(var b=new Uint8Array(m),C=0===b[0],w="",k=1;255!==b[k];k++){if(w.length>310)return y(B,0,1);w+=b[k]}m=v(m,2+w.length),w=parseInt(w);var x=v(m,0,w);if(C)try{x=String.fromCharCode.apply(null,new Uint8Array(x))}catch(f){var A=new Uint8Array(x);x="";for(k=0;k<A.length;k++)x+=String.fromCharCode(A[k])}g.push(x),m=v(m,w)}var F=g.length;g.forEach((function(f,m){y(l.decodePacket(f,d,!0),m,F)}))}},function(f,l){f.exports=Object.keys||function(f){var l=[],d=Object.prototype.hasOwnProperty;for(var y in f)d.call(f,y)&&l.push(y);return l}},function(f,l,d){var y=d(13),m=Object.prototype.toString,g="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===m.call(Blob),v="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===m.call(File);f.exports=function r(f){if(!f||"object"!=typeof f)return!1;if(y(f)){for(var l=0,d=f.length;l<d;l++)if(r(f[l]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(f)||"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||g&&f instanceof Blob||v&&f instanceof File)return!0;if(f.toJSON&&"function"==typeof f.toJSON&&1===arguments.length)return r(f.toJSON(),!0);for(var m in f)if(Object.prototype.hasOwnProperty.call(f,m)&&r(f[m]))return!0;return!1}},function(f,l){f.exports=function(f,l,d){var y=f.byteLength;if(l=l||0,d=d||y,f.slice)return f.slice(l,d);if(l<0&&(l+=y),d<0&&(d+=y),d>y&&(d=y),l>=y||l>=d||0===y)return new ArrayBuffer(0);for(var m=new Uint8Array(f),g=new Uint8Array(d-l),v=l,b=0;v<d;v++,b++)g[b]=m[v];return g.buffer}},function(f,l){function r(){}f.exports=function n(f,l,d){function o(f,m){if(o.count<=0)throw new Error("after called too many times");--o.count,f?(y=!0,l(f),l=d):0!==o.count||y||l(null,m)}var y=!1;return d=d||r,o.count=f,0===f?l():o}},function(f,l){function n(f){for(var l,d,y=[],m=0,g=f.length;m<g;)(l=f.charCodeAt(m++))>=55296&&l<=56319&&m<g?56320==(64512&(d=f.charCodeAt(m++)))?y.push(((1023&l)<<10)+(1023&d)+65536):(y.push(l),m--):y.push(l);return y}function o(f,l){if(f>=55296&&f<=57343){if(l)throw Error("Lone surrogate U+"+f.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function i(f,l){return g(f>>l&63|128)}function s(f,l){if(0==(4294967168&f))return g(f);var d="";return 0==(4294965248&f)?d=g(f>>6&31|192):0==(4294901760&f)?(o(f,l)||(f=65533),d=g(f>>12&15|224),d+=i(f,6)):0==(4292870144&f)&&(d=g(f>>18&7|240),d+=i(f,12),d+=i(f,6)),d+g(63&f|128)}function c(){if(m>=y)throw Error("Invalid byte index");var f=255&d[m];if(m++,128==(192&f))return 63&f;throw Error("Invalid continuation byte")}function u(f){var l,g;if(m>y)throw Error("Invalid byte index");if(m==y)return!1;if(l=255&d[m],m++,0==(128&l))return l;if(192==(224&l)){if((g=(31&l)<<6|c())>=128)return g;throw Error("Invalid continuation byte")}if(224==(240&l)){if((g=(15&l)<<12|c()<<6|c())>=2048)return o(g,f)?g:65533;throw Error("Invalid continuation byte")}if(240==(248&l)&&((g=(7&l)<<18|c()<<12|c()<<6|c())>=65536&&g<=1114111))return g;throw Error("Invalid UTF-8 detected")}/*! https://mths.be/utf8js v2.1.2 by @mathias */
var d,y,m,g=String.fromCharCode;f.exports={version:"2.1.2",encode:function a(f,l){for(var d=!1!==(l=l||{}).strict,y=n(f),m=y.length,g=-1,v="";++g<m;)v+=s(y[g],d);return v},decode:function p(f,l){var v=!1!==(l=l||{}).strict;d=n(f),y=d.length,m=0;for(var b,C=[];!1!==(b=u(v));)C.push(b);return function r(f){for(var l,d=f.length,y=-1,m="";++y<d;)(l=f[y])>65535&&(m+=g((l-=65536)>>>10&1023|55296),l=56320|1023&l),m+=g(l);return m}(C)}}},function(f,l){!function(){"use strict";for(var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=new Uint8Array(256),y=0;y<f.length;y++)d[f.charCodeAt(y)]=y;l.encode=function(l){var d,y=new Uint8Array(l),m=y.length,g="";for(d=0;d<m;d+=3)g+=f[y[d]>>2],g+=f[(3&y[d])<<4|y[d+1]>>4],g+=f[(15&y[d+1])<<2|y[d+2]>>6],g+=f[63&y[d+2]];return m%3==2?g=g.substring(0,g.length-1)+"=":m%3==1&&(g=g.substring(0,g.length-2)+"=="),g},l.decode=function(f){var l,y,m,g,v,b=.75*f.length,C=f.length,w=0;"="===f[f.length-1]&&(b--,"="===f[f.length-2]&&b--);var k=new ArrayBuffer(b),x=new Uint8Array(k);for(l=0;l<C;l+=4)y=d[f.charCodeAt(l)],m=d[f.charCodeAt(l+1)],g=d[f.charCodeAt(l+2)],v=d[f.charCodeAt(l+3)],x[w++]=y<<2|m>>4,x[w++]=(15&m)<<4|g>>2,x[w++]=(3&g)<<6|63&v;return k}}()},function(f,l){function n(f){return f.map((function(f){if(f.buffer instanceof ArrayBuffer){var l=f.buffer;if(f.byteLength!==l.byteLength){var d=new Uint8Array(f.byteLength);d.set(new Uint8Array(l,f.byteOffset,f.byteLength)),l=d.buffer}return l}return f}))}function r(f,l){l=l||{};var y=new d;return n(f).forEach((function(f){y.append(f)})),l.type?y.getBlob(l.type):y.getBlob()}function o(f,l){return new Blob(n(f),l||{})}var d=void 0!==d?d:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,y=function(){try{return 2===new Blob(["hi"]).size}catch(f){return!1}}(),m=y&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(f){return!1}}(),g=d&&d.prototype.append&&d.prototype.getBlob;"undefined"!=typeof Blob&&(r.prototype=Blob.prototype,o.prototype=Blob.prototype),f.exports=y?m?Blob:o:g?r:void 0},function(f,l){l.encode=function(f){var l="";for(var d in f)f.hasOwnProperty(d)&&(l.length&&(l+="&"),l+=encodeURIComponent(d)+"="+encodeURIComponent(f[d]));return l},l.decode=function(f){for(var l={},d=f.split("&"),y=0,m=d.length;y<m;y++){var g=d[y].split("=");l[decodeURIComponent(g[0])]=decodeURIComponent(g[1])}return l}},function(f,l){f.exports=function(f,l){var n=function(){};n.prototype=l.prototype,f.prototype=new n,f.prototype.constructor=f}},function(f,l){"use strict";function n(f){var l="";do{l=y[f%m]+l,f=Math.floor(f/m)}while(f>0);return l}function o(){var f=n(+new Date);return f!==d?(v=0,d=f):f+"."+n(v++)}for(var d,y="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),m=64,g={},v=0,b=0;b<m;b++)g[y[b]]=b;o.encode=n,o.decode=function r(f){var l=0;for(b=0;b<f.length;b++)l=l*m+g[f.charAt(b)];return l},f.exports=o},function(f,l,d){(function(l){function r(){}function o(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==l?l:{}}function i(f){if(y.call(this,f),this.query=this.query||{},!g){var l=o();g=l.___eio=l.___eio||[]}this.index=g.length;var d=this;g.push((function(f){d.onData(f)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){d.script&&(d.script.onerror=r)}),!1)}var y=d(22),m=d(33);f.exports=i;var g,v=/\n/g,b=/\\n/g;m(i,y),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),y.prototype.doClose.call(this)},i.prototype.doPoll=function(){var f=this,l=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),l.async=!0,l.src=this.uri(),l.onerror=function(l){f.onError("jsonp poll error",l)};var d=document.getElementsByTagName("script")[0];d?d.parentNode.insertBefore(l,d):(document.head||document.body).appendChild(l),this.script=l,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var f=document.createElement("iframe");document.body.appendChild(f),document.body.removeChild(f)}),100)},i.prototype.doWrite=function(f,l){function n(){r(),l()}function r(){if(d.iframe)try{d.form.removeChild(d.iframe)}catch(f){d.onError("jsonp polling iframe removal error",f)}try{var f='<iframe src="javascript:0" name="'+d.iframeId+'">';y=document.createElement(f)}catch(f){(y=document.createElement("iframe")).name=d.iframeId,y.src="javascript:0"}y.id=d.iframeId,d.form.appendChild(y),d.iframe=y}var d=this;if(!this.form){var y,m=document.createElement("form"),g=document.createElement("textarea"),C=this.iframeId="eio_iframe_"+this.index;m.className="socketio",m.style.position="absolute",m.style.top="-1000px",m.style.left="-1000px",m.target=C,m.method="POST",m.setAttribute("accept-charset","utf-8"),g.name="d",m.appendChild(g),document.body.appendChild(m),this.form=m,this.area=g}this.form.action=this.uri(),r(),f=f.replace(b,"\\\n"),this.area.value=f.replace(v,"\\n");try{this.form.submit()}catch(f){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===d.iframe.readyState&&n()}:this.iframe.onload=n}}).call(l,function(){return this}())},function(f,l,d){function r(f){f&&f.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=f.perMessageDeflate,this.usingBrowserWebSocket=y&&!f.forceNode,this.protocols=f.protocols,this.usingBrowserWebSocket||(x=m),g.call(this,f)}var y,m,g=d(23),v=d(24),b=d(32),C=d(33),w=d(34),k=d(3)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?y=WebSocket:"undefined"!=typeof self&&(y=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{m=d(37)}catch(f){}var x=y||m;f.exports=r,C(r,g),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var f=this.uri(),l=this.protocols,d={agent:this.agent,perMessageDeflate:this.perMessageDeflate};d.pfx=this.pfx,d.key=this.key,d.passphrase=this.passphrase,d.cert=this.cert,d.ca=this.ca,d.ciphers=this.ciphers,d.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(d.headers=this.extraHeaders),this.localAddress&&(d.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?l?new x(f,l):new x(f):new x(f,l,d)}catch(f){return this.emit("error",f)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var f=this;this.ws.onopen=function(){f.onOpen()},this.ws.onclose=function(){f.onClose()},this.ws.onmessage=function(l){f.onData(l.data)},this.ws.onerror=function(l){f.onError("websocket error",l)}},r.prototype.write=function(f){var l=this;this.writable=!1;for(var d=f.length,y=0,m=d;y<m;y++)!function(f){v.encodePacket(f,l.supportsBinary,(function(y){if(!l.usingBrowserWebSocket){var m={};if(f.options&&(m.compress=f.options.compress),l.perMessageDeflate)("string"==typeof y?Buffer.byteLength(y):y.length)<l.perMessageDeflate.threshold&&(m.compress=!1)}try{l.usingBrowserWebSocket?l.ws.send(y):l.ws.send(y,m)}catch(f){k("websocket closed before onclose event")}--d||(l.emit("flush"),setTimeout((function(){l.writable=!0,l.emit("drain")}),0))}))}(f[y])},r.prototype.onClose=function(){g.prototype.onClose.call(this)},r.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},r.prototype.uri=function(){var f=this.query||{},l=this.secure?"wss":"ws",d="";return this.port&&("wss"===l&&443!==Number(this.port)||"ws"===l&&80!==Number(this.port))&&(d=":"+this.port),this.timestampRequests&&(f[this.timestampParam]=w()),this.supportsBinary||(f.b64=1),(f=b.encode(f)).length&&(f="?"+f),l+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+d+this.path+f},r.prototype.check=function(){return!(!x||"__initialize"in x&&this.name===r.prototype.name)}},function(f,l){},function(f,l){var d=[].indexOf;f.exports=function(f,l){if(d)return f.indexOf(l);for(var y=0;y<f.length;++y)if(f[y]===l)return y;return-1}},function(f,l,d){function r(f,l,d){this.io=f,this.nsp=l,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},d&&d.query&&(this.query=d.query),this.io.autoConnect&&this.open()}var y=d(7),m=d(11),g=d(40),v=d(41),b=d(42),C=d(3)("socket.io-client:socket"),w=d(32),k=d(26);f.exports=r;var x={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},A=m.prototype.emit;m(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var f=this.io;this.subs=[v(f,"open",b(this,"onopen")),v(f,"packet",b(this,"onpacket")),v(f,"close",b(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},r.prototype.send=function(){var f=g(arguments);return f.unshift("message"),this.emit.apply(this,f),this},r.prototype.emit=function(f){if(x.hasOwnProperty(f))return A.apply(this,arguments),this;var l=g(arguments),d={type:(void 0!==this.flags.binary?this.flags.binary:k(l))?y.BINARY_EVENT:y.EVENT,data:l,options:{}};return d.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof l[l.length-1]&&(C("emitting packet with ack id %d",this.ids),this.acks[this.ids]=l.pop(),d.id=this.ids++),this.connected?this.packet(d):this.sendBuffer.push(d),this.flags={},this},r.prototype.packet=function(f){f.nsp=this.nsp,this.io.packet(f)},r.prototype.onopen=function(){if(C("transport is open - connecting"),"/"!==this.nsp)if(this.query){var f="object"==typeof this.query?w.encode(this.query):this.query;C("sending connect packet with query %s",f),this.packet({type:y.CONNECT,query:f})}else this.packet({type:y.CONNECT})},r.prototype.onclose=function(f){C("close (%s)",f),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",f)},r.prototype.onpacket=function(f){var l=f.nsp===this.nsp,d=f.type===y.ERROR&&"/"===f.nsp;if(l||d)switch(f.type){case y.CONNECT:this.onconnect();break;case y.EVENT:case y.BINARY_EVENT:this.onevent(f);break;case y.ACK:case y.BINARY_ACK:this.onack(f);break;case y.DISCONNECT:this.ondisconnect();break;case y.ERROR:this.emit("error",f.data)}},r.prototype.onevent=function(f){var l=f.data||[];C("emitting event %j",l),null!=f.id&&(C("attaching ack callback to event"),l.push(this.ack(f.id))),this.connected?A.apply(this,l):this.receiveBuffer.push(l)},r.prototype.ack=function(f){var l=this,d=!1;return function(){if(!d){d=!0;var m=g(arguments);C("sending ack %j",m),l.packet({type:k(m)?y.BINARY_ACK:y.ACK,id:f,data:m})}}},r.prototype.onack=function(f){var l=this.acks[f.id];"function"==typeof l?(C("calling ack %s with %j",f.id,f.data),l.apply(this,f.data),delete this.acks[f.id]):C("bad ack %s",f.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var f;for(f=0;f<this.receiveBuffer.length;f++)A.apply(this,this.receiveBuffer[f]);for(this.receiveBuffer=[],f=0;f<this.sendBuffer.length;f++)this.packet(this.sendBuffer[f]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){C("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var f=0;f<this.subs.length;f++)this.subs[f].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(C("performing disconnect (%s)",this.nsp),this.packet({type:y.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(f){return this.flags.compress=f,this},r.prototype.binary=function(f){return this.flags.binary=f,this}},function(f,l){f.exports=function n(f,l){for(var d=[],y=(l=l||0)||0;y<f.length;y++)d[y-l]=f[y];return d}},function(f,l){f.exports=function n(f,l,d){return f.on(l,d),{destroy:function(){f.removeListener(l,d)}}}},function(f,l){var d=[].slice;f.exports=function(f,l){if("string"==typeof l&&(l=f[l]),"function"!=typeof l)throw new Error("bind() requires a function");var y=d.call(arguments,2);return function(){return l.apply(f,y.concat(d.call(arguments)))}}},function(f,l){function n(f){f=f||{},this.ms=f.min||100,this.max=f.max||1e4,this.factor=f.factor||2,this.jitter=f.jitter>0&&f.jitter<=1?f.jitter:0,this.attempts=0}f.exports=n,n.prototype.duration=function(){var f=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var l=Math.random(),d=Math.floor(l*this.jitter*f);f=0==(1&Math.floor(10*l))?f-d:f+d}return 0|Math.min(f,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(f){this.ms=f},n.prototype.setMax=function(f){this.max=f},n.prototype.setJitter=function(f){this.jitter=f}}])}));var Network=pc.createScript("network"),PassPhrase="Client encryption secret pass phrase.",ClientRSAkey=cryptico.generateRSAKey(PassPhrase,512),ServerPublicKeyString="x9lZkQvo0E2DyoK3+sM4J3yplyLDWHfXikeaCeLAjBRMPkfleIQOv0p2O+lT7MJItlrBgj/qIg/sVCvJ31f1ow==",serverCommunicationSecurityLevel=null;const ServerCommunicationSecurityLevels={None:1,Obfuscated:2,Encrypted:3},ServerErrorCodes={ServerIsNotReady:1,IncompatibleClientVersion:2,UnableToDecryptInputOption:3,UnableToParseClientParams:4,ArenaIsFull:5,UserAlreadyConnected:6,UnknownArena:7,UnknownPlayer:8};var appActivityTracker={timeGameLoaded:null,oldConnectionThreshold:6048e5,checkFrequency:864e5};function prepParamsForServer(e,t){switch(t){case ServerCommunicationSecurityLevels.None:return passParams(e);case ServerCommunicationSecurityLevels.Obfuscated:return obfuscateParams(e);case ServerCommunicationSecurityLevels.Encrypted:return encryptParams(e)}return null}function parseParamsFromServer(e,t){if(null!==e)switch(t){case ServerCommunicationSecurityLevels.None:return passParams(e);case ServerCommunicationSecurityLevels.Obfuscated:return deobfuscateParams(e);case ServerCommunicationSecurityLevels.Encrypted:return decryptParams(e)}return null}function passParams(e){return e}function obfuscateParams(e){var t=e;return"string"!=typeof e&&(t=JSON.stringify(e)),btoa(t)}function deobfuscateParams(e){var t=null;if(null!=e){var r=atob(e);r&&(t=JSON.parse(r))}return t}function encryptParams(e){var t=JSON.stringify(e);return cryptico.encrypt(t,ServerPublicKeyString,ClientRSAkey).cipher}function decryptParams(e){var t=null,r=cryptico.decrypt(e,ClientRSAkey);return r&&r.plaintext&&"success"===r.status&&"verified"===r.signature&&(t=JSON.parse(r.plaintext)),t}Network.prototype.init=function(e){if(!this.isInitialized){switch(this.isInitialized=!0,this.socket=null,this.oldSocket=null,this.isConnectedToPrivateArena=!1,this.clientVersion=e.clientVersionNumber,e.serverCommunicationSecurity){case 1:serverCommunicationSecurityLevel=ServerCommunicationSecurityLevels.None;break;case 2:serverCommunicationSecurityLevel=ServerCommunicationSecurityLevels.Obfuscated;break;case 3:serverCommunicationSecurityLevel=ServerCommunicationSecurityLevels.Encrypted}switch(this.serverURL=null,this.privateArenaServerURL=null,e.backendType){case 1:this.serverURL="https://bulletbonanza.kiloo-games.com",this.privateArenaServerURL="https://bulletbonanza-private.kiloo-games.com";break;case 2:this.serverURL="https://bb-facebook-test.glitch.me",this.privateArenaServerURL="https://bb-facebook-test.glitch.me";break;case 3:this.serverURL="https://bulletbonanza-dev.kiloo-games.com",this.privateArenaServerURL="https://bulletbonanza-private-dev.kiloo-games.com";break;case 4:this.serverURL="https://playcanvas-shooter.glitch.me",this.privateArenaServerURL="https://playcanvas-shooter.glitch.me";break;case 5:this.serverURL="https://playcanvas-shooter-test.glitch.me",this.privateArenaServerURL="https://playcanvas-shooter-test.glitch.me";break;case 6:this.serverURL="https://playcanvas-shooter-test3.glitch.me",this.privateArenaServerURL="https://playcanvas-shooter-test3.glitch.me";break;case 7:this.serverURL="https://lars-bonanza-dev.glitch.me",this.privateArenaServerURL="https://lars-bonanza-dev.glitch.me"}this.requestServerTimeParams={clientVersion:this.clientVersion},this.requestPrivateArenaParams={clientVersion:this.clientVersion},this.playerNameValidationParams={clientVersion:this.clientVersion,playerID:null,playerName:null,privateArena:null},this.playerInitializeParams={clientVersion:this.clientVersion,guid:null,name:null,arenaID:null,characterTypeIndex:null,outfitColorIndex:null,highscore:null,eloRating:null,hatIndex:null},this.respawnRequestedParams={clientVersion:this.clientVersion,playerID:null,isUserTriggered:null},this.localPositionChangedParams={clientVersion:this.clientVersion,id:null,position:{x:null,y:null,z:null},rotation:{x:null,y:null,z:null}},this.animationStateChangeParams={clientVersion:this.clientVersion,id:null,animID:null},this.weaponChangeParams={clientVersion:this.clientVersion,id:null,weapID:null},this.playerHitMineParams={clientVersion:this.clientVersion,mineID:null,playerID:null,damage:null,position:null},this.npcKilledParams={clientVersion:this.clientVersion,npcID:null,playerMakingKill:null},this.npcPositionChangedParams={clientVersion:this.clientVersion,id:null,position:{x:null,y:null,z:null},rotation:{x:null,y:null,z:null}},this.npcAnimationStateChangedParams={clientVersion:this.clientVersion,id:null,animID:null},this.bulletFiredParams={clientVersion:this.clientVersion,bulletGuid:null,playerID:null,weapon:null},this.bulletHitPlayerParams={clientVersion:this.clientVersion,bulletID:null,playerShootingID:null,playerHitID:null,damageDone:null,playerShootingPosition:null,bulletHitPosition:null,splashDamage:null},this.rayFiredParams={clientVersion:this.clientVersion,playerShootingID:null,weapon:null},this.rayHitPlayerParams={clientVersion:this.clientVersion,hitPlayerID:null,shootingPlayerID:null,damageDone:null,playerPosition:null,rayPosition:null,weaponType:null},this.rayHitWorldParams={clientVersion:this.clientVersion,x:null,y:null,z:null,normal:null,shootingPlayerID:null,weaponType:null,materialType:null},this.shootingStoppedParams={clientVersion:this.clientVersion,outOfAmmo:null,weaponType:null,playerID:null},this.bulletHitNpcParams={clientVersion:this.clientVersion,bulletID:null,npcID:null,bulletDamage:null,playerShootingID:null,bulletHitPosition:null,splashDamage:null},this.rayHitNpcParams={clientVersion:this.clientVersion,npcID:null,damageDone:null,playerShootingID:null,rayPosition:null},this.weaponPickupParams={clientVersion:this.clientVersion,pickupPointID:null,weaponID:null,playerID:null},this.droppableWeaponPickupParams={clientVersion:this.clientVersion,playerID:null,droppableGUID:null,weaponID:null},this.droppableWeaponDroppedLocallyParams={clientVersion:this.clientVersion,playerID:null,spawnPosition:null,weaponType:null,ammo:null,impulseDirection:null,droppedWeaponID:null},this.chatMessageParams={clientVersion:this.clientVersion,playerID:null,message:null},this.globalLeaderboardsParams={clientVersion:this.clientVersion,playerGuid:null,topSize:null},this.globalLeaderboardStandingsParams={clientVersion:this.clientVersion,playerGuid:null},this.statsParams={clientVersion:this.clientVersion,playerGuid:null},this.notifyTournamentRewardParams={clientVersion:this.clientVersion,playerGuid:null,tournamentType:null},this.purchasableItemDefinitionsParams={clientVersion:this.clientVersion},this.purchaseItemParams={clientVersion:this.clientVersion,playerGuid:null,itemCategory:null,itemType:null,characterID:null},this.app.on("requestPlayerNameValidation",this.onRequestPlayerNameValidation,this),this.app.on("requestPrivateArena",this.onRequestedPrivateArena,this),this.app.on("initializePlayer",this.onInitializePlayer,this),this.app.on("respawnRequested",this.onRespawnRequested,this),this.app.on("localPlayerPositionChanged",this.onLocalPlayerPositionChanged,this),this.app.on("sendAnimationState",this.onSendAnimationState,this),this.app.on("weaponSwitched",this.onWeaponSwitched,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("playerHitMine",this.onPlayerHitMine,this),this.app.on("npcKilled",this.onNpcKilled,this),this.app.on("sendNpcPositionChanged",this.onNpcPositionChanged,this),this.app.on("sendNpcAnimationState",this.onNpcAnimationStateChanged,this),this.app.on("bulletFired",this.onBulletFired,this),this.app.on("bulletHitPlayer",this.onBulletHitPlayer,this),this.app.on("rayFired",this.onRayFired,this),this.app.on("rayHitPlayer",this.onRayHitPlayer,this),this.app.on("rayHitWorld",this.onRayHitWorld,this),this.app.on("shootingStopped",this.onShootingStopped,this),this.app.on("bulletHitNpc",this.onBulletHitNpc,this),this.app.on("rayHitNpc",this.onRayHitNpc,this),this.app.on("weaponPickedUp",this.onWeaponPickedUp,this),this.app.on("droppableWeaponDroppedLocally",this.onDroppableWeaponDroppedLocally,this),this.app.on("sendChatMessage",this.onSendChatMessage,this),this.app.on("requestGlobalLeaderboards",this.onRequestGlobalLeaderboards,this),this.app.on("requestGlobalLeaderboardStandings",this.onRequestGlobalLeaderboardStandings,this),this.app.on("requestStats",this.onRequestStats,this),this.app.on("requestServerTime",this.onRequestServerTime,this),this.app.on("notifyTournamentRewardDisplayed",this.onNotifyTournamentRewardDisplayed,this),this.app.on("requestPurchasableItemDefinitions",this.onRequestPurchasableItemDefinitions,this),this.app.on("requestPurchaseItem",this.onRequestPurchaseItem,this),appActivityTracker.timeGameLoaded=Date.now(),setInterval(function(){var e=Date.now();null!==appActivityTracker.timeGameLoaded&&e-appActivityTracker.timeGameLoaded>appActivityTracker.oldConnectionThreshold&&document.location.reload()}.bind(this),appActivityTracker.checkFrequency),this.connect()}},Network.prototype.onRequestedPrivateArena=function(){this.connect(!0);var e=prepParamsForServer(this.requestPrivateArenaParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestPrivateArena",e)},Network.prototype.onRequestPlayerNameValidation=function(e,t,r){var a=!!r;this.connect(a),this.playerNameValidationParams.playerID=e,this.playerNameValidationParams.playerName=t,this.playerNameValidationParams.privateArena=a;var i=prepParamsForServer(this.playerNameValidationParams,ServerCommunicationSecurityLevels.Encrypted);this.socket.emit("requestPlayerNameValidation",i)},Network.prototype.onRequestGlobalLeaderboards=function(e,t){this.connect(this.isConnectedToPrivateArena),this.globalLeaderboardsParams.playerGuid=e,this.globalLeaderboardsParams.topSize=t;var r=prepParamsForServer(this.globalLeaderboardsParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestGlobalLeaderboards",r)},Network.prototype.onRequestGlobalLeaderboardStandings=function(e){this.connect(this.isConnectedToPrivateArena),this.globalLeaderboardStandingsParams.playerGuid=e;var t=prepParamsForServer(this.globalLeaderboardStandingsParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestGlobalLeaderboardStandings",t)},Network.prototype.onRequestPurchasableItemDefinitions=function(){this.connect(this.isConnectedToPrivateArena);var e=prepParamsForServer(this.purchasableItemDefinitionsParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestPurchasableItemDefinitions",e)},Network.prototype.onRequestPurchaseItem=function(e,t,r,a){this.connect(this.isConnectedToPrivateArena),this.purchaseItemParams.playerGuid=e,this.purchaseItemParams.itemCategory=t,this.purchaseItemParams.itemType=r,this.purchaseItemParams.characterID=a;var i=prepParamsForServer(this.purchaseItemParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestPurchaseItem",i)},Network.prototype.onRequestStats=function(e){this.connect(this.isConnectedToPrivateArena),this.statsParams.playerGuid=e;var t=prepParamsForServer(this.statsParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestStats",t)},Network.prototype.onNotifyTournamentRewardDisplayed=function(e,t){this.connect(this.isConnectedToPrivateArena),this.notifyTournamentRewardParams.playerGuid=e,this.notifyTournamentRewardParams.tournamentType=t;var r=prepParamsForServer(this.notifyTournamentRewardParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("notifyTournamentRewardDisplayed",r)},Network.prototype.onRequestServerTime=function(){this.connect(this.isConnectedToPrivateArena);var e=prepParamsForServer(this.requestServerTimeParams,ServerCommunicationSecurityLevels.Obfuscated);this.socket.emit("requestServerTime",e)},Network.prototype.onInitializePlayer=function(e){this.connect(this.isConnectedToPrivateArena),this.playerInitializeParams.guid=e.playerGuid,this.playerInitializeParams.name=e.playerName,this.playerInitializeParams.arenaID=e.arenaID,this.playerInitializeParams.characterTypeIndex=e.characterIndex,this.playerInitializeParams.outfitColorIndex=e.outfitIndex,this.playerInitializeParams.highscore=e.highscore,this.playerInitializeParams.eloRating=e.eloRating,this.playerInitializeParams.hatIndex=e.hatIndex;var t=prepParamsForServer(this.playerInitializeParams,serverCommunicationSecurityLevel),r=prepParamsForServer(serverCommunicationSecurityLevel,ServerCommunicationSecurityLevels.Encrypted);this.socket.emit("initializePlayer",t,r)},Network.prototype.onRespawnRequested=function(e,t){if(null!==this.socket){this.respawnRequestedParams.playerID=e,this.respawnRequestedParams.isUserTriggered=t;var r=prepParamsForServer(this.respawnRequestedParams,serverCommunicationSecurityLevel);this.socket.emit("playerRespawnRequest",r)}},Network.prototype.onLocalPlayerPositionChanged=function(e,t,r){if(null!==this.socket){this.localPositionChangedParams.id=e,this.localPositionChangedParams.position=t,this.localPositionChangedParams.rotation=r;var a=prepParamsForServer(this.localPositionChangedParams,serverCommunicationSecurityLevel);this.socket.emit("playerPositionUpdate",a)}},Network.prototype.onSendAnimationState=function(e,t){if(null!==this.socket){this.animationStateChangeParams.id=e,this.animationStateChangeParams.animID=t;var r=prepParamsForServer(this.animationStateChangeParams,serverCommunicationSecurityLevel);this.socket.emit("sendAnimationStateChanged",r)}},Network.prototype.onWeaponSwitched=function(e,t){if(null!==this.socket){this.weaponChangeParams.id=e,this.weaponChangeParams.weapID=t;var r=prepParamsForServer(this.weaponChangeParams,serverCommunicationSecurityLevel);this.socket.emit("sendWeaponChanged",r)}},Network.prototype.onLeftGame=function(){null!==this.socket&&(this.socket.emit("leftGame"),this.oldSocket=this.socket,this.socket=null,this.isConnectedToPrivateArena=!1,this.oldSocket&&this.oldSocket.disconnect())},Network.prototype.onPlayerHitMine=function(e,t,r,a){if(null!==this.socket){this.playerHitMineParams.mineID=e,this.playerHitMineParams.playerID=t,this.playerHitMineParams.damage=r,this.playerHitMineParams.position=a;var i=prepParamsForServer(this.playerHitMineParams,serverCommunicationSecurityLevel);this.socket.emit("playerHitMine",i)}},Network.prototype.onNpcKilled=function(e,t){if(null!==this.socket){this.npcKilledParams.npcID=e,this.npcKilledParams.playerMakingKill=t;var r=prepParamsForServer(this.npcKilledParams,serverCommunicationSecurityLevel);this.socket.emit("sendNpcKilled",r)}},Network.prototype.onNpcPositionChanged=function(e,t,r){if(null!==this.socket){this.npcPositionChangedParams.id=e,this.npcPositionChangedParams.position=t,this.npcPositionChangedParams.rotation=r;var a=prepParamsForServer(this.npcPositionChangedParams,serverCommunicationSecurityLevel);this.socket.emit("npcPositionChanged",a)}},Network.prototype.onNpcAnimationStateChanged=function(e,t){if(null!==this.socket){this.npcAnimationStateChangedParams.id=e,this.npcAnimationStateChangedParams.animID=t;var r=prepParamsForServer(this.npcAnimationStateChangedParams,serverCommunicationSecurityLevel);this.socket.emit("sendNpcAnimationStateChanged",r)}},Network.prototype.onBulletFired=function(e,t,r){if(null!==this.socket&&r.isProjectile){this.bulletFiredParams.bulletGuid=e,this.bulletFiredParams.playerID=t,this.bulletFiredParams.weapon=r;var a=prepParamsForServer(this.bulletFiredParams,serverCommunicationSecurityLevel);this.socket.emit("bulletFired",a)}},Network.prototype.onBulletHitPlayer=function(e,t,r,a,i,o,n){if(null!==this.socket){this.bulletHitPlayerParams.bulletID=e,this.bulletHitPlayerParams.playerShootingID=t,this.bulletHitPlayerParams.playerHitID=r,this.bulletHitPlayerParams.damageDone=a,this.bulletHitPlayerParams.playerShootingPosition=i,this.bulletHitPlayerParams.bulletHitPosition=o,this.bulletHitPlayerParams.splashDamage=n,this.bulletHitPlayerParams.weaponType=Weapons.RocketLauncher;var s=prepParamsForServer(this.bulletHitPlayerParams,serverCommunicationSecurityLevel);this.socket.emit("sendBulletHitPlayer",s)}},Network.prototype.onRayFired=function(e,t){if(null!==this.socket){this.rayFiredParams.playerShootingID=e,this.rayFiredParams.weapon=t;var r=prepParamsForServer(this.rayFiredParams,serverCommunicationSecurityLevel);this.socket.emit("sendRayFired",r)}},Network.prototype.onRayHitPlayer=function(e,t,r,a,i,o){if(null!==this.socket){this.rayHitPlayerParams.hitPlayerID=e,this.rayHitPlayerParams.shootingPlayerID=t,this.rayHitPlayerParams.damageDone=r,this.rayHitPlayerParams.playerPosition=a,this.rayHitPlayerParams.rayPosition=i,this.rayHitPlayerParams.weaponType=o;var n=prepParamsForServer(this.rayHitPlayerParams,serverCommunicationSecurityLevel);this.socket.emit("sendRayHitPlayer",n)}},Network.prototype.onRayHitWorld=function(e,t,r,a,i,o,n){if(null!==this.socket){this.rayHitWorldParams.x=e,this.rayHitWorldParams.y=t,this.rayHitWorldParams.z=r,this.rayHitWorldParams.normal=a,this.rayHitWorldParams.shootingPlayerID=i,this.rayHitWorldParams.weaponType=o,this.rayHitWorldParams.materialType=n;var s=prepParamsForServer(this.rayHitWorldParams,serverCommunicationSecurityLevel);this.socket.emit("sendRayHitWorld",s)}},Network.prototype.onShootingStopped=function(e,t,r){if(null!==this.socket){this.shootingStoppedParams.outOfAmmo=e,this.shootingStoppedParams.weaponType=t,this.shootingStoppedParams.playerID=r;var a=prepParamsForServer(this.shootingStoppedParams,serverCommunicationSecurityLevel);this.socket.emit("sendShootingStopped",a)}},Network.prototype.onBulletHitNpc=function(e,t,r,a,i,o){if(null!==this.socket){this.bulletHitNpcParams.bulletID=e,this.bulletHitNpcParams.npcID=t,this.bulletHitNpcParams.bulletDamage=r,this.bulletHitNpcParams.playerShootingID=a,this.bulletHitNpcParams.bulletHitPosition=i,this.bulletHitNpcParams.splashDamage=o;var n=prepParamsForServer(this.bulletHitNpcParams,serverCommunicationSecurityLevel);this.socket.emit("sendBulletHitNpc",n)}},Network.prototype.onRayHitNpc=function(e,t,r,a){if(null!==this.socket){this.rayHitNpcParams.npcID=e,this.rayHitNpcParams.damageDone=t,this.rayHitNpcParams.playerShootingID=r,this.rayHitNpcParams.rayPosition=a;var i=prepParamsForServer(this.bulletHitNpcParams,serverCommunicationSecurityLevel);this.socket.emit("sendRayHitNpc",i)}},Network.prototype.onWeaponPickedUp=function(e,t,r,a,i,o){if(null!==this.socket)if(i){this.droppableWeaponPickupParams.playerID=e,this.droppableWeaponPickupParams.droppableGUID=o,this.droppableWeaponPickupParams.weaponID=t;var n=prepParamsForServer(this.droppableWeaponPickupParams,serverCommunicationSecurityLevel);this.socket.emit("sendDroppableWeaponPickedUp",n)}else{this.weaponPickupParams.pickupPointID=r,this.weaponPickupParams.weaponID=t,this.weaponPickupParams.playerID=e;var s=prepParamsForServer(this.weaponPickupParams,serverCommunicationSecurityLevel);this.socket.emit("sendWeaponPickup",s)}},Network.prototype.onDroppableWeaponDroppedLocally=function(e,t,r,a,i,o){if(null!==this.socket){this.droppableWeaponDroppedLocallyParams.playerID=t,this.droppableWeaponDroppedLocallyParams.spawnPosition=r,this.droppableWeaponDroppedLocallyParams.weaponType=a,this.droppableWeaponDroppedLocallyParams.ammo=i,this.droppableWeaponDroppedLocallyParams.impulseDirection=o,this.droppableWeaponDroppedLocallyParams.droppedWeaponID=e;var n=prepParamsForServer(this.droppableWeaponDroppedLocallyParams,serverCommunicationSecurityLevel);this.socket.emit("sendDroppableWeaponDropped",n)}},Network.prototype.onWindowLostFocus=function(e){},Network.prototype.onWindowGainedFocus=function(e){},Network.prototype.onSendChatMessage=function(e,t){if(null!==this.socket){this.chatMessageParams.playerID=e,this.chatMessageParams.message=t;var r=prepParamsForServer(this.chatMessageParams,serverCommunicationSecurityLevel);this.socket.emit("sendChatMessage",r)}},Network.prototype.connect=function(e){if(null===this.socket)e?(this.isConnectedToPrivateArena=!0,this.socket=io.connect(this.privateArenaServerURL,{transports:["websocket"],upgrade:!1})):(this.isConnectedToPrivateArena=!1,this.socket=io.connect(this.serverURL,{transports:["websocket"],upgrade:!1}));else if(e&&!this.isConnectedToPrivateArena)this.isConnectedToPrivateArena=!0,this.oldSocket=this.socket,this.socket=null,this.oldSocket&&this.oldSocket.disconnect(),this.socket=io.connect(this.privateArenaServerURL,{transports:["websocket"],upgrade:!1});else{if(e||!this.isConnectedToPrivateArena)return;this.isConnectedToPrivateArena=!1,this.oldSocket=this.socket,this.socket=null,this.oldSocket&&this.oldSocket.disconnect(),this.socket=io.connect(this.serverURL,{transports:["websocket"],upgrade:!1})}var t=this;this.socket.on("privateArenaCreated",(function(e){t.app.fire("privateArenaCreated",e)})),this.socket.on("serverError",(function(e){t.app.fire("serverError",e)})),this.socket.on("notifySessionTimerStart",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("notifySessionTimerStart",r.sessionCountDownDate,r.nowDate,r.sessionLength,r.players):console.log("ERROR. Could not decrypt session start responseParams")})),this.socket.on("notifyCooldownTimerStart",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("notifyCooldownTimerStart",r.cooldownCountDownDate,r.nowDate,r.cooldownLength,r.players):console.log("ERROR. Could not decrypt session cooldown responseParams")})),this.socket.on("responseGlobalLeaderboards",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Obfuscated);null!==r?t.app.fire("responseGlobalLeaderboards",r):console.log("ERROR. Could not decrypt session cooldown responseParams")})),this.socket.on("responseGlobalLeaderboardStandings",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Obfuscated);null!==r?t.app.fire("responseGlobalLeaderboardStandings",r):console.log("ERROR. Could not decrypt session cooldown responseParams")})),this.socket.on("responsePurchasableItemDefinitions",(function(e){t.app.fire("receivedPurchasableItemDefinitions",e)})),this.socket.on("responsePurchaseItem",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Obfuscated);console.log("responsePurchaseItem "+JSON.stringify(r)),t.app.fire("responsePurchaseItem",r)})),this.socket.on("receivedStats",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Obfuscated);t.app.fire("receivedStats",r)})),this.socket.on("responseServerTime",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Obfuscated).serverTime;t.app.fire("receivedServerTime",r)})),this.socket.on("playerNameValidated",(function(e){var r=parseParamsFromServer(e,ServerCommunicationSecurityLevels.Encrypted);null!==r?t.app.fire("playerNameValidated",r.name,r.validated):console.log("ERROR. Could not decrypt validate responseParams")})),this.socket.on("playerData",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);if(null!==r){var a={isSessionActive:r.isSessionActive,nowDate:r.nowDate,sessionCountDownDate:r.sessionCountDownDate,cooldownCountDownDate:r.cooldownCountDownDate,sessionLength:r.sessionLength,cooldownLength:r.cooldownLength},i={inactiveWeaponPickupPoints:r.inactiveWeaponPickupPoints,maxPlayersInArena:r.maxPlayersInArena,isArenaPrivate:r.isArenaPrivate};t.fire("playerDataReceived",r.id,r.players,a,i)}else console.log("ERROR. Could not decrypt player init responseParams")})),this.socket.on("playerJoined",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("enemyPlayerJoined",r.isNewPlayer,r.newPlayerData,r.isSessionActive):console.log("ERROR. Could not decrypt player joined responseParams")})),this.socket.on("killMade",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("killMade",r.playerKilled,r.playerMakingKill,r.weaponIndex):console.log("ERROR. Could not decrypt player killed responseParams")})),this.socket.on("respawnGranted",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r&&null!==r.playerData?t.fire("respawnGranted",r.playerData):console.log("ERROR. Could not decrypt player respawn responseParams")})),this.socket.on("playerMoved",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("enemyPlayerMoved",r):console.log("ERROR. Could not decrypt player moved responseParams")})),this.socket.on("enemyAnimationChanged",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("enemyAnimationChanged",r.id,r.animID):console.log("ERROR. Could not decrypt animation changed responseParams")})),this.socket.on("enemyWeaponChanged",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("enemyWeaponChanged",r.id,r.weapID):console.log("ERROR. Could not decrypt weapon changed responseParams")})),this.socket.on("playerDisconnected",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("enemyPlayerDisconnected",r):console.log("ERROR. Could not decrypt player disconnected responseParams")})),this.socket.on("disconnect",(function(e){"io server disconnect"===e&&(t.isConnectedToPrivateArena=!1,t.socket=null),t.app.fire("connectionLost"),console.log("socket connection to server lost for reason: "+e)})),this.socket.on("connect",(function(){t.app.fire("connectionEstablished")})),this.socket.on("receivedPlayerHitMine",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("receivedAnotherPlayerHitMine",r.mineID,r.playerID,r.damage,r.position):console.log("ERROR. Could not decrypt player hit mine responseParams")})),this.socket.on("notifyHealthBoost",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("receivedHealthBoost",r):console.log("ERROR. Could not decrypt player health responseParams")})),this.socket.on("notifyHighscoreUpdate",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("notifyHighscoreUpdate",r.highscore):console.log("ERROR. Could not decrypt player highscore responseParams")})),this.socket.on("notifyEloRatingUpdate",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("notifyEloRatingUpdate",r.eloRating):console.log("ERROR. Could not decrypt player elo responseParams")})),this.socket.on("notifyCurrency1Update",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("notifyCurrency1Update",r.currency1Total):console.log("ERROR. Could not decrypt player elo responseParams")})),this.socket.on("confirmNpcKill",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("confirmNpcKill",r.npcID,r.playerMakingKill):console.log("ERROR. Could not decrypt npc killed responseParams")})),this.socket.on("respawnNpc",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("respawnNpc",r):console.log("ERROR. Could not decrypt npc respawn responseParams")})),this.socket.on("npcMoved",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("remoteNpcMoved",r):console.log("ERROR. Could not decrypt npc moved responseParams")})),this.socket.on("npcAnimationChanged",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("npcAnimationChanged",r.id,r.animID):console.log("ERROR. Could not decrypt npc animation changed responseParams")})),this.socket.on("assigningNewNpcController",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("assigningNewNpcController",r):console.log("ERROR. Could not decrypt npc controller responseParams")})),this.socket.on("confirmBulletFiredToAllEnemies",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("enemyBulletFired",r.bulletGuid,r.playerID,r.weapon):console.log("ERROR. Could not decrypt bullet fired responseParams")})),this.socket.on("confirmBulletHitPlayer",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("confirmBulletHitPlayer",r.bulletID,r.playerShootingID,r.playerHitID,r.damageDone,r.playerShootingPosition,r.bulletHitPosition,r.splashDamage,r.playerShootingScore):console.log("ERROR. Could not decrypt bullet hit player responseParams")})),this.socket.on("confirmRayFiredToAllEnemies",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("enemyRayFired",r.playerShootingID,r.weapon):console.log("ERROR. Could not decrypt ray fired responseParams")})),this.socket.on("confirmRayHitToAll",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("confirmRayHitPlayer",r.hitPlayerID,r.shootingPlayerID,r.damageDone,r.playerPosition,r.rayPosition,r.weaponType,r.playerShootingScore):console.log("ERROR. Could not decrypt ray hit player responseParams")})),this.socket.on("notifyRayHitWorld",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("confirmRayHitWorld",r.x,r.y,r.z,r.normal,r.shootingPlayerID,r.weaponType,r.materialType):console.log("ERROR. Could not decrypt ray hit world responseParams")})),this.socket.on("notifyShootingStopped",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("enemyShootingStopped",r.outOfAmmo,r.weaponType,r.playerID):console.log("ERROR. Could not decrypt shooting stopped responseParams")})),this.socket.on("confirmBulletHitNpc",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("confirmBulletHitNpc",r.bulletID,r.npcID,r.damageDone,r.playerShootingID,r.bulletHitPosition,r.splashDamage):console.log("ERROR. Could not decrypt bullet hit npc responseParams")})),this.socket.on("confirmRayHitNpc",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("confirmRayHitNpc",r.npcID,r.damageDone,r.playerShootingID,r.rayPosition,r.weaponType):console.log("ERROR. Could not decrypt ray hit npc responseParams")})),this.socket.on("refreshPickupPoint",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.app.fire("refreshPickupPoint",r.id,r.enable):console.log("ERROR. Could not decrypt pickup point refresh responseParams")})),this.socket.on("recievedDroppableWeaponDropped",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("receivedWeaponWasDropped",r.droppedWeaponID,r.spawnPosition,r.weaponType,r.ammo,r.impulseDirection):console.log("ERROR. Could not decrypt weapon dropped responseParams")})),this.socket.on("recievedDroppableWeaponPickedUp",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?(t.app.fire("recievedWeaponWasPickedUp",r.droppableGUID),t.fire("recievedWeaponWasPickedUp",r.droppableGUID)):console.log("ERROR. Could not decrypt weapon pickup responseParams")})),this.socket.on("receivedChatMessage",(function(e){var r=parseParamsFromServer(e,serverCommunicationSecurityLevel);null!==r?t.fire("receivedChatMessage",r.playerID,r.message):console.log("ERROR. Could not decrypt chat message responseParams")}))};var Shooting=pc.createScript("shooting");Shooting.attributes.add("bulletsPerSecond",{type:"number",default:1,title:"Bullets per second"}),Shooting.attributes.add("cameraEntity",{type:"entity",title:"Camera"}),Shooting.attributes.add("crosshairParts",{type:"entity",title:"Crosshair Parts"}),Shooting.attributes.add("hasSubscribedToEvents",{type:"boolean",default:!1}),Shooting.attributes.add("hasCachedUIElements",{type:"boolean",default:!1}),Shooting.attributes.add("hasInitialized",{type:"boolean",default:!1});var FIRE_KEY_PRESSED=!1,ZOOM_KEY_PRESSED=!1,screenLockedDelay=.5;function Weapon(i,t,e,s,o,a,h,n,r,p,c,l){this.weaponType=i,this.damage=t,this.isProjectile=e,this.range=s,this.rateOfFire=o,this.speed=a,this.spread=h,this.bulletsPerShot=n,this.ammo=r,this.compoundingSpread=p,this.automaticFiring=c,this.isDualWeapon=l}Shooting.prototype.Load=function(i,t){this.Init(),this.CacheUIElements(),this.SubscribeToEvents(),this.crosshairDefaultPosition=14,this.crosshairZoomOffset=0,this.activeWeapon=this.Pistols,this.timePassed=0,this.timeSinceScreenLock=0,this.localPlayerID=i,this.isPlayerAllowedToShoot=t,this.compoundingWeaponSpread=0,this.start.set(0,0,0),this.end.set(0,0,0),this.ray.set(0,0,0),this.tempSpread.set(0,0,0),this.tempDamage=0,this.tempDistance=0,this.crosshairPosition=14,this.crosshairUIHitTimer=0,this.crosshairUIHitTimeToDisplay=.25,this.crosshairUIHitActive=!1,this.previousWeapon=this.Pistols,this.isFiring=!1,this.isAutofiring=!1,this.autofireTimer=0,this.autofireEndingTimer=0,this.autofirePointThresholdStart=.21,this.autofirePointThresholdEnd=.35,this.mobileCrosshairIsNormal=!0,this.mobileFirebuttonDown=!1},Shooting.prototype.Init=function(){if(!this.hasInitialized){var i=1/7,t=!1;MobileController.instance.active&&(i=1/6,t=!0),this.Pistols=new Weapon(Weapons.Pistols,2000,!1,150,i,1,1.6,1,9999999,2.5,t,!0),this.Rifle=new Weapon(Weapons.Rifle,45,!1,300,1/1.2,1,.5,1,0,3,!0,!1),this.Shotgun=new Weapon(Weapons.Shotgun,10,!1,100,1/1.4,1,5.5,8,0,8,!0,!1),this.Minigun=new Weapon(Weapons.Minigun,14,!1,200,1/9,1,1.1,1,0,1.9,!0,!1),this.RocketLauncher=new Weapon(Weapons.RocketLauncher,60,!0,999,.625,45,.1,1,0,7,!0,!1),this.Bow=new Weapon(Weapons.Bow,50,!1,150,1,150,.1,1,0,2,!0,!1),this.Flamer=new Weapon(Weapons.Flamer,20,!1,4,1/11,1,.1,1,0,0,!0,!1),this.Uzi=new Weapon(Weapons.Uzi,11,!1,150,1/12,1,1,1,0,1.5,!0,!0),this.start=new pc.Vec3,this.end=new pc.Vec3,this.ray=new pc.Vec3,this.tempSpread=new pc.Vec3,this.droppedWeaponSpawnPoint=new pc.Vec3,this.hasInitialized=!0}},Shooting.prototype.CacheUIElements=function(){this.hasCachedUIElements||(this.crosshairDot=this.crosshairParts.findByName("CrosshairDot"),this.crosshairTop=this.crosshairParts.findByName("CrosshairTop"),this.crosshairBottom=this.crosshairParts.findByName("CrosshairBottom"),this.crosshairLeft=this.crosshairParts.findByName("CrosshairLeft"),this.crosshairRight=this.crosshairParts.findByName("CrosshairRight"),this.crosshairRound=this.crosshairParts.findByName("CrosshairRound"),this.crosshairHitTopLeft=this.crosshairParts.findByName("CrosshairHitTopLeft"),this.crosshairHitTopRight=this.crosshairParts.findByName("CrosshairHitTopRight"),this.crosshairHitBottomLeft=this.crosshairParts.findByName("CrosshairHitBottomLeft"),this.crosshairHitBottomRight=this.crosshairParts.findByName("CrosshairHitBottomRight"),this.hasCachedUIElements=!0)},Shooting.prototype.SubscribeToEvents=function(){this.hasSubscribedToEvents||(MobileController.instance.active?(MobileController.instance.on("shooting",this.OnTouchStart,this),MobileController.instance.on("stopShooting",this.OnTouchEnd,this)):(this.app.mouse.on(pc.EVENT_MOUSEDOWN,this.OnMouseDown,this),this.app.mouse.on(pc.EVENT_MOUSEUP,this.OnMouseUp,this)),this.app.on("respawn",this.onRespawnGranted,this),this.app.on("weaponSwitched",this.OnWeaponSwitched,this),this.on("enable",this.manualEnableHookup,this),this.on("disable",this.manualDisableHookup,this),this.on("destroy",this.manualDestroyHookup,this),this.hasSubscribedToEvents=!0)},Shooting.prototype.onPlayerAliveStateChanged=function(i){this.isPlayerAllowedToShoot=i},Shooting.prototype.OnPlayerKilled=function(){this.DropWeapon(this.activeWeapon),this.DisableCrosshairHit()},Shooting.prototype.manualEnableHookup=function(){this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("weaponPickedUp",this.OnWeaponPickup,this),this.app.on("zoomChanged",this.OnZoomChanged,this),this.app.on("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.on("bulletHitPlayer",this.AnimateCrosshairHit,this),this.app.on("rayHitPlayer",this.AnimateCrosshairHit,this),this.app.on("playerDroppedWeapon",this.OnWeaponPickup,this)},Shooting.prototype.manualDisableHookup=function(){this.app.off("playerKilled",this.OnPlayerKilled,this),this.app.off("weaponPickedUp",this.OnWeaponPickup,this),this.app.off("zoomChanged",this.OnZoomChanged,this),this.app.off("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.off("bulletHitPlayer",this.AnimateCrosshairHit,this),this.app.off("rayHitPlayer",this.AnimateCrosshairHit,this),this.app.off("playerDroppedWeapon",this.OnWeaponPickup,this)},Shooting.prototype.manualDestroyHookup=function(){this.app.off("playerKilled",this.OnPlayerKilled,this),this.app.off("weaponSwitched",this.OnWeaponSwitched,this),this.app.off("weaponPickedUp",this.OnWeaponPickup,this),this.app.off("zoomChanged",this.OnZoomChanged,this),this.app.off("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.off("bulletHitPlayer",this.AnimateCrosshairHit,this),this.app.off("rayHitPlayer",this.AnimateCrosshairHit,this),this.app.off("playerDroppedWeapon",this.OnWeaponPickup,this),this.app.off("respawn",this.onRespawnGranted,this)},Shooting.prototype.update=function(i){if(this.crosshairUIHitActive&&(this.crosshairUIHitTimer+=i,this.crosshairUIHitTimer>this.crosshairUIHitTimeToDisplay&&this.DisableCrosshairHit()),this.isPlayerAllowedToShoot&&!isChatModeEnabled){if(this.timePassed+=i,this.compoundingWeaponSpread>0&&(this.compoundingWeaponSpread-=14*i),this.compoundingWeaponSpread<0&&(this.compoundingWeaponSpread=0),this.crosshairPosition=this.crosshairDefaultPosition+this.crosshairZoomOffset+2*this.activeWeapon.spread+5*this.compoundingWeaponSpread,this.activeWeapon.weaponType==Weapons.Shotgun||this.activeWeapon.weaponType==Weapons.RocketLauncher?(this.crosshairRound.element.height=this.crosshairPosition,this.crosshairRound.element.width=this.crosshairPosition):(this.crosshairTop.setLocalPosition(0,this.crosshairPosition,0),this.crosshairBottom.setLocalPosition(0,-this.crosshairPosition,0),this.crosshairLeft.setLocalPosition(-this.crosshairPosition,0,0),this.crosshairRight.setLocalPosition(this.crosshairPosition,0,0)),MobileController.instance.active){this.start=this.cameraEntity.getPosition(),this.ray.copy(this.cameraEntity.forward).scale(this.activeWeapon.range),this.end.copy(this.start).add(this.ray);var t=this.app.systems.rigidbody.raycastFiltered(this.start,this.end,pc.BODYGROUP_USER_3,pc.BODYGROUP_USER_3),e=!1;t&&t.entity.name.includes("PlayerHitDetector")&&void 0!==t.entity.script&&void 0!==t.entity.script.playerHitDetector&&t.entity.script.playerHitDetector.currentHealth>0&&t.entity.script.playerHitDetector.playerID!==this.localPlayerID&&(e=!0),e&&(this.autofireTimer+=i,this.autofireTimer>this.autofirePointThresholdStart&&(this.autofireEndingTimer=0,this.isAutofiring=!0),this.SetLargeMobileCrosshair()),this.isAutofiring&&this.OnTouchStart(!1),e||(this.SetNormalMobileCrosshair(),this.isAutofiring&&(this.autofireEndingTimer+=i,this.autofireEndingTimer>this.autofirePointThresholdEnd&&(this.autofireEndingTimer=0,this.autofireTimer=0,this.isAutofiring=!1,this.mobileFirebuttonDown||this.OnTouchEnd(!1))))}if(pc.Mouse.isPointerLocked()||MobileController.instance.active){if(this.timeSinceScreenLock+=i,this.timeSinceScreenLock>screenLockedDelay&&FIRE_KEY_PRESSED&&this.timePassed>this.activeWeapon.rateOfFire&&this.activeWeapon.ammo>0){if(this.isFiring=!0,this.activeWeapon.isProjectile){var s=generateUUID();this.app.fire("bulletFired",s,this.localPlayerID,this.activeWeapon)}else{this.app.fire("rayFired",this.localPlayerID,this.activeWeapon);for(var o=0;o<this.activeWeapon.bulletsPerShot;o++){this.start=this.cameraEntity.getPosition(),this.tempSpread.x=pc.math.random(-(this.activeWeapon.spread+this.compoundingWeaponSpread),this.activeWeapon.spread+this.compoundingWeaponSpread),this.tempSpread.y=pc.math.random(-(this.activeWeapon.spread+this.compoundingWeaponSpread),this.activeWeapon.spread+this.compoundingWeaponSpread),this.tempSpread.z=pc.math.random(-(this.activeWeapon.spread+this.compoundingWeaponSpread),this.activeWeapon.spread+this.compoundingWeaponSpread),this.ray.copy(this.cameraEntity.forward).scale(this.activeWeapon.range),this.end.copy(this.start).add(this.ray).add(this.tempSpread);var a=this.app.systems.rigidbody.raycastFiltered(this.start,this.end,pc.BODYGROUP_USER_3,pc.BODYGROUP_USER_3);if(a){for(var h=null,n=a.entity.tags.list(),r=0;r<n.length;r++)if(n[r].includes("material")){h=ObjectMaterials[n[r]];break}if(this.app.fire("gunTrace",this.localPlayerID,this.activeWeapon,a.point),!(a.entity.name.includes("PlayerHitDetector")||a.entity.name.includes("Bullet")||a.entity.name.includes("PickUpPoint")||a.entity.name.includes("ProjectileHit")||a.entity.name.includes("NPC"))){if(this.activeWeapon.weaponType!==Weapons.Flamer){a.entity.name,WATER_COLLIDER_NAME;this.app.fire("rayHitWorld",a.point.x,a.point.y,a.point.z,a.normal,this.localPlayerID,this.activeWeapon.weaponType,h)}continue}if(a.entity.name.includes("PlayerHitDetector")){if(void 0!==a.entity.script&&void 0!==a.entity.script.playerHitDetector){if(a.entity.script.playerHitDetector.currentHealth>0&&a.entity.script.playerHitDetector.playerID!==this.localPlayerID){this.activeWeapon.weaponType!==Weapons.Rifle?(this.tempDistance=a.point.distance(this.start),this.tempDamage=Math.ceil(this.activeWeapon.damage*(1-this.tempDistance/this.activeWeapon.range*.65))):this.tempDamage=this.activeWeapon.damage;var p=this.entity.getPosition().clone();this.app.fire("rayHitPlayer",a.entity.script.playerHitDetector.playerID,this.localPlayerID,this.tempDamage,p,a.point,this.activeWeapon.weaponType)}}else console.log("ERROR IN SHOOTING: A player did not have a playerHitDetector script defined.");continue}if(a.entity.name.includes("NPC")&&void 0!==a.entity.script){var c=a.entity.script.npcMovement;void 0!==c?c.currentHealth>0&&c.localPlayerID===this.localPlayerID&&(this.tempDistance=a.point.distance(this.start),this.tempDamage=Math.ceil(this.activeWeapon.damage*(1-this.tempDistance/this.activeWeapon.range*.9)),this.app.fire("rayHitNpc",c.id,this.tempDamage,this.localPlayerID,a.point,this.activeWeapon.weaponType)):console.log("ERROR IN SHOOTING: A player did not have a npcMovement script defined.");continue}}else this.app.fire("gunTrace",this.localPlayerID,this.activeWeapon,this.start.clone().add(this.ray).add(this.tempSpread))}}this.activeWeapon.ammo-=1,this.activeWeapon.ammo<=0?(this.activeWeapon.ammo=0,this.app.fire("shootingStopped",!0,this.activeWeapon.weaponType,this.localPlayerID)):this.activeWeapon.automaticFiring||this.ShootingStopped(),this.app.fire("weaponAmmoAmountChanged",this.activeWeapon),this.timePassed=0,this.compoundingWeaponSpread+=this.activeWeapon.compoundingSpread,this.compoundingWeaponSpread>4.5&&(this.compoundingWeaponSpread=4.5)}}else this.timeSinceScreenLock>0&&(this.timeSinceScreenLock=0)}},Shooting.prototype.OnMouseDown=function(i){i.button===pc.MOUSEBUTTON_LEFT&&(FIRE_KEY_PRESSED=!0)},Shooting.prototype.OnMouseUp=function(i){i.button===pc.MOUSEBUTTON_LEFT&&this.ShootingStopped()},Shooting.prototype.OnTouchStart=function(i){i&&(this.mobileFirebuttonDown=!0),FIRE_KEY_PRESSED=!0},Shooting.prototype.OnTouchEnd=function(i){i&&(this.mobileFirebuttonDown=!1),this.ShootingStopped()},Shooting.prototype.ShootingStopped=function(){FIRE_KEY_PRESSED=!1,this.isFiring&&(this.isFiring=!1,this.app.fire("shootingStopped",!1,this.activeWeapon.weaponType,this.localPlayerID))},Shooting.prototype.OnJumpingStateChanged=function(i){i&&(this.compoundingWeaponSpread+=2*this.activeWeapon.compoundingSpread,this.compoundingWeaponSpread>10&&(this.compoundingWeaponSpread=10))},Shooting.prototype.OnWeaponSwitched=function(i,t){if(this.compoundingWeaponSpread=0,this.localPlayerID===i){switch(this.previousWeapon=this.activeWeapon,this.ShootingStopped(),this.crosshairDot.enabled=!0,this.crosshairTop.enabled=!0,this.crosshairBottom.enabled=!0,this.crosshairLeft.enabled=!0,this.crosshairRight.enabled=!0,this.crosshairRound.enabled=!1,t){case Weapons.Pistols:this.activeWeapon=this.Pistols,this.crosshairDefaultPosition=14;break;case Weapons.Rifle:this.activeWeapon=this.Rifle,this.crosshairDefaultPosition=14;break;case Weapons.Shotgun:this.activeWeapon=this.Shotgun,this.crosshairDefaultPosition=100,this.crosshairDot.enabled=!0,this.crosshairTop.enabled=!1,this.crosshairBottom.enabled=!1,this.crosshairLeft.enabled=!1,this.crosshairRight.enabled=!1,this.crosshairRound.enabled=!0;break;case Weapons.Minigun:this.activeWeapon=this.Minigun,this.crosshairDefaultPosition=22;break;case Weapons.RocketLauncher:this.activeWeapon=this.RocketLauncher,this.crosshairDefaultPosition=64,this.crosshairDot.enabled=!0,this.crosshairTop.enabled=!1,this.crosshairBottom.enabled=!1,this.crosshairLeft.enabled=!1,this.crosshairRight.enabled=!1,this.crosshairRound.enabled=!0;break;case Weapons.Bow:this.activeWeapon=this.Bow,this.crosshairDefaultPosition=10;break;case Weapons.Flamer:this.activeWeapon=this.Flamer,this.crosshairDefaultPosition=8;break;case Weapons.Uzi:this.activeWeapon=this.Uzi,this.crosshairDefaultPosition=20}this.app.fire("weaponAmmoSwitched",this.activeWeapon)}},Shooting.prototype.OnWeaponPickup=function(i,t,e,s,o,a){if(this.localPlayerID===i)if(this.DropWeapon(this.previousWeapon),this.previousWeapon=this.activeWeapon,this.Rifle.ammo=0,this.Shotgun.ammo=0,this.Minigun.ammo=0,this.RocketLauncher.ammo=0,this.Bow.ammo=0,this.Flamer.ammo=0,this.Uzi.ammo=0,o&&null!=s&&0!==s)switch(t){case Weapons.Pistols:this.Pistols.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Pistols);break;case Weapons.Rifle:this.Rifle.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Rifle);break;case Weapons.Shotgun:this.Shotgun.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Shotgun);break;case Weapons.Minigun:this.Minigun.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Minigun);break;case Weapons.RocketLauncher:this.RocketLauncher.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.RocketLauncher);break;case Weapons.Bow:this.Bow.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Bow);break;case Weapons.Flamer:this.Flamer.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Flamer);break;case Weapons.Uzi:this.Uzi.ammo=s,this.app.fire("weaponAmmoAmountChanged",this.Uzi)}else switch(t){case Weapons.Pistols:this.Pistols.ammo+=10,this.app.fire("weaponAmmoAmountChanged",this.Pistols);break;case Weapons.Rifle:this.Rifle.ammo+=20,this.app.fire("weaponAmmoAmountChanged",this.Rifle);break;case Weapons.Shotgun:this.Shotgun.ammo+=20,this.app.fire("weaponAmmoAmountChanged",this.Shotgun);break;case Weapons.Minigun:this.Minigun.ammo+=80,this.app.fire("weaponAmmoAmountChanged",this.Minigun);break;case Weapons.RocketLauncher:this.RocketLauncher.ammo+=10,this.app.fire("weaponAmmoAmountChanged",this.RocketLauncher);break;case Weapons.Bow:this.Bow.ammo+=14,this.app.fire("weaponAmmoAmountChanged",this.Bow);break;case Weapons.Flamer:this.Flamer.ammo+=100,this.app.fire("weaponAmmoAmountChanged",this.Flamer);break;case Weapons.Uzi:this.Uzi.ammo+=80,this.app.fire("weaponAmmoAmountChanged",this.Uzi)}},Shooting.prototype.DropWeapon=function(i){if(i.weaponType!==Weapons.Pistols){var t=this.cameraEntity.getPosition();this.droppedWeaponSpawnPoint.set(0,0,0),this.droppedWeaponSpawnPoint.copy(t).add(this.cameraEntity.forward);var e=this.cameraEntity.forward.add(pc.Vec3.UP).normalize().scale(35),s=generateUUID();this.app.fire("droppableWeaponDroppedLocally",s,this.localPlayerID,this.droppedWeaponSpawnPoint,i.weaponType,this.previousWeapon.ammo,e)}},Shooting.prototype.onRespawnGranted=function(i,t){i.id===this.localPlayerID&&(this.Rifle.ammo=0,this.Shotgun.ammo=0,this.Minigun.ammo=0,this.RocketLauncher.ammo=0,this.Uzi.ammo=0,this.app.fire("weaponAmmoAmountChanged",this.Pistols),this.app.fire("weaponAmmoAmountChanged",this.Rifle),this.app.fire("weaponAmmoAmountChanged",this.Shotgun),this.app.fire("weaponAmmoAmountChanged",this.Minigun),this.app.fire("weaponAmmoAmountChanged",this.RocketLauncher),this.app.fire("weaponAmmoAmountChanged",this.Uzi),this.DisableCrosshairHit())},Shooting.prototype.OnZoomChanged=function(i){},Shooting.prototype.AnimateCrosshairHit=function(){this.isPlayerAllowedToShoot&&(this.crosshairHitTopLeft.enabled=!0,this.crosshairHitTopRight.enabled=!0,this.crosshairHitBottomLeft.enabled=!0,this.crosshairHitBottomRight.enabled=!0,this.crosshairUIHitActive=!0,this.crosshairUIHitTimer=0)},Shooting.prototype.DisableCrosshairHit=function(){this.crosshairHitTopLeft.enabled=!1,this.crosshairHitTopRight.enabled=!1,this.crosshairHitBottomLeft.enabled=!1,this.crosshairHitBottomRight.enabled=!1,this.crosshairUIHitActive=!1,this.crosshairUIHitTimer=0},Shooting.prototype.SetLargeMobileCrosshair=function(){this.mobileCrosshairIsNormal&&(this.crosshairDot.element.height=6,this.crosshairDot.element.width=6,this.crosshairTop.element.height=22,this.crosshairBottom.element.height=22,this.crosshairLeft.element.height=22,this.crosshairRight.element.height=22,this.crosshairTop.element.width=6,this.crosshairBottom.element.width=6,this.crosshairLeft.element.width=6,this.crosshairRight.element.width=6,this.crosshairZoomOffset=10,this.mobileCrosshairIsNormal=!1)},Shooting.prototype.SetNormalMobileCrosshair=function(){this.mobileCrosshairIsNormal||(this.crosshairDot.element.height=4,this.crosshairDot.element.width=4,this.crosshairTop.element.height=14,this.crosshairBottom.element.height=14,this.crosshairLeft.element.height=14,this.crosshairRight.element.height=14,this.crosshairTop.element.width=4,this.crosshairBottom.element.width=4,this.crosshairLeft.element.width=4,this.crosshairRight.element.width=4,this.crosshairZoomOffset=0,this.mobileCrosshairIsNormal=!0)};var BulletMovement=pc.createScript("bulletMovement");BulletMovement.attributes.add("motionThreshold",{type:"number",default:5,title:"Motion Threshold",description:"Number of meters moved in one frame before CCD is enabled"}),BulletMovement.attributes.add("sweptSphereRadius",{type:"number",default:.02,title:"Swept Sphere Radius",description:"This should be below the half extent of the collision volume. E.g For an object of dimensions 1 meter, try 0.2"}),BulletMovement.attributes.add("bulletModelEntity",{type:"entity",title:"Bullet Model"}),BulletMovement.attributes.add("isInitialized",{type:"boolean",default:!1}),BulletMovement.attributes.add("effectController",{type:"entity"}),BulletMovement.prototype.init=function(t,e,i,o,l,s,n){this.bulletID=t.id,this.playerShooting=t.playerID,this.weaponType=t.weapon.weaponType,this.bulletDamage=t.weapon.damage,this.bulletSpeed=t.weapon.speed,this.playerShootingPosition=e,this.playerShootingRigidbody=i,this.playerShootingGun=o,this.playerShootingCamera=l,this.isLocalPlayer=s,this.hitIndicator=null,this.forceScale=1,this.isInitialized||(n.musicBundleAsset.ready((function(t){var e=this.app.assets.find("rocket_sweep_x2_2sec.mp3","audio"),i=this.entity.sound.slot("rocket_fly");i.asset=e,i.duration=2}),this),this.selfDestructTime=5,this.selfDestructTimer=null,this.initialPosition=this.entity.getPosition(),this.initialRotation=this.entity.getRotation(),this.directionVector=new pc.Vec3,this.force=new pc.Vec3,this.on("enable",this.onEnable,this),this.isInitialized=!0),this.entity.name="Bullet "+this.bulletID,this.entity.tag=s?"OwnBullet":"EnemyFiredBullet";var a=o.getPosition().clone().add(l.forward.scale(.15+.01*i.linearVelocity.length()));this.entity.rigidbody.teleport(a.x,a.y,a.z),this.entity.setLocalEulerAngles(l.getLocalEulerAngles());var r=0;this.weaponType==Weapons.Bow?r=.03:this.weaponType==Weapons.RocketLauncher&&(r=.14),this.directionVector.set(this.playerShootingCamera.forward.x,this.playerShootingCamera.forward.y+r,this.playerShootingCamera.forward.z),this.force.copy(this.directionVector).normalize().scale(this.bulletSpeed),this.enableBullet(),this.effectController.script.effectController.startRocketFX(a,this.playerShootingCamera.getRotation(),this.directionVector,this.entity)},BulletMovement.prototype.onEnable=function(){this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.entity.rigidbody.type=pc.BODYTYPE_DYNAMIC,this.entity.script.physicsLayer.initialize();var t=this.entity.rigidbody.body;t.setCcdMotionThreshold(this.motionThreshold),t.setCcdSweptSphereRadius(this.sweptSphereRadius)},BulletMovement.prototype.update=function(t){this.forceScale-=.055*t,this.force.scale(this.forceScale),this.entity.rigidbody.applyForce(this.force)},BulletMovement.prototype.onCollisionStart=function(t){var e=t.other,i=e.name;if(null!=i&&(i.includes("Player")||i.includes("NPC")));else{for(var o=t.contacts[0].point,l=t.contacts[0].normal,s=null,n=e.tags.list(),a=0;a<n.length;a++)if(n[a].includes("material")){s=ObjectMaterials[n[a]];break}this.app.fire("bulletHitWorld",this.bulletID,this.playerShooting,null,this.bulletDamage,this.playerShootingPosition,o,l,s),this.disableBullet()}},BulletMovement.prototype.enableBullet=function(){this.entity.enabled=!0,this.bulletModelEntity.enabled=!0,soundEnabled&&(this.entity.sound.slots.rocket_fly.startTime=Math.floor(2*Math.random())*this.entity.sound.slots.rocket_fly.duration,this.entity.sound.slots.rocket_fly.play()),this.selfDestructTimer=setTimeout(function(){this.disableBullet()}.bind(this),1e3*this.selfDestructTime)},BulletMovement.prototype.isBulletEnabled=function(){return this.entity.enabled},BulletMovement.prototype.disableBullet=function(){clearTimeout(this.selfDestructTimer),this.bulletModelEntity.enabled=!1,this.entity.collision.off("collisionstart",this.onCollisionStart,this),this.entity.rigidbody.type=pc.BODYTYPE_STATIC,this.entity.setRotation(this.initialRotation),this.entity.translate(this.initialPosition),this.entity.sound.slots.rocket_fly.stop(),setTimeout(function(){this.entity.enabled=!1}.bind(this),1e3)};var ModelMovement=pc.createScript("modelMovement");ModelMovement.attributes.add("lookSpeed",{type:"number",default:.1,title:"Look Speed"}),ModelMovement.attributes.add("movementSpeed",{type:"number",default:15,title:"Player Movement Speed"}),ModelMovement.attributes.add("jumpSpeed",{type:"number",default:15,title:"Player Jump Speed"}),ModelMovement.attributes.add("waterSpeed",{type:"number",default:15,title:"Water Speed"}),ModelMovement.attributes.add("camera",{type:"entity",title:"Camera"}),ModelMovement.attributes.add("hasSubscribedToEvents",{type:"boolean",default:!1}),ModelMovement.attributes.add("hasCachedUIElements",{type:"boolean",default:!1}),ModelMovement.attributes.add("effectControllerEntity",{type:"entity"});var self,UP_KEY_PRESSED=!1,DOWN_KEY_PRESSED=!1,LEFT_KEY_PRESSED=!1,RIGHT_KEY_PRESSED=!1,UP_RATIO_PRESSED=0,DOWN_RATIO_PRESSED=0,LEFT_RATIO_PRESSED=0,RIGHT_RATIO_PRESSED=0,isJumping=!1,isMoving=!1,isInAir=!1,isRocketJumping=!1,currentgroundname="",forwardX=0,forwardZ=0,autoMovingTime=0,autoMovingFrequency=3,jumpCooldown=0,currentAnimationState=0,horizontalVelocity=0,forwardsAcceleration=0,rightAcceleration=0,leftAcceleration=0,backwardsAcceleration=0;ModelMovement.prototype.Load=function(e,t,i){this.tickrate=.04,this.timer=0,this.localPlayerID=e,this.isPlayerAllowedToMove=t,this.isInWater=i,this.isDead=!1,this.currentAcceleration=0,this.movementForce=new pc.Vec3,this.eulers=new pc.Vec3,this.jumpForce=new pc.Vec3,this.storedVelocity=new pc.Vec3,this.SubscribeToEvents(),this.isPlayerAllowedToMove&&this.app.mouse.enablePointerLock(),this.app.mouse.disableContextMenu(),null!==mouseSensitivity&&void 0!==mouseSensitivity&&0!==mouseSensitivity&&(this.lookSpeed=parseFloat(mouseSensitivity)),this.invertedMouse=invertedMouse,this.invertedMouseScale=this.invertedMouse?-1:1,self=this,this.currentRecoilOffset=0,this.recoilEnd=0,this.recoilUpLerpSpeed=11,this.recoilDownLerpSpeed=9,this.recoilTarget=0,this.currentRecoilAdditionAmount=2.5,this.recoilAdditionLimit=30,this.hitShakeAmount=0,this.currentWeapon=Weapons.Pistols},ModelMovement.prototype.SubscribeToEvents=function(){this.hasSubscribedToEvents||(this.app.on("windowLostFocus",this.OnLostFocus),this.app.keyboard.on(pc.EVENT_KEYDOWN,this.OnKeyDown,this),this.app.keyboard.on(pc.EVENT_KEYUP,this.OnKeyUp,this),MobileController.instance.active?(MobileController.instance.on("aimMove",this.OnTouchMove,this),MobileController.instance.on("move",this.OnMove,this)):(this.app.mouse.on(pc.EVENT_MOUSEMOVE,this.OnMouseMove,this),this.app.mouse.on(pc.EVENT_MOUSEDOWN,this.OnMouseDown,this)),this.on("destroy",this.onDestroy,this),this.app.on("rayFired",this.OnRayFired,this),this.app.on("bulletFired",this.OnBulletFired,this),this.app.on("weaponSwitched",this.OnWeaponSwitched,this),this.app.on("localPlayerSpawned",this.OnLocalPlayerSpawned,this),this.app.on("updateLastEnemyHitLocation",this.OnTakingDamage,this),this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("mouseSensitivityChanged",this.onMouseSensitivityChanged,this),this.app.on("invertedMouseChanged",this.onMouseInvertedChanged,this),this.hasSubscribedToEvents=!0)},ModelMovement.prototype.onDestroy=function(){this.hasSubscribedToEvents&&(this.app.off("windowLostFocus",this.OnLostFocus),this.app.keyboard.off(pc.EVENT_KEYDOWN,this.OnKeyDown,this),this.app.keyboard.off(pc.EVENT_KEYUP,this.OnKeyUp,this),this.app.mouse.off(pc.EVENT_MOUSEMOVE,this.OnMouseMove,this),this.app.mouse.off(pc.EVENT_MOUSEDOWN,this.OnMouseDown,this),this.app.off("rayFired",this.OnRayFired,this),this.app.off("bulletFired",this.OnBulletFired,this),this.app.off("weaponSwitched",this.OnWeaponSwitched,this),this.app.off("localPlayerSpawned",this.OnLocalPlayerSpawned,this),this.app.off("updateLastEnemyHitLocation",this.OnTakingDamage,this),this.app.off("playerKilled",this.OnPlayerKilled,this),this.app.off("mouseSensitivityChanged",this.onMouseSensitivityChanged,this),this.app.off("invertedMouseChanged",this.onMouseInvertedChanged,this),this.off("destroy",this.onDestroy,this))},ModelMovement.prototype.onPlayerAliveStateChanged=function(e){this.isPlayerAllowedToMove=e,this.isPlayerAllowedToMove?this.app.mouse.enablePointerLock():this.app.mouse.disablePointerLock()},ModelMovement.prototype.onPlayerIsInWaterStateChanged=function(e){this.isInWater=e};var _characterPosition=new pc.Vec3,_jumpRayStart=new pc.Vec3,_jumpRayEnd=new pc.Vec3,_jumpRayStartWater=new pc.Vec3,_jumpRayEndWater=new pc.Vec3,FORWARD_MAX_ACCELERATION=1,BACKWARD_MAX_ACCELERATION=.9,SIDE_MAX_ACCELERATION=.8,FORWARD_DELTA=10,BACKWARD_DELTA=9,SIDE_DELTA=7,SIDE_DELTA_DEACCEL=14;ModelMovement.prototype.update=function(e){if(this.timer+=e,this.isPlayerAllowedToMove&&!this.isDead){var t,i=this.movementForce,o=this.camera.forward,n=this.camera.right,a=(this.camera.up,0),s=0;if(!isChatModeEnabled&&!SettingsPopupIsShowing)UP_KEY_PRESSED?(forwardsAcceleration<FORWARD_MAX_ACCELERATION*UP_RATIO_PRESSED?forwardsAcceleration+=FORWARD_DELTA*e*UP_RATIO_PRESSED:forwardsAcceleration=FORWARD_MAX_ACCELERATION*UP_RATIO_PRESSED,a+=o.x*forwardsAcceleration,s+=o.z*forwardsAcceleration):forwardsAcceleration>0&&((forwardsAcceleration-=FORWARD_DELTA*e)<0?forwardsAcceleration=0:(a+=o.x*forwardsAcceleration,s+=o.z*forwardsAcceleration)),DOWN_KEY_PRESSED?(backwardsAcceleration<BACKWARD_MAX_ACCELERATION*DOWN_RATIO_PRESSED?backwardsAcceleration+=BACKWARD_DELTA*e*DOWN_RATIO_PRESSED:backwardsAcceleration=BACKWARD_MAX_ACCELERATION*DOWN_RATIO_PRESSED,a-=o.x*backwardsAcceleration,s-=o.z*backwardsAcceleration):backwardsAcceleration>0&&((backwardsAcceleration-=BACKWARD_DELTA*e)<0?backwardsAcceleration=0:(a-=o.x*backwardsAcceleration,s-=o.z*backwardsAcceleration)),RIGHT_KEY_PRESSED?(rightAcceleration<SIDE_MAX_ACCELERATION*RIGHT_RATIO_PRESSED?rightAcceleration+=forwardsAcceleration>=FORWARD_MAX_ACCELERATION*RIGHT_RATIO_PRESSED?SIDE_DELTA*e/2*RIGHT_RATIO_PRESSED:SIDE_DELTA*e*RIGHT_RATIO_PRESSED:rightAcceleration=SIDE_MAX_ACCELERATION*RIGHT_RATIO_PRESSED,a+=n.x*rightAcceleration,s+=n.z*rightAcceleration):rightAcceleration>0&&((rightAcceleration-=SIDE_DELTA_DEACCEL*e)<0?rightAcceleration=0:(a+=n.x*rightAcceleration,s+=n.z*rightAcceleration)),LEFT_KEY_PRESSED?(leftAcceleration<SIDE_MAX_ACCELERATION*LEFT_RATIO_PRESSED?leftAcceleration+=forwardsAcceleration>=FORWARD_MAX_ACCELERATION*LEFT_RATIO_PRESSED?SIDE_DELTA*e/2*LEFT_RATIO_PRESSED:SIDE_DELTA*e*LEFT_RATIO_PRESSED:leftAcceleration=SIDE_MAX_ACCELERATION*LEFT_RATIO_PRESSED,a-=n.x*leftAcceleration,s-=n.z*leftAcceleration):leftAcceleration>0&&((leftAcceleration-=SIDE_DELTA_DEACCEL*e)<0?leftAcceleration=0:(a-=n.x*leftAcceleration,s-=n.z*leftAcceleration)),_characterPosition.set(this.entity.getPosition().x,this.entity.getPosition().y,this.entity.getPosition().z),this.timer>this.tickrate&&this.camera.enabled&&(this.timer=0,this.app.fire("localPlayerPositionChanged",this.localPlayerID,_characterPosition,this.camera.getEulerAngles())),jumpCooldown>0?jumpCooldown-=e:(_jumpRayStartWater.set(_characterPosition.x,_characterPosition.y+.5,_characterPosition.z),_jumpRayEndWater.set(_characterPosition.x,_characterPosition.y-1,_characterPosition.z),(t=this.app.systems.rigidbody.raycastFiltered(_jumpRayStartWater,_jumpRayEndWater,pc.BODYGROUP_USER_3,pc.BODYGROUP_USER_3))||(_jumpRayStart.set(_characterPosition.x,_characterPosition.y,_characterPosition.z),_jumpRayEnd.set(_characterPosition.x,_characterPosition.y-1,_characterPosition.z),t=this.app.systems.rigidbody.raycastFiltered(_jumpRayStart,_jumpRayEnd,pc.BODYGROUP_USER_2,pc.BODYGROUP_USER_2)),t?(isInAir=!1,isJumping&&this.UpdateIsJumpingState(!1,t.entity.tags.list()),isRocketJumping&&this.UpdateRocketJumpingState(!1)):isInAir=!0),(this.app.keyboard.wasPressed(pc.KEY_SPACE)||MobileController.instance.wasPressed(MobileController.JUMP))&&!isJumping&&jumpCooldown<=0&&null!==t&&!isRocketJumping&&(currentAnimationState==EnemyAnimationState.Stand?this.ChangeAnimationState(EnemyAnimationState.Jump):this.ChangeAnimationState(EnemyAnimationState.RunJump),this.UpdateIsJumpingState(!0),this.isInWater?this.entity.rigidbody.applyImpulse(0,.75*this.jumpSpeed,0):this.entity.rigidbody.applyImpulse(0,this.jumpSpeed,0),jumpCooldown=.2);if(this.isInWater){var r=-12.536,c=r-this.entity.getPosition().y;if(c>0){var l=this.entity.rigidbody.mass,h=this.entity.rigidbody.linearVelocity.clone(),p=r-.4;(A=this.entity.getPosition().clone()).y<p&&(h.y<0&&(h.set(h.x,0,h.z),this.entity.rigidbody.linearVelocity=h),A.y=p,this.entity.rigidbody.teleport(A),c=r-p);var d=1*(1.1*c)*-(this.app.systems.rigidbody.gravity.y*l*3),E=-h.y*l*5+d;this.entity.rigidbody.applyForce(new pc.Vec3(0,E,0))}var A=this.entity.getPosition();this.lastRipplePos||(this.lastRipplePos=A.clone()),A.clone().sub(this.lastRipplePos).length()>.5&&(this.lastRipplePos=A.clone(),r=-12.62,A.y=r,this.effectControllerEntity.script.effectController.startNewRipple(A,.5+Math.random()))}this.storedVelocity=this.entity.rigidbody.linearVelocity,isInAir&&!this.isInWater&&(this.storedVelocity.y+=3*this.storedVelocity.y*e),0!==a||0!==s?(this.UpdateIsMovingState(!0),UP_KEY_PRESSED?this.ChangeAnimationState(EnemyAnimationState.Run):RIGHT_KEY_PRESSED?this.ChangeAnimationState(EnemyAnimationState.StrafeRight):LEFT_KEY_PRESSED?this.ChangeAnimationState(EnemyAnimationState.StrafeLeft):DOWN_KEY_PRESSED?this.ChangeAnimationState(EnemyAnimationState.RunBackwards):this.ChangeAnimationState(EnemyAnimationState.Run),this.isInWater?i.set(a,0,s).normalize().scale(this.waterSpeed):forwardsAcceleration<1&&backwardsAcceleration<1&&rightAcceleration<1&&leftAcceleration<1?(this.currentAcceleration=forwardsAcceleration,forwardsAcceleration>backwardsAcceleration&&forwardsAcceleration>rightAcceleration&&forwardsAcceleration>leftAcceleration&&(this.currentAcceleration=forwardsAcceleration),backwardsAcceleration>forwardsAcceleration&&backwardsAcceleration>rightAcceleration&&backwardsAcceleration>leftAcceleration&&(this.currentAcceleration=backwardsAcceleration),rightAcceleration>forwardsAcceleration&&rightAcceleration>backwardsAcceleration&&rightAcceleration>leftAcceleration&&(this.currentAcceleration=rightAcceleration),leftAcceleration>forwardsAcceleration&&leftAcceleration>backwardsAcceleration&&leftAcceleration>rightAcceleration&&(this.currentAcceleration=leftAcceleration),i.set(a,0,s).normalize().scale(this.movementSpeed*this.currentAcceleration)):i.set(a,0,s).normalize().scale(this.movementSpeed),i.y=this.storedVelocity.y,this.entity.rigidbody.linearVelocity=i):(this.UpdateIsMovingState(!1),this.ChangeAnimationState(EnemyAnimationState.Stand),isInAir&&(this.entity.rigidbody.linearVelocity=this.storedVelocity)),this.recoilTarget=pc.math.lerp(this.recoilTarget,this.recoilEnd,this.recoilDownLerpSpeed*e),this.currentRecoilOffset=pc.math.lerp(this.currentRecoilOffset,this.recoilTarget,this.recoilUpLerpSpeed*e),this.camera.setLocalEulerAngles(this.eulers.y+this.currentRecoilOffset,this.eulers.x,0)}},ModelMovement.prototype.IsAnyJumpActive=function(){return isJumping||isRocketJumping},ModelMovement.prototype.IsInAir=function(){return isInAir},ModelMovement.prototype.IsInWater=function(){return this.isInWater},ModelMovement.prototype.UpdateIsMovingState=function(e){isMoving!=e&&(isMoving=e,this.app.fire("movementStateChanged",e))},ModelMovement.prototype.UpdateRocketJumpingState=function(e){isRocketJumping!=e&&(e&&(jumpCooldown=.2,this.ChangeAnimationState(EnemyAnimationState.RocketJump)),isRocketJumping=e)},ModelMovement.prototype.UpdateIsJumpingState=function(e,t){t=void 0!==t?t:[],isJumping!=e&&((isJumping=e)||(forwardsAcceleration*=.5,leftAcceleration*=.5,rightAcceleration*=.5,backwardsAcceleration*=.5),this.app.fire("jumpingStateChanged",e,t))},ModelMovement.prototype.OnMouseDown=function(e){!this.isPlayerAllowedToMove||pc.Mouse.isPointerLocked()||isChatModeEnabled||SettingsPopupIsShowing||this.app.mouse.enablePointerLock()},ModelMovement.prototype.OnTouchMove=function(e){this.isPlayerAllowedToMove&&(this.eulers.x-=this.lookSpeed*e.dx,this.eulers.y-=this.lookSpeed*e.dy*this.invertedMouseScale,this.eulers.y=pc.math.clamp(this.eulers.y,-90,90))},ModelMovement.prototype.OnMouseMove=function(e){this.isPlayerAllowedToMove&&pc.Mouse.isPointerLocked()&&(this.eulers.x-=this.lookSpeed*e.dx,this.eulers.y-=this.lookSpeed*e.dy*this.invertedMouseScale,this.eulers.y=pc.math.clamp(this.eulers.y,-90,90))},ModelMovement.prototype.OnLostFocus=function(){UP_KEY_PRESSED=!1,DOWN_KEY_PRESSED=!1,LEFT_KEY_PRESSED=!1,RIGHT_KEY_PRESSED=!1,UP_RATIO_PRESSED=0,DOWN_RATIO_PRESSED=0,LEFT_RATIO_PRESSED=0,RIGHT_RATIO_PRESSED=0},ModelMovement.prototype.OnKeyDown=function(e){e.key===pc.KEY_W&&(UP_KEY_PRESSED=!0,UP_RATIO_PRESSED=1),e.key===pc.KEY_S&&(DOWN_KEY_PRESSED=!0,DOWN_RATIO_PRESSED=1),e.key===pc.KEY_A&&(LEFT_KEY_PRESSED=!0,LEFT_RATIO_PRESSED=1),e.key===pc.KEY_D&&(RIGHT_KEY_PRESSED=!0,RIGHT_RATIO_PRESSED=1),e.key==pc.KEY_UP&&(this.lookSpeed+=.01,this.app.fire("mouseSensitivityChanged",this.lookSpeed)),e.key==pc.KEY_DOWN&&(this.lookSpeed-=.01,this.app.fire("mouseSensitivityChanged",this.lookSpeed))},ModelMovement.prototype.OnMove=function(e,t){0!==t?(LEFT_KEY_PRESSED=e.x<0,RIGHT_KEY_PRESSED=e.x>0,DOWN_KEY_PRESSED=e.y<0,UP_KEY_PRESSED=e.y>0,LEFT_RATIO_PRESSED=LEFT_KEY_PRESSED?-1*e.x*t:0,RIGHT_RATIO_PRESSED=RIGHT_KEY_PRESSED?e.x*t:0,DOWN_RATIO_PRESSED=DOWN_KEY_PRESSED?-1*e.y*t:0,UP_RATIO_PRESSED=UP_KEY_PRESSED?e.y*t:0):this.OnLostFocus()},ModelMovement.prototype.OnKeyUp=function(e){e.key===pc.KEY_W&&(UP_KEY_PRESSED=!1),e.key===pc.KEY_S&&(DOWN_KEY_PRESSED=!1),e.key===pc.KEY_A&&(LEFT_KEY_PRESSED=!1),e.key===pc.KEY_D&&(RIGHT_KEY_PRESSED=!1)},
//!! It's very important to not change the animation system without proper understanding of all edgecases !!
ModelMovement.prototype.ChangeAnimationState=function(e){currentAnimationState!=e&&(isJumping&&e!=EnemyAnimationState.Die&&e!=EnemyAnimationState.RocketJump||isRocketJumping&&e!=EnemyAnimationState.Die||(currentAnimationState=e,this.app.fire("sendAnimationState",this.localPlayerID,e)))},ModelMovement.prototype.OnBulletFired=function(e,t,i){this.OnRayFired(t,i)},ModelMovement.prototype.OnRayFired=function(e,t){this.recoilTarget<this.recoilAdditionLimit&&(this.recoilTarget+=this.currentRecoilAdditionAmount)},ModelMovement.prototype.OnWeaponSwitched=function(e,t){if(this.localPlayerID===e){switch(t){case Weapons.Pistols:this.currentRecoilAdditionAmount=2.5;break;case Weapons.Rifle:this.currentRecoilAdditionAmount=5;break;case Weapons.Shotgun:this.currentRecoilAdditionAmount=10;break;case Weapons.Minigun:this.currentRecoilAdditionAmount=2;break;case Weapons.RocketLauncher:this.currentRecoilAdditionAmount=1;break;case Weapons.Uzi:this.currentRecoilAdditionAmount=2}this.currentWeapon=t}},ModelMovement.prototype.OnLocalPlayerSpawned=function(e){isJumping=!1,isMoving=!1,isInAir=!1,isRocketJumping=!1,this.isInWater=!1,this.isDead=!1},ModelMovement.prototype.OnTakingDamage=function(e,t,i){switch(forwardsAcceleration*=.1,leftAcceleration*=.1,rightAcceleration*=.1,backwardsAcceleration*=.1,i){case Weapons.Pistols:this.hitShakeAmount=2;break;case Weapons.Rifle:this.hitShakeAmount=4;break;case Weapons.Shotgun:case Weapons.Minigun:this.hitShakeAmount=2;break;case Weapons.RocketLauncher:this.hitShakeAmount=15;break;case Weapons.Uzi:this.hitShakeAmount=2}this.recoilTarget<this.recoilAdditionLimit&&(this.recoilTarget+=this.hitShakeAmount)};var resetVelocity=new pc.Vec3(0,0,0);ModelMovement.prototype.OnPlayerKilled=function(e,t,i,o){o&&e==this.localPlayerID&&(this.storedVelocity=resetVelocity,this.entity.rigidbody.linearVelocity=resetVelocity,this.isDead=!0)},ModelMovement.prototype.onMouseSensitivityChanged=function(e){this.lookSpeed=parseFloat(e.toFixed(4))},ModelMovement.prototype.onMouseInvertedChanged=function(e){this.invertedMouse=e,this.invertedMouseScale=this.invertedMouse?-1:1};var WorldCollisionEnter=pc.createScript("worldCollisionEnter");WorldCollisionEnter.prototype.initialize=function(){this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.on("disable",this.onDisable,this)},WorldCollisionEnter.prototype.onDisable=function(){this.entity.collision.off("collisionstart",this.onCollisionStart,this)},WorldCollisionEnter.prototype.onCollisionStart=function(o){var i=o.other,t=o.other.tag;"OwnBullet"!==t&&"EnemyFiredBullet"!==t||i.destroy()};var WavesMovement=pc.createScript("wavesMovement");WavesMovement.attributes.add("materialAsset",{type:"asset"}),WavesMovement.attributes.add("speed",{type:"vec2"}),WavesMovement.attributes.add("amount",{type:"vec2"}),WavesMovement.tmp=new pc.Vec2,WavesMovement.prototype.initialize=function(){this.materialAsset&&(this.material=this.materialAsset.resource),this.time=0},WavesMovement.prototype.update=function(t){this.time+=t;var e=WavesMovement.tmp;e.set(this.amount.x*Math.sin(this.time*this.speed.x),this.amount.y*Math.sin(this.time*this.speed.y)-.06),this.material.opacityMapOffset=e,this.material.update()};var KeyboardInputHelper=pc.createScript("keyboardInputHelper");KeyboardInputHelper.attributes.add("inputFieldEntity",{type:"entity",title:"Input Field Background"}),KeyboardInputHelper.attributes.add("inputFieldForegroundEntity",{type:"entity",title:"Input Field Foreground"}),KeyboardInputHelper.attributes.add("typeYourNameLabel",{type:"entity",title:"Type Your Name"}),KeyboardInputHelper.attributes.add("indicatorEntity",{type:"entity",title:"Indicator"}),KeyboardInputHelper.prototype.init=function(e,t,i,n,a){this.TextIndicator="|",this.parentElement=this.entity.parent.element,this.maxWidth=this.inputFieldEntity.element.width-50,this.maxCharacters=11,this.element=this.entity.element,this.inputFieldForegroundElement=this.inputFieldForegroundEntity.element,this.invalidCharacterText=i,this.invalidNameText=n,this.nameIsTooLongText=a,this.timePassed=0,this.indicatorShowThreshold=.5,this.indicatorHideThreshold=.5,this.isIndicatorVisible=!1,this.updateIndicator=!1,this.isInEditMode=!1,this.androidKeyCodeUndefined=!1,this.previousLength=0,this.isWindowFocused=!0,this.isInputAllowed=!0,this.active=!1,this.textArea=null,this.alertHandler=t,this.typeYourNameLabelPosition=this.typeYourNameLabel.getLocalPosition(),this.changeName(e),this.indicatorElement=this.indicatorEntity.element,this.indicatorElement.text="",this.keyboard=this.app.keyboard,this.app.on("windowLostFocus",this.onLostFocus,this),this.app.on("windowGainedFocus",this.onGainedFocus,this),this.on("enable",this.enable,this),this.on("disable",this.disable,this)},KeyboardInputHelper.prototype.enable=function(){this.active||(this.active=!0,this.updateIndicator=!0,this.textArea=document.createElement("textarea"),this.textArea.value=this.playerName,this.textArea.style.position="fixed",MobileController.instance.active?(this.delayedResize(),this.app.on("ViewportManager:resize",this.delayedResize,this),this.textArea.onfocus=this.textAreaOnFocus.bind(this),this.textArea.onblur=this.textAreaOnBlur.bind(this),this.previousLength=this.textArea.value.length,this.textArea.addEventListener("input",this.onInputChange.bind(this)),this.textArea.addEventListener("keyup",this.blurOnEnterKey.bind(this))):(this.keyboard.on("keydown",this.onKeyDown,this),this.textArea.focus(),this.delayedResize()),this.textArea.style.opacity=0,MobileController.instance.active||(this.textArea.style.display="none"),document.body.appendChild(this.textArea),this.enableInput(),this.changeName(this.playerName))},KeyboardInputHelper.prototype.textAreaOnFocus=function(){MobileController.instance.active&&(MobileController.instance.setPreventDefault(!1),this.textArea.value="",this.previousLength=0)},KeyboardInputHelper.prototype.textAreaOnBlur=function(){MobileController.instance.active&&MobileController.instance.setPreventDefault(!0)},KeyboardInputHelper.prototype.disable=function(){this.active&&(this.active=!1,this.updateIndicator=!1,MobileController.instance.active?this.app.off("ViewportManager:resize",this.delayedResize,this):this.keyboard.off("keydown",this.onKeyDown,this),null!==this.textArea&&(document.body.removeChild(this.textArea),this.textArea=null),this.disableInput())},KeyboardInputHelper.prototype.delayedResize=function(){this.onResize(),setTimeout(function(){this.onResize()}.bind(this),1e3)},KeyboardInputHelper.prototype.onResize=function(){if(this.textArea){var e=this.inputFieldEntity.element.canvasCorners,t=e[1].x-e[0].x,i=e[1].y-e[2].y;this.textArea.style.width=t+"px",this.textArea.style.height=i+"px",this.textArea.style.left=e[0].x+0+"px",this.textArea.style.top=e[2].y+"px"}},KeyboardInputHelper.prototype.enableInput=function(){this.isInputAllowed=!0},KeyboardInputHelper.prototype.disableInput=function(){this.isInputAllowed=!1},KeyboardInputHelper.prototype.onLostFocus=function(){this.isWindowFocused=!1,this.indicatorElement.text=""},KeyboardInputHelper.prototype.onGainedFocus=function(){this.isWindowFocused=!0},KeyboardInputHelper.prototype.update=function(e){this.isWindowFocused&&this.isInputAllowed?(this.entity.parent.element.width!==this.element.width&&(this.entity.parent.element.width=this.element.width,this.entity.parent.parent.element.width=this.element.width),this.updateIndicator&&(this.timePassed+=e,this.timePassed>this.indicatorShowThreshold&&(this.indicatorElement.text=this.isIndicatorVisible?"":this.TextIndicator,this.isIndicatorVisible=!this.isIndicatorVisible,this.timePassed=0))):this.isIndicatorVisible&&(this.isIndicatorVisible=!1,this.timePassed=0)},KeyboardInputHelper.prototype.onKeyDown=function(e){if(this.alertHandler.clearFeedback(),this.isInputAllowed){if(MobileController.instance.active||this.textArea.focus(),e.key===pc.KEY_BACKSPACE)this.enterEditMode(),""!==this.playerName&&(this.playerName=this.playerName.slice(0,-1),0===this.playerName.length&&(this.playerName="",this.typeYourNameLabel.enabled=!0,this.indicatorEntity.setLocalPosition(this.typeYourNameLabelPosition.x+5,-5,this.typeYourNameLabelPosition.z)));else{if(e.key===pc.KEY_ESCAPE||e.key===pc.KEY_ENTER||e.key===pc.KEY_SHIFT||e.key===pc.KEY_CONTROL||e.key===pc.KEY_ALT||e.key===pc.KEY_F1||e.key===pc.KEY_F2||e.key===pc.KEY_F3||e.key===pc.KEY_F4||e.key===pc.KEY_F5||e.key===pc.KEY_F6||e.key===pc.KEY_F7||e.key===pc.KEY_F8||e.key===pc.KEY_F9||e.key===pc.KEY_F10||e.key===pc.KEY_F11||e.key===pc.KEY_F12)return;if(this.enterEditMode(),this.validateInputCharacter(e.key))if(this.typeYourNameLabel.enabled=!1,this.indicatorEntity.setLocalPosition(0,-5,0),this.element.width<this.maxWidth&&this.playerName.length<this.maxCharacters)this.playerName+=String.fromCharCode(e.key);else{var t=this.nameIsTooLongText;this.playerName.length>=this.maxCharacters&&(t+=". Max "+this.maxCharacters+" characters"),this.alertHandler.displayFeedback(t,1,FeedbackType.Warning)}else this.alertHandler.displayFeedback(this.invalidCharacterText,1,FeedbackType.Warning)}this.element.text=this.playerName,this.entity.parent.element.width=this.element.width,this.entity.parent.parent.element.width=this.element.width}},KeyboardInputHelper.prototype.getValidatedInputName=function(){var e=this.playerName;if(null==e||0===e.length)this.alertHandler.displayFeedback(this.invalidNameText,1,FeedbackType.Warning),e=null;else for(const i in profaneWords){var t=profaneWords[i].toUpperCase();if(e.includes(t)){this.alertHandler.displayFeedback(this.invalidNameText,1,FeedbackType.Warning),this.app.fire("playerNameRejected",e),e=null;break}}return e},KeyboardInputHelper.prototype.validateInputCharacter=function(e){var t=!1;return(48<=e&&e<=57||65<=e&&e<=90||97<=e&&e<=122)&&(t=!0),t},KeyboardInputHelper.prototype.blurOnEnterKey=function(e){switch(e.key){case"Backspace":this.doBackspace();break;case"Enter":this.textArea.blur()}},KeyboardInputHelper.prototype.onInputChange=function(e){var t=this.textArea.value.length;if(t>this.previousLength){var i=this.textArea.value.charAt(this.textArea.value.length-1).toUpperCase().charCodeAt();10===i?this.textArea.blur():this.onKeyDown({key:i})}t<this.previousLength&&this.doBackspace(),this.previousLength=t},KeyboardInputHelper.prototype.doBackspace=function(e){this.backSpaceUsed||(this.onKeyDown({key:pc.KEY_BACKSPACE}),this.backSpaceUsed=!0,setTimeout(function(){this.backSpaceUsed=!1}.bind(this),50))},KeyboardInputHelper.prototype.changeName=function(e){this.isInEditMode||(null==e||""===e?(this.playerName="",this.typeYourNameLabel.enabled=!0,this.indicatorEntity.setLocalPosition(this.typeYourNameLabelPosition.x+5,-5,this.typeYourNameLabelPosition.z)):(this.playerName=e,this.typeYourNameLabel.enabled=!1,this.indicatorEntity.setLocalPosition(0,-5,0)),this.element.text=this.playerName,this.entity.parent.element.width=this.element.width,this.entity.parent.parent.element.width=this.element.width)},KeyboardInputHelper.prototype.enterEditMode=function(){this.isInEditMode||(this.isInEditMode=!0,this.inputFieldForegroundElement.color=Input_Field_Outline_Edit_Color)},KeyboardInputHelper.prototype.exitEditMode=function(){this.isInEditMode&&(this.isInEditMode=!1,this.inputFieldForegroundElement.color=Input_Field_Outline_Default_Color)},KeyboardInputHelper.prototype.animateErrorFlash=function(){var e=new pc.Color(this.inputFieldForegroundElement.color.r,this.inputFieldForegroundElement.color.g,this.inputFieldForegroundElement.color.b),t=this.inputFieldForegroundElement;this.app.tween(e).to(Input_Field_Outline_Error_Color,.15,pc.SignOut).repeat(4).yoyo(!0).on("update",(function(){t.color=e})).start()};var FpsCounter=pc.createScript("fpsCounter"),frameCounter=0,time=0,fps=0;FpsCounter.prototype.init=function(t){this.isTestModeEnabled=t.testModeEnabled,t.on("attr:testModeEnabled",this.onTestModeEnabledStateChanged,this),this.entity.element.text=""},FpsCounter.prototype.onTestModeEnabledStateChanged=function(t,e){this.isTestModeEnabled=t},FpsCounter.prototype.update=function(t){this.isTestModeEnabled&&(frameCounter++,(time+=t)>=.5&&(fps=Math.round(frameCounter/time),this.entity.element.text="FPS: "+fps,time=0,frameCounter=0))};var InGameScreen=pc.createScript("inGameScreen");InGameScreen.attributes.add("topLeftGroupEntity",{type:"entity",title:"Top Left Group"}),InGameScreen.attributes.add("bottomLeftGroupEntity",{type:"entity",title:"Bottom Left Group"}),InGameScreen.attributes.add("bottomRightGroupEntity",{type:"entity",title:"Bottom Right Group"}),InGameScreen.attributes.add("playerNameLabelEntity",{type:"entity",title:"Player Name Label"}),InGameScreen.attributes.add("scoreLabelEntity",{type:"entity",title:"Score Label"}),InGameScreen.attributes.add("killsLabelEntity",{type:"entity",title:"Kills Label"}),InGameScreen.attributes.add("enemiesLabelEntity",{type:"entity",title:"Enemies Label"}),InGameScreen.attributes.add("healthLabelEntity",{type:"entity",title:"Health Label"}),InGameScreen.attributes.add("healthBarEntity",{type:"entity",title:"Health Bar"}),InGameScreen.attributes.add("fpsBackgroundEntity",{type:"entity",title:"FPS Background"}),InGameScreen.attributes.add("fpsLabelEntity",{type:"entity",title:"FPS Label"}),InGameScreen.attributes.add("crosshairEntity",{type:"entity",title:"Crosshair"}),InGameScreen.attributes.add("damageTakenParentEntity",{type:"entity",title:"Damage Taken Parent"}),InGameScreen.attributes.add("damageTakenOverlayEntity",{type:"entity",title:"Damage Taken Overlay"}),InGameScreen.attributes.add("damageTakenIndicatorEntity",{type:"entity",title:"Damage Taken Indicator"}),InGameScreen.attributes.add("weaponAmmoHelperEntity",{type:"entity",title:"Weapon Ammo"}),InGameScreen.attributes.add("bottomLeftParentEntity",{type:"entity",title:"Bottom Left Parent"}),InGameScreen.attributes.add("bottomRightParentEntity",{type:"entity",title:"Bottom Right Parent"}),InGameScreen.attributes.add("isInitialized",{type:"boolean",default:!1}),InGameScreen.attributes.add("lowHealthOverlay",{type:"entity",title:"Low Health Overlay"}),InGameScreen.attributes.add("mobileControlsOverlay",{type:"entity",title:"Mobile Controls Overlay"}),InGameScreen.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),InGameScreen.prototype.getScreenType=function(){return UIScreenTypes.InGameScreen},InGameScreen.prototype.init=function(e,t,a,n,i){if(!this.isInitialized){this.isInitialized=!0,this.lowHealthON=new pc.Vec2(1,1),this.lowHealthOFF=new pc.Vec2(0,0),this.lowHealthIsFadingIn=!1,this.playerGuid=null,this.playerManagerScript=null,this.MaxPlayersInArena=10,this.damageTakenIndicatorClones={},this.damageTakenIndicatorTime=1.5,this.damageDoneIndicatorClones={},this.damageDoneIndicatorTime=1,this.scoreLabelHelper=this.scoreLabelEntity.script.scoreLabelHelper,this.scoreLabelHelper.init(),this.killsLabelHelper=this.killsLabelEntity.script.killsLabelHelper,this.killsLabelHelper.init(),this.totalPlayersScript=this.enemiesLabelEntity.script.totalPlayersHelper,this.totalPlayersScript.init(this.MaxPlayersInArena),this.damageTakenOverlayScript=this.damageTakenOverlayEntity.script.damageOverlayHelper,this.damageTakenOverlayScript.init(),this.globalsScript=e,this.storageManager=t,this.firebase=n,this.fpsLabelEntity.script.fpsCounter.init(this.globalsScript),this.healthBarManager=this.healthBarEntity.script.healthBarManager,this.healthBarManager.init(),this.weaponAmmoHelper=this.weaponAmmoHelperEntity.script.weaponAmmoHelper,this.weaponAmmoHelper.init(),this.mobileControlsHelper=this.mobileControlsOverlay.script.mobileControlsHelper,this.mobileControlsHelper.init(),this.rankManager=a,this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper;var r=new pc.Vec3(60,50,0),l=new pc.Vec4(0,0,0,0),o=new pc.Vec2(1,0),s=new pc.Vec3(-30,50,0),p=new pc.Vec4(1,0,1,0),h=new pc.Vec2(1,0);if(MobileController.instance.active){l.set(.5,0,.5,0),o.set(.5,0);var d=this.bottomLeftParentEntity.findByName("HealthBar").element.width/2;r.set(-d,50,0),p.set(.5,0,.5,0),h.set(.5,0);var y=this.bottomRightParentEntity.findByName("AmmoIcon").element.width+5;s.set(y,110,0)}this.bottomLeftParentEntity.element.anchor=l,this.bottomRightParentEntity.element.anchor=p,this.bottomLeftParentEntity.setLocalPosition(r),this.bottomRightParentEntity.setLocalPosition(s),this.popupController=i,this.app.on("playersUpdated",this.onPlayersUpdated,this),this.app.on("scoreboardUIActive",this.onScoreboardUIActive,this)}},InGameScreen.prototype.show=function(e,t){this.fpsCounterAllowed=this.globalsScript.testModeEnabled,this.topLeftGroupEntity.enabled=!0,this.bottomLeftGroupEntity.enabled=!0,this.bottomRightGroupEntity.enabled=!0,this.fpsBackgroundEntity.enabled=this.fpsCounterAllowed,this.fpsLabelEntity.enabled=this.fpsCounterAllowed,this.crosshairEntity.enabled=!0,this.damageTakenIndicatorEntity.enabled=!1,this.damageTakenParentEntity.enabled=!0,this.lowHealthOverlay.enabled=!1,this.lowHealthIsFadingIn=!1,this.profileRankEmblem.enabled=!0,this.playerManagerScript&&this.profileRankEmblemHelper.setEmblem(this.rankManager.GetRank(this.playerManagerScript.totalRankPoints)),this.popupController.on("popupOpened",this.onPopupOpened,this),this.popupController.on("popupClosed",this.onPopupClosed,this)},InGameScreen.prototype.hide=function(e){this.damageTakenOverlayScript.disableOverlay(),this.topLeftGroupEntity.enabled=!1,this.bottomLeftGroupEntity.enabled=!1,this.bottomRightGroupEntity.enabled=!1,this.fpsBackgroundEntity.enabled=!1,this.fpsLabelEntity.enabled=!1,this.crosshairEntity.enabled=!1,this.damageTakenIndicatorEntity.enabled=!1,this.damageTakenParentEntity.enabled=!1,this.lowHealthOverlay.enabled=!1,this.profileRankEmblem.enabled=!1,this.popupController.off("popupOpened",this.onPopupOpened,this),this.popupController.off("popupClosed",this.onPopupClosed,this)},InGameScreen.prototype.config=function(e){e.maxPlayersInArena&&(this.MaxPlayersInArena=e.maxPlayersInArena),this.totalPlayersScript.config(e)},InGameScreen.prototype.onPlayersUpdated=function(e,t,a){var n=a[e];if(null!=n){var i=n.getGuid();null!=i&&this.playerGuid!=i&&(this.playerManagerScript=a[e].script.playerManager,this.playerManagerScript.on("playerInfoUpdated",this.onPlayerInfoUpdated,this),this.playerManagerScript.on("playerHealthUpdated",this.onPlayerHealthUpdated,this),this.playerManagerScript.on("playerScoreUpdated",this.onPlayerScoreUpdated,this),this.playerManagerScript.on("playerKillsUpdated",this.onPlayerKillsUpdated,this),this.playerManagerScript.on("takingDamage",this.onTakingDamage,this),this.onPlayerInfoUpdated(this.playerManagerScript.playerName),this.onPlayerHealthUpdated(this.playerManagerScript.currentHealth,this.playerManagerScript.defaultHealth),this.onPlayerKillsUpdated(this.playerManagerScript.killsMade),this.onPlayerScoreUpdated(this.playerManagerScript.score),this.playerGuid=i)}},InGameScreen.prototype.onPlayerInfoUpdated=function(e){this.playerNameLabelEntity.element.text=e},InGameScreen.prototype.onPlayerHealthUpdated=function(e,t){if(this.healthLabelEntity.element.text=e+"/"+t,this.healthBarManager.setProgress(e/t),this.lowHealthOverlay.enabled&&e>=30&&!this.lowHealthIsFadingIn){this.lowHealthIsFadingIn=!0;var a=this.lowHealthON.clone(),n=this.entity.script.inGameScreen;this.entity.tween(a).to(this.lowHealthOFF,1,pc.Linear).on("update",(function(){n.lowHealthOverlay.element.opacity=a.x})).on("complete",(function(){n.lowHealthOverlay.enabled=!1,n.lowHealthIsFadingIn=!1})).start()}},InGameScreen.prototype.onPlayerScoreUpdated=function(e){this.scoreLabelHelper.updateLabel(e)},InGameScreen.prototype.onPlayerKillsUpdated=function(e){this.killsLabelHelper.updateKillsLabel(e)},InGameScreen.prototype.onTakingDamage=function(e,t,a){this.damageTakenOverlayScript.enableOverlay();var n=null,i=Object.values(this.damageTakenIndicatorClones);if(i.length>0)for(var r in i){var l=i[r];if(l.script.damageTakenIndicatorHelper.canShow()){n=l;break}}if(null===n&&((n=this.damageTakenIndicatorEntity.clone()).script.damageTakenIndicatorHelper.init(),this.damageTakenParentEntity.addChild(n),this.damageTakenIndicatorClones[n.getGuid()]=n),n.script.damageTakenIndicatorHelper.show(t,this.damageTakenIndicatorTime),a<30&&!this.lowHealthOverlay.enabled){this.lowHealthOverlay.element.opacity=0,this.lowHealthOverlay.enabled=!0;var o=this.lowHealthOFF.clone(),s=this.entity.script.inGameScreen.lowHealthOverlay;this.entity.tween(o).to(this.lowHealthON,.5,pc.Linear).on("update",(function(){s.element.opacity=o.x})).start()}},InGameScreen.prototype.onScoreboardUIActive=function(e){this.crosshairEntity.enabled=!e},InGameScreen.prototype.onPopupOpened=function(e){e===UIPopupTypes.SettingsPopup&&(this.crosshairEntity.enabled=!1)},InGameScreen.prototype.onPopupClosed=function(e){e===UIPopupTypes.SettingsPopup&&(this.crosshairEntity.enabled=!0)};var keyboard,FirstPersonWeaponController=pc.createScript("firstPersonWeaponController");FirstPersonWeaponController.attributes.add("rifleModel",{type:"entity",title:"RifleModel"}),FirstPersonWeaponController.attributes.add("shotgunModel",{type:"entity",title:"ShotgunModel"}),FirstPersonWeaponController.attributes.add("minigunModel",{type:"entity",title:"MinigunModel"}),FirstPersonWeaponController.attributes.add("rocketLauncherModel",{type:"entity",title:"RocketLauncherModel"}),FirstPersonWeaponController.attributes.add("uziModelLeft",{type:"entity",title:"UziModelLeft"}),FirstPersonWeaponController.attributes.add("uziModelRight",{type:"entity",title:"UziModelRight"}),FirstPersonWeaponController.attributes.add("bodyModel",{type:"entity",title:"BodyModel"}),FirstPersonWeaponController.attributes.add("pistolLeftModel",{type:"entity",title:"pistolLeftModel"}),FirstPersonWeaponController.attributes.add("pistolRightModel",{type:"entity",title:"pistolRightModel"}),FirstPersonWeaponController.attributes.add("characterMaterialResource",{type:"asset",assetType:"material",title:"Character Material"});var Weapons={Pistols:0,Rifle:1,Shotgun:2,Minigun:3,RocketLauncher:4,Bow:5,Flamer:6,Uzi:7,None:8,Mine:9},FPAnimationState={Run:1,Stand:2,Shoot:3,Die:4,Jump:5};function FirstPersonWeaponAnimation(t,o,e,i,n,s,a,h,l){this.loopShot=t,this.dualWeapon=o,this.bodyRun=e,this.bodyIdle=i,this.bodyShoot=n,this.bodyShootAlternative=s,this.bodyJump=a,this.weaponShoot=h,this.weaponIdle=l}FirstPersonWeaponController.prototype.init=function(t,o,e){var i=this;this.globalsScript=t,this.itemDataManager=e,this.modelMeshWasChanged=!1,this.animationsAreLoaded=!1,this.animationLoadAmountTarget=o.firstPersonAnimationFileNamesToLoad.length,this.animationCurrentLoadedAmount=0,o.ingameAnimationsBundleAsset.ready((function(t){o.firstPersonAnimationFileNamesToLoad.forEach((function(t){o.firstPersonAnimationFileAssetsToLoad[t].ready((function(e){i.bodyModel.animation.animations[t]=e.resource,i.animationCurrentLoadedAmount++,i.animationCurrentLoadedAmount==i.animationLoadAmountTarget&&(i.animationsAreLoaded=!0),o.firstPersonAnimationFileAssetsLoaded.includes(t)||(o.totalAssetsLoaded++,o.firstPersonAnimationFileAssetsLoaded.push(t))}),this)}))}),this),this.characterType=CharacterID.Fox,this.PistolAnimations=new FirstPersonWeaponAnimation(!1,!0,"Fox_1st_Run_TwoGuns.glb","Fox_1st_Idle_TwoGuns.glb","Fox_1st_ShootR_TwoGuns.glb","Fox_1st_ShootL_TwoGuns.glb","Fox_1st_Jump_TwoGuns.glb","Wpn_357gun_Shoot.glb","Wpn_357gun_Idle.glb"),this.UziAnimations=new FirstPersonWeaponAnimation(!0,!0,"Fox_1st_Run_TwoGuns.glb","Fox_1st_Idle_TwoGuns.glb","Fox_1st_ShootRata_TwoGuns.glb","Fox_1st_ShootRata_TwoGuns.glb","Fox_1st_Jump_TwoGuns.glb","Wpn_MAC10_Shoot.glb","Wpn_MAC10_Idle.glb"),this.RifleAnimations=new FirstPersonWeaponAnimation(!1,!1,"Fox_1st_Run_Rifle.glb","Fox_1st_Idle_Rifle.glb","Fox_1st_Shoot_Rifle.glb","Fox_1st_Shoot_Rifle.glb","Fox_1st_Jump_Rifle.glb","Wpn_RifleLong_Shoot.glb","Wpn_RifleLong_Idle.glb"),this.TommyGunAnimations=new FirstPersonWeaponAnimation(!0,!1,"Fox_1st_Run_TommyGun.glb","Fox_1st_Idle_TommyGun.glb","Fox_1st_ShootRata_TommyGun.glb","Fox_1st_ShootRata_TommyGun.glb","Fox_1st_Jump_TommyGun.glb","Wpn_TommyGun_Shoot.glb","Wpn_TommyGun_Idle.glb"),this.RocketLauncherAnimations=new FirstPersonWeaponAnimation(!1,!1,"Fox_1st_Run_RocketLauncher.glb","Fox_1st_Idle_RocketLauncher.glb","Fox_1st_Shoot_RocketLauncher.glb","Fox_1st_Shoot_RocketLauncher.glb","Fox_1st_Jump_RocketLauncher.glb","Wpn_RocketLauncher_Shoot.glb","Wpn_RocketLauncher_Idle.glb"),this.ShotgunAnimations=new FirstPersonWeaponAnimation(!1,!1,"Fox_1st_Run_Rifle.glb","Fox_1st_Idle_Rifle.glb","Fox_1st_Shoot_Rifle.glb","Fox_1st_Shoot_Rifle.glb","Fox_1st_Jump_Rifle.glb","Wpn_ShotGunDL_Shoot.glb","Wpn_ShotGunDL_Idle.glb"),this.currentAnimationSet=this.PistolAnimations,this.endedAnimBlendTime=.1,keyboard=this.app.keyboard,this.leftHandNode=this.bodyModel.findByName("cc_wpn.l"),this.rightHandNode=this.bodyModel.findByName("cc_wpn.r"),this.firstPersonParent=this.entity.parent,this.originalParentEntity=this.firstPersonParent.parent,this.activeWeapon=void 0,this.switchWeapon(Weapons.Pistols),this.bodyModel.enabled=!1,this.pistolLeftModel.enabled=!1,this.pistolRightModel.enabled=!1,this.rifleModel.enabled=!1,this.shotgunModel.enabled=!1,this.minigunModel.enabled=!1,this.rocketLauncherModel.enabled=!1,this.uziModelLeft.enabled=!1,this.uziModelRight.enabled=!1,this.currentRightWeaponModel=this.pistolRightModel,this.currentLeftWeaponModel=this.pistolLeftModel,this.localPlayerID=null,this.app.on("weaponPickedUp",this.OnWeaponPickup,this),this.app.on("destroy",(function(){this.app.off("weaponPickedUp",this.OnWeaponPickup,this)})),this.app.on("rayFired",this.OnBulletFired,this),this.app.on("destroy",(function(){this.app.off("rayFired",this.OnBulletFired,this)})),this.app.on("bulletFired",this.OnBulletFired,this),this.app.on("destroy",(function(){this.app.off("bulletFired",this.OnBulletFired,this)})),this.app.on("shootingStopped",this.OnShootingStopped,this),this.app.on("destroy",(function(){this.app.off("shootingStopped",this.OnShootingStopped,this)})),this.app.on("movementStateChanged",this.OnMovementStateChanged,this),this.app.on("destroy",(function(){this.app.off("movementStateChanged",this.OnMovementStateChanged,this)})),this.app.on("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.on("destroy",(function(){this.app.off("movementStateChanged",this.OnJumpingStateChanged,this)})),this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("destroy",(function(){this.app.off("playerKilled",this.OnPlayerKilled,this)})),this.app.on("cooldownStarted",this.OnCooldownStarted,this),this.app.on("destroy",(function(){this.app.off("cooldownStarted",this.OnCooldownStarted,this)})),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("destroy",(function(){this.app.off("connectionLost",this.onConnectionLost,this)})),this.app.on("localPlayerInitialized",this.LocalPlayerCreated,this),this.app.on("destroy",(function(){this.app.off("localPlayerInitialized",this.LocalPlayerCreated,this)})),this.app.on("localPlayerSpawned",this.OnLocalPlayerSpawned,this),this.app.on("destroy",(function(){this.app.off("localPlayerSpawned",this.OnLocalPlayerSpawned,this)})),this.app.on("localPlayerWillLeave",this.onLocalPlayerWillLeave,this),this.app.on("destroy",(function(){this.app.off("localPlayerWillLeave",this.onLocalPlayerWillLeave,this)})),this.app.on("weaponAmmoAmountChanged",this.OnWeaponAmmoAmountChanged,this),this.app.on("destroy",(function(){this.app.off("weaponAmmoAmountChanged",this.OnWeaponAmmoAmountChanged,this)})),this.app.on("localPlayerBodyChange",this.OnLocalPlayerBodyChange,this),this.app.on("destroy",(function(){this.app.off("localPlayerBodyChange",this.OnLocalPlayerBodyChange,this)})),this.animationState=FPAnimationState.Stand,this.previousAnimationState=FPAnimationState.Stand,this.isAlive=!1,this.weaponAmmoStates=[],this.weaponAmmoStates[Weapons.Pistols]=!0,this.weaponAmmoStates[Weapons.Rifle]=!1,this.weaponAmmoStates[Weapons.Shotgun]=!1,this.weaponAmmoStates[Weapons.Minigun]=!1,this.weaponAmmoStates[Weapons.RocketLauncher]=!1,this.weaponAmmoStates[Weapons.Uzi]=!1,this.countDownAnimationTime=!1,this.loopingShootAnimationActive=!1,this.crossFadeTime=.1,this.nextShotLeft=!1,this.localPlayerBodyMaterial=null,this.localPlayerTexture=null},FirstPersonWeaponController.prototype.OnLocalPlayerBodyChange=function(t,o,e){this.bodyModel.enabled=!0,t===CharacterID.Fox?(this.bodyModel.model.asset=57286260,this.characterType=CharacterID.Fox,this.modelMeshWasChanged=!0):t===CharacterID.Bull?(this.bodyModel.model.asset=57285681,this.characterType=CharacterID.Bull,this.modelMeshWasChanged=!0):t===CharacterID.Chicken?(this.bodyModel.model.asset=57286005,this.characterType=CharacterID.Chicken,this.modelMeshWasChanged=!0):t===CharacterID.Rhino?(this.bodyModel.model.asset=57285684,this.characterType=CharacterID.Rhino,this.modelMeshWasChanged=!0):t===CharacterID.Ape?(this.bodyModel.model.asset=57286261,this.characterType=CharacterID.Ape,this.modelMeshWasChanged=!0):t===CharacterID.Lion?(this.bodyModel.model.asset=57285690,this.characterType=CharacterID.Lion,this.modelMeshWasChanged=!0):t===CharacterID.Toucan?(this.bodyModel.model.asset=57286009,this.characterType=CharacterID.Toucan,this.modelMeshWasChanged=!0):t===CharacterID.Dog&&(this.bodyModel.model.asset=57285688,this.characterType=CharacterID.Dog,this.modelMeshWasChanged=!0),this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Chicken||this.characterType==CharacterID.Rhino?(this.bodyModel.model.meshInstances[0].visible=!0,this.bodyModel.model.meshInstances[1].visible=!1,this.bodyModel.model.meshInstances[2].visible=!1,this.bodyModel.model.meshInstances[3].visible=!1,this.bodyModel.model.meshInstances[4].visible=!1,this.bodyModel.model.meshInstances[5].visible=!1,this.bodyModel.model.meshInstances[6].visible=!1,this.bodyModel.model.meshInstances[7].visible=!1,this.bodyModel.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Ape?(this.bodyModel.model.meshInstances[0].visible=!1,this.bodyModel.model.meshInstances[1].visible=!0,this.bodyModel.model.meshInstances[2].visible=!1,this.bodyModel.model.meshInstances[3].visible=!1,this.bodyModel.model.meshInstances[4].visible=!1,this.bodyModel.model.meshInstances[5].visible=!1,this.bodyModel.model.meshInstances[6].visible=!1,this.bodyModel.model.meshInstances[7].visible=!1,this.bodyModel.model.meshInstances[8].visible=!1):(this.characterType==CharacterID.Lion||this.characterType==CharacterID.Toucan||this.characterType==CharacterID.Dog)&&(this.bodyModel.model.meshInstances[0].visible=!0,this.bodyModel.model.meshInstances[1].visible=!1,this.bodyModel.model.meshInstances[2].visible=!1,this.bodyModel.model.meshInstances[3].visible=!1,this.bodyModel.model.meshInstances[4].visible=!1,this.bodyModel.model.meshInstances[5].visible=!1,this.bodyModel.model.meshInstances[6].visible=!1,this.bodyModel.model.meshInstances[7].visible=!1,this.bodyModel.model.meshInstances[8].visible=!1),this.leftHandNode=this.bodyModel.findByName("cc_wpn.l"),this.pistolLeftModel.reparent(this.leftHandNode),this.uziModelLeft.reparent(this.leftHandNode),this.rightHandNode=this.bodyModel.findByName("cc_wpn.r"),this.pistolRightModel.reparent(this.rightHandNode),this.rifleModel.reparent(this.rightHandNode),this.minigunModel.reparent(this.rightHandNode),this.shotgunModel.reparent(this.rightHandNode),this.rocketLauncherModel.reparent(this.rightHandNode),this.uziModelRight.reparent(this.rightHandNode),this.characterType==CharacterID.Fox||this.characterType==CharacterID.Ape?(this.RifleAnimations.bodyRun="Fox_1st_Run_Rifle.glb",this.RifleAnimations.bodyIdle="Fox_1st_Idle_Rifle.glb",this.RifleAnimations.bodyShoot="Fox_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyShootAlternative="Fox_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyJump="Fox_1st_Jump_Rifle.glb",this.PistolAnimations.bodyRun="Fox_1st_Run_TwoGuns.glb",this.PistolAnimations.bodyIdle="Fox_1st_Idle_TwoGuns.glb",this.PistolAnimations.bodyShoot="Fox_1st_ShootR_TwoGuns.glb",this.PistolAnimations.bodyShootAlternative="Fox_1st_ShootL_TwoGuns.glb",this.PistolAnimations.bodyJump="Fox_1st_Jump_TwoGuns.glb",this.UziAnimations.bodyRun="Fox_1st_Run_TwoGuns.glb",this.UziAnimations.bodyIdle="Fox_1st_Idle_TwoGuns.glb",this.UziAnimations.bodyShoot="Fox_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyShootAlternative="Fox_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyJump="Fox_1st_Jump_TwoGuns.glb",this.TommyGunAnimations.bodyRun="Fox_1st_Run_TommyGun.glb",this.TommyGunAnimations.bodyIdle="Fox_1st_Idle_TommyGun.glb",this.TommyGunAnimations.bodyShoot="Fox_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyShootAlternative="Fox_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyJump="Fox_1st_Jump_TommyGun.glb",this.RocketLauncherAnimations.bodyRun="Fox_1st_Run_RocketLauncher.glb",this.RocketLauncherAnimations.bodyIdle="Fox_1st_Idle_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShoot="Fox_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShootAlternative="Fox_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyJump="Fox_1st_Jump_RocketLauncher.glb",this.ShotgunAnimations.bodyRun="Fox_1st_Run_Rifle.glb",this.ShotgunAnimations.bodyIdle="Fox_1st_Idle_Rifle.glb",this.ShotgunAnimations.bodyShoot="Fox_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyShootAlternative="Fox_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyJump="Fox_1st_Jump_Rifle.glb"):this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Dog?(this.RifleAnimations.bodyRun="Bull_1st_Run_Rifle.glb",this.RifleAnimations.bodyIdle="Bull_1st_Idle_Rifle.glb",this.RifleAnimations.bodyShoot="Bull_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyShootAlternative="Bull_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyJump="Bull_1st_Jump_Rifle.glb",this.PistolAnimations.bodyRun="Bull_1st_Run_TwoGuns.glb",this.PistolAnimations.bodyIdle="Bull_1st_Idle_TwoGuns.glb",this.PistolAnimations.bodyShoot="Bull_1st_ShootR_TwoGuns.glb",this.PistolAnimations.bodyShootAlternative="Bull_1st_ShootL_TwoGuns.glb",this.PistolAnimations.bodyJump="Bull_1st_Jump_TwoGuns.glb",this.UziAnimations.bodyRun="Bull_1st_Run_TwoGuns.glb",this.UziAnimations.bodyIdle="Bull_1st_Idle_TwoGuns.glb",this.UziAnimations.bodyShoot="Bull_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyShootAlternative="Bull_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyJump="Bull_1st_Jump_TwoGuns.glb",this.TommyGunAnimations.bodyRun="Bull_1st_Run_TommyGun.glb",this.TommyGunAnimations.bodyIdle="Bull_1st_Idle_TommyGun.glb",this.TommyGunAnimations.bodyShoot="Bull_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyShootAlternative="Bull_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyJump="Bull_1st_Jump_TommyGun.glb",this.RocketLauncherAnimations.bodyRun="Bull_1st_Run_RocketLauncher.glb",this.RocketLauncherAnimations.bodyIdle="Bull_1st_Idle_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShoot="Bull_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShootAlternative="Bull_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyJump="Bull_1st_Jump_RocketLauncher.glb",this.ShotgunAnimations.bodyRun="Bull_1st_Run_Rifle.glb",this.ShotgunAnimations.bodyIdle="Bull_1st_Idle_Rifle.glb",this.ShotgunAnimations.bodyShoot="Bull_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyShootAlternative="Bull_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyJump="Bull_1st_Jump_Rifle.glb"):this.characterType!=CharacterID.Chicken&&this.characterType!=CharacterID.Toucan||(this.RifleAnimations.bodyRun="Chicken_1st_Run_Rifle.glb",this.RifleAnimations.bodyIdle="Chicken_1st_Idle_Rifle.glb",this.RifleAnimations.bodyShoot="Chicken_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyShootAlternative="Chicken_1st_Shoot_Rifle.glb",this.RifleAnimations.bodyJump="Chicken_1st_Jump_Rifle.glb",this.PistolAnimations.bodyRun="Chicken_1st_Run_TwoGuns.glb",this.PistolAnimations.bodyIdle="Chicken_1st_Idle_TwoGuns.glb",this.PistolAnimations.bodyShoot="Chicken_1st_ShootR_TwoGuns.glb",this.PistolAnimations.bodyShootAlternative="Chicken_1st_ShootL_TwoGuns.glb",this.PistolAnimations.bodyJump="Chicken_1st_Jump_TwoGuns.glb",this.UziAnimations.bodyRun="Chicken_1st_Run_TwoGuns.glb",this.UziAnimations.bodyIdle="Chicken_1st_Idle_TwoGuns.glb",this.UziAnimations.bodyShoot="Chicken_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyShootAlternative="Chicken_1st_ShootRata_TwoGuns.glb",this.UziAnimations.bodyJump="Chicken_1st_Jump_TwoGuns.glb",this.TommyGunAnimations.bodyRun="Chicken_1st_Run_TommyGun.glb",this.TommyGunAnimations.bodyIdle="Chicken_1st_Idle_TommyGun.glb",this.TommyGunAnimations.bodyShoot="Chicken_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyShootAlternative="Chicken_1st_ShootRata_TommyGun.glb",this.TommyGunAnimations.bodyJump="Chicken_1st_Jump_TommyGun.glb",this.RocketLauncherAnimations.bodyRun="Chicken_1st_Run_RocketLauncher.glb",this.RocketLauncherAnimations.bodyIdle="Chicken_1st_Idle_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShoot="Chicken_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyShootAlternative="Chicken_1st_Shoot_RocketLauncher.glb",this.RocketLauncherAnimations.bodyJump="Chicken_1st_Jump_RocketLauncher.glb",this.ShotgunAnimations.bodyRun="Chicken_1st_Run_Rifle.glb",this.ShotgunAnimations.bodyIdle="Chicken_1st_Idle_Rifle.glb",this.ShotgunAnimations.bodyShoot="Chicken_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyShootAlternative="Chicken_1st_Shoot_Rifle.glb",this.ShotgunAnimations.bodyJump="Chicken_1st_Jump_Rifle.glb"),this.localPlayerTexture=this.itemDataManager.getOutfitForCharacterType(this.characterType,o).texture.resource,null===this.localPlayerBodyMaterial&&(this.localPlayerBodyMaterial=this.characterMaterialResource.resource.clone()),this.localPlayerBodyMaterial.diffuseMap=this.localPlayerTexture;var n=this.bodyModel.model.meshInstances;for(i=0;i<n.length;i++)this.bodyModel.model.meshInstances[i].material=this.localPlayerBodyMaterial,this.bodyModel.model.meshInstances[i].material.update()},FirstPersonWeaponController.prototype.OnWeaponAmmoAmountChanged=function(t){t.ammo>0?this.weaponAmmoStates[t.weaponType]=!0:(this.weaponAmmoStates[t.weaponType]=!1,t.weaponType===this.activeWeapon&&this.switchWeapon(Weapons.Pistols))},FirstPersonWeaponController.prototype.LocalPlayerCreated=function(t){this.localPlayerID=t},FirstPersonWeaponController.prototype.update=function(t){this.isAlive&&this.app.keyboard.wasPressed(pc.KEY_I)&&!isChatModeEnabled&&this.globalsScript.testModeEnabled&&(this.app.fire("notifyMineDamage",this.localPlayerID,101),this.app.fire("playerHitMine",0,this.localPlayerID,101,this.entity.getPosition())),this.animationState==FPAnimationState.Shoot&&this.countDownAnimationTime&&this.bodyModel.animation.currentTime>=this.bodyModel.animation.duration-this.endedAnimBlendTime*this.bodyModel.animation.speed&&(this.countDownAnimationTime=!1,this.isAlive&&this.changeAnimationState(this.previousAnimationState))},FirstPersonWeaponController.prototype.switchWeapon=function(t){if(this.activeWeapon!=t&&this.isAlive&&null!==this.localPlayerID){switch(this.pistolLeftModel.enabled=!1,this.pistolRightModel.enabled=!1,this.rifleModel.enabled=!1,this.shotgunModel.enabled=!1,this.minigunModel.enabled=!1,this.rocketLauncherModel.enabled=!1,this.uziModelLeft.enabled=!1,this.uziModelRight.enabled=!1,t){case Weapons.Pistols:this.pistolLeftModel.enabled=!0,this.pistolRightModel.enabled=!0,this.currentRightWeaponModel=this.pistolRightModel,this.currentLeftWeaponModel=this.pistolLeftModel,this.currentAnimationSet=this.PistolAnimations;break;case Weapons.Rifle:this.rifleModel.enabled=!0,this.currentRightWeaponModel=this.rifleModel,this.currentAnimationSet=this.RifleAnimations;break;case Weapons.Shotgun:this.shotgunModel.enabled=!0,this.currentRightWeaponModel=this.shotgunModel,this.currentAnimationSet=this.ShotgunAnimations;break;case Weapons.Minigun:this.minigunModel.enabled=!0,this.currentRightWeaponModel=this.minigunModel,this.currentAnimationSet=this.TommyGunAnimations;break;case Weapons.RocketLauncher:this.rocketLauncherModel.enabled=!0,this.currentRightWeaponModel=this.rocketLauncherModel,this.currentAnimationSet=this.RocketLauncherAnimations;break;case Weapons.Uzi:this.uziModelLeft.enabled=!0,this.uziModelRight.enabled=!0,this.currentRightWeaponModel=this.uziModelRight,this.currentLeftWeaponModel=this.uziModelLeft,this.currentAnimationSet=this.UziAnimations}this.activeWeapon=t,this.nextShotLeft=!1,this.loopingShootAnimationActive=!1,this.countDownAnimationTime=!1,this.animationState==FPAnimationState.Shoot&&(this.animationState=this.previousAnimationState),this.changeAnimationState(this.animationState),this.app.fire("weaponSwitched",this.localPlayerID,t)}},FirstPersonWeaponController.prototype.changeAnimationState=function(t){if(this.animationState!==FPAnimationState.Shoot&&this.animationState!==FPAnimationState.Jump&&(this.previousAnimationState=this.animationState),this.loopingShootAnimationActive)t!==FPAnimationState.Shoot&&(this.previousAnimationState=t);else if(t!==FPAnimationState.Shoot&&this.countDownAnimationTime)this.previousAnimationState=t;else if(this.animationsAreLoaded){switch(t==FPAnimationState.Shoot||t==FPAnimationState.Jump?this.crossFadeTime=0:this.crossFadeTime=.1,this.modelMeshWasChanged&&(this.modelMeshWasChanged=!1,this.crossFadeTime=0),t){case FPAnimationState.Run:this.bodyModel.animation.play(this.currentAnimationSet.bodyRun,this.crossFadeTime),this.bodyModel.animation.loop=!0,this.currentAnimationSet.dualWeapon?(this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime),this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime)):this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime);break;case FPAnimationState.Stand:this.bodyModel.animation.play(this.currentAnimationSet.bodyIdle,this.crossFadeTime),this.bodyModel.animation.loop=!0,this.currentAnimationSet.dualWeapon?(this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime),this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime)):this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime);break;case FPAnimationState.Shoot:this.currentAnimationSet.loopShot?(this.bodyModel.animation.loop=!0,this.currentRightWeaponModel.animation.loop=!0,this.loopingShootAnimationActive=!0):(this.bodyModel.animation.loop=!1,this.currentRightWeaponModel.animation.loop=!1,this.countDownAnimationTime=!0,this.bodyModel.animation.currentTime=0),this.nextShotLeft&&this.currentAnimationSet.dualWeapon?(this.bodyModel.animation.play(this.currentAnimationSet.bodyShootAlternative,this.crossFadeTime),this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime),this.nextShotLeft=!1):(this.bodyModel.animation.play(this.currentAnimationSet.bodyShoot,this.crossFadeTime),this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime),this.nextShotLeft=!0);break;case FPAnimationState.Die:this.bodyModel.animation.loop=!1,this.bodyModel.animation.play(this.currentAnimationSet.bodyIdle,this.crossFadeTime);break;case FPAnimationState.Jump:this.bodyModel.animation.loop=!1,this.bodyModel.animation.play(this.currentAnimationSet.bodyJump,this.crossFadeTime)}this.animationState=t}},FirstPersonWeaponController.prototype.OnBulletFired=function(t,o){this.animateWeaponMuzzleFlash(),this.changeAnimationState(FPAnimationState.Shoot)},FirstPersonWeaponController.prototype.OnShootingStopped=function(t,o,e){this.currentAnimationSet.loopShot&&(this.loopingShootAnimationActive=!1,this.changeAnimationState(this.previousAnimationState))},FirstPersonWeaponController.prototype.OnMovementStateChanged=function(t){t?(this.changeAnimationState(FPAnimationState.Run),isStanding=!1):(isStanding=!0,this.changeAnimationState(FPAnimationState.Stand))};var isStanding=!0;FirstPersonWeaponController.prototype.OnJumpingStateChanged=function(t){t?this.changeAnimationState(FPAnimationState.Jump):isStanding?this.changeAnimationState(FPAnimationState.Stand):this.changeAnimationState(FPAnimationState.Run)},FirstPersonWeaponController.prototype.OnCooldownStarted=function(){this.DisableWeapons()},FirstPersonWeaponController.prototype.onLocalPlayerWillLeave=function(){this.DisableWeapons()},FirstPersonWeaponController.prototype.onConnectionLost=function(){this.DisableWeapons()},FirstPersonWeaponController.prototype.OnPlayerKilled=function(t,o){this.localPlayerID===t&&this.DisableWeapons()},FirstPersonWeaponController.prototype.DisableWeapons=function(){this.isAlive=!1,this.firstPersonParent.reparent(this.originalParentEntity),this.bodyModel.enabled=!1,this.pistolLeftModel.enabled=!1,this.pistolRightModel.enabled=!1,this.rifleModel.enabled=!1,this.shotgunModel.enabled=!1,this.minigunModel.enabled=!1,this.rocketLauncherModel.enabled=!1,this.uziModelLeft.enabled=!1,this.uziModelRight.enabled=!1},FirstPersonWeaponController.prototype.OnLocalPlayerSpawned=function(t){switch(this.isAlive=!0,this.bodyModel.enabled=!0,this.activeWeapon){case Weapons.Pistols:this.pistolLeftModel.enabled=!0,this.pistolRightModel.enabled=!0;break;case Weapons.Rifle:this.rifleModel.enabled=!0;break;case Weapons.Shotgun:this.shotgunModel.enabled=!0;break;case Weapons.Minigun:this.minigunModel.enabled=!0;break;case Weapons.RocketLauncher:this.rocketLauncherModel.enabled=!0;break;case Weapons.Uzi:this.uziModelLeft.enabled=!0,this.uziModelRight.enabled=!0}this.activeWeapon="undefined",this.animationState=FPAnimationState.Stand,this.previousAnimationState=FPAnimationState.Stand,this.loopingShootAnimationActive=!1,this.countDownAnimationTime=!1,this.switchWeapon(Weapons.Pistols),this.firstPersonParent.reparent(t.script.playerManager.cameraEntity)},FirstPersonWeaponController.prototype.OnWeaponPickup=function(t,o,e,i,n,s){this.switchWeapon(o)},FirstPersonWeaponController.prototype.animateWeaponMuzzleFlash=function(){switch(this.activeWeapon){case Weapons.Pistols:case Weapons.Rifle:case Weapons.Shotgun:case Weapons.Minigun:case Weapons.RocketLauncher:case Weapons.Uzi:}};var Zoom=pc.createScript("zoom");Zoom.attributes.add("defaultFov",{type:"number",default:75,title:"Default FOV"}),Zoom.attributes.add("zoomFov",{type:"number",default:55,title:"Zoom FOV"}),Zoom.prototype.initialize=function(){this.targetFov=this.defaultFov},Zoom.prototype.update=function(t){};var EnemyModel=pc.createScript("enemyModel");EnemyModel.attributes.add("rifleModel",{type:"entity",title:"RifleModel"}),EnemyModel.attributes.add("pistolModelRight",{type:"entity",title:"PistolModelRight"}),EnemyModel.attributes.add("pistolModelLeft",{type:"entity",title:"PistolModelLeft"}),EnemyModel.attributes.add("shotgunModel",{type:"entity",title:"ShotgunModel"}),EnemyModel.attributes.add("minigunModel",{type:"entity",title:"MinigunModel"}),EnemyModel.attributes.add("rocketLauncherModel",{type:"entity",title:"RocketLauncherModel"}),EnemyModel.attributes.add("uziModelLeft",{type:"entity",title:"UziModelLeft"}),EnemyModel.attributes.add("uziModelRight",{type:"entity",title:"UziModelRight"}),EnemyModel.attributes.add("weaponRootEntity",{type:"entity",title:"WeaponRootEntity"}),EnemyModel.attributes.add("thisPlayer",{type:"entity",title:"Player Object This Enemy Is On"}),EnemyModel.attributes.add("leftMuzzleSpawnPoint",{type:"entity",title:"LeftMuzzleSpawnPoint"}),EnemyModel.attributes.add("rightMuzzleSpawnPoint",{type:"entity",title:"RightMuzzleSpawnPoint"}),EnemyModel.attributes.add("rifleMuzzleSpawnPoint",{type:"entity",title:"RifleMuzzleSpawnPoint"}),EnemyModel.attributes.add("bulletParticleSystemRight",{type:"entity",title:"BulletParticleSystemRight"}),EnemyModel.attributes.add("bulletParticleSystemLeft",{type:"entity",title:"BulletParticleSystemLeft"}),EnemyModel.attributes.add("shellParticleSystem",{type:"entity",title:"ShellParticleSystem"}),EnemyModel.attributes.add("characterMaterialResource",{type:"asset",assetType:"material",title:"Character Material"}),EnemyModel.attributes.add("effectController",{type:"entity"});var EnemyAnimationState={Run:1,Stand:2,Shoot:3,Die:4,Jump:5,StrafeLeft:6,StrafeRight:7,RunBackwards:8,RunJump:9,RocketJump:10};function EnemyAnimationSet(t,e,i,n,o,s,a,h,l,r,m,d,c,u,_,y,g){this.loopShot=t,this.dualWeapon=e,this.run=i,this.runBackwards=n,this.strafeLeft=o,this.strafeRight=s,this.stand=a,this.standBlink=h,this.shootLeft=l,this.shootRight=r,this.die=m,this.jump=d,this.runJump=c,this.weaponShoot=u,this.weaponIdle=_,this.dieRocket=y,this.jumpRocket=g}EnemyModel.prototype.init=function(t,e,i,n,o,s,a,h){this.hasInitializedThisEnemy=!1;var l=this;this.itemDataManager=h,this.modelMeshWasChanged=!1,this.animationsAreLoaded=!1,this.animationLoadAmountTarget=a.thirdPersonAnimationFileNamesToLoad.length,this.animationCurrentLoadedAmount=0,a.thirdPersonAnimationFileNamesToLoad.forEach((function(t){a.thirdPersonAnimationFileAssetsToLoad[t].ready((function(e){l.entity.animation.animations[t]=e.resource,l.animationCurrentLoadedAmount++,l.animationCurrentLoadedAmount==l.animationLoadAmountTarget&&(l.animationsAreLoaded=!0),a.thirdPersonAnimationFileAssetsLoaded.includes(t)||(a.totalAssetsLoaded++,a.thirdPersonAnimationFileAssetsLoaded.push(t))}),this)})),this.isVisibleThisFrame=!1,this.characterType=this.validateCharacterTypeIndex(n),this.outfitColorIndex=this.validateOutfitColorIndex(o),this.setCharacterModel(this.characterType),this.playerID=t,this.isLocalPlayer=e,this.weaponToSwitchTo=i,this.animationToSwitchTo=void 0,this.crossFadeTime=.1,this.countDownAnimationTime=!1,this.nextShotLeft=!1,this.enemyRotationEntity=this.entity.parent,this.playerSoundManagerScript=s,this.PistolAnimationSet=new EnemyAnimationSet(!1,!0,"Fox_3rd_Run_TwoGuns.glb","Fox_3rd_RunBack_TwoGuns.glb","Fox_3rd_StrafeL_TwoGuns.glb","Fox_3rd_StrafeR_TwoGuns.glb","Fox_3rd_Idle_TwoGuns.glb","Fox_3rd_IdleBlink_TwoGuns.glb","Fox_3rd_ShootL_TwoGuns.glb","Fox_3rd_ShootR_TwoGuns.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_TwoGuns.glb","Fox_3rd_RunJump_TwoGuns.glb","Wpn_357gun_Shoot.glb","Wpn_357gun_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_Flying_TwoGuns.glb"),this.UziAnimationsSet=new EnemyAnimationSet(!0,!0,"Fox_3rd_Run_TwoGuns.glb","Fox_3rd_RunBack_TwoGuns.glb","Fox_3rd_StrafeL_TwoGuns.glb","Fox_3rd_StrafeR_TwoGuns.glb","Fox_3rd_Idle_TwoGuns.glb","Fox_3rd_IdleBlink_TwoGuns.glb","Fox_3rd_ShootL_TwoGuns.glb","Fox_3rd_ShootR_TwoGuns.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_TwoGuns.glb","Fox_3rd_RunJump_TwoGuns.glb","Wpn_MAC10_Shoot.glb","Wpn_MAC10_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_Flying_TwoGuns.glb"),this.RifleAnimationSet=new EnemyAnimationSet(!1,!1,"Fox_3rd_Run_Rifle.glb","Fox_3rd_RunBack_Rifle.glb","Fox_3rd_StrafeL_Rifle.glb","Fox_3rd_StrafeR_Rifle.glb","Fox_3rd_Idle_Rifle.glb","Fox_3rd_IdleBlink_Rifle.glb","Fox_3rd_Shoot_Rifle.glb","Fox_3rd_Shoot_Rifle.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_Rifle.glb","Fox_3rd_RunJump_Rifle.glb","Wpn_RifleLong_Shoot.glb","Wpn_RifleLong_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_Flying_Rifle.glb"),this.TommyGunAnimationSet=new EnemyAnimationSet(!0,!1,"Fox_3rd_Run_TommyGun.glb","Fox_3rd_RunBack_TommyGun.glb","Fox_3rd_StrafeL_TommyGun.glb","Fox_3rd_StrafeR_TommyGun.glb","Fox_3rd_Idle_TommyGun.glb","Fox_3rd_IdleBlink_TommyGun.glb","Fox_3rd_Shoot_TommyGun.glb","Fox_3rd_Shoot_TommyGun.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_TommyGun.glb","Fox_3rd_RunJump_TommyGun.glb","Wpn_TommyGun_Shoot.glb","Wpn_TommyGun_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_Flying_TommyGun.glb"),this.RocketLauncherAnimationSet=new EnemyAnimationSet(!1,!1,"Fox_3rd_Run_RocketLauncher.glb","Fox_3rd_RunBack_RocketLauncher.glb","Fox_3rd_StrafeL_RocketLauncher.glb","Fox_3rd_StrafeR_RocketLauncher.glb","Fox_3rd_Idle_RocketLauncher.glb","Fox_3rd_IdleBlink_RocketLauncher.glb","Fox_3rd_Shoot_RocketLauncher.glb","Fox_3rd_Shoot_RocketLauncher.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_RocketLauncher.glb","Fox_3rd_RunJump_RocketLauncher.glb","Wpn_RocketLauncher_Shoot.glb","Wpn_RocketLauncher_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_RocketJump_RocketLauncher.glb"),this.ShotgunAnimationSet=new EnemyAnimationSet(!1,!1,"Fox_3rd_Run_Rifle.glb","Fox_3rd_RunBack_Rifle.glb","Fox_3rd_StrafeL_Rifle.glb","Fox_3rd_StrafeR_Rifle.glb","Fox_3rd_Idle_Rifle.glb","Fox_3rd_IdleBlink_Rifle.glb","Fox_3rd_Shoot_Rifle.glb","Fox_3rd_Shoot_Rifle.glb","Fox_3rd_Die2.glb","Fox_3rd_Jump_IP_Rifle.glb","Fox_3rd_RunJump_Rifle.glb","Wpn_ShotGunDL_Shoot.glb","Wpn_ShotGunDL_Idle.glb","Fox_3rd_Die1.glb","Fox_3rd_Flying_Rifle.glb"),this.overwriteAnimationSets(),this.normalEnemyScale=new pc.Vec3(.6,.6,.6),this.damagedEnemyScale=new pc.Vec3(.45,.75,.45),this.currentAnimationSet=this.PistolAnimationSet,this.weaponRootEntity.enabled=!0,this.hatNode=this.entity.findByName("cc_Hat"),this.currentHat=null,this.currentHatID=-1,this.leftHandNode=this.entity.findByName("cc_wpn.l"),this.pistolModelLeft.reparent(this.leftHandNode),this.uziModelLeft.reparent(this.leftHandNode),this.rightHandNode=this.entity.findByName("cc_wpn.r"),this.pistolModelRight.reparent(this.rightHandNode),this.rifleModel.reparent(this.rightHandNode),this.minigunModel.reparent(this.rightHandNode),this.shotgunModel.reparent(this.rightHandNode),this.rocketLauncherModel.reparent(this.rightHandNode),this.uziModelRight.reparent(this.rightHandNode),this.currentLeftWeaponModel=this.pistolModelLeft,this.currentRightWeaponModel=this.pistolModelRight,this.animationState=EnemyAnimationState.Stand,this.previousAnimationState=EnemyAnimationState.Stand,this.activeWeapon="undefined",this.timeToBlink=1,this.waitForBlinkTimeout=null,this.waitForIdleTimeout=null,this.waitForPainTimeout=null,this.waitForLeftLoopingWeaponAnimation=null,this.waitForRightLoopingWeaponAnimation=null,this.leftWeaponLoopAnimActive=!1,this.rightWeaponLoopAnimActive=!1,this.EnableDefaultModel(),this.isDead=!1,this.lastWeaponHitBy=Weapons.Pistols,this.cartridgeParticleSystemClones={},this.bulletsRightTag="BulletParticlesRight",this.bulletsLeftTag="BulletParticlesLeft",this.shotgunTag="ShotgunParticles",this.spawnParticleLeft=!1,this.muzzleSpawnPosition=new pc.Vec3,this.muzzleSpawnRotation=new pc.Quat,this.muzzleSpawnScale=new pc.Vec3(1,1,1),this.enemyMaterial=this.characterMaterialResource.resource.clone(),this.enemyTexture=null,this.shouldRefreshMaterialOnEnable=!0,this.setCharacterTexture(this.outfitColorIndex),this.enemyMaterialEmessiveFactorNormal=new pc.Vec2(0,0),this.enemyMaterialEmessiveFactorHit=new pc.Vec2(.6,.6),this.aabbShape=new pc.BoundingBox(new pc.Vec3(0,2,0),new pc.Vec3(1.65,2.2,1.3)),this.entity.model.customAabb=this.aabbShape,this.endedAnimBlendTime=.1,this.app.on("enemyWeaponChanged",this.onEnemyWeaponChanged,this),this.app.on("enemyAnimationChanged",this.onEnemyAnimationChanged,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("enemyBulletFired",this.onEnemyBulletFired,this),this.app.on("enemyRayFired",this.onEnemyRayFired,this),this.app.on("killMade",this.onKillMade,this),this.on("destroy",this.onDestroy,this),this.hasInitializedThisEnemy=!0},EnemyModel.prototype.onDestroy=function(){this.pistolModelRight.destroy(),this.pistolModelLeft.destroy(),this.rifleModel.destroy(),this.minigunModel.destroy(),this.shotgunModel.destroy(),this.rocketLauncherModel.destroy(),this.uziModelRight.destroy(),this.uziModelLeft.destroy(),this.currentHat&&(this.currentHat.destroy(),this.currentHatID=-1),this.app.off("enemyWeaponChanged",this.onEnemyWeaponChanged,this),this.app.off("enemyAnimationChanged",this.onEnemyAnimationChanged,this),this.app.off("leftGame",this.onLeftGame,this),this.app.off("enemyBulletFired",this.onEnemyBulletFired,this),this.app.off("enemyRayFired",this.onEnemyRayFired,this),this.app.off("killMade",this.onKillMade,this)},EnemyModel.prototype.onLeftGame=function(){clearTimeout(this.waitForBlinkTimeout),clearTimeout(this.waitForIdleTimeout),clearTimeout(this.waitForPainTimeout),clearTimeout(this.waitForLeftLoopingWeaponAnimation),clearTimeout(this.waitForRightLoopingWeaponAnimation)},EnemyModel.prototype.validateCharacterTypeIndex=function(t){return(null==t||t>=Object.keys(CharacterID).length)&&(console.log("ERROR in enemymodel: probably someone connected with outdated client."),t=1),t},EnemyModel.prototype.validateOutfitColorIndex=function(t){return null==t&&(console.log("ERROR in enemymodel texture: probably someone connected with an outdated client."),t=0),t},EnemyModel.prototype.enableVisually=function(t,e,n,o){if(this.isEnabled=!0,t=this.validateCharacterTypeIndex(t),e=this.validateOutfitColorIndex(e),t!=this.characterType?(this.setCharacterModel(t),this.overwriteAnimationSets(),this.setCharacterTexture(e),this.reparentGuns(),this.currentHatID=-1):e!=this.outfitColorIndex&&this.setCharacterTexture(e),this.setCharacterHat(o),this.shouldRefreshMaterialOnEnable){var s=this.entity.model.meshInstances;for(i=0;i<s.length;i++)s[i].material.name.includes("Character")&&(this.entity.model.meshInstances[i].material=this.enemyMaterial,this.entity.model.meshInstances[i].material.update());this.shouldRefreshMaterialOnEnable=!1}null!=this.weaponToSwitchTo&&this.switchWeapon(this.weaponToSwitchTo),null==this.animationToSwitchTo||n?(this.modelMeshWasChanged=!0,this.changeAnimationState(EnemyAnimationState.Stand)):this.changeAnimationState(this.animationToSwitchTo),this.EnableDefaultModel();var a=this.enemyMaterialEmessiveFactorHit.clone();this.entity.tween(a).to(this.enemyMaterialEmessiveFactorNormal,.5,pc.QuadraticOut,0,2).on("update",(function(){this.entity.script.enemyModel.enemyMaterial.emissiveIntensity=a.x,this.entity.script.enemyModel.enemyMaterial.update()})).start()},EnemyModel.prototype.disableVisually=function(){this.DisableEntireBody(),this.isEnabled=!1},EnemyModel.prototype.update=function(t){(this.animationState==EnemyAnimationState.Shoot||this.animationState==EnemyAnimationState.Jump)&&this.countDownAnimationTime&&this.hasInitializedThisEnemy&&this.entity.animation.currentTime>=this.entity.animation.duration-this.endedAnimBlendTime*this.entity.animation.speed&&(this.countDownAnimationTime=!1,this.changeAnimationState(this.previousAnimationState),this.playWeaponAnimation(!1)),this.isEnabled&&(this.aabbShape.center.copy(this.entity.getLocalPosition()),this.entity.model.customAabb=this.aabbShape)},EnemyModel.prototype.setCharacterModel=function(t){switch(t){case CharacterID.Bull:this.entity.model.asset=57285681,this.characterType=CharacterID.Bull,this.modelMeshWasChanged=!0;break;case CharacterID.Chicken:this.entity.model.asset=57286005,this.characterType=CharacterID.Chicken,this.modelMeshWasChanged=!0;break;case CharacterID.Rhino:this.entity.model.asset=57285684,this.characterType=CharacterID.Rhino,this.modelMeshWasChanged=!0;break;case CharacterID.Lion:this.entity.model.asset=57285690,this.characterType=CharacterID.Lion,this.modelMeshWasChanged=!0;break;case CharacterID.Toucan:this.entity.model.asset=57286009,this.characterType=CharacterID.Toucan,this.modelMeshWasChanged=!0;break;case CharacterID.Dog:this.entity.model.asset=57285688,this.characterType=CharacterID.Dog,this.modelMeshWasChanged=!0;break;case CharacterID.Ape:this.entity.model.asset=57286261,this.characterType=CharacterID.Ape,this.modelMeshWasChanged=!0;break;case CharacterID.Fox:default:this.entity.model.asset=57286260,this.characterType=CharacterID.Fox,this.modelMeshWasChanged=!0}},EnemyModel.prototype.setCharacterTexture=function(t){this.outfitColorIndex=t,this.enemyTexture=this.itemDataManager.getOutfitForCharacterType(this.characterType,t).texture.resource,this.enemyMaterial.diffuseMap=this.enemyTexture,this.shouldRefreshMaterialOnEnable=!0},EnemyModel.prototype.setCharacterHat=function(t){this.currentHatID!==t?(this.currentHat&&this.currentHat.destroy(),t>0&&(this.currentHat=this.itemDataManager.getHat(t).model.clone(),this.hatNode=this.entity.findByName("cc_Hat"),this.currentHat.reparent(this.hatNode),this.currentHat.enabled=!0),this.currentHatID=t):this.currentHat&&(this.currentHat.enabled=!0)},EnemyModel.prototype.reparentGuns=function(){this.leftHandNode=this.entity.findByName("cc_wpn.l"),this.pistolModelLeft.reparent(this.leftHandNode),this.uziModelLeft.reparent(this.leftHandNode),this.rightHandNode=this.entity.findByName("cc_wpn.r"),this.pistolModelRight.reparent(this.rightHandNode),this.rifleModel.reparent(this.rightHandNode),this.minigunModel.reparent(this.rightHandNode),this.shotgunModel.reparent(this.rightHandNode),this.rocketLauncherModel.reparent(this.rightHandNode),this.uziModelRight.reparent(this.rightHandNode)},EnemyModel.prototype.overwriteAnimationSets=function(){switch(this.characterType){case CharacterID.Bull:case CharacterID.Rhino:case CharacterID.Lion:case CharacterID.Dog:this.RifleAnimationSet.run="Bull_3rd_Run_Rifle.glb",this.RifleAnimationSet.runBackwards="Bull_3rd_RunBack_Rifle.glb",this.RifleAnimationSet.strafeLeft="Bull_3rd_StrafeL_Rifle.glb",this.RifleAnimationSet.strafeRight="Bull_3rd_StrafeR_Rifle.glb",this.RifleAnimationSet.stand="Bull_3rd_Idle_Rifle.glb",this.RifleAnimationSet.standBlink="Bull_3rd_IdleBlink_Rifle.glb",this.RifleAnimationSet.shootLeft="Bull_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.shootRight="Bull_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.die="Bull_3rd_Die2.glb",this.RifleAnimationSet.jump="Bull_3rd_Jump_IP_Rifle.glb",this.RifleAnimationSet.runJump="Bull_3rd_RunJump_Rifle.glb",this.RifleAnimationSet.dieRocket="Bull_3rd_Die1.glb",this.RifleAnimationSet.jumpRocket="Bull_3rd_Flying_Rifle.glb",this.PistolAnimationSet.run="Bull_3rd_Run_TwoGuns.glb",this.PistolAnimationSet.runBackwards="Bull_3rd_RunBack_TwoGuns.glb",this.PistolAnimationSet.strafeLeft="Bull_3rd_StrafeL_TwoGuns.glb",this.PistolAnimationSet.strafeRight="Bull_3rd_StrafeR_TwoGuns.glb",this.PistolAnimationSet.stand="Bull_3rd_Idle_TwoGuns.glb",this.PistolAnimationSet.standBlink="Bull_3rd_IdleBlink_TwoGuns.glb",this.PistolAnimationSet.shootLeft="Bull_3rd_ShootL_TwoGuns.glb",this.PistolAnimationSet.shootRight="Bull_3rd_ShootR_TwoGuns.glb",this.PistolAnimationSet.die="Bull_3rd_Die2.glb",this.PistolAnimationSet.jump="Bull_3rd_Jump_IP_TwoGuns.glb",this.PistolAnimationSet.runJump="Bull_3rd_RunJump_TwoGuns.glb",this.PistolAnimationSet.dieRocket="Bull_3rd_Die1.glb",this.PistolAnimationSet.jumpRocket="Bull_3rd_Flying_TwoGuns.glb",this.UziAnimationsSet.run="Bull_3rd_Run_TwoGuns.glb",this.UziAnimationsSet.runBackwards="Bull_3rd_RunBack_TwoGuns.glb",this.UziAnimationsSet.strafeLeft="Bull_3rd_StrafeL_TwoGuns.glb",this.UziAnimationsSet.strafeRight="Bull_3rd_StrafeR_TwoGuns.glb",this.UziAnimationsSet.stand="Bull_3rd_Idle_TwoGuns.glb",this.UziAnimationsSet.standBlink="Bull_3rd_IdleBlink_TwoGuns.glb",this.UziAnimationsSet.shootLeft="Bull_3rd_ShootL_TwoGuns.glb",this.UziAnimationsSet.shootRight="Bull_3rd_ShootR_TwoGuns.glb",this.UziAnimationsSet.die="Bull_3rd_Die2.glb",this.UziAnimationsSet.jump="Bull_3rd_Jump_IP_TwoGuns.glb",this.UziAnimationsSet.runJump="Bull_3rd_RunJump_TwoGuns.glb",this.UziAnimationsSet.dieRocket="Bull_3rd_Die1.glb",this.UziAnimationsSet.jumpRocket="Bull_3rd_Flying_TwoGuns.glb",this.TommyGunAnimationSet.run="Bull_3rd_Run_TommyGun.glb",this.TommyGunAnimationSet.runBackwards="Bull_3rd_RunBack_TommyGun.glb",this.TommyGunAnimationSet.strafeLeft="Bull_3rd_StrafeL_TommyGun.glb",this.TommyGunAnimationSet.strafeRight="Bull_3rd_StrafeR_TommyGun.glb",this.TommyGunAnimationSet.stand="Bull_3rd_Idle_TommyGun.glb",this.TommyGunAnimationSet.standBlink="Bull_3rd_IdleBlink_TommyGun.glb",this.TommyGunAnimationSet.shootLeft="Bull_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.shootRight="Bull_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.die="Bull_3rd_Die2.glb",this.TommyGunAnimationSet.jump="Bull_3rd_Jump_IP_TommyGun.glb",this.TommyGunAnimationSet.runJump="Bull_3rd_RunJump_TommyGun.glb",this.TommyGunAnimationSet.dieRocket="Bull_3rd_Die1.glb",this.TommyGunAnimationSet.jumpRocket="Bull_3rd_Flying_TommyGun.glb",this.RocketLauncherAnimationSet.run="Bull_3rd_Run_RocketLauncher.glb",this.RocketLauncherAnimationSet.runBackwards="Bull_3rd_RunBack_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeLeft="Bull_3rd_StrafeL_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeRight="Bull_3rd_StrafeR_RocketLauncher.glb",this.RocketLauncherAnimationSet.stand="Bull_3rd_Idle_RocketLauncher.glb",this.RocketLauncherAnimationSet.standBlink="Bull_3rd_IdleBlink_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootLeft="Bull_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootRight="Bull_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.die="Bull_3rd_Die2.glb",this.RocketLauncherAnimationSet.jump="Bull_3rd_Jump_IP_RocketLauncher.glb",this.RocketLauncherAnimationSet.runJump="Bull_3rd_RunJump_RocketLauncher.glb",this.RocketLauncherAnimationSet.dieRocket="Bull_3rd_Die1.glb",this.RocketLauncherAnimationSet.jumpRocket="Bull_3rd_RocketJump_RocketLauncher.glb",this.ShotgunAnimationSet.run="Bull_3rd_Run_Rifle.glb",this.ShotgunAnimationSet.runBackwards="Bull_3rd_RunBack_Rifle.glb",this.ShotgunAnimationSet.strafeLeft="Bull_3rd_StrafeL_Rifle.glb",this.ShotgunAnimationSet.strafeRight="Bull_3rd_StrafeR_Rifle.glb",this.ShotgunAnimationSet.stand="Bull_3rd_Idle_Rifle.glb",this.ShotgunAnimationSet.standBlink="Bull_3rd_IdleBlink_Rifle.glb",this.ShotgunAnimationSet.shootLeft="Bull_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.shootRight="Bull_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.die="Bull_3rd_Die2.glb",this.ShotgunAnimationSet.jump="Bull_3rd_Jump_IP_Rifle.glb",this.ShotgunAnimationSet.runJump="Bull_3rd_RunJump_Rifle.glb",this.ShotgunAnimationSet.dieRocket="Bull_3rd_Die1.glb",this.ShotgunAnimationSet.jumpRocket="Bull_3rd_Flying_Rifle.glb";break;case CharacterID.Chicken:case CharacterID.Toucan:this.RifleAnimationSet.run="Chicken_3rd_Run_Rifle.glb",this.RifleAnimationSet.runBackwards="Chicken_3rd_RunBack_Rifle.glb",this.RifleAnimationSet.strafeLeft="Chicken_3rd_StrafeL_Rifle.glb",this.RifleAnimationSet.strafeRight="Chicken_3rd_StrafeR_Rifle.glb",this.RifleAnimationSet.stand="Chicken_3rd_Idle_Rifle.glb",this.RifleAnimationSet.standBlink="Chicken_3rd_IdleBlink_Rifle.glb",this.RifleAnimationSet.shootLeft="Chicken_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.shootRight="Chicken_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.die="Chicken_3rd_Die2.glb",this.RifleAnimationSet.jump="Chicken_3rd_Jump_IP_Rifle.glb",this.RifleAnimationSet.runJump="Chicken_3rd_RunJump_Rifle.glb",this.RifleAnimationSet.dieRocket="Chicken_3rd_Die1.glb",this.RifleAnimationSet.jumpRocket="Chicken_3rd_Flying_Rifle.glb",this.PistolAnimationSet.run="Chicken_3rd_Run_TwoGuns.glb",this.PistolAnimationSet.runBackwards="Chicken_3rd_RunBack_TwoGuns.glb",this.PistolAnimationSet.strafeLeft="Chicken_3rd_StrafeL_TwoGuns.glb",this.PistolAnimationSet.strafeRight="Chicken_3rd_StrafeR_TwoGuns.glb",this.PistolAnimationSet.stand="Chicken_3rd_Idle_TwoGuns.glb",this.PistolAnimationSet.standBlink="Chicken_3rd_IdleBlink_TwoGuns.glb",this.PistolAnimationSet.shootLeft="Chicken_3rd_ShootL_TwoGuns.glb",this.PistolAnimationSet.shootRight="Chicken_3rd_ShootR_TwoGuns.glb",this.PistolAnimationSet.die="Chicken_3rd_Die2.glb",this.PistolAnimationSet.jump="Chicken_3rd_Jump_IP_TwoGuns.glb",this.PistolAnimationSet.runJump="Chicken_3rd_RunJump_TwoGuns.glb",this.PistolAnimationSet.dieRocket="Chicken_3rd_Die1.glb",this.PistolAnimationSet.jumpRocket="Chicken_3rd_Flying_TwoGuns.glb",this.UziAnimationsSet.run="Chicken_3rd_Run_TwoGuns.glb",this.UziAnimationsSet.runBackwards="Chicken_3rd_RunBack_TwoGuns.glb",this.UziAnimationsSet.strafeLeft="Chicken_3rd_StrafeL_TwoGuns.glb",this.UziAnimationsSet.strafeRight="Chicken_3rd_StrafeR_TwoGuns.glb",this.UziAnimationsSet.stand="Chicken_3rd_Idle_TwoGuns.glb",this.UziAnimationsSet.standBlink="Chicken_3rd_IdleBlink_TwoGuns.glb",this.UziAnimationsSet.shootLeft="Chicken_3rd_ShootL_TwoGuns.glb",this.UziAnimationsSet.shootRight="Chicken_3rd_ShootR_TwoGuns.glb",this.UziAnimationsSet.die="Chicken_3rd_Die2.glb",this.UziAnimationsSet.jump="Chicken_3rd_Jump_IP_TwoGuns.glb",this.UziAnimationsSet.runJump="Chicken_3rd_RunJump_TwoGuns.glb",this.UziAnimationsSet.dieRocket="Chicken_3rd_Die1.glb",this.UziAnimationsSet.jumpRocket="Chicken_3rd_Flying_TwoGuns.glb",this.TommyGunAnimationSet.run="Chicken_3rd_Run_TommyGun.glb",this.TommyGunAnimationSet.runBackwards="Chicken_3rd_RunBack_TommyGun.glb",this.TommyGunAnimationSet.strafeLeft="Chicken_3rd_StrafeL_TommyGun.glb",this.TommyGunAnimationSet.strafeRight="Chicken_3rd_StrafeR_TommyGun.glb",this.TommyGunAnimationSet.stand="Chicken_3rd_Idle_TommyGun.glb",this.TommyGunAnimationSet.standBlink="Chicken_3rd_IdleBlink_TommyGun.glb",this.TommyGunAnimationSet.shootLeft="Chicken_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.shootRight="Chicken_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.die="Chicken_3rd_Die2.glb",this.TommyGunAnimationSet.jump="Chicken_3rd_Jump_IP_TommyGun.glb",this.TommyGunAnimationSet.runJump="Chicken_3rd_RunJump_TommyGun.glb",this.TommyGunAnimationSet.dieRocket="Chicken_3rd_Die1.glb",this.TommyGunAnimationSet.jumpRocket="Chicken_3rd_Flying_TommyGun.glb",this.RocketLauncherAnimationSet.run="Chicken_3rd_Run_RocketLauncher.glb",this.RocketLauncherAnimationSet.runBackwards="Chicken_3rd_RunBack_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeLeft="Chicken_3rd_StrafeL_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeRight="Chicken_3rd_StrafeR_RocketLauncher.glb",this.RocketLauncherAnimationSet.stand="Chicken_3rd_Idle_RocketLauncher.glb",this.RocketLauncherAnimationSet.standBlink="Chicken_3rd_IdleBlink_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootLeft="Chicken_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootRight="Chicken_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.die="Chicken_3rd_Die2.glb",this.RocketLauncherAnimationSet.jump="Chicken_3rd_Jump_IP_RocketLauncher.glb",this.RocketLauncherAnimationSet.runJump="Chicken_3rd_RunJump_RocketLauncher.glb",this.RocketLauncherAnimationSet.dieRocket="Chicken_3rd_Die1.glb",this.RocketLauncherAnimationSet.jumpRocket="Chicken_3rd_RocketJump_RocketLauncher.glb",this.ShotgunAnimationSet.run="Chicken_3rd_Run_Rifle.glb",this.ShotgunAnimationSet.runBackwards="Chicken_3rd_RunBack_Rifle.glb",this.ShotgunAnimationSet.strafeLeft="Chicken_3rd_StrafeL_Rifle.glb",this.ShotgunAnimationSet.strafeRight="Chicken_3rd_StrafeR_Rifle.glb",this.ShotgunAnimationSet.stand="Chicken_3rd_Idle_Rifle.glb",this.ShotgunAnimationSet.standBlink="Chicken_3rd_IdleBlink_Rifle.glb",this.ShotgunAnimationSet.shootLeft="Chicken_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.shootRight="Chicken_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.die="Chicken_3rd_Die2.glb",this.ShotgunAnimationSet.jump="Chicken_3rd_Jump_IP_Rifle.glb",this.ShotgunAnimationSet.runJump="Chicken_3rd_RunJump_Rifle.glb",this.ShotgunAnimationSet.dieRocket="Chicken_3rd_Die1.glb",this.ShotgunAnimationSet.jumpRocket="Chicken_3rd_Flying_Rifle.glb";break;case CharacterID.Ape:case CharacterID.Fox:default:this.RifleAnimationSet.run="Fox_3rd_Run_Rifle.glb",this.RifleAnimationSet.runBackwards="Fox_3rd_RunBack_Rifle.glb",this.RifleAnimationSet.strafeLeft="Fox_3rd_StrafeL_Rifle.glb",this.RifleAnimationSet.strafeRight="Fox_3rd_StrafeR_Rifle.glb",this.RifleAnimationSet.stand="Fox_3rd_Idle_Rifle.glb",this.RifleAnimationSet.standBlink="Fox_3rd_IdleBlink_Rifle.glb",this.RifleAnimationSet.shootLeft="Fox_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.shootRight="Fox_3rd_Shoot_Rifle.glb",this.RifleAnimationSet.die="Fox_3rd_Die2.glb",this.RifleAnimationSet.jump="Fox_3rd_Jump_IP_Rifle.glb",this.RifleAnimationSet.runJump="Fox_3rd_RunJump_Rifle.glb",this.RifleAnimationSet.dieRocket="Fox_3rd_Die1.glb",this.RifleAnimationSet.jumpRocket="Fox_3rd_Flying_Rifle.glb",this.PistolAnimationSet.run="Fox_3rd_Run_TwoGuns.glb",this.PistolAnimationSet.runBackwards="Fox_3rd_RunBack_TwoGuns.glb",this.PistolAnimationSet.strafeLeft="Fox_3rd_StrafeL_TwoGuns.glb",this.PistolAnimationSet.strafeRight="Fox_3rd_StrafeR_TwoGuns.glb",this.PistolAnimationSet.stand="Fox_3rd_Idle_TwoGuns.glb",this.PistolAnimationSet.standBlink="Fox_3rd_IdleBlink_TwoGuns.glb",this.PistolAnimationSet.shootLeft="Fox_3rd_ShootL_TwoGuns.glb",this.PistolAnimationSet.shootRight="Fox_3rd_ShootR_TwoGuns.glb",this.PistolAnimationSet.die="Fox_3rd_Die2.glb",this.PistolAnimationSet.jump="Fox_3rd_Jump_IP_TwoGuns.glb",this.PistolAnimationSet.runJump="Fox_3rd_RunJump_TwoGuns.glb",this.PistolAnimationSet.dieRocket="Fox_3rd_Die1.glb",this.PistolAnimationSet.jumpRocket="Fox_3rd_Flying_TwoGuns.glb",this.UziAnimationsSet.run="Fox_3rd_Run_TwoGuns.glb",this.UziAnimationsSet.runBackwards="Fox_3rd_RunBack_TwoGuns.glb",this.UziAnimationsSet.strafeLeft="Fox_3rd_StrafeL_TwoGuns.glb",this.UziAnimationsSet.strafeRight="Fox_3rd_StrafeR_TwoGuns.glb",this.UziAnimationsSet.stand="Fox_3rd_Idle_TwoGuns.glb",this.UziAnimationsSet.standBlink="Fox_3rd_IdleBlink_TwoGuns.glb",this.UziAnimationsSet.shootLeft="Fox_3rd_ShootL_TwoGuns.glb",this.UziAnimationsSet.shootRight="Fox_3rd_ShootR_TwoGuns.glb",this.UziAnimationsSet.die="Fox_3rd_Die2.glb",this.UziAnimationsSet.jump="Fox_3rd_Jump_IP_TwoGuns.glb",this.UziAnimationsSet.runJump="Fox_3rd_RunJump_TwoGuns.glb",this.UziAnimationsSet.dieRocket="Fox_3rd_Die1.glb",this.UziAnimationsSet.jumpRocket="Fox_3rd_Flying_TwoGuns.glb",this.TommyGunAnimationSet.run="Fox_3rd_Run_TommyGun.glb",this.TommyGunAnimationSet.runBackwards="Fox_3rd_RunBack_TommyGun.glb",this.TommyGunAnimationSet.strafeLeft="Fox_3rd_StrafeL_TommyGun.glb",this.TommyGunAnimationSet.strafeRight="Fox_3rd_StrafeR_TommyGun.glb",this.TommyGunAnimationSet.stand="Fox_3rd_Idle_TommyGun.glb",this.TommyGunAnimationSet.standBlink="Fox_3rd_IdleBlink_TommyGun.glb",this.TommyGunAnimationSet.shootLeft="Fox_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.shootRight="Fox_3rd_Shoot_TommyGun.glb",this.TommyGunAnimationSet.die="Fox_3rd_Die2.glb",this.TommyGunAnimationSet.jump="Fox_3rd_Jump_IP_TommyGun.glb",this.TommyGunAnimationSet.runJump="Fox_3rd_RunJump_TommyGun.glb",this.TommyGunAnimationSet.dieRocket="Fox_3rd_Die1.glb",this.TommyGunAnimationSet.jumpRocket="Fox_3rd_Flying_TommyGun.glb",this.RocketLauncherAnimationSet.run="Fox_3rd_Run_RocketLauncher.glb",this.RocketLauncherAnimationSet.runBackwards="Fox_3rd_RunBack_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeLeft="Fox_3rd_StrafeL_RocketLauncher.glb",this.RocketLauncherAnimationSet.strafeRight="Fox_3rd_StrafeR_RocketLauncher.glb",this.RocketLauncherAnimationSet.stand="Fox_3rd_Idle_RocketLauncher.glb",this.RocketLauncherAnimationSet.standBlink="Fox_3rd_IdleBlink_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootLeft="Fox_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.shootRight="Fox_3rd_Shoot_RocketLauncher.glb",this.RocketLauncherAnimationSet.die="Fox_3rd_Die2.glb",this.RocketLauncherAnimationSet.jump="Fox_3rd_Jump_IP_RocketLauncher.glb",this.RocketLauncherAnimationSet.runJump="Fox_3rd_RunJump_RocketLauncher.glb",this.RocketLauncherAnimationSet.dieRocket="Fox_3rd_Die1.glb",this.RocketLauncherAnimationSet.jumpRocket="Fox_3rd_RocketJump_RocketLauncher.glb",this.ShotgunAnimationSet.run="Fox_3rd_Run_Rifle.glb",this.ShotgunAnimationSet.runBackwards="Fox_3rd_RunBack_Rifle.glb",this.ShotgunAnimationSet.strafeLeft="Fox_3rd_StrafeL_Rifle.glb",this.ShotgunAnimationSet.strafeRight="Fox_3rd_StrafeR_Rifle.glb",this.ShotgunAnimationSet.stand="Fox_3rd_Idle_Rifle.glb",this.ShotgunAnimationSet.standBlink="Fox_3rd_IdleBlink_Rifle.glb",this.ShotgunAnimationSet.shootLeft="Fox_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.shootRight="Fox_3rd_Shoot_Rifle.glb",this.ShotgunAnimationSet.die="Fox_3rd_Die2.glb",this.ShotgunAnimationSet.jump="Fox_3rd_Jump_IP_Rifle.glb",this.ShotgunAnimationSet.runJump="Fox_3rd_RunJump_Rifle.glb",this.ShotgunAnimationSet.dieRocket="Fox_3rd_Die1.glb",this.ShotgunAnimationSet.jumpRocket="Fox_3rd_Flying_Rifle.glb"}},EnemyModel.prototype.onEnemyAnimationChanged=function(t,e){t===this.playerID&&this.changeAnimationState(e)},EnemyModel.prototype.onEnemyWeaponChanged=function(t,e){t===this.playerID&&this.switchWeapon(e)},EnemyModel.prototype.onEnemyBulletFired=function(t,e,i){e===this.playerID&&this.animateWeaponMuzzleFlash()},EnemyModel.prototype.onEnemyRayFired=function(t,e){t===this.playerID&&this.animateWeaponMuzzleFlash()},EnemyModel.prototype.onKillMade=function(t,e,i,n){e.id===this.playerID&&this.changeAnimationState(EnemyAnimationState.Die)},
//!! It's very important to not change the animation system without proper understanding of all edgecases !!
EnemyModel.prototype.changeAnimationState=function(t){if(this.isEnabled){if(this.animationState!==EnemyAnimationState.Shoot&&this.animationState!==EnemyAnimationState.Jump&&(this.previousAnimationState=this.animationState),t==EnemyAnimationState.RocketJump&&(this.countDownAnimationTime=!1),t!==EnemyAnimationState.Shoot&&t!==EnemyAnimationState.Jump&&this.countDownAnimationTime)this.previousAnimationState=t;else if(this.previousAnimationState==EnemyAnimationState.Die&&(this.pistolModelRight.enabled=!0,this.pistolModelLeft.enabled=!0,this.EnableDefaultModel(),this.isDead=!1,this.currentHat&&(this.currentHat.enabled=!0)),this.crossFadeTime=.1,this.modelMeshWasChanged&&(this.modelMeshWasChanged=!1,this.crossFadeTime=0),this.previousAnimationState==EnemyAnimationState.Stand&&(clearTimeout(this.waitForBlinkTimeout),clearTimeout(this.waitForIdleTimeout)),this.animationsAreLoaded){switch(t){case EnemyAnimationState.StrafeRight:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.strafeRight,this.crossFadeTime);break;case EnemyAnimationState.StrafeLeft:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.strafeLeft,this.crossFadeTime);break;case EnemyAnimationState.RunBackwards:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.runBackwards,this.crossFadeTime);break;case EnemyAnimationState.Run:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.run,this.crossFadeTime);break;case EnemyAnimationState.Stand:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.stand,this.crossFadeTime),this.playWeaponAnimation(!1),this.StartBlinkFlow();break;case EnemyAnimationState.Shoot:this.crossFadeTime=0,this.entity.animation.loop=!1,this.countDownAnimationTime=!0,this.entity.animation.currentTime=0,this.nextShotLeft?this.entity.animation.play(this.currentAnimationSet.shootLeft,this.crossFadeTime):this.entity.animation.play(this.currentAnimationSet.shootRight,this.crossFadeTime),this.playWeaponAnimation(!0);break;case EnemyAnimationState.Die:this.isDead=!0,clearTimeout(this.waitForPainTimeout),this.ToggleHeadPain(!1),this.DisableWeapons(),this.entity.animation.loop=!1,this.lastWeaponHitBy==Weapons.RocketLauncher?(this.playerSoundManagerScript.playDieSound(this.characterType,!0),this.EnableCharredBody(),this.entity.animation.play(this.currentAnimationSet.dieRocket,this.crossFadeTime)):(this.playerSoundManagerScript.playDieSound(this.characterType,!1),this.EnableHoledBody(),this.entity.animation.play(this.currentAnimationSet.die,this.crossFadeTime));break;case EnemyAnimationState.Jump:this.entity.animation.loop=!1,this.countDownAnimationTime=!0,this.entity.animation.currentTime=0,this.entity.animation.play(this.currentAnimationSet.jump,this.crossFadeTime);break;case EnemyAnimationState.RunJump:this.entity.animation.loop=!1,this.entity.animation.play(this.currentAnimationSet.runJump,this.crossFadeTime);break;case EnemyAnimationState.RocketJump:this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.jumpRocket,this.crossFadeTime)}this.animationState=t}}else this.animationToSwitchTo=t},EnemyModel.prototype.StartBlinkFlow=function(){this.timeToBlink=pc.math.random(2.5,4.2),this.waitForBlinkTimeout=setTimeout(this.Blink.bind(this),1e3*this.timeToBlink)},EnemyModel.prototype.Blink=function(){this.entity.enabled&&this.animationState==EnemyAnimationState.Stand&&(this.entity.animation.loop=!1,this.entity.animation.play(this.currentAnimationSet.standBlink,this.crossFadeTime),this.waitForIdleTimeout=setTimeout(function(){this.entity.animation.loop=!0,this.entity.animation.play(this.currentAnimationSet.stand,this.crossFadeTime),this.StartBlinkFlow()}.bind(this),400*this.entity.animation.duration))},EnemyModel.prototype.playWeaponAnimation=function(t){t?this.nextShotLeft&&this.currentAnimationSet.dualWeapon?(this.currentAnimationSet.loopShot?this.leftWeaponLoopAnimActive||(this.leftWeaponLoopAnimActive=!0,this.currentLeftWeaponModel.animation.loop=!0,this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime),clearTimeout(this.waitForLeftLoopingWeaponAnimation),this.waitForLeftLoopingWeaponAnimation=setTimeout(function(){this.stopLoopingWeaponAnimation(!0)}.bind(this),350)):(this.currentLeftWeaponModel.animation.loop=!1,this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime)),this.nextShotLeft=!1):(this.currentAnimationSet.loopShot?this.rightWeaponLoopAnimActive||(this.rightWeaponLoopAnimActive=!0,this.currentRightWeaponModel.animation.loop=!0,this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime),clearTimeout(this.waitForRightLoopingWeaponAnimation),this.waitForRightLoopingWeaponAnimation=setTimeout(function(){this.stopLoopingWeaponAnimation(!1)}.bind(this),350)):(this.currentRightWeaponModel.animation.loop=!1,this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponShoot,this.crossFadeTime)),this.nextShotLeft=!0):this.currentAnimationSet.loopShot||(this.currentAnimationSet.dualWeapon&&(this.currentLeftWeaponModel.animation.loop=!1,this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime)),this.currentRightWeaponModel.animation.loop=!1,this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime))},EnemyModel.prototype.stopLoopingWeaponAnimation=function(t){t?(this.leftWeaponLoopAnimActive=!1,this.currentLeftWeaponModel.animation.loop=!1,this.currentLeftWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime)):(this.rightWeaponLoopAnimActive=!1,this.currentRightWeaponModel.animation.loop=!1,this.currentRightWeaponModel.animation.play(this.currentAnimationSet.weaponIdle,this.crossFadeTime))},EnemyModel.prototype.switchWeapon=function(t){if(this.isEnabled){if(this.activeWeapon!=t){switch(this.pistolModelRight.enabled=!1,this.pistolModelLeft.enabled=!1,this.rifleModel.enabled=!1,this.shotgunModel.enabled=!1,this.minigunModel.enabled=!1,this.rocketLauncherModel.enabled=!1,this.uziModelLeft.enabled=!1,this.uziModelRight.enabled=!1,t){case Weapons.Pistols:this.pistolModelRight.enabled=!0,this.pistolModelLeft.enabled=!0,this.currentAnimationSet=this.PistolAnimationSet,this.currentLeftWeaponModel=this.pistolModelLeft,this.currentRightWeaponModel=this.pistolModelRight;break;case Weapons.Rifle:this.rifleModel.enabled=!0,this.currentAnimationSet=this.RifleAnimationSet,this.currentRightWeaponModel=this.rifleModel;break;case Weapons.Shotgun:this.shotgunModel.enabled=!0,this.currentAnimationSet=this.ShotgunAnimationSet,this.currentRightWeaponModel=this.shotgunModel;break;case Weapons.Minigun:this.minigunModel.enabled=!0,this.currentAnimationSet=this.TommyGunAnimationSet,this.currentRightWeaponModel=this.minigunModel;break;case Weapons.RocketLauncher:this.rocketLauncherModel.enabled=!0,this.currentAnimationSet=this.RocketLauncherAnimationSet,this.currentRightWeaponModel=this.rocketLauncherModel;break;case Weapons.Uzi:this.uziModelLeft.enabled=!0,this.uziModelRight.enabled=!0,this.currentAnimationSet=this.UziAnimationsSet,this.currentLeftWeaponModel=this.uziModelLeft,this.currentRightWeaponModel=this.uziModelRight}this.activeWeapon=t,this.changeAnimationState(this.animationState),this.currentAnimationSet.loopShot?(this.stopLoopingWeaponAnimation(!0),this.stopLoopingWeaponAnimation(!1)):this.playWeaponAnimation(!1)}}else this.weaponToSwitchTo=t},EnemyModel.prototype.DisableWeapons=function(){this.pistolModelRight.enabled=!1,this.pistolModelLeft.enabled=!1,this.rifleModel.enabled=!1,this.shotgunModel.enabled=!1,this.minigunModel.enabled=!1,this.rocketLauncherModel.enabled=!1,this.uziModelLeft.enabled=!1,this.uziModelRight.enabled=!1},EnemyModel.prototype.SetThisFrameVisibility=function(t){this.isVisibleThisFrame=t},EnemyModel.prototype.animateWeaponMuzzleFlash=function(){if(this.isVisibleThisFrame){if(this.activeWeapon!==Weapons.RocketLauncher){var t;switch(this.activeWeapon){case Weapons.RocketLauncher:case Weapons.Minigun:case Weapons.Rifle:t=this.rifleMuzzleSpawnPoint.getPosition();break;case Weapons.Uzi:case Weapons.Pistols:t=this.nextShotLeft?this.leftMuzzleSpawnPoint.getPosition():this.rightMuzzleSpawnPoint.getPosition();break;default:t=this.rightMuzzleSpawnPoint.getPosition()}var e=this.enemyRotationEntity.getRotation();this.effectController.script.effectController.startMuzzleFX(t,e,null,null)}this.currentAnimationSet.loopShot?this.playWeaponAnimation(!0):this.changeAnimationState(EnemyAnimationState.Shoot),this.StartCartridgeParticles(this.activeWeapon)}},EnemyModel.prototype.EnableDefaultModel=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Chicken||this.characterType==CharacterID.Rhino?(this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Ape?(this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!0,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[3].visible=!1,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Lion||this.characterType==CharacterID.Toucan?(this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Dog&&(this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1)},EnemyModel.prototype.EnableHoledBody=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Chicken?(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[1].visible=!0):this.characterType==CharacterID.Ape?(this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[4].visible=!0):this.characterType==CharacterID.Toucan?(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[1].visible=!0):this.characterType==CharacterID.Dog&&(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[8].visible=!0)},EnemyModel.prototype.EnableCharredBody=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Chicken?(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[4].visible=!1):this.characterType==CharacterID.Ape?(this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[2].visible=!1):this.characterType==CharacterID.Toucan?(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[4].visible=!1):this.characterType==CharacterID.Dog&&(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[1].visible=!0,this.entity.model.meshInstances[3].visible=!1),this.currentHat&&(this.currentHat.enabled=!1)},EnemyModel.prototype.ToggleHeadPain=function(t,e){if(this.characterType==CharacterID.Fox?this.ToggleFoxPainHead(t,e):this.characterType==CharacterID.Bull?this.ToggleBullPainHead(t,e):this.characterType==CharacterID.Chicken?this.ToggleChickenPainHead(t,e):this.characterType==CharacterID.Rhino?this.ToggleRhinoPainHead(t,e):this.characterType==CharacterID.Ape?this.ToggleApePainHead(t,e):this.characterType==CharacterID.Lion?this.ToggleLionPainHead(t,e):this.characterType==CharacterID.Toucan?this.ToggleToucanPainHead(t,e):this.characterType==CharacterID.Dog&&this.ToggleDogPainHead(t,e),t){var i=this.damagedEnemyScale.clone();this.entity.tween(i).to(this.normalEnemyScale,.6,pc.ElasticOut).on("update",(function(){this.entity.setLocalScale(i)})).start()}},EnemyModel.prototype.ToggleFoxPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleBullPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleChickenPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleRhinoPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleApePainHead=function(t,e){this.entity.model.meshInstances[0].visible=!t,this.entity.model.meshInstances[2].visible=!t,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.entity.model.meshInstances[6].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[5].visible=!0):(this.entity.model.meshInstances[8].visible=!0,this.entity.model.meshInstances[6].visible=!0))},EnemyModel.prototype.ToggleLionPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleToucanPainHead=function(t,e){this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!t,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[7].visible=!0,this.entity.model.meshInstances[8].visible=!0))},EnemyModel.prototype.ToggleDogPainHead=function(t,e){this.entity.model.meshInstances[2].visible=!t,this.entity.model.meshInstances[3].visible=!t,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[7].visible=!1,t&&(pc.math.random(1,100)>66?(this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[6].visible=!0):(this.entity.model.meshInstances[5].visible=!0,this.entity.model.meshInstances[7].visible=!0))},EnemyModel.prototype.DisableEntireBody=function(){(this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Chicken||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Ape||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Toucan||this.characterType==CharacterID.Dog)&&(this.entity.model.meshInstances[0].visible=!1,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!1,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1)},EnemyModel.prototype.HandleDamageTaken=function(t){if(!this.isDead&&this.isVisibleThisFrame){this.lastWeaponHitBy=t?Weapons.RocketLauncher:Weapons.Pistols,this.ToggleHeadPain(!0);var e=this.enemyMaterialEmessiveFactorHit.clone();this.entity.tween(e).to(this.enemyMaterialEmessiveFactorNormal,.5,pc.CubicOut).on("update",(function(){this.entity.script.enemyModel.enemyMaterial.emissiveIntensity=e.x,this.entity.script.enemyModel.enemyMaterial.update()})).start(),clearTimeout(this.waitForPainTimeout),this.waitForPainTimeout=setTimeout(function(){this.ToggleHeadPain(!1)}.bind(this),300)}},EnemyModel.prototype.StartCartridgeParticles=function(t){if(t!=Weapons.RocketLauncher&&!MobileController.instance.active){this.spawnParticleLeft=!this.nextShotLeft;var e=this.bulletsRightTag;this.spawnParticleLeft&&this.currentAnimationSet.dualWeapon&&(e=this.bulletsLeftTag),t==Weapons.Shotgun&&(e=this.shotgunTag);var i=null,n=Object.values(this.cartridgeParticleSystemClones);if(n.length>0)for(var o in n){var s=n[o];if(!s.particlesystem.isPlaying()&&s.tags.has(e)){i=s;break}}null===i&&(i=t==Weapons.Shotgun?this.shellParticleSystem.clone():this.currentAnimationSet.dualWeapon&&this.spawnParticleLeft?this.bulletParticleSystemLeft.clone():this.bulletParticleSystemRight.clone(),this.cartridgeParticleSystemClones[i.getGuid()]=i,this.app.root.addChild(i)),this.currentAnimationSet.dualWeapon?this.spawnParticleLeft?i.setPosition(this.bulletParticleSystemLeft.getPosition()):i.setPosition(this.bulletParticleSystemRight.getPosition()):i.setPosition(this.shellParticleSystem.getPosition()),i.setLocalRotation(this.enemyRotationEntity.getLocalRotation()),i.particlesystem.reset(),i.particlesystem.play()}};var PlayerManager=pc.createScript("playerManager");PlayerManager.attributes.add("playerID",{type:"string",title:"Player ID"}),PlayerManager.attributes.add("isLocalPlayer",{type:"boolean",default:!1}),PlayerManager.attributes.add("isAlive",{type:"boolean",default:!0,title:"Is Player Alive"}),PlayerManager.attributes.add("currentHealth",{type:"number",default:0}),PlayerManager.attributes.add("bumpedIntoObstacle",{type:"boolean",default:!1}),PlayerManager.attributes.add("hitDetectorEntity",{type:"entity",title:"Hit Detector"}),PlayerManager.attributes.add("enemyPlayerNameLabelEntity",{type:"entity",title:"Enemy Player Name Label"}),PlayerManager.attributes.add("enemyPlayerDamageLabelEntity",{type:"entity",title:"Enemy Player Damage Label"}),PlayerManager.attributes.add("enemyHealthBarEntity",{type:"entity",title:"Enemy Health Bar"}),PlayerManager.attributes.add("enemyRootForRotationEntity",{type:"entity",title:"Enemy Root For Rotation"}),PlayerManager.attributes.add("enemyGreyHealthBarEntity",{type:"entity",title:"Enemy Grey Health Bar"}),PlayerManager.attributes.add("enemyRedHealthBarEntity",{type:"entity",title:"Enemy Red Health Bar"}),PlayerManager.attributes.add("enemyWhiteHealthBarEntity",{type:"entity",title:"Enemy White Health Bar"}),PlayerManager.attributes.add("enemyHealthBarOutlineEntity",{type:"entity",title:"Enemy Outline Health Bar"}),PlayerManager.attributes.add("enemyModelEntity",{type:"entity",title:"Enemy Model"}),PlayerManager.attributes.add("cameraEntity",{type:"entity",title:"Camera"}),PlayerManager.attributes.add("gunNozzleEntity",{type:"entity",title:"Gun Nozzle"}),PlayerManager.attributes.add("hasSubscribedToEvents",{type:"boolean",default:!1}),PlayerManager.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),PlayerManager.prototype.init=function(e,t,a,i,n,l,s){this.loadAssetManager=n,this.rankManager=l,this.itemDataManager=s,this.playerID=e.id,this.playerName=e.name,this.defaultHealth=e.defaultHealth,this.currentHealth=e.currentHealth,this.bonusHealth=e.bonusHealth,this.maxHealth=e.maxHealth,this.localPlayerID=t,this.isLocalPlayer=this.playerID===t,this.score=e.score,this.kills=e.kills,this.isConnected=e.isConnected,this.localPlayerCamera=this.isLocalPlayer?this.cameraEntity:i,this.entity.name="Player "+this.playerID,this.spawnPoint=new pc.Vec3,this.enemyPosition=new pc.Vec3,this.enemyTargetDirection=new pc.Vec3,this.whiteHealthBarScaleStart=new pc.Vec3(.2,1,1),this.whiteHealthBarScaleFinish=new pc.Vec3(0,1,1),this.currentWhiteHealthBarRemainder=0,this.previousHealthBarSize=1,this.whiteHealthBarDefaultPos=-.5,this.modelMovementScript=this.entity.script.modelMovement,this.shootingScript=this.entity.script.shooting,this.enemyModelScript=this.enemyModelEntity.script.enemyModel,this.enemyModelScript.disableVisually(),this.enemyHealthBarEntity.enabled=!1,this.enemyPlayerNameLabelEntity.enabled=!1,this.enableEnemyPlayerDelay=.3,this.delayedEnableTimer=null,this.disablePlayerDelay=4,this.delayedDisableTimer=null,this.SubscribeToEvents(this.isLocalPlayer),this.playerSoundManagerScript=this.entity.script.playerSoundManager,this.playerSoundManagerScript.init(this.loadAssetManager,this.playerID,this.isLocalPlayer,this.localPlayerCamera,e.characterTypeIndex),this.playerHitDetectorScript=this.hitDetectorEntity.script.playerHitDetector,this.playerHitDetectorScript.init(this.playerID,this.isLocalPlayer),this.cameraManager=this.cameraEntity.script.cameraManager,this.cameraManager.init(),this.cameraManager.disable(),this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper,this.profileRankEmblemHelper.setEmblem(this.rankManager.GetRank(e.totalRankPoints)),this.totalRankPoints=e.totalRankPoints,this.isLocalPlayer?(isLocalPlayerAlive=e.isAlive,this.shootingScript.enabled=!0,this.shootingScript.Load(this.playerID,a),this.modelMovementScript.enabled=!0,this.modelMovementScript.Load(this.playerID,a,this.playerHitDetectorScript.isInWater),this.enemyModelEntity.enabled=!1,this.enemyGreyHealthBarEntity.enabled=!1,this.enemyRedHealthBarEntity.enabled=!1,this.enemyWhiteHealthBarEntity.enabled=!1,this.enemyHealthBarOutlineEntity.enabled=!1,this.activeHealthBarTween=null,this.entity.rigidbody.type=pc.BODYTYPE_DYNAMIC,this.entity.rigidbody.mass=100,this.entity.rigidbody.linearDamping=.98,this.entity.rigidbody.angularDamping=0,this.entity.rigidbody.linearFactor=pc.Vec3.ONE,this.entity.rigidbody.angularFactor=pc.Vec3.ZERO,this.entity.rigidbody.friction=.95,this.entity.rigidbody.restitution=0,this.entity.script.physicsLayer.initialize(),this.fire("playerInfoUpdated",this.playerName),this.setScore(this.score),this.setKills(this.kills),this.setHealth(this.currentHealth),this.app.fire("localPlayerBodyChange",e.characterTypeIndex,e.outfitColorIndex,e.hatIndex)):(this.shootingScript.enabled=!1,this.modelMovementScript.enabled=!1,this.enemyModelEntity.enabled=!0,this.enemyModelScript.init(this.playerID,this.isLocalPlayer,e.currentWeaponIndex,e.characterTypeIndex,e.outfitColorIndex,this.playerSoundManagerScript,this.loadAssetManager,this.itemDataManager),this.enemyGreyHealthBarEntity.enabled=!0,this.enemyRedHealthBarEntity.enabled=!0,this.enemyWhiteHealthBarEntity.enabled=!1,this.enemyHealthBarOutlineEntity.enabled=!0,this.enemyPlayerNameLabelEntity.element.text=this.playerName,this.enemyPlayerNameLabelEntity.element.color=Enemy_Player_Name_Color,this.positionRankEmblem(),this.damageIndicators={},this.enemyPlayerDamageLabelEntity.element.color=Damage_Done_Label_Color,this.enemyPlayerDamageLabelEntity.enabled=!1,this.maxHealthBarWidth=1,this.minHealthBarWidth=0,this.defaultHealthBarPositionY=2,this.defaultHealthBarPositionZ=0,this.setEnemyHealth(this.currentHealth)),this.placePlayer(e),e.isAlive&&e.isConnected&&a?this.enablePlayer(e.currentHealth,e.kills,e.characterTypeIndex,e.outfitColorIndex,e.score,!1,e.hatIndex):this.disablePlayer(!1)},PlayerManager.prototype.SubscribeToEvents=function(e){this.hasSubscribedToEvents||(e&&this.app.on("respawnClicked",this.OnPlayerRespawnClicked,this),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("playersUpdated",this.onPlayersUpdated,this),this.app.on("respawn",this.onRespawnGranted,this),this.app.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.on("killMade",this.OnKillMade,this),this.app.on("connectionLost",this.onConnectionLost,this),this.on("attr:isAlive",this.onAliveStateChanged,this),this.on("attr:currentHealth",this.onCurrentHealthStateChanged,this),this.on("enable",this.manualEnableHookup,this),this.on("disable",this.manualDisableHookup,this),this.on("destroy",this.manualDestroyHookup,this),this.hasSubscribedToEvents=!0)},PlayerManager.prototype.manualEnableHookup=function(){this.playerHitDetectorScript.enableDetector(),this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.entity.collision.on("collisionend",this.onCollisionEnd,this),this.app.on("confirmBulletHit",this.OnConfirmBulletHit,this),this.app.on("confirmRayHitPlayer",this.OnConfirmRayHit,this),this.app.on("notifyHealthPackPickedUp",this.OnHealthPackPickedUp,this),this.app.on("notifyHealthDeprecation",this.OnHealthDeprecation,this),this.app.on("notifyWaterDamage",this.OnWaterDamage,this),this.app.on("notifyMineDamage",this.OnMineDamage,this)},PlayerManager.prototype.manualDisableHookup=function(){this.playerHitDetectorScript.disableDetector(),this.entity.collision.off("collisionstart",this.onCollisionStart,this),this.entity.collision.off("collisionend",this.onCollisionEnd,this),this.app.off("confirmBulletHit",this.OnConfirmBulletHit,this),this.app.off("confirmRayHitPlayer",this.OnConfirmRayHit,this),this.app.off("notifyHealthPackPickedUp",this.OnHealthPackPickedUp,this),this.app.off("notifyHealthDeprecation",this.OnHealthDeprecation,this),this.app.off("notifyWaterDamage",this.OnWaterDamage,this),this.app.off("notifyMineDamage",this.OnMineDamage,this)},PlayerManager.prototype.manualDestroyHookup=function(){this.isLocalPlayer&&this.app.off("respawnClicked",this.OnPlayerRespawnClicked,this),this.app.off("sessionStarted",this.onSessionStarted,this),this.app.off("cooldownStarted",this.onCooldownStarted,this),this.app.off("playersUpdated",this.onPlayersUpdated,this),this.app.off("respawn",this.onRespawnGranted,this),this.app.off("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.off("killMade",this.OnKillMade,this),this.app.off("connectionLost",this.onConnectionLost,this)},PlayerManager.prototype.onAliveStateChanged=function(e,t){this.isLocalPlayer&&(isLocalPlayerAlive=e,this.modelMovementScript.onPlayerAliveStateChanged(e),this.shootingScript.onPlayerAliveStateChanged(e))},PlayerManager.prototype.onCurrentHealthStateChanged=function(e,t){this.playerHitDetectorScript.onCurrentHealthStateChanged(e)},PlayerManager.prototype.onSessionStarted=function(e,t,a,i){null!=i&&(Object.keys(i).includes(this.playerID)||(this.disablePlayer(!1),this.entity.destroy()))},PlayerManager.prototype.onPlayersUpdated=function(e,t,a,i){if(null!=t)if(Object.keys(t).includes(this.playerID)){var n=t[this.playerID];this.updateTotalRankPoints(n.totalRankPoints),!this.isAlive&&n.isAlive&&n.isConnected&&!i&&this.enablePlayer(n.currentHealth,n.kills,n.characterTypeIndex,n.outfitColorIndex,n.score,!1,n.hatIndex),!this.isAlive||n.isAlive&&n.isConnected||this.disablePlayer(!1)}else this.isAlive&&this.disablePlayer(!1)},PlayerManager.prototype.onRespawnGranted=function(e,t){this.playerID===e.id&&!this.isAlive&&e.isAlive&&e.isConnected&&(this.placePlayer(e),this.enablePlayer(e.currentHealth,e.kills,e.characterTypeIndex,e.outfitColorIndex,e.score,!0,e.hatIndex))},PlayerManager.prototype.onEnemyPlayerDisconnected=function(e){this.playerID===e.id&&this.disablePlayer(!1)},PlayerManager.prototype.onCooldownStarted=function(){this.disablePlayer(!1)},PlayerManager.prototype.onConnectionLost=function(){this.disablePlayer(!1)},PlayerManager.prototype.OnHealthPackPickedUp=function(e,t,a){this.playerID===t&&(this.isLocalPlayer?this.setHealth(a):this.setEnemyHealth(a))},PlayerManager.prototype.OnHealthDeprecation=function(e,t){this.playerID===e&&(this.isLocalPlayer?this.setHealth(t):this.setEnemyHealth(t))},PlayerManager.prototype.OnWaterDamage=function(e,t){if(this.playerID===e)if(this.isLocalPlayer){var a=this.currentHealth-t;this.takeDamage(a,null)}else this.setEnemyHealth(t)},PlayerManager.prototype.OnMineDamage=function(e,t){if(this.playerID===e)if(this.isLocalPlayer)this.takeDamage(t,e,0,0,0,!0,Weapons.RocketLauncher);else{this.enemyModelScript.HandleDamageTaken(!0);var a=this.currentHealth-t;this.setEnemyHealth(a)}},PlayerManager.prototype.OnConfirmBulletHit=function(e,t,a,i,n,l){t!==a&&(this.playerID===t&&this.isLocalPlayer&&e&&(this.onTargetHit(t,i),this.setScore(l)),this.playerID===a&&(e?(this.enemyModelScript.HandleDamageTaken(!0),this.updateEnemyHealth(i,t,a,n,null)):this.isLocalPlayer?this.takeDamage(i,t,n.x,n.y,n.z,!0,Weapons.RocketLauncher):(this.enemyModelScript.HandleDamageTaken(!0),this.updateEnemyHealth(i,t,a,n,null))))},PlayerManager.prototype.OnPlayerRespawnClicked=function(e){this.isAlive||this.app.fire("respawnRequested",this.playerID,e)},PlayerManager.prototype.OnKillMade=function(e,t,a,i){this.playerID===t.id&&(this.isLocalPlayer?this.onDeath(e.id):this.disablePlayer(!0)),this.isLocalPlayer&&this.playerID===e.id&&(this.setKills(e.kills),this.setScore(e.score))},PlayerManager.prototype.OnConfirmRayHit=function(e,t,a,i,n,l,s){e!==t&&(this.playerID===t&&this.isLocalPlayer&&(this.onTargetHit(t,a),this.updateEnemyHealth(a,t,e,i,l),this.setScore(s)),this.playerID===e&&(this.isLocalPlayer?this.takeDamage(a,t,i.x,i.y,i.z,l==Weapons.RocketLauncher,l):(this.enemyModelScript.HandleDamageTaken(l==Weapons.RocketLauncher),this.updateEnemyHealth(a,t,e,i,l))))},PlayerManager.prototype.onCollisionStart=function(e){var t=e.other,a=(t.name,t.tags.list()[0]);this.isLocalPlayer&&!this.cameraEntity.enabled&&(this.app.fire("localPlayerSpawned",this.entity),this.cameraManager.enable()),"ground"!=a&&(this.bumpedIntoObstacle=!0)},PlayerManager.prototype.onCollisionEnd=function(e){"ground"!=e.tags.list()[0]&&(this.bumpedIntoObstacle=!1)},PlayerManager.prototype.heal=function(e){this.isAlive&&(this.isLocalPlayer?this.setHealth(e):this.setEnemyHealth(e))},PlayerManager.prototype.setScore=function(e){this.score=e,this.fire("playerScoreUpdated",this.score)},PlayerManager.prototype.setHealth=function(e){this.currentHealth=e,this.fire("playerHealthUpdated",this.currentHealth,this.defaultHealth)},PlayerManager.prototype.setKills=function(e){this.killsMade=e,this.fire("playerKillsUpdated",this.killsMade)},PlayerManager.prototype.setEnemyHealth=function(e){this.currentHealth=e,this.updateEnemyHealthBar(!0)},PlayerManager.prototype.takeDamage=function(e,t,a,i,n,l,s){if(this.isAlive)if(this.currentHealth-=e,this.currentHealth<=0)this.setHealth(0);else{this.enemyPosition.set(a,i,n);var r=this.calculateHitAngle(this.enemyPosition);this.fire("takingDamage",e,r,this.currentHealth),this.app.fire("updateLastEnemyHitLocation",this.enemyPosition,l,s),this.playerSoundManagerScript.onPlayerTakingDamage(e),this.setHealth(this.currentHealth)}},PlayerManager.prototype.calculateHitAngle=function(e){var t=this.entity.getPosition();this.enemyTargetDirection.set(0,0,0);var a=this.enemyTargetDirection.copy(e).sub(t).normalize(),i=this.cameraEntity.forward.angle(a);return i<0&&(i+=360),i},PlayerManager.prototype.updateEnemyHealth=function(e,t,a,i,n){if(this.playerID===a&&(this.currentHealth-=e,this.updateEnemyHealthBar(!1),this.localPlayerID===t)){var l=0;l=n&&n==Weapons.RocketLauncher?this.entity.getPosition().distance(this.localPlayerCamera.getPosition()):this.entity.getPosition().distance(i);var s=this.enemyPlayerNameLabelEntity.getLocalPosition().clone(),r=this.enemyPlayerNameLabelEntity.getRotation(),h=this.enemyPlayerDamageLabelEntity,o=this.damageIndicators,y=null,p=Object.values(o);if(p.length>0)for(var c in p){var d=p[c];if(!d.script.damageDoneLabelPositionHandler.isEnabled()){y=d;break}}null===y&&(y=h.clone(),this.entity.addChild(y),o[y.getGuid()]=y),y.script.damageDoneLabelPositionHandler.show(s,r,l,e)}},PlayerManager.prototype.updateEnemyHealthBar=function(e){var t=0;if(this.currentHealth<=this.defaultHealth)if(this.currentHealth<=0)t=this.minHealthBarWidth,this.enemyRedHealthBarEntity.enabled=!1,this.enemyWhiteHealthBarEntity.enabled=!1,this.enemyGreyHealthBarEntity.enabled=!1,this.enemyHealthBarOutlineEntity.enabled=!1;else{if(this.enemyGreyHealthBarEntity.enabled=!0,this.enemyHealthBarOutlineEntity.enabled=!0,this.enemyRedHealthBarEntity.enabled=!0,t=this.currentHealth/this.defaultHealth,!e){this.enemyWhiteHealthBarEntity.enabled=!0,null!==this.activeHealthBarTween&&void 0!==this.activeHealthBarTween&&this.activeHealthBarTween.stop();var a=this.whiteHealthBarScaleStart.clone();a.set(this.previousHealthBarSize-t+this.currentWhiteHealthBarRemainder,1,1),this.currentWhiteHealthBarRemainder=a.x,this.activeHealthBarTween=this.entity.tween(a).to(this.whiteHealthBarScaleFinish,.75,pc.QuadraticOut).on("update",(function(){this.entity.script.playerManager.enemyWhiteHealthBarEntity.setLocalScale(a),this.entity.script.playerManager.currentWhiteHealthBarRemainder=a.x})).on("complete",(function(){this.entity.script.playerManager.enemyWhiteHealthBarEntity.enabled=!1,this.entity.script.playerManager.activeHealthBarTween=null})).start()}this.enemyWhiteHealthBarEntity.setLocalPosition(this.whiteHealthBarDefaultPos+t,this.defaultHealthBarPositionY,this.defaultHealthBarPositionZ)}else t=this.maxHealthBarWidth;this.enemyRedHealthBarEntity.setLocalScale(t,1,1),this.previousHealthBarSize=t},PlayerManager.prototype.onTargetHit=function(e,t){this.fire("displayDamageDone",t)},PlayerManager.prototype.onDeath=function(e){this.isAlive&&(this.app.fire("playerKilled",this.playerID,e,this.entity,this.isLocalPlayer),this.modelMovementScript.ChangeAnimationState(EnemyAnimationState.Die),this.disablePlayer(!1))},PlayerManager.prototype.placePlayer=function(e){this.spawnPoint.set(e.position.x,e.position.y,e.position.z),this.entity.rigidbody.teleport(this.spawnPoint)},PlayerManager.prototype.enablePlayer=function(e,t,a,i,n,l,s){clearTimeout(this.delayedDisableTimer),clearTimeout(this.delayedEnableTimer),this.entity.collision.enabled=!0,this.entity.enabled=!0,this.isAlive=!0,this.isLocalPlayer||(this.delayedEnableTimer=setTimeout(function(){this.playerHitDetectorScript.enableDetector(),this.enemyModelScript.enableVisually(a,i,l,s),this.enemyHealthBarEntity.enabled=!0,this.enemyPlayerNameLabelEntity.enabled=!0}.bind(this),1e3*this.enableEnemyPlayerDelay)),null!=e&&(this.isLocalPlayer?this.setHealth(e):this.setEnemyHealth(e)),this.isLocalPlayer&&(null!=t&&this.setKills(t),null!=n&&this.setScore(n))},PlayerManager.prototype.disablePlayer=function(e){clearTimeout(this.delayedDisableTimer),clearTimeout(this.delayedEnableTimer),this.isAlive=!1,this.cameraManager.disable(),this.isLocalPlayer&&this.app.fire("localPlayerCameraDisabled"),this.entity.collision.enabled=!1,e?(this.enemyHealthBarEntity.enabled=!1,this.enemyPlayerNameLabelEntity.enabled=!1,this.playerHitDetectorScript.disableDetector(),this.delayedDisableTimer=setTimeout(function(){this.entity.enabled=!1,this.isLocalPlayer||this.enemyModelScript.disableVisually()}.bind(this),1e3*this.disablePlayerDelay)):(this.isLocalPlayer||(this.enemyModelScript.disableVisually(),this.enemyHealthBarEntity.enabled=!1,this.enemyPlayerNameLabelEntity.enabled=!1),this.entity.enabled=!1)},PlayerManager.prototype.destroyPlayer=function(){clearTimeout(this.delayedDisableTimer),clearTimeout(this.delayedEnableTimer),this.entity.destroy()},PlayerManager.prototype.updateTotalRankPoints=function(e){this.totalRankPoints=e,this.profileRankEmblemHelper.setEmblem(this.rankManager.GetRank(e)),this.positionRankEmblem()},PlayerManager.prototype.positionRankEmblem=function(){setTimeout(function(){var e=-1*(.5*this.enemyPlayerNameLabelEntity.element.width+.5*this.profileRankEmblem.element.width)-4;this.profileRankEmblem.setLocalPosition(e,2,0)}.bind(this),500)};var AlertHandler=pc.createScript("alertHandler"),Default_DelayTime=.5,Default_AnimationSpeed=10,Default_MinOpacity=0,Default_MaxOpacity=1,currentAlertDisplayTime=0,actualDelayTime=0,showTimePassed=0,delayTimePassed=0,alertIsShowing=!1,delayEnabled=!1,alertsQueue={},alertsQueueIndex=0,alertsProcessedIndex=0;function alert(e,t){this.text=e,this.displayTime=t}AlertHandler.prototype.init=function(){this.entity.element.text="",this.entity.element.opacity=0,this.app.on("leftGame",this.OnLeftGame,this)},AlertHandler.prototype.update=function(e){if(alertIsShowing){var t=this.entity.element.opacity;(showTimePassed+=e)>currentAlertDisplayTime?t>Default_MinOpacity?this.animateTextOut(e*Default_AnimationSpeed):(this.entity.element.text="",alertIsShowing=!1,this.entity.enabled=!0,showTimePassed=0,delayEnabled=!0):t<Default_MaxOpacity&&this.animateTextIn(e*Default_AnimationSpeed)}delayEnabled&&(delayTimePassed+=e)>Default_DelayTime&&(delayEnabled=!1,this.processAlertQueue())},AlertHandler.prototype.setAlert=function(e,t){var a=new alert(e,t);alertsQueue[alertsQueueIndex]=a,alertsQueueIndex++,this.processAlertQueue()},AlertHandler.prototype.displayAlert=function(e,t){var a=!alertIsShowing&&!delayEnabled;return a&&(this.entity.enabled=!0,this.entity.element.text=e.toUpperCase(),currentAlertDisplayTime=t,alertIsShowing=!0),a},AlertHandler.prototype.OnLeftGame=function(){this.clearAll()},AlertHandler.prototype.clearAll=function(){alertsQueue={},alertsQueueIndex=0,alertsProcessedIndex=0,alertIsShowing=!1,delayEnabled=!1,showTimePassed=0,currentAlertDisplayTime=0,actualDelayTime=0,showTimePassed=0,delayTimePassed=0,this.entity.element.text=""},AlertHandler.prototype.processAlertQueue=function(){Object.keys(alertsQueue).length>0?this.displayAlert(alertsQueue[alertsProcessedIndex].text,alertsQueue[alertsProcessedIndex].displayTime)&&(delete alertsQueue[alertsProcessedIndex],alertsProcessedIndex++):(alertsQueueIndex=0,alertsProcessedIndex=0)},AlertHandler.prototype.animateTextIn=function(e){this.entity.element.opacity=1},AlertHandler.prototype.animateTextOut=function(e){this.entity.element.opacity-=e};var DamageOverlayHelper=pc.createScript("damageOverlayHelper");DamageOverlayHelper.prototype.init=function(){this.Default_DisplayTime=.25,this.Default_AnimationSpeed=5,this.Default_MinOpacity=0,this.Default_MaxOpacity=.2,this.overlayEnabled=!1,this.showTimePassed=0,this.entity.element.opacity=0},DamageOverlayHelper.prototype.update=function(e){if(this.overlayEnabled){var t=this.entity.element.opacity;this.showTimePassed+=e,this.showTimePassed>this.Default_DisplayTime?t>this.Default_MinOpacity?this.animateTextOut(e*this.Default_AnimationSpeed):this.disableOverlay():t<this.Default_MaxOpacity&&this.animateTextIn(e*this.Default_AnimationSpeed)}},DamageOverlayHelper.prototype.enableOverlay=function(){this.overlayEnabled=!0,this.entity.enabled=!0},DamageOverlayHelper.prototype.disableOverlay=function(){this.overlayEnabled=!1,this.showTimePassed=0,this.entity.element.opacity=0,this.entity.enabled=!1},DamageOverlayHelper.prototype.animateTextIn=function(e){this.entity.element.opacity+=Math.sin(e)},DamageOverlayHelper.prototype.animateTextOut=function(e){this.entity.element.opacity-=Math.sin(e)};var RayHitIndicator=pc.createScript("rayHitIndicator");RayHitIndicator.attributes.add("lifetime",{type:"number",default:2,title:"Lifetime"}),RayHitIndicator.attributes.add("shouldFade",{type:"boolean",default:!1,title:"ShouldFade"}),RayHitIndicator.attributes.add("isInitialized",{type:"boolean",default:!1}),RayHitIndicator.prototype.show=function(t,i,a,s,e,o,n,d,l){if(this.timer=this.lifetime,!this.isInitialized){l.musicBundleAsset.ready((function(t){var i=this.app.assets.find("bullet_impact_rock_x5_0.5sec.mp3","audio"),a=this.entity.sound.slot("impact_rock");a.asset=i,a.duration=.5,i=this.app.assets.find("bullet_impact_dirt_x5_0.5sec.mp3","audio"),(a=this.entity.sound.slot("impact_dirt")).asset=i,a.duration=.5,i=this.app.assets.find("bullet_impact_glass_x5_0.5sec.mp3","audio"),(a=this.entity.sound.slot("impact_glass")).asset=i,a.duration=.5,i=this.app.assets.find("bullet_impact_flesh_x5_0.5sec.mp3","audio"),(a=this.entity.sound.slot("impact_flesh")).asset=i,a.duration=.5,i=this.app.assets.find("bullet_impact_metal_x5_0.5sec.mp3","audio"),(a=this.entity.sound.slot("impact_metal")).asset=i,a.duration=.5,i=this.app.assets.find("bullet_impact_wood_x5_0.5sec.mp3","audio"),(a=this.entity.sound.slot("impact_wood")).asset=i,a.duration=.5}),this),this.allowedToPlaySound=null!=this.entity.sound,this.lastRandomImpactSoundNumber=null,this.hitPosition=new pc.Vec3(0,0,0),this.hitRotation=new pc.Vec3(0,0,0),this.localPlayerCamera=d,this.isInitialized=!0}var c=pc.math.random(.06,.145);if(this.hitPosition.set(t,i,a),this.hitRotation.set(s,e,o),this.entity.setLocalScale(c,c,c),this.entity.setLocalEulerAngles(this.hitRotation),this.entity.setPosition(this.hitPosition),this.allowedToPlaySound)switch(n){case ObjectMaterials.material_dirt:this.playRandomImpactSound("impact_dirt",5);break;case ObjectMaterials.material_wood:this.playRandomImpactSound("impact_wood",5);break;case ObjectMaterials.material_metal:this.playRandomImpactSound("impact_metal",5);break;case ObjectMaterials.material_glass:this.playRandomImpactSound("impact_glass",5);break;case ObjectMaterials.material_rock:this.playRandomImpactSound("impact_rock",5);break;case ObjectMaterials.material_rope:this.playRandomImpactSound("impact_dirt",5);break;case ObjectMaterials.material_flesh:this.playRandomImpactSound("impact_flesh",5);break;default:this.playRandomImpactSound("impact_dirt",5)}this.enableIndicator()},RayHitIndicator.prototype.enableIndicator=function(){this.entity.enabled=!0,setTimeout(function(){this.disableIndicator()}.bind(this),1e3*this.lifetime)},RayHitIndicator.prototype.isIndicatorEnabled=function(){return this.entity.enabled},RayHitIndicator.prototype.disableIndicator=function(){this.entity.enabled=!1},RayHitIndicator.prototype.playRandomImpactSound=function(t,i){if(void 0!==this.localPlayerCamera&&this.localPlayerCamera.getPosition().distance(this.entity.getPosition())>this.entity.sound.maxDistance)return;var a=null;do{a=Math.floor(Math.random()*i)}while(a==this.lastRandomImpactSoundNumber);this.lastRandomImpactSoundNumber=a,soundEnabled&&(this.entity.sound.slots[t].startTime=a*this.entity.sound.slots[t].duration,this.entity.sound.slots[t].play())};var LeaderboardManager=pc.createScript("leaderboardManager");LeaderboardManager.attributes.add("elementsGroupEntity",{type:"entity",title:"Elements Group"}),LeaderboardManager.attributes.add("elementEntity",{type:"entity",title:"Element"}),LeaderboardManager.attributes.add("leaderboardTitleEntity",{type:"entity",title:"Leaderboard Title Entity"}),LeaderboardManager.attributes.add("scoreButtonPressed",{type:"boolean",default:!1});var fakePlayers={fakePlayer1:{id:"fakePlayer1",name:"PLAYER1",score:0,hasNewHighscore:!1,kills:0,deaths:0,potentialNames:["Rubble","Diablo","Sasquatch","Doom","Scar","Dracula","Shiver","Dragon","Skinner","Fender","Skull Crusher","Fester","Slasher","Fisheye","Steelshot","Flack","Surge","Gargoyle","Sythe","Grave","Trip","Gunner","Trooper","Tweek"]},fakePlayer2:{id:"fakePlayer2",name:"PLAYER2",score:0,hasNewHighscore:!1,kills:0,deaths:0,potentialNames:["Aspect","Kraken","Bender","Lynch","Big Papa","Mad Dog","Bowser","Bruise","Psycho","Cannon","Ranger","Clink","Ratchet","Cobra","Reaper","Colt","Rigs","Crank","Ripley","Creep","Roadkill","Daemon","Ronin","Decay"]}};function arrayRemoveByID(e,t){return e.filter((function(e){return e.id!=t.id}))}LeaderboardManager.prototype.init=function(e){this.rankManager=e,this.MaxPlayersInArena=10,this.IsArenaPrivate=!1,this.DefaultLeaderboardElementsNumber=10,this.isAllowedToShow=!1,this.players=null,this.localPlayerID=null,this.leaderboardElements=[],this.sortedPlayers=[],this.isLocalPlayerInTop10=!1,this.showLeaderboardDelayed=!1,this.delayedShowTimer=0,this.defaultDelay=2,this.isUsingGameOverOffset=!1;var t=this.elementEntity.script.leaderboardElementHelper;t.init(1),this.leaderboardElements[0]=t,this.leaderboardElementHeight=this.elementEntity.element.height,this.initialLeaderboardPosition=this.elementsGroupEntity.getLocalPosition().clone(),this.ingameYOffset=0,this.gameoverYOffset=40,this.fakePlayersIDs=Object.keys(fakePlayers),this.assignRandomNameToFakePlayers(),this.app.on("localPlayerInitialized",this.onLocalPlayerInitalized,this),this.app.on("playersUpdated",this.onPlayersUpdated,this),this.app.on("playerKilled",this.onPlayerKilled,this),this.app.on("respawn",this.onPlayerRespawned,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("killMade",this.onKillMade,this),this.app.on("confirmBulletHit",this.onConfirmBulletHit,this),this.app.on("confirmRayHitPlayer",this.onConfirmRayHit,this),this.app.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.keyboard.on(pc.EVENT_KEYDOWN,this.onKeyDown,this),this.app.keyboard.on(pc.EVENT_KEYUP,this.onKeyUp,this),MobileController.instance.active&&MobileController.instance.on("leaderboard",this.showLeaderboard,this),this.on("attr:scoreButtonPressed",(function(e,t){!0===e?this.Show(!1):this.Hide()}),this)},LeaderboardManager.prototype.showLeaderboard=function(e){this.scoreButtonPressed=e},LeaderboardManager.prototype.onKeyDown=function(e){e.key!==pc.KEY_TAB||isChatModeEnabled||(e.event.preventDefault(),this.isAllowedToShow&&(this.scoreButtonPressed=!0,this.app.fire("scoreboardUIActive",!0)))},LeaderboardManager.prototype.onKeyUp=function(e){e.key===pc.KEY_TAB&&(e.event.preventDefault(),this.isAllowedToShow&&(this.scoreButtonPressed=!1,this.app.fire("scoreboardUIActive",!1)))},LeaderboardManager.prototype.onLocalPlayerInitalized=function(e,t,a,r,i){this.isAllowedToShow=!0,i.maxPlayersInArena&&(this.MaxPlayersInArena=i.maxPlayersInArena,this.DefaultLeaderboardElementsNumber>this.MaxPlayersInArena&&(this.DefaultLeaderboardElementsNumber=this.MaxPlayersInArena)),null!==i.isArenaPrivate&&void 0!==i.isArenaPrivate&&(this.IsArenaPrivate=i.isArenaPrivate)},LeaderboardManager.prototype.onPlayersUpdated=function(e,t,a){null!=t&&null!=e&&(this.players=t,this.localPlayerID=e,this.updateLeaderboard())},LeaderboardManager.prototype.onSessionStarted=function(){generateRandomNumber()>.7&&this.assignRandomNameToFakePlayers(),this.sortedPlayers=[],this.isAllowedToShow=!0,this.lastScoreboardPosition=0},LeaderboardManager.prototype.onCooldownStarted=function(e,t,a,r){this.sortedPlayers=[],this.players=r,this.updateLeaderboard(),this.Show(!0),this.isAllowedToShow=!1,this.lastScoreboardPosition=0},LeaderboardManager.prototype.onPlayerRespawned=function(e,t){t&&(this.Hide(),this.isAllowedToShow=!0)},LeaderboardManager.prototype.onPlayerKilled=function(){this.Show(!0),this.isAllowedToShow=!1},LeaderboardManager.prototype.onKillMade=function(e,t,a,r){null!=this.players&&null!=this.localPlayerID&&(null!=this.players[t.id]&&(this.players[t.id]=t),null!=this.players[e.id]&&(this.players[e.id]=e),this.updateLeaderboard())},LeaderboardManager.prototype.onConnectionLost=function(){this.Hide(),this.isAllowedToShow=!1},LeaderboardManager.prototype.onLeftGame=function(){this.Hide(),this.sortedPlayers=[],this.isAllowedToShow=!1},LeaderboardManager.prototype.onConfirmBulletHit=function(e,t,a,r,i,s){if(null!=this.players&&null!=this.localPlayerID){var o=this.players[t];null!=o&&(o.score=s),this.updateLeaderboard()}},LeaderboardManager.prototype.onConfirmRayHit=function(e,t,a,r,i,s,o){if(null!=this.players&&null!=this.localPlayerID){var n=this.players[t];null!=n&&(n.score=o),this.updateLeaderboard()}},LeaderboardManager.prototype.onEnemyPlayerDisconnected=function(e){this.sortedPlayers=[];var t=this.players[e.id];t&&(t=e,this.updateLeaderboard())},LeaderboardManager.prototype.Show=function(e){if(this.entity.enabled=!0,e&&!this.isUsingGameOverOffset){var t=this.elementsGroupEntity.getLocalPosition();this.elementsGroupEntity.setLocalPosition(t.x,t.y+this.gameoverYOffset,t.z),this.isUsingGameOverOffset=!0}this.leaderboardTitleEntity.element.text="LEADERBOARD"},LeaderboardManager.prototype.Hide=function(){if(this.entity.enabled=!1,this.isUsingGameOverOffset){var e=this.elementsGroupEntity.getLocalPosition();this.elementsGroupEntity.setLocalPosition(e.x,e.y-this.gameoverYOffset,e.z),this.isUsingGameOverOffset=!1}},LeaderboardManager.prototype.updateLeaderboard=function(){if(null!==this.players&&void 0!==this.players&&(this.sortedPlayers=[],Object.keys(this.players).length>0)){var e=0;for(var t in this.players){var a=this.players[t];if(a.isConnected){if(this.sortedPlayers[e]=a,e>=this.leaderboardElements.length&&this.leaderboardElements.length<this.DefaultLeaderboardElementsNumber){var r=this.elementEntity.clone();r.script.leaderboardElementHelper.init(e+1),this.elementsGroupEntity.addChild(r),this.leaderboardElements[e]=r.script.leaderboardElementHelper}e++}}if(!this.IsArenaPrivate)if(this.sortedPlayers.length<this.MaxPlayersInArena){for(var s in fakePlayers)if(e<this.MaxPlayersInArena){var o=fakePlayers[s],n=!1;for(const e of this.sortedPlayers)if(o.id===e.id){n=!0;break}if(!n){if(this.sortedPlayers[e]=o,e>=this.leaderboardElements.length&&this.leaderboardElements.length<this.DefaultLeaderboardElementsNumber){var l=this.elementEntity.clone();l.script.leaderboardElementHelper.init(e+1),this.elementsGroupEntity.addChild(l),this.leaderboardElements[e]=l.script.leaderboardElementHelper}e++}}}else{for(const e of this.sortedPlayers)this.fakePlayersIDs.includes(e.id)&&0;if(this.sortedPlayers.length>this.MaxPlayersInArena)for(var d in fakePlayers)this.sortedPlayers=arrayRemoveByID(this.sortedPlayers,fakePlayers[d]),e=this.sortedPlayers.length}this.sortedPlayers.sort((function(e,t){var a=e.score,r=t.score,i=e.kills,s=t.kills,o=e.deaths,n=t.deaths;return a===r?i===s?o-n:s-i:r-a})),this.app.fire("topPlayerChanged",this.sortedPlayers[0]);var h=-1;for(i=0;i<this.sortedPlayers.length;i++)if(null!=this.localPlayerID&&this.sortedPlayers[i].id===this.localPlayerID){h=i,this.isLocalPlayerInTop10=h<this.DefaultLeaderboardElementsNumber;break}for(this.sortedPlayers[h].score>0&&(this.lastScoreboardPosition!=h&&0==h?this.app.fire("VOS_trigger",VOEvents.leadTaken):0==this.lastScoreboardPosition&&0!=h&&this.app.fire("VOS_trigger",VOEvents.leadLost)),this.lastScoreboardPosition=h,this.app.fire("VOS_leaderboardPosition",h),i=0;i<this.leaderboardElements.length;i++)if(i<this.sortedPlayers.length){var y=i+1,p=this.sortedPlayers[i];this.isLocalPlayerInTop10||i!==this.DefaultLeaderboardElementsNumber-1||(y=h+1),y===h+1&&p.hasNewHighscore&&this.app.fire("VOS_setHasNewHighScore"),this.leaderboardElements[i].show(y,p.name,p.score,p.kills,p.deaths,y===h+1,p.hasNewHighscore,this.rankManager.GetRank(p.totalRankPoints),p.currency1ForRound)}else this.leaderboardElements[i].hide();var c=this.isUsingGameOverOffset?this.initialLeaderboardPosition.y+this.gameoverYOffset:this.initialLeaderboardPosition.y;c+=e*this.leaderboardElementHeight/2,this.elementsGroupEntity.setLocalPosition(this.initialLeaderboardPosition.x,c,this.initialLeaderboardPosition.z)}},LeaderboardManager.prototype.assignRandomNameToFakePlayers=function(){for(var e in fakePlayers){var t=fakePlayers[e],a=fakePlayers[e].potentialNames,r=generateRandomNumber(),i=a[Math.floor(r*a.length)];t.name=i.toUpperCase()}};var ProjectileExplosion=pc.createScript("projectileExplosion"),playerFiredProjectileID="",isLocalPlayer=!1,doSplashDamage=!0;ProjectileExplosion.attributes.add("isInitialized",{type:"boolean",default:!1}),ProjectileExplosion.attributes.add("effectController",{type:"entity"}),ProjectileExplosion.prototype.show=function(t,e,i,s,o,a,n,l,r){this.playerFiredProjectileID=i,this.doSplashDamage=e,this.isLocalPlayer=s,this.playerHitID=o,this.collisionTimer=.15,this.tempDamage=0,this.tempDistance=0,this.isInitialized||(r.musicBundleAsset.ready((function(t){var e=this.app.assets.find("rocket_launcher_explosion_x2_1.5sec.mp3","audio"),i=this.entity.sound.slot("explosion");i.asset=e,i.duration=1.5,e=this.app.assets.find("rocket_launcher_explosion_distant_x2_2sec.mp3","audio");var s=this.entity.sound.slot("explosion_distant");s.asset=e,s.duration=2}),this),this.entity.collision.on("triggerenter",this.onTriggerEnter,this),this.localPlayerCamera=a,this.hitPosition=new pc.Vec3,this.allowedToPlaySound=null!=this.entity.sound,this.isInitialized=!0),this.hitPosition.set(t.x,t.y,t.z),this.entity.setPosition(this.hitPosition),this.collisionEnabled=!0,this.entity.collision.enabled=!0;var p=this.localPlayerCamera.getPosition(),c=this.entity.getPosition(),h=p.distance(c);if(this.allowedToPlaySound&&soundEnabled){var d=pc.math.clamp(h,0,60)/60;switch(this.entity.sound.slots.explosion.startTime=Math.floor(2*Math.random())*this.entity.sound.slots.explosion.duration,this.entity.sound.slots.explosion.volume=1-d,this.entity.sound.slots.explosion.play(),this.entity.sound.slots.explosion_distant.startTime=Math.floor(2*Math.random())*this.entity.sound.slots.explosion_distant.duration,this.entity.sound.slots.explosion_distant.volume=d,this.entity.sound.slots.explosion_distant.play(),n){case ObjectMaterials.material_dirt:case ObjectMaterials.material_wood:case ObjectMaterials.material_metal:case ObjectMaterials.material_glass:case ObjectMaterials.material_rock:case ObjectMaterials.material_rope:case ObjectMaterials.material_flesh:}}this.enableIndicator(),this.effectController.script.effectController.startRocketImpact(n,c,l)},ProjectileExplosion.prototype.update=function(t){this.collisionEnabled&&(this.collisionTimer>0?this.collisionTimer-=t:(this.collisionEnabled=!1,this.entity.collision.enabled=!1))},ProjectileExplosion.prototype.onTriggerEnter=function(t){if(null===this.playerHitID&&null!==t&&t.name.includes("TriggerDetector")&&this.isLocalPlayer){var e=t.parent.script.playerManager.hitDetectorEntity.script.playerHitDetector;if(e.playerID!==this.playerFiredProjectileID&&e.currentHealth>0&&this.doSplashDamage){var i=this.entity.getPosition();this.tempDistance=t.getPosition().distance(i),this.tempDamage=Math.ceil(50*(1-this.tempDistance/6)),this.app.fire("rayHitPlayer",e.playerID,this.playerFiredProjectileID,this.tempDamage,i,null,Weapons.RocketLauncher)}if(e.playerID===this.playerFiredProjectileID){var s=t.parent.getPosition().sub(this.entity.getPosition());if(s.length()>0){var o=s.normalize(),a=t.parent.script.modelMovement;if(a.IsAnyJumpActive()||a.IsInAir()||t.parent.script.modelMovement.IsInWater()){o.scale(2e3);t.parent.rigidbody.applyImpulse(o),t.parent.script.modelMovement.UpdateRocketJumpingState(!0)}else{o.scale(5500);o.y<0&&(o.y=0),t.parent.rigidbody.applyImpulse(o),t.parent.script.modelMovement.UpdateRocketJumpingState(!0),this.app.fire("VOS_trigger",VOEvents.rocketJumpInAir)}}}}null!==t&&t.name.includes("NPC")&&this.isLocalPlayer&&t.script.npcMovement.currentHealth>0&&this.doSplashDamage&&(this.tempDistance=t.getPosition().distance(this.entity.getPosition()),this.tempDamage=Math.ceil(40*(1-this.tempDistance/3)),this.app.fire("rayHitNpc",t.script.npcMovement.id,this.tempDamage,this.playerFiredProjectileID,null,null))},ProjectileExplosion.prototype.enableIndicator=function(){this.entity.enabled=!0},ProjectileExplosion.prototype.isIndicatorEnabled=function(){return this.entity.enabled},ProjectileExplosion.prototype.disableIndicator=function(){this.entity.setPosition(pc.Vec3.ZERO),setTimeout(function(){this.entity.enabled=!1}.bind(this),2e3)};var TotalPlayersHelper=pc.createScript("totalPlayersHelper");TotalPlayersHelper.attributes.add("background",{type:"entity",title:"Background"}),TotalPlayersHelper.prototype.init=function(e){this.MaxPlayersInArena=e,this.IsArenaPrivate=!1,this.element=this.entity.element,this.initialBackgroundWidth=this.background.element.width,this.characterWidth=this.element.fontSize/2,this.localPlayerID=void 0,this.players={},this.numberOfFakePlayers=Object.keys(fakePlayers).length,this.app.on("playersUpdated",this.OnPlayersUpdated,this),this.app.on("respawn",this.onRespawnGranted,this),this.app.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.on("killMade",this.onKillMade,this)},TotalPlayersHelper.prototype.config=function(e){e.maxPlayersInArena&&(this.MaxPlayersInArena=e.maxPlayersInArena),null!==e.isArenaPrivate&&void 0!==e.isArenaPrivate&&(this.IsArenaPrivate=e.isArenaPrivate)},TotalPlayersHelper.prototype.onRespawnGranted=function(e,t){void 0!==this.localPlayerID&&null!=this.players[e.id]&&(this.players[e.id]=e,this.updateLabel())},TotalPlayersHelper.prototype.onEnemyPlayerDisconnected=function(e){void 0!==this.localPlayerID&&null!=this.players[e.id]&&(this.players[e.id]=e,this.updateLabel())},TotalPlayersHelper.prototype.OnPlayersUpdated=function(e,t,a){null!==t&&(this.localPlayerID=e,this.players=t,this.updateLabel())},TotalPlayersHelper.prototype.onKillMade=function(e,t,a,l){null!=this.players&&null!=this.localPlayerID&&(null!=this.players[t.id]&&(this.players[t.id]=t),null!=this.players[e.id]&&(this.players[e.id]=e),this.updateLabel())},TotalPlayersHelper.prototype.updateLabel=function(){var e=0;for(var t in this.players)this.players[t].isConnected&&e++;this.IsArenaPrivate||e<this.MaxPlayersInArena&&(e<this.MaxPlayersInArena-this.numberOfFakePlayers?e+=this.numberOfFakePlayers:e+=this.MaxPlayersInArena-e),this.element.text=1==e?e+" Player":e+" Players";var a=this.element.text.length>0?this.element.text.length-1:this.element.text.length,l=this.initialBackgroundWidth+a*this.characterWidth;null!=l&&this.background.element.width};var WeaponPickupPoint=pc.createScript("weaponPickupPoint");WeaponPickupPoint.attributes.add("weaponIndex",{type:"number",default:1,title:"Weapon Enum Value"}),WeaponPickupPoint.attributes.add("weaponEntity",{type:"entity",title:"Weapon Model Entity"}),WeaponPickupPoint.attributes.add("glowCylinder",{type:"entity",title:"GlowCylinder"}),WeaponPickupPoint.attributes.add("pickupPointID",{type:"number",title:"PickupPointID"}),WeaponPickupPoint.prototype.init=function(e){this.isSpawned=!0,this.weaponModelLoaded=!1,this.cylinderModelLoaded=!1,this.entity.collision.on("triggerenter",this.onTriggerEnter,this),this.app.on("localPlayerInitialized",this.onLocalPlayerInitialized,this),this.app.on("refreshPickupPoint",this.onRefreshPickupPoint,this),this.lightBeamMapOffset=new pc.Vec2(0,0),this.timer=0,e.modelFileAssetsToLoad[this.weaponModelAssetName].ready((function(t){var i=this.weaponModelAssetName;this.weaponEntity.model.asset=t,this.weaponEntity.model.meshInstances[0].material=this.weaponEntity.model.meshInstances[0].material.clone(),e.modelFileAssetsLoaded.includes(i)||(e.initialAssetsLoaded++,e.totalAssetsLoaded++,e.modelFileAssetsLoaded.push(i)),this.weaponModelLoaded=!0}),this),e.modelFileAssetsToLoad[this.cylinderModelAssetName].ready((function(t){var i=this.cylinderModelAssetName;switch(this.glowCylinder.model.asset=t,this.glowCylinder.model.material=this.glowCylinder.model.material.clone(),this.activeGlowColor=pc.Color.BLACK,this.weaponIndex){case Weapons.Rifle:this.activeGlowColor=rifleGlowColor;break;case Weapons.Shotgun:this.activeGlowColor=shotgunGlowColor;break;case Weapons.Minigun:this.activeGlowColor=minigunGlowColor;break;case Weapons.RocketLauncher:this.activeGlowColor=missileGlowColor;break;case Weapons.Uzi:this.activeGlowColor=uziGlowColor}this.glowCylinder.model.material.diffuse=this.activeGlowColor,this.glowCylinder.model.material.update(),e.modelFileAssetsLoaded.includes(i)||(e.totalAssetsLoaded++,e.modelFileAssetsLoaded.push(i)),this.cylinderModelLoaded=!0}),this),this.isInitialized=!0},WeaponPickupPoint.prototype.update=function(e){this.isInitialized&&this.weaponModelLoaded&&this.cylinderModelLoaded&&(this.weaponEntity.rotateLocal(0,100*e,0),this.isSpawned&&(this.lightBeamMapOffset.x-=.03*e,this.lightBeamMapOffset.y-=.04*e,this.timer+=2*e,this.glowCylinder.model.material.emissiveIntensity=.2+Math.sin(this.timer)/10,this.glowCylinder.model.material.update()))},WeaponPickupPoint.prototype.onRefreshPickupPoint=function(e,t){e===this.pickupPointID&&(t?this.spawn():this.despawn())},WeaponPickupPoint.prototype.onLocalPlayerInitialized=function(e,t,i,o,n){n.inactiveWeaponPickupPoints&&(Object.keys(n.inactiveWeaponPickupPoints).includes(this.pickupPointID.toString())?this.despawn():this.spawn())},WeaponPickupPoint.prototype.onTriggerEnter=function(e){if(this.isSpawned&&!this.isRespawning&&null!==e&&e.name.includes("TriggerDetector")){var t=e.parent.script.playerManager;null!=t&&t.isLocalPlayer&&(this.despawn(),this.app.fire("weaponPickedUp",t.playerID,this.weaponIndex,this.pickupPointID))}},WeaponPickupPoint.prototype.spawn=function(){this.isSpawned=!0,this.weaponEntity.model.meshInstances[0].material.blendType=pc.BLEND_NONE,this.weaponEntity.model.meshInstances[0].material.opacity=1,this.weaponEntity.model.meshInstances[0].material.update(),this.glowCylinder.enabled=!0},WeaponPickupPoint.prototype.despawn=function(){this.weaponEntity.model.meshInstances[0].material.blendType=pc.BLEND_NORMAL,this.weaponEntity.model.meshInstances[0].material.opacity=.2,this.weaponEntity.model.meshInstances[0].material.update(),this.glowCylinder.enabled=!1,this.isSpawned=!1},WeaponPickupPoint.prototype.getWeaponModelAssetName=function(){switch(this.weaponModelAssetName="",this.weaponIndex){case Weapons.Rifle:this.weaponModelAssetName="rifle_long.glb";break;case Weapons.Shotgun:this.weaponModelAssetName="shotgun_double_long.glb";break;case Weapons.Minigun:this.weaponModelAssetName="tommygun.glb";break;case Weapons.RocketLauncher:this.weaponModelAssetName="rocket_launcher.glb";break;case Weapons.Uzi:this.weaponModelAssetName="mac-10.glb"}return this.weaponModelAssetName},WeaponPickupPoint.prototype.getCylinderModelAssetName=function(){return this.cylinderModelAssetName="cyl.json",this.cylinderModelAssetName};var WeaponAmmoHelper=pc.createScript("weaponAmmoHelper");WeaponAmmoHelper.attributes.add("ammoIconEntity",{type:"entity",title:"Ammo Icon"}),WeaponAmmoHelper.attributes.add("shadowAmmoIconEntity",{type:"entity",title:"Shadow Ammo Icon"}),WeaponAmmoHelper.attributes.add("infiniteAmmoEntity",{type:"entity",title:"Infinite Ammo Icon"}),WeaponAmmoHelper.attributes.add("ammoSprites",{type:"asset",assetType:"sprite",array:!0,title:"Ammo Sprites"}),WeaponAmmoHelper.prototype.init=function(){this.element=this.entity.element,this.parentLayoutGroup=this.entity.parent.layoutgroup,this.ammoIconElement=this.ammoIconEntity.element,this.shadowAmmoIconElement=this.shadowAmmoIconEntity.element,this.pistolAmmoIcon=null,this.rifleAmmoIcon=null,this.shotgunAmmoIcon=null,this.minigunAmmoIcon=null,this.missileAmmoIcon=null,this.bowAmmoIcon=null,this.fireAmmoIcon=null,this.uziAmmoIcon=null,this.element.text="",this.activeWeapon=null,this.infiniteAmmoEntity.enabled=!0,this.infiniteAmmoGroupSpacing=new pc.Vec2(5,0),this.regularAmmoGroupSpacing=new pc.Vec2(10,0),this.app.on("weaponSwitched",this.onWeaponSwitched,this),this.app.on("weaponAmmoAmountChanged",this.onWeaponAmmoAmountChanged,this),this.app.on("weaponAmmoSwitched",this.onWeaponAmmoAmountChanged,this),this.on("destroy",this.onDestroy,this);var t=this.entity.script.assetAssigner;t&&t.on("assetsLoadedFinished",this.onAssetsLoaded,this)},WeaponAmmoHelper.prototype.onAssetsLoaded=function(){this.pistolAmmoIcon=this.ammoSprites[0].resource,this.rifleAmmoIcon=this.ammoSprites[0].resource,this.shotgunAmmoIcon=this.ammoSprites[1].resource,this.minigunAmmoIcon=this.ammoSprites[0].resource,this.missileAmmoIcon=this.ammoSprites[2].resource,this.bowAmmoIcon=this.ammoSprites[0].resource,this.fireAmmoIcon=this.ammoSprites[0].resource,this.uziAmmoIcon=this.ammoSprites[0].resource},WeaponAmmoHelper.prototype.onWeaponSwitched=function(t,o){switch(this.activeWeapon=o,o!==Weapons.Pistols?this.infiniteAmmoEntity.enabled=!1:this.infiniteAmmoEntity.enabled=!0,o){case Weapons.Pistols:this.ammoIconElement.sprite=this.pistolAmmoIcon,this.shadowAmmoIconElement.sprite=this.pistolAmmoIcon;break;case Weapons.Rifle:this.ammoIconElement.sprite=this.rifleAmmoIcon,this.shadowAmmoIconElement.sprite=this.rifleAmmoIcon;break;case Weapons.Shotgun:this.ammoIconElement.sprite=this.shotgunAmmoIcon,this.shadowAmmoIconElement.sprite=this.shotgunAmmoIcon;break;case Weapons.Minigun:this.ammoIconElement.sprite=this.minigunAmmoIcon,this.shadowAmmoIconElement.sprite=this.minigunAmmoIcon;break;case Weapons.RocketLauncher:this.ammoIconElement.sprite=this.missileAmmoIcon,this.shadowAmmoIconElement.sprite=this.missileAmmoIcon;break;case Weapons.Bow:this.ammoIconElement.sprite=this.bowAmmoIcon,this.shadowAmmoIconElement.sprite=this.bowAmmoIcon;break;case Weapons.Flamer:this.ammoIconElement.sprite=this.fireAmmoIcon,this.shadowAmmoIconElement.sprite=this.fireAmmoIcon;break;case Weapons.Uzi:this.ammoIconElement.sprite=this.uziAmmoIcon,this.shadowAmmoIconElement.sprite=this.uziAmmoIcon}},WeaponAmmoHelper.prototype.onWeaponAmmoAmountChanged=function(t){t.weaponType===this.activeWeapon&&(t.weaponType===Weapons.Pistols?(this.parentLayoutGroup.spacing.x!==this.infiniteAmmoGroupSpacing.x&&(this.parentLayoutGroup.spacing=this.infiniteAmmoGroupSpacing),this.element.text="",this.element.autoWidth=!1,this.element.width=0):(this.parentLayoutGroup.spacing.x!==this.regularAmmoGroupSpacing.x&&(this.parentLayoutGroup.spacing=this.regularAmmoGroupSpacing),this.element.autoWidth=!0,this.element.text=""+t.ammo))},WeaponAmmoHelper.prototype.onDestroy=function(){this.app.off("weaponSwitched",this.onWeaponSwitched,this),this.app.off("weaponAmmoAmountChanged",this.onWeaponAmmoAmountChanged,this),this.app.off("weaponAmmoSwitched",this.onWeaponAmmoAmountChanged,this)};var UiController=pc.createScript("uiController");UiController.attributes.add("popupControllerEntity",{type:"entity",title:"Popup Controller"}),UiController.attributes.add("preloadScreenEntity",{type:"entity",title:"Pre Load Screen"}),UiController.attributes.add("homeScreenEntity",{type:"entity",title:"Home Screen"}),UiController.attributes.add("loadingScreenEntity",{type:"entity",title:"Loading Screen"}),UiController.attributes.add("inGameScreenEntity",{type:"entity",title:"In Game Screen"}),UiController.attributes.add("gameOverScreenEntity",{type:"entity",title:"Game Over Screen"}),UiController.attributes.add("sessionTimerManagerEntity",{type:"entity",title:"Session Timer Manager"}),UiController.attributes.add("leaderboard",{type:"entity",title:"Leaderboard"}),UiController.attributes.add("alertHandlerEntity",{type:"entity",title:"In Game Alert Handler"}),UiController.attributes.add("chatControllerEntity",{type:"entity",title:"Chat Controller"}),UiController.attributes.add("killFeedControllerEntity",{type:"entity",title:"Kill Feed Controller"}),UiController.attributes.add("orientationOverlayEntity",{type:"entity",title:"Orientation Overlay Controller"}),UiController.attributes.add("introViewCameraEntity",{type:"entity",title:"Intro View Camera"});var UIScreenTypes={PreloadScreen:1,HomeScreen:2,InGameScreen:3,GameOverScreen:4,GlobalLeaderboardsScreen:5,LoadingScreen:6},UIPopupTypes={AboutPopup:1,PrivateArenaPopup:2,GlobalLeaderboardsPopup:3,LogInPopup:4,UserIDPopup:5,RanksPopup:6,SettingsPopup:7,HatsPopup:8,OutfitsPopup:9,EarnedCurrencyPopup:10};UiController.prototype.init=function(e,t,n,r,i,s,o,a,l,c,h,p){this.isInFullScreen=!1,this.previousScreen=null,this.activeScreen=null,this.gameOverHeaders=["WHOA!","OUCH!","YIKES!","OOPS!"],this.localPlayerName=null,this.hasEnabledMultiScreenElements=!1,this.cacheReferences(e,t,n,r,i,s,o,a,l,c,h,p),this.disableReferences(),this.initializeReferences(),this.defaultUIScreenMarginToUse=new pc.Vec4(-10,-10,-10,-10);var S=notchLeftSize>0?notchLeftSize+10:notchLeftSize,d=notchRightSize>0?notchRightSize+10:notchRightSize;this.customUIScreenMarginToUse=new pc.Vec4(S,-10,d,-10),this.homeIntroViewCameraRotation=this.introViewCameraEntity.getLocalRotation(),this.globalLeaderboardsIntroViewCameraRotation=new pc.Vec3(0,65,.03),this.app.keyboard.on(pc.EVENT_KEYUP,this.onKeyUp,this);var m=this;switch("onpointerlockchange"in document?isSafari||document.addEventListener("pointerlockchange",(e=>{m.pointerLockStatusChange(e)})):"onmozpointerlockchange"in document&&document.addEventListener("mozpointerlockchange",(e=>{m.pointerLockStatusChange(e)})),this.app.on("uiController:showScreen",this.showScreen,this),this.app.on("notchValuesUpdated",this.onNotchValuesUpdated,this),this.app.on("localPlayerInitialized",this.onLocalPlayerInitalized,this),this.app.on("localPlayerSpawned",this.onLocalPlayerSpawned,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("playerKilled",this.onPlayerKilled,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("enemyPlayerJoined",this.onEnemyPlayerJoined,this),this.app.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.on("killMade",this.onKillMade,this),this.app.on("shootingStopped",this.onShootingStopped,this),this.app.on("mouseSensitivityChanged",this.onMouseSensitivityChanged,this),this.app.on("windowGainedFocus",this.onWindowGainedFocus,this),this.app.on("VO_text_trigger",this.onVoiceOverText,this),this.app.on("firebaseInitialized",this.onFirebaseInitialized,this),this.adsManager.on("minAdShowTimePassed",this.onMinAdShowTimePassed,this),this.loadAssetManagerScript.on("assetsDoneLoading",this.onAssetsDoneLoading,this),this.assetsDoneLoading=this.loadAssetManagerScript.isInitialAssetLoadingComplete(),this.firebaseInitialized=this.firebase.isInitialized(),this.hasMinAdShowTimePassed=this.adsManager.hasMinAdShowTimePassed(),this.globalsControllerScript.deployPlatform){case DeployPlatforms.all_except_facebook:this.assetsDoneLoading&&this.firebaseInitialized&&this.hasMinAdShowTimePassed?this.showScreen(UIScreenTypes.HomeScreen,null):this.showScreen(UIScreenTypes.LoadingScreen,{loadingScreenType:LoadingScreenStates.waitForAssetsToLoad});break;case DeployPlatforms.facebook:this.showScreen(UIScreenTypes.LoadingScreen,{loadingScreenType:LoadingScreenStates.waitForFirebaseInit})}},UiController.prototype.cacheReferences=function(e,t,n,r,i,s,o,a,l,c,h,p){this.popupController=this.popupControllerEntity.script.popupController,this.preloadScreen=this.preloadScreenEntity.script.preloadScreen,this.homeScreen=this.homeScreenEntity.script.homeScreen,this.loadingScreen=this.loadingScreenEntity.script.loadingScreen,this.inGameScreen=this.inGameScreenEntity.script.inGameScreen,this.gameOverScreen=this.gameOverScreenEntity.script.gameOverScreen,this.leaderBoard=this.leaderboard.script.leaderboardManager,this.sessionTimerManager=this.sessionTimerManagerEntity.script.sessionTimerManager,this.alertHandler=this.alertHandlerEntity.script.alertHandler,this.chatController=this.chatControllerEntity.script.chatController,this.killFeedController=this.killFeedControllerEntity.script.killFeedController,this.orientationOverlay=this.orientationOverlayEntity.script.orientationOverlay,this.storageManagerScript=t,this.globalsControllerScript=e,this.loadAssetManagerScript=n,this.globalLeaderboardsManagerScript=r,this.introCameraManager=this.introViewCameraEntity.script.cameraManager,this.musicManagerScript=i,this.firebase=s,this.rankManagerScript=o,this.itemDataManagerScript=a,this.statsManager=l,this.currencyManager=c,this.purchaseManager=h,this.adsManager=p},UiController.prototype.disableReferences=function(){this.popupController.entity.enabled=!1,this.preloadScreen.entity.enabled=!1,this.homeScreen.entity.enabled=!1,this.loadingScreen.entity.enabled=!1,this.inGameScreen.entity.enabled=!1,this.gameOverScreen.entity.enabled=!1,this.leaderBoard.entity.enabled=!1,this.sessionTimerManager.entity.enabled=!1,this.alertHandler.entity.enabled=!1,this.introCameraManager.entity.enabled=!1},UiController.prototype.initializeReferences=function(){this.sessionTimerManager.init(),this.popupController.init(this.loadAssetManagerScript,this.storageManagerScript,this.firebase,this.rankManagerScript,this.musicManagerScript,this.globalLeaderboardsManagerScript,this.itemDataManagerScript,this.currencyManager,this.purchaseManager),this.preloadScreen.init(this.globalsControllerScript,this.storageManagerScript,this.loadAssetManagerScript,this.popupController,this.firebase),this.loadingScreen.init(this.loadAssetManagerScript,this.firebase,this.adsManager),this.homeScreen.init(this.globalsControllerScript,this.storageManagerScript,this.loadAssetManagerScript,this.popupController,this.globalLeaderboardsManagerScript,this.musicManagerScript,this.firebase,this.rankManagerScript,this.itemDataManagerScript,this.statsManager,this.currencyManager),this.inGameScreen.init(this.globalsControllerScript,this.storageManagerScript,this.rankManagerScript,this.firebase,this.popupController),this.gameOverScreen.init(this.sessionTimerManager,this.loadAssetManagerScript,this.musicManagerScript,this.rankManagerScript,this.firebase),this.leaderBoard.init(this.rankManagerScript),this.alertHandler.init(),this.chatController.init(7,15),this.killFeedController.init(5,5),this.orientationOverlay.init(),this.introCameraManager.init()},UiController.prototype.showScreen=function(e,t){null!==this.activeScreen&&(this.hideScreen(this.activeScreen,e),this.previousScreen=this.activeScreen),SettingsPopupIsShowing&&this.popupController.hidePopup(UIPopupTypes.SettingsPopup),this.activeScreen=e,this.handleScreenTransition(this.previousScreen,this.activeScreen,t),this.app.fire("uiScreenShown",this.activeScreen)},UiController.prototype.hideScreen=function(e,t){switch(e){case UIScreenTypes.PreloadScreen:this.preloadScreen.entity.enabled=!1,this.preloadScreen.hide(t);break;case UIScreenTypes.HomeScreen:this.homeScreen.entity.enabled=!1,this.homeScreen.hide(t);break;case UIScreenTypes.LoadingScreen:this.loadingScreen.entity.enabled=!1,this.loadingScreen.hide(t);break;case UIScreenTypes.InGameScreen:this.inGameScreen.entity.enabled=!1,this.inGameScreen.hide(t);break;case UIScreenTypes.GameOverScreen:this.gameOverScreen.entity.enabled=!1,this.gameOverScreen.hide(t)}},UiController.prototype.handleScreenTransition=function(e,t,n){t===UIScreenTypes.PreloadScreen||t===UIScreenTypes.HomeScreen?(this.introCameraManager.enable(),this.onScreenTransitionEnded(t,n)):(this.introCameraManager.disable(),this.onScreenTransitionEnded(t,n))},UiController.prototype.onScreenTransitionEnded=function(e,t){var n=notchLeftSize>0?notchLeftSize+10:notchLeftSize,r=notchRightSize>0?notchRightSize+10:notchRightSize;switch(this.customUIScreenMarginToUse.set(n,-16,r,-16),e){case UIScreenTypes.PreloadScreen:this.preloadScreen.entity.enabled=!0,this.preloadScreen.entity.element.margin=this.customUIScreenMarginToUse,this.preloadScreen.show(this.previousScreen,t);break;case UIScreenTypes.HomeScreen:this.homeScreen.entity.enabled=!0,this.homeScreen.entity.element.margin=this.customUIScreenMarginToUse,this.homeScreen.show(this.previousScreen,t);break;case UIScreenTypes.LoadingScreen:this.loadingScreen.entity.enabled=!0,this.loadingScreen.entity.element.margin=this.defaultUIScreenMarginToUse,this.loadingScreen.show(this.previousScreen,t);break;case UIScreenTypes.InGameScreen:this.inGameScreen.entity.enabled=!0,this.inGameScreen.entity.element.margin=this.customUIScreenMarginToUse,this.inGameScreen.show(this.previousScreen,t);break;case UIScreenTypes.GameOverScreen:this.gameOverScreen.entity.enabled=!0,this.gameOverScreen.entity.element.margin=this.customUIScreenMarginToUse,this.gameOverScreen.show(this.previousScreen,t)}},UiController.prototype.onNotchValuesUpdated=function(){var e=notchLeftSize>0?notchLeftSize+10:notchLeftSize,t=notchRightSize>0?notchRightSize+10:notchRightSize;switch(this.customUIScreenMarginToUse.set(e,-16,t,-16),this.activeScreen){case UIScreenTypes.PreloadScreen:this.preloadScreen.entity.element.margin=this.customUIScreenMarginToUse;break;case UIScreenTypes.HomeScreen:this.homeScreen.entity.element.margin=this.customUIScreenMarginToUse;break;case UIScreenTypes.LoadingScreen:this.loadingScreen.entity.element.margin=this.defaultUIScreenMarginToUse;break;case UIScreenTypes.InGameScreen:this.inGameScreen.entity.element.margin=this.customUIScreenMarginToUse;break;case UIScreenTypes.GameOverScreen:this.gameOverScreen.entity.element.margin=this.customUIScreenMarginToUse}},UiController.prototype.onMinAdShowTimePassed=function(){this.hasMinAdShowTimePassed=!0,this.assetsDoneLoading&&this.firebaseInitialized&&this.hasMinAdShowTimePassed&&this.activeScreen!==UIScreenTypes.HomeScreen&&this.showScreen(UIScreenTypes.HomeScreen,null)},UiController.prototype.onAssetsDoneLoading=function(){this.assetsDoneLoading=!0,this.assetsDoneLoading&&this.firebaseInitialized&&this.hasMinAdShowTimePassed&&this.activeScreen!==UIScreenTypes.HomeScreen&&this.showScreen(UIScreenTypes.HomeScreen,null)},UiController.prototype.onFirebaseInitialized=function(){this.firebaseInitialized=!0,this.assetsDoneLoading&&this.firebaseInitialized&&this.hasMinAdShowTimePassed&&this.activeScreen!==UIScreenTypes.HomeScreen&&this.showScreen(UIScreenTypes.HomeScreen,null)},UiController.prototype.onLocalPlayerInitalized=function(e,t,n,r,i){this.chatController.setLocalPlayerInfo(e,t),i&&this.inGameScreen.config(i),this.globalsControllerScript.testModeEnabled||this.openFullScreen()},UiController.prototype.onLocalPlayerSpawned=function(){this.showScreen(UIScreenTypes.InGameScreen,null),this.showMultiScreenElements(!0)},UiController.prototype.onLeftGame=function(){this.showScreen(UIScreenTypes.HomeScreen,null),this.showMultiScreenElements(!1)},UiController.prototype.showMultiScreenElements=function(e){e&&!this.multiScreenElementsEnabled?(this.sessionTimerManager.showTimer(),this.killFeedController.enableFeed(),MobileController.instance.active||this.chatController.enableChat()):!e&&this.multiScreenElementsEnabled&&(this.sessionTimerManager.hideTimer(),this.killFeedController.disableFeed(),MobileController.instance.active||this.chatController.disableChat()),this.multiScreenElementsEnabled=e},UiController.prototype.onSessionStarted=function(e,t,n,r,i){n||(gameOverScreenParamenters.showRespawnButton=!0,gameOverScreenParamenters.showActiveRespawnButton=!0,gameOverScreenParamenters.showLeaveButton=!1,gameOverScreenParamenters.showActiveLeaveButton=!1,gameOverScreenParamenters.showButtonsDelayedAmount=2,gameOverScreenParamenters.header=null,gameOverScreenParamenters.message="New round started!",gameOverScreenParamenters.displayRankProgress=!0,this.showScreen(UIScreenTypes.GameOverScreen,gameOverScreenParamenters)),this.sessionTimerManager.setNewCountDownTime(i,e,t,TimerType.Session)},UiController.prototype.onCooldownStarted=function(e,t,n,r){this.showMultiScreenElements(!0),gameOverScreenParamenters.showRespawnButton=!0,gameOverScreenParamenters.showActiveRespawnButton=!1,gameOverScreenParamenters.showLeaveButton=!1,gameOverScreenParamenters.showActiveLeaveButton=!1,gameOverScreenParamenters.showButtonsDelayedAmount=1,gameOverScreenParamenters.header=null,gameOverScreenParamenters.message="Round over!\n New round starts soon.",gameOverScreenParamenters.displayRankProgress=!0,this.showScreen(UIScreenTypes.GameOverScreen,gameOverScreenParamenters),this.sessionTimerManager.setNewCountDownTime(n,e,t,TimerType.Cooldown)},UiController.prototype.onPlayerKilled=function(){var e=Math.floor(pc.math.random(0,this.gameOverHeaders.length));gameOverScreenParamenters.showRespawnButton=!0,gameOverScreenParamenters.showActiveRespawnButton=!0,gameOverScreenParamenters.showLeaveButton=!0,gameOverScreenParamenters.showActiveLeaveButton=!0,gameOverScreenParamenters.showButtonsDelayedAmount=1,gameOverScreenParamenters.header=this.gameOverHeaders[e],gameOverScreenParamenters.message="Looks like you died...",gameOverScreenParamenters.displayRankProgress=!1,this.showScreen(UIScreenTypes.GameOverScreen,gameOverScreenParamenters)},UiController.prototype.onConnectionLost=function(){this.activeScreen!==UIScreenTypes.InGameScreen&&this.activeScreen!==UIScreenTypes.GameOverScreen||(this.sessionTimerManager.hideTimer(),gameOverScreenParamenters.showRespawnButton=!1,gameOverScreenParamenters.showActiveRespawnButton=!1,gameOverScreenParamenters.showLeaveButton=!0,gameOverScreenParamenters.showActiveLeaveButton=!0,gameOverScreenParamenters.showButtonsDelayedAmount=1,gameOverScreenParamenters.header="OH NO!",gameOverScreenParamenters.message="Something went wrong.\n Connection was dropped by the server...",gameOverScreenParamenters.displayRankProgress=!1,this.showScreen(UIScreenTypes.GameOverScreen,gameOverScreenParamenters))},UiController.prototype.onEnemyPlayerJoined=function(e){this.chatController.displayMessage(null,e.name+" Joined")},UiController.prototype.onEnemyPlayerDisconnected=function(e){},UiController.prototype.onKillMade=function(e,t,n,r,i){r?t.name===e.name?this.killFeedController.displayMessage(t.name,t.name,!1,!0,i):this.killFeedController.displayMessage(e.name,t.name,!0,!1,i):n?this.killFeedController.displayMessage(e.name,t.name,!1,!0,i):t.name===e.name?this.killFeedController.displayMessage(t.name,t.name,!1,!1,i):this.killFeedController.displayMessage(e.name,t.name,!1,!1,i)},UiController.prototype.onShootingStopped=function(e,t,n){e&&this.chatController.displayMessage(null,"Out of ammo!")},UiController.prototype.onMouseSensitivityChanged=function(e){this.chatController.displayMessage(null,"Sensitivity is: "+e.toFixed(4))},UiController.prototype.onVoiceOverText=function(e){this.chatController.displayMessage(null,e)},UiController.prototype.setAlertMessage=function(e,t){this.alertHandler.setAlert(e,t)},UiController.prototype.onWindowGainedFocus=function(){this.globalsControllerScript.testModeEnabled||this.homeScreen.entity.enabled||this.isInFullScreen||this.openFullScreen()},UiController.prototype.pointerLockStatusChange=function(e){pc.Mouse.isPointerLocked()||this.activeScreen!==UIScreenTypes.InGameScreen||this.popupController.showPopup(UIPopupTypes.SettingsPopup)},UiController.prototype.onKeyUp=function(e){e.key===pc.KEY_ESCAPE&&(!isChatModeEnabled&&this.isInFullScreen&&document.fullscreenElement&&(this.closeFullscreen(),this.isInFullScreen=!1),SettingsPopupIsShowing?this.popupController.hidePopup(UIPopupTypes.SettingsPopup):pc.Mouse.isPointerLocked()||this.activeScreen!==UIScreenTypes.InGameScreen||this.popupController.showPopup(UIPopupTypes.SettingsPopup))},UiController.prototype.openFullScreen=function(){var e=document.documentElement,t=null;if(e.requestFullscreen?t="requestFullscreen":e.mozRequestFullScreen?t="mozRequestFullScreen":e.webkitRequestFullscreen?t="webkitRequestFullscreen":e.msRequestFullscreen&&(t="msRequestFullscreen"),"string"==typeof t){var n=document.documentElement[t]();n instanceof Promise&&n.then(function(){this.isInFullScreen=!0}.bind(this)).catch(function(e){alert("Error attempting to enable full-screen mode: "+e.message+" error name: "+e.name),MobileController.instance.active&&this.app.touch.once(pc.EVENT_TOUCHEND,this.onWindowGainedFocus,this)}.bind(this))}},UiController.prototype.closeFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()};var _homeScreenThis,HomeScreen=pc.createScript("homeScreen");function LimitedCharacterData(t,e,a){this.characterID=t,this.startDate=e,this.endDate=a}HomeScreen.attributes.add("inputBoxEntity",{type:"entity",title:"Input Box"}),HomeScreen.attributes.add("feedbackLabelEntity",{type:"entity",title:"Feedback Label"}),HomeScreen.attributes.add("playerNameLabel",{type:"entity",title:"Player Name Label"}),HomeScreen.attributes.add("playButtonEntity",{type:"entity",title:"Play Button"}),HomeScreen.attributes.add("createPrivateArenaButtonEntity",{type:"entity",title:"Create Private Arena Button"}),HomeScreen.attributes.add("aboutButtonEntity",{type:"entity",title:"About Button"}),HomeScreen.attributes.add("outfitsButtonEntity",{type:"entity",title:"Outfits Button"}),HomeScreen.attributes.add("hatsButtonEntity",{type:"entity",title:"Hats Button"}),HomeScreen.attributes.add("ranksPopupButtonEntity",{type:"entity",title:"Ranks Button"}),HomeScreen.attributes.add("leaderboardsButtonEntity",{type:"entity",title:"Leaderboards Button"}),HomeScreen.attributes.add("logoParentEntity",{type:"entity",title:"Logo Parent"}),HomeScreen.attributes.add("playerInfoParentEntity",{type:"entity",title:"Player Info Parent"}),HomeScreen.attributes.add("topPlayerNameLabelEntity",{type:"entity",title:"Top Player Name Label"}),HomeScreen.attributes.add("highscoreLabelEntity",{type:"entity",title:"Highscore Label"}),HomeScreen.attributes.add("currencyLabelEntity",{type:"entity",title:"Currency Label"}),HomeScreen.attributes.add("profileRankLabelEntity",{type:"entity",title:"Profile Rank Label"}),HomeScreen.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),HomeScreen.attributes.add("dailyRankLabelEntity",{type:"entity",title:"Daily Rank Label"}),HomeScreen.attributes.add("weeklyRankLabelEntity",{type:"entity",title:"Weekly Rank Label"}),HomeScreen.attributes.add("rankSpinnerEntity",{type:"entity",title:"Rank Spinner"}),HomeScreen.attributes.add("limitedCharParentEntity",{type:"entity",title:"Limited Char Parent Entity"}),HomeScreen.attributes.add("limitedCharTimer",{type:"entity",title:"LimitedCharTimer"}),HomeScreen.attributes.add("soundButtonEntity",{type:"entity",title:"Sound Button"}),HomeScreen.attributes.add("musicButtonEntity",{type:"entity",title:"Music Button"}),HomeScreen.attributes.add("selectCharacterButtons",{type:"entity",array:!0,title:"Select Character Buttons"}),HomeScreen.attributes.add("characterModels",{type:"entity",array:!0,title:"Character Models"}),HomeScreen.attributes.add("openLogInScreenButton",{type:"entity",title:"Open Log In Screen Button"}),HomeScreen.attributes.add("saveProgressToolTip",{type:"entity",title:"Save Progress Tool Tip"}),HomeScreen.attributes.add("logInToolTip",{type:"entity",title:"Login Tool Tip"}),HomeScreen.attributes.add("logOutButton",{type:"entity",title:"Log Out Button"}),HomeScreen.prototype.getScreenType=function(){return UIScreenTypes.HomeScreen},HomeScreen.prototype.init=function(t,e,a,r,i,s,o,n,h,l,c){if(!this.isInitialized){this.isInitialized=!0,_homeScreenThis=this,this.globalsController=t,this.storageManager=e,this.globalLeaderboardsManager=i,this.musicManager=s,this.firebase=o,this.firebase.on("Firebase:signedOut",this.onFirebaseSignedOut,this),this.popupController=r,this.popupController.on("popupOpened",this.onPopupOpened,this),this.popupController.on("popupClosed",this.onPopupClosed,this),this.popupController.on("popupAction",this.onPopupAction,this),this.rankManager=n,this.itemDataManager=h,this.statsManager=l,this.currencyManager=c,this.urlWithArenaID=null,this.arenaIDToUse=null,this.hasRequestedPrivateArena=!1,this.globalLeaderboardsData=null,this.isUserLoggedIn=!1,this.numberOfTimesPrivateArenaPopupWasAutoShown=0;var u=new URL(window.location.href).searchParams.get("arenaID");u&&(this.arenaIDToUse=u),this.loadAssetManager=a,this.waitingForPlayerNameValidation=!1,this.inputAllowed=!0,this.lastSelectedCharacterID=CharacterID.Fox,this.lastSelectedColorID=0,this.lastSelectedHatIndex=0,this.selectedCharacterOutfits={foxOutfit:0,bullOutfit:0,chickenOutfit:0,rhinoOutfit:0,apeOutfit:0,lionOutfit:0,toucanOutfit:0,dogOutfit:0},this.selectedCharacterHats={foxHat:0,bullHat:0,chickenHat:0,rhinoHat:0,apeHat:0,lionHat:0,toucanHat:0,dogHat:0},this.limitedCharacterCycleDays=1,this.rhino=new LimitedCharacterData(CharacterID.Rhino,new Date(2021,5,6,0,0,0,0),new Date(2021,5,7,0,0,0,0)),this.lion=new LimitedCharacterData(CharacterID.Lion,new Date(2021,5,7,0,0,0,0),new Date(2021,5,8,0,0,0,0)),this.dog=new LimitedCharacterData(CharacterID.Dog,new Date(2021,5,8,0,0,0,0),new Date(2021,5,9,0,0,0,0)),this.toucan=new LimitedCharacterData(CharacterID.Toucan,new Date(2021,5,9,0,0,0,0),new Date(2021,5,10,0,0,0,0)),this.ape=new LimitedCharacterData(CharacterID.Ape,new Date(2021,5,10,0,0,0,0),new Date(2021,5,11,0,0,0,0)),this.limitedCharacters={[this.rhino.characterID]:this.rhino,[this.ape.characterID]:this.ape,[this.lion.characterID]:this.lion,[this.toucan.characterID]:this.toucan,[this.dog.characterID]:this.dog},this.today=new Date(Date.now()),this.limitedCharEndDateTime=new Date(Date.now()),this.limitedCharacterID=CharacterID.Rhino;for(var p=this.findActiveLimitedCharacterFromDatetime(this.today),d=1;!p;){if(d++,this.incrementAllLimitedCharacterDatesOneInterval(),d>2e3){console.log("ERROR in homeScreen, you probably inputted wrong limited character dates");break}p=this.findActiveLimitedCharacterFromDatetime(this.today)}this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper,this.lastKnownLocalPlayerRankPoints=null,this.limitedCharTimer.script.limitedCharTimerLabel.init(this.limitedCharEndDateTime),this.originalLimitedCharacterBoxYOffset=this.limitedCharParentEntity.getLocalPosition().y,this.limitedCharacterButtonID=3,this.inputBoxHelper=this.inputBoxEntity.script.inputBoxHelper,this.inputBoxHelper.init(this.globalsController,e),this.previousHighscore=this.storageManager.localLoadObfKey(STORAGE_PlayerHighscore_KEY,"int"),void 0!==this.previousHighscore&&null!==this.previousHighscore||(this.storageManager.localSaveObfKey(STORAGE_PlayerHighscore_KEY,0,"int"),this.previousHighscore=0),this.highscoreLabel=this.highscoreLabelEntity.element,this.highscoreLabel.text="-",this.currencyLabel=this.currencyLabelEntity.element,this.currencyLabel.text="-";var y=this.storageManager.localLoadObfKey(STORAGE_PlayerEloRating_KEY,"float");null==y&&this.storageManager.localSaveObfKey(STORAGE_PlayerEloRating_KEY,0,"float"),this.dailyRankLabelEntity.enabled=!1,this.weeklyRankLabelEntity.enabled=!1,this.showPlayerInfoBox=!1;var C=this.storageManager.load(STORAGE_PlayerName_KEY);null!=C&&(this.showPlayerInfoBox=!0,this.rankSpinnerEntity.enabled=!0),this.soundButton=this.soundButtonEntity.script.uiButton,this.soundButton.init(),this.soundButton.on("buttonClicked",this.onSoundButtonClicked,this),this.musicButton=this.musicButtonEntity.script.uiButton,this.musicButton.init(),this.musicButton.on("buttonClicked",this.onMusicButtonClicked,this),this.playButton=this.playButtonEntity.script.uiButton,this.playButton.init(Play_Button_Default_Text,!0),this.playButton.on("buttonClicked",this.onPlayButtonClicked,this),this.playButton.on("buttonTimedOut",this.onPlayButtonTimedOut,this),this.createPrivateArenaButton=this.createPrivateArenaButtonEntity.script.uiButton,this.createPrivateArenaButton.init(Private_Arena_Button_Default_Text,!0),this.createPrivateArenaButton.on("buttonClicked",this.onPrivateArenaButtonClicked,this),this.createPrivateArenaButton.on("buttonTimedOut",this.onPrivateArenaButtonTimedOut,this),this.openLogInScreenButtonScript=this.openLogInScreenButton.script.uiButton,this.openLogInScreenButtonScript.init("LOG IN",!0),this.openLogInScreenButtonScript.on("buttonClicked",this.openLogInScreen,this),this.logOutButtonScript=this.logOutButton.script.uiButton,this.logOutButtonScript.init("LOG OUT",!0),this.logOutButtonScript.on("buttonClicked",this.logOut,this),this.setLogInAndOutButtonState(this.firebase.authenticated,!1),this.leaderboardsButton=this.leaderboardsButtonEntity.script.uiButton,this.leaderboardsButton.init(Leaderboards_Button_Default_Text),this.leaderboardsButton.on("buttonClicked",this.onLeaderboardsButtonClicked,this),this.aboutPopupButton=this.aboutButtonEntity.script.uiButton,this.aboutPopupButton.init(About_Button_Default_Text),this.aboutPopupButton.on("buttonClicked",this.onAboutButtonClicked,this),this.outfitsPopupButton=this.outfitsButtonEntity.script.uiButton,this.outfitsPopupButton.init(Outfits_Button_Default_Text),this.outfitsPopupButton.on("buttonClicked",this.onOutfitsButtonClicked,this),this.hatsPopupButton=this.hatsButtonEntity.script.uiButton,this.hatsPopupButton.init(Hats_Button_Default_Text),this.hatsPopupButton.on("buttonClicked",this.onHatsButtonClicked,this),this.ranksPopupButton=this.ranksPopupButtonEntity.script.uiButton,this.ranksPopupButton.init(RANKS_Button_Default_Text),this.ranksPopupButton.on("buttonClicked",this.onRanksButtonClicked,this),this.defaultSelectedCharacter=CharacterID.Fox,this.setSelectedCharacterAndOutfit(!0),this.nameClickedCount=0,a.musicBundleAsset.ready((function(t){var e=this.app.assets.find("character_select_bull.mp3","audio");this.entity.sound.slot("select_bull").asset=e,e=this.app.assets.find("character_select_chicken.mp3","audio"),this.entity.sound.slot("select_chicken").asset=e,e=this.app.assets.find("character_select_fox.mp3","audio"),this.entity.sound.slot("select_fox").asset=e,e=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_big").asset=e,this.entity.sound.slot("button_small").asset=e}),this),this.globalLeaderboardsManager.on("onGlobalLeaderboardStandingsUpdated",this.onGlobalLeaderboardStandingsUpdated,this),this.statsManager.on("receivedStats",this.onReceivedStats,this)}},HomeScreen.prototype.show=function(t,e){for(var a in this.subscribedToEvents||(this.subscribedToEvents=!0,this.globalLeaderboardsManager.on("onErrorFetchingGlobalLeaderboardStandings",this.onErrorFetchingGlobalLeaderboardStandings,this),this.musicManager.on("soundToggled",this.onSoundToggled,this),this.musicManager.on("musicToggled",this.onMusicToggled,this),this.app.on("ViewportManager:resize",this.calculateWindowSize,this),this.app.on("privateArenaCreated",this.onPrivateArenaCreated,this),this.app.on("playerNameValidated",this.onPlayerNameValidated,this),this.app.on("serverError",this.onServerError,this),this.storageManager.on("onUserChanged",this.onUserChanged,this),this.currencyManager.on("currency1TotalUpdated",this.onCurrency1TotalUpdated,this),this.nameClickedCount=0,this.logoParentEntity.element.on(pc.EVENT_MOUSEDOWN,this.onTriggerIdOverlay,this),this.app.touch&&this.logoParentEntity.element.on(pc.EVENT_TOUCHSTART,this.onTriggerIdOverlay,this)),this.refreshPlayerBoxContents(t!==UIScreenTypes.HomeScreen),this.globalsController.deployPlatform!==DeployPlatforms.facebook&&this.inputBoxHelper.enableInput(),this.calculateWindowSize(),this.inputBoxHelper.show(),this.inputBoxHelper.clearFeedback(),this.playButton.show(),this.createPrivateArenaButton.show(!1,null===this.urlWithArenaID),this.leaderboardsButton.show(),this.aboutPopupButton.show(),this.ranksPopupButton.show(),this.outfitsPopupButton.show(),this.hatsPopupButton.show(),this.setLogInAndOutButtonState(this.firebase.authenticated,!1),this.soundButton.show(!soundEnabled),this.musicButton.show(!musicEnabled),this.setSelectedCharacterAndOutfit(!1),this.logoParentEntity.enabled=!0,this.limitedCharParentEntity.enabled=!0,this.app.fire("requestServerTime"),this.characterModels){var r=this.characterModels[a];null!=r&&r.script.introCharacterManager.show()}for(var i in this.selectCharacterButtons){var s=this.selectCharacterButtons[i];null!=s&&s.script.selectCharacterButton.show()}var o=new URL(window.location.href),n=o.searchParams.get("arenaID");null===n&&null!==this.urlWithArenaID&&(n=(o=new URL(this.urlWithArenaID)).searchParams.get("arenaID")),null!==n?null===this.urlWithArenaID?this.hasRequestedPrivateArena||0!==this.numberOfTimesPrivateArenaPopupWasAutoShown?this.removeArenaIDFromURL():(this.popupController.showPopup(UIPopupTypes.PrivateArenaPopup,{arenaLink:o,popupState:PrivateArenaPopupTypes.join}),this.numberOfTimesPrivateArenaPopupWasAutoShown++):this.removeArenaIDFromURL():(this.arenaIDToUse=null,this.popupController.hidePopup(UIPopupTypes.PrivateArenaPopup)),null!==e&&null!=e.feedbackMessage&&this.inputBoxHelper.displayFeedback(e.feedbackMessage,3,FeedbackType.Warning),this.app.fire("homeScreenEnable")},HomeScreen.prototype.hide=function(t){for(var e in this.storageManager.save(STORAGE_PlayerCharacter_KEY,this.lastSelectedCharacterID),this.saveCurrentlySelectedOutfits(),this.saveCurrentlySelectedHats(),this.subscribedToEvents&&(this.subscribedToEvents=!1,this.globalLeaderboardsManager.off("onErrorFetchingGlobalLeaderboardStandings",this.onErrorFetchingGlobalLeaderboardStandings,this),this.musicManager.off("soundToggled",this.onSoundToggled,this),this.musicManager.off("musicToggled",this.onMusicToggled,this),this.app.off("ViewportManager:resize",this.calculateWindowSize,this),this.app.off("privateArenaCreated",this.onPrivateArenaCreated,this),this.app.off("playerNameValidated",this.onPlayerNameValidated,this),this.app.off("serverError",this.onServerError,this),this.storageManager.off("onUserChanged",this.onUserChanged,this),this.currencyManager.off("currency1TotalUpdated",this.onCurrency1TotalUpdated,this),this.logoParentEntity.element.off(pc.EVENT_MOUSEDOWN,this.onTriggerIdOverlay,this),this.app.touch&&this.logoParentEntity.element.off(pc.EVENT_TOUCHSTART,this.onTriggerIdOverlay,this)),this.inputBoxHelper.hide(),this.playButton.hide(),this.createPrivateArenaButton.hide(),this.leaderboardsButton.hide(),this.soundButton.hide(),this.musicButton.hide(),this.aboutPopupButton.hide(),this.ranksPopupButton.hide(),this.outfitsPopupButton.hide(),this.hatsPopupButton.hide(),this.logOutButtonScript.hide(),this.openLogInScreenButtonScript.hide(),this.logoParentEntity.enabled=!1,this.limitedCharParentEntity.enabled=!1,this.playerInfoParentEntity.enabled=!1,this.characterModels){var a=this.characterModels[e];null!=a&&a.script.introCharacterManager.hide()}for(var r in this.selectCharacterButtons){var i=this.selectCharacterButtons[r];null!=i&&i.script.selectCharacterButton.hide()}this.hideAllOpenPopups()},HomeScreen.prototype.hideAllOpenPopups=function(){this.popupController.hidePopup(UIPopupTypes.PrivateArenaPopup),this.popupController.hidePopup(UIPopupTypes.AboutPopup),this.popupController.hidePopup(UIPopupTypes.LogInPopup),this.popupController.hidePopup(UIPopupTypes.UserIDPopup),this.popupController.hidePopup(UIPopupTypes.RanksPopup),this.popupController.hidePopup(UIPopupTypes.GlobalLeaderboardsPopup),this.popupController.hidePopup(UIPopupTypes.HatsPopup),this.popupController.hidePopup(UIPopupTypes.OutfitsPopup),this.popupController.hidePopup(UIPopupTypes.EarnedCurrencyPopup)},HomeScreen.prototype.onPopupOpened=function(t){for(var e in this.saveProgressToolTip.enabled=!1,this.logInToolTip.enabled=!1,this.limitedCharParentEntity.enabled=!1,this.playButton.show(!0),this.selectCharacterButtons){var a=this.selectCharacterButtons[e];null!=a&&a.script.selectCharacterButton.hide()}switch(t){case UIPopupTypes.OutfitsPopup:for(var r in this.characterModels){var i=this.characterModels[r];null!=i&&i.script.introCharacterManager.setPopupPosition()}this.outfitsPopupButton.show(!0);break;case UIPopupTypes.HatsPopup:for(var s in this.hatsPopupButton.show(!0),this.characterModels){var o=this.characterModels[s];null!=o&&o.script.introCharacterManager.setPopupPosition()}break;case UIPopupTypes.UserIDPopup:case UIPopupTypes.EarnedCurrencyPopup:break;case UIPopupTypes.AboutPopup:this.aboutPopupButton.show(!0);break;case UIPopupTypes.LogInPopup:this.inputBoxHelper.exitEditMode(),this.inputBoxHelper.disableInput(),this.openLogInScreenButtonScript.show(!0);break;case UIPopupTypes.RanksPopup:this.ranksPopupButton.show(!0);break;case UIPopupTypes.PrivateArenaPopup:break;case UIPopupTypes.GlobalLeaderboardsPopup:this.leaderboardsButton.show(!0)}},HomeScreen.prototype.onPopupClosed=function(t){switch(t){case UIPopupTypes.EarnedCurrencyPopup:this.refreshPlayerBoxContents(!1);break;case UIPopupTypes.UserIDPopup:case UIPopupTypes.AboutPopup:case UIPopupTypes.RanksPopup:break;case UIPopupTypes.LogInPopup:this.inputBoxHelper.enableInput(),this.refreshPlayerBoxContents(!0);break;case UIPopupTypes.PrivateArenaPopup:break;case UIPopupTypes.OutfitsPopup:for(let t in this.characterModels){let e=this.characterModels[t];null!=e&&(e.script.introCharacterManager.undoPopupPosition(),e.script.introCharacterManager.show(),e.script.introCharacterManager.changeOutfit(e.script.introCharacterManager.characterID,this.getSelectedCharacterOutfitForCharacter(e.script.introCharacterManager.characterID)))}this.saveCurrentlySelectedOutfits();break;case UIPopupTypes.HatsPopup:for(let t in this.characterModels){let e=this.characterModels[t];null!=e&&(e.script.introCharacterManager.undoPopupPosition(),e.script.introCharacterManager.show(),e.script.introCharacterManager.changeHat(e.script.introCharacterManager.characterID,this.getSelectedHatForCharacter(e.script.introCharacterManager.characterID)))}this.saveCurrentlySelectedHats()}for(var e in this.playerInfoParentEntity.enabled=this.showPlayerInfoBox,this.logoParentEntity.enabled=!0,this.limitedCharParentEntity.enabled=!0,this.soundButton.show(!soundEnabled),this.musicButton.show(!musicEnabled),this.aboutPopupButton.show(),this.ranksPopupButton.show(),this.outfitsPopupButton.show(),this.hatsPopupButton.show(),this.setLogInAndOutButtonState(this.firebase.authenticated,!1),this.createPrivateArenaButton.show(!1,null===this.urlWithArenaID),this.playButton.show(),this.leaderboardsButton.show(),this.selectCharacterButtons){var a=this.selectCharacterButtons[e];null!=a&&a.script.selectCharacterButton.show()}},HomeScreen.prototype.onPopupAction=function(t,e,a){switch(t){case UIPopupTypes.PrivateArenaPopup:switch(e){case PrivateArenaPopupActions.playButtonPressed:this.onPlayButtonClicked();break;case PrivateArenaPopupActions.newArenaButtonPressed:this.onRequestPrivateArena(a[0]);break;case PrivateArenaPopupActions.closeButtonPressed:this.removeArenaIDFromURL()}break;case UIPopupTypes.OutfitsPopup:switch(e){case OutfitsPopupActions.outfitChanged:this.changeCurrentCharacterOutfit(a.outfitIndex);break;case OutfitsPopupActions.outfitPreviewChanged:this.onOutfitPreviewChanged(a.outfitIndex)}break;case UIPopupTypes.HatsPopup:switch(e){case HatsPopupActions.hatChanged:this.onHatChanged(a.hatIndex);break;case HatsPopupActions.hatPreviewChanged:this.onHatPreviewChanged(a.hatIndex)}}},HomeScreen.prototype.refreshPlayerBoxContents=function(t){var e=this.storageManager.load(STORAGE_PlayerName_KEY);if(null!=e){if(this.showPlayerInfoBox=!0,t){this.dailyRankLabelEntity.enabled=!1,this.weeklyRankLabelEntity.enabled=!1;var a=this.rankManager.GetRank(0);this.profileRankLabelEntity.element.text="PROFILE RANK",this.profileRankEmblemHelper.setEmblem(a),this.rankSpinnerEntity.enabled=!0}this.currencyLabel.text=this.currencyManager.getCurrency1Total(),this.globalLeaderboardsManager.fetchGlobalLeaderboardStandings(t),this.topPlayerNameLabelEntity.element.text=e,this.inputBoxHelper.changeName(e),this.firebase.authenticated?this.statsManager.getLatestStats():(this.previousHighscore=this.storageManager.localLoadObfKey(STORAGE_PlayerHighscore_KEY,"int"),this.highscoreLabel.text=this.previousHighscore)}else this.showPlayerInfoBox=!1;this.playerInfoParentEntity.enabled=this.showPlayerInfoBox},HomeScreen.prototype.onReceivedStats=function(t){if(null!==t){this.previousHighscore=t.highscore,this.highscoreLabel.text=t.highscore;var e=this.rankManager.GetRank(t.totalRankPoints);if(this.profileRankLabelEntity.element.text=e.rankName.toUpperCase(),this.lastKnownLocalPlayerRankPoints=t.totalRankPoints,this.profileRankEmblemHelper.setEmblem(e),t.dailyTournamentCurrency1Reward>0||t.weeklyTournamentCurrency1Reward>0){var a=this.storageManager.loadPlayerGuid();this.popupController.showPopup(UIPopupTypes.EarnedCurrencyPopup,{playerGuid:a,dailyTournamentCurrency1Reward:t.dailyTournamentCurrency1Reward,weeklyTournamentCurrency1Reward:t.weeklyTournamentCurrency1Reward})}}},HomeScreen.prototype.findActiveLimitedCharacterFromDatetime=function(t){for(let e in this.limitedCharacters)if(t>this.limitedCharacters[e].startDate&&t<this.limitedCharacters[e].endDate)return this.limitedCharacterID=this.limitedCharacters[e].characterID,this.limitedCharEndDateTime=this.limitedCharacters[e].endDate,!0;return!1},HomeScreen.prototype.incrementAllLimitedCharacterDatesOneInterval=function(){for(let t in this.limitedCharacters)this.limitedCharacters[t].startDate.setDate(this.limitedCharacters[t].startDate.getDate()+this.limitedCharacterCycleDays*Object.keys(this.limitedCharacters).length),this.limitedCharacters[t].endDate.setDate(this.limitedCharacters[t].endDate.getDate()+this.limitedCharacterCycleDays*Object.keys(this.limitedCharacters).length)},HomeScreen.prototype.onGlobalLeaderboardStandingsUpdated=function(t){this.globalLeaderboardsData=t,this.entity.enabled&&this.updateGlobalLeaderboardsView()},HomeScreen.prototype.updateGlobalLeaderboardsView=function(){if(void 0!==this.globalLeaderboardsData&&null!==this.globalLeaderboardsData){if(this.rankSpinnerEntity.enabled=!1,this.dailyRankLabelEntity.enabled=!0,this.weeklyRankLabelEntity.enabled=!0,this.globalLeaderboardsData.positionInDailyLeaderboard>-1){var t=this.globalLeaderboardsData.positionInDailyLeaderboard+1;this.dailyRankLabelEntity.element.text=t}else this.dailyRankLabelEntity.element.text="-";if(this.globalLeaderboardsData.positionInWeeklyLeaderboard>-1){var e=this.globalLeaderboardsData.positionInWeeklyLeaderboard+1;this.weeklyRankLabelEntity.element.text=e}else this.weeklyRankLabelEntity.element.text="-"}else this.dailyRankLabelEntity.element.text="-",this.weeklyRankLabelEntity.element.text="-"},HomeScreen.prototype.onErrorFetchingGlobalLeaderboardStandings=function(t){this.rankSpinnerEntity.enabled&&(this.rankSpinnerEntity.enabled=!1),this.dailyRankLabelEntity.enabled=!0,this.dailyRankLabelEntity.element.text="-",this.weeklyRankLabelEntity.enabled=!0,this.weeklyRankLabelEntity.element.text="-"},HomeScreen.prototype.changeCurrentCharacterOutfit=function(t){if(this.inputAllowed)for(var e in this.lastSelectedColorID=t,this.entity.sound.slot("button_small").play(),this.lastSelectedCharacterID==CharacterID.Fox?this.selectedCharacterOutfits.foxOutfit=t:this.lastSelectedCharacterID==CharacterID.Bull?this.selectedCharacterOutfits.bullOutfit=t:this.lastSelectedCharacterID==CharacterID.Rhino?this.selectedCharacterOutfits.rhinoOutfit=t:this.lastSelectedCharacterID==CharacterID.Chicken?this.selectedCharacterOutfits.chickenOutfit=t:this.lastSelectedCharacterID==CharacterID.Ape?this.selectedCharacterOutfits.apeOutfit=t:this.lastSelectedCharacterID==CharacterID.Lion?this.selectedCharacterOutfits.lionOutfit=t:this.lastSelectedCharacterID==CharacterID.Toucan?this.selectedCharacterOutfits.toucanOutfit=t:this.lastSelectedCharacterID==CharacterID.Dog&&(this.selectedCharacterOutfits.dogOutfit=t),this.characterModels){var a=this.characterModels[e];null!=a&&a.script.introCharacterManager.changeOutfit(this.lastSelectedCharacterID,t)}},HomeScreen.prototype.onOutfitPreviewChanged=function(t){for(var e in this.characterModels){var a=this.characterModels[e];null!=a&&a.script.introCharacterManager.changeOutfit(this.lastSelectedCharacterID,t)}},HomeScreen.prototype.onHatPreviewChanged=function(t){for(var e in this.characterModels){var a=this.characterModels[e];null!=a&&a.script.introCharacterManager.changeHat(this.lastSelectedCharacterID,t)}},HomeScreen.prototype.onHatChanged=function(t){for(var e in this.lastSelectedHatIndex=t,this.lastSelectedCharacterID==CharacterID.Fox?this.selectedCharacterHats.foxHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Bull?this.selectedCharacterHats.bullHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Rhino?this.selectedCharacterHats.rhinoHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Chicken?this.selectedCharacterHats.chickenHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Ape?this.selectedCharacterHats.apeHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Lion?this.selectedCharacterHats.lionHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Toucan?this.selectedCharacterHats.toucanHat=this.lastSelectedHatIndex:this.lastSelectedCharacterID==CharacterID.Dog&&(this.selectedCharacterHats.dogHat=this.lastSelectedHatIndex),this.characterModels){var a=this.characterModels[e];null!=a&&a.script.introCharacterManager.changeHat(this.lastSelectedCharacterID,t)}},HomeScreen.prototype.addArenaIDToURL=function(){if(null!==this.urlWithArenaID){var t=new URL(this.urlWithArenaID);this.arenaIDToUse=t.searchParams.get("arenaID")}if(null!==this.arenaIDToUse&&void 0!==this.arenaIDToUse){var e=window.location.href.split("?")[0];this.urlWithArenaID=updateQueryStringParameter(e,"arenaID",this.arenaIDToUse),window.history.pushState({path:this.urlWithArenaID},"",this.urlWithArenaID)}},HomeScreen.prototype.removeArenaIDFromURL=function(){var t=new URL(window.location.href);if(t.searchParams.get("arenaID")){var e=removeParam("arenaID",t.href);window.history.pushState({path:e},"",e)}this.arenaIDToUse=null},HomeScreen.prototype.onSoundButtonClicked=function(){this.musicManager.onSoundButtonClicked(),this.soundButton.show(!soundEnabled)},HomeScreen.prototype.onMusicButtonClicked=function(){this.musicManager.onMusicButtonClicked(),this.musicButton.show(!musicEnabled)},HomeScreen.prototype.onMusicToggled=function(){this.popupController.getActivePopupType()!==UIPopupTypes.LogInPopup&&this.musicButton.show(!musicEnabled)},HomeScreen.prototype.onSoundToggled=function(){this.popupController.getActivePopupType()!==UIPopupTypes.LogInPopup&&this.soundButton.show(!soundEnabled)},HomeScreen.prototype.onLeaderboardsButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.GlobalLeaderboardsPopup),this.app.fire("leaderboardsButtonClicked")},HomeScreen.prototype.onAboutButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.AboutPopup)},HomeScreen.prototype.onOutfitsButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.OutfitsPopup,{character:this.lastSelectedCharacterID,selectedOutfits:this.selectedCharacterOutfits})},HomeScreen.prototype.onHatsButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.HatsPopup,{character:this.lastSelectedCharacterID,selectedHats:this.selectedCharacterHats})},HomeScreen.prototype.onRanksButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.firebase.authenticated?this.popupController.showPopup(UIPopupTypes.RanksPopup,{userRankPoints:this.lastKnownLocalPlayerRankPoints}):this.popupController.showPopup(UIPopupTypes.RanksPopup,{userRankPoints:null})},HomeScreen.prototype.onPrivateArenaButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.onRequestPrivateArena()},HomeScreen.prototype.onPrivateArenaButtonTimedOut=function(){this.inputBoxHelper.displayFeedback("Something went wrong. Please try again later",3,FeedbackType.Warning)},HomeScreen.prototype.onPlayButtonClicked=function(){this.entity.sound.slot("button_big").play(),this.popupController.getActivePopupType()!==UIPopupTypes.PrivateArenaPopup&&this.createPrivateArenaButton.show(!0,null===this.urlWithArenaID),this.validatePlayerName()},HomeScreen.prototype.onPlayButtonTimedOut=function(){this.inputBoxHelper.displayFeedback("Something went wrong. Please try again later",3,FeedbackType.Warning),this.onPlayModeEnterError()},HomeScreen.prototype.validatePlayerName=function(){var t=this.inputBoxHelper.getValidatedInputName();null!==t&&""!==t?(this.inputBoxHelper.clearFeedback(),this.remoteValidatePlayerName(t)):this.onPlayModeEnterError()},HomeScreen.prototype.remoteValidatePlayerName=function(t){for(var e in this.waitingForPlayerNameValidation=!0,this.inputBoxHelper.displayFeedback("Checking name...",0,FeedbackType.Message),this.inputAllowed=!1,this.inputBoxHelper.disableInput(),this.characterModels){var a=this.characterModels[e];if(null!=a)a.script.introCharacterManager.disableInput()}var r=this.storageManager.loadPlayerGuid();this.app.fire("requestPlayerNameValidation",r,t,this.arenaIDToUse)},HomeScreen.prototype.onPlayerNameValidated=function(t,e){if(this.waitingForPlayerNameValidation){for(var a in this.waitingForPlayerNameValidation=!1,this.inputAllowed=!0,this.characterModels){var r=this.characterModels[a];if(null!=r)r.script.introCharacterManager.enableInput()}if(this.inputBoxHelper.clearFeedback(),e){this.inputBoxHelper.exitEditMode(),this.inputBoxHelper.displayFeedback("Welcome "+t,0,FeedbackType.Message),this.storageManager.save(STORAGE_PlayerName_KEY,t);var i=this.storageManager.loadPlayerGuid(),s=0,o=0;this.firebase.authenticated||(o=this.storageManager.localLoadObfKey(STORAGE_PlayerHighscore_KEY,"int"),s=this.storageManager.localLoadObfKey(STORAGE_PlayerEloRating_KEY,"float"));var n={playerGuid:i,playerName:t,arenaID:this.arenaIDToUse,characterIndex:this.lastSelectedCharacterID,outfitIndex:this.lastSelectedColorID,highscore:o,eloRating:s,hatIndex:this.lastSelectedHatIndex};setTimeout(function(){this.app.fire("uiController:showScreen",UIScreenTypes.LoadingScreen,{loadingScreenType:LoadingScreenStates.waitForPlayerToSpawn,playerInitializationParams:n})}.bind(this),1e3)}else this.onPlayModeEnterError(),this.inputBoxHelper.enableInput(),this.inputBoxHelper.show(!0),this.inputBoxHelper.animateErrorFlash(),this.inputBoxHelper.displayFeedback("Name already in use",3,FeedbackType.Warning)}},HomeScreen.prototype.onPlayModeEnterError=function(){this.popupController.getActivePopupType()===UIPopupTypes.PrivateArenaPopup?this.popupController.resetActivePopup():(this.aboutPopupButton.show(),this.ranksPopupButton.show(),this.outfitsPopupButton.show(),this.hatsPopupButton.show(),this.playButton.show(),this.createPrivateArenaButton.show(!1,null===this.urlWithArenaID),this.leaderboardsButton.show(),this.setLogInAndOutButtonState(this.firebase.authenticated,!1))},HomeScreen.prototype.onSelectCharacterButtonClicked=function(t){if(t==this.limitedCharacterButtonID&&(t=this.limitedCharacterID),this.inputAllowed){for(var e in this.characterModels){var a=this.characterModels[e];if(null!==a&&(a.script.introCharacterManager.selectCharacter(!0,t,!1),this.lastSelectedCharacterID!==t)){switch(t){case CharacterID.Fox:case CharacterID.Ape:this.entity.sound.slot("select_fox").play();break;case CharacterID.Bull:case CharacterID.Rhino:case CharacterID.Lion:case CharacterID.Dog:this.entity.sound.slot("select_bull").play();break;case CharacterID.Chicken:case CharacterID.Toucan:this.entity.sound.slot("select_chicken").play()}this.adjustLimitedLabelHeight(t==this.limitedCharacterID)}}this.lastSelectedCharacterID=t,t==CharacterID.Fox?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.foxOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.foxHat):t==CharacterID.Bull?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.bullOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.bullHat):t==CharacterID.Chicken?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.chickenOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.chickenHat):t==CharacterID.Rhino?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.rhinoOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.rhinoHat):t==CharacterID.Ape?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.apeOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.apeHat):t==CharacterID.Lion?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.lionOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.lionHat):t==CharacterID.Toucan?(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.toucanOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.toucanHat):t==CharacterID.Dog&&(this.changeCurrentCharacterOutfit(this.selectedCharacterOutfits.dogOutfit),this.lastSelectedHatIndex=this.selectedCharacterHats.dogHat)}},HomeScreen.prototype.adjustLimitedLabelHeight=function(t){t?this.limitedCharParentEntity.setLocalPosition(this.limitedCharParentEntity.getLocalPosition().x,this.originalLimitedCharacterBoxYOffset+40,this.limitedCharParentEntity.getLocalPosition().z):this.limitedCharParentEntity.setLocalPosition(this.limitedCharParentEntity.getLocalPosition().x,this.originalLimitedCharacterBoxYOffset,this.limitedCharParentEntity.getLocalPosition().z)},HomeScreen.prototype.onServerError=function(t){switch(t){case ServerErrorCodes.ServerIsNotReady:this.inputBoxHelper.displayFeedback("Server is not yet ready. Try again",3,FeedbackType.Warning),this.onPlayModeEnterError();break;case ServerErrorCodes.IncompatibleClientVersion:this.inputBoxHelper.displayFeedback("Game outdated. Please refresh",0,FeedbackType.Warning),this.onPlayModeEnterError();break;case ServerErrorCodes.ArenaIsFull:this.inputBoxHelper.displayFeedback("Arena is full",3,FeedbackType.Warning),this.onPlayModeEnterError();break;case ServerErrorCodes.UserAlreadyConnected:this.inputBoxHelper.displayFeedback("You are already connected",3,FeedbackType.Warning),this.onPlayModeEnterError();break;default:this.inputBoxHelper.displayFeedback("ServerError",3,FeedbackType.Warning)}for(var e in this.inputBoxHelper.enableInput(),this.inputAllowed=!0,this.characterModels){var a=this.characterModels[e];if(null!=a)a.script.introCharacterManager.enableInput()}},HomeScreen.prototype.onRequestPrivateArena=function(){null===this.urlWithArenaID?(this.inputBoxHelper.displayFeedback("Contacting server...",0,FeedbackType.Message),this.playButton.show(!0),this.app.fire("requestPrivateArena")):(this.hasRequestedPrivateArena?this.popupController.showPopup(UIPopupTypes.PrivateArenaPopup,{arenaLink:this.urlWithArenaID,popupState:PrivateArenaPopupTypes.create}):this.popupController.showPopup(UIPopupTypes.PrivateArenaPopup,{arenaLink:this.urlWithArenaID,popupState:PrivateArenaPopupTypes.join}),this.addArenaIDToURL())},HomeScreen.prototype.onPrivateArenaCreated=function(t){this.arenaIDToUse=t,this.hasRequestedPrivateArena=!0,this.inputBoxHelper.displayFeedback("Arena is ready",1,FeedbackType.Message),this.playButton.show(!1),this.addArenaIDToURL(),this.popupController.showPopup(UIPopupTypes.PrivateArenaPopup,{arenaLink:this.urlWithArenaID,popupState:PrivateArenaPopupTypes.create}),this.createPrivateArenaButton.show(!0,null===this.urlWithArenaID)},HomeScreen.prototype.calculateWindowSize=function(){var t=getWindowWidth(),e=getWindowHeight(),a=document.getElementById("application-canvas"),r=t;a.style.marginLeft="0px",a.style.marginRight="0px",a.style.marginTop="0px",a.style.marginBottom="0px",a.style.width=r+"px",a.style.height=e+"px",pc.app.graphicsDevice.resizeCanvas(r,e)},HomeScreen.prototype.onUserChanged=function(t){this.isUserLoggedIn=t,this.previousHighscore=0,this.highscoreLabel.text="-",this.topPlayerNameLabelEntity.element.text="",this.dailyRankLabelEntity.element.text="-",this.weeklyRankLabelEntity.element.text="-",this.popupController.getActivePopupType()!==UIPopupTypes.LogInPopup&&this.refreshPlayerBoxContents(!0),this.setSelectedCharacterAndOutfit(!1),(this.logOutButtonScript.enabled||this.openLogInScreenButtonScript.enabled)&&this.setLogInAndOutButtonState(t,!1)},HomeScreen.prototype.onCurrency1TotalUpdated=function(t){this.currencyLabel.text=t},HomeScreen.prototype.setSelectedCharacterAndOutfit=function(t){var e=this.storageManager.load(STORAGE_PlayerCharacter_KEY),a=e?parseInt(e,10):this.defaultSelectedCharacter,r=0,i=this.storageManager.load(STORAGE_PlayerOutfits_KEY);null!=i&&null!=i?this.selectedCharacterOutfits=JSON.parse(this.storageManager.load(STORAGE_PlayerOutfits_KEY)):(this.selectedCharacterOutfits.foxOutfit=0,this.selectedCharacterOutfits.bullOutfit=0,this.selectedCharacterOutfits.rhinoOutfit=0,this.selectedCharacterOutfits.chickenOutfit=0,this.selectedCharacterOutfits.apeOutfit=0,this.selectedCharacterOutfits.lionOutfit=0,this.selectedCharacterOutfits.toucanOutfit=0,this.selectedCharacterOutfits.dogOutfit=0);var s=this.storageManager.load(STORAGE_PlayerHats_KEY);switch(null!=s&&null!=s?this.selectedCharacterHats=JSON.parse(this.storageManager.load(STORAGE_PlayerHats_KEY)):(this.selectedCharacterHats.foxHat=0,this.selectedCharacterHats.bullHat=0,this.selectedCharacterHats.rhinoHat=0,this.selectedCharacterHats.chickenHat=0,this.selectedCharacterHats.apeHat=0,this.selectedCharacterHats.lionHat=0,this.selectedCharacterHats.toucanHat=0,this.selectedCharacterHats.dogHat=0),a){case CharacterID.Fox:r=this.selectedCharacterOutfits.foxOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.foxHat;break;case CharacterID.Bull:r=this.selectedCharacterOutfits.bullOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.bullHat;break;case CharacterID.Rhino:r=this.selectedCharacterOutfits.rhinoOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.rhinoHat;break;case CharacterID.Chicken:r=this.selectedCharacterOutfits.chickenOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.chickenHat;break;case CharacterID.Ape:r=this.selectedCharacterOutfits.apeOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.apeHat;break;case CharacterID.Lion:r=this.selectedCharacterOutfits.lionOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.lionHat;break;case CharacterID.Toucan:r=this.selectedCharacterOutfits.toucanOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.toucanHat;break;case CharacterID.Dog:r=this.selectedCharacterOutfits.dogOutfit,this.lastSelectedHatIndex=this.selectedCharacterHats.dogHat}for(var o in a in this.limitedCharacters&&a!=this.limitedCharacterID&&(a=1,r=0),this.characterModels){var n=this.characterModels[o];if(null!=n){var h=n.script.introCharacterManager;t&&h.init(this.limitedCharacterID,a,r,this.itemDataManager),h.selectCharacter(!1,a,!0),this.adjustLimitedLabelHeight(a==this.limitedCharacterID),this.lastSelectedCharacterID=a,h.changeOutfit(h.characterID,this.getSelectedCharacterOutfitForCharacter(h.characterID)),h.changeHat(h.characterID,this.getSelectedHatForCharacter(h.characterID))}}if(t)for(var l in this.selectCharacterButtons){var c=this.selectCharacterButtons[l];if(null!==c){var u=c.script.selectCharacterButton;u.init(),u.on("buttonClicked",this.onSelectCharacterButtonClicked,this)}}this.changeCurrentCharacterOutfit(r)},HomeScreen.prototype.openLogInScreen=function(){this.saveProgressToolTip.enabled=!1,this.logInToolTip.enabled=!1,this.firebase.authenticated?this.setLogInAndOutButtonState(this.firebase.authenticated,!1):this.firebase.isLoggingIn()?this.openLogInScreenButtonScript.showLoadingState():(this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.LogInPopup))},HomeScreen.prototype.logOut=function(){this.firebase.signOut(),this.hideAllOpenPopups()},HomeScreen.prototype.onFirebaseSignedOut=function(t){t||this.logOutButtonScript.showNormalState()},HomeScreen.prototype.setLogInAndOutButtonState=function(t,e){t?(this.saveProgressToolTip.enabled=!1,this.logInToolTip.enabled=!1,this.logOutButtonScript.show(e),this.openLogInScreenButtonScript.hide()):(this.openLogInScreenButtonScript.show(e),this.logOutButtonScript.hide())},HomeScreen.prototype.saveCurrentlySelectedOutfits=function(){this.storageManager.save(STORAGE_PlayerOutfits_KEY,JSON.stringify(this.selectedCharacterOutfits))},HomeScreen.prototype.saveCurrentlySelectedHats=function(){this.storageManager.save(STORAGE_PlayerHats_KEY,JSON.stringify(this.selectedCharacterHats))},HomeScreen.prototype.getSelectedCharacterOutfitForCharacter=function(t){switch(t){case CharacterID.Fox:return this.selectedCharacterOutfits.foxOutfit;case CharacterID.Bull:return this.selectedCharacterOutfits.bullOutfit;case CharacterID.Rhino:return this.selectedCharacterOutfits.rhinoOutfit;case CharacterID.Chicken:return this.selectedCharacterOutfits.chickenOutfit;case CharacterID.Ape:return this.selectedCharacterOutfits.apeOutfit;case CharacterID.Lion:return this.selectedCharacterOutfits.lionOutfit;case CharacterID.Toucan:return this.selectedCharacterOutfits.toucanOutfit;case CharacterID.Dog:return this.selectedCharacterOutfits.dogOutfit;default:return console.LogError("No handling for character type outfit!"),0}},HomeScreen.prototype.getSelectedHatForCharacter=function(t){switch(t){case CharacterID.Fox:return this.selectedCharacterHats.foxHat;case CharacterID.Bull:return this.selectedCharacterHats.bullHat;case CharacterID.Rhino:return this.selectedCharacterHats.rhinoHat;case CharacterID.Chicken:return this.selectedCharacterHats.chickenHat;case CharacterID.Ape:return this.selectedCharacterHats.apeHat;case CharacterID.Lion:return this.selectedCharacterHats.lionHat;case CharacterID.Toucan:return this.selectedCharacterHats.toucanHat;case CharacterID.Dog:return this.selectedCharacterHats.dogHat;default:return console.LogError("No handling for hat type!"),0}},HomeScreen.prototype.onTriggerIdOverlay=function(){null!=this.firebase.user&&null!=this.firebase.user&&this.nameClickedCount++,this.nameClickedCount>2&&(this.nameClickedCount=0,this.entity.sound.slot("button_small").play(),this.popupController.showPopup(UIPopupTypes.UserIDPopup))};var SpinnerHandler=pc.createScript("spinnerHandler");SpinnerHandler.prototype.initialize=function(){this.rotationSpeed=200},SpinnerHandler.prototype.update=function(t){this.entity.rotateLocal(0,0,this.rotationSpeed*t*-1)};var GameOverScreen=pc.createScript("gameOverScreen");GameOverScreen.attributes.add("gameOverOverlayTextureEntity",{type:"entity",title:"Game Over Overlay Texture"}),GameOverScreen.attributes.add("deathHeaderShadowLabelEntity",{type:"entity",title:"Death Header Shadow Label"}),GameOverScreen.attributes.add("deathHeaderLabelEntity",{type:"entity",title:"Death Header Label"}),GameOverScreen.attributes.add("deathLabelEntity",{type:"entity",title:"Death Label"}),GameOverScreen.attributes.add("respawnButton",{type:"entity",title:"Respawn Button"}),GameOverScreen.attributes.add("leaveButton",{type:"entity",title:"Leave Game Button"}),GameOverScreen.attributes.add("soundButtonEntity",{type:"entity",title:"Sound Button"}),GameOverScreen.attributes.add("musicButtonEntity",{type:"entity",title:"Music Button"}),GameOverScreen.attributes.add("rankUpProgressGroup",{type:"entity",title:"rankUpProgressGroup"});var gameOverScreenParamenters={showRespawnButton:!1,showActiveRespawnButton:!0,showLeaveButton:!1,showActiveLeaveButton:!0,showButtonsDelayedAmount:0,header:null,message:"",displayRankProgress:!1};GameOverScreen.prototype.getScreenType=function(){return UIScreenTypes.GameOverScreen},GameOverScreen.prototype.init=function(t,e,n,i,s){this.isInitialized||(this.isInitialized=!0,this.DeathAutoRespawnDuration=10,this.DeathAutoRespawnThreshold=this.DeathAutoRespawnDuration+5,this.musicManager=n,this.sessionTimerManager=t,this.rankManager=i,this.firebaseManager=s,this.isInFocus=!0,this.autoRespawnOnFocusGain=!1,this.autoRespawnTimer=null,this.playerGuid=null,this.playerManagerScript=null,this.localPlayerRankPointsStart=0,this.currentArenaIsPrivate=!1,this.showLeaveButtonTimeout=null,this.leaveButtonEnableThreshold=1e3,this.leaveButton.enabled=!1,this.respawnButtonScript=this.respawnButton.script.uiButton,this.respawnButtonScript.on("buttonClicked",this.onRespawnButtonClicked,this),this.respawnButtonScript.init(Respawn_Button_Default_Text,!0),this.showRespawnButtonTimeout=null,this.respawnButtonEnableThreshold=1e3,this.respawnButton.enabled=!1,this.leaveButtonScript=this.leaveButton.script.uiButton,this.leaveButtonScript.on("buttonClicked",this.onLeaveButtonClicked,this),this.leaveButtonScript.init(Leave_Button_Default_Text),this.soundButton=this.soundButtonEntity.script.uiButton,this.soundButton.init(),this.soundButton.on("buttonClicked",this.onSoundButtonClicked,this),this.musicButton=this.musicButtonEntity.script.uiButton,this.musicButton.init(),this.musicButton.on("buttonClicked",this.onMusicButtonClicked,this),this.localPlayerID=null,this.previousTotalRankPoints=0,this.rankPointsEarnedInPreviousRound=0,this.hasUnseenRankProgress=!1,this.gameOverRankUpHelper=this.rankUpProgressGroup.script.gameOverRankUphelper,this.gameOverRankUpHelper.init(this.rankManager),this.app.on("localPlayerInitialized",this.LocalPlayerCreated,this),this.app.on("destroy",(function(){this.app.off("localPlayerInitialized",this.LocalPlayerCreated,this)})),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("windowLostFocus",this.onWindowLostFocus,this),this.app.on("windowGainedFocus",this.onWindowGainedFocus,this),e.musicBundleAsset.ready((function(t){var e=this.app.assets.find("ui_button_click.mp3","audio");this.entity.sound.slot("button_big").asset=e}),this))},GameOverScreen.prototype.show=function(t,e){this.subscribedToEvents||(this.subscribedToEvents=!0,this.musicManager.on("soundToggled",this.onSoundToggled,this),this.musicManager.on("musicToggled",this.onMusicToggled,this)),this.gameOverOverlayTextureEntity.enabled=!0,this.soundButton.show(!soundEnabled),this.musicButton.show(!musicEnabled),null!==e.header?(this.deathHeaderLabelEntity.enabled=!0,this.deathHeaderShadowLabelEntity.enabled=!0,this.deathHeaderShadowLabelEntity.element.text=e.header,this.deathHeaderLabelEntity.element.text=e.header):(this.deathHeaderLabelEntity.enabled=!1,this.deathHeaderShadowLabelEntity.enabled=!1),e.displayRankProgress&&this.hasUnseenRankProgress&&!this.currentArenaIsPrivate?(this.hasUnseenRankProgress=!1,this.rankUpProgressGroup.enabled=!0):this.rankUpProgressGroup.enabled=!1,e.showRespawnButton&&(e.showButtonsDelayedAmount>0?this.showRespawnButtonTimeout=setTimeout(function(){this.respawnButtonScript.show(!e.showActiveRespawnButton)}.bind(this),1e3*e.showButtonsDelayedAmount):this.respawnButtonScript.show(!e.showActiveRespawnButton)),e.showLeaveButton&&(e.showButtonsDelayedAmount>0?this.showLeaveButtonTimeout=setTimeout(function(){this.leaveButtonScript.show(!e.showActiveLeaveButton)}.bind(this),1e3*e.showButtonsDelayedAmount):this.leaveButtonScript.show(!e.showActiveLeaveButton)),null!==e.message&&void 0!==e.message&&(this.deathLabelEntity.enabled=!0,this.deathLabelEntity.element.text=e.message),this.sessionTimerManager.timerType===TimerType.Session&&this.sessionTimerManager.totalSecondsRemaining>this.DeathAutoRespawnThreshold&&null===this.autoRespawnTimer&&(this.sessionTimerManager.showDeathAutoRespawnTimer(this.DeathAutoRespawnDuration),this.autoRespawnTimer=setTimeout(function(){this.isInFocus?this.respawnButtonScript.buttonClicked():this.autoRespawnOnFocusGain=!0,this.autoRespawnTimer=null}.bind(this),1e3*this.DeathAutoRespawnDuration))},GameOverScreen.prototype.hide=function(t){this.subscribedToEvents&&(this.subscribedToEvents=!1,this.musicManager.off("soundToggled",this.onSoundToggled,this),this.musicManager.off("musicToggled",this.onMusicToggled,this)),this.soundButton.hide(),this.musicButton.hide(),clearTimeout(this.showRespawnButtonTimeout),this.respawnButtonScript.hide(),clearTimeout(this.showLeaveButtonTimeout),this.leaveButtonScript.hide(),this.deathLabelEntity.enabled=!1,this.gameOverOverlayTextureEntity.enabled=!1,this.sessionTimerManager.hideDeathAutoRespawnTimer(),clearTimeout(this.autoRespawnTimer),this.autoRespawnTimer=null},GameOverScreen.prototype.onSoundButtonClicked=function(){this.musicManager.onSoundButtonClicked()},GameOverScreen.prototype.onMusicButtonClicked=function(){this.musicManager.onMusicButtonClicked()},GameOverScreen.prototype.onMusicToggled=function(){this.musicButton.show(!musicEnabled)},GameOverScreen.prototype.onSoundToggled=function(){this.soundButton.show(!soundEnabled)},GameOverScreen.prototype.onRespawnButtonClicked=function(){this.entity.sound.slot("button_big").play(),setTimeout(function(){this.app.fire("respawnClicked",!0)}.bind(this),10)},GameOverScreen.prototype.onLeaveButtonClicked=function(){this.entity.sound.slot("button_big").play(),this.app.fire("localPlayerWillLeave"),setTimeout(function(){this.app.fire("leftGame")}.bind(this),10)},GameOverScreen.prototype.onSessionStarted=function(t,e,n,i,s){if(n||(this.isInFocus?this.respawnButtonScript.buttonClicked():this.autoRespawnOnFocusGain=!0),this.localPlayerID){var o=i[this.localPlayerID];o&&(this.previousTotalRankPoints=o.totalRankPoints)}},GameOverScreen.prototype.onCooldownStarted=function(t,e,n,i){if(this.autoRespawnOnFocusGain=!1,this.localPlayerID&&i){var s=i[this.localPlayerID];s&&(this.rankPointsEarnedInPreviousRound=s.score,this.firebaseManager.authenticated?(this.gameOverRankUpHelper.setLoggedInState(!0),this.gameOverRankUpHelper.setContent(this.previousTotalRankPoints,this.rankPointsEarnedInPreviousRound,!0)):(this.gameOverRankUpHelper.setLoggedInState(!1),this.gameOverRankUpHelper.setContent(0,0,!0)),this.rankUpProgressGroup.enabled=!0,this.hasUnseenRankProgress=!0)}},GameOverScreen.prototype.onWindowLostFocus=function(t){this.isInFocus=!1},GameOverScreen.prototype.onWindowGainedFocus=function(t){this.isInFocus=!0,this.autoRespawnOnFocusGain&&(this.respawnButtonScript.buttonClicked(),this.autoRespawnOnFocusGain=!1)},GameOverScreen.prototype.LocalPlayerCreated=function(t,e,n,i,s){this.localPlayerID=t,s&&(this.currentArenaIsPrivate=s.isArenaPrivate)};var EnemiesController=pc.createScript("enemiesController");EnemiesController.attributes.add("effectControllerEntity",{type:"entity"}),EnemiesController.attributes.add("lerp",{type:"boolean",default:!0,title:"Lerp Position"}),EnemiesController.attributes.add("predict",{type:"boolean",default:!0,title:"Predict Position"}),EnemiesController.attributes.add("maxPredictTime",{type:"number",default:.2,title:"Max Time to Predict"}),EnemiesController.attributes.add("gameOverCameraEntity",{type:"entity"}),EnemiesController.prototype.init=function(e){var t=this;this.networkScript=e,this.resetCache(),this.networkScript.on("enemyPlayerMoved",this.OnEnemyPlayerMoved,this),this.app.on("playersUpdated",this.OnPlayersUpdated,this),this.app.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.app.on("enemyAnimationChanged",this.OnEnemyAnimationChanged,this),this.app.on("cooldownStarted",this.OnCooldownStarted,this),this.app.on("respawn",this.OnRespawn,this),this.app.on("killMade",this.onKillMade,this),this.app.on("leftGame",this.OnLeftGame,this),this.app.scene.layers.getLayerByName("World").onPostCull=function(e){t.checkEnemyVisibility()},this.localPlayerCameraRotation=new pc.Quat},EnemiesController.prototype.checkEnemyVisibility=function(){for(var e in this.enemyModelEnemyScripts){var t;this.enemyModelEnemyScripts[e].characterType==CharacterID.Ape?t=this.enemyModelEnemyScripts[e].entity.model.meshInstances[1]:this.enemyModelEnemyScripts[e].characterType!=CharacterID.Bull&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Rhino&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Lion&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Chicken&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Fox&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Toucan&&this.enemyModelEnemyScripts[e].characterType!=CharacterID.Dog||(t=this.enemyModelEnemyScripts[e].entity.model.meshInstances[0]),t&&this.enemyModelEnemyScripts[e].SetThisFrameVisibility(t.visibleThisFrame)}},EnemiesController.prototype.update=function(e){this.monitorEnemiesMovement&&null!=this.enemies&&null!=this.localPlayerCamera&&this.updateEnemyPositionsAndRotations(e)},EnemiesController.prototype.OnPlayersUpdated=function(e,t,i){if(null!=t)for(var n in t)if(n!=e){if(!Object.keys(this.enemies).includes(n)){this.enemyLerpedPositions[n]=new pc.Vec3(t[n].position.x,t[n].position.y,t[n].position.z),this.enemyFinalTargetPositions[n]=new pc.Vec3(t[n].position.x,t[n].position.y,t[n].position.z),this.enemyLastKnownPositions[n]=new pc.Vec3(t[n].position.x,t[n].position.y,t[n].position.z),this.enemyTargetDirections[n]=new pc.Vec3(0,0,0),this.enemyReceivedDataThisFrame[n]=!1,this.enemyCurrentPredictTimes[n]=0,this.enemyAnimationStates[n]=EnemyAnimationState.Stand,this.enemyLerpedRotations[n]=new pc.Quat(0,0,0,0),this.enemyTargetRotations[n]=new pc.Quat(0,0,0,0);var s=i[n];this.enemyReceivedTargetPositions[n]=new pc.Vec3(t[n].position.x,t[n].position.y,t[n].position.z);var o=s.script.playerManager;this.enemyHealthUI[n]=o.enemyHealthBarEntity,this.enemyModelRoots[n]=o.enemyRootForRotationEntity,this.enemyCameras[n]=o.cameraEntity,this.enemyModelEnemyScripts[n]=o.enemyModelEntity.script.enemyModel,i[n].rigidbody.teleport(this.enemyReceivedTargetPositions[n])}this.enemies[n]=t[n],this.enemyEntities[n]=i[n]}else this.localPlayerCamera=i[n].script.playerManager.cameraEntity;if(null!=this.enemies)for(var a in this.enemies)this.enemies[a].isConnected||this.clearPlayerCache(a);this.monitorEnemiesMovement=Object.keys(this.enemies).length>0},EnemiesController.prototype.OnRespawn=function(e,t){if(t)this.monitorEnemiesMovement=Object.keys(this.enemies).length>0;else if(null!=this.enemies[e.id]){var i=e.id;this.enemies[i]=e,this.enemyLerpedPositions[i].set(e.position.x,e.position.y,e.position.z),this.enemyFinalTargetPositions[i].set(e.position.x,e.position.y,e.position.z),this.enemyLastKnownPositions[i].set(e.position.x,e.position.y,e.position.z),this.enemyTargetDirections[i].set(0,0,0),this.enemyReceivedDataThisFrame[i]=!1,this.enemyCurrentPredictTimes[i]=0,this.enemyAnimationStates[i]=EnemyAnimationState.Stand,this.enemyLerpedRotations[i].set(0,0,0,0),this.enemyTargetRotations[i].set(0,0,0,0),this.enemyReceivedTargetPositions[i].set(e.position.x,e.position.y,e.position.z),this.enemyEntities[i].rigidbody.teleport(this.enemyReceivedTargetPositions[i])}},EnemiesController.prototype.onEnemyPlayerDisconnected=function(e){null!=this.enemies[e.id]&&(this.enemies[e.id]=e,e.isConnected||this.clearPlayerCache(e.id))},EnemiesController.prototype.onKillMade=function(e,t,i,n){null!=this.enemies[t.id]&&(this.enemies[t.id]=t),null!=this.enemies[e.id]&&(this.enemies[e.id]=e)},EnemiesController.prototype.OnLeftGame=function(){this.resetCache()},EnemiesController.prototype.OnCooldownStarted=function(){this.resetCache()},EnemiesController.prototype.OnEnemyPlayerMoved=function(e){if(null!=e&&null!=e.id&&null!=this.enemyEntities&&null!=this.enemyEntities[e.id]){this.enemyReceivedTargetPositions[e.id].set(e.position.x,e.position.y,e.position.z),this.enemyReceivedDataThisFrame[e.id]=!0,this.enemyCameras[e.id].setEulerAngles(e.rotation.x,e.rotation.y,e.rotation.z);var t=this.getYaw(this.enemyCameras[e.id].getRotation());this.enemyTargetRotations[e.id].setFromEulerAngles(0,t,0)}},EnemiesController.prototype.updateEnemyPositionsAndRotations=function(e){for(var t in this.localPlayerCameraRotation=this.localPlayerCamera.getRotation(),this.enemies)if(void 0!==this.enemyLerpedPositions[t]&&null!==this.enemies[t]&&null!==this.enemyEntities[t]&&void 0!==this.enemyEntities[t].script&&this.enemies[t].isAlive&&this.enemyEntities[t].enabled){var i=this.enemyEntities[t],n=this.enemyModelRoots[t],s=this.enemyHealthUI[t],o=i.script.playerManager;this.predict?this.enemyReceivedDataThisFrame[t]?(this.enemyReceivedDataThisFrame[t]=!1,this.enemyCurrentPredictTimes[t]=0,this.enemyTargetDirections[t].sub2(this.enemyReceivedTargetPositions[t],this.enemyLastKnownPositions[t]).normalize(),this.enemyFinalTargetPositions[t].set(this.enemyReceivedTargetPositions[t].x,this.enemyReceivedTargetPositions[t].y,this.enemyReceivedTargetPositions[t].z),this.enemyLastKnownPositions[t].set(this.enemyReceivedTargetPositions[t].x,this.enemyReceivedTargetPositions[t].y,this.enemyReceivedTargetPositions[t].z)):this.enemyCurrentPredictTimes[t]<this.maxPredictTime&&(this.enemyAnimationStates[t]===EnemyAnimationState.Run||this.enemyAnimationStates[t]===EnemyAnimationState.StrafeLeft||this.enemyAnimationStates[t]===EnemyAnimationState.StrafeRight||this.enemyAnimationStates[t]===EnemyAnimationState.RunBackwards||this.enemyAnimationStates[t]===EnemyAnimationState.RunJump)&&(this.enemyCurrentPredictTimes[t]+=e,this.enemyFinalTargetPositions[t].x+=this.enemyTargetDirections[t].x*e*this.enemyMovementPredictSpeed,this.enemyFinalTargetPositions[t].y+=this.enemyTargetDirections[t].y*e*this.enemyMovementPredictSpeed,this.enemyFinalTargetPositions[t].z+=this.enemyTargetDirections[t].z*e*this.enemyMovementPredictSpeed):this.enemyFinalTargetPositions[t].set(this.enemyReceivedTargetPositions[t].x,this.enemyReceivedTargetPositions[t].y,this.enemyReceivedTargetPositions[t].z);var a=pc.math.clamp(this.enemyLerpAnimationSpeed*e,0,1);if(this.enemyLerpedPositions[t].lerp(i.getPosition(),this.enemyFinalTargetPositions[t],a),this.lerp?i.rigidbody.teleport(this.enemyLerpedPositions[t]):i.rigidbody.teleport(this.enemyFinalTargetPositions[t]),this.enemyLerpedRotations[t].slerp(n.getRotation(),this.enemyTargetRotations[t],a),n.setRotation(this.enemyLerpedRotations[t]),this.gameOverCameraEntity.enabled?s.setRotation(0,this.gameOverCameraEntity.getRotation().y,0,this.gameOverCameraEntity.getRotation().w):s.setRotation(0,this.localPlayerCameraRotation.y,0,this.localPlayerCameraRotation.w),o.hitDetectorEntity.script.playerHitDetector.isInWater){var r=i.getPosition();if(i.lastRipplePos||(i.lastRipplePos=r.clone()),r.clone().sub(i.lastRipplePos).length()>.5){i.lastRipplePos=r.clone();r.y=-12.62,this.effectControllerEntity.script.effectController.startNewRipple(r,.5+Math.random())}}}},EnemiesController.prototype.getYaw=function(e){var t=this.transformedEnemyForward;return e.transformVector(pc.Vec3.FORWARD,t),Math.atan2(-t.x,-t.z)*pc.math.RAD_TO_DEG},EnemiesController.prototype.OnEnemyAnimationChanged=function(e,t){null!=e&&null!=this.enemyModelEnemyScripts[e]&&(this.enemyAnimationStates[e]=t)},EnemiesController.prototype.resetCache=function(){this.monitorEnemiesMovement=!1,this.localPlayerCamera=null,this.enemies={},this.enemyEntities={},this.enemyCameras={},this.enemyHealthUI={},this.enemyModelRoots={},this.enemyModelEnemyScripts={},this.enemyLerpAnimationSpeed=15,this.enemyMovementPredictSpeed=11,this.enemyLerpedPositions={},this.enemyFinalTargetPositions={},this.enemyLastKnownPositions={},this.enemyTargetDirections={},this.enemyReceivedDataThisFrame={},this.enemyCurrentPredictTimes={},this.enemyAnimationStates={},this.enemyLerpedRotations={},this.enemyTargetRotations={},this.enemyReceivedTargetPositions={},this.transformedEnemyForward=new pc.Vec3},EnemiesController.prototype.clearPlayerCache=function(e){delete this.enemies[e],delete this.enemyEntities[e],delete this.enemyLerpedPositions[e],delete this.enemyFinalTargetPositions[e],delete this.enemyLastKnownPositions[e],delete this.enemyTargetDirections[e],delete this.enemyReceivedDataThisFrame[e],delete this.enemyCurrentPredictTimes[e],delete this.enemyAnimationStates[e],delete this.enemyLerpedRotations[e],delete this.enemyTargetRotations[e],delete this.enemyReceivedTargetPositions[e],delete this.enemyHealthUI[e],delete this.enemyModelRoots[e],delete this.enemyCameras[e],delete this.enemyModelEnemyScripts[e],this.monitorEnemiesMovement=Object.keys(this.enemies).length>0};var WaitingForOpponentsManager=pc.createScript("waitingForOpponentsManager");WaitingForOpponentsManager.prototype.initialize=function(){},WaitingForOpponentsManager.prototype.update=function(n){};var RingOffireController=pc.createScript("ringOffireController");RingOffireController.attributes.add("waterEntity",{type:"entity",title:"Water"}),RingOffireController.attributes.add("waterColliderEntity",{type:"entity",title:"Water Collider"}),RingOffireController.attributes.add("hasInitialized",{type:"boolean",default:!1}),RingOffireController.prototype.init=function(){this.hasInitialized||(this.isRingEnabled=!1,this.waterDepth=0,this.waterLevel=0,this.waterColliderLevel=0,this.waterRaiseFrequency=0,this.waterLevelTarget=0,this.waterRaiseAmount=0,this.waterRiseAmountAdjusted=0,this.waterPosition=this.waterEntity.getPosition(),this.waterColliderPosition=this.waterColliderEntity.getPosition(),this.app.on("waitingForOpponentsTimerStart",this.OnWaitingForOpponentsStarted,this),this.app.on("waterLevelRaised",this.OnWaterLevelRaised,this),this.app.on("gameStart",this.OnGameStarted,this),this.app.on("gameOver",this.OnGameOver,this),this.hasInitialized=!0)},RingOffireController.prototype.update=function(t){if(this.isRingEnabled&&(this.waterRiseAmountAdjusted=this.waterRiseAmount/(1/t),this.waterLevel>0&&this.waterLevelTarget-this.waterLevel>this.waterRiseAmount*this.waterRaiseFrequency&&(this.waterRiseAmountAdjusted=this.waterLevelTarget-this.waterLevel),this.waterRiseAmountAdjusted>0&&(this.waterEntity.translate(0,this.waterRiseAmountAdjusted,0),this.waterLevel+=this.waterRiseAmountAdjusted,this.waterLevel-this.waterColliderLevel>this.waterDepth))){var e=this.waterLevel-(this.waterColliderLevel+this.waterDepth);this.waterColliderEntity.translate(0,e,0),this.waterColliderLevel+=e}},RingOffireController.prototype.OnWaterLevelRaised=function(t,e,i,r){this.waterDepth=e,this.waterRaiseFrequency=r,this.waterLevelTarget=t,this.waterRiseAmount=i},RingOffireController.prototype.OnWaitingForOpponentsStarted=function(){this.waterLevel>0&&(this.waterEntity.setPosition(this.waterPosition.x,this.waterPosition.y-this.waterLevel,this.waterPosition.z),this.waterColliderEntity.setPosition(this.waterColliderPosition.x,this.waterColliderPosition.y-this.waterLevel+this.waterDepth,this.waterColliderPosition.z)),this.isRingEnabled=!1,this.waterDepth=0,this.waterLevel=0,this.waterColliderLevel=0,this.waterRaiseFrequency=0,this.waterLevelTarget=0,this.waterRaiseAmount=0,this.waterRiseAmountAdjusted=0},RingOffireController.prototype.OnGameStarted=function(){this.isRingEnabled=!0},RingOffireController.prototype.OnGameOver=function(){this.isRingEnabled=!1};var PhysicsLayer=pc.createScript("physicsLayer");PhysicsLayer.attributes.add("groupA",{type:"boolean",default:!1,title:"Group A"}),PhysicsLayer.attributes.add("groupB",{type:"boolean",default:!1,title:"Group B"}),PhysicsLayer.attributes.add("groupC",{type:"boolean",default:!1,title:"Group C"}),PhysicsLayer.attributes.add("groupD",{type:"boolean",default:!1,title:"Group D"}),PhysicsLayer.attributes.add("groupE",{type:"boolean",default:!1,title:"Group E"}),PhysicsLayer.attributes.add("maskAll",{type:"boolean",default:!0,title:"Mask All"}),PhysicsLayer.attributes.add("maskA",{type:"boolean",default:!1,title:"Mask A"}),PhysicsLayer.attributes.add("maskB",{type:"boolean",default:!1,title:"Mask B"}),PhysicsLayer.attributes.add("maskC",{type:"boolean",default:!1,title:"Mask C"}),PhysicsLayer.attributes.add("maskD",{type:"boolean",default:!1,title:"Mask D"}),PhysicsLayer.attributes.add("maskE",{type:"boolean",default:!1,title:"Mask E"}),PhysicsLayer.prototype.initialize=function(){var t=this.entity.rigidbody;this.groupA&&(t.group|=pc.BODYGROUP_USER_1),this.groupB&&(t.group|=pc.BODYGROUP_USER_2),this.groupC&&(t.group|=pc.BODYGROUP_USER_3),this.groupD&&(t.group|=pc.BODYGROUP_USER_4),this.groupE&&(t.group=pc.BODYGROUP_TRIGGER,t.group|=pc.BODYGROUP_USER_5),t.mask=pc.BODYMASK_NONE,this.maskAll&&(t.mask|=pc.BODYMASK_ALL),this.maskA&&(t.mask|=pc.BODYGROUP_USER_1),this.maskB&&(t.mask|=pc.BODYGROUP_USER_2),this.maskC&&(t.mask|=pc.BODYGROUP_USER_3),this.maskD&&(t.mask|=pc.BODYGROUP_USER_4),this.maskE&&(t.mask=pc.BODYGROUP_TRIGGER,t.mask|=pc.BODYGROUP_USER_5)};var TriggerLayer=pc.createScript("triggerLayer");TriggerLayer.attributes.add("groupA",{type:"boolean",default:!1,title:"Group A"}),TriggerLayer.attributes.add("groupB",{type:"boolean",default:!1,title:"Group B"}),TriggerLayer.attributes.add("groupC",{type:"boolean",default:!1,title:"Group C"}),TriggerLayer.attributes.add("groupD",{type:"boolean",default:!1,title:"Group D"}),TriggerLayer.attributes.add("groupE",{type:"boolean",default:!1,title:"Group E"}),TriggerLayer.prototype.initialize=function(){var t=this.entity.trigger.body,r=4;this.groupA&&(r|=pc.BODYGROUP_USER_1),this.groupB&&(r|=pc.BODYGROUP_USER_2),this.groupC&&(r|=pc.BODYGROUP_USER_3),this.groupD&&(r|=pc.BODYGROUP_USER_4),this.groupE&&(r|=pc.BODYGROUP_USER_5),t.setCollisionFlags(r)};!function(){var t=new Ammo.btVector3,e=new Ammo.btVector3,o=function RaycastResult(t,e,o){this.entity=t,this.point=e,this.normal=o};pc.RigidBodyComponentSystem.prototype.raycastFiltered=function(i,s,n,l){t.setValue(i.x,i.y,i.z),e.setValue(s.x,s.y,s.z);var m=new Ammo.ClosestRayResultCallback(t,e);m.set_m_collisionFilterGroup(n),m.set_m_collisionFilterMask(l),this.app.systems.rigidbody.dynamicsWorld.rayTest(t,e,m);var r=null;if(m.hasHit()){var a=m.get_m_collisionObject(),c=Ammo.castObject(a,Ammo.btRigidBody),y=m.get_m_hitPointWorld(),d=m.get_m_hitNormalWorld();c&&(r=new o(c.entity,new pc.Vec3(y.x(),y.y(),y.z()),new pc.Vec3(d.x(),d.y(),d.z())))}return Ammo.destroy(m),r}}();var PlayerSoundManager=pc.createScript("playerSoundManager");PlayerSoundManager.attributes.add("audioListenerEntity",{type:"entity",title:"Audio Listener"}),PlayerSoundManager.attributes.add("movementSoundEmitterEntity",{type:"entity",title:"Movement Sound Emitter"}),PlayerSoundManager.attributes.add("shootingSoundEmitterEntity",{type:"entity",title:"Shooting Sound Emitter"}),PlayerSoundManager.attributes.add("hasInitialized",{type:"boolean",default:!1}),PlayerSoundManager.attributes.add("footstepIntervalRunForward",{type:"number",default:.36}),PlayerSoundManager.attributes.add("footstepIntervalRunBackwards",{type:"number",default:.5}),PlayerSoundManager.attributes.add("footstepIntervalStrafe",{type:"number",default:.5}),PlayerSoundManager.attributes.add("numberOfSoundsRunGround",{type:"number",default:17}),PlayerSoundManager.attributes.add("numberOfSoundsRunWater",{type:"number",default:12}),PlayerSoundManager.attributes.add("numberOfSoundsRunWood",{type:"number",default:7}),PlayerSoundManager.attributes.add("numberOfSoundsWaterEmerge",{type:"number",default:2}),PlayerSoundManager.attributes.add("bulletRicochetVariations",{type:"number",default:6}),PlayerSoundManager.attributes.add("weaponRevolverVariations",{type:"number",default:6}),PlayerSoundManager.attributes.add("weaponRifleVariations",{type:"number",default:5}),PlayerSoundManager.attributes.add("weaponShotgunVariations",{type:"number",default:4}),PlayerSoundManager.attributes.add("weaponUziVariations",{type:"number",default:7}),PlayerSoundManager.attributes.add("weaponUziReverbVariations",{type:"number",default:3}),PlayerSoundManager.attributes.add("rocketLauncherShotVariations",{type:"number",default:2}),PlayerSoundManager.attributes.add("weaponTommygunVariations",{type:"number",default:7}),PlayerSoundManager.attributes.add("weaponTommygunReverbVariations",{type:"number",default:3}),PlayerSoundManager.prototype.init=function(t,e,n,a,i){var o=this;this.playerID=e,this.characterType=i,this.isLocalPlayer=n,this.localPlayerCamera=a,t.musicBundleAsset.ready((function(t){var e=this.app.assets.find("player_run_firm_x17_0.250sec.mp3","audio"),n=this.movementSoundEmitterEntity.sound.slot("run");n.asset=e,n.duration=.25,e=this.app.assets.find("player_run_water_x12_0.650sec.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("run_water")).asset=e,n.duration=.62,e=this.app.assets.find("player_water_emerge_x2_2s.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("water_emerge")).asset=e,n.duration=2,e=this.app.assets.find("player_run_wood_x7_0.250sec.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("run_wood")).asset=e,n.duration=.5,e=this.app.assets.find("revolver_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_revolver").asset=e,e=this.app.assets.find("uzi_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_uzi").asset=e,e=this.app.assets.find("rocket_launcher_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_rocket_launcher").asset=e,e=this.app.assets.find("shotgun_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_shotgun").asset=e,e=this.app.assets.find("tommygun_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_tommygun").asset=e,e=this.app.assets.find("rifle_pickup.mp3","audio"),this.movementSoundEmitterEntity.sound.slot("pickup_rifle").asset=e,e=this.app.assets.find("jump_fox_0.25sec_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("jump_fox")).asset=e,n.duration=.25,e=this.app.assets.find("jump_chicken_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("jump_chicken")).asset=e,n.duration=.25,e=this.app.assets.find("jump_bull_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.slot("jump_bull")).asset=e,n.duration=.25,e=this.app.assets.find("jump_ape_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.addSlot("jump_ape")).asset=e,n.duration=.25,e=this.app.assets.find("jump_lion_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.addSlot("jump_lion")).asset=e,n.duration=.25,e=this.app.assets.find("jump_toucan_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.addSlot("jump_toucan")).asset=e,n.duration=.25,e=this.app.assets.find("jump_rhino_0.25s_x3.mp3","audio"),(n=this.movementSoundEmitterEntity.sound.addSlot("jump_rhino")).asset=e,n.duration=.25,e=this.app.assets.find("rifle_fire_x5_1.5sec.mp3","audio");var a=this.shootingSoundEmitterEntity.sound.slot("rifle_shot");a.asset=e,a.duration=1.5,e=this.app.assets.find("shotgun_fire_x4_1.5sec.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("shotgun_shot")).asset=e,a.duration=1.5,e=this.app.assets.find("rocket_launcher_shot_x2_1.5sec.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("rocket_launcher_shot")).asset=e,a.duration=1.5,e=this.app.assets.find("revolver_fire_x6_1.5sec.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("pistol_shot")).asset=e,a.duration=1.5,e=this.app.assets.find("uzi_shot_x7_0.13sec.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("uzi_shot")).asset=e,a.duration=.13,e=this.app.assets.find("uzi_reverb_x3_1sec_v2.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("uzi_reverb")).asset=e,a.duration=1,e=this.app.assets.find("tommygun_shot_x7_0.25sec.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("tommygun_shot")).asset=e,a.duration=.25,e=this.app.assets.find("tommygun_reverb_x3_1sec_v2.mp3","audio"),(a=this.shootingSoundEmitterEntity.sound.slot("tommygun_reverb")).asset=e,a.duration=1,e=this.app.assets.find("die1.mp3","audio"),this.shootingSoundEmitterEntity.sound.slot("die_rocket").asset=e,e=this.app.assets.find("die2.mp3","audio"),this.shootingSoundEmitterEntity.sound.slot("die").asset=e,e=this.app.assets.find("die_chicken.mp3","audio"),this.shootingSoundEmitterEntity.sound.slot("die_chicken").asset=e,e=this.app.assets.find("die_bull.mp3","audio"),this.shootingSoundEmitterEntity.sound.slot("die_bull").asset=e,e=this.app.assets.find("die_fox.mp3","audio"),this.shootingSoundEmitterEntity.sound.slot("die_fox").asset=e,e=this.app.assets.find("die_ape.mp3","audio"),this.shootingSoundEmitterEntity.sound.addSlot("die_ape").asset=e,e=this.app.assets.find("die_lion.mp3","audio"),this.shootingSoundEmitterEntity.sound.addSlot("die_lion").asset=e,e=this.app.assets.find("die_rhino.mp3","audio"),this.shootingSoundEmitterEntity.sound.addSlot("die_rhino").asset=e,e=this.app.assets.find("die_toucan.mp3","audio"),this.shootingSoundEmitterEntity.sound.addSlot("die_toucan").asset=e,e=this.app.assets.find("damage_bull_0.5s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.slot("damage_bull")).asset=e,a.duration=.5,e=this.app.assets.find("damage_chicken_0.25s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.slot("damage_chicken")).asset=e,a.duration=.25,e=this.app.assets.find("damage_fox_0.25s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.slot("damage_fox")).asset=e,a.duration=.25,e=this.app.assets.find("damage_ape_0.5s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.addSlot("damage_ape")).asset=e,a.duration=.5,e=this.app.assets.find("damage_lion_0.5s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.addSlot("damage_lion")).asset=e,a.duration=.5,e=this.app.assets.find("damage_toucan_0.5s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.addSlot("damage_toucan")).asset=e,a.duration=.5,e=this.app.assets.find("damage_rhino_0.5s_x4.mp3","audio"),(a=o.shootingSoundEmitterEntity.sound.addSlot("damage_rhino")).asset=e,a.duration=.5}),this),this.isInWater=!1,this.selectedWeaponID=null,this.isShooting=!1,this.lastRandomMovementSoundNumber=null,this.lastRandomWeaponSoundNumber=null,this.currentGroundMaterial="material_dirt",this.hasInitialized||(n?(this.audioListenerEntity.audiolistener.enabled=!0,this.app.on("sendAnimationState",this.OnAnimationStateChanged,this),this.app.on("bulletFired",this.onBulletFired,this),this.app.on("shootingStopped",this.onShootingStopped,this),this.app.on("rayFired",this.onRayFired,this),this.app.on("weaponPickedUp",this.OnWeaponPickedUp,this),this.app.on("weaponSwitched",this.OnWeaponSwitched,this)):(this.audioListenerEntity.removeComponent("audiolistener"),this.app.on("enemyAnimationChanged",this.OnAnimationStateChanged,this),this.app.on("enemyBulletFired",this.onBulletFired,this),this.app.on("enemyShootingStopped",this.onShootingStopped,this),this.app.on("enemyRayFired",this.onRayFired,this),this.app.on("refreshPickupPoint",this.OnWeaponPickedUp,this)),this.app.on("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.on("respawn",this.onRespawnGranted,this),this.app.on("cooldownStarted",this.OnCooldownStarted,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("killMade",this.OnKillMade,this),this.on("destroy",this.onDestroy,this),this.hasInitialized=!0)},PlayerSoundManager.prototype.onDestroy=function(){this.isLocalPlayer?(this.app.off("sendAnimationState",this.OnAnimationStateChanged,this),this.app.off("bulletFired",this.onBulletFired,this),this.app.off("rayFired",this.onRayFired,this),this.app.off("weaponPickedUp",this.OnWeaponPickedUp,this),this.app.off("weaponSwitched",this.OnWeaponSwitched,this),this.app.off("shootingStopped",this.onShootingStopped,this)):(this.app.off("enemyAnimationChanged",this.OnAnimationStateChanged,this),this.app.off("enemyBulletFired",this.onBulletFired,this),this.app.off("enemyRayFired",this.onRayFired,this),this.app.off("refreshPickupPoint",this.OnWeaponPickedUp,this),this.app.off("enemyShootingStopped",this.onShootingStopped,this)),this.app.off("jumpingStateChanged",this.OnJumpingStateChanged,this),this.app.off("respawn",this.onRespawnGranted,this),this.app.off("cooldownStarted",this.OnCooldownStarted,this),this.app.off("connectionLost",this.onConnectionLost,this),this.app.off("killMade",this.OnKillMade,this),clearInterval(this.playRunSoundInterval)},PlayerSoundManager.prototype.OnJumpingStateChanged=function(t,e){!1===t&&e.includes("material_dirt")&&this.playFootstep()},PlayerSoundManager.prototype.OnCooldownStarted=function(){clearInterval(this.playRunSoundInterval),this.movementSoundEmitterEntity.sound.stop(),this.selectedWeaponID=null},PlayerSoundManager.prototype.OnKillMade=function(t,e,n){n&&(this.movementSoundEmitterEntity.sound.stop(),this.selectedWeaponID=null)},PlayerSoundManager.prototype.onConnectionLost=function(){this.movementSoundEmitterEntity.sound.stop(),this.shootingSoundEmitterEntity.sound.stop(),this.selectedWeaponID=null},PlayerSoundManager.prototype.OnWeaponSwitched=function(t,e){this.selectedWeaponID==Weapons.Pistols&&this.movementSoundEmitterEntity.sound.play("pickup_revolver"),this.selectedWeaponID=e},PlayerSoundManager.prototype.onPlayerIsInWaterStateChanged=function(t){this.isInWater&&!1===t&&this.playRandomMovementSound("water_emerge",this.numberOfSoundsWaterEmerge,this.soundDurationWaterEmerge),this.isInWater=t},PlayerSoundManager.prototype.onPlayerGroundMaterialChanged=function(t){this.currentGroundMaterial=t},PlayerSoundManager.prototype.onPlayerTakingDamage=function(t){var e="";switch(this.characterType){case CharacterID.Fox:e="damage_fox";break;case CharacterID.Ape:e="damage_ape";break;case CharacterID.Bull:case CharacterID.Dog:e="damage_bull";break;case CharacterID.Rhino:e="damage_rhino";break;case CharacterID.Lion:e="damage_lion";break;case CharacterID.Chicken:e="damage_chicken";break;case CharacterID.Toucan:e="damage_toucan"}this.playRandomWeaponSound(e,4)},PlayerSoundManager.prototype.OnWeaponPickedUp=function(t,e,n,a,i,o){switch(e){case Weapons.Pistols:this.movementSoundEmitterEntity.sound.play("pickup_revolver");break;case Weapons.Rifle:this.movementSoundEmitterEntity.sound.play("pickup_rifle");break;case Weapons.Shotgun:this.movementSoundEmitterEntity.sound.play("pickup_shotgun");break;case Weapons.Minigun:this.movementSoundEmitterEntity.sound.play("pickup_tommygun");break;case Weapons.RocketLauncher:this.movementSoundEmitterEntity.sound.play("pickup_rocket_launcher");break;case Weapons.Uzi:this.movementSoundEmitterEntity.sound.play("pickup_uzi");break;case Weapons.None:}},PlayerSoundManager.prototype.OnAnimationStateChanged=function(t,e){this.isLocalPlayer?(e!==EnemyAnimationState.Die,this.isShooting=e===EnemyAnimationState.Shoot):this.playerID;var n=-1;switch(e){case EnemyAnimationState.Run:n=this.footstepIntervalRunForward;break;case EnemyAnimationState.StrafeRight:case EnemyAnimationState.StrafeLeft:n=this.footstepIntervalStrafe;break;case EnemyAnimationState.RunBackwards:n=this.footstepIntervalRunBackwards;break;default:n=-1}n>0?(clearInterval(this.playRunSoundInterval),this.playRunSoundInterval=setInterval(function(){this.playFootstep()}.bind(this),1e3*n)):clearInterval(this.playRunSoundInterval),e!=EnemyAnimationState.Jump&&e!=EnemyAnimationState.RunJump||this.playJumpSound()},PlayerSoundManager.prototype.onBulletFired=function(t,e,n){this.playerID===e&&this.onWeaponFired(n)},PlayerSoundManager.prototype.onRayFired=function(t,e){this.playerID===t&&this.onWeaponFired(e)},PlayerSoundManager.prototype.onWeaponFired=function(t){if(soundEnabled)switch(isLocalPlayerAlive?(this.movementSoundEmitterEntity.sound.volume=1,this.shootingSoundEmitterEntity.sound.volume=1):(this.movementSoundEmitterEntity.sound.volume=.2,this.shootingSoundEmitterEntity.sound.volume=.2),t.weaponType){case Weapons.Uzi:this.playRandomWeaponSound("uzi_shot",this.weaponUziVariations);break;case Weapons.Pistols:this.playRandomWeaponSound("pistol_shot",this.weaponRevolverVariations);break;case Weapons.Rifle:this.playRandomWeaponSound("rifle_shot",this.weaponRifleVariations);break;case Weapons.Shotgun:this.playRandomWeaponSound("shotgun_shot",this.weaponShotgunVariations);break;case Weapons.Minigun:this.playRandomWeaponSound("tommygun_shot",this.weaponTommygunVariations);break;case Weapons.RocketLauncher:this.playRandomWeaponSound("rocket_launcher_shot",this.rocketLauncherShotVariations)}},PlayerSoundManager.prototype.onShootingStopped=function(t,e,n){if(n===this.playerID)switch(e){case Weapons.Uzi:this.playRandomWeaponSound("uzi_reverb",this.weaponUziReverbVariations);break;case Weapons.Minigun:this.playRandomWeaponSound("tommygun_reverb",this.weaponTommygunReverbVariations)}},PlayerSoundManager.prototype.playFootstep=function(t){var e="run",n=1;switch(this.isInWater){case!0:e="run_water",n=this.numberOfSoundsRunWater;break;case!1:switch(this.currentGroundMaterial){case"material_wood":e="run_wood",n=this.numberOfSoundsRunWood;break;case"material_dirt":default:e="run",n=this.numberOfSoundsRunGround}}t=void 0!==t?t:this.movementSoundEmitterEntity.sound.slot(e).volume,this.playRandomMovementSound(e,n,!1,!1,t)},PlayerSoundManager.prototype.playJumpSound=function(){var t="";switch(this.characterType){case CharacterID.Ape:t="jump_ape";break;case CharacterID.Fox:t="jump_fox";break;case CharacterID.Bull:case CharacterID.Dog:t="jump_bull";break;case CharacterID.Rhino:t="jump_rhino";break;case CharacterID.Lion:t="jump_lion";break;case CharacterID.Chicken:t="jump_chicken";break;case CharacterID.Toucan:t="jump_toucan"}this.playRandomMovementSound(t,3,!1,!0)},PlayerSoundManager.prototype.playDieSound=function(t,e){e=void 0!==e&&e,this.shootingSoundEmitterEntity.sound.slot(e?"die_rocket":"die").play();var n="";switch(t){case CharacterID.Fox:n="die_fox";break;case CharacterID.Ape:n="die_ape";break;case CharacterID.Bull:case CharacterID.Dog:n="die_bull";break;case CharacterID.Rhino:n="die_rhino";break;case CharacterID.Lion:n="die_lion";break;case CharacterID.Chicken:n="die_chicken";break;case CharacterID.Toucan:n="die_toucan"}this.shootingSoundEmitterEntity.sound.slot(n).play()},PlayerSoundManager.prototype.playRandomMovementSound=function(t,e,n,a,i){if(n=void 0!==n&&n,a=void 0!==a&&a,this.isLocalPlayer||!a){if(!this.isLocalPlayer&&!1===n&&void 0!==this.localPlayerCamera)if(this.localPlayerCamera.getPosition().distance(this.entity.getPosition())>this.shootingSoundEmitterEntity.sound.maxDistance)return;var o=null;do{o=Math.floor(generateRandomNumber()*e)}while(o==this.lastRandomMovementSoundNumber);this.lastRandomMovementSoundNumber=o,this.movementSoundEmitterEntity.sound.slots[t].startTime=o*this.movementSoundEmitterEntity.sound.slots[t].duration,void 0!==i&&(this.movementSoundEmitterEntity.sound.slots[t].volume=i),this.movementSoundEmitterEntity.sound.slots[t].play()}},PlayerSoundManager.prototype.playRandomWeaponSound=function(t,e,n){if((n=void 0!==n&&n,!this.isLocalPlayer&&!1===n&&void 0!==this.localPlayerCamera)&&this.localPlayerCamera.getPosition().distance(this.entity.getPosition())>this.shootingSoundEmitterEntity.sound.maxDistance)return;var a=null;do{a=Math.floor(Math.random()*e)}while(a==this.lastRandomWeaponSoundNumber);this.lastRandomWeaponSoundNumber=a,this.shootingSoundEmitterEntity.sound.slots[t].startTime=a*this.shootingSoundEmitterEntity.sound.slots[t].duration,this.shootingSoundEmitterEntity.sound.slots[t].play(),this.timeSinceLastBullet=0},PlayerSoundManager.prototype.onRespawnGranted=function(t,e){this.playerID===t.id&&t.isAlive&&t.isConnected&&(this.isInWater=!1)};var AmbientSoundManager=pc.createScript("ambientSoundManager");AmbientSoundManager.prototype.init=function(t){this.isWindowFocused=!0,this.shouldPlayAmbientSound=!0,t.musicBundleAsset.ready((function(t){var n=this.app.assets.find("ambience_countryside_birds.mp3","audio");this.entity.sound.slot("ambient").asset=n}),this),this.app.on("sessionStarted",this.OnSessionStarted,this),this.app.on("cooldownStarted",this.OnCooldownStarted,this),this.app.on("respawn",this.OnRespawn,this),this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("windowLostFocus",this.onWindowLostFocus,this),this.app.on("windowGainedFocus",this.onWindowGainedFocus,this)},AmbientSoundManager.prototype.OnSessionStarted=function(t,n,o){this.isWindowFocused&&(o?(this.shouldPlayAmbientSound=!0,this.entity.sound.play("ambient")):this.shouldPlayAmbientSound=!1)},AmbientSoundManager.prototype.OnRespawn=function(t,n,o){this.isWindowFocused&&n&&(this.shouldPlayAmbientSound=!0,this.entity.sound.play("ambient"))},AmbientSoundManager.prototype.OnCooldownStarted=function(){this.shouldPlayAmbientSound=!1,this.entity.sound.stop("ambient")},AmbientSoundManager.prototype.OnPlayerKilled=function(){this.shouldPlayAmbientSound=!1,this.entity.sound.stop("ambient")},AmbientSoundManager.prototype.onConnectionLost=function(){this.shouldPlayAmbientSound=!1,this.entity.sound.stop("ambient")},AmbientSoundManager.prototype.onLeftGame=function(){this.shouldPlayAmbientSound=!1,this.entity.sound.stop("ambient")},AmbientSoundManager.prototype.onWindowGainedFocus=function(){this.isWindowFocused||(this.isWindowFocused=!0,this.shouldPlayAmbientSound&&this.entity.sound.stop("ambient"))},AmbientSoundManager.prototype.onWindowLostFocus=function(){this.isWindowFocused=!1,this.entity.sound.stop("ambient")};var DroppableGun=pc.createScript("droppableGun");DroppableGun.attributes.add("rifleModel",{type:"entity",title:"RifleModel"}),DroppableGun.attributes.add("shotgunModel",{type:"entity",title:"ShotgunModel"}),DroppableGun.attributes.add("minigunModel",{type:"entity",title:"MinigunModel"}),DroppableGun.attributes.add("rocketlauncherModel",{type:"entity",title:"RocketlauncherModel"}),DroppableGun.attributes.add("uziModel",{type:"entity",title:"UziModel"}),DroppableGun.attributes.add("weaponIndex",{type:"number",default:1,title:"Weapon Enum Value"}),DroppableGun.attributes.add("throwDirection",{type:"vec3",title:"Weapon Throw Direction"}),DroppableGun.attributes.add("weaponAmmo",{type:"number",default:1,title:"Weapon Ammo"}),DroppableGun.attributes.add("droppedWeaponID",{type:"string"}),DroppableGun.attributes.add("isInitialized",{type:"boolean",default:!1}),DroppableGun.prototype.init=function(t,e,i,a,n){switch(this.weaponIndex=e,this.weaponAmmo=a,this.droppedWeaponID=n,this.isSpawned=!0,this.hasHitObject=!1,this.timer=0,this.isInitialized||(this.physicsLayerScript=this.entity.script.physicsLayer,this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.app.on("recievedWeaponWasPickedUp",this.onReceivedWeaponPickup,this),this.on("destroy",this.onDestroy,this),this.isInitialized=!0),this.weaponIndex){case Weapons.Rifle:this.activeWeaponEntity=this.rifleModel,void 0===this.rifleMaterial&&(this.rifleMaterial=this.activeWeaponEntity.model.meshInstances[0].material.clone()),this.material=this.rifleMaterial;break;case Weapons.Shotgun:this.activeWeaponEntity=this.shotgunModel,void 0===this.shotgunMaterial&&(this.shotgunMaterial=this.activeWeaponEntity.model.meshInstances[0].material.clone()),this.material=this.shotgunMaterial;break;case Weapons.Minigun:this.activeWeaponEntity=this.minigunModel,void 0===this.minigunMaterial&&(this.minigunMaterial=this.activeWeaponEntity.model.meshInstances[0].material.clone()),this.material=this.minigunMaterial;break;case Weapons.RocketLauncher:this.activeWeaponEntity=this.rocketlauncherModel,void 0===this.rocketlauncherMaterial&&(this.rocketlauncherMaterial=this.activeWeaponEntity.model.meshInstances[0].material.clone()),this.material=this.rocketlauncherMaterial;break;case Weapons.Uzi:this.activeWeaponEntity=this.uziModel,void 0===this.uziMaterial&&(this.uziMaterial=this.activeWeaponEntity.model.meshInstances[0].material.clone()),this.material=this.uziMaterial}this.physicsLayerScript.groupE=!1,this.physicsLayerScript.maskE=!1,this.entity.rigidbody.type=pc.BODYTYPE_DYNAMIC,this.physicsLayerScript.initialize(),this.activeWeaponEntity.model.meshInstances[0].material=this.material,this.activeWeaponEntity.enabled=!0,this.setTransparent(),this.entity.setPosition(t.x,t.y,t.z),this.enableGun(),this.entity.rigidbody.applyImpulse(i.x,i.y,i.z)},DroppableGun.prototype.update=function(t){this.timer+=t,this.timer>1.5&&!this.isSpawned&&this.hasHitObject&&this.setOpaque(),this.timer>8&&this.isSpawned&&this.disableGun(),this.activeWeaponEntity.rotateLocal(0,100*t,0)},DroppableGun.prototype.setOpaque=function(){this.isSpawned=!0,this.material.blendType=pc.BLEND_NONE,this.material.opacity=1,this.material.update(),this.physicsLayerScript.groupE=!0,this.physicsLayerScript.maskE=!0,this.entity.rigidbody.type=pc.BODYTYPE_STATIC,this.physicsLayerScript.initialize()},DroppableGun.prototype.setTransparent=function(){this.material.blendType=pc.BLEND_NORMAL,this.material.opacity=.2,this.material.update(),this.isSpawned=!1},DroppableGun.prototype.onCollisionStart=function(t){if(this.isSpawned){var e=t.other;if(null!==e&&e.name.includes("TriggerDetector")){var i=e.parent.script.playerManager;null!=i&&i.isLocalPlayer&&(this.isSpawned=!1,this.app.fire("weaponPickedUp",i.playerID,this.weaponIndex,9999,this.weaponAmmo,!0,this.droppedWeaponID),this.disableGun())}}else{var a=t.other;null===a||a.name.includes("TriggerDetector")||(this.hasHitObject=!0)}},DroppableGun.prototype.onDestroy=function(){this.entity.collision.off("collisionstart",this.onCollisionStart,this),this.app.off("recievedWeaponWasPickedUp",this.onReceivedWeaponPickup,this)},DroppableGun.prototype.onReceivedWeaponPickup=function(t){this.droppedWeaponID===t&&this.disableGun()},DroppableGun.prototype.enableGun=function(){this.entity.enabled=!0},DroppableGun.prototype.isEnabled=function(){return this.entity.enabled},DroppableGun.prototype.disableGun=function(){this.isSpawned=!1,this.activeWeaponEntity.enabled=!1,this.entity.enabled=!1};var SessionTimerManager=pc.createScript("sessionTimerManager");SessionTimerManager.attributes.add("timerLabelEntity",{type:"entity",title:"Timer Label"}),SessionTimerManager.attributes.add("timeProgressBarEntity",{type:"entity",title:"Time Progress Bar"}),SessionTimerManager.attributes.add("gameOverCounterEntity",{type:"entity",title:"Game Over Counter"}),SessionTimerManager.attributes.add("gameOverHeaderLabelEntity",{type:"entity",title:"Game Over Header Label"}),SessionTimerManager.attributes.add("gameOverCounterLabelEntity",{type:"entity",title:"Game Over Counter Label"}),SessionTimerManager.attributes.add("gameOverCounterShadowLabelEntity",{type:"entity",title:"Game Over Counter Shadow Label"});var TimerType={Session:1,Cooldown:2,Death:3};SessionTimerManager.prototype.init=function(){this.timerStart=!1,this.secondsRemaining=0,this.minutesRemaining=0,this.nowTime=null,this.countDownTime=null,this.previousSecond=-1,this.timerType=null,this.inGameLabelElement=this.timerLabelEntity.element,this.gameOverLabelElement=this.gameOverCounterLabelEntity.element,this.gameOverShadowLabelElement=this.gameOverCounterShadowLabelEntity.element,this.timeProgressBarEntity.enabled=!1,this.gameOverCounterEntity.enabled=!1,this.hasTriggeredTimeLeftEventInThisSecond=!1,this.app.on("windowGainedFocus",this.onGainedFocus,this),this.app.on("connectionLost",this.onConnectionLost,this)},SessionTimerManager.prototype.update=function(e){if(this.timerStart){var t;switch(this.nowTime+=1e3*e,this.timerType){case TimerType.Death:t=this.timeToDeathAutoRespawn-this.nowTime;break;default:t=this.countDownTime-this.nowTime}this.updateTimerLabel(t)}},SessionTimerManager.prototype.setNewCountDownTime=function(e,t,i,n){this.nowTime=new Date(i).getTime(),this.countDownTime=new Date(t).getTime(),this.timerStart=!0,this.sessionTimerType=n,this.timerType=n,this.totalLength=e;var s=this.countDownTime-this.nowTime;this.updateTimerLabel(s),this.changeTimerElements(n)},SessionTimerManager.prototype.onGainedFocus=function(){this.nowTime=Date.now()},SessionTimerManager.prototype.onConnectionLost=function(){this.timeProgressBarEntity.enabled=!1,this.gameOverCounterEntity.enabled=!1},SessionTimerManager.prototype.showTimer=function(){this.entity.enabled=!0,this.timeProgressBarEntity.enabled=!0},SessionTimerManager.prototype.hideTimer=function(){this.entity.enabled=!1,this.timeProgressBarEntity.enabled=!1,this.timerStart=!1},SessionTimerManager.prototype.showDeathAutoRespawnTimer=function(e){this.entity.enabled&&(this.timeToDeathAutoRespawn=Date.now()+1e3*e,this.changeTimerElements(TimerType.Death))},SessionTimerManager.prototype.hideDeathAutoRespawnTimer=function(){this.entity.enabled&&this.changeTimerElements(this.sessionTimerType)},SessionTimerManager.prototype.changeTimerElements=function(e){switch(this.timerType=e,e){case TimerType.Session:this.gameOverCounterEntity.enabled=!1,this.gameOverShadowLabelElement.enabled=!1,this.gameOverCounterLabelEntity.enabled=!1,this.timeProgressBarEntity.enabled=!0,this.timerLabelEntity.enabled=!0;break;case TimerType.Cooldown:this.timeProgressBarEntity.enabled=!1,this.timerLabelEntity.enabled=!1,this.gameOverHeaderLabelEntity.element.text="NEW ROUND STARTS IN",this.gameOverCounterEntity.enabled=!0,this.gameOverShadowLabelElement.enabled=!0,this.gameOverCounterLabelEntity.enabled=!0;break;case TimerType.Death:this.timeProgressBarEntity.enabled=!1,this.timerLabelEntity.enabled=!1,this.gameOverHeaderLabelEntity.element.text="RESPAWNING IN",this.gameOverCounterEntity.enabled=!0,this.gameOverShadowLabelElement.enabled=!0,this.gameOverCounterLabelEntity.enabled=!0}},SessionTimerManager.prototype.updateTimerLabel=function(e){switch(this.secondsRemaining=Math.floor(e%6e4/1e3),this.totalSecondsRemaining=Math.floor(e/1e3),this.timerType){case TimerType.Session:30!=this.totalSecondsRemaining&&60!=this.totalSecondsRemaining&&this.totalSecondsRemaining!=Math.floor(this.totalLength/2)||this.hasTriggeredTimeLeftEventInThisSecond||(this.hasTriggeredTimeLeftEventInThisSecond=!0,30==this.totalSecondsRemaining?this.app.fire("VOS_trigger",VOEvents.thirtysecondsleft):60==this.totalSecondsRemaining?this.app.fire("VOS_trigger",VOEvents.sixtysecondsleft):this.totalSecondsRemaining==Math.floor(this.totalLength/2)&&this.app.fire("VOS_trigger",VOEvents.halfTime),setTimeout(function(){this.hasTriggeredTimeLeftEventInThisSecond=!1}.bind(this),2e3)),this.previousSecond!=this.secondsRemaining&&(this.minutesRemaining=Math.floor(e%36e5/6e4),this.minutesRemaining>=0&&this.secondsRemaining>=0?(this.previousSecond=this.secondsRemaining,this.secondsRemaining<10&&(this.secondsRemaining="0"+this.secondsRemaining),this.inGameLabelElement.text=this.minutesRemaining+":"+this.secondsRemaining):(this.inGameLabelElement.text="0:00",this.timerStart=!1));break;case TimerType.Cooldown:this.secondsRemaining>=0?(this.gameOverLabelElement.text=this.secondsRemaining,this.gameOverShadowLabelElement.text=this.secondsRemaining):(this.gameOverLabelElement.text="0",this.gameOverShadowLabelElement.text="0",this.timerStart=!1);break;case TimerType.Death:this.secondsRemaining>=0?(this.gameOverLabelElement.text=this.secondsRemaining,this.gameOverShadowLabelElement.text=this.secondsRemaining):(this.gameOverLabelElement.text="0",this.gameOverShadowLabelElement.text="0",this.hideDeathAutoRespawnTimer())}};var FirstPersonMuzzleFxcontroller=pc.createScript("firstPersonMuzzleFxcontroller");FirstPersonMuzzleFxcontroller.attributes.add("leftMuzzleSpawnPoint",{type:"entity",title:"LeftMuzzleSpawnPoint"}),FirstPersonMuzzleFxcontroller.attributes.add("rightMuzzleSpawnPoint",{type:"entity",title:"RightMuzzleSpawnPoint"}),FirstPersonMuzzleFxcontroller.attributes.add("playerManager",{type:"entity",title:"PlayerManager"}),FirstPersonMuzzleFxcontroller.attributes.add("mainCamera",{type:"entity",title:"MainCamera"}),FirstPersonMuzzleFxcontroller.attributes.add("bulletParticleSystemRight",{type:"entity",title:"BulletParticleSystemRight"}),FirstPersonMuzzleFxcontroller.attributes.add("bulletParticleSystemLeft",{type:"entity",title:"BulletParticleSystemLeft"}),FirstPersonMuzzleFxcontroller.attributes.add("shellParticleSystem",{type:"entity",title:"ShellParticleSystem"}),FirstPersonMuzzleFxcontroller.attributes.add("effectController",{type:"entity"}),FirstPersonMuzzleFxcontroller.prototype.initialize=function(){this.isLocalPlayer=this.playerManager.script.playerManager.isLocalPlayer,this.isLocalPlayer&&(this.SubcribeToEvents(),this.app.on("leftGame",this.UnsubscribeToEvents,this)),this.nextShotLeft=!1,this.cartridgeParticleSystemClones={},this.localPlayerAnimationState=EnemyAnimationState.Stand,this.bulletsRightTag="BulletParticlesRight",this.bulletsLeftTag="BulletParticlesLeft",this.shotgunTag="ShotgunParticles",this.spawnParticleLeft=!1,this.firstPersonWeaponController=this.app.root.findByName("WeaponRoot").script.firstPersonWeaponController,this.rightFXSpawnNode=this.firstPersonWeaponController.currentRightWeaponModel.findByName("cc_Muzzle"),this.leftFXSpawnNode=this.firstPersonWeaponController.currentLeftWeaponModel.findByName("cc_Muzzle")},FirstPersonMuzzleFxcontroller.prototype.update=function(t){this._f2&&(this._f2(),this._f2=null),this._f1&&(this._f2=this._f1,this._f1=null)},FirstPersonMuzzleFxcontroller.prototype.SubcribeToEvents=function(){this.app.on("rayFired",this.OnRayFired,this),this.app.on("gunTrace",this.OnGunTrace,this),this.app.on("bulletFired",this.OnBulletFired,this),this.app.on("sendAnimationState",this.OnAnimationStateChanged,this),this.app.on("shootingStopped",this.OnShootingStopped,this),this.app.on("weaponSwitched",this.OnWeaponSwitched,this)},FirstPersonMuzzleFxcontroller.prototype.UnsubscribeToEvents=function(){this.app.off("rayFired",this.OnRayFired,this),this.app.off("gunTrace",this.OnGunTrace,this),this.app.off("bulletFired",this.OnBulletFired,this),this.app.off("sendAnimationState",this.OnAnimationStateChanged,this),this.app.off("shootingStopped",this.OnShootingStopped,this),this.app.off("weaponSwitched",this.OnWeaponSwitched,this)},FirstPersonMuzzleFxcontroller.prototype.OnAnimationStateChanged=function(t,e){e!=EnemyAnimationState.Jump&&e!=EnemyAnimationState.RunJump&&(this.localPlayerAnimationState=e)},FirstPersonMuzzleFxcontroller.prototype.OnBulletFired=function(t,e,i){},FirstPersonMuzzleFxcontroller.prototype.getGunPivot=function(t,e){if(this.isLocalPlayer)return this.rightFXSpawnNode&&this.leftFXSpawnNode?(this.rightMuzzleSpawnPoint.setPosition(this.rightFXSpawnNode.getPosition()),this.leftMuzzleSpawnPoint.setPosition(this.leftFXSpawnNode.getPosition()),e.isDualWeapon&&!this.nextShotLeft?[this.leftMuzzleSpawnPoint,null]:e.weaponType==Weapons.Shotgun?[this.leftMuzzleSpawnPoint,this.rightMuzzleSpawnPoint]:[this.rightMuzzleSpawnPoint,null]):(console.error("Weapon muzzle node missing in FX controller!"),[this.rightMuzzleSpawnPoint,null])},FirstPersonMuzzleFxcontroller.prototype.OnGunTrace=function(t,e,i){var o=this.getGunPivot(t,e);this.effectController.script.effectController.startNewTrail(o[0].getWorldTransform().transformPoint(new pc.Vec3(0,0,-1)),i)},FirstPersonMuzzleFxcontroller.prototype.OnRayFired=function(t,e){this.isLocalPlayer&&(e.isDualWeapon&&(this.nextShotLeft=!this.nextShotLeft),this._f1=()=>this.DelayOnRayFired(t,e))},FirstPersonMuzzleFxcontroller.prototype.DelayOnRayFired=function(t,e){var i=this.getGunPivot(t,e),o=i[0],n=i[1];this.SpawnMuzzleEffects(o.getPosition(),o.getPosition(),o),null!==n&&this.SpawnMuzzleEffects(o.getPosition(),o.getPosition(),n),this.StartCartridgeParticles(e)},FirstPersonMuzzleFxcontroller.prototype.SpawnMuzzleEffects=function(t,e,i){var o=this.mainCamera.getRotation();this.playerManager;this.effectController.script.effectController.startMuzzleFX(e,o,i)},FirstPersonMuzzleFxcontroller.prototype.StartCartridgeParticles=function(t){if(t.weaponType!=Weapons.RocketLauncher&&!MobileController.instance.active){this.spawnParticleLeft=!this.nextShotLeft;var e=this.bulletsRightTag;this.spawnParticleLeft&&t.isDualWeapon&&(e=this.bulletsLeftTag),t.weaponType==Weapons.Shotgun&&(e=this.shotgunTag);var i=null,o=Object.values(this.cartridgeParticleSystemClones);if(o.length>0)for(var n in o){var s=o[n];if(!s.particlesystem.isPlaying()&&s.tags.has(e)){i=s;break}}null===i&&(i=t.weaponType==Weapons.Shotgun?this.shellParticleSystem.clone():t.isDualWeapon&&this.spawnParticleLeft?this.bulletParticleSystemLeft.clone():this.bulletParticleSystemRight.clone(),this.cartridgeParticleSystemClones[i.getGuid()]=i,this.app.root.addChild(i)),t.isDualWeapon?this.spawnParticleLeft?i.setPosition(this.bulletParticleSystemLeft.getPosition()):i.setPosition(this.bulletParticleSystemRight.getPosition()):t.weaponType==Weapons.Shotgun?i.setPosition(this.shellParticleSystem.getPosition()):i.setPosition(this.bulletParticleSystemRight.getPosition()),i.setLocalRotation(this.mainCamera.getLocalRotation()),i.particlesystem.reset(),i.particlesystem.play()}},FirstPersonMuzzleFxcontroller.prototype.OnShootingStopped=function(t,e,i){},FirstPersonMuzzleFxcontroller.prototype.OnWeaponSwitched=function(t,e){this.nextShotLeft=!1,e==Weapons.Shotgun?(this.rightFXSpawnNode=this.firstPersonWeaponController.shotgunModel.findByName("cc_Muzzle.r"),this.leftFXSpawnNode=this.firstPersonWeaponController.shotgunModel.findByName("cc_Muzzle.l")):(this.rightFXSpawnNode=this.firstPersonWeaponController.currentRightWeaponModel.findByName("cc_Muzzle"),this.leftFXSpawnNode=this.firstPersonWeaponController.currentLeftWeaponModel.findByName("cc_Muzzle"))};var NpcMovement=pc.createScript("npcMovement");NpcMovement.attributes.add("collisionTriggerEntity",{type:"entity",title:"Collision Trigger Entity"}),NpcMovement.attributes.add("bumpedIntoObstacle",{type:"boolean",default:!1}),NpcMovement.attributes.add("isInitialized",{type:"boolean",default:!1});var NpcTriggerTypes={Player:1,Npc:2,Environment:3},NpcAnimationState={Idle:1,Walk:2,Run:3,Die:4};NpcMovement.prototype.init=function(t,i){this.localPlayerID=i,this.id=t.id,this.currentHealth=t.currentHealth,this.isAlive=t.isAlive,this.animationState=NpcAnimationState.Idle,this.entity.name="NPC "+this.id,this.MAX_WONDER_TIME=3,this.MAX_WAIT_TIME=3,this.MAX_ROTATION_TIME=2,this.NORMAL_MOVEMENT_SPEED=.7,this.RUN_FROM_PLAYER_MOVEMENT_SPEED=20,this.AVOID_OBSTICLE_MOVEMENT_SPEED=10,this.WONDER_ROTATION_FORCE=3e3,this.currentMovementSpeed=this.NORMAL_MOVEMENT_SPEED,this.transformedSheepForward=new pc.Vec3,this.movementForce=new pc.Vec3,this.spawnPoint=new pc.Vec3,this.serverCommunicationTimer=.05,this.serverCommunicationTimerProgress=0,this.delayEnableTimer=null,this.delayDisableTimer=null,this.waitTimeLength=0,this.waitTimeProgress=0,this.wonderTimeLength=0,this.wonderTimeProgress=0,this.rotationChance=1,this.rotationChangeInterval=10,this.rotationChangeTimeProgress=0,this.rotationTimeLength=0,this.rotationTimeProgress=0,this.rotationDirectionFactor=0,this.wasTriggeredBy={},this.avoidTriggerInterval=null,this.triggerAvoidanceOn=!1,this.npcExitedTriggers=!0,this.avoidancePathPointsIndex=0,this.avoidancePathPoints={},this.distanceTraveledSinceRotation=0;var e=t.controllingPlayerID!==i;this.setRemoteControlled(e),this.isInitialized||(this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.entity.collision.on("collisionend",this.onCollisionEnd,this),this.collisionTriggerEntity.collision.on("triggerenter",this.onTriggerEnter,this),this.collisionTriggerEntity.collision.on("triggerleave",this.onTriggerLeave,this),this.app.on("npcsUpdated",this.onNpcsUpdated,this),this.app.on("confirmRayHitNpc",this.onConfirmRayHit,this),this.app.on("confirmBulletHitNpc",this.onConfirmBulletHit,this),this.app.on("confirmNpcKill",this.onConfirmNpcKilled,this),this.app.on("npcAnimationChanged",this.onNpcAnimationChanged,this),this.app.on("respawnNpc",this.onRespawnNpc,this),this.on("destroy",this.onDestroy,this),this.isInitialized=!0),this.placeNpc(t),this.enableNpc()},NpcMovement.prototype.onDestroy=function(){this.entity.collision&&(this.entity.collision.off("collisionstart",this.onCollisionStart,this),this.entity.collision.off("collisionend",this.onCollisionEnd,this)),this.collisionTriggerEntity.collision.off("triggerenter",this.onTriggerEnter,this),this.collisionTriggerEntity.collision.off("triggerleave",this.onTriggerLeave,this),this.app.off("npcsUpdated",this.onNpcsUpdated,this),this.app.off("confirmRayHitNpc",this.onConfirmRayHit,this),this.app.off("confirmBulletHitNpc",this.onConfirmBulletHit,this),this.app.off("confirmNpcKill",this.onConfirmNpcKilled,this),this.app.off("npcAnimationChanged",this.onNpcAnimationChanged,this),this.app.off("respawnNpc",this.onRespawnNpc,this)},NpcMovement.prototype.onTriggerEnter=function(t){if(!this.isRemoteControlled){var i=t.tags.list(),e=(i[0],t),n=t.getGuid(),o=!1,s=1,r=1;if(t.parent.name.includes("Player")){this.wasTriggeredBy[n]=NpcTriggerTypes.Player;var a=Math.random();s=a<.7?.7:a,r=Math.random()>.75?-1:1,this.currentMovementSpeed=this.RUN_FROM_PLAYER_MOVEMENT_SPEED,o=!0,this.npcExitedTriggers=!1}else if(t.name.includes("NPC")){if(this.entity.getGuid()===n)return;this.wasTriggeredBy[n]=NpcTriggerTypes.Npc,Object.keys(this.wasTriggeredBy).length>0?(s=.1,r=Math.random()>.5?-1:1):s=Math.random(),o=!0,this.npcExitedTriggers=!1}else i.includes("ground")||(this.wasTriggeredBy[n]=NpcTriggerTypes.Environment,Object.keys(this.wasTriggeredBy).length>0?(s=.1,r=Math.random()>.5?-1:1):s=Math.random(),o=!0,this.npcExitedTriggers=!1);if(o){null===this.avoidTriggerInterval&&(this.avoidTriggerInterval=setInterval(function(){var t=0,i=!1,e=Object.keys(this.avoidancePathPoints).length;this.avoidancePathPoints[this.avoidancePathPointsIndex]=this.entity.getPosition().clone(),this.avoidancePathPointsIndex=e%2,e>1?(t=Math.abs(this.avoidancePathPoints[0].distance(this.avoidancePathPoints[1])),this.distanceTraveledSinceRotation+=t):i=!0,(t<.05||this.distanceTraveledSinceRotation>30)&&(i=!0),i&&(this.rotateNpc(120),this.distanceTraveledSinceRotation=0)}.bind(this),500));var h=e.getPosition(),l=this.entity.getPosition(),c=(90*s+90)*r;this.entity.lookAt(h.x,l.y,h.z),this.rotateNpc(c),this.triggerAvoidanceOn=!0}}},NpcMovement.prototype.onTriggerLeave=function(t){if(!this.isRemoteControlled){var i=t.getGuid();if(Object.keys(this.wasTriggeredBy).includes(i)&&(delete this.wasTriggeredBy[i],!this.npcExitedTriggers)){for(var e in this.wasTriggeredBy){if(e===NpcTriggerTypes.Player){this.currentMovementSpeed=this.NORMAL_MOVEMENT_SPEED;break}this.currentMovementSpeed=this.AVOID_OBSTICLE_MOVEMENT_SPEED}0===Object.keys(this.wasTriggeredBy).length&&(null!==this.avoidTriggerInterval&&(clearInterval(this.avoidTriggerInterval),this.avoidTriggerInterval=null),this.avoidancePathPoints={},this.avoidancePathPointsIndex=0,this.distanceTraveledSinceRotation=0,this.currentMovementSpeed=this.NORMAL_MOVEMENT_SPEED,this.npcExitedTriggers=!0)}}},NpcMovement.prototype.getYaw=function(t){var i=this.transformedSheepForward;return t.transformVector(pc.Vec3.FORWARD,i),Math.atan2(-i.x,-i.z)*pc.math.RAD_TO_DEG},NpcMovement.prototype.onCollisionStart=function(t){if(!this.isRemoteControlled){var i=t.other,e=i.tags.list();if(i.name.includes("Bullet")){var n=i.script.bulletMovement;if(null!=n){var o=n.bulletID,s=n.playerShooting,r=n.bulletDamage,a=t.contacts[0].point;s===this.localPlayerID&&this.currentHealth>0&&this.app.fire("bulletHitNpc",o,this.id,r,s,a,!1),n.disableBullet()}}else e.includes("ground")&&(this.bumpedIntoObstacle=!0)}},NpcMovement.prototype.onCollisionEnd=function(t){if(!this.isRemoteControlled){var i=t,e=i.tags.list(),n=null!=i.tag?i.tag:"";i.name;n.includes("Bullet")||e.includes("ground")||(this.bumpedIntoObstacle=!1)}},NpcMovement.prototype.update=function(t){if(!this.isRemoteControlled&&this.isAlive){if(this.serverCommunicationTimerProgress+=t,this.triggerAvoidanceOn)this.MoveForward(t),!0===this.npcExitedTriggers&&(this.triggerAvoidanceOn=!1);else if(this.rotationChangeTimeProgress+=t,0!==this.waitTimeLength&&0!==this.wonderTimeLength||(this.waitTimeLength=Math.random()*this.MAX_WAIT_TIME,this.wonderTimeLength=Math.random()*this.MAX_WONDER_TIME),this.wonderTimeLength>this.waitTimeLength)if(this.animationState!==NpcAnimationState.Walk&&this.changeAnimationState(NpcAnimationState.Walk),this.wonderTimeLength>this.wonderTimeProgress){if(this.wonderTimeProgress+=t,this.rotationChangeTimeProgress>this.rotationChangeInterval)Math.random()<=this.rotationChance&&(this.rotationTimeLength=Math.random()*this.MAX_ROTATION_TIME,this.rotationDirectionFactor=Math.random()<.5?-1:1),this.rotationChangeTimeProgress=0;this.rotationTimeProgress<this.rotationTimeLength?(this.rotationTimeProgress+=t,this.entity.rigidbody.applyTorque(0,t*this.WONDER_ROTATION_FORCE*this.rotationDirectionFactor,0)):(this.rotationTimeLength=0,this.rotationTimeProgress=0),this.MoveForward(t)}else this.wonderTimeLength=0,this.wonderTimeProgress=0;else this.animationState!==NpcAnimationState.Idle&&this.changeAnimationState(NpcAnimationState.Idle),this.waitTimeLength>this.waitTimeProgress?this.waitTimeProgress+=t:(this.waitTimeLength=0,this.waitTimeProgress=0);this.serverCommunicationTimerProgress>this.serverCommunicationTimer&&(this.serverCommunicationTimerProgress=0,this.app.fire("sendNpcPositionChanged",this.id,this.entity.getPosition(),this.entity.getEulerAngles()))}},NpcMovement.prototype.rotateNpc=function(t){this.entity.rotate(0,t,0),this.entity.rigidbody.teleport(this.entity.getPosition(),this.entity.getRotation())},NpcMovement.prototype.MoveForward=function(t){var i=this.entity.forward,e=0,n=0;e+=i.x*t,n+=i.z*t,this.movementForce.set(e,0,n).normalize().scale(this.currentMovementSpeed),this.movementForce.y=this.entity.rigidbody.linearVelocity.y,this.entity.rigidbody.linearVelocity=this.movementForce},NpcMovement.prototype.changeAnimationState=function(t){this.animationState=t,this.playAnimation(t),this.isRemoteControlled||this.app.fire("sendNpcAnimationState",this.id,this.animation)},NpcMovement.prototype.playAnimation=function(t){switch(t){case NpcAnimationState.Idle:case NpcAnimationState.Walk:case NpcAnimationState.Run:}},NpcMovement.prototype.onNpcsUpdated=function(t,i,e){if(null!=t&&null!=t[this.id]){var n=t[this.id].controllingPlayerID!==e;this.setRemoteControlled(n)}},NpcMovement.prototype.onConfirmBulletHit=function(t,i,e){this.id===t&&this.takeDamage(i,e)},NpcMovement.prototype.onConfirmRayHit=function(t,i,e){this.id===t&&this.takeDamage(i,e)},NpcMovement.prototype.takeDamage=function(t,i){this.isAlive&&(this.currentHealth-=t,this.currentHealth<=0?(this.currentHealth=0,this.onDeath(i,!1,!1,!1)):this.app.fire("npcTakingDamage"))},NpcMovement.prototype.onDeath=function(t,i){this.isAlive&&(this.app.fire("npcKilled",this.id,i),this.changeAnimationState(NpcAnimationState.Die),this.disableNpc(),this.isAlive=!1)},NpcMovement.prototype.onConfirmNpcKilled=function(t,i){this.isAlive&&this.id===t.id&&(this.disableNpc(),this.isAlive=t.isAlive)},NpcMovement.prototype.onRespawnNpc=function(t){this.isAlive||this.id!==t.id||(this.isAlive=t.isAlive,this.currentHealth=t.currentHealth,this.changeAnimationState(NpcAnimationState.Idle),this.placeNpc(t),this.enableNpc())},NpcMovement.prototype.onNpcAnimationChanged=function(t,i){this.isRemoteControlled&&this.changeAnimationState(i)},NpcMovement.prototype.disableNpc=function(){clearTimeout(this.delayDisableTimer),clearTimeout(this.delayEnableTimer),this.delayDisableTimer=setTimeout(function(){this.entity.enabled=!1}.bind(this),10)},NpcMovement.prototype.enableNpc=function(){clearTimeout(this.delayDisableTimer),clearTimeout(this.delayEnableTimer),this.delayEnableTimer=setTimeout(function(){this.entity.enabled=!0}.bind(this),1500)},NpcMovement.prototype.setRemoteControlled=function(t){this.isRemoteControlled=t,this.isRemoteControlled?this.entity.rigidbody.type=pc.BODYTYPE_KINEMATIC:this.entity.rigidbody.type=pc.BODYTYPE_DYNAMIC,this.entity.script.physicsLayer.initialize()},NpcMovement.prototype.placeNpc=function(t){this.spawnPoint.set(t.position.x,t.position.y,t.position.z),this.entity.rigidbody.teleport(this.spawnPoint)};var RemoteNpcsController=pc.createScript("remoteNpcsController");RemoteNpcsController.prototype.init=function(t){this.networkScript=t,this.localPlayerID=null,this.resetCache(),this.networkScript.on("remoteNpcMoved",this.onNpcMoved,this),this.app.on("npcsUpdated",this.onNpcsUpdated,this),this.app.on("respawnNpc",this.onRespawnNpc,this),this.app.on("npcAnimationChanged",this.onNpcAnimationChanged,this),this.app.on("confirmNpcKill",this.onConfirmNpcKilled,this),this.app.on("leftGame",this.onLeftGame,this)},RemoteNpcsController.prototype.update=function(t){this.monitorNpcsMovement&&this.updateNpcPositionsAndRotations(t)},RemoteNpcsController.prototype.onNpcsUpdated=function(t,i,s){if(this.localPlayerID=s,null!=t)for(var n in t)Object.keys(this.npcs).includes(n)?t[n].controllingPlayerID===s&&this.clearNpcCache(n):t[n].controllingPlayerID!==s&&(this.npcLerpedPositions[n]=new pc.Vec3(0,0,0),this.npcFinalTargetPositions[n]=new pc.Vec3(0,0,0),this.npcLastSetTargetPositions[n]=new pc.Vec3(0,0,0),this.npcLastKnownPositions[n]=new pc.Vec3(0,0,0),this.npcTargetDirections[n]=new pc.Vec3(0,0,0),this.npcFramesWithoutTargetPosition[n]=0,this.npcAnimationStates[n]=NpcAnimationState.Idle,this.npcLerpedRotations[n]=new pc.Quat(0,0,0,0),this.npcTargetRotations[n]=new pc.Quat(0,0,0,0),this.npcReceivedTargetPositions[n]=new pc.Vec3(0,0,0)),this.npcs[n]=t[n],this.npcEntities[n]=i[n];if(null!=this.npcs)for(var e in this.npcs)Object.keys(t).includes(e)||this.clearNpcCache(e);this.monitorNpcsMovement=Object.keys(this.npcs).length>0&&Object.keys(this.npcReceivedTargetPositions).length>0},RemoteNpcsController.prototype.onLeftGame=function(){this.resetCache()},RemoteNpcsController.prototype.onConfirmNpcKilled=function(t,i){null!=this.npcs[t.id]&&(this.enemies[t.id]=t)},RemoteNpcsController.prototype.onNpcMoved=function(t){if(null!==this.localPlayerID&&null!=t&&null!=t.id&&null!=this.npcs&&null!=this.npcs[t.id]&&this.localPlayerID!==this.npcs[t.id].controllingPlayerID&&null!=this.npcEntities&&null!=this.npcEntities[t.id]){this.npcReceivedTargetPositions[t.id].set(t.position.x,t.position.y,t.position.z),this.npcEntities[t.id].setEulerAngles(t.rotation.x,t.rotation.y,t.rotation.z);var i=this.getYaw(this.npcEntities[t.id].getRotation());this.npcTargetRotations[t.id].setFromEulerAngles(0,i,0)}},RemoteNpcsController.prototype.updateNpcPositionsAndRotations=function(t){for(var i in this.npcs)if(void 0!==this.npcLerpedPositions[i]&&null!==this.npcs[i]&&this.npcs[i].controllingPlayerID!==this.localPlayerID&&null!==this.npcEntities[i]&&this.npcs[i].isAlive&&this.npcEntities[i].enabled){var s=this.npcEntities[i],n=s.script.npcMovement,e=s.getPosition().clone(),o=this.npcReceivedTargetPositions[i],c=this.npcTargetDirections[i],p=this.npcLastSetTargetPositions[i];if(o.x===p.x&&o.y===p.y&&o.z===p.z?this.npcFramesWithoutTargetPosition[i]++:(this.npcLastSetTargetPositions[i].x=o.x,this.npcLastSetTargetPositions[i].y=o.y,this.npcLastSetTargetPositions[i].z=o.z,this.npcFinalTargetPositions[i].x=this.npcReceivedTargetPositions[i].x,this.npcFinalTargetPositions[i].y=this.npcReceivedTargetPositions[i].y,this.npcFinalTargetPositions[i].z=this.npcReceivedTargetPositions[i].z,this.npcFramesWithoutTargetPosition[i]=0),this.npcFramesWithoutTargetPosition[i]>0&&this.npcFramesWithoutTargetPosition[i]<3&&(this.npcAnimationStates[i]===NpcAnimationState.Walk||this.npcAnimationStates[i]===NpcAnimationState.Run)&&!n.bumpedIntoObstacle){var a=parseFloat(this.npcFinalTargetPositions[i].x),r=parseFloat(this.npcFinalTargetPositions[i].y),h=parseFloat(this.npcFinalTargetPositions[i].z);a+=c.x,r+=c.y,h+=c.z,this.npcFinalTargetPositions[i].x=a,this.npcFinalTargetPositions[i].y=r,this.npcFinalTargetPositions[i].z=h}(0===this.npcFinalTargetPositions[i].x&&0===this.npcFinalTargetPositions[i].y&&0===this.npcFinalTargetPositions[i].z||Math.abs(c.x)>1||Math.abs(c.y)>1||Math.abs(c.z)>1)&&(this.npcFinalTargetPositions[i].x=this.npcReceivedTargetPositions[i].x,this.npcFinalTargetPositions[i].y=this.npcReceivedTargetPositions[i].y,this.npcFinalTargetPositions[i].z=this.npcReceivedTargetPositions[i].z);var l=this.npcLastKnownPositions[i];0!==l.x&&0!==l.y&&0!==l.z&&this.npcTargetDirections[i].sub2(e,this.npcLastKnownPositions[i]),this.npcLastKnownPositions[i].x=e.x,this.npcLastKnownPositions[i].y=e.y,this.npcLastKnownPositions[i].z=e.z,this.npcLerpedPositions[i].lerp(e,this.npcFinalTargetPositions[i],this.npcLerpAnimationSpeed*t),s.rigidbody.teleport(this.npcLerpedPositions[i]),this.npcLerpedRotations[i].slerp(s.getRotation(),this.npcTargetRotations[i],this.npcLerpAnimationSpeed*t),s.setRotation(this.npcLerpedRotations[i])}},RemoteNpcsController.prototype.getYaw=function(t){var i=this.transformedNpcForward;return t.transformVector(pc.Vec3.FORWARD,i),Math.atan2(-i.x,-i.z)*pc.math.RAD_TO_DEG},RemoteNpcsController.prototype.onRespawnNpc=function(t){var i=t.id;this.monitorNpcsMovement=Object.keys(this.npcs).length>0&&Object.keys(this.npcReceivedTargetPositions).length>0,Object.keys(this.npcReceivedTargetPositions).includes(i)&&(this.npcReceivedTargetPositions[i].set(0,0,0),this.npcLerpedPositions[i].set(0,0,0),this.npcFinalTargetPositions[i].set(0,0,0),this.npcLastSetTargetPositions[i].set(0,0,0),this.npcLastKnownPositions[i].set(0,0,0),this.npcTargetDirections[i].set(0,0,0),this.npcFramesWithoutTargetPosition[i]=0,this.npcAnimationStates[i]=NpcAnimationState.Idle,this.npcLerpedRotations[i].set(0,0,0,0),this.npcTargetRotations[i].set(0,0,0,0),this.npcReceivedTargetPositions[i]=new pc.Vec3(t.position.x,t.position.y,t.position.z))},RemoteNpcsController.prototype.onNpcAnimationChanged=function(t,i){null!=t&&null!=this.npcs[t]&&this.npcs[t].controllingPlayerID!==this.localPlayerID&&(this.npcAnimationStates[t]=i)},RemoteNpcsController.prototype.resetCache=function(){this.npcs={},this.npcEntities={},this.npcLerpAnimationSpeed=15,this.npcReceivedTargetPositions={},this.npcFinalTargetPositions={},this.npcAnimationStates={},this.npcLerpedPositions={},this.npcTargetDirections={},this.npcLastSetTargetPositions={},this.npcLastKnownPositions={},this.npcFramesWithoutTargetPosition={},this.npcTargetRotations={},this.npcLerpedRotations={},this.transformedNpcForward=new pc.Vec3,this.monitorNpcsMovement=!1},RemoteNpcsController.prototype.clearNpcCache=function(t){delete this.npcs[t],delete this.npcEntities[t],delete this.npcLerpedPositions[t],delete this.npcReceivedTargetPositions[t],delete this.npcFinalTargetPositions[t],delete this.npcLastSetTargetPositions[t],delete this.npcLastKnownPositions[t],delete this.npcTargetDirections[t],delete this.npcFramesWithoutTargetPosition[t],delete this.npcAnimationStates[t],delete this.npcLerpedRotations[t],delete this.npcTargetRotations[t],this.monitorNpcsMovement=Object.keys(this.npcs).length>0&&Object.keys(this.npcReceivedTargetPositions).length>0};var MuzzleFlashController=pc.createScript("muzzleFlashFX");MuzzleFlashController.attributes.add("muzzleFlashModelEntity",{type:"entity",title:"MuzzleFlashModelEntity"}),MuzzleFlashController.prototype.initialize=function(){this.hasFinishedPlaying=!1},MuzzleFlashController.prototype.update=function(t){this.hasFinishedPlaying||this.muzzleFlashModelEntity.animation.currentTime==this.muzzleFlashModelEntity.animation.duration&&this.Hide()},MuzzleFlashController.prototype.Hide=function(){this.hasFinishedPlaying=!0,this.entity.enabled=!1,this.muzzleFlashModelEntity.animation.currentTime=0,this.muzzleFlashModelEntity.enabled=!1},MuzzleFlashController.prototype.Show=function(t,e,i){this.entity.setPosition(t),this.entity.setRotation(e),this.entity.setLocalScale(i),this.entity.enabled=!0,this.hasFinishedPlaying=!1,this.muzzleFlashModelEntity.enabled=!0,this.muzzleFlashModelEntity.animation.play("Fx_Muzzle@ShootDef.json")},MuzzleFlashController.prototype.IsReady=function(){return this.hasFinishedPlaying};var OrbitCamera=pc.createScript("orbitCamera");OrbitCamera.attributes.add("distanceMax",{type:"number",default:0,title:"Distance Max",description:"Setting this at 0 will give an infinite distance limit"}),OrbitCamera.attributes.add("distanceMin",{type:"number",default:0,title:"Distance Min"}),OrbitCamera.attributes.add("pitchAngleMax",{type:"number",default:90,title:"Pitch Angle Max (degrees)"}),OrbitCamera.attributes.add("pitchAngleMin",{type:"number",default:-90,title:"Pitch Angle Min (degrees)"}),OrbitCamera.attributes.add("inertiaFactor",{type:"number",default:0,title:"Inertia Factor",description:"Higher value means that the camera will continue moving after the user has stopped dragging. 0 is fully responsive."}),OrbitCamera.attributes.add("focusEntity",{type:"entity",title:"Focus Entity",description:"Entity for the camera to focus on. If blank, then the camera will use the whole scene"}),OrbitCamera.attributes.add("frameOnStart",{type:"boolean",default:!0,title:"Frame on Start",description:'Frames the entity or scene at the start of the application."'}),Object.defineProperty(OrbitCamera.prototype,"distance",{get:function(){return this._targetDistance},set:function(t){this._targetDistance=this._clampDistance(t)}}),Object.defineProperty(OrbitCamera.prototype,"pitch",{get:function(){return this._targetPitch},set:function(t){this._targetPitch=this._clampPitchAngle(t)}}),Object.defineProperty(OrbitCamera.prototype,"yaw",{get:function(){return this._targetYaw},set:function(t){this._targetYaw=t;var i=(this._targetYaw-this._yaw)%360;this._targetYaw=i>180?this._yaw-(360-i):i<-180?this._yaw+(360+i):this._yaw+i}}),Object.defineProperty(OrbitCamera.prototype,"pivotPoint",{get:function(){return this._pivotPoint},set:function(t){this._pivotPoint.copy(t)}}),OrbitCamera.prototype.focus=function(t){this._buildAabb(t,0);var i=this._modelsAabb.halfExtents,e=Math.max(i.x,Math.max(i.y,i.z));e/=Math.tan(.5*this.entity.camera.fov*pc.math.DEG_TO_RAD),e*=2,this.distance=e,this._removeInertia(),this._pivotPoint.copy(this._modelsAabb.center)},OrbitCamera.distanceBetween=new pc.Vec3,OrbitCamera.prototype.resetAndLookAtPoint=function(t,i){this.pivotPoint.copy(i),this.entity.setPosition(t),this.entity.lookAt(i);var e=OrbitCamera.distanceBetween;e.sub2(i,t),this.distance=e.length(),this.pivotPoint.copy(i);var a=this.entity.getRotation();this.yaw=this._calcYaw(a),this.pitch=this._calcPitch(a,this.yaw),this._removeInertia(),this._updatePosition()},OrbitCamera.prototype.resetAndLookAtEntity=function(t,i){this._buildAabb(i,0),this.resetAndLookAtPoint(t,this._modelsAabb.center)},OrbitCamera.prototype.reset=function(t,i,e){this.pitch=i,this.yaw=t,this.distance=e,this._removeInertia()},OrbitCamera.prototype.initialize=function(){var t=this,onWindowResize=function(){t._checkAspectRatio()};this.app.on("ViewportManager:resize",onWindowResize),this._checkAspectRatio(),this._modelsAabb=new pc.BoundingBox,this._buildAabb(this.focusEntity||this.app.root,0),this.entity.lookAt(this._modelsAabb.center),this._pivotPoint=new pc.Vec3,this._pivotPoint.copy(this._modelsAabb.center);var i=this.entity.getRotation();if(this._yaw=this._calcYaw(i),this._pitch=this._clampPitchAngle(this._calcPitch(i,this._yaw)),this.entity.setLocalEulerAngles(this._pitch,this._yaw,0),this._distance=0,this._targetYaw=this._yaw,this._targetPitch=this._pitch,this.frameOnStart)this.focus(this.focusEntity||this.app.root);else{var e=new pc.Vec3;e.sub2(this.entity.getPosition(),this._pivotPoint),this._distance=this._clampDistance(e.length())}this._targetDistance=this._distance,this.on("attr:distanceMin",(function(t,i){this._targetDistance=this._clampDistance(this._distance)})),this.on("attr:distanceMax",(function(t,i){this._targetDistance=this._clampDistance(this._distance)})),this.on("attr:pitchAngleMin",(function(t,i){this._targetPitch=this._clampPitchAngle(this._pitch)})),this.on("attr:pitchAngleMax",(function(t,i){this._targetPitch=this._clampPitchAngle(this._pitch)})),this.on("attr:focusEntity",(function(t,i){this.frameOnStart?this.focus(t||this.app.root):this.resetAndLookAtEntity(this.entity.getPosition(),t||this.app.root)})),this.on("attr:frameOnStart",(function(t,i){t&&this.focus(this.focusEntity||this.app.root)})),this.on("destroy",(function(){this.app.off("ViewportManager:resize",onWindowResize)}))},OrbitCamera.prototype.update=function(t){var i=0===this.inertiaFactor?1:Math.min(t/this.inertiaFactor,1);this._distance=pc.math.lerp(this._distance,this._targetDistance,i),this._yaw=pc.math.lerp(this._yaw,this._targetYaw,i),this._pitch=pc.math.lerp(this._pitch,this._targetPitch,i),this._updatePosition()},OrbitCamera.prototype._updatePosition=function(){this.entity.setLocalPosition(0,0,0),this.entity.setLocalEulerAngles(this._pitch,this._yaw,0);var t=this.entity.getPosition();t.copy(this.entity.forward),t.scale(-this._distance),t.add(this.pivotPoint),this.entity.setPosition(t)},OrbitCamera.prototype._removeInertia=function(){this._yaw=this._targetYaw,this._pitch=this._targetPitch,this._distance=this._targetDistance},OrbitCamera.prototype._checkAspectRatio=function(){var t=this.app.graphicsDevice.height,i=this.app.graphicsDevice.width;this.entity.camera.horizontalFov=t>i},OrbitCamera.prototype._buildAabb=function(t,i){var e=0;if(t.model){var a=t.model.meshInstances;for(e=0;e<a.length;e++)0===i?this._modelsAabb.copy(a[e].aabb):this._modelsAabb.add(a[e].aabb),i+=1}for(e=0;e<t.children.length;++e)i+=this._buildAabb(t.children[e],i);return i},OrbitCamera.prototype._calcYaw=function(t){var i=new pc.Vec3;return t.transformVector(pc.Vec3.FORWARD,i),Math.atan2(-i.x,-i.z)*pc.math.RAD_TO_DEG},OrbitCamera.prototype._clampDistance=function(t){return this.distanceMax>0?pc.math.clamp(t,this.distanceMin,this.distanceMax):Math.max(t,this.distanceMin)},OrbitCamera.prototype._clampPitchAngle=function(t){return pc.math.clamp(t,-this.pitchAngleMax,-this.pitchAngleMin)},OrbitCamera.quatWithoutYaw=new pc.Quat,OrbitCamera.yawOffset=new pc.Quat,OrbitCamera.prototype._calcPitch=function(t,i){var e=OrbitCamera.quatWithoutYaw,a=OrbitCamera.yawOffset;a.setFromEulerAngles(0,-i,0),e.mul2(a,t);var s=new pc.Vec3;return e.transformVector(pc.Vec3.FORWARD,s),Math.atan2(s.y,-s.z)*pc.math.RAD_TO_DEG};var GameController=pc.createScript("gameController");function Bullet(t,i,e){this.id=t,this.playerID=i,this.weapon=e}GameController.attributes.add("gameContentEntity",{type:"entity",title:"Game Content"}),GameController.attributes.add("player",{type:"entity",title:"Player Entity"}),GameController.attributes.add("npc",{type:"entity",title:"NPC Entity"}),GameController.attributes.add("bullet",{type:"entity",title:"Bullet Entity"}),GameController.attributes.add("rayHitWorldIndicatorEntity",{type:"entity",title:"Ray Hit World Indicator"}),GameController.attributes.add("projectileHitIndicatorEntity",{type:"entity",title:"ProjectileHitIndicator"}),GameController.attributes.add("droppableGun",{type:"entity",title:"DroppableGun"}),GameController.attributes.add("mineField",{type:"entity",title:"MineField"}),GameController.attributes.add("effectControllerEntity",{type:"entity",title:"Effect Controller"}),GameController.prototype.init=function(t,e,r,o,n){for(this.initialized=!1,this.isInCooldown=!0,this.players={},this.playerEntities={},this.npcs={},this.npcEntities={},this.bullets={},this.bulletEntities={},this.muzzleFXClones={},this.rayHitWorldIndicatorEntities={},this.rayHitPlayerIndicatorEntities={},this.projectileHitIndicatorEntities={},this.droppedWeaponEntities={},this.localPlayerCamera=null,this.loadAssetManager=e,this.rankManager=o,this.itemDataManager=n,this.mineField.script.mineField.init(this.loadAssetManager),this.effectControllerScript=this.effectControllerEntity.script.effectController,this.storageManager=r,this.networkScript=t,this.networkScript.on("notifySessionTimerStart",this.onSessionStarted,this),this.networkScript.on("notifyCooldownTimerStart",this.onCooldownStarted,this),this.networkScript.on("playerDataReceived",this.onPlayerDataReceived,this),this.networkScript.on("confirmBulletHitPlayer",this.onConfirmBulletHitPlayer,this),this.networkScript.on("killMade",this.onKillMade,this),this.networkScript.on("respawnGranted",this.onRespawnGranted,this),this.networkScript.on("enemyPlayerJoined",this.onEnemyPlayerJoined,this),this.networkScript.on("enemyPlayerDisconnected",this.onEnemyPlayerDisconnected,this),this.networkScript.on("enemyBulletFired",this.onEnemyBulletFired,this),this.networkScript.on("confirmRayHitPlayer",this.onConfirmRayHitPlayer,this),this.networkScript.on("confirmRayHitNpc",this.onConfirmRayHitNpc,this),this.networkScript.on("confirmRayHitWorld",this.onEnemyRayHitWorld,this),this.networkScript.on("confirmBulletHitNpc",this.onConfirmBulletHitNpc,this),this.networkScript.on("assigningNewNpcController",this.onAssignNewNpcController,this),this.networkScript.on("npcKillMade",this.onNpcKillMade,this),this.networkScript.on("respawnNpc",this.onRespawnNpc,this),this.networkScript.on("receivedWeaponWasDropped",this.onReceivedWeaponDrop,this),this.networkScript.on("recievedWeaponWasPickedUp",this.onReceivedWeaponPickup,this),this.networkScript.on("receivedAnotherPlayerHitMine",this.onReceivedPlayerHitMine,this),this.networkScript.on("receivedChatMessage",this.onReceivedChatMessage,this),this.networkScript.on("receivedHealthBoost",this.onReceivedHealthBoost,this),this.networkScript.on("notifyHighscoreUpdate",this.onNotifyHighscoreUpdate,this),this.networkScript.on("notifyEloRatingUpdate",this.onNotifyEloRatingUpdate,this),this.app.on("localPlayerInitialized",this.onLocalPlayerInitalized,this),this.app.on("bulletFired",this.onBulletFired,this),this.app.on("bulletHitPlayer",this.onBulletHitPlayer,this),this.app.on("bulletHitWorld",this.onBulletHitWorld,this),this.app.on("rayHitWorld",this.onRayHitWorld,this),this.app.on("playerKilled",this.onPlayerKilled,this),this.app.on("bulletHitNpc",this.onBulletHitNpc,this),this.app.on("droppableWeaponDroppedLocally",this.onDroppableWeaponDroppedLocally,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("serverError",this.onServerError,this),this.app.on("muzzleFlashFired",this.onMuzzleFlashFired,this),window.onblur=function(){this.app.fire("windowLostFocus")}.bind(this),window.onfocus=function(){this.app.fire("windowGainedFocus")}.bind(this),this.muzzleInitSpawnPos=new pc.Vec3(0,-1e3,0),this.muzzleInitSpawnRot=new pc.Quat,this.muzzleInitSpawnScale=new pc.Vec3(1,1,1),i=0;i<15;i++)this.onMuzzleFlashFired(this.muzzleInitSpawnPos,this.muzzleInitSpawnRot,this.muzzleInitSpawnScale);this.enemyRayHitWorldNormal=new pc.Vec3},GameController.prototype.onNotifyHighscoreUpdate=function(t){this.storageManager.localSaveObfKey(STORAGE_PlayerHighscore_KEY,t,"int")},GameController.prototype.onNotifyEloRatingUpdate=function(t){this.storageManager.localSaveObfKey(STORAGE_PlayerEloRating_KEY,t,"float")},GameController.prototype.onSessionStarted=function(t,i,e,r){this.isInCooldown=!1,this.players=r,this.app.fire("sessionStarted",t,i,!1,r,e),this.app.fire("playersUpdated",this.playerID,this.players,this.playerEntities,this.isInCooldown)},GameController.prototype.onCooldownStarted=function(t,i,e,r){this.isInCooldown=!0,this.players=r,this.app.fire("cooldownStarted",t,i,e,r)},GameController.prototype.onPlayerDataReceived=function(t,i,e,r){this.initializePlayer(t,i,e.isSessionActive,e.nowDate,e.sessionCountDownDate,e.cooldownCountDownDate,e.sessionLength,e.cooldownLength,r)},GameController.prototype.onBulletFired=function(t,i,e){e.isProjectile&&this.addBullet(t,i,e)},GameController.prototype.onBulletHitPlayer=function(t,i,e,r,o,n,l){i===this.playerID&&(this.createBulletHitIndicator(n,i,e,l,ObjectMaterials.material_flesh,pc.Vec3.UP),this.removeBullet(t))},GameController.prototype.onBulletHitWorld=function(t,i,e,r,o,n,l,a){this.createBulletHitIndicator(n,i,e,!0,a,l),this.removeBullet(t)},GameController.prototype.onPlayerKilled=function(t,i){this.players[t].isAlive=!1},GameController.prototype.onConfirmBulletHitPlayer=function(t,i,e,r,o,n,l,a){var s=!1;this.playerID===i?s=!0:(this.createBulletHitIndicator(n,i,e,l,ObjectMaterials.material_flesh,pc.Vec3.UP),this.removeBullet(t)),this.app.fire("confirmBulletHit",s,i,e,r,o,a)},GameController.prototype.onKillMade=function(t,i,e){if(null!=this.players[t.id]&&null!=this.players[i.id]){var r=t.id,o=i.id;this.players[r]=t,this.players[o]=i;var n=r===this.playerID,l=o===this.playerID;this.app.fire("killMade",i,t,n,l,e)}},GameController.prototype.onRespawnGranted=function(t){if(!this.isInCooldown){var i=this.players[t.id];if(null!=i&&!i.isAlive){this.players[t.id]=t;var e=t.id===this.playerID;this.app.fire("respawn",t,e)}}},GameController.prototype.onEnemyPlayerJoined=function(t,i,e){this.addPlayer(t,i,e),this.app.fire("enemyPlayerJoined",i)},GameController.prototype.onEnemyBulletFired=function(t,i,e){this.app.fire("enemyBulletFired",t,i,e),this.addBullet(t,i,e)},GameController.prototype.onEnemyPlayerDisconnected=function(t){null!=t&&null!=this.players[t.id]&&(this.players[t.id]=t,this.app.fire("enemyPlayerDisconnected",t))},GameController.prototype.onBulletHitNpc=function(t,i,e,r,o,n){this.createBulletHitIndicator(o,r,null,n,ObjectMaterials.material_flesh,pc.Vec3.UP),this.removeBullet(t)},GameController.prototype.onConfirmBulletHitNpc=function(t,i,e,r,o,n){r!==this.playerID&&(this.createBulletHitIndicator(o,r,null,n,ObjectMaterials.material_flesh,pc.Vec3.UP),this.removeBullet(t)),this.app.fire("confirmBulletHitNpc",i,e,r)},GameController.prototype.onRespawnNpc=function(t){if(null!=t&&null!=this.npcs[t.id]){var i=this.npcs[t.id];i.currentHealth=t.currentHealth,i.isAlive=t.isAlive,this.app.fire("respawnNpc",t)}},GameController.prototype.onAssignNewNpcController=function(t){this.npcs=t,this.app.fire("npcsUpdated",this.npcs,this.npcEntities,this.playerID)},GameController.prototype.onRayHitWorld=function(t,i,e,r,o,n,l){this.createRayHitWorldIndicator(t,i,e,r,o,n,l)},GameController.prototype.onEnemyRayHitWorld=function(t,i,e,r,o,n,l){o!==this.playerID&&(this.enemyRayHitWorldNormal.set(r.x,r.y,r.z),this.createRayHitWorldIndicator(t,i,e,this.enemyRayHitWorldNormal,o,n,l))},GameController.prototype.onConfirmRayHitPlayer=function(t,i,e,r,o,n,l){null!=o&&null!=n&&n!==Weapons.Flamer&&this.createRayHitPlayerIndicator(o.x,o.y,o.z,n),this.app.fire("confirmRayHitPlayer",t,i,e,r,o,n,l)},GameController.prototype.onConfirmRayHitNpc=function(t,i,e,r,o){null!=r&&null!=o&&o!==Weapons.Flamer&&this.createRayHitPlayerIndicator(r.x,r.y,r.z,o),this.app.fire("confirmRayHitNpc",t,i,e,r,o)},GameController.prototype.onDroppableWeaponDroppedLocally=function(t,i,e,r,o,n){this.dropWeapon(t,e,r,o,n)},GameController.prototype.onReceivedWeaponDrop=function(t,i,e,r,o){this.dropWeapon(t,i,e,r,o)},GameController.prototype.onReceivedWeaponPickup=function(t){},GameController.prototype.onReceivedPlayerHitMine=function(t,i,e,r){this.mineField.script.mineField.PlayExplosion(r),this.app.fire("notifyMineDamage",i,e)},GameController.prototype.onReceivedChatMessage=function(t,i){if(Object.keys(this.players).includes(t)){var e=this.players[t].name;this.app.fire("receivedChatMessage",e,i)}},GameController.prototype.onReceivedHealthBoost=function(t){if(t)for(var i in t)if(this.players&&Object.keys(this.players).includes(i)&&this.playerEntities&&Object.keys(this.playerEntities).includes(i)){var e=t[i];if(e&&(e<=this.players[i].defaultHealth?this.players[i].currentHealth=e:this.players[i].currentHealth=this.players[i].defaultHealth),this.playerEntities[i]){var r=this.playerEntities[i].script.playerManager;r&&r.heal(e)}}},GameController.prototype.onLocalPlayerInitalized=function(t){this.gameContentEntity.enabled=!0},GameController.prototype.onServerError=function(t){this.initialized&&this.app.fire("leftGame")},GameController.prototype.onLeftGame=function(){for(var t in this.gameContentEntity.enabled=!1,this.playerEntities){var i=this.playerEntities[t];if(void 0!==i){if(void 0!==i.script){var e=i.script.playerManager;void 0!==e&&e.destroyPlayer()}delete this.playerEntities[t]}}for(var r in this.players)delete this.players[r];for(var o in this.npcEntities){var n=this.npcEntities[o];void 0!==n&&(n.destroy(),delete this.npcEntities[o])}for(var l in this.npcs)delete this.npcs[l];for(var a in this.bulletEntities){var s=this.bulletEntities[a];if(void 0!==s&&void 0!==s.script){var p=s.script.bulletMovement;void 0!==p&&p.isBulletEnabled()&&p.disableBullet()}}for(var h in this.bullets){var c=this.bullets[h];null!==c.id&&(c.id=null)}for(var d in this.muzzleFXClones){var y=this.muzzleFXClones[d];if(void 0!==y&&void 0!==y.script){var u=y.script.muzzleFlashFX;void 0===u||u.IsReady()||u.Hide()}}for(var f in this.rayHitWorldIndicatorEntities){var m=this.rayHitWorldIndicatorEntities[f];if(void 0!==m&&void 0!==m.script){var v=m.script.rayHitIndicator;void 0!==v&&v.isIndicatorEnabled()&&v.disableIndicator()}}for(var C in this.rayHitWorldIndicatorEntities){var E=this.rayHitPlayerIndicatorEntities[C];if(void 0!==E&&void 0!==E.script){var I=E.script.rayHitIndicator;void 0!==I&&I.isIndicatorEnabled()&&I.disableIndicator()}}for(var H in this.projectileHitIndicatorEntities){var w=this.projectileHitIndicatorEntities[H];if(void 0!==w&&void 0!==w.script){var b=w.script.projectileExplosion;void 0!==b&&b.isIndicatorEnabled()&&b.disableIndicator()}}for(var G in this.droppedWeaponEntities){var P=this.droppedWeaponEntities[G];if(void 0!==P&&void 0!==P.script){var S=P.script.droppableGun;void 0!==S&&S.isEnabled()&&S.disableGun()}}this.initialized=!1,this.players={},this.playerEntities={},this.npcs={},this.npcEntities={}},GameController.prototype.initializePlayer=function(t,i,e,r,o,n,l,a,s){if(this.isInCooldown=!e,null!=t){if(this.playerID=t,this.players=i,this.players&&this.players[this.playerID]){var p=this.players[this.playerID];this.app.fire("localPlayerInitialized",t,p.name,p.characterTypeIndex,p.outfitColorIndex,s);var h=this.createPlayerEntity(p,!this.isInCooldown);this.localPlayerCamera=h.script.playerManager.cameraEntity,this.playerEntities[this.playerID]=h}else console.error("Local player data does not exist");for(var c in this.players)if(c!==this.playerID){var d=this.players[c],y=this.createPlayerEntity(d,!this.isInCooldown);this.playerEntities[c]=y}this.app.fire("playersUpdated",this.playerID,this.players,this.playerEntities,this.isInCooldown),this.isInCooldown?this.app.fire("cooldownStarted",n,r,a):this.app.fire("sessionStarted",o,r,!0,i,l),this.initialized=!0}},GameController.prototype.createNpcEntity=function(t){var i=this.npc.clone();return this.app.root.addChild(i),i.script.npcMovement.init(t,this.playerID),i},GameController.prototype.createPlayerEntity=function(t,i){var e=this.player.clone();return e.script.playerManager.init(t,this.playerID,i,this.localPlayerCamera,this.loadAssetManager,this.rankManager,this.itemDataManager),this.app.root.addChild(e),e},GameController.prototype.addPlayer=function(t,i,e){if(this.initialized&&null!=this.players){if(t&&null==this.players[i.id]){var r=i.id,o=this.createPlayerEntity(i,e);this.playerEntities[r]=o}this.players[i.id]=i,this.app.fire("playersUpdated",this.playerID,this.players,this.playerEntities,this.isInCooldown)}},GameController.prototype.addBullet=function(t,i,e){if(this.initialized&&(null===this.bullets[t]||void 0===this.bullets[t])){var r=null;for(var o in this.bullets)null===this.bullets[o].id&&((r=this.bullets[o]).id=t,r.playerID=i,r.weapon=e);null===r&&(r=new Bullet(t,i,e)),this.bullets[r.id]=r,this.createBulletEntity(r)}},GameController.prototype.removeBullet=function(t){null!==this.bullets[t]&&void 0!==this.bullets[t]&&(this.bullets[t].id=null)},GameController.prototype.createBulletEntity=function(t){if(null!=t&&null!==this.players&&void 0!==this.players&&null!=this.players[t.playerID]){t.playerID;var i=this.bullet,e=null,r=Object.values(this.bulletEntities);if(r.length>0)for(var o in r){var n=r[o];if(!n.script.bulletMovement.isBulletEnabled()){e=n;break}}null===e&&(e=i.clone(),this.app.root.addChild(e),this.bulletEntities[e.getGuid()]=e);var l=this.playerEntities[t.playerID],a=l.getPosition().clone(),s=l.rigidbody,p=l.script.playerManager.gunNozzleEntity,h=l.script.playerManager.cameraEntity,c=t.playerID===this.playerID;e.script.bulletMovement.init(t,a,s,p,h,c,this.loadAssetManager)}},GameController.prototype.createBulletHitIndicator=function(t,i,e,r,o,n){var l=this.projectileHitIndicatorEntity,a=this.projectileHitIndicatorEntities,s=null,p=Object.values(a);if(p.length>0)for(var h in p){var c=p[h];if(!c.script.projectileExplosion.isIndicatorEnabled()){s=c;break}}null===s&&(s=l.clone(),this.app.root.addChild(s),a[s.getGuid()]=s),s.script.projectileExplosion.show(t,r,i,i===this.playerID,e,this.localPlayerCamera,o,n,this.loadAssetManager)},GameController.prototype.createRayHitWorldIndicator=function(t,i,e,r,o,n,l){var a=pc.math.random(0,360),s=pc.math.random(0,360),p=pc.math.random(0,360);if(o!==this.playerID&&this.playerEntities[o]){var h=this.playerEntities[o].getPosition().clone();this.effectControllerScript.startNewTrail(h,new pc.Vec3(t,i,e))}var c=new pc.Vec3(t,i,e),d=r;switch(l){case ObjectMaterials.material_water:this.effectControllerScript.startNewSplash(c,1),this.effectControllerScript.startNewRipple(c,1);break;default:this.effectControllerScript.startImpactFX(l,c,d);var y=this.rayHitWorldIndicatorEntity,u=this.rayHitWorldIndicatorEntities;this.createRayHitIndicator(y,u,t,i,e,a,s,p,l)}},GameController.prototype.createRayHitPlayerIndicator=function(t,i,e,r){var o=this.rayHitWorldIndicatorEntity,n=this.rayHitPlayerIndicatorEntities,l=pc.math.random(0,360),a=pc.math.random(0,360),s=pc.math.random(0,360);this.createRayHitIndicator(o,n,t,i,e,l,a,s,ObjectMaterials.material_flesh)},GameController.prototype.createRayHitIndicator=function(t,i,e,r,o,n,l,a,s){var p=null,h=Object.values(i);if(h.length>0)for(var c in h){var d=h[c];if(!d.script.rayHitIndicator.isIndicatorEnabled()){p=d;break}}null===p&&(p=t.clone(),this.app.root.addChild(p),i[p.getGuid()]=p),p.script.rayHitIndicator.show(e,r,o,n,l,a,s,this.localPlayerCamera,this.loadAssetManager)},GameController.prototype.dropWeapon=function(t,i,e,r,o){var n=this.droppableGun,l=this.droppedWeaponEntities,a=null,s=Object.values(l);if(s.length>0)for(var p in s){var h=s[p];if(!h.script.droppableGun.isEnabled()){a=h;break}}null===a&&(a=n.clone(),this.app.root.addChild(a),l[a.getGuid()]=a),a.script.droppableGun.init(i,e,o,r,t)},GameController.prototype.onMuzzleFlashFired=function(t,i,e){};var VectorMath=pc.createScript("vectorMath");!function(){for(var t=[],o=[],r=0,a=0,c=0;c<256;c++)o.push(new pc.Vec3),t.push(new pc.Quat);function Q(o){var a=t[255&r++];return 0!=o&&a.copy(o||pc.Quat.IDENTITY),a}function V(t,r,c){var e=o[255&a++];if(void 0!==r&&void 0!==c){var n=e.data;return n[0]=t,n[1]=r,n[2]=c,e}if(void 0!==t){var p=e.data,i=t.data;p[0]=i[0],p[1]=i[1],p[2]=i[2]}return e}function orthogonal(t){var o=Math.abs(t.x),r=Math.abs(t.y),a=Math.abs(t.z),c=o<r?o<a?pc.Vec3.RIGHT:pc.Vec3.FORWARD:r<a?pc.Vec3.UP:pc.Vec3.FORWARD;return V().cross(t,c)}pc.Vec3.temp=V,pc.Quat.temp=Q,pc.Vec3.prototype.angle=function(t,o){return function angleBetween(t,o,r){return r=r||pc.Vec3.UP,Math.atan2(V().cross(t,o).dot(r),t.dot(o))*pc.math.RAD_TO_DEG}(this,t,o)},pc.Quat.prototype.fromToRotation=function(t,o){return function fromToRotation(t,o,r){var a=t.dot(o);if(r=r||Q(),a<=-.999){r.w=0;var c=orthogonal(t).normalize();return r.x=c.x,r.y=c.y,r.z=c.z,r}var e=V(t).add(o).scale(.5);r.w=t.dot(e);var n=V().cross(t,e);return r.x=n.x,r.y=n.y,r.z=n.z,r.normalize()}(t,o,this)},pc.Quat.prototype.twist=function(t){var o=orthogonal(t),r=this.transformVector(o,V()),a=V(r).sub(V(t).scale(r.dot(t))).normalize(),c=Math.acos(o.dot(a))*pc.math.RAD_TO_DEG;return V(this.x,this.y,this.z).dot(t)>0?-c:c};var e=new pc.Mat4;pc.Quat.prototype.lookAt=function(t,o,r){return e.setLookAt(t,o,r||pc.Vec3.UP),this.setFromMat4(e),this};var n=pc.Vec3.prototype.mul;pc.Vec3.prototype.mul=function(t,o,r){return t instanceof pc.Quat?t.transformVector(this,this):n.call(this,t,o,r)}}();var KeyboardInput=pc.createScript("keyboardInput");KeyboardInput.prototype.initialize=function(){this.orbitCamera=this.entity.script.orbitCamera},KeyboardInput.prototype.postInitialize=function(){this.orbitCamera&&(this.startDistance=this.orbitCamera.distance,this.startYaw=this.orbitCamera.yaw,this.startPitch=this.orbitCamera.pitch,this.startPivotPosition=this.orbitCamera.pivotPoint.clone())},KeyboardInput.prototype.update=function(t){this.orbitCamera&&this.app.keyboard.wasPressed(pc.KEY_SPACE)&&!isChatModeEnabled&&(this.orbitCamera.reset(this.startYaw,this.startPitch,this.startDistance),this.orbitCamera.pivotPoint=this.startPivotPosition)};var MouseInput=pc.createScript("mouseInput");MouseInput.attributes.add("orbitSensitivity",{type:"number",default:.3,title:"Orbit Sensitivity",description:"How fast the camera moves around the orbit. Higher is faster"}),MouseInput.attributes.add("distanceSensitivity",{type:"number",default:.15,title:"Distance Sensitivity",description:"How fast the camera moves in and out. Higher is faster"}),MouseInput.prototype.initialize=function(){if(this.orbitCamera=this.entity.script.orbitCamera,this.orbitCamera){var t=this,onMouseOut=function(o){t.onMouseOut(o)};this.app.mouse.on(pc.EVENT_MOUSEDOWN,this.onMouseDown,this),this.app.mouse.on(pc.EVENT_MOUSEUP,this.onMouseUp,this),this.app.mouse.on(pc.EVENT_MOUSEMOVE,this.onMouseMove,this),this.app.mouse.on(pc.EVENT_MOUSEWHEEL,this.onMouseWheel,this),window.addEventListener("mouseout",onMouseOut,!1),this.on("destroy",(function(){this.app.mouse.off(pc.EVENT_MOUSEDOWN,this.onMouseDown,this),this.app.mouse.off(pc.EVENT_MOUSEUP,this.onMouseUp,this),this.app.mouse.off(pc.EVENT_MOUSEMOVE,this.onMouseMove,this),this.app.mouse.off(pc.EVENT_MOUSEWHEEL,this.onMouseWheel,this),window.removeEventListener("mouseout",onMouseOut,!1)}))}this.app.mouse.disableContextMenu(),this.lookButtonDown=!1,this.panButtonDown=!1,this.lastPoint=new pc.Vec2},MouseInput.fromWorldPoint=new pc.Vec3,MouseInput.toWorldPoint=new pc.Vec3,MouseInput.worldDiff=new pc.Vec3,MouseInput.prototype.pan=function(t){var o=MouseInput.fromWorldPoint,e=MouseInput.toWorldPoint,i=MouseInput.worldDiff,s=this.entity.camera,n=this.orbitCamera.distance;s.screenToWorld(t.x,t.y,n,o),s.screenToWorld(this.lastPoint.x,this.lastPoint.y,n,e),i.sub2(e,o),this.orbitCamera.pivotPoint.add(i)},MouseInput.prototype.onMouseDown=function(t){switch(t.button){case pc.MOUSEBUTTON_LEFT:this.lookButtonDown=!0;break;case pc.MOUSEBUTTON_MIDDLE:case pc.MOUSEBUTTON_RIGHT:this.panButtonDown=!0}},MouseInput.prototype.onMouseUp=function(t){switch(t.button){case pc.MOUSEBUTTON_LEFT:this.lookButtonDown=!1;break;case pc.MOUSEBUTTON_MIDDLE:case pc.MOUSEBUTTON_RIGHT:this.panButtonDown=!1}},MouseInput.prototype.onMouseMove=function(t){pc.app.mouse;this.lookButtonDown?(this.orbitCamera.pitch-=t.dy*this.orbitSensitivity,this.orbitCamera.yaw-=t.dx*this.orbitSensitivity):this.panButtonDown&&this.pan(t),this.lastPoint.set(t.x,t.y)},MouseInput.prototype.onMouseWheel=function(t){this.orbitCamera.distance-=t.wheel*this.distanceSensitivity*(.1*this.orbitCamera.distance),t.event.preventDefault()},MouseInput.prototype.onMouseOut=function(t){this.lookButtonDown=!1,this.panButtonDown=!1};var DamageTakenIndicatorHelper=pc.createScript("damageTakenIndicatorHelper");DamageTakenIndicatorHelper.prototype.init=function(){this.initialOpacity=new pc.Vec2(this.entity.element.opacity,0),this.currentOpacity=new pc.Vec2(0,0),this.minOpacity=new pc.Vec2(0,0)},DamageTakenIndicatorHelper.prototype.canShow=function(){return!this.entity.enabled},DamageTakenIndicatorHelper.prototype.show=function(t,e){this.entity.enabled=!0,this.entity.setLocalEulerAngles(0,0,t),this.entity.element.opacity=this.initialOpacity.x,this.currentOpacity.x=this.initialOpacity.x;var i=this.currentOpacity;this.entity.tween(i).to(this.minOpacity,e,pc.ExponentialOut).delay(e/2).on("update",(function(){this.entity.element.opacity=i.x})).on("complete",(function(){this.entity.enabled=!1})).start()};var TouchInput=pc.createScript("touchInput");TouchInput.attributes.add("orbitSensitivity",{type:"number",default:.4,title:"Orbit Sensitivity",description:"How fast the camera moves around the orbit. Higher is faster"}),TouchInput.attributes.add("distanceSensitivity",{type:"number",default:.2,title:"Distance Sensitivity",description:"How fast the camera moves in and out. Higher is faster"}),TouchInput.prototype.initialize=function(){this.orbitCamera=this.entity.script.orbitCamera,this.lastTouchPoint=new pc.Vec2,this.lastPinchMidPoint=new pc.Vec2,this.lastPinchDistance=0,this.orbitCamera&&this.app.touch&&(this.app.touch.on(pc.EVENT_TOUCHSTART,this.onTouchStartEndCancel,this),this.app.touch.on(pc.EVENT_TOUCHEND,this.onTouchStartEndCancel,this),this.app.touch.on(pc.EVENT_TOUCHCANCEL,this.onTouchStartEndCancel,this),this.app.touch.on(pc.EVENT_TOUCHMOVE,this.onTouchMove,this),this.on("destroy",(function(){this.app.touch.off(pc.EVENT_TOUCHSTART,this.onTouchStartEndCancel,this),this.app.touch.off(pc.EVENT_TOUCHEND,this.onTouchStartEndCancel,this),this.app.touch.off(pc.EVENT_TOUCHCANCEL,this.onTouchStartEndCancel,this),this.app.touch.off(pc.EVENT_TOUCHMOVE,this.onTouchMove,this)})))},TouchInput.prototype.getPinchDistance=function(t,i){var o=t.x-i.x,n=t.y-i.y;return Math.sqrt(o*o+n*n)},TouchInput.prototype.calcMidPoint=function(t,i,o){o.set(i.x-t.x,i.y-t.y),o.scale(.5),o.x+=t.x,o.y+=t.y},TouchInput.prototype.onTouchStartEndCancel=function(t){var i=t.touches;1==i.length?this.lastTouchPoint.set(i[0].x,i[0].y):2==i.length&&(this.lastPinchDistance=this.getPinchDistance(i[0],i[1]),this.calcMidPoint(i[0],i[1],this.lastPinchMidPoint))},TouchInput.fromWorldPoint=new pc.Vec3,TouchInput.toWorldPoint=new pc.Vec3,TouchInput.worldDiff=new pc.Vec3,TouchInput.prototype.pan=function(t){var i=TouchInput.fromWorldPoint,o=TouchInput.toWorldPoint,n=TouchInput.worldDiff,h=this.entity.camera,c=this.orbitCamera.distance;h.screenToWorld(t.x,t.y,c,i),h.screenToWorld(this.lastPinchMidPoint.x,this.lastPinchMidPoint.y,c,o),n.sub2(o,i),this.orbitCamera.pivotPoint.add(n)},TouchInput.pinchMidPoint=new pc.Vec2,TouchInput.prototype.onTouchMove=function(t){var i=TouchInput.pinchMidPoint,o=t.touches;if(1==o.length){var n=o[0];this.orbitCamera.pitch-=(n.y-this.lastTouchPoint.y)*this.orbitSensitivity,this.orbitCamera.yaw-=(n.x-this.lastTouchPoint.x)*this.orbitSensitivity,this.lastTouchPoint.set(n.x,n.y)}else if(2==o.length){var h=this.getPinchDistance(o[0],o[1]),c=h-this.lastPinchDistance;this.lastPinchDistance=h,this.orbitCamera.distance-=c*this.distanceSensitivity*.1*(.1*this.orbitCamera.distance),this.calcMidPoint(o[0],o[1],i),this.pan(i),this.lastPinchMidPoint.copy(i)}};!function(n,t,e){function Alea(n){var t=this,e=function Mash(){var n=4022871197;return function(t){t=String(t);for(var e=0;e<t.length;e++){var s=.02519603282416938*(n+=t.charCodeAt(e));s-=n=s>>>0,n=(s*=n)>>>0,n+=4294967296*(s-=n)}return 2.3283064365386963e-10*(n>>>0)}}();t.next=function(){var n=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=n-(t.c=0|n)},t.c=1,t.s0=e(" "),t.s1=e(" "),t.s2=e(" "),t.s0-=e(n),t.s0<0&&(t.s0+=1),t.s1-=e(n),t.s1<0&&(t.s1+=1),t.s2-=e(n),t.s2<0&&(t.s2+=1),e=null}function copy(n,t){return t.c=n.c,t.s0=n.s0,t.s1=n.s1,t.s2=n.s2,t}function impl(n,t){var e=new Alea(n),s=t&&t.state,r=e.next;return r.int32=function(){return 4294967296*e.next()|0},r.double=function(){return r()+11102230246251565e-32*(2097152*r()|0)},r.quick=r,s&&("object"==typeof s&&copy(s,e),r.state=function(){return copy(e,{})}),r}t&&t.exports?t.exports=impl:e&&e.amd?e((function(){return impl})):this.alea=impl}(0,"object"==typeof module&&module,"function"==typeof define&&define);!function(t,n,r){var e,o=256,i=r.pow(o,6),u=r.pow(2,52),a=2*u,f=255;function seedrandom(f,c,s){var d=[],l=mixkey(flatten((c=1==c?{entropy:!0}:c||{}).entropy?[f,tostring(n)]:null==f?function autoseed(){try{var r;return e&&(r=e.randomBytes)?r=r(o):(r=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(r)),tostring(r)}catch(r){var i=t.navigator,u=i&&i.plugins;return[+new Date,t,u,t.screen,tostring(n)]}}():f,3),d),y=new ARC4(d),prng=function(){for(var t=y.g(6),n=i,r=0;t<u;)t=(t+r)*o,n*=o,r=y.g(1);for(;t>=a;)t/=2,n/=2,r>>>=1;return(t+r)/n};return prng.int32=function(){return 0|y.g(4)},prng.quick=function(){return y.g(4)/4294967296},prng.double=prng,mixkey(tostring(y.S),n),(c.pass||s||function(t,n,e,o){return o&&(o.S&&copy(o,y),t.state=function(){return copy(y,{})}),e?(r.random=t,n):t})(prng,l,"global"in c?c.global:this==r,c.state)}function ARC4(t){var n,r=t.length,e=this,i=0,u=e.i=e.j=0,a=e.S=[];for(r||(t=[r++]);i<o;)a[i]=i++;for(i=0;i<o;i++)a[i]=a[u=f&u+t[i%r]+(n=a[i])],a[u]=n;(e.g=function(t){for(var n,r=0,i=e.i,u=e.j,a=e.S;t--;)n=a[i=f&i+1],r=r*o+a[f&(a[i]=a[u=f&u+n])+(a[u]=n)];return e.i=i,e.j=u,r})(o)}function copy(t,n){return n.i=t.i,n.j=t.j,n.S=t.S.slice(),n}function flatten(t,n){var r,e=[],o=typeof t;if(n&&"object"==o)for(r in t)try{e.push(flatten(t[r],n-1))}catch(t){}return e.length?e:"string"==o?t:t+"\0"}function mixkey(t,n){for(var r,e=t+"",o=0;o<e.length;)n[f&o]=f&(r^=19*n[f&o])+e.charCodeAt(o++);return tostring(n)}function tostring(t){return String.fromCharCode.apply(0,t)}if(mixkey(r.random(),n),"object"==typeof module&&module.exports){module.exports=seedrandom;try{e=require("crypto")}catch(t){}}else"function"==typeof define&&define.amd?define((function(){return seedrandom})):r.seedrandom=seedrandom}("undefined"!=typeof self?self:this,[],Math);var PropPlacer2=pc.createScript("propPlacer2");PropPlacer2.attributes.add("radius",{type:"number",default:10}),PropPlacer2.attributes.add("count",{type:"number",default:20}),PropPlacer2.attributes.add("seed",{type:"number",default:0}),PropPlacer2.attributes.add("rotation",{type:"number",enum:[{none:0},{y_axis:1},{free:2},{align:3}],default:1}),PropPlacer2.attributes.add("objects",{type:"entity",array:!0}),PropPlacer2.attributes.add("shadertype",{type:"number",enum:[{none:0},{grass:1},{tree:2},{rock:3},{test:4}],default:1}),PropPlacer2.attributes.add("terrain",{type:"entity"}),PropPlacer2.attributes.add("y0",{type:"number",default:0,min:0,max:1}),PropPlacer2.attributes.add("y1",{type:"number",default:1,min:0,max:1}),PropPlacer2.attributes.add("maxsockheight",{type:"number",default:1,min:0,max:1}),PropPlacer2.prototype.doRaycast=function(t){performance.now();var e=new pc.Vec3(t.x,150,t.z),s=new pc.Vec3(t.x,-1e3,t.z),i=this.app.systems.rigidbody.raycastFiltered(e,s,pc.BODYGROUP_USER_2,pc.BODYGROUP_USER_2);performance.now();return i},PropPlacer2.prototype.randomgen=function(t,e){return this.arng()*(e-t)+t},PropPlacer2.prototype.randomgen_int=function(t){var e=this.arng();return Math.floor(e*t)},PropPlacer2.prototype.readSourceMesh=function(t){var e=[],s=[],i=[],r=[],o=[],n=[],a=t.mesh.getPositions(e),h=(t.mesh.getNormals(s),t.mesh.getColors(i)),l=t.mesh.getUvs(0,r),p=t.mesh.getUvs(1,o);t.mesh.getIndices(n);this.orig.push({instance:t,positions:e,normals:s,colors:i,uvs0:r,uvs1:o,indices:n,node:t.node}),h===a&&(this.use_colors=!0),l===a&&(this.use_uv0=!0),p===a&&(this.use_uv1=!0)},PropPlacer2.prototype.addMesh=function(t,e,s){var i=this.new_positions.length/3,r=t.positions.length/3,o=t.positions.length/3,n=t.normals.length/3,a=t.colors.length/1,h=t.uvs0.length/2,l=t.uvs1.length/2,p=t.indices.length,c=new pc.Vec3,d=new pc.Mat4;d.setTRS(t.node.getLocalPosition(),t.node.getLocalRotation(),t.node.getScale());var m=e.mul(d);for(j=0;j<r;j++)c.x=t.positions[3*j],c.y=t.positions[3*j+1],c.z=t.positions[3*j+2],c=m.transformPoint(c),this.new_positions.push(c.x),this.new_positions.push(c.y),this.new_positions.push(c.z);if(n===o)for(j=0;j<r;j++){c.x=t.normals[3*j],c.y=t.normals[3*j+1],c.z=t.normals[3*j+2];(c=m.transformVector(c)).lerp(s,c,0),c.normalize(),this.new_normals.push(c.x),this.new_normals.push(c.y),this.new_normals.push(c.z)}if(h===o)if(1==this.shadertype){var f=this.maxsockheight-.2;for(j=0;j<r;j++)y=t.positions[3*j+2],x=Math.min(Math.max(0,y-.2)/f,1),this.new_uvs0.push(x),this.new_uvs0.push(y)}else for(j=0;j<r;j++)u=t.uvs0[2*j],c=t.uvs0[2*j+1],this.new_uvs0.push(u),this.new_uvs0.push(c);else if(this.use_uv0)for(j=0;j<r;j++)this.new_uvs0.push(0,0);if(l===o)for(j=0;j<r;j++)x=t.uvs1[2*j],y=t.uvs1[2*j+1],this.new_uvs1.push(x),this.new_uvs1.push(y);else if(this.use_uv1)for(j=0;j<r;j++)this.new_uvs1.push(0,0);if(a===o)this.new_colors.push.apply(new_colors,t.colors);else if(this.use_colors)for(j=0;j<r;j++)this.new_colors.push(0,0,0,0);for(j=0;j<p;j++)this.new_indices.push(i+t.indices[j])},PropPlacer2.prototype.refresh=function(){var t=performance.now(),e=[];this.preserveCollision=!1;for(var s=this.app.keyboard.isPressed(pc.KEY_SHIFT)&&!isChatModeEnabled,i=0;i<this.objects.length;i++)this.objects[i]&&(e.push(this.objects[i]),this.objects[i].collision&&this.objects[i].rigidbody&&(this.preserveCollision=!0));if(0!==e.length&&this.propsControllerScript.materials){this.material=this.propsControllerScript.materials[this.shadertype],this.use_colors=!1,this.use_uv0=!1,this.use_uv1=!1,this.orig=[];var r=s||!this.preserveCollision;if(r)for(i=0;i<e.length;i++)this.readSourceMesh(e[i].model.meshInstances[0]);for(;this.entity.children.length>0;){var o=this.entity.children[0];this.entity.removeChild(o)}if(this.new_positions=[],this.new_normals=[],this.new_colors=[],this.new_uvs0=[],this.new_uvs1=[],this.new_indices=[],this.rampy=0,this.rampheight=5,this.terrain){var n=this.terrain.model.meshInstances[0].aabb;this.rampy=n.getMin().y,this.rampheight=2*n.halfExtents.y}this.arng=new alea("hello."+this.seed);var a=this.entity.getWorldTransform();matObjectInv=a.clone(),matObjectInv.invert(),this.LODmode=0,this.preserveCollision&&2===this.shadertype&&(this.LODmode=1),this.entity.model&&-1===this.entity.model.batchGroupId&&(this.LODmode=2),1===this.LODmode?(this.folder0=new pc.Entity,this.entity.addChild(this.folder0),this.folder1=new pc.Entity,this.entity.addChild(this.folder1)):(this.folder0=new pc.Entity,this.entity.addChild(this.folder0));var h=0;for(i=0;i<this.count;i++){var l=new pc.Vec3,p=this.randomgen(0,360),c=Math.sqrt(this.arng())*this.radius;l.x=Math.cos(p)*c,l.y=0,l.z=Math.sin(p)*c;var d=a.transformPoint(l),m=this.doRaycast(d);if(m&&m.entity===this.terrain){if(m.point.y<this.rampy+this.rampheight*this.y0)continue;if(m.point.y>this.rampy+this.rampheight*this.y1)continue;var u=this.randomgen_int(e.length);if(d=m.point,this.preserveCollision){var f=e[u].clone();switch(this.folder0.addChild(f),r&&f.removeComponent("model"),f.setPosition(d),this.rotation){case 0:break;case 1:f.setLocalEulerAngles(0,this.randomgen(0,360),0);break;case 2:f.setLocalEulerAngles(this.randomgen(0,360),this.randomgen(0,360),this.randomgen(0,360));break;case 3:let t=new pc.Quat;t.setFromEulerAngles(0,this.randomgen(0,360),0);let e=pc.Vec3.UP,s=e.clone().cross(e.clone(),m.normal.clone()),i=Math.asin(s.length()),r=new pc.Quat;r.setFromAxisAngle(s.normalize(),i*(180/Math.PI)),f.setRotation(r.mul(t))}r||(f.model.meshInstances[0].material=this.material),f.rigidbody&&(f.rigidbody.enabled=!1,f.rigidbody.enabled=!0),this.LODmode}if(r){var y=new pc.Mat4,g=matObjectInv.transformPoint(d),P=new pc.Quat;switch(this.rotation){case 0:break;case 1:P.setFromEulerAngles(0,this.randomgen(0,360),0);break;case 2:P.setFromEulerAngles(this.randomgen(0,360),this.randomgen(0,360),this.randomgen(0,360));break;case 3:P.setFromAxisAngle(m.normal,this.randomgen(0,360))}var v=e[u].getLocalScale();y.setTRS(g,P,v),this.addMesh(this.orig[u],y,m.normal)}h++}}if(0!==h){if(r){var w=new pc.Mesh(this.app.graphicsDevice);w.setPositions(this.new_positions),w.setNormals(this.new_normals),w.setIndices(this.new_indices),this.use_colors&&w.setColors(this.new_colors),this.use_uv0&&w.setUvs(0,this.new_uvs0),this.use_uv1&&w.setUvs(1,this.new_uvs1),w.update();var b=new pc.GraphNode,_=new pc.MeshInstance(b,w,this.material),j=new pc.Model;j.graph=b,j.meshInstances.push(_),this.entity.model||this.entity.addComponent("model"),this.entity.model.model=j}var C=performance.now()-t;PropPlacer2.profile[this.shadertype]+=C}}},PropPlacer2.prototype.registerCallbacks=function(){this.on("attr:radius",(function(t,e){this.refresh()})),this.on("attr:count",(function(t,e){this.refresh()})),this.on("attr:seed",(function(t,e){this.refresh()})),this.on("attr:rotation",(function(t,e){this.refresh()})),this.on("attr:objects",(function(t,e){this.refresh()})),this.on("attr:shadertype",(function(t,e){this.refresh()})),this.on("attr:y0",(function(t,e){this.refresh()})),this.on("attr:y1",(function(t,e){this.refresh()}))},PropPlacer2.prototype.init=function(){this.x=.7965492,PropPlacer2.profile=[],PropPlacer2.profile[0]=0,PropPlacer2.profile[1]=0,PropPlacer2.profile[2]=0,PropPlacer2.profile[3]=0,PropPlacer2.profile[4]=0,this.registerCallbacks(),this.introViewCamera=this.app.root.findByName("IntroViewCamera"),this.gameOverCamera=this.app.root.findByName("TopDownViewCamera"),this.gameOverCameraController=this.app.root.findByName("GameOverCameraController").script.gameOverCameraPath,this.propsControllerScript=this.app.root.findByName("PropsController").script.propsController;var t=this.app.root.findByName("EnemiesController");this.enemyController=t.script.enemiesController,this.lastPos=pc.Vec3.ZERO,this.currentLOD=0,this.posLOD1=this.entity.getPosition().clone(),this.posLOD0=this.entity.getPosition().clone(),this.posLOD0.sub(pc.Vec3.UP),this.first_frame=!0},PropPlacer2.prototype.update=function(t){if(this.first_frame&&(this.refresh(),this.first_frame=!1),this.LODmode>0){var e=this.introViewCamera,s=this.enemyController.localPlayerCamera,i=this.gameOverCamera;if(e.enabled&&(i=this.introViewCamera),s&&!this.gameOverCameraController.moveCamera&&(i=s),i){var r=i.getPosition(),o=this.entity.getPosition(),n=o.sub2(o,r).length();switch(this.currentLOD){case 0:n>this.radius+50&&(1===this.LODmode||this.entity.tween(this.entity.getLocalPosition()).to(this.posLOD0,.5,pc.SineOut).on("complete",(function(){this.entity.model.enabled=!1})).start(),this.currentLOD=1);break;case 1:n<this.radius+45&&(1===this.LODmode||(this.entity.model.enabled=!0,this.entity.tween(this.entity.getLocalPosition()).to(this.posLOD1,.5,pc.SineOut).start()),this.currentLOD=0)}}}};var ShaderChanger=pc.createScript("shaderChanger");ShaderChanger.attributes.add("globalsControllerEntity",{type:"entity"}),ShaderChanger.attributes.add("objects",{type:"entity",array:!0}),ShaderChanger.attributes.add("allchildren",{type:"boolean"}),ShaderChanger.attributes.add("shadertype",{type:"number",enum:[{default:0},{cloud:1},{grass:2},{ribbon:3},{water:4},{ripples:5},{splash:6},{smokering:7},{charfox:8},{weapon:9},{test:10},{building:11},{skybox:12},{beam:13}],default:0}),ShaderChanger.attributes.add("tex0",{type:"asset",assetType:"texture"}),ShaderChanger.prototype.updateShader=function(){switch(this.shadertype){case 0:this.material=new pc.StandardMaterial,this.material.chunks.transformVS=this.app.assets.find("transformVS_Default").resource,this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Default").resource,this.material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Default").resource,this.material.specularTint=pc.Color.BLACK;break;case 1:this.material=new pc.StandardMaterial,this.material.chunks.transformVS=this.app.assets.find("transformVS_Cloud").resource,this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Cloud").resource,this.material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Cloud").resource,this.material.useFog=!1,this.material.useSkybox=!1,this.material.setParameter("tex0",this.tex0.resource),this.material.specularTint=pc.Color.BLACK;break;case 2:this.material=new pc.StandardMaterial,this.material.chunks.transformVS=this.app.assets.find("transformVS_Grass").resource,this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Props").resource,this.material.specularTint=pc.Color.BLACK;break;case 3:this.material=new pc.StandardMaterial,this.material.chunks.transformVS=this.app.assets.find("transformVS_Ribbon").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Ribbon").resource,this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Ribbon").resource,this.material.setParameter("tex0",this.tex0.resource),this.material.specularTint=pc.Color.BLACK;break;case 4:this.material=this.app.assets.find("MaterialWater").resource.clone();var e=navigator.userAgent.toLowerCase();e.indexOf("safari/")>=0&&e.indexOf("chrome")<0||MobileController.instance.active?this.material.chunks.diffusePS=this.app.assets.find("diffusePS_WaterNoDepth").resource:this.material.chunks.diffusePS=this.app.assets.find("diffusePS_WaterPCVersion").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Water").resource,this.material.chunks.normalVertexPS=this.app.assets.find("normalPS_Water").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_Water").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Water").resource,this.material.blendType=pc.BLEND_NORMAL,this.material.setParameter("uSurfaceTexture",this.tex0.resource);break;case 5:this.material=this.app.assets.find("MaterialWaterRipples").resource.clone(),this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Ripples").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,this.material.chunks.emissivePS=this.app.assets.find("emissionPS_White").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_Water").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Water").resource,this.material.setParameter("tex0",this.tex0.resource),this.material.specularTint=pc.Color.BLACK,this.material.diffuseMap=this.tex0.resource,this.material.diffuseMapUv=0,this.material.blendType=pc.BLEND_NORMAL,this.material.useLighting=!1,this.material.useSkybox=!1;break;case 6:this.material=this.app.assets.find("MaterialWaterSplash").resource.clone(),this.material.chunks.transformVS=this.app.assets.find("transformVS_Splash").resource,this.material.setParameter("tex0",this.tex0.resource),this.material.specularTint=pc.Color.BLACK,this.material.diffuseMap=this.tex0.resource,this.material.diffuseMapUv=0,this.material.blendType=pc.BLEND_NORMAL,this.material.useLighting=!1,this.material.useSkybox=!1;break;case 7:this.material=this.app.assets.find("MaterialSmokeRing").resource.clone(),this.material.chunks.diffusePS=this.app.assets.find("diffusePS_SmokeRing").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_SmokeRing").resource,this.material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Smoke").resource,this.material.setParameter("tex0",this.tex0.resource),this.material.setParameter("uRandom",Math.random()),this.material.specularTint=pc.Color.BLACK,this.material.blendType=pc.BLEND_NORMAL,this.material.useSkybox=!1;break;case 8:this.material=this.app.assets.find("CharacterMaterial").resource.clone(),this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Character").resource,this.material.chunks.fresnelSchlickPS=this.app.assets.find("fresnelSchlickPS_Character").resource,this.material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Character").resource;break;case 9:this.material=this.app.assets.find("WeaponMaterial").resource.clone(),this.material.chunks.transformVS=this.app.assets.find("transformVS_Weapon").resource;break;case 10:this.material=new pc.Material;break;case 13:var a=this.app.assets.find("vert_beam"),t=this.app.assets.find("frag_beam"),s={attributes:{aPosition:pc.SEMANTIC_POSITION,aNormal:pc.SEMANTIC_NORMAL,aUv0:pc.SEMANTIC_TEXCOORD0},vshader:a.resource,fshader:"precision "+this.app.graphicsDevice.precision+" float;\n"+t.resource},i=new pc.Shader(this.app.graphicsDevice,s);this.material=new pc.Material,this.material.shader=i,this.material.blendType=pc.BLEND_NORMAL,this.material.setParameter("uPerlinTexture",this.tex0.resource),this.material.setParameter("uNoiseTexture",this.app.assets.find("noise.png").resource)}this.material.update();for(var r=0;r<this.objects.length;r++){if((l=this.objects[r]).model)for(var h=l.model.model.meshInstances,n=0;n<h.length;n++)h[n].material=this.material}if(this.allchildren)for(r=0;r<this.entity.children.length;r++){var l;if((l=this.entity.children[r]).model)for(h=l.model.model.meshInstances,n=0;n<h.length;n++)h[n].material=this.material,1===this.shadertype&&(h[n].cull=!1)}this.time=0},ShaderChanger.prototype.init=function(e){this.gameController=e,this.entity.enabled?(this.updateShader(),this.isInitialized=!0):this.on("state",this.onStateChanged,this)},ShaderChanger.prototype.onStateChanged=function(e){e&&!this.isInitialized&&this.init()},ShaderChanger.prototype.update=function(e){if(this.isInitialized&&this.material)switch(this.time+=e,this.shadertype){case 0:break;case 1:case 2:case 3:case 4:this.material.setParameter("uTime",this.time);break;case 5:case 6:this.time>10&&(this.time=0),this.material.setParameter("uTime",this.time);break;case 7:this.time>3&&(this.time=0),this.material.setParameter("uTime",this.time);break;case 9:if(this.gameController.localPlayerCamera){var a=this.gameController.localPlayerCamera.getPosition();this.material.setParameter("uCameraPos",[a.x,a.y,a.z])}}},ShaderChanger.prototype.postUpdate=function(e){if(this.isInitialized)switch(this.shadertype){case 9:if(this.gameController.localPlayerCamera){var a=this.gameController.localPlayerCamera.getPosition();this.material.setParameter("uCameraPos",[a.x,a.y,a.z])}}};var PropsController=pc.createScript("propsController");PropsController.attributes.add("globalsControllerEntity",{type:"entity"}),PropsController.attributes.add("ramp",{type:"asset",assetType:"texture"}),PropsController.attributes.add("terrain",{type:"entity"}),PropsController.prototype.getMaterialWithShader=function(e){var t=null;switch(this.materials.length>e&&(t=this.materials[e]),e){case 1:t||(t=this.app.assets.find("Grass_NoCull").resource),t.chunks.transformVS=this.app.assets.find("transformVS_Grass").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Props").resource,t.setParameter("uHeightRamp",this.ramp.resource),t.setParameter("uRampMinY",this.rampy),t.setParameter("uRampHeight",this.rampheight);break;case 2:t||(t=this.app.assets.find("AO VertexColor_Tree").resource),t.chunks.transformVS=this.app.assets.find("transformVS_Tree").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Props").resource,t.setParameter("uHeightRamp",this.ramp.resource),t.setParameter("uRampMinY",this.rampy),t.setParameter("uRampHeight",this.rampheight);break;case 3:t||(t=this.app.assets.find("AO VertexColor_Rock").resource),t.chunks.transformVS=this.app.assets.find("transformVS_Rock").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Props").resource,t.setParameter("uHeightRamp",this.ramp.resource),t.setParameter("uRampMinY",this.rampy),t.setParameter("uRampHeight",this.rampheight);break;case 4:t||(t=this.app.assets.find("AO VertexColor_Test").resource),t.chunks.transformVS=this.app.assets.find("transformVS_Test").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Test").resource,t.setParameter("uHeightRamp",this.ramp.resource),t.setParameter("uRampMinY",this.rampy),t.setParameter("uRampHeight",this.rampheight);break;default:t||(t=this.app.assets.find("AO VertexColor_Default").resource),t.chunks.transformVS=this.app.assets.find("transformVS_Default").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Default").resource}t.update();this.ramp.resource;return t},PropsController.prototype.init=function(){if(this.frameCount=0,this.rampy=0,this.rampheight=5,this.terrain){var e=this.terrain.model.meshInstances[0].aabb;this.rampy=e.getMin().y,this.rampheight=2*e.halfExtents.y}this.materials=[];for(var t=0;t<4;t++)this.materials.push(this.getMaterialWithShader(t));var s=this.app.root.findByName("EnemiesController");this.enemyController=s.script.enemiesController;var r=this.app.root.findByName("Light");this.lightDirectional=r.light,this.lastPos=pc.Vec3.ZERO,this.time=0},PropsController.prototype.update=function(e){if(this.materials){this.frameCount<10&&this.frameCount++,this.frameCount,this.time+=e;for(var t=0;t<4;t++)this.materials[t].setParameter("uTime",this.time);this.enemyController.localPlayerCamera}};pc.extend(pc,function(){var TweenManager=function(t){this._app=t,this._tweens=[],this._add=[]};TweenManager.prototype={add:function(t){return this._add.push(t),t},update:function(t){for(var i=0,e=this._tweens.length;i<e;)this._tweens[i].update(t)?i++:(this._tweens.splice(i,1),e--);this._add.length&&(this._tweens=this._tweens.concat(this._add),this._add.length=0)}};var Tween=function(t,i,e){pc.events.attach(this),this.manager=i,e&&(this.entity=null),this.time=0,this.complete=!1,this.playing=!1,this.stopped=!0,this.pending=!1,this.target=t,this.duration=0,this._currentDelay=0,this.timeScale=1,this._reverse=!1,this._delay=0,this._yoyo=!1,this._count=0,this._numRepeats=0,this._repeatDelay=0,this._from=!1,this._slerp=!1,this._fromQuat=new pc.Quat,this._toQuat=new pc.Quat,this._quat=new pc.Quat,this.easing=pc.Linear,this._sv={},this._ev={}},_parseProperties=function(t){var i;return t instanceof pc.Vec2?i={x:t.x,y:t.y}:t instanceof pc.Vec3?i={x:t.x,y:t.y,z:t.z}:t instanceof pc.Vec4||t instanceof pc.Quat?i={x:t.x,y:t.y,z:t.z,w:t.w}:t instanceof pc.Color?(i={r:t.r,g:t.g,b:t.b},void 0!==t.a&&(i.a=t.a)):i=t,i};Tween.prototype={to:function(t,i,e,n,s,r){return this._properties=_parseProperties(t),this.duration=i,e&&(this.easing=e),n&&this.delay(n),s&&this.repeat(s),r&&this.yoyo(r),this},from:function(t,i,e,n,s,r){return this._properties=_parseProperties(t),this.duration=i,e&&(this.easing=e),n&&this.delay(n),s&&this.repeat(s),r&&this.yoyo(r),this._from=!0,this},rotate:function(t,i,e,n,s,r){return this._properties=_parseProperties(t),this.duration=i,e&&(this.easing=e),n&&this.delay(n),s&&this.repeat(s),r&&this.yoyo(r),this._slerp=!0,this},start:function(){var t,i,e,n;if(this.playing=!0,this.complete=!1,this.stopped=!1,this._count=0,this.pending=this._delay>0,this._reverse&&!this.pending?this.time=this.duration:this.time=0,this._from){for(t in this._properties)this._properties.hasOwnProperty(t)&&(this._sv[t]=this._properties[t],this._ev[t]=this.target[t]);this._slerp&&(this._toQuat.setFromEulerAngles(this.target.x,this.target.y,this.target.z),i=void 0!==this._properties.x?this._properties.x:this.target.x,e=void 0!==this._properties.y?this._properties.y:this.target.y,n=void 0!==this._properties.z?this._properties.z:this.target.z,this._fromQuat.setFromEulerAngles(i,e,n))}else{for(t in this._properties)this._properties.hasOwnProperty(t)&&(this._sv[t]=this.target[t],this._ev[t]=this._properties[t]);this._slerp&&(this._fromQuat.setFromEulerAngles(this.target.x,this.target.y,this.target.z),i=void 0!==this._properties.x?this._properties.x:this.target.x,e=void 0!==this._properties.y?this._properties.y:this.target.y,n=void 0!==this._properties.z?this._properties.z:this.target.z,this._toQuat.setFromEulerAngles(i,e,n))}return this._currentDelay=this._delay,this.manager.add(this),this},pause:function(){this.playing=!1},resume:function(){this.playing=!0},stop:function(){this.playing=!1,this.stopped=!0},delay:function(t){return this._delay=t,this.pending=!0,this},repeat:function(t,i){return this._count=0,this._numRepeats=t,this._repeatDelay=i||0,this},loop:function(t){return t?(this._count=0,this._numRepeats=1/0):this._numRepeats=0,this},yoyo:function(t){return this._yoyo=t,this},reverse:function(){return this._reverse=!this._reverse,this},chain:function(){for(var t=arguments.length;t--;)t>0?arguments[t-1]._chained=arguments[t]:this._chained=arguments[t];return this},update:function(t){if(this.stopped)return!1;if(!this.playing)return!0;if(!this._reverse||this.pending?this.time+=t*this.timeScale:this.time-=t*this.timeScale,this.pending){if(!(this.time>this._currentDelay))return!0;this._reverse?this.time=this.duration-(this.time-this._currentDelay):this.time=this.time-this._currentDelay,this.pending=!1}var i=0;(!this._reverse&&this.time>this.duration||this._reverse&&this.time<0)&&(this._count++,this.complete=!0,this.playing=!1,this._reverse?(i=this.duration-this.time,this.time=0):(i=this.time-this.duration,this.time=this.duration));var e,n,s=0===this.duration?1:this.time/this.duration,r=this.easing(s);for(var h in this._properties)this._properties.hasOwnProperty(h)&&(e=this._sv[h],n=this._ev[h],this.target[h]=e+(n-e)*r);if(this._slerp&&this._quat.slerp(this._fromQuat,this._toQuat,r),this.entity&&(this.entity._dirtifyLocal(),this.element&&this.entity.element&&(this.entity.element[this.element]=this.target),this._slerp&&this.entity.setLocalRotation(this._quat)),this.fire("update",t),this.complete){var a=this._repeat(i);return a?this.fire("loop"):(this.fire("complete",i),this.entity&&this.entity.off("destroy",this.stop,this),this._chained&&this._chained.start()),a}return!0},_repeat:function(t){if(this._count<this._numRepeats){if(this._reverse?this.time=this.duration-t:this.time=t,this.complete=!1,this.playing=!0,this._currentDelay=this._repeatDelay,this.pending=!0,this._yoyo){for(var i in this._properties){var e=this._sv[i];this._sv[i]=this._ev[i],this._ev[i]=e}this._slerp&&(this._quat.copy(this._fromQuat),this._fromQuat.copy(this._toQuat),this._toQuat.copy(this._quat))}return!0}return!1}};var BounceIn=function(t){return 1-BounceOut(1-t)},BounceOut=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};return{TweenManager:TweenManager,Tween:Tween,Linear:function(t){return t},QuadraticIn:function(t){return t*t},QuadraticOut:function(t){return t*(2-t)},QuadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},CubicIn:function(t){return t*t*t},CubicOut:function(t){return--t*t*t+1},CubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},QuarticIn:function(t){return t*t*t*t},QuarticOut:function(t){return 1- --t*t*t*t},QuarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},QuinticIn:function(t){return t*t*t*t*t},QuinticOut:function(t){return--t*t*t*t*t+1},QuinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},SineIn:function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)},SineOut:function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)},SineInOut:function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))},ExponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},ExponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},ExponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},CircularIn:function(t){return 1-Math.sqrt(1-t*t)},CircularOut:function(t){return Math.sqrt(1- --t*t)},CircularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},BackIn:function(t){var i=1.70158;return t*t*((i+1)*t-i)},BackOut:function(t){var i=1.70158;return--t*t*((i+1)*t+i)+1},BackInOut:function(t){var i=2.5949095;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)},BounceIn:BounceIn,BounceOut:BounceOut,BounceInOut:function(t){return t<.5?.5*BounceIn(2*t):.5*BounceOut(2*t-1)+.5},ElasticIn:function(t){var i,e=.1;return 0===t?0:1===t?1:(!e||e<1?(e=1,i=.1):i=.4*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/.4))},ElasticOut:function(t){var i,e=.1;return 0===t?0:1===t?1:(!e||e<1?(e=1,i=.1):i=.4*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/.4)+1)},ElasticInOut:function(t){var i,e=.1,n=.4;return 0===t?0:1===t?1:(!e||e<1?(e=1,i=.1):i=n*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/n)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/n)*.5+1)}}}()),function(){pc.Application.prototype.addTweenManager=function(){this._tweenManager=new pc.TweenManager(this),this.on("update",(function(t){this._tweenManager.update(t)}))},pc.Application.prototype.tween=function(t){return new pc.Tween(t,this._tweenManager)},pc.Entity.prototype.tween=function(t,i){var e=this._app.tween(t);return e.entity=this,this.once("destroy",e.stop,e),i&&i.element&&(e.element=i.element),e};var t=pc.Application.getApplication();t&&t.addTweenManager()}();var PlayerHitDetector=pc.createScript("playerHitDetector");PlayerHitDetector.attributes.add("projectileHitIndicator",{type:"entity",title:"ProjectileHitIndicator"}),PlayerHitDetector.attributes.add("playerID",{type:"string",title:"Player ID"}),PlayerHitDetector.attributes.add("isLocalPlayer",{type:"boolean",default:!1}),PlayerHitDetector.attributes.add("isAlive",{type:"boolean",default:!1,title:"Is Player Alive"}),PlayerHitDetector.attributes.add("currentHealth",{type:"number",default:0}),PlayerHitDetector.attributes.add("isInWater",{type:"boolean",default:!1,title:"Is In Water"}),PlayerHitDetector.prototype.init=function(t,e,i){this.playerID=t,this.isLocalPlayer=e,this.currentHealth=i,this.modelMovementScript=this.entity.parent.script.modelMovement,this.playerSoundManagerScript=this.entity.parent.script.playerSoundManager,this.waterEnterHeight=null,this.detectorEnabled=!1,this.app.on("respawn",this.onRespawnGranted,this),this.on("destroy",this.onDestroy,this)},PlayerHitDetector.prototype.onDestroy=function(){this.app.off("respawn",this.onRespawnGranted,this)},PlayerHitDetector.prototype.onRespawnGranted=function(t,e){this.playerID===t.id&&t.isAlive&&t.isConnected&&(this.isInWater=!1)},PlayerHitDetector.prototype.enableDetector=function(){this.detectorEnabled||(this.detectorEnabled=!0,this.entity.collision.enabled=!0,this.on("attr:isInWater",this.onIsInWaterStateChanged,this),this.entity.collision.on("collisionstart",this.onCollisionStart,this),this.entity.collision.on("collisionend",this.onCollisionEnd,this))},PlayerHitDetector.prototype.disableDetector=function(){this.detectorEnabled&&(this.detectorEnabled=!1,this.entity.collision.enabled=!1,this.off("attr:isInWater",this.onIsInWaterStateChanged,this),this.entity.collision.off("collisionstart",this.onCollisionStart,this),this.entity.collision.off("collisionend",this.onCollisionEnd,this))},PlayerHitDetector.prototype.onCurrentHealthStateChanged=function(t){this.currentHealth=t},PlayerHitDetector.prototype.onIsInWaterStateChanged=function(t,e){this.isLocalPlayer&&this.modelMovementScript.onPlayerIsInWaterStateChanged(t),this.playerSoundManagerScript.onPlayerIsInWaterStateChanged(t)},PlayerHitDetector.prototype.onCollisionStart=function(t){var e=t.other,i=e.tag,a=e.name,n=e.tags.list();n[0];if(null!=i&&i.includes("Bullet")){var r=e.script.bulletMovement;if(this.isLocalPlayer)"EnemyFiredBullet"===i&&r.disableBullet();else{var o=r.bulletID,l=r.bulletDamage,s=r.playerShooting,h=r.playerShootingPosition,c=this.playerID===s,d=t.contacts[0].point;!c&&"OwnBullet"===i&&this.currentHealth>0?this.app.fire("bulletHitPlayer",o,s,this.playerID,l,h,d,!1):c&&"EnemyFiredBullet"===i&&this.app.fire("bulletHitWorld",o,s,null,0,h,d,pc.Vec3.UP,ObjectMaterials.material_flesh),r.disableBullet()}}else this.isInWater||a!==WATER_COLLIDER_NAME?null!=n&&n.includes("material_wood")&&n.includes("walkable")?this.playerSoundManagerScript.onPlayerGroundMaterialChanged("material_wood"):null!=n&&n.includes("ground")&&this.playerSoundManagerScript.onPlayerGroundMaterialChanged("material_dirt"):(this.isInWater=!0,this.waterEnterHeight=Math.round(Math.abs(this.entity.parent.getPosition().y)))},PlayerHitDetector.prototype.onCollisionEnd=function(t){if(t.name===WATER_COLLIDER_NAME&&this.isInWater){var e=Math.round(Math.abs(this.entity.parent.getPosition().y));this.waterEnterHeight>=e&&(this.isInWater=!1)}};var Lod=pc.createScript("lod");Lod.attributes.add("lod0AssetName",{type:"string",default:""}),Lod.attributes.add("lod1AssetName",{type:"string",default:""}),Lod.prototype.init=function(t,s,e){this.propsControllerScript=s,this.gameControllerScript=e,this.currentLOD=0,this.lod0=null,this.lod1=null,this.dist0=null,t.modelFileAssetsToLoad[this.lod0AssetName].ready((function(s){var e=this.lod0AssetName;this.lod0=s,t.modelFileAssetsLoaded.includes(e)||(t.initialAssetsLoaded++,t.totalAssetsLoaded++,t.modelFileAssetsLoaded.push(e))}),this),t.modelFileAssetsToLoad[this.lod1AssetName].ready((function(s){var e=this.lod1AssetName;this.lod1=s,t.modelFileAssetsLoaded.includes(e)||(t.initialAssetsLoaded++,t.totalAssetsLoaded++,t.modelFileAssetsLoaded.push(e))}),this),this.isInitialized=!0},Lod.prototype.setMesh=function(t){this.entity.model.asset!==t.id&&(this.entity.model.asset=t)},Lod.prototype.update=function(t){if(this.isInitialized&&null!==this.lod0&&null!==this.lod1&&this.entity.model.asset){if(null===this.dist0){var s=this.entity.model.meshInstances[0].aabb.halfExtents.length();this.dist0=10*s}var e=this.gameControllerScript.localPlayerCamera;if(e){var i=e.getPosition(),o=this.entity.getPosition(),l=o.sub2(o,i).length();switch(this.currentLOD){case 0:l>this.dist0&&(this.currentLOD=1,this.setMesh(this.lod1),this.entity.model.model.meshInstances[0].material=this.propsControllerScript.materials[2]);break;case 1:l<this.dist0&&(this.currentLOD=0,this.setMesh(this.lod0),this.entity.model.model.meshInstances[0].material=this.propsControllerScript.materials[2])}}}};var SAMPLE_COUNT=15;function computeGaussian(e,t){return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-e*e/(2*t*t))}function calculateBlurValues(e,t,o,s,r){e[0]=computeGaussian(0,r),t[0]=0,t[1]=0;var i,l,a=e[0];for(i=0,l=Math.floor(SAMPLE_COUNT/2);i<l;i++){var u=computeGaussian(i+1,r);e[2*i]=u,e[2*i+1]=u,a+=2*u;var f=2*i+1.5;t[4*i]=o*f,t[4*i+1]=s*f,t[4*i+2]=-o*f,t[4*i+3]=-s*f}for(i=0,l=e.length;i<l;i++)e[i]/=a}function BloomEffect(e){pc.PostEffect.call(this,e);var t={aPosition:pc.SEMANTIC_POSITION},o=["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition + 1.0) * 0.5;","}"].join("\n"),s=["precision "+e.precision+" float;","","varying vec2 vUv0;","","uniform sampler2D uBaseTexture;","uniform float uBloomThreshold;","","void main(void)","{"," vec4 color = texture2D(uBaseTexture, vUv0);",""," gl_FragColor = clamp((color - uBloomThreshold) / (1.0 - uBloomThreshold), 0.0, 1.0);","}"].join("\n"),r=["precision "+e.precision+" float;","","#define SAMPLE_COUNT "+SAMPLE_COUNT,"","varying vec2 vUv0;","","uniform sampler2D uBloomTexture;","uniform vec2 uBlurOffsets[SAMPLE_COUNT];","uniform float uBlurWeights[SAMPLE_COUNT];","","void main(void)","{"," vec4 color = vec4(0.0);"," for (int i = 0; i < SAMPLE_COUNT; i++)"," {"," color += texture2D(uBloomTexture, vUv0 + uBlurOffsets[i]) * uBlurWeights[i];"," }",""," gl_FragColor = color;","}"].join("\n"),i=["precision "+e.precision+" float;","","varying vec2 vUv0;","","uniform float uBloomEffectIntensity;","uniform sampler2D uBaseTexture;","uniform sampler2D uBloomTexture;","","void main(void)","{"," vec4 bloom = texture2D(uBloomTexture, vUv0) * uBloomEffectIntensity;"," vec4 base = texture2D(uBaseTexture, vUv0);",""," base *= (1.0 - clamp(bloom, 0.0, 1.0));",""," gl_FragColor = base + bloom;","}"].join("\n");this.extractShader=new pc.Shader(e,{attributes:t,vshader:o,fshader:s}),this.blurShader=new pc.Shader(e,{attributes:t,vshader:o,fshader:r}),this.combineShader=new pc.Shader(e,{attributes:t,vshader:o,fshader:i});var l=e.width,a=e.height;this.targets=[];for(var u=0;u<2;u++){var f=new pc.Texture(e,{format:pc.PIXELFORMAT_R8_G8_B8_A8,width:l>>1,height:a>>1,mipmaps:!1});f.minFilter=pc.FILTER_LINEAR,f.magFilter=pc.FILTER_LINEAR,f.addressU=pc.ADDRESS_CLAMP_TO_EDGE,f.addressV=pc.ADDRESS_CLAMP_TO_EDGE,f.name="pe-bloom";var h=new pc.RenderTarget({colorBuffer:f,depth:!1});this.targets.push(h)}this.bloomThreshold=.25,this.blurAmount=4,this.bloomIntensity=1.25,this.sampleWeights=new Float32Array(SAMPLE_COUNT),this.sampleOffsets=new Float32Array(2*SAMPLE_COUNT)}BloomEffect.prototype=Object.create(pc.PostEffect.prototype),BloomEffect.prototype.constructor=BloomEffect,Object.assign(BloomEffect.prototype,{render:function(e,t,o){var s=this.device,r=s.scope;r.resolve("uBloomThreshold").setValue(this.bloomThreshold),r.resolve("uBaseTexture").setValue(e.colorBuffer),pc.drawFullscreenQuad(s,this.targets[0],this.vertexBuffer,this.extractShader),calculateBlurValues(this.sampleWeights,this.sampleOffsets,1/this.targets[1].width,0,this.blurAmount),r.resolve("uBlurWeights[0]").setValue(this.sampleWeights),r.resolve("uBlurOffsets[0]").setValue(this.sampleOffsets),r.resolve("uBloomTexture").setValue(this.targets[0].colorBuffer),pc.drawFullscreenQuad(s,this.targets[1],this.vertexBuffer,this.blurShader),calculateBlurValues(this.sampleWeights,this.sampleOffsets,0,1/this.targets[0].height,this.blurAmount),r.resolve("uBlurWeights[0]").setValue(this.sampleWeights),r.resolve("uBlurOffsets[0]").setValue(this.sampleOffsets),r.resolve("uBloomTexture").setValue(this.targets[1].colorBuffer),pc.drawFullscreenQuad(s,this.targets[0],this.vertexBuffer,this.blurShader),r.resolve("uBloomEffectIntensity").setValue(this.bloomIntensity),r.resolve("uBloomTexture").setValue(this.targets[0].colorBuffer),r.resolve("uBaseTexture").setValue(e.colorBuffer),pc.drawFullscreenQuad(s,t,this.vertexBuffer,this.combineShader,o)}});var Bloom=pc.createScript("bloom");Bloom.attributes.add("bloomIntensity",{type:"number",default:1,min:0,title:"Intensity"}),Bloom.attributes.add("bloomThreshold",{type:"number",default:.25,min:0,max:1,title:"Threshold"}),Bloom.attributes.add("blurAmount",{type:"number",default:4,min:1,title:"Blur amount"}),Bloom.prototype.initialize=function(){this.effect=new BloomEffect(this.app.graphicsDevice),this.effect.bloomThreshold=this.bloomThreshold,this.effect.blurAmount=this.blurAmount,this.effect.bloomIntensity=this.bloomIntensity;var e=this.entity.camera.postEffects;e.addEffect(this.effect),this.on("attr",(function(e,t){this.effect[e]=t}),this),this.on("state",(function(t){t?e.addEffect(this.effect):e.removeEffect(this.effect)})),this.on("destroy",(function(){e.removeEffect(this.effect)}))};function HueSaturationEffect(t){pc.PostEffect.call(this,t),this.shader=new pc.Shader(t,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+t.precision+" float;","","uniform sampler2D uColorBuffer;","uniform float uHue;","uniform float uSaturation;","","varying vec2 vUv0;","","void main() {"," gl_FragColor = texture2D( uColorBuffer, vUv0 );",""," float angle = uHue * 3.14159265;"," float s = sin(angle), c = cos(angle);"," vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;"," float len = length(gl_FragColor.rgb);"," gl_FragColor.rgb = vec3("," dot(gl_FragColor.rgb, weights.xyz),"," dot(gl_FragColor.rgb, weights.zxy),"," dot(gl_FragColor.rgb, weights.yzx)"," );",""," float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;"," if (uSaturation > 0.0) {"," gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - uSaturation));"," } else {"," gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-uSaturation);"," }","}"].join("\n")}),this.hue=0,this.saturation=0}HueSaturationEffect.prototype=Object.create(pc.PostEffect.prototype),HueSaturationEffect.prototype.constructor=HueSaturationEffect,Object.assign(HueSaturationEffect.prototype,{render:function(t,e,r){var a=this.device,o=a.scope;o.resolve("uHue").setValue(this.hue),o.resolve("uSaturation").setValue(this.saturation),o.resolve("uColorBuffer").setValue(t.colorBuffer),pc.drawFullscreenQuad(a,e,this.vertexBuffer,this.shader,r)}});var HueSaturation=pc.createScript("hueSaturation");HueSaturation.attributes.add("hue",{type:"number",default:0,min:-1,max:1,title:"Hue"}),HueSaturation.attributes.add("saturation",{type:"number",default:0,min:-1,max:1,title:"Saturation"}),HueSaturation.prototype.initialize=function(){this.effect=new HueSaturationEffect(this.app.graphicsDevice),this.effect.hue=this.hue,this.effect.saturation=this.saturation,this.on("attr",(function(t,e){this.effect[t]=e}),this);var t=this.entity.camera.postEffects;t.addEffect(this.effect),this.on("state",(function(e){e?t.addEffect(this.effect):t.removeEffect(this.effect)})),this.on("destroy",(function(){t.removeEffect(this.effect)}))};var RenderDepth=pc.createScript("renderDepth");RenderDepth.prototype.initialize=function(){var e=navigator.userAgent.toLowerCase();if(!(e.indexOf("safari/")>=0&&e.indexOf("chrome")<0)&&!MobileController.instance.active){var r=this.app.scene.layers.getLayerById(pc.LAYERID_DEPTH);r&&(r.incrementCounter(),r.clearColorBuffer=!0,r.clearDepthBuffer=!0,r.clearStencilBuffer=!0,this.on("enable",(function(){r.incrementCounter()})),this.on("disable",(function(){r.decrementCounter()})))}};pc.extend(pc,function(){var BrightnessContrastEffect=function(t){this.shader=new pc.Shader(t,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+t.precision+" float;","uniform sampler2D uColorBuffer;","uniform float uBrightness;","uniform float uContrast;","varying vec2 vUv0;","void main() {","gl_FragColor = texture2D( uColorBuffer, vUv0 );","gl_FragColor.rgb += uBrightness;","if (uContrast > 0.0) {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - uContrast) + 0.5;","} else {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + uContrast) + 0.5;","}","}"].join("\n")}),this.brightness=0,this.contrast=0};return(BrightnessContrastEffect=pc.inherits(BrightnessContrastEffect,pc.PostEffect)).prototype=pc.extend(BrightnessContrastEffect.prototype,{render:function(t,e,r){var s=this.device,i=s.scope;i.resolve("uBrightness").setValue(this.brightness),i.resolve("uContrast").setValue(this.contrast),i.resolve("uColorBuffer").setValue(t.colorBuffer),pc.drawFullscreenQuad(s,e,this.vertexBuffer,this.shader,r)}}),{BrightnessContrastEffect:BrightnessContrastEffect}}());var BrightnessContrast=pc.createScript("brightnessContrast");BrightnessContrast.attributes.add("brightness",{type:"number",default:0,min:-1,max:1,precision:5,title:"Brightness"}),BrightnessContrast.attributes.add("contrast",{type:"number",default:0,min:-1,max:1,precision:5,title:"Contrast"}),BrightnessContrast.prototype.initialize=function(){this.effect=new pc.BrightnessContrastEffect(this.app.graphicsDevice),this.effect.brightness=this.brightness,this.effect.contrast=this.contrast,this.on("attr",(function(t,e){this.effect[t]=e}),this);var t=this.entity.camera.postEffects;t.addEffect(this.effect),this.on("state",(function(e){e?t.addEffect(this.effect):t.removeEffect(this.effect)})),this.on("destroy",(function(){t.removeEffect(this.effect)}))};var HealthBarManager=pc.createScript("healthBarManager");HealthBarManager.attributes.add("progressImage",{type:"entity"}),HealthBarManager.attributes.add("progressImageMaxWidth",{type:"number"}),HealthBarManager.prototype.init=function(){this.updateProgress(1),this.targetValueReached=!0,this.isInitialValueSet=!1},HealthBarManager.prototype.setProgress=function(t){t=pc.math.clamp(t,0,1),this.targetValue=t,this.targetValueReached=!1},HealthBarManager.prototype.update=function(t){this.targetValueReached||(this.currentState>this.targetValue+t/2?this.isInitialValueSet?this.progress=this.currentState-t/2:(this.progress=this.targetValue,this.isInitialValueSet=!0):(this.progress=this.targetValue,this.targetValueReached=!0),this.updateProgress(this.progress))},HealthBarManager.prototype.updateProgress=function(t){t=pc.math.clamp(t,0,1),this.currentState=t;var e=pc.math.lerp(0,this.progressImageMaxWidth,t);this.progressImage.element.width=e,this.progressImage.element.rect.z=t};var TimeProgressBarManager=pc.createScript("timeProgressBarManager");TimeProgressBarManager.attributes.add("progressImage",{type:"entity"}),TimeProgressBarManager.attributes.add("progressImageMaxHeight",{type:"number"}),TimeProgressBarManager.prototype.updateProgress=function(e){e=pc.math.clamp(e,0,1);var r=pc.math.lerp(0,this.progressImageMaxHeight,e);this.progressImage.element.height=r};var MineField=pc.createScript("mineField");MineField.attributes.add("isInitialized",{type:"boolean",default:!1}),MineField.attributes.add("mineID",{type:"string",default:"1"}),MineField.attributes.add("effectController",{type:"entity"}),MineField.prototype.init=function(i){this.isInitialized||(this.localPlayerEntity=null,this.localPlayerPosition=new pc.Vec3,this.localPlayerID="",i.musicBundleAsset.ready((function(i){var t=this.app.assets.find("rocket_launcher_explosion_x2_1.5sec.mp3","audio"),e=this.entity.sound.slot("explosion");e.asset=t,e.duration=1.5}),this),this.app.on("localPlayerSpawned",this.onLocalPlayerSpawned,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("playerKilled",this.OnPlayerKilled,this),this.explosionPosition=new pc.Vec3,this.explosionNormal=new pc.Quat,this.explosionNormal.setFromEulerAngles(90,0,0),this.checkForLocationTimer=0,this.checkForLocationInterval=1,this.mineFieldPositionOuterLimit=180,this.mineFieldPositionHeightLimit=300,this.isInitialized=!0,this.isIngameAndAlive=!1)},MineField.prototype.update=function(i){this.isIngameAndAlive&&(this.checkForLocationTimer+=i,this.checkForLocationTimer>this.checkForLocationInterval&&(this.checkForLocationTimer=0,null!==this.localPlayerEntity&&void 0!==this.localPlayerEntity&&(this.localPlayerPosition.set(this.localPlayerEntity.getPosition().x,this.localPlayerEntity.getPosition().y,this.localPlayerEntity.getPosition().z),(this.localPlayerPosition.x<-this.mineFieldPositionOuterLimit||this.localPlayerPosition.x>this.mineFieldPositionOuterLimit||this.localPlayerPosition.z<-this.mineFieldPositionOuterLimit||this.localPlayerPosition.z>this.mineFieldPositionOuterLimit||this.localPlayerPosition.y<-this.mineFieldPositionHeightLimit||this.localPlayerPosition.y>this.mineFieldPositionHeightLimit)&&this.localPlayerEntity.script.playerManager.isLocalPlayer&&this.localPlayerEntity.script.playerManager.isAlive&&(this.PlayExplosion(this.localPlayerPosition),this.DoDamage(this.localPlayerEntity)))))},MineField.prototype.DoDamage=function(i){this.app.fire("notifyMineDamage",i.script.playerManager.playerID,50),this.app.fire("playerHitMine",this.mineID,i.script.playerManager.playerID,50,i.getPosition())},MineField.prototype.PlayExplosion=function(i){this.explosionPosition.set(i.x,i.y,i.z),this.entity.setPosition(this.explosionPosition),this.effectController.script.effectController.startGroundExplosion(this.explosionPosition,this.explosionNormal),soundEnabled&&(this.entity.sound.slots.explosion.startTime=Math.floor(2*Math.random())*this.entity.sound.slots.explosion.duration,this.entity.sound.slots.explosion.volume=1,this.entity.sound.slots.explosion.play())},MineField.prototype.onLeftGame=function(){this.localPlayerEntity=null,this.isIngameAndAlive=!1},MineField.prototype.onLocalPlayerSpawned=function(i){this.localPlayerEntity=i,this.localPlayerID=this.localPlayerEntity.script.playerManager.playerID,this.isIngameAndAlive=!0},MineField.prototype.OnPlayerKilled=function(i,t){this.localPlayerID===i&&(this.isIngameAndAlive=!1)};var MeshCreator=pc.createScript("meshCreator");MeshCreator.attributes.add("material",{type:"asset",assetType:"material"}),MeshCreator.attributes.add("cloudModel0",{type:"asset",assetType:"model"}),MeshCreator.attributes.add("quadModel",{type:"asset",assetType:"model"}),MeshCreator.prototype.createTorus=function(){for(var e=[],s=[],t=[],p=0;p<32;p++){for(var r=.19635*p,a=Math.cos(r),u=Math.sin(r),h=0;h<4;h++)e.push(a),e.push(u),e.push(0);s.push(a),s.push(u),s.push(0),s.push(0),s.push(0),s.push(1),s.push(-a),s.push(-u),s.push(-0),s.push(0),s.push(0),s.push(-1)}for(p=0;p<32;p++){var o=4*p,n=o+4;n>=128&&(n=0);for(h=0;h<4;h++)t.push(o+h+0),t.push(n+h+0),t.push(n+(h+1)%4),t.push(o+h+0),t.push(n+(h+1)%4),t.push(o+(h+1)%4)}var i=new pc.Mesh(this.app.graphicsDevice);i.setPositions(e),i.setNormals(s),i.setIndices(t),i.update();var d=new pc.GraphNode,c=new pc.StandardMaterial;c.diffuse.set(1,0,0),c.update();var l=new pc.MeshInstance(d,i,c),M=new pc.Model;return M.graph=d,M.meshInstances.push(l),M},MeshCreator.prototype.getTorusModel=function(){return this.torusModel||(this.torusModel=this.createTorus()),this.torusModel},MeshCreator.prototype.createCylinder=function(e,s){for(var t=[],p=[],r=[],a=[],u=1/e,h=6.2832/s,o=0;o<=e;o++)for(var n=o*u,i=(o-1)*s,d=i+s,c=0;c<s;c++){var l=c*h,M=Math.cos(l),C=Math.sin(l);t.push(1*M),t.push(1*C),t.push(n),p.push(M),p.push(C),p.push(0),a.push(0),a.push(0),o>0&&(r.push(i+c+0),r.push(d+c+0),r.push(d+(c+1)%s),r.push(i+c+0),r.push(d+(c+1)%s),r.push(i+(c+1)%s))}var v=new pc.Mesh(this.app.graphicsDevice);v.setPositions(t),v.setNormals(p),v.setIndices(r),v.setUvs(0,a),v.update();var f=new pc.GraphNode,I=new pc.StandardMaterial;I.diffuse.set(1,0,0),I.update();var m=new pc.MeshInstance(f,v,I),y=new pc.Model;return y.graph=f,y.meshInstances.push(m),y},MeshCreator.prototype.getCylinderModel=function(){return this.capsuleModel||(this.capsuleModel=this.createCapsule(4,16)),this.capsuleModel},MeshCreator.prototype.createCapsule=function(e,s){for(var t=[],p=[],r=[],a=[],u=1/e,h=6.2832/s,o=0;o<=e;o++){var n=1;0!==o&&o!==e||(n=0);for(var i=o*u,d=(o-1)*s,c=d+s,l=0;l<s;l++){var M=l*h,C=Math.cos(M),v=Math.sin(M);t.push(C*n),t.push(v*n),t.push(i),p.push(C),p.push(v),p.push(0),a.push(0),a.push(0),o>0&&(r.push(d+l+0),r.push(c+l+0),r.push(c+(l+1)%s),r.push(d+l+0),r.push(c+(l+1)%s),r.push(d+(l+1)%s))}}var f=new pc.Mesh(this.app.graphicsDevice);f.setPositions(t),f.setNormals(p),f.setIndices(r),f.setUvs(0,a),f.update();var I=new pc.GraphNode,m=new pc.StandardMaterial;m.diffuse.set(1,0,0),m.update();var y=new pc.MeshInstance(I,f,m),w=new pc.Model;return w.graph=I,w.meshInstances.push(y),w},MeshCreator.prototype.getCapsuleModel_LO=function(){return this.capsuleModel_LO||(this.capsuleModel_LO=this.createCapsule(16,4)),this.capsuleModel_LO},MeshCreator.prototype.getCapsuleModel_HI=function(){return this.capsuleModel_HI||(this.capsuleModel_HI=this.createCapsule(32,4)),this.capsuleModel_HI},MeshCreator.prototype.getCapsuleModel_VHI=function(){return this.capsuleModel_VHI||(this.capsuleModel_VHI=this.createCapsule(128,6)),this.capsuleModel_VHI},MeshCreator.prototype.createCloudCloud=function(e,s){var t=[],p=[],r=[],a=e.getPositions(t);e.getNormals(p);for(var u=e.getIndices(r),h=[],o=[],n=[],i=[],d=1/s,c=0;c<s;c++){for(var l=c*a,M=d*c,C=0;C<a;C++)h.push(t[3*C]),h.push(t[3*C+1]),h.push(t[3*C+2]),o.push(p[3*C]),o.push(p[3*C+1]),o.push(p[3*C+2]),i.push(M),i.push(0);for(C=0;C<u;C++)n.push(l+r[C])}var v=new pc.Mesh(this.app.graphicsDevice);v.setPositions(h),v.setNormals(o),v.setIndices(n),v.setUvs(0,i),v.update();var f=new pc.GraphNode,I=new pc.StandardMaterial;I.diffuse.set(1,0,0),I.update();var m=new pc.MeshInstance(f,v,I),y=new pc.Model;return y.graph=f,y.meshInstances.push(m),y},MeshCreator.prototype.getMultiQuadModel=function(){return this.multiQuadModel||(this.multiQuadModel=this.createCloudCloud(this.quadModel.resource.meshInstances[0].mesh,16)),this.multiQuadModel},MeshCreator.prototype.getCloudModel=function(){return this.cloudModel||(this.cloudModel=this.createCloudCloud(this.cloudModel0.resource.meshInstances[0].mesh,64)),this.cloudModel},MeshCreator.prototype.init=function(){},MeshCreator.prototype.update=function(e){};var LeaderboardElementHelper=pc.createScript("leaderboardElementHelper");LeaderboardElementHelper.attributes.add("numberLabelEntity",{type:"entity",title:"Number Label"}),LeaderboardElementHelper.attributes.add("nameLabelEntity",{type:"entity",title:"Name Label"}),LeaderboardElementHelper.attributes.add("scoreLabelEntity",{type:"entity",title:"Score Label"}),LeaderboardElementHelper.attributes.add("killsLabelEntity",{type:"entity",title:"Kills Label"}),LeaderboardElementHelper.attributes.add("deathsLabelEntity",{type:"entity",title:"Deaths Label"}),LeaderboardElementHelper.attributes.add("newHighscoreEntity",{type:"entity",title:"New Highscore"}),LeaderboardElementHelper.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),LeaderboardElementHelper.attributes.add("currencyIcon",{type:"entity",title:"Currency Icon"}),LeaderboardElementHelper.attributes.add("currencyLabelEntity",{type:"entity",title:"Currency Label"}),LeaderboardElementHelper.prototype.init=function(e){this.Default_Cell_Background_Opacity=.9,this.Medium_Highlighted_Cell_Background_Opacity=.7,this.Highlighted_Cell_Background_Opacity=1,this.backgroundElement=this.entity.element,this.numberElement=this.numberLabelEntity.element,this.nameElement=this.nameLabelEntity.element,this.scoreElement=this.scoreLabelEntity.element,this.killsElement=this.killsLabelEntity.element,this.deathsElement=this.deathsLabelEntity.element,this.currencyIconElement=this.currencyIcon.element,this.currencyElement=this.currencyLabelEntity.element,this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper,this.backgroundElement.name="Element"+e,this.nameElement.outlineColor=Leaderboard_Element_Highlighted_Text_Shadow_Color},LeaderboardElementHelper.prototype.show=function(e,t,n,l,i,r,a,m,d){this.numberElement.text=e,this.nameElement.text=t,this.scoreElement.text=n,this.killsElement.text=l,this.deathsElement.text=i,d&&0!==d?(this.currencyElement.text="+"+d,this.currencyElement.entity.enabled=!0,this.currencyIconElement.entity.enabled=!0):(this.currencyElement.text="",this.currencyElement.entity.enabled=!1,this.currencyIconElement.entity.enabled=!1),r?(this.nameElement.color=Leaderboard_Element_Highlighted_Text_Color,this.nameElement.outlineThickness=1):(this.nameElement.color=Leaderboard_Element_Default_Text_Color_TOP3,this.nameElement.outlineThickness=0),this.newHighscoreEntity.enabled=!!a,this.profileRankEmblemHelper.setEmblem(m),this.entity.enabled=!0},LeaderboardElementHelper.prototype.hide=function(){this.entity.enabled=!1};var KillsLabelHelper=pc.createScript("killsLabelHelper");KillsLabelHelper.attributes.add("background",{type:"entity",title:"Background"}),KillsLabelHelper.prototype.init=function(){this.element=this.entity.element,this.initialBackgroundWidth=this.background.element.width,this.characterWidth=this.element.fontSize/2},KillsLabelHelper.prototype.updateKillsLabel=function(t){this.element.text=1==t?t+" Frag":t+" Frags";var e=this.element.text.length>0?this.element.text.length-1:this.element.text.length,i=this.initialBackgroundWidth+e*this.characterWidth;null!=i&&this.background.element.width};var PrivateArenaPopup=pc.createScript("privateArenaPopup");PrivateArenaPopup.attributes.add("titleLabelEntity",{type:"entity",title:"Title Label"}),PrivateArenaPopup.attributes.add("descriptionLabelEntity",{type:"entity",title:"Description Label"}),PrivateArenaPopup.attributes.add("linkLabelEntity",{type:"entity",title:"Link Label"}),PrivateArenaPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),PrivateArenaPopup.attributes.add("copyButton",{type:"entity",title:"Copy Button"}),PrivateArenaPopup.attributes.add("newArenaButton",{type:"entity",title:"New Arena Button"}),PrivateArenaPopup.attributes.add("playButton",{type:"entity",title:"Play Button"}),PrivateArenaPopup.attributes.add("urlBackground",{type:"entity",title:"urlBackground"});const PrivateArenaPopupTypes={create:0,join:1},PrivateArenaPopupActions={playButtonPressed:0,newArenaButtonPressed:1,closeButtonPressed:2};PrivateArenaPopup.prototype.init=function(t){this.popupType=UIPopupTypes.PrivateArenaPopup,this.titleLabelEntity.enabled=!0,this.titleElement=this.titleLabelEntity.element,this.descriptionLabelEntity.enabled=!0,this.descriptionElement=this.descriptionLabelEntity.element,this.linkElement=this.linkLabelEntity.element,this.closeButton.enabled=!0,this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),this.copyButton.enabled=!0,this.copyButtonScript=this.copyButton.script.uiButton,this.copyButtonScript.init(Copy_Link_Button_Default_Text),this.copyButtonScript.on("buttonClicked",this.onCopyButtonClicked,this),this.playButton.enabled=!0,this.playButtonScript=this.playButton.script.uiButton,this.playButtonScript.init(Play_Button_Default_Text,!0),this.playButtonScript.on("buttonClicked",this.onPlayButtonClicked,this),this.playButton_bottomRightPosition=new pc.Vec3(-40,20),this.playButton_bottomRightAnchor=new pc.Vec4(1,0,1,0),this.playButton_bottomRightPivot=new pc.Vec2(1,0),this.playButton_bottomPosition=new pc.Vec3(0,20),this.playButton_bottomAnchor=new pc.Vec4(.5,0,.5,0),this.playButton_bottomPivot=new pc.Vec2(.5,0),this.leftDescriptionAlignment=new pc.Vec2(0,.5),this.centerDescriptionAlignment=new pc.Vec2(.5,.5),this.app.on("privateArenaCreated",this.onPrivateArenaCreated,this),t.musicBundleAsset.ready((function(t){asset=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=asset}),this),this.arenaLink=null},PrivateArenaPopup.prototype.getPopupType=function(){return this.popupType},PrivateArenaPopup.prototype.show=function(t){switch(this.entity.enabled=!0,this.arenaLink=t.arenaLink,this.popupState=t.popupState,this.closeButtonScript.show(),this.popupState){case PrivateArenaPopupTypes.create:this.titleElement.text="PRIVATE SERVER CREATED",this.descriptionElement.text="Copy the hyperlink below and share it with your friends",this.descriptionElement.alignment=this.centerDescriptionAlignment,this.linkLabelEntity.enabled=!0,this.linkElement.text=this.arenaLink.substring(0,68)+"...",this.copyButtonScript.show(),this.playButtonScript.show(!1,!0,Play_Button_Default_Text),this.playButton.setLocalPosition(this.playButton_bottomRightPosition),this.playButton.element.anchor=this.playButton_bottomRightAnchor,this.playButton.element.pivot=this.playButton_bottomRightPivot,this.urlBackground.enabled=!0;break;case PrivateArenaPopupTypes.join:this.linkLabelEntity.enabled=!1,this.titleElement.text="PRIVATE SERVER READY",this.descriptionElement.text="Join friends in existing private arena",this.descriptionElement.alignment=this.centerDescriptionAlignment,this.playButtonScript.show(!1,!0,Play_Button_Join_Text),this.playButton.setLocalPosition(this.playButton_bottomPosition),this.playButton.element.anchor=this.playButton_bottomAnchor,this.playButton.element.pivot=this.playButton_bottomPivot,this.copyButtonScript.hide(),this.urlBackground.enabled=!1}this.fire("popupOpened",this.popupType)},PrivateArenaPopup.prototype.hide=function(){this.entity.enabled&&(this.entity.enabled=!1,this.closeButtonScript.hide(),this.playButtonScript.hide(),this.copyButtonScript.hide(),this.fire("popupClosed",this.popupType))},PrivateArenaPopup.prototype.onPopupCloseButtonClicked=function(){this.fire("popupAction",this.popupType,PrivateArenaPopupActions.closeButtonPressed),this.hide(),this.entity.sound.slot("button_small").play()},PrivateArenaPopup.prototype.onPlayButtonClicked=function(){this.entity.sound.slot("button_small").play(),this.fire("popupAction",this.popupType,PrivateArenaPopupActions.playButtonPressed)},PrivateArenaPopup.prototype.onPrivateArenaCreated=function(t){switch(this.popupState){case PrivateArenaPopupTypes.create:this.playButtonScript.show(!1,!0,Play_Button_Default_Text);break;case PrivateArenaPopupTypes.join:this.playButtonScript.show(!1,!0,Play_Button_Join_Text)}},PrivateArenaPopup.prototype.onCopyButtonClicked=function(){if(this.entity.sound.slot("button_small").play(),this.copyButtonScript.show(),void 0!==navigator.clipboard)navigator.clipboard.writeText(this.arenaLink).then((function(){}),(function(){}));else{var t=document.createElement("textarea");t.value=this.arenaLink,t.style.position="fixed",t.style.opacity=0,MobileController.instance.active||(this.textArea.style.display="none"),document.body.appendChild(t),t.focus(),t.select();try{var e=document.execCommand("copy")?"successful":"unsuccessful";console.log(e)}catch(t){console.warning("Was not possible to copy the text: ",t)}document.body.removeChild(t)}},PrivateArenaPopup.prototype.reset=function(){if(this.entity.enabled)switch(this.popupState){case PrivateArenaPopupTypes.create:this.playButtonScript.show(!1,!0,Play_Button_Default_Text);break;case PrivateArenaPopupTypes.join:this.playButtonScript.show(!1,!0,Play_Button_Join_Text)}};var EffectController=pc.createScript("effectController");function orthogonal(t){var e=Math.abs(t.x),o=Math.abs(t.y),s=Math.abs(t.z),a=e<o?e<s?pc.Vec3.RIGHT:pc.Vec3.FORWARD:o<s?pc.Vec3.UP:pc.Vec3.FORWARD;return(new pc.Vec3).cross(t,a)}function myFromToRotation(t,e){var o=t.dot(e),s=new pc.Quat;if(o<=-.999){s.w=0;var a=orthogonal(t).normalize();return s.x=a.x,s.y=a.y,s.z=a.z,s}var r=t.clone().add(e).scale(.5);s.w=t.dot(r);var i=(new pc.Vec3).cross(t,r);return s.x=i.x,s.y=i.y,s.z=i.z,s.normalize()}EffectController.attributes.add("meshCreator",{type:"entity"}),EffectController.attributes.add("globalsControllerEntity",{type:"entity"}),EffectController.attributes.add("tex0",{type:"asset",assetType:"texture"}),EffectController.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectController.attributes.add("rampTexture",{type:"asset",assetType:"texture"}),EffectController.attributes.add("rippleModel",{type:"entity"}),EffectController.attributes.add("splashRoot",{type:"entity"}),EffectController.attributes.add("instancedMuzzleFlash",{type:"entity"}),EffectController.attributes.add("ribbonTrailRoot",{type:"entity"}),EffectController.attributes.add("poofRoot",{type:"entity"}),EffectController.attributes.add("flameRoot",{type:"entity"}),EffectController.attributes.add("trailRoot",{type:"entity"}),EffectController.attributes.add("rocketTrailRoot",{type:"entity"}),EffectController.attributes.add("instancedSmokeRing",{type:"entity"}),EffectController.attributes.add("instancedImpact",{type:"entity"}),EffectController.attributes.add("instancedImpactSpray",{type:"entity"}),EffectController.attributes.add("instancedDecal",{type:"entity"}),EffectController.attributes.add("instancedRipples",{type:"entity"}),EffectController.attributes.add("instancedSplashes",{type:"entity"}),EffectController.attributes.add("lenseFlares",{type:"entity"}),EffectController.attributes.add("clouds",{type:"entity"}),EffectController.prototype.refreshMaterials=function(t){var e;(e=this.materialFlame?this.materialFlame:new pc.StandardMaterial).specularTint=pc.Color.BLACK,e.chunks.transformVS=this.app.assets.find("transformVS_Flame").resource,e.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Ribbon").resource,e.chunks.diffusePS=this.app.assets.find("diffusePS_Ribbon").resource,e.useSkybox=!1,this.materialFlame=e,(e=new pc.StandardMaterial).specularTint=pc.Color.BLACK,e.chunks.transformVS=this.app.assets.find("transformVS_Trail").resource,e.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Trail").resource,e.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Poof").resource,e.chunks.diffusePS=this.app.assets.find("diffusePS_Trail").resource,e.useSkybox=!1,this.materialTrail=e,(e=new pc.StandardMaterial).name="CustomRocketTrailMaterial",e.specularTint=pc.Color.BLACK,e.chunks.transformVS=this.app.assets.find("transformVS_RocketTrail").resource,e.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Trail").resource,e.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Zero").resource,e.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,e.chunks.diffusePS=this.app.assets.find("diffusePS_RocketTrail").resource,e.useSkybox=!1,this.materialRocketTrail=e,(e=new pc.StandardMaterial).specularTint=pc.Color.BLACK,e.chunks.transformVS=this.app.assets.find("transformVS_Trail").resource,e.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Ribbon").resource,e.chunks.diffusePS=this.app.assets.find("diffusePS_Ribbon").resource,e.useSkybox=!1,this.materialRibbonTrail=e,(e=new pc.StandardMaterial).name="CustomPoofMaterial",e.chunks.transformVS=this.app.assets.find("transformVS_Poof").resource,e.chunks.diffusePS=this.app.assets.find("diffusePS_Poof").resource,e.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Poof").resource,e.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Poof").resource,e.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,e.specularTint=pc.Color.BLACK,e.blendType=pc.BLEND_NONE,e.useLighting=!0,e.useSkybox=!1,e.depthWrite=!0,e.useGammaTonemap=!1,this.materialPoof=e,this.thirdPersonSmokeScale=new pc.Vec3(.25,.25,.25),this.firstPersonSmokeScale=new pc.Vec3(.25,.25,.25)},EffectController.prototype.getEffectRootFromPool=function(t){var e=null,o=this.poolOfEffectRootsByName[t];if(o)for(var s=o.length,a=0;a<s;a++)if(!(e=o[a]).enabled)return e;return null},EffectController.prototype.addEffectRootToPool=function(t,e){var o=this.poolOfEffectRootsByName[t];o||(this.poolOfEffectRootsByName[t]=[],o=this.poolOfEffectRootsByName[t]),o.push(e)},EffectController.prototype.startNewRipple=function(t,e){this.instancedRipples.script.effectRippleInstanced.spawn(t,e)},EffectController.prototype.startNewSplash=function(t,e){this.instancedSplashes.script.effectSplashInstanced.spawn(t,e);var o=null,s=this.getEffectRootFromPool("splash");if(s?o=s.findByName("Sound_Splash"):(s=this.splashRoot.clone(),this.entity.addChild(s),o=s.findByName("Sound_Splash"),this.addEffectRootToPool("splash",s)),s.setPosition(t),s.enabled=!0,!MobileController.instance.active){var a=s.findByName("Particle_Splash").particlesystem;a.reset(),a.play()}soundEnabled&&(o.sound.slots.bullet_impact_water.startTime=Math.floor(5*Math.random())*o.sound.slots.bullet_impact_water.duration,o.sound.slots.bullet_impact_water.play());var r={root:s,pivot:null,createtime:Date.now(),time:2};this.animations.push(r)},EffectController.prototype.startNewMuzzleFlash=function(t,e,o){this.instancedMuzzleFlash.script.effectMuzzleFlashInstanced.spawn(t,e,o)},EffectController.prototype.startNewSmokeRing=function(t,e,o){this.instancedSmokeRing.script.effectSmokeRingInstanced.spawn(t,e,o)},EffectController.prototype.startMuzzleFX=function(t,e,o){this.startNewSmokeRing(t,e,o),this.startNewMuzzleFlash(t,e,o)},EffectController.prototype.startImpactFX=function(t,e,o){switch(t||(t=0),t){case ObjectMaterials.material_water:this.startNewSplash(e,1),this.startNewRipple(e,1);break;case ObjectMaterials.material_dirt:this.instancedImpact.script.effectImpactInstanced.spawn(e,o),this.instancedImpactSpray.script.effectImpactSpray.spawn(t,e,o);break;case ObjectMaterials.material_wood:this.instancedImpactSpray.script.effectImpactSpray.spawn(t,e,o),this.instancedDecal.script.effectDecal.spawn(t,e,o);break;default:this.instancedImpactSpray.script.effectImpactSpray.spawn(t,e,o)}},EffectController.prototype.startNewRibbonTrail=function(t,e,o){var s=this.getEffectRootFromPool("ribbontrail_OLD");if(!s){s=this.ribbonTrailRoot.clone(),this.entity.addChild(s);var a=this.materialRibbonTrail.clone();s.script.effect.firstTimeCreate(a),this.addEffectRootToPool("ribbontrail_OLD",s)}return s.script.effect.spawn(t,e,o),s},EffectController.prototype.startNewFlame=function(t,e){var o=this.getEffectRootFromPool("ribbonflame");if(!o){o=this.flameRoot.clone(),this.entity.addChild(o);var s=this.materialFlame.clone();o.script.effectFlame.firstTimeCreate(s),this.addEffectRootToPool("ribbonflame",o)}return o.script.effectFlame.spawn(t,e),o},EffectController.prototype.startNewTrail=function(t,e){var o=this.getEffectRootFromPool("ribbontrail");if(!o){o=this.trailRoot.clone(),this.entity.addChild(o);var s=this.materialTrail.clone();o.script.effectTrail.firstTimeCreate(s,this.meshCreator),this.addEffectRootToPool("ribbontrail",o)}var a=e.clone().sub(t),r=a.length();return r<20?null:(o.script.effectTrail.spawn(t.clone().add(a.scale(5/r)),e),o)},EffectController.prototype.startNewRocketTrail=function(t,e,o){var s=this.getEffectRootFromPool("rockettrail");if(!s){s=this.rocketTrailRoot.clone(),this.entity.addChild(s);var a=this.materialRocketTrail.clone();s.script.effectRocketTrail.firstTimeCreate(a),this.addEffectRootToPool("rockettrail",s)}return s.script.effectRocketTrail.spawn(t,e,o),s},EffectController.prototype.startRocketFire=function(t,e){var o=t.clone(),s=e.transformVector(pc.Vec3.FORWARD);o.add(s),this.startNewPoof(o,e,0),this.startNewPoof(o,e,2)},EffectController.prototype.startRocketFX=function(t,e,o,s){this.startRocketFire(t,e),this.startNewRocketTrail(t,o,s)},EffectController.prototype.startNewPoof=function(t,e,o,s,a){var r=this.getEffectRootFromPool("poof");if(!r){r=this.poofRoot.clone(),this.entity.addChild(r);var i=this.materialPoof.clone();r.script.effectPoof.firstTimeCreate(i),this.addEffectRootToPool("poof",r)}return r.script.effectPoof.spawn(t,e,o,s,a),r},EffectController.prototype.startGroundExplosion=function(t,e){if(t){var o=t.clone(),s=t.clone();e.transformVector(pc.Vec3.FORWARD).scale(.5);o.add(new pc.Vec3(0,.5,0)),s.sub(new pc.Vec3(0,1,0)),this.startNewPoof(o,e,1),this.startNewPoof(t,e,3),this.startNewPoof(o,e,4);for(var a=0;a<5;a++){var r=pc.Quat.IDENTITY.clone();r.setFromEulerAngles(0,360*a/5,0);var i=r.transformVector(pc.Vec3.FORWARD);this.startNewFlame(s,i)}}},EffectController.prototype.startNonGroundExplosion=function(t,e){if(t){var o=t.clone(),s=t.clone();e.transformVector(pc.Vec3.FORWARD).scale(.5);o.add(new pc.Vec3(0,.5,0)),s.sub(new pc.Vec3(0,1,0)),this.startNewPoof(o,e,1),this.startNewPoof(t,e,3),this.startNewPoof(o,e,4)}},EffectController.prototype.startWaterExplosion=function(t,e){if(t){var o=t.clone(),s=t.clone();e.transformVector(pc.Vec3.FORWARD).scale(.5);o.add(new pc.Vec3(0,.5,0)),s.sub(new pc.Vec3(0,1,0)),this.startNewPoof(o,e,1,{color0:pc.Color.WHITE,color1:pc.Color.WHITE,speed:15}),this.startNewPoof(t,e,3,{color0:pc.Color.WHITE,color1:pc.Color.WHITE,gravity:-1,lifetime:1.5}),this.startNewPoof(t,e,6,{color0:pc.Color.WHITE,color1:pc.Color.WHITE}),this.startNewPoof(t,e,7),this.startNewSplash(t,5),this.startNewRipple(t,2),this.startNewRipple(t,3),setTimeout(function(){this.startNewRipple(t,2)}.bind(this),1e3),setTimeout(function(){this.startNewRipple(t,1)}.bind(this),1500)}},EffectController.prototype.startRocketImpact=function(t,e,o){var s=myFromToRotation(pc.Vec3.FORWARD,o);switch(t||(t=0),t){case ObjectMaterials.material_dirt:this.startGroundExplosion(e,s);break;case ObjectMaterials.material_water:this.startWaterExplosion(e,s);break;default:this.startNonGroundExplosion(e,s)}},EffectController.prototype.init=function(t,e){this.gameController=t,this.animations=[],this.refreshMaterials(),this.poolOfEffectRootsByName=[],this.meshCreator.script.meshCreator.init(),this.instancedMuzzleFlash.script.effectMuzzleFlashInstanced.init(),this.instancedImpact.script.effectImpactInstanced.init(),this.instancedImpactSpray.script.effectImpactSpray.init(),this.instancedSmokeRing.script.effectSmokeRingInstanced.init(),this.instancedSplashes.script.effectSplashInstanced.init(),this.lenseFlares.script.lenseFlares.init(),this.clouds.script.effectCloud.init(),e.musicBundleAsset.ready((function(t){var e=this.app.assets.find("bullet_water_impact_x5_1sec.mp3","audio");this.splashRoot.enabled=!0;var o=this.splashRoot.children[0].sound.slot("bullet_impact_water");o.asset=e,o.duration="1",this.splashRoot.enabled=!1}),this),this.isInitialized=!0},EffectController.prototype.postUpdate=function(t){if(this.isInitialized)for(var e=0;e<this.animations.length;e++){var o=this.animations[e],s=.001*(Date.now()-o.createtime);s>o.time?(o.root&&(o.root.enabled=!1),this.animations.splice(e,1),e--):(o.mat&&o.mat.setParameter("uTime",s),o.pivot&&s<.6&&(o.root.setPosition(o.pivot.getPosition()),o.root.setRotation(o.pivot.getRotation())))}};var Effect=pc.createScript("effect");Effect.attributes.add("type",{type:"number",enum:[{ripples:0},{splash:1},{smokering:2},{trail:3}],default:0}),Effect.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),Effect.prototype.firstTimeCreate=function(t){var e=this.app.root.findByName("MeshCreator").script.meshCreator.getCapsuleModel_LO().clone();this.entity.model||this.entity.addComponent("model"),e.meshInstances[0].cull=!1,this.entity.model.model=e,this.entity.model.receiveShadows=!1,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.material=t.clone(),e.meshInstances[0].material=this.material},Effect.prototype.spawn=function(t,e,a){this.entity.setPosition(t),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0,this.animInfo={startpos:t.clone(),startdir:e.clone(),createtime:Date.now(),lifetime:5,pivot:a,pos:t.clone()},this.material.setParameter("uPerlinTexture",this.perlinTexture.resource),this.material.setParameter("uTime",0),this.material.setParameter("uRandomSeed",Math.random()),this.material.setParameter("uStartPos",t.data),this.material.setParameter("uHeadPos",t.data),this.material.setParameter("uTailPos",t.data),this.material.setParameter("uStartDir",e.data),this.material.setParameter("uColor0",[1,.5,0,1]),this.material.setParameter("uColor1",[0,0,0,1])},Effect.prototype.initialize=function(){},Effect.prototype.update=function(t){if(this.animInfo){var e=.001*(Date.now()-this.animInfo.createtime);switch(this.type){case 2:e>=1.5&&(this.entity.enabled=!1),this.smokeRingMaterial.setParameter("uTime",e);break;case 3:if(e>=this.animInfo.lifetime){this.entity.enabled=!1;break}this.material.setParameter("uTime",e)}}};var GameOverCameraPath=pc.createScript("gameOverCameraPath");GameOverCameraPath.attributes.add("cameraEntity",{type:"entity",title:"Camera"}),GameOverCameraPath.attributes.add("pathRoot",{type:"entity",title:"Path Root"}),GameOverCameraPath.attributes.add("duration",{type:"number",default:10,title:"Duration"}),GameOverCameraPath.attributes.add("moveCamera",{type:"boolean",default:!0,title:"Whether Camera Is Moving"}),GameOverCameraPath.attributes.add("corpseModel",{type:"entity",title:"Corpse Model"}),GameOverCameraPath.attributes.add("characterMaterialResource",{type:"asset",assetType:"material",title:"Character Material"}),GameOverCameraPath.prototype.init=function(e,t){var s=this;this.itemDataManager=t,this.startTime=0,this.characterType=CharacterID.Fox,this.corpseMaterial=null,this.corpseTexture=null,e.ingameAnimationsBundleAsset.ready((function(t){e.thirdPersonAnimationFileNamesToLoad.forEach((function(t){t.includes("_Die")&&e.thirdPersonAnimationFileAssetsToLoad[t].ready((function(a){s.corpseModel.animation.animations[t]=a.resource,e.thirdPersonAnimationFileAssetsLoaded.includes(t)||e.thirdPersonAnimationFileAssetsLoaded.push(t)}),this)}))}),this),this.deathAnimationNormal="Fox_3rd_Die2.glb",this.deathAnimationExplosion="Fox_3rd_Die1.glb",this.tempPoint1=this.pathRoot.children[0].clone(),this.tempPoint2=this.pathRoot.children[1].clone(),this.secondPointEntity=new pc.Entity,this.secondPointRotation=new pc.Quat,this.secondPointTransformedForward=new pc.Vec3,this.time=pc.math.clamp(pc.math.random(this.startTime,this.duration),0,this.duration),this.lookAt=new pc.Vec3,this.up=new pc.Vec3,this.distanceBetween=new pc.Vec3,this.deathCamHeightOffset=new pc.Vec3(0,5,0),this.rayCastTunnelStart=new pc.Vec3,this.rayCastTunnelEnd=new pc.Vec3,this.lastDamageDirection=null,this.lastDamageWasExplosion=!1,this.localPlayerID=null,this.isMovingFromPlayerDeathView=!1,this.cameraManager=this.cameraEntity.script.cameraManager,this.cameraManager.init(),this.hatNode=this.corpseModel.findByName("cc_Hat"),this.currentHat=null,this.app.on("localPlayerSpawned",this.OnLocalPlayerSpawned,this),this.app.on("destroy",(function(){this.app.off("localPlayerSpawned",this.OnLocalPlayerSpawned,this)})),this.app.on("localPlayerCameraDisabled",this.OnLocalPlayerCameraDisabled,this),this.app.on("destroy",(function(){this.app.off("localPlayerCameraDisabled",this.OnLocalPlayerCameraDisabled,this)})),this.app.on("localPlayerInitialized",this.LocalPlayerCreated,this),this.app.on("destroy",(function(){this.app.off("localPlayerInitialized",this.LocalPlayerCreated,this)})),this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("destroy",(function(){this.app.off("playerKilled",this.OnPlayerKilled,this)})),this.app.on("cooldownStarted",this.StartMovement,this),this.app.on("destroy",(function(){this.app.off("cooldownStarted",this.StartMovement,this)})),this.app.on("connectionLost",this.StartMovement,this),this.app.on("destroy",(function(){this.app.off("connectionLost",this.StartMovement,this)})),this.app.on("updateLastEnemyHitLocation",this.OnUpdateEnemyHitLocation,this),this.app.on("destroy",(function(){this.app.off("updateLastEnemyHitLocation",this.OnUpdateEnemyHitLocation,this)})),this.app.on("localPlayerBodyChange",this.OnLocalPlayerBodyChange,this),this.app.on("destroy",(function(){this.app.off("localPlayerBodyChange",this.OnLocalPlayerBodyChange,this)})),this.createPath()},GameOverCameraPath.prototype.update=function(e){if(this.moveCamera){this.time+=e,this.isMovingFromPlayerDeathView&&this.time>.9*this.duration&&this.ResetPath(),this.time>this.duration&&(this.time-=this.duration);var t=this.time/this.duration;this.cameraEntity.setPosition(this.px.value(t),this.py.value(t),this.pz.value(t)),this.lookAt.set(this.tx.value(t),this.ty.value(t),this.tz.value(t)),this.up.set(this.ux.value(t),this.uy.value(t),this.uz.value(t)),this.cameraEntity.lookAt(this.lookAt,this.up)}},GameOverCameraPath.prototype.createPath=function(){var e=pc.CURVE_CARDINAL;this.px=new pc.Curve,this.px.type=e,this.py=new pc.Curve,this.py.type=e,this.pz=new pc.Curve,this.pz.type=e,this.tx=new pc.Curve,this.tx.type=e,this.ty=new pc.Curve,this.ty.type=e,this.tz=new pc.Curve,this.tz.type=e,this.ux=new pc.Curve,this.ux.type=e,this.uy=new pc.Curve,this.uy.type=e,this.uz=new pc.Curve,this.uz.type=e;var t=this.pathRoot.children,s=0,a=[];for(this.distanceBetween.set(0,0,0),a.push(0),i=1;i<t.length;i++){var o=t[i-1],h=t[i];this.distanceBetween.sub2(o.getPosition(),h.getPosition()),s+=this.distanceBetween.length(),a.push(s)}for(i=0;i<t.length;i++){var r=a[i]/s,n=t[i],c=n.getPosition();this.px.add(r,c.x),this.py.add(r,c.y),this.pz.add(r,c.z);var l=c.clone().add(n.forward);this.tx.add(r,l.x),this.ty.add(r,l.y),this.tz.add(r,l.z);var d=n.up;this.ux.add(r,d.x),this.uy.add(r,d.y),this.uz.add(r,d.z)}},GameOverCameraPath.prototype.OnLocalPlayerSpawned=function(e){this.cameraManager.disable(),this.moveCamera=!1,this.lastDamageDirection=null,this.EnableDefaultBody(),this.corpseModel.enabled=!1,this.isMovingFromPlayerDeathView&&this.ResetPath()},GameOverCameraPath.prototype.OnLocalPlayerCameraDisabled=function(){this.cameraManager.enable()},GameOverCameraPath.prototype.LocalPlayerCreated=function(e){this.localPlayerID=e},GameOverCameraPath.prototype.OnPlayerKilled=function(e,t,s){if(this.localPlayerID===e){this.rayCastTunnelStart.set(s.getPosition().x,s.getPosition().y,s.getPosition().z),this.rayCastTunnelEnd.set(s.getPosition().x,s.getPosition().y+100,s.getPosition().z);var a=this.app.systems.rigidbody.raycastFiltered(this.rayCastTunnelStart,this.rayCastTunnelEnd,pc.BODYGROUP_USER_2,pc.BODYGROUP_USER_2);if(a&&("mineSupport"==a.entity.name||"Terrain_Hilly_tunnels"==a.entity.name))return void this.StartMovement();var i=s.script.playerManager.cameraEntity.getRotation();this.tempPoint1.setPosition(s.getPosition()),this.tempPoint1.setRotation(i),i.transformVector(pc.Vec3.FORWARD,this.secondPointTransformedForward),this.secondPointRotation.setFromEulerAngles(0,Math.atan2(-this.secondPointTransformedForward.x,-this.secondPointTransformedForward.z)*pc.math.RAD_TO_DEG,0),this.secondPointEntity.setRotation(this.secondPointRotation),this.tempPoint2.setPosition(s.getPosition().add(this.secondPointEntity.forward.scale(-8)).add(this.deathCamHeightOffset)),null!=this.lastDamageDirection?this.tempPoint2.lookAt(this.lastDamageDirection):(this.tempPoint2.setRotation(i),this.tempPoint2.rotate(-5,0,0));var o=0,h=1e4,r=0;for(c=0;c<this.pathRoot.children.length;c++)(r=this.pathRoot.children[c].getPosition().distance(s.getPosition()))<h&&(h=r,o=c);for(var n=this.pathRoot.children.length-o-1,c=0;c<n;c++)this.pathRoot.children.unshift(this.pathRoot.children.pop());this.pathRoot.insertChild(this.tempPoint1,0),this.pathRoot.insertChild(this.tempPoint2,1),this.corpseModel.enabled=!0,this.corpseModel.setPosition(s.script.playerManager.enemyModelEntity.getPosition()),this.corpseModel.setRotation(this.secondPointRotation),this.corpseModel.rotate(0,180,0),this.lastDamageWasExplosion?this.EnableCharredBody():this.EnableHoledBody(),this.createPath(),this.time=0,this.isMovingFromPlayerDeathView=!0,this.moveCamera=!0}},GameOverCameraPath.prototype.ResetPath=function(){this.isMovingFromPlayerDeathView=!1,this.pathRoot.removeChild(this.tempPoint1),this.pathRoot.removeChild(this.tempPoint2),this.createPath()},GameOverCameraPath.prototype.StartMovement=function(){this.moveCamera||(this.moveCamera=!0,this.time=pc.math.clamp(pc.math.random(this.startTime,this.duration),0,this.duration))},GameOverCameraPath.prototype.OnUpdateEnemyHitLocation=function(e,t,s){this.lastDamageDirection=e,this.lastDamageWasExplosion=t},GameOverCameraPath.prototype.EnableHoledBody=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Chicken?(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[1].visible=!0):this.characterType==CharacterID.Ape?(this.corpseModel.model.meshInstances[1].visible=!1,this.corpseModel.model.meshInstances[4].visible=!0):this.characterType==CharacterID.Toucan?(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[1].visible=!0):this.characterType==CharacterID.Dog&&(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[8].visible=!0),this.corpseModel.animation.play(this.deathAnimationNormal)},GameOverCameraPath.prototype.EnableCharredBody=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Chicken?(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[2].visible=!0,this.corpseModel.model.meshInstances[4].visible=!1):this.characterType==CharacterID.Ape?(this.corpseModel.model.meshInstances[1].visible=!1,this.corpseModel.model.meshInstances[3].visible=!0,this.corpseModel.model.meshInstances[2].visible=!1):this.characterType==CharacterID.Toucan?(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[2].visible=!0,this.corpseModel.model.meshInstances[4].visible=!1):this.characterType==CharacterID.Dog&&(this.corpseModel.model.meshInstances[0].visible=!1,this.corpseModel.model.meshInstances[1].visible=!0,this.corpseModel.model.meshInstances[3].visible=!1),this.currentHat&&(this.currentHat.enabled=!1),this.corpseModel.animation.play(this.deathAnimationExplosion)},GameOverCameraPath.prototype.EnableDefaultBody=function(){this.characterType==CharacterID.Fox||this.characterType==CharacterID.Bull||this.characterType==CharacterID.Chicken||this.characterType==CharacterID.Rhino?(this.corpseModel.model.meshInstances[0].visible=!0,this.corpseModel.model.meshInstances[1].visible=!1,this.corpseModel.model.meshInstances[2].visible=!1,this.corpseModel.model.meshInstances[3].visible=!0,this.corpseModel.model.meshInstances[4].visible=!0,this.corpseModel.model.meshInstances[5].visible=!1,this.corpseModel.model.meshInstances[6].visible=!1,this.corpseModel.model.meshInstances[7].visible=!1,this.corpseModel.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Ape?(this.corpseModel.model.meshInstances[0].visible=!0,this.corpseModel.model.meshInstances[1].visible=!0,this.corpseModel.model.meshInstances[2].visible=!0,this.corpseModel.model.meshInstances[3].visible=!1,this.corpseModel.model.meshInstances[4].visible=!1,this.corpseModel.model.meshInstances[5].visible=!1,this.corpseModel.model.meshInstances[6].visible=!1,this.corpseModel.model.meshInstances[7].visible=!1,this.corpseModel.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Lion||this.characterType==CharacterID.Toucan?(this.corpseModel.model.meshInstances[0].visible=!0,this.corpseModel.model.meshInstances[1].visible=!1,this.corpseModel.model.meshInstances[2].visible=!1,this.corpseModel.model.meshInstances[3].visible=!0,this.corpseModel.model.meshInstances[4].visible=!0,this.corpseModel.model.meshInstances[5].visible=!1,this.corpseModel.model.meshInstances[6].visible=!1,this.corpseModel.model.meshInstances[7].visible=!1,this.corpseModel.model.meshInstances[8].visible=!1):this.characterType==CharacterID.Dog&&(this.corpseModel.model.meshInstances[0].visible=!0,this.corpseModel.model.meshInstances[1].visible=!1,this.corpseModel.model.meshInstances[2].visible=!0,this.corpseModel.model.meshInstances[3].visible=!0,this.corpseModel.model.meshInstances[4].visible=!1,this.corpseModel.model.meshInstances[5].visible=!1,this.corpseModel.model.meshInstances[6].visible=!1,this.corpseModel.model.meshInstances[7].visible=!1,this.corpseModel.model.meshInstances[8].visible=!1),this.currentHat&&(this.currentHat.enabled=!0)},GameOverCameraPath.prototype.OnLocalPlayerBodyChange=function(e,t,s){e===CharacterID.Fox?(this.corpseModel.model.asset=57286260,this.characterType=CharacterID.Fox):e===CharacterID.Bull?(this.corpseModel.model.asset=57285681,this.characterType=CharacterID.Bull):e===CharacterID.Chicken?(this.corpseModel.model.asset=57286005,this.characterType=CharacterID.Chicken):e===CharacterID.Rhino?(this.corpseModel.model.asset=57285684,this.characterType=CharacterID.Rhino):e===CharacterID.Ape?(this.corpseModel.model.asset=57286261,this.characterType=CharacterID.Ape):e===CharacterID.Lion?(this.corpseModel.model.asset=57285690,this.characterType=CharacterID.Lion):e===CharacterID.Toucan?(this.corpseModel.model.asset=57286009,this.characterType=CharacterID.Toucan):e===CharacterID.Dog&&(this.corpseModel.model.asset=57285688,this.characterType=CharacterID.Dog),this.characterType==CharacterID.Fox||this.characterType==CharacterID.Ape?(this.deathAnimationNormal="Fox_3rd_Die2.glb",this.deathAnimationExplosion="Fox_3rd_Die1.glb"):this.characterType==CharacterID.Bull||this.characterType==CharacterID.Rhino||this.characterType==CharacterID.Lion||this.characterType==CharacterID.Dog?(this.deathAnimationNormal="Bull_3rd_Die2.glb",this.deathAnimationExplosion="Bull_3rd_Die1.glb"):this.characterType!=CharacterID.Chicken&&this.characterType!=CharacterID.Toucan||(this.deathAnimationNormal="Chicken_3rd_Die2.glb",this.deathAnimationExplosion="Chicken_3rd_Die1.glb"),this.corpseTexture=this.itemDataManager.getOutfitForCharacterType(e,t).texture.resource,null===this.corpseMaterial&&(this.corpseMaterial=this.characterMaterialResource.resource.clone()),this.corpseMaterial.diffuseMap=this.corpseTexture;var a=this.corpseModel.model.meshInstances;for(i=0;i<a.length;i++)a[i].material.name.includes("Character")&&(this.corpseModel.model.meshInstances[i].material=this.corpseMaterial,this.corpseModel.model.meshInstances[i].material.update());this.setCharacterHat(s)},GameOverCameraPath.prototype.setCharacterHat=function(e){this.currentHat&&this.currentHat.destroy(),e>0&&(this.currentHat=this.itemDataManager.getHat(e).model.clone(),this.hatNode=this.corpseModel.findByName("cc_Hat"),this.currentHat.reparent(this.hatNode),this.currentHat.enabled=!0)};pc.extend(pc,function(){var LookupTextureEffect=function(e){this.shader=new pc.Shader(e,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+e.precision+" float;","uniform sampler2D uColorBuffer;","uniform sampler2D uLUT;","uniform float uHue;","uniform float uSaturation;","varying vec2 vUv0;","void main() {","vec4 color = texture2D( uColorBuffer, vUv0 );","float r = 0.0;//color.r;","float g = color.g;","float b = color.b;","float u0 = floor(b * 15.0) / 15.0 * 240.0;","u0 = (floor(r * 15.0) / 15.0 * 15.0) + u0;","u0 /= 255.0;","u0 = clamp(u0, 0.0, 1.0);","float v0 = 1.0 - ((floor(g * 15.0)) / 15.0);","vec4 rgb0 = texture2D( uLUT, vec2(u0,0.9) );","/*float u1 = ceil(b * 15.0) / 15.0 * 240.0;","u1 = (ceil(r * 15.0) / 15.0 * 15.0) + u1;","u1 /= 255.0;","float v1 = 1.0 - ((ceil(g * 15.0)) / 15.0);","vec4 rgb1 = texture2D( uLUT, vec2(u1,v1) );*/","gl_FragColor = color;","gl_FragColor.g = rgb0.g;//mix(rgb0.g, rgb1.g, fract(g * 15.0));","/*float angle = uHue * 3.14159265;","float s = sin(angle), c = cos(angle);","vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;","float len = length(gl_FragColor.rgb);","gl_FragColor.rgb = vec3(","dot(gl_FragColor.rgb, weights.xyz),","dot(gl_FragColor.rgb, weights.zxy),","dot(gl_FragColor.rgb, weights.yzx)",");","float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;","if (uSaturation > 0.0) {","gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - uSaturation));","} else {","gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-uSaturation);","}*/","}"].join("\n")}),this.time=0,this.LUT=null,this.Noise=null};return(LookupTextureEffect=pc.inherits(LookupTextureEffect,pc.PostEffect)).prototype=pc.extend(LookupTextureEffect.prototype,{render:function(e,t,o){var r=this.device,i=r.scope;i.resolve("uTime").setValue(this.time),i.resolve("uLUT").setValue(this.LUT),i.resolve("uNoise").setValue(this.Noise),i.resolve("uColorBuffer").setValue(e.colorBuffer),pc.drawFullscreenQuad(r,t,this.vertexBuffer,this.shader,o)}}),{LookupTextureEffect:LookupTextureEffect}}());var LookupTexture=pc.createScript("lookupTexture");LookupTexture.attributes.add("LUT",{type:"asset",assetType:"texture"}),LookupTexture.attributes.add("Noise",{type:"asset",assetType:"texture"}),LookupTexture.prototype.setShader=function(){var e=this.app.assets.find("postEffectPS_LUT").resource;this.effect.shader=new pc.Shader(this.app.graphicsDevice,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+this.app.graphicsDevice.precision+" float;",e].join("\n")})},LookupTexture.prototype.initialize=function(){this.effect=new pc.LookupTextureEffect(this.app.graphicsDevice),this.effect.time=0,this.effect.LUT=this.LUT.resource,this.effect.Noise=this.Noise.resource,this.setShader(),this.on("attr",(function(e,t){this.effect[e]=t}),this);var e=this.entity.camera.postEffects;e.addEffect(this.effect),this.on("state",(function(t){t?e.addEffect(this.effect):e.removeEffect(this.effect)})),this.on("destroy",(function(){e.removeEffect(this.effect)})),this.active=!0,this.time=0},LookupTexture.prototype.update=function(e){if(this.app.keyboard.wasPressed(pc.KEY_U)&&!isChatModeEnabled){var t=this.entity.camera.postEffects;this.active=!this.active,this.active?t.addEffect(this.effect):t.removeEffect(this.effect)}this.app.keyboard.wasPressed(pc.KEY_R)&&!isChatModeEnabled&&this.setShader(),this.time+=e,this.effect.time=this.time};var GlobalColors=pc.createScript("globalColors"),Button_Default_Light_Background_Color=new pc.Color(254/255,1,239/255),Button_Default_Dark_Background_Color=new pc.Color(28/255,58/255,32/255),Button_Default_Background_Color=new pc.Color(28/255,58/255,32/255),Button_Default_Green_Foreground_Color=new pc.Color(21/255,182/255,24/255),Button_Default_Light_Blue_Foreground_Color=new pc.Color(30/255,124/255,173/255),Button_Default_Dark_Blue_Foreground_Color=new pc.Color(9/255,22/255,41/255),Button_Default_Orange_Foreground_Color=new pc.Color(216/255,121/255,58/255),Button_Default_Grey_Foreground_Color=new pc.Color(72/255,74/255,93/255),Button_Default_Red_Foreground_Color=new pc.Color(1,0,0),Button_Default_Blue_Foreground_Color=new pc.Color(0,34/255,1),Button_Default_Curious_Blue_Foreground_Color=new pc.Color(58/255,142/255,216/255),Button_Default_Black_Foreground_Color=new pc.Color(0,0,0),Button_Default_Dark_Green_Foreground_Color=new pc.Color(71/255,83/255,68/255),Button_Default_Text_Color=new pc.Color(254/255,1,239/255),Button_Default_Green_Text_Shadow_Color=new pc.Color(52/255,113/255,34/255),Button_Default_Light_Blue_Text_Shadow_Color=new pc.Color(14/255,65/255,92/255),Button_Default_Orange_Text_Shadow_Color=new pc.Color(133/255,90/255,62/255),Button_Default_Black_Text_Shadow_Color=new pc.Color(0,0,0),Button_Default_Red_Text_Shadow_Color=new pc.Color(181/255,44/255,44/255),Button_Default_Blue_Text_Shadow_Color=new pc.Color(45/255,45/255,140/255),Button_Default_Kashmir_Blue_Text_Shadow_Color=new pc.Color(68/255,109/255,145/255),Button_Default_Grey_Text_Shadow_Color=new pc.Color(108/255,108/255,108/255),Button_Default_Text_Shadow_Offset=new pc.Vec2(0,-.4),Outfit_Button_Pressed_Color=new pc.Color(232/255,177/255,13/255),Outfit_Button_Default_Color=new pc.Color(1,1,1),Button_Pressed_Background_Color=new pc.Color(142/255,142/255,140/255),Button_Pressed_Foreground_Color=new pc.Color(81/255,88/255,81/255),Button_Pressed_Text_Color=new pc.Color(164/255,164/255,164/255),Button_Pressed_Text_Shadow_Offset=new pc.Vec2(0,0),rifleGlowColor=new pc.Color(1,96/255,0),shotgunGlowColor=new pc.Color(117/255,1,0),minigunGlowColor=new pc.Color(0,64/255,1),missileGlowColor=new pc.Color(1,0,74/255),uziGlowColor=new pc.Color(180/255,0,1),turnedOffGlowColor=new pc.Color(0,0,0),Health_Bar_Foreground_Green_Color=new pc.Color(110/255,218/255,78/255),Health_Bar_Foreground_Red_Color=new pc.Color(191/255,67/255,46/255),Leaderboard_Element_Default_Text_Color=new pc.Color(52/255,17/255,1/255),Leaderboard_Element_Default_Text_Color_TOP3=new pc.Color(1,1,1),Leaderboard_Element_Highlighted_Text_Color=new pc.Color(254/255,205/255,57/255),Leaderboard_Element_Highlighted_Text_Shadow_Color=new pc.Color(48/255,19/255,4/255),Leaderboard_Element_Shadow_Color_ON=new pc.Color(0,0,0,100/255),Leaderboard_Element_Shadow_Color_OFF=new pc.Color(0,0,0,0),Leaderboard_Element_Background_Gold=new pc.Color(242/255,159/255,0),Leaderboard_Element_Background_Silver=new pc.Color(187/255,180/255,167/255),Leaderboard_Element_Background_Bronze=new pc.Color(220/255,124/255,61/255),HomeScreen_Feedback_Default_Text_Color=new pc.Color(254/255,1,239/255),HomeScreen_Feedback_Warning_Text_Color=new pc.Color(247/255,69/255,69/255),Enemy_Player_Name_Color=new pc.Color(220/255,30/255,30/255),Damage_Done_Label_Color=new pc.Color(220/255,103/255,32/255),Damage_Done_Label_Outline_Color=new pc.Color(9/255,22/255,41/255),KillFeed_Element_Default_Text_Color=new pc.Color(254/255,1,239/255),KillFeed_Element_Default_BG_Color=new pc.Color(21/255,2/255,43/255),KillFeed_Element_Kill_Text_Color=new pc.Color(247/255,1,172/255),KillFeed_Element_Kill_BG_Color=new pc.Color(70/255,190/255,0),KillFeed_Element_Killed_Text_Color=new pc.Color(1,194/255,113/255),KillFeed_Element_Killed_BG_Color=new pc.Color(190/255,56/255,0),SUCCESS_TEXT_COLOR=new pc.Color(77/255,1,88/255),ERROR_TEXT_COLOR=new pc.Color(1,45/255,50/255),Input_Field_Outline_Default_Color=new pc.Color(1,1,1),Input_Field_Outline_Edit_Color=new pc.Color(232/255,177/255,13/255),Input_Field_Outline_Error_Color=new pc.Color(1,0,0);var FeedbackHandler=pc.createScript("feedbackHandler"),FeedbackType={Warning:1,Message:2};FeedbackHandler.prototype.init=function(e){this.defaultMessage=e,this.element=this.entity.element,this.isDisplayingFeedback=!1,this.activeTimeout=null},FeedbackHandler.prototype.show=function(){this.entity.enabled=!0,this.element.text=this.defaultMessage,this.element.color=HomeScreen_Feedback_Default_Text_Color},FeedbackHandler.prototype.hide=function(){this.clearFeedback(),this.entity.enabled=!1},FeedbackHandler.prototype.displayFeedback=function(e,t,i){if(!this.isDisplayingFeedback||null===this.activeTimeout){switch(this.element.text=e,this.isDisplayingFeedback=!0,i){case FeedbackType.Warning:this.element.color=HomeScreen_Feedback_Warning_Text_Color;break;case FeedbackType.Message:this.element.color=HomeScreen_Feedback_Default_Text_Color}t>0&&(this.activeTimeout=setTimeout(function(){this.element.text=this.defaultMessage,this.element.color=HomeScreen_Feedback_Default_Text_Color,this.isDisplayingFeedback=!1,this.activeTimeout=null}.bind(this),1e3*t))}},FeedbackHandler.prototype.clearFeedback=function(){clearTimeout(this.activeTimeout),this.activeTimeout=null,this.isDisplayingFeedback=!1,this.element.text=this.defaultMessage,this.element.color=HomeScreen_Feedback_Default_Text_Color};var AnimTest=pc.createScript("animTest");AnimTest.attributes.add("debugText",{type:"entity"}),AnimTest.prototype.EnableDefaultModel=function(){this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!0,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!1,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1};var skins,rig,bones={};AnimTest.prototype.logGraph=function(e,t){for(var i="",s=0;s<t;s++)i+="\t";i+=e.name,console.log(i);for(s=0;s<e.children.length;s++)this.logGraph(e.children[s],t+1)},AnimTest.prototype.initialize=function(){this.EnableDefaultModel(),console.log(this.entity.anim)},AnimTest.prototype.update=function(e){};var IntroCharacterManager=pc.createScript("introCharacterManager");IntroCharacterManager.attributes.add("characterID",{type:"number",default:0,title:"Character ID"}),IntroCharacterManager.attributes.add("pistolLeftModel",{type:"entity",title:"pistolLeftModel"}),IntroCharacterManager.attributes.add("pistolRightModel",{type:"entity",title:"pistolRightModel"}),IntroCharacterManager.attributes.add("muzzleLeftModel",{type:"entity",title:"muzzleLeftModel"}),IntroCharacterManager.attributes.add("muzzleRightModel",{type:"entity",title:"muzzleRightModel"}),IntroCharacterManager.attributes.add("introCamera",{type:"entity",title:"introCamera"}),IntroCharacterManager.attributes.add("characterMaterialResource",{type:"asset",assetType:"material",title:"Character Material"});var CharacterID={Chicken:0,Fox:1,Bull:2,Rhino:3,Ape:4,Lion:5,Toucan:6,Dog:7};IntroCharacterManager.prototype.init=function(t,e,i,s){this.itemDataManager=s,this.chooseAnimIsActive=!1,this.animFadeTime=.1,this.closeUpPosition=null,this.distantPosition=null,this.active=!1,this.isInputAllowed=!0,this.limitedHidden=!1,this.isCloseUp=!1,this.activeLimitedCharID=t,this.entity.model.enabled=!1,this.waitingForAssets=!0,this.selectedCharacterID=e,this.selectedOutfitID=i},IntroCharacterManager.prototype.setupCharacter=function(){switch(this.waitingForAssets=!1,this.hatNode=this.entity.findByName("cc_Hat"),this.currentHat=null,this.characterID){case CharacterID.Chicken:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(-3.3,-1.54,-8),this.distantPosition=new pc.Vec3(-5.5,-1.34,-16);break;case CharacterID.Fox:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(-1.5,-1.625,-8),this.distantPosition=new pc.Vec3(-2.2,-1.47,-16);break;case CharacterID.Bull:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(0,-1.8,-9),this.distantPosition=new pc.Vec3(1.1,-1.5,-16);break;case CharacterID.Rhino:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(1.7,-1.8,-9),this.distantPosition=new pc.Vec3(4.3,-1.5,-16);break;case CharacterID.Ape:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!0,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[3].visible=!1,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(1.7,-1.8,-9),this.distantPosition=new pc.Vec3(4.3,-1.5,-16);break;case CharacterID.Lion:case CharacterID.Toucan:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!1,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!0,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(1.7,-1.8,-9),this.distantPosition=new pc.Vec3(4.3,-1.5,-16);break;case CharacterID.Dog:this.entity.model.meshInstances[0].visible=!0,this.entity.model.meshInstances[1].visible=!1,this.entity.model.meshInstances[2].visible=!0,this.entity.model.meshInstances[3].visible=!0,this.entity.model.meshInstances[4].visible=!1,this.entity.model.meshInstances[5].visible=!1,this.entity.model.meshInstances[6].visible=!1,this.entity.model.meshInstances[7].visible=!1,this.entity.model.meshInstances[8].visible=!1,this.closeUpPosition=new pc.Vec3(1.7,-1.8,-9),this.distantPosition=new pc.Vec3(4.3,-1.5,-16)}this.popupPosition=new pc.Vec3(.5,-1.7,-7.1),this.entity.setLocalPosition(this.distantPosition),this.isCloseUp=!1,this.entity.lookAt(this.introCamera.getPosition()),this.entity.rotate(0,180,0),this.setCharacterPositions(!1,this.selectedCharacterID),this.characterBodyMaterial=this.characterMaterialResource.resource.clone();var t=this.entity.model.meshInstances;for(i=0;i<t.length;i++)t[i].material.name.includes("Character")&&(this.entity.model.meshInstances[i].material=this.characterBodyMaterial,this.entity.model.meshInstances[i].material.update());this.characterID==this.selectedCharacterID?this.changeOutfit(this.characterID,this.selectedOutfitID):this.changeOutfit(this.characterID,0),this.entity.model.enabled=!0,this.characterID!=CharacterID.Rhino&&this.characterID!=CharacterID.Ape&&this.characterID!=CharacterID.Lion&&this.characterID!=CharacterID.Toucan&&this.characterID!=CharacterID.Dog||this.characterID!=this.activeLimitedCharID&&(this.limitedHidden=!0,this.active=!0,this.hide()),null!=this.pistolLeftModel&&(this.leftHandNode=this.entity.findByName("cc_wpn.l"),this.pistolLeftModel.reparent(this.leftHandNode),this.rightHandNode=this.entity.findByName("cc_wpn.r"),this.pistolRightModel.reparent(this.rightHandNode)),null!=this.muzzleLeftModel&&(this.leftMuzzleNode=this.pistolLeftModel.findByName("cc_Muzzle"),this.muzzleLeftModel.reparent(this.leftMuzzleNode),this.rightMuzzleNode=this.pistolRightModel.findByName("cc_Muzzle"),this.muzzleRightModel.reparent(this.rightMuzzleNode),this.muzzleLeftModel.enabled=!1,this.muzzleRightModel.enabled=!1),this.playIdleAnimation(!0)},IntroCharacterManager.prototype.update=function(){this.chooseAnimIsActive&&this.entity.animation.currentTime>=this.entity.animation.duration-this.animFadeTime*this.entity.animation.speed&&(this.chooseAnimIsActive=!1,this.playIdleAnimation(!1))},IntroCharacterManager.prototype.show=function(){this.active||this.limitedHidden||(this.active=!0,this.entity.enabled=!0,this.enableInput())},IntroCharacterManager.prototype.hide=function(){this.active&&(this.active=!1,this.entity.enabled=!1,this.disableInput())},IntroCharacterManager.prototype.enableInput=function(){this.isInputAllowed=!0},IntroCharacterManager.prototype.disableInput=function(){this.isInputAllowed=!1},IntroCharacterManager.prototype.selectCharacter=function(t,e,i){(this.isInputAllowed||i)&&this.setCharacterPositions(t,e)},IntroCharacterManager.prototype.setCharacterPositions=function(t,e){e===this.characterID?this.isCloseUp||(this.isCloseUp=!0,t&&this.playChooseAnimation(),this.entity.setLocalPosition(this.closeUpPosition),this.entity.lookAt(this.introCamera.getPosition()),this.entity.rotate(0,180,0)):this.isCloseUp&&this.deselectCharacter()},IntroCharacterManager.prototype.deselectCharacter=function(){this.isCloseUp&&(this.entity.setLocalPosition(this.distantPosition),this.entity.lookAt(this.introCamera.getPosition()),this.entity.rotate(0,180,0),this.playIdleAnimation(!1),this.isCloseUp=!1,this.chooseAnimIsActive=!1)},IntroCharacterManager.prototype.playIdleAnimation=function(t){if(!this.waitingForAssets)switch(this.entity.animation.loop=!0,this.characterID){case CharacterID.Chicken:this.entity.animation.play("Chicken_MS_Idle.glb",this.animFadeTime);break;case CharacterID.Fox:this.muzzleLeftModel.enabled=!1,this.muzzleRightModel.enabled=!1,this.pistolLeftModel.animation.currentTime=5,this.pistolRightModel.animation.currentTime=5,this.entity.animation.play("Fox_MS_Idle.glb",this.animFadeTime);break;case CharacterID.Bull:this.entity.animation.play("Bull_MS_Idle.glb",this.animFadeTime);break;case CharacterID.Dog:case CharacterID.Rhino:case CharacterID.Lion:this.entity.animation.play("Bull_MS_Idle.glb",this.animFadeTime),t&&(this.entity.animation.currentTime=1);break;case CharacterID.Ape:this.muzzleLeftModel.enabled=!1,this.muzzleRightModel.enabled=!1,this.pistolLeftModel.animation.currentTime=5,this.pistolRightModel.animation.currentTime=5,this.entity.animation.play("Fox_MS_Idle.glb",this.animFadeTime),t&&(this.entity.animation.currentTime=1);break;case CharacterID.Toucan:this.entity.animation.play("Chicken_MS_Idle.glb",this.animFadeTime),t&&(this.entity.animation.currentTime=1)}},IntroCharacterManager.prototype.playChooseAnimation=function(){if(!this.waitingForAssets)switch(this.entity.animation.loop=!1,this.chooseAnimIsActive=!0,this.entity.animation.currentTime=0,this.characterID){case CharacterID.Chicken:case CharacterID.Toucan:this.entity.animation.play("Chicken_MS_Choose.glb",this.animFadeTime);break;case CharacterID.Fox:case CharacterID.Ape:this.muzzleLeftModel.enabled=!0,this.muzzleRightModel.enabled=!0,this.pistolLeftModel.animation.play("Wpn_357gun_MS_FoxL_Choose.glb"),this.pistolRightModel.animation.play("Wpn_357gun_MS_FoxR_Choose.glb"),this.muzzleLeftModel.animation.play("Efx_MuzzleSimple_MS_FoxL_Shoot.glb"),this.muzzleRightModel.animation.play("Efx_MuzzleSimple_MS_FoxR_Shoot.glb"),this.entity.animation.play("Fox_MS_Choose.glb",this.animFadeTime);break;case CharacterID.Bull:case CharacterID.Rhino:case CharacterID.Lion:case CharacterID.Dog:this.entity.animation.play("Bull_MS_Choose.glb",this.animFadeTime)}},IntroCharacterManager.prototype.changeHat=function(t,e){t!==this.characterID||this.waitingForAssets||(this.currentHat&&this.currentHat.destroy(),e>0&&(this.currentHat=this.itemDataManager.getHat(e).model.clone(),this.currentHat.reparent(this.hatNode),this.currentHat.enabled=!0))},IntroCharacterManager.prototype.changeOutfit=function(t,e){if(t===this.characterID&&!this.waitingForAssets){var i=this.itemDataManager.getOutfitForCharacterType(t,e).texture.resource;this.characterBodyMaterial.diffuseMap=i,this.characterBodyMaterial.update()}},IntroCharacterManager.prototype.setPopupPosition=function(){this.isCloseUp?(this.entity.setLocalPosition(this.popupPosition),this.entity.lookAt(this.introCamera.getPosition()),this.entity.rotate(0,180,0),this.playIdleAnimation(!1),this.chooseAnimIsActive=!1):this.hide()},IntroCharacterManager.prototype.undoPopupPosition=function(){this.isCloseUp&&(this.entity.setLocalPosition(this.closeUpPosition),this.entity.lookAt(this.introCamera.getPosition()),this.entity.rotate(0,180,0))};var SelectCharacterButton=pc.createScript("selectCharacterButton");SelectCharacterButton.attributes.add("buttonID",{type:"number",default:0,title:"Button ID"}),SelectCharacterButton.prototype.init=function(){},SelectCharacterButton.prototype.show=function(){this.entity.enabled=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.app.touch&&this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this)},SelectCharacterButton.prototype.hide=function(){this.entity.element.off(pc.EVENT_MOUSEDOWN,this.onPress,this),this.app.touch&&this.entity.element.off(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.enabled=!1},SelectCharacterButton.prototype.onPress=function(t){this.buttonClicked()},SelectCharacterButton.prototype.buttonClicked=function(){this.fire("buttonClicked",this.buttonID)};var AnimatorControl=pc.createScript("AnimatorControl");AnimatorControl.attributes.add("skinnedMesh",{type:"entity",default:0,title:"Skinned Mesh"}),AnimatorControl.attributes.add("animationEntity",{type:"entity",default:0,title:"Animation Entity"}),AnimatorControl.attributes.add("spineBone",{type:"string",default:"SpineBone",title:"Spine Bone"}),AnimatorControl.attributes.add("hipBone",{type:"string",default:"HipsBone",title:"Hip Bone"}),AnimatorControl.attributes.add("debug",{type:"boolean",default:!1,title:"Debug Mode?"});var tempUpperBone,tempLowerBone,skins,lowerLayerMask=["LeftFoot","RightFoot","Hips","LeftLeg","RightLeg","LeftToeBase","RightToeBase","LeftUpLeg","RightUpLeg"],upperLayerMask=["c_head.x","head.x","c_skull_01.x","jawbone.x","c_tong_01.x","c_tong_02.x","c_tong_03.x","tong_03.x","tong_02.x","tong_01.x","c_chin_01.x","c_chin_02.x","c_teeth_bot_master.x","c_teeth_bot.x","c_teeth_bot.l","c_teeth_bot.r","c_lips_bot_01_offset.l","c_lips_bot_01.l","c_lips_bot_01_offset.r","c_lips_bot_01.r","c_lips_bot_offset.l","c_lips_bot.l","c_lips_bot_offset.r","c_lips_bot.r","c_lips_bot_offset.x","c_lips_bot.x","c_teeth_top_master.x","c_teeth_top.x","c_teeth_top.l","c_teeth_top.r","c_lips_top_offset.x","c_lips_top.x","c_lips_top_offset.l","c_lips_top.l","c_lips_top_offset.r","c_lips_top.r","c_lips_top_01_offset.l","c_lips_top_01.l","c_lips_top_01_offset.r","c_lips_top_01.r","c_lips_smile_offset.l","c_lips_smile.l","c_lips_smile_offset.r","c_lips_smile.r","c_skull_02.x","c_eye_offset.l","c_eyelid_corner_01.l","c_eyelid_corner_02.l","c_eye.l","c_eyelid_base.l","eyelid_top.l","c_eyelid_top_01.l","c_eyelid_top_02.l","c_eyelid_top_03.l","eyelid_bot.l","c_eyelid_bot_01.l","c_eyelid_bot_02.l","c_eyelid_bot_03.l","c_cheek_smile.l","c_eye_offset.r","c_eyelid_corner_01.r","c_eyelid_corner_02.r","c_eye.r","c_eyelid_base.r","eyelid_top.r","c_eyelid_top_01.r","c_eyelid_top_02.r","c_eyelid_top_03.r","eyelid_bot.r","c_eyelid_bot_01.r","c_eyelid_bot_02.r","c_eyelid_bot_03.r","c_cheek_smile.r","c_nose_03.x","c_nose_01.x","c_nose_02.x","c_cheek_inflate.l","c_cheek_inflate.r","c_eyebrow_full.r","c_eyebrow_03.r","c_eyebrow_02.r","c_eyebrow_01.r","c_eyebrow_01_end.r","c_eyebrow_full.l","c_eyebrow_03.l","c_eyebrow_02.l","c_eyebrow_01.l","c_eyebrow_01_end.l","c_ear_01.l","c_ear_02.l","c_ear_01.r","c_ear_02.r","c_skull_03.x","c_eye_ref_track.l","c_eye_ref_track.r","cc_Hat"],bones={},upperLayerRootBone="head_scale_fix.x",lowerLayerRootBone="Hips";AnimatorControl.prototype.initialize=function(){skins=this.skinnedMesh.model.model.skinInstances;for(var e=0;e<skins.length;e++)for(var t=0;t<skins[e].bones.length;t++)bones[skins[e].bones[t].name]=skins[e].bones[t];if(this.animationEntity){this.layers=[],this.frames=[],this.animations=this.entity.animation.data.animations;var o=this.entity.animation.getAnimation("Fox@3rd_TwoGuns_Idle.json");window.reload=this.CreateLayerAnim(upperLayerMask,"reload",o),this.layers.push(this.CreateAvatarAnim(upperLayerRootBone,upperLayerMask,window.reload))}else console.log("Animator: You must define an entity where an animation component with animations is defined!")},AnimatorControl.prototype.CreateLayerAnim=(e,t,o)=>({layer:e,id:t,anim:o}),AnimatorControl.prototype.CreateSkeleton=function(e,t,o){let i=t.model.model.getGraph().findByName(e);for(var n={},_=[],r=t.model.model.skinInstances,l=0;l<r.length;l++)for(var s=0;s<r[l].bones.length;s++)n[r[l].bones[s].name]=r[l].bones[s];for(var a in o){let e=o[a];for(var c in n){let t=n[c];t.name==e&&_.push(t)}}let p=new pc.Skeleton(i);return p.setGraph(i),p.boneGraph=_,p},AnimatorControl.prototype.CreateAvatarAnim=function(e,t,o,i){let n=this.CreateSkeleton(e,this.skinnedMesh,t);this.layerSkeletonAnimClip=new pc.Animation;var _=o.anim.nodes.filter((function(e){for(var o in t){let i=t[o];if(e._name==i)return e}}));for(let e in _){let t=_[e];"binaryIndexOf"!=e&&this.layerSkeletonAnimClip.addNode(t)}return this.layerSkeletonAnimClip.name=o.id,this.layerSkeletonAnimClip.duration=o.anim.duration,n.animation=this.layerSkeletonAnimClip,n.updateAnim=!1,n.targetBones=t,n.id=o.id,this.app.on("animator:"+this.animationEntity.name+":"+o.id,(()=>{Math.abs(n.currentTime,n.animation.duration)<.01&&(n.updateAnim=!n.updateAnim)})),n},AnimatorControl.prototype.TriggerAnim=function(e){this.layers.find((t=>{t.id==e&&(t.updateAnim=!t.updateAnim,this.debug&&console.log("Animator [DEBUG]: Layer Updated",t.updateAnim))}))},AnimatorControl.prototype.onSkeletonList=function(){console.log("Animator: Bone List"),console.log("-------------------"),void 0===skins&&console.log("You must define the skinned model before you can use the AnimatorControl component!");for(var e=0;e<skins.length;e++)for(var t=0;t<skins[e].bones.length;t++)console.log(skins[e].bones[t])},pc.Skeleton.prototype.myAddTime=function(e){if(null!==this._animation){var t,o,i,n,_,r,l,s,a=this._animation._nodes,c=this._animation.duration;if(this._time===c&&this.looping,this._time+=e,this._time>c)for(this._time=this.looping?0:c,t=0;t<a.length;t++)i=(o=a[t])._name,this._currKeyIndices[i]=0;else if(this._time<0)for(this._time=this.looping?c:0,t=0;t<a.length;t++)i=(o=a[t])._name,this._currKeyIndices[i]=o._keys.length-2;var p=e>=0?1:-1;for(t=0;t<a.length;t++)if(i=(o=a[t])._name,n=o._keys,void 0!==(_=this._interpolatedKeyDict[i])){if(1!==n.length)if(r=n[0],this._time<r.time)_._pos.copy(r.position),_._quat.copy(r.rotation),_._scale.copy(r.scale),_._written=!0;else for(var d=this._currKeyIndices[i];d<n.length-1&&d>=0;d+=p){if(l=n[d+1],r.time<=this._time&&l.time>=this._time){s=(this._time-r.time)/(l.time-r.time),_._pos.lerp(r.position,l.position,s),_._quat.slerp(r.rotation,l.rotation,s),_._scale.lerp(r.scale,l.scale,s),_._written=!0,this._currKeyIndices[i]=d;break}r=l}1===n.length&&(_._pos.copy(n[0].position),_._quat.copy(n[0].rotation),_._scale.copy(n[0].scale),_._written=!0)}else console.warn("Unknown skeleton node name: "+i)}},AnimatorControl.prototype.postUpdate=function(e){this.app.keyboard.wasPressed(pc.KEY_T)&&this.TriggerAnim("reload");for(let t in this.layers){let o=this.layers[t];this.debug&&console.log("Animator [DEBUG]: ",o),o.updateAnim&&(o.myAddTime(2*e),o.updateGraph())}};var CameraManager=pc.createScript("cameraManager");CameraManager.prototype.init=function(){this.isInitialized||(this.saturateBloomPeepHoleEffect=this.entity.script.saturateBloomPeep,this.isInitialized=!0,MobileController.instance.active?this.entity.camera.farClip=200:this.entity.camera.farClip=500)},CameraManager.prototype.enable=function(){this.entity.enabled=!0,this.saturateBloomPeepHoleEffect.enabled=!0,this.time=0},CameraManager.prototype.disable=function(){this.saturateBloomPeepHoleEffect.enabled=!1,this.entity.enabled=!1},CameraManager.prototype.update=function(e){this.time+=e,this.saturateBloomPeepHoleEffect&&(this.saturateBloomPeepHoleEffect.radius=2*(this.time-.2))};var MusicManager=pc.createScript("musicManager"),LoopingMusicSlotTypes={none:0,homeScreen:1,ingame:2,cooldown:3};MusicManager.prototype.init=function(i,s,t,e){this.hasInitialized||!1===this.entity.script.enabled||(this.hasInitialized=!0,this.localPlayerID=null,this.currentTopPlayerID=null,this.currentMusic="",this.currentStinger="",this.currentGameState="",this.delayedMusic="",this.delayedMusicTimer=null,this.globalsControllerScript=i,this.storageManager=t,this.adsManager=e,this.adsManager.on("onAdStarted",this.onAdStarted,this),this.adsManager.on("onAdCompleted",this.onAdCompleted,this),this.isShowingAd=this.adsManager.isShowingAd(),this.isAdPlaying=!1,this.isInGame=!1,this.isWindowFocused=!0,this.activeLoopingMusicSlot=LoopingMusicSlotTypes.none,s.musicBundleAsset.ready((function(i){var s=this.app.assets.find("music_anticipation.mp3","audio");this.entity.sound.slot("titleScreenMusic").asset=s,s=this.app.assets.find("music_swing.mp3","audio"),this.entity.sound.slot("ingameMusic").asset=s,s=this.app.assets.find("music_cooldown_relaxed.mp3","audio"),this.entity.sound.slot("cooldownMusic").asset=s,s=this.app.assets.find("music_game_over_stinger.mp3","audio"),this.entity.sound.slot("gameOverStinger").asset=s,s=this.app.assets.find("music_end_game_stinger_2.5_sec_before_music.mp3","audio"),this.entity.sound.slot("endGameStingerMusic").asset=s,s=this.app.assets.find("cartoon_impact_slide_1.7sec_before_music.mp3","audio"),this.entity.sound.slot("startGameStingerMusic").asset=s,s=this.app.assets.find("music_winner_stinger_3.2_sec_before_music.mp3","audio"),this.entity.sound.slot("winnerStinger").asset=s,s=this.app.assets.find("ui_respawn_enabled.mp3","audio"),this.entity.sound.slot("cooldown_ended").asset=s}),this),this.app.keyboard.on("keydown",this.onKeyDown,this),this.app.on("inGameMusicToggled",this.onInGameMusicToggled,this),this.app.on("homeScreenEnable",this.OnHomeScreenEnable,this),this.app.on("homeScreenDisable",this.OnHomeScreenDisable,this),this.app.on("inGameSoundToggled",this.onInGameSoundToggled,this),this.app.on("sessionStarted",this.OnSessionStarted,this),this.app.on("cooldownStarted",this.OnCooldownStarted,this),this.app.on("respawn",this.OnRespawn,this),this.app.on("playerKilled",this.OnPlayerKilled,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("leftGame",this.onLeftGame,this),this.app.on("localPlayerInitialized",this.onLocalPlayerInitialized,this),this.app.on("localPlayerSpawned",this.onLocalPlayerSpawned,this),this.app.on("topPlayerChanged",this.onTopPlayerChanged,this),this.app.on("windowLostFocus",this.onWindowLostFocus,this),this.app.on("windowGainedFocus",this.onWindowGainedFocus,this),this.initalizeSound(),this.storageManager.on("onUserChanged",this.onUserChanged,this))},MusicManager.prototype.onKeyDown=function(i){i.key===pc.KEY_M&&!isChatModeEnabled&&this.isInGame&&this.onSoundButtonClicked(),i.key===pc.KEY_N&&!isChatModeEnabled&&this.isInGame&&this.onMusicButtonClicked()},MusicManager.prototype.onAdStarted=function(){this.isAdPlaying=!0,this.onInGameMusicToggled(!1),this.onInGameSoundToggled(!1)},MusicManager.prototype.onAdCompleted=function(){this.isAdPlaying=!1,this.initalizeSound()},MusicManager.prototype.onUserChanged=function(){this.initalizeSound()},MusicManager.prototype.initalizeSound=function(){if(this.isAdPlaying)return;this.musicEnabledUserPreference=this.storageManager.load(STORAGE_MusicOn_KEY),this.soundEnabledUserPreference=this.storageManager.load(STORAGE_SoundOn_KEY);let i=this.globalsControllerScript.musicEnabled;void 0!==this.musicEnabledUserPreference&&null!==this.musicEnabledUserPreference&&(i="true"===this.musicEnabledUserPreference),this.onInGameMusicToggled(i);let s=this.globalsControllerScript.soundEnabled;void 0!==this.soundEnabledUserPreference&&null!==this.soundEnabledUserPreference&&(s="true"===this.soundEnabledUserPreference),this.onInGameSoundToggled(s)},MusicManager.prototype.onSoundButtonClicked=function(){var i=!soundEnabled;this.onInGameSoundToggled(i),this.storageManager.save(STORAGE_SoundOn_KEY,i)},MusicManager.prototype.onMusicButtonClicked=function(){var i=!musicEnabled;this.onInGameMusicToggled(i),this.storageManager.save(STORAGE_MusicOn_KEY,i)},MusicManager.prototype.onLocalPlayerInitialized=function(i){this.localPlayerID=i},MusicManager.prototype.onInGameSoundToggled=function(i){soundEnabled=i,soundEnabled?this.app.systems.sound.volume=1:this.app.systems.sound.volume=0,this.fire("soundToggled")},MusicManager.prototype.onInGameMusicToggled=function(i){musicEnabled=i,musicEnabled?this.entity.sound.volume=1:this.entity.sound.volume=0,this.fire("musicToggled")},MusicManager.prototype.onTopPlayerChanged=function(i){null!==i.id&&i.kills>0&&(this.currentTopPlayerID=i.id)},MusicManager.prototype.OnHomeScreenEnable=function(){this.activeLoopingMusicSlot=LoopingMusicSlotTypes.homeScreen,this.isWindowFocused&&this.PlayMusic("titleScreenMusic",3)},MusicManager.prototype.OnCooldownStarted=function(){this.activeLoopingMusicSlot=LoopingMusicSlotTypes.cooldown,this.isWindowFocused&&(null!==this.currentTopPlayerID&&this.currentTopPlayerID==this.localPlayerID?this.PlayStingerAndMusicDelayed("winnerStinger","cooldownMusic",2.5,0,!0):this.PlayStingerAndMusicDelayed("endGameStingerMusic","cooldownMusic",3.3,0,!0))},MusicManager.prototype.OnRespawn=function(i,s){if(this.isWindowFocused&&s){var t=0;"cooldownMusic"==this.currentMusic&&this.entity.sound.slots[this.currentMusic].instances[0]&&(t=this.entity.sound.slots[this.currentMusic].instances[0].currentTime),this.PlayMusic("ingameMusic",2,2,t)}},MusicManager.prototype.OnPlayerKilled=function(){this.isWindowFocused&&this.PlayStingerAndMusicDelayed("gameOverStinger","cooldownMusic",2.732,2,!0)},MusicManager.prototype.OnSessionStarted=function(i,s,t){this.activeLoopingMusicSlot=LoopingMusicSlotTypes.ingame,this.isWindowFocused&&(t?this.PlayStingerAndMusicDelayed("startGameStingerMusic","ingameMusic",.857,0,!0):this.entity.sound.slot("cooldown_ended").play())},MusicManager.prototype.onLocalPlayerSpawned=function(){this.isInGame=!0},MusicManager.prototype.onLeftGame=function(){this.isInGame=!1},MusicManager.prototype.PlayStingerAndMusicDelayed=function(i,s,t,e,n,o){t=void 0!==t?t:0,e=void 0!==e?e:0,o=void 0!==o?o:0,(n=void 0!==n&&n)&&""!==this.currentMusic&&this.StopMusic(this.currentMusic,0),this.entity.sound.slots[i].play(),t>0?(this.delayedMusic=s,this.delayedMusicTimer=setTimeout(this.PlayMusicAndClearDelay.bind(this,s,e,o),1e3*t)):this.PlayMusic(s,e)},MusicManager.prototype.PlayMusicAndClearDelay=function(i,s,t){this.PlayMusic(i,s,t),this.delayedMusic="",this.delayedMusicTimer=null},MusicManager.prototype.PlayMusic=function(i,s,t,e){var n;(fadeTime="undefined"!=typeof fadeTime?fadeTime:0,t=void 0!==t?t:0,e=void 0!==e?e:0,""!==this.delayedMusic&&null!==this.delayedMusicTimer&&clearTimeout(this.delayedMusicTimer),this.currentMusic!=i)&&(this.StopAllLoopingSlots(t,i),this.currentMusic=i,this.entity.sound.slots[this.currentMusic].startTime=e,this.entity.sound.slot(this.currentMusic).isPaused?(this.entity.sound.slot(this.currentMusic).resume(),n=this.entity.sound.slot(this.currentMusic).instances[0]):n=this.entity.sound.slots[this.currentMusic].play(),fadeTime>0&&(n.volume=0,this.app.tween(n).to({volume:this.entity.sound.slots[this.currentMusic].volume},fadeTime,pc.SineOut).start()))},MusicManager.prototype.StopMusic=function(i,s){if((s=void 0!==s?s:0)>0&&""!=this.currentMusic){var t=this.entity.sound.slots[this.currentMusic].instances[0];t&&this.app.tween(t).to({volume:0},s,pc.SineOut).on("complete",this.StopAfterFade.bind(this,t)).start()}else this.entity.sound.slots[i].stop(),this.currentMusic=""},MusicManager.prototype.StopAllLoopingSlots=function(i,s){for(var t in i=void 0!==i?i:0,this.entity.sound.slots)void 0!==s&&t==s||this.entity.sound.slot(t).loop&&(this.entity.sound.slot(t).resume(),this.StopMusic(t,i))},MusicManager.prototype.StopAfterFade=function(i){i.resume(),i.stop()},MusicManager.prototype.onWindowGainedFocus=function(){if(!this.isWindowFocused)switch(this.isWindowFocused=!0,this.activeLoopingMusicSlot){case LoopingMusicSlotTypes.homeScreen:this.PlayMusic("titleScreenMusic",3);break;case LoopingMusicSlotTypes.ingame:this.PlayMusic("ingameMusic",3);break;case LoopingMusicSlotTypes.cooldown:this.PlayMusic("cooldownMusic",3)}},MusicManager.prototype.onWindowLostFocus=function(){this.isWindowFocused=!1,clearTimeout(this.delayedMusicTimer),this.delayedMusic="",this.delayedMusicTimer=null,this.StopAllLoopingSlots(),this.currentMusic=""};var ChatController=pc.createScript("chatController");ChatController.attributes.add("hintHeaderEntity",{type:"entity",title:"Hint Header"}),ChatController.attributes.add("inputFieldEntity",{type:"entity",title:"Input Field Box"}),ChatController.attributes.add("messageLabelEntity",{type:"entity",title:"Input Field Message"}),ChatController.attributes.add("indicatorEntity",{type:"entity",title:"Input Field Indicator"}),ChatController.attributes.add("chatElementEntity",{type:"entity",title:"Chat Element"}),ChatController.prototype.init=function(t,e){this.TextIndicator="|",this.allowedCharacters=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"],this.allowedSpecialCharacters=[".",",",":",";","!","?"," ","'",'"',"@","/","*","#","(",")","[","]","{","}","+","-","<",">"];for(var i=0;i<this.allowedSpecialCharacters.length;i++)this.allowedCharacters.push(this.allowedSpecialCharacters[i]);this.maxWidth=this.inputFieldEntity.element.width-110,this.timePassed=0,this.indicatorShowThreshold=.5,this.indicatorHideThreshold=.5,this.isIndicatorVisible=!1,this.updateIndicator=!1,this.localPlayerID=null,this.localPlayerName=null,this.maxNumberOfElements=t,this.messageDuration=e,this.chatElementEntity.enabled=!1,this.chatElementEnties=[],this.textArea=null,this.isWindowFocused=!0,this.isInputAllowed=!1,this.isChatEnabled=!1,this.indicatorElement=this.indicatorEntity.element,this.messageElement=this.messageLabelEntity.element,this.inputMessage="",this.inputFieldEntity.enabled=!1,this.messageLabelEntity.enabled=!1,this.hintHeaderEntity.enabled=!1,this.hasShownHintHeader=!1,this.hintHeaderShowDuration=15,this.headerTimeout=null,this.hasUsedChatOnceInSession=!1,this.app.keyboard.on("keydown",this.onKeyDown,this),this.app.on("windowLostFocus",this.onLostFocus,this),this.app.on("windowGainedFocus",this.onGainedFocus,this),this.app.on("receivedChatMessage",this.onReceivedChatMessage,this),this.app.on("cooldownStarted",this.onCooldownStarted,this)},ChatController.prototype.enableChat=function(){this.entity.enabled=!0,this.isChatEnabled=!0,this.hasShownHintHeader||(this.hintHeaderEntity.enabled=!0,this.hintHeaderEntity.text="Press ENTER to chat",this.headerTimeout=setTimeout(function(){this.hintHeaderEntity.enabled=!1}.bind(this),1e3*this.hintHeaderShowDuration))},ChatController.prototype.disableChat=function(){for(var t in this.hintHeaderEntity.enabled=!1,this.isChatEnabled=!1,this.hideInputBox(),this.chatElementEnties){var e=this.chatElementEnties[t];if(e){var i=e.script.chatElementHelper;i&&i.isActive()&&i.hide()}}this.entity.enabled=!1},ChatController.prototype.showInputBox=function(){this.hintHeaderEntity.enabled=!1,this.inputFieldEntity.enabled=!0,this.updateIndicator=!0,isChatModeEnabled=!0,this.textArea=document.createElement("textarea"),this.textArea.value=this.arenaLink,this.textArea.style.position="fixed",this.textArea.style.opacity=0,MobileController.instance.active||(this.textArea.style.display="none"),document.body.appendChild(this.textArea),this.textArea.focus()},ChatController.prototype.hideInputBox=function(){this.inputFieldEntity.enabled=!1,this.updateIndicator=!1,isChatModeEnabled=!1,this.inputMessage="",this.messageElement.text=this.inputMessage,this.messageLabelEntity.enabled=!1,null!==this.textArea&&(document.body.removeChild(this.textArea),this.textArea=null)},ChatController.prototype.update=function(t){this.isWindowFocused&&this.isInputAllowed?this.updateIndicator&&(this.timePassed+=t,this.timePassed>this.indicatorShowThreshold&&(this.indicatorElement.text=this.isIndicatorVisible?"":this.TextIndicator,this.isIndicatorVisible=!this.isIndicatorVisible,this.timePassed=0)):this.isIndicatorVisible&&(this.isIndicatorVisible=!1,this.timePassed=0)},ChatController.prototype.setLocalPlayerInfo=function(t,e){this.localPlayerID=t,this.localPlayerName=e},ChatController.prototype.onCooldownStarted=function(t){this.isChatEnabled&&!this.hasUsedChatOnceInSession&&(this.hasShownHintHeader=!1,this.enableChat())},ChatController.prototype.onReceivedChatMessage=function(t,e){this.displayMessage(t,e)},ChatController.prototype.onLostFocus=function(){this.isWindowFocused=!1},ChatController.prototype.onGainedFocus=function(){this.isWindowFocused=!0},ChatController.prototype.onKeyDown=function(t){if(this.isChatEnabled)if(t.key===pc.KEY_ESCAPE)this.isInputAllowed&&(this.hideInputBox(),this.isInputAllowed=!1);else if(t.key===pc.KEY_ENTER)this.hasUsedChatOnceInSession=!0,this.isInputAllowed=!this.isInputAllowed,this.isInputAllowed?(this.showInputBox(),this.hasShownHintHeader=!0):(this.inputMessage.length>0&&(this.checkInputForProfanity()," ***"!==this.inputMessage&&(this.displayMessage(this.localPlayerName,this.inputMessage),this.app.fire("sendChatMessage",this.localPlayerID,this.inputMessage))),this.hideInputBox());else if(this.isInputAllowed){if(t.key===pc.KEY_BACKSPACE)""!==this.inputMessage&&(this.inputMessage=this.inputMessage.slice(0,-1),0===this.inputMessage.length&&(this.inputMessage="",this.messageLabelEntity.enabled=!1));else{if(t.key===pc.KEY_SHIFT)return;var e=t.event.key;if(""===this.inputMessage&&" "===e)return;this.validateInputCharacter(e)&&(t.event.shiftKey&&(e=e.toUpperCase()),this.messageLabelEntity.element.width<this.maxWidth&&(this.inputMessage+=e),this.messageLabelEntity.enabled=0!==this.inputMessage.length)}this.messageElement.text=this.inputMessage}},ChatController.prototype.displayMessage=function(t,e){var i=0,s=null,a=null,n=null;for(var h in this.chatElementEnties){var l=this.chatElementEnties[h];if(l){s=h;var o=l.script.chatElementHelper;o?o.isActive()?i+=o.getRowsUsed():null===a&&(a=l,n=o):console.error("There's a NULL element in the list of chat elements!")}}null===a&&(i<this.maxNumberOfElements?(a=this.chatElementEntity.clone(),s=this.chatElementEnties.length,(n=a.script.chatElementHelper).init(),this.chatElementEnties[s]=a):(s=this.chatElementEnties.length-1,(n=(a=this.chatElementEnties[s]).script.chatElementHelper).hide())),a.reparent(this.entity,0),this.moveInArray(this.chatElementEnties,s,0),n.show(t,e,this.messageDuration)},ChatController.prototype.moveInArray=function(t,e,i){var s=t.splice(e,1);t.splice(i,0,s[0])},ChatController.prototype.validateInputCharacter=function(t){var e=!1;return this.allowedCharacters.includes(t)&&(e=!0),e},ChatController.prototype.checkInputForProfanity=function(){for(var t=this.inputMessage.split(/\s/),e="",i=0;i<t.length;i++){for(var s=t[i],a=0;a<profaneWords.length;a++){var n=profaneWords[a];if(n===s.toLowerCase()){s="***";break}for(var h="",l=s,o=0;o<this.allowedSpecialCharacters.length;o++)h=this.allowedSpecialCharacters[o],s.includes(h)&&(l=l.replaceAll(h,""));if(n===l.toLowerCase()){s="***";break}for(var r=s,d=0;d<this.allowedSpecialCharacters.length;d++)if(h=this.allowedSpecialCharacters[d],s.includes(h))for(var c=r.split(h),p=0;p<c.length;p++){if(c[p].includes(n)){r="";for(var u=0;u<c.length;u++){for(var C=c[u],y=C,E=0;E<this.allowedSpecialCharacters.length;E++){var m=this.allowedSpecialCharacters[E];C.includes(m)&&(y=y.replaceAll(m,""))}n===y.toLowerCase()?r+="***":r+=C,p!==c.length-1&&(r+=h)}s=r}}}e+=" "+s}this.inputMessage=e};var OutfitButton=pc.createScript("outfitButton");OutfitButton.attributes.add("backgroundEntity",{type:"entity",title:"Background"}),OutfitButton.attributes.add("foregroundEntity",{type:"entity",title:"Foreground"}),OutfitButton.attributes.add("foregroundTriangleEntity",{type:"entity",title:"Triangle"}),OutfitButton.attributes.add("outfitID",{type:"number",title:"ID"}),OutfitButton.prototype.init=function(){this.backgroundElement=this.backgroundEntity.element,this.foregroundElement=this.foregroundEntity.element,this.foregroundTriangleElement=this.foregroundTriangleEntity.element,this.isInputAllowed=!0,this.isPressed=!1},OutfitButton.prototype.setButtonColor=function(t,e){this.foregroundElement.color=t,this.foregroundTriangleElement.color=e,this.foregroundTriangleElement.enabled=!t.equals(e)},OutfitButton.prototype.show=function(){this.entity.enabled=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this))},OutfitButton.prototype.hide=function(){this.entity.element.off(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.off(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.off(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.off(pc.EVENT_TOUCHEND,this.onRelease,this)),this.entity.enabled=!1},OutfitButton.prototype.enableInput=function(){this.isInputAllowed=!0},OutfitButton.prototype.disableInput=function(){this.isInputAllowed=!1},OutfitButton.prototype.onPress=function(t){!this.isPressed&&this.isInputAllowed&&(this.isPressed=!0,this.showActiveState())},OutfitButton.prototype.onRelease=function(t){this.isPressed&&this.isInputAllowed&&(this.isPressed=!1,this.buttonClicked())},OutfitButton.prototype.buttonClicked=function(){this.fire("buttonClicked",this.outfitID)},OutfitButton.prototype.showNormalState=function(){this.backgroundElement.color=Outfit_Button_Default_Color},OutfitButton.prototype.showActiveState=function(){this.backgroundElement.color=Outfit_Button_Pressed_Color},OutfitButton.prototype.updateOtherButtonPressed=function(t){this.outfitID!==t?this.showNormalState():this.showActiveState()};var ChatElementHelper=pc.createScript("chatElementHelper");ChatElementHelper.attributes.add("groupEntity",{type:"entity",title:"Group"}),ChatElementHelper.attributes.add("authorEntity",{type:"entity",title:"Author"}),ChatElementHelper.attributes.add("messageEntity",{type:"entity",title:"Message"}),ChatElementHelper.attributes.add("fonts",{type:"asset",assetType:"font",array:!0,title:"Fonts"}),ChatElementHelper.prototype.init=function(){this.maxWidth=this.entity.element.width-20,this.defaultBackgroundHeight=this.entity.element.height,this.active=!1,this.timeout=null,this.rows=0,this.authorTextElement=this.authorEntity.element,this.messageTextElement=this.messageEntity.element},ChatElementHelper.prototype.show=function(t,e,i){this.active=!0,this.entity.enabled=!0,this.rows=0;var s=0;switch(t&&t.length>0?(this.authorEntity.enabled=!0,this.authorTextElement.text=t+":",this.messageTextElement.fontAsset=this.fonts[1],s+=this.authorTextElement.width):(this.authorEntity.enabled=!1,this.messageTextElement.fontAsset=this.fonts[0]),e.length>0&&(this.messageTextElement.text=e,s+=this.messageTextElement.width),this.rows=s>=this.maxWidth?2:1,this.rows){case 1:this.groupEntity.layoutgroup.orientation=pc.ORIENTATION_HORIZONTAL,this.entity.element.height=this.defaultBackgroundHeight,this.authorEntity.reparent(this.groupEntity,0);break;case 2:this.groupEntity.layoutgroup.orientation=pc.ORIENTATION_VERTICAL,this.entity.element.height=2*this.defaultBackgroundHeight,this.messageEntity.reparent(this.groupEntity,0)}this.timeout=setTimeout(function(){this.hide()}.bind(this),1e3*i)},ChatElementHelper.prototype.isActive=function(){return this.active},ChatElementHelper.prototype.getRowsUsed=function(){return this.rows},ChatElementHelper.prototype.hide=function(){this.active&&(clearTimeout(this.timeout),this.active=!1,this.entity.enabled=!1)};var KillFeedController=pc.createScript("killFeedController");KillFeedController.attributes.add("feedElementEntity",{type:"entity",title:"Feed Element"}),KillFeedController.prototype.init=function(e,t){this.maxNumberOfElements=e,this.messageDuration=t,this.feedElementEntity.enabled=!1,this.feedElementEnties=[],this.testNr=0},KillFeedController.prototype.update=function(e){},KillFeedController.prototype.enableFeed=function(){this.entity.enabled=!0},KillFeedController.prototype.disableFeed=function(){for(var e in this.feedElementEnties){var t=this.feedElementEnties[e];if(t){var l=t.script.killFeedElementHelper;l&&l.isActive()&&l.hide()}}this.entity.enabled=!1},KillFeedController.prototype.displayMessage=function(e,t,l,i,n){var r=null,s=null,o=null;for(var d in this.feedElementEnties){var E=this.feedElementEnties[d];if(E){r=d;var a=E.script.killFeedElementHelper;if(a&&!a.isActive()){s=E,o=a;break}}}null===s&&(this.feedElementEnties.length<this.maxNumberOfElements?(s=this.feedElementEntity.clone(),r=this.feedElementEnties.length,(o=s.script.killFeedElementHelper).init(),this.feedElementEnties[r]=s):(r=0,(o=(s=this.feedElementEnties[r]).script.killFeedElementHelper).hide())),s.reparent(this.entity,this.feedElementEnties.length-1),this.moveInArray(this.feedElementEnties,r,this.feedElementEnties.length-1),o.show(e,t,this.messageDuration,l,i,n)},KillFeedController.prototype.moveInArray=function(e,t,l){var i=e.splice(t,1);e.splice(l,0,i[0])};var KillFeedElementHelper=pc.createScript("killFeedElementHelper");KillFeedElementHelper.attributes.add("messageEntity",{type:"entity",title:"Message"}),KillFeedElementHelper.attributes.add("messageEntity2",{type:"entity",title:"Message2"}),KillFeedElementHelper.attributes.add("weaponIconRoot",{type:"entity",title:"weaponIconRoot"}),KillFeedElementHelper.attributes.add("weaponIcon",{type:"entity",title:"weaponIcon"}),KillFeedElementHelper.attributes.add("weaponIconTextures",{type:"asset",assetType:"texture",array:!0,title:"Weapon Icons"}),KillFeedElementHelper.prototype.init=function(){this.active=!1,this.timeout=null,this.messageTextElement=this.messageEntity.element,this.messageTextElement2=this.messageEntity2.element,this.weaponIconRootElement=this.weaponIconRoot.element,this.weaponIconImageElement=this.weaponIcon.element,this.setBackgroundDelayed=!1,this.mineKill=!1,this.messageTextElement.outlineColor=Leaderboard_Element_Highlighted_Text_Shadow_Color,this.messageTextElement2.outlineColor=Leaderboard_Element_Highlighted_Text_Shadow_Color},KillFeedElementHelper.prototype.show=function(e,t,i,l,n,s){e.length>0&&(this.active=!0,this.mineKill=e===t,this.mineKill?this.messageTextElement.text="":this.messageTextElement.text=e,this.toggleWeaponImage(s),this.messageTextElement2.text=t,this.messageTextElement.color=KillFeed_Element_Default_Text_Color,this.messageTextElement2.color=KillFeed_Element_Default_Text_Color,this.messageTextElement.outlineThickness=0,this.messageTextElement2.outlineThickness=0,this.entity.element.opacity=.4,l&&!this.mineKill?(this.messageTextElement.color=Leaderboard_Element_Highlighted_Text_Color,this.messageTextElement.outlineThickness=1,this.entity.element.color=KillFeed_Element_Kill_BG_Color,this.entity.element.opacity=.65):n?(this.messageTextElement2.color=Leaderboard_Element_Highlighted_Text_Color,this.messageTextElement2.outlineThickness=1,this.entity.element.color=KillFeed_Element_Killed_BG_Color,this.entity.element.opacity=.65):this.entity.element.color=KillFeed_Element_Default_BG_Color,this.setBackgroundDelayed=!0,this.entity.enabled=!0,this.timeout=setTimeout(function(){this.hide()}.bind(this),1e3*i))},KillFeedElementHelper.prototype.toggleWeaponImage=function(e){var t=0;switch(e){case Weapons.Rifle:t=1;break;case Weapons.Shotgun:t=2;break;case Weapons.RocketLauncher:t=3;break;case Weapons.Minigun:t=4;break;case Weapons.Uzi:t=5;break;case Weapons.Mine:t=6;break;case Weapons.Pistols:default:t=0}this.weaponIconImageElement.textureAsset=this.weaponIconTextures[t]},KillFeedElementHelper.prototype.update=function(e){this.setBackgroundDelayed&&(this.setBackgroundDelayed=!1,this.entity.element.width=this.messageTextElement.width+this.messageTextElement2.width+this.weaponIconRootElement.width+28,this.mineKill&&(this.entity.element.width-=26))},KillFeedElementHelper.prototype.isActive=function(){return this.active},KillFeedElementHelper.prototype.hide=function(){this.active&&(clearTimeout(this.timeout),this.active=!1,this.entity.enabled=!1)};var loadingStartTime;pc.script.createLoadingScreen((function(n){var e,t;e=["body {"," background-color: #101427;","}","#application-splash-wrapper {"," position: absolute;"," top: 0;"," left: 0;"," height: 100%;"," width: 100%;"," background-color: #101427;","}","#application-splash {"," position: absolute;"," top: calc(50% - 152px);"," width: 480px;"," left: calc(50% - 240px);","}","#application-splash img {"," width: 100%;","}","#progress-bar-container {"," margin: 25px auto 0 auto;"," height: 4px;"," width: 65%;"," background-color: #ffffff;","}","#progress-bar {"," width: 0%;"," height: 100%;"," background-color: #F98500;","}","#kiloo-container {"," margin: 25px auto 0 auto;"," height: 21px;"," width: 112px;","}","#application-splash {"," position: absolute;"," top: calc(50% - 152px);"," width: 480px;"," left: calc(50% - 240px);","}","@media (max-width: 480px) {"," #application-splash {"," width: 170px;"," left: calc(50% - 85px);"," }","}"].join("\n"),(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.head.appendChild(t),function(){loadingStartTime=Date.now();var n=document.createElement("div");n.id="application-splash-wrapper",document.body.appendChild(n);var e=document.createElement("div");e.id="application-splash",n.appendChild(e),e.style.display="none";var t=document.createElement("img");t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAADjCAYAAABdN8ePAAAgAElEQVR4nOydB5wcZfn4v7P1ek/ukksvJCQQWiCA9CYICAKCFUT8KSC9KFVAUVEUsCsKVkB6J6ETaugthPRyvd/t7pXd2zL/z/POzO7s3OxeQFDxv08+k9udnXnfd973nacXLaV34wQN0MecLcD/KFQBE8xjkvm3zjxfARQBQcDrsi2SQAoYAboA2UwtwEZgPTDwCZsy2fql5lECFMvza1CqQzlQZp4rsR1B85B5CpiHxzy8Zrs+s22Zz2bgXCDycQy+8N4WoACfHPAV1ur/CxCCOhGYDswHZprEdoqGZyp4JoHXY9CRwL84H1GTHid7dHgd43gYWGES660FIWizTJqSj64kzUMzj4R5fcrGICTMz/I3bh5J8/6vA/8HjGpo5aBV2I6gQUd9aOpV8Zp09c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7rjhBrx94P+EO/pSXHK5CYLSkIg4k4X2yx/juw99j0fbOGxTSnzrAbzOb0X4fg23nLH3Bw1xBMAbVzwuhTw26uuEgGnoj0KNa2QMSRNvf9DvIQkay6Oq8LHXkRVRvzvCC+njqZqVftH4siYfXYT3H/kY9975Ob6/LUV3NBCEIcgCJuJOV98g1MEBHkc71SxfAIuhuXQzhRfVqQJOSQsLZrdTJM3wcwiXr37N7jcFGZCsvsV5AK8A+CGzUCVgVVD4syK8tbag24q4MKetIgXdxpW3mR3bq6r4qRDcDQD+LNzoLhG+7ZZUXt7Jzc+MgEwVyBBry2D9CYQ4LgWwU5SKzBQh4BniOlPcdot1s/U9LdZkpLAG69XYCKBZAlaKzodTCr94844dPYnWjlbkZJSL6G+CGB8kwETckUVt5/4IgUxJDNvS/E246Y1xIUtcKLVNb3vQ/5OkAt3Slek2a2JZtjqyr8W3lSUthkoOiv3qGZPSc+aK/dUx5qz4lY3hkrRr1qBYL2R9OIbpsec8L8bqEHvn51UV5yUJtdCs3TohwP5IbvGpAHMxuGXtrIgg4gUJMEFcPaqw6AYTnNvqF0IZvZu/Mdip0XijL/cLa1saVe2DIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAgi4QD4f1wVBpKGCIfWAAAAAElFTkSuQmCC",e.appendChild(t),t.onload=function(){e.style.display="block"};var v=document.createElement("div");v.id="progress-bar-container",e.appendChild(v);var c=document.createElement("div");c.id="progress-bar",v.appendChild(c);var m=document.createElement("div");m.id="kiloo-container",e.appendChild(m);var r=document.createElement("img");r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAVCAYAAACe2WqiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM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ayemQvWHgPfUpBg5F6wEw4QuIZ5uWaU+J3JRIMOZq+TTb97+WrbN+HXMw81qY+CwI/QFciAiDQxQObeY7TpGOCOTGD538AXq/Fe+9KhCd6m90F9UtfQj6H6cVWgTWABeEQzn2CccVeUGVpYfgKMWeyn9Gyy2drCG/p86jj9KXO9aZTPz0pO2lyOq6avUfeapDYgfhN3cczPb0yz70U9S185+ZXAs3wXMFrYiy02vF/aHYyygTeSmcnUyniwUvlngs5j+UyM29Y0Moq2f0psH5nk+YOUcU692rswD+io3z+X8ZIr+3fRdIXSF1G1hvzZqAcN+jTCMt4xp5C8Ss5W+SviVe0xiiTqXWfREhI95Mmc47mWuxznNd98NFt9VatwekCvsN4UccygjU1PImHoeZ4LQjaZuhOWb9Gvq/gh0rp2Y10GuyCmdyr6SG78jxU5BPqujdcxZgWwQ7c8Z48Nkk+qbHZGlTOZjGP9zmdC3cZfIJPs9juOVsoi5jUWXKeWz+e23mQXaMofvZNrMt+9P3GI7JOxvgkE8xwjmzARrg4OctyH89BoPzmPhtpV5NihkzG+v76j7b+T25VJxvmpW1f985mR2/aUivaXrLxVpLn8LMAA5SePP/ba8CwAAAABJRU5ErkJggg==",m.appendChild(r),r.onload=function(){e.style.display="block"}}(),n.on("preload:end",(function(){n.off("preload:progress")})),n.on("preload:progress",(function(n){var e=document.getElementById("progress-bar");e&&(n=Math.min(1,Math.max(0,n)),e.style.width=100*n+"%")})),n.on("start",(function(){var n=document.getElementById("application-splash-wrapper");n.parentElement.removeChild(n)}))}));var EffectPoof=pc.createScript("effectPoof");EffectPoof.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectPoof.attributes.add("uCount",{type:"number"}),EffectPoof.attributes.add("uSpeed0",{type:"number"}),EffectPoof.attributes.add("uSpeed0Variance",{type:"number"}),EffectPoof.attributes.add("uZspeed0",{type:"number"}),EffectPoof.attributes.add("uZspeed0Variance",{type:"number"}),EffectPoof.attributes.add("uLifetime",{type:"number"}),EffectPoof.attributes.add("uLifetimeVariance",{type:"number"}),EffectPoof.attributes.add("uFullSize",{type:"number"}),EffectPoof.attributes.add("uSizeVariance",{type:"number"}),EffectPoof.attributes.add("uColor0",{type:"rgba"}),EffectPoof.attributes.add("uColor1",{type:"rgba"}),EffectPoof.attributes.add("receiveShadows",{type:"boolean"}),EffectPoof.prototype.firstTimeCreate=function(e){var t=this.app.root.findByName("MeshCreator").script.meshCreator.getCloudModel().clone();this.entity.model||this.entity.addComponent("model"),t.meshInstances[0].cull=!1,this.entity.model.model=t,this.entity.model.receiveShadows=!0,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.entity.model.layers=[pc.LAYERID_WORLD],this.material=e.clone(),t.meshInstances[0].material=this.material},EffectPoof.prototype.spawn=function(e,t,a,r){this.entity.setPosition(e),this.entity.setRotation(t),this.entity.enabled=!0,this.animInfo={createtime:Date.now(),lifetime:5};var i=this.material;switch(i.setParameter("uPerlinTexture",this.perlinTexture.resource),i.setParameter("uTime",0),i.setParameter("uRandomSeed",Math.random()),a){case 0:i.setParameter("uCount",8),i.setParameter("uSpeed0",10),i.setParameter("uSpeed0Variance",.1),i.setParameter("uZspeed0",1),i.setParameter("uZspeed0Variance",1),i.setParameter("uLifetime",1),i.setParameter("uLifetimeVariance",.5),i.setParameter("uFullSize",.75),i.setParameter("uSizeVariance",.5),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0;break;case 1:i.setParameter("uCount",64),i.setParameter("uSpeed0",20),i.setParameter("uSpeed0Variance",.25),i.setParameter("uZspeed0",1),i.setParameter("uZspeed0Variance",1),i.setParameter("uLifetime",1.5),i.setParameter("uLifetimeVariance",1),i.setParameter("uFullSize",.5),i.setParameter("uSizeVariance",1),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0;break;case 2:i.setParameter("uCount",64),i.setParameter("uSpeed0",15),i.setParameter("uSpeed0Variance",.5),i.setParameter("uZspeed0",-30),i.setParameter("uZspeed0Variance",1),i.setParameter("uLifetime",1),i.setParameter("uLifetimeVariance",1),i.setParameter("uFullSize",1),i.setParameter("uSizeVariance",1),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0;break;case 3:i.setParameter("uCount",64),i.setParameter("uSpeed0",5),i.setParameter("uSpeed0Variance",1),i.setParameter("uZspeed0",-30),i.setParameter("uZspeed0Variance",1),i.setParameter("uLifetime",2),i.setParameter("uLifetimeVariance",1),i.setParameter("uFullSize",.5),i.setParameter("uSizeVariance",1),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0;break;case 4:i.setParameter("uCount",16),i.setParameter("uSpeed0",10),i.setParameter("uSpeed0Variance",1),i.setParameter("uZspeed0",-5),i.setParameter("uZspeed0Variance",.5),i.setParameter("uLifetime",.3),i.setParameter("uLifetimeVariance",.25),i.setParameter("uFullSize",1.5),i.setParameter("uSizeVariance",.25),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,.75,1]),i.setParameter("uColor1",[1,.5,.25,1]),this.entity.model.receiveShadows=!1;break;case 5:i.setParameter("uCount",this.uCount),i.setParameter("uSpeed0",this.uSpeed0),i.setParameter("uSpeed0Variance",this.uSpeed0Variance),i.setParameter("uZspeed0",this.uZspeed0),i.setParameter("uZspeed0Variance",this.uZspeed0Variance),i.setParameter("uLifetime",this.uLifetime),i.setParameter("uLifetimeVariance",this.uLifetimeVariance),i.setParameter("uFullSize",this.uFullSize),i.setParameter("uSizeVariance",this.uSizeVariance),i.setParameter("uGravity",0),i.setParameter("uColor0",this.uColor0.data),i.setParameter("uColor1",this.uColor1.data),this.entity.model.receiveShadows=this.receiveShadows;break;case 6:i.setParameter("uCount",16),i.setParameter("uSpeed0",10),i.setParameter("uSpeed0Variance",1),i.setParameter("uZspeed0",-2),i.setParameter("uZspeed0Variance",.5),i.setParameter("uLifetime",2.3),i.setParameter("uLifetimeVariance",.25),i.setParameter("uFullSize",.5),i.setParameter("uSizeVariance",.25),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0;break;case 7:i.setParameter("uCount",16),i.setParameter("uSpeed0",5),i.setParameter("uSpeed0Variance",1),i.setParameter("uZspeed0",10),i.setParameter("uZspeed0Variance",1),i.setParameter("uLifetime",1.5),i.setParameter("uLifetimeVariance",.95),i.setParameter("uFullSize",.3),i.setParameter("uSizeVariance",1),i.setParameter("uGravity",0),i.setParameter("uColor0",[1,1,1,1]),i.setParameter("uColor1",[1,1,1,1]),this.entity.model.receiveShadows=!0}r&&(r.color0&&i.setParameter("uColor0",[r.color0.r,r.color0.g,r.color0.b,r.color0.a]),r.color1&&i.setParameter("uColor1",[r.color1.r,r.color1.g,r.color1.b,r.color1.a]),r.gravity&&i.setParameter("uGravity",r.gravity),r.lifetime&&i.setParameter("uLifetime",r.lifetime),r.fullsize&&i.setParameter("uFullSize",r.fullsize),r.speed&&i.setParameter("uSpeed0",r.speed),r.zspeed&&i.setParameter("uZSpeed0",r.zspeed))},EffectPoof.prototype.initialize=function(){},EffectPoof.prototype.update=function(e){if(this.animInfo){var t=.001*(Date.now()-this.animInfo.createtime);t>=this.animInfo.lifetime?this.entity.enabled=!1:this.material.setParameter("uTime",t)}};var GrassTest=pc.createScript("grassTest");function fract(e){return e-Math.floor(e)}function floor(e){return Math.floor(e)}function hash(e){return fract(43758.5453*Math.sin(e))}function mix(e,t,s){return e+(t-e)*s}function noise(e){var t=.1*e.x,s=.1*e.y,a=.1*e.z,r=floor(t),i=floor(s),n=floor(a),h=fract(t),o=fract(s),m=fract(a);h=h*h*(3-2*h),o=o*o*(3-2*o),m=m*m*(3-2*m);var c=r+57*i+113*n;return mix(mix(mix(hash(c+0),hash(c+1),h),mix(hash(c+57),hash(c+58),h),o),mix(mix(hash(c+113),hash(c+114),h),mix(hash(c+170),hash(c+171),h),o),m)}GrassTest.attributes.add("materialGrass",{type:"asset",assetType:"material"}),GrassTest.attributes.add("heightRamp",{type:"asset",assetType:"texture"}),GrassTest.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),GrassTest.attributes.add("terrain",{type:"entity"}),GrassTest.attributes.add("gridSize",{type:"number"}),GrassTest.attributes.add("density",{type:"number"}),GrassTest.attributes.add("randomSeed",{type:"number"}),GrassTest.attributes.add("distLOD_1",{type:"number"}),GrassTest.attributes.add("distLOD_off",{type:"number"}),GrassTest.attributes.add("minPos",{type:"vec2"}),GrassTest.attributes.add("maxPos",{type:"vec2"}),GrassTest.attributes.add("segmentsX",{type:"number",step:1,min:1,default:8}),GrassTest.attributes.add("segmentsY",{type:"number",step:1,min:1,default:8}),GrassTest.attributes.add("instancesPerSegment",{type:"number",step:1,min:1,default:1e3}),GrassTest.attributes.add("grassColorTexture",{type:"asset",assetType:"texture"}),GrassTest.attributes.add("grassBillboardTexture",{type:"asset",assetType:"texture"}),GrassTest.attributes.add("grassModel0",{type:"asset",assetType:"model"}),GrassTest.attributes.add("grassModel1",{type:"asset",assetType:"model"}),GrassTest.prototype.doRaycast=function(e){var t=new pc.Vec3(e.x,1e3,e.z),s=new pc.Vec3(e.x,-1e3,e.z);return this.app.systems.rigidbody.raycastFiltered(t,s,pc.BODYGROUP_USER_2|pc.BODYGROUP_USER_3,pc.BODYGROUP_USER_2|pc.BODYGROUP_USER_3)},GrassTest.prototype.setQualityLevel=function(e){switch(e){case 0:case 1:case 2:case 3:this.entity.enabled=!1;break;case 4:this.entity.enabled=!0,this.distLOD_1=30,this.distLOD_off=60;break;case 5:case 6:this.entity.enabled=!0,this.distLOD_1=30,this.distLOD_off=60;break;case 7:case 8:this.entity.enabled=!0,this.distLOD_1=50,this.distLOD_off=100;break;case 9:case 10:this.entity.enabled=!0,this.distLOD_1=60,this.distLOD_off=120}this.material&&this.material.setParameter("uDistLOD_off",this.distLOD_off)},GrassTest.prototype.refreshMaterial=function(){this.material||(this.material=this.materialGrass.resource.clone()),this.material.onUpdateShader=function(e){return e.useInstancing=!0,e},this.material.chunks.diffusePS=this.app.assets.find("diffusePS_GrassInstanced").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_GrassInstanced").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,this.material.update();var e=8.108262544156844,t=26.300610290295523,s=new pc.Vec3(0,-23.335987091064453,0);this.material.setParameter("uHeightRamp",this.heightRamp.resource),this.material.setParameter("uPerlinTexture",this.perlinTexture.resource),this.material.setParameter("uRampMinY",e),this.material.setParameter("uRampHeight",t),this.material.setParameter("uTerrainPos",[s.x,s.y,s.z]),this.material.setParameter("uRandomSeed",this.randomSeed),this.material.setParameter("uDistLOD_off",this.distLOD_off),this.material.setParameter("uGrassColorTexture",this.grassColorTexture.resource),this.material1=this.material.clone(),this.material1.onUpdateShader=function(e){return e.useInstancing=!0,e},this.material1.update(),this.material1.setParameter("uRampMinY",e),this.material1.setParameter("uRampHeight",t),this.material1.setParameter("uTerrainPos",[s.x,s.y,s.z]),this.material1.setParameter("uGrassBillboardTexture",this.grassBillboardTexture.resource)},GrassTest.prototype.get3DNoise=function(e){var t=.1263,s=.03127;return Math.cos(e.x*t)*Math.cos(e.z*t)*Math.cos(e.x*s)*Math.cos(e.z*s)},GrassTest.prototype.createInstances=function(e,t){var s=this.patchEntites[e],a=this.aabbs[e],r=new Float32Array(16*t),i=0,n=new pc.Vec3,h=new pc.Quat;h.setFromEulerAngles(-90,0,0);for(var o=pc.Vec3.ONE,m=new pc.Mat4,c=0;c<16;c++)m.data[c]=0;for(var d=a.center,l=a.getMin().x,p=a.getMin().z,u=2*a.halfExtents.x,f=2*a.halfExtents.z,y=1e6,b=-1e6,g=0,T=0;T<t;T++){n.set(l+Math.random()*u,0,p+Math.random()*f);var x=noise(n);if(x>.5){var P=this.doRaycast(n);if(P&&P.entity===this.terrain&&P.normal.y>.7){(n=P.point).y<y&&(y=n.y),n.y>b&&(b=n.y),m.setTRS(n,h,o),m.data[0]=P.normal.x,m.data[1]=P.normal.y,m.data[2]=P.normal.z,m.data[4]=d.x,m.data[5]=d.y,m.data[6]=d.z,m.data[7]=x;for(c=0;c<16;c++)r[i++]=m.data[c];g++}}}var v=new pc.VertexBuffer(this.app.graphicsDevice,pc.VertexFormat.defaultInstancingFormat,g,pc.BUFFER_STATIC,r.slice(0,16*g));return s.model.meshInstances[0].setInstancing(v),a.center.y=.5*(y+b),g},GrassTest.prototype.createAABB=function(e,t){var s=this.doRaycast(e);e.y=s.point.y;var a=new pc.BoundingBox(e,new pc.Vec3(t,0,t));this.aabbs.push(a)},GrassTest.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.meshLOD0=this.grassModel0.resource.meshInstances[0].mesh,this.meshLOD1=this.grassModel1.resource.meshInstances[0].mesh;var e=performance.now();this.app;this.patchEntites=[],this.aabbs=[],this.LODs=[],this.isCreated=[];var t=this.instancesPerSegment,s=this.maxPos.clone().sub(this.minPos);s.x/=this.segmentsX,s.y/=this.segmentsY;for(var a=this.minPos.clone().add(s.clone().scale(.5)),r=0;r<this.segmentsY;r++)for(var i=0;i<this.segmentsX;i++){var n=new pc.Entity;this.entity.addChild(n),n.addComponent("model",{type:"asset"}),n.model.castShadows=!1,n.model.asset=this.entity.model.asset,n.model.meshInstances[0].mesh=this.meshLOD0,n.model.meshInstances[0].material=this.material;var h=new pc.Vec3(a.x+i*this.gridSize,0,a.y+r*this.gridSize);n.setPosition(h),t,this.createAABB(h,.5*this.gridSize),this.patchEntites.push(n),this.LODs.push(-1),this.isCreated.push(!1)}var o=performance.now()-e;if(console.log("GRASS STARTUP - milliseconds: "+o+", total count: 0"),this.introViewCamera=this.app.root.findByName("IntroViewCamera"),this.introViewCamera){this.gameOverCamera=this.app.root.findByName("TopDownViewCamera"),this.gameOverCameraController=this.app.root.findByName("GameOverCameraController").script.gameOverCameraPath;var m=this.app.root.findByName("EnemiesController");this.enemyController=m.script.enemiesController}this.time=0,this.initialized=!0}},GrassTest.prototype.update=function(e){if(this.initialized&&this.app.graphicsDevice.supportsInstancing){var t=this.introViewCamera,s=this.gameOverCamera;if(t){var a=this.enemyController.localPlayerCamera;t.enabled&&(s=this.introViewCamera),a&&!this.gameOverCameraController.moveCamera&&(s=a)}else s=this.app.root.findByName("Camera");if(s){for(var r=s.camera.frustum,i=this.patchEntites.length,n=new pc.BoundingSphere,h=s.getPosition(),o=0;o<i;o++){var m=this.aabbs[o],c=2,d=m.center.distance(h);if(d<this.distLOD_off&&(n.center=m.center,n.radius=m.halfExtents.length(),r.containsSphere(n)&&(c=d<this.distLOD_1?0:1)),c!=this.LODs[o]){var l=this.patchEntites[o];switch(c){case 0:this.isCreated[o]||(this.createInstances(o,this.instancesPerSegment),this.isCreated[o]=!0),l.enabled=!0,l.model.meshInstances[0].mesh=this.meshLOD0,l.model.meshInstances[0].material=this.material;break;case 1:this.isCreated[o]||(this.createInstances(o,this.instancesPerSegment),this.isCreated[o]=!0),l.enabled=!0,l.model.meshInstances[0].mesh=this.meshLOD1,l.model.meshInstances[0].material=this.material1;break;case 2:l.enabled=!1}this.LODs[o]=c}}this.material.setParameter("uCameraPos",[h.x,h.y,h.z])}this.time+=e,this.material.setParameter("uTime",this.time)}};var EffectFlame=pc.createScript("effectFlame");EffectFlame.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectFlame.prototype.firstTimeCreate=function(t){var e=this.app.root.findByName("MeshCreator").script.meshCreator.getCapsuleModel_LO().clone();this.entity.model||this.entity.addComponent("model"),e.meshInstances[0].cull=!1,this.entity.model.model=e,this.entity.model.receiveShadows=!1,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.material=t.clone(),e.meshInstances[0].material=this.material},EffectFlame.prototype.spawn=function(t,e){this.entity.setPosition(t),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0,this.animInfo={createtime:Date.now(),lifetime:2},this.material.setParameter("uPerlinTexture",this.perlinTexture.resource),this.material.setParameter("uTime",0),this.material.setParameter("uRandomSeed",Math.random()),this.material.setParameter("uStartPos",[t.x,t.y,t.z]),this.material.setParameter("uHeadPos",[t.x,t.y,t.z]),this.material.setParameter("uTailPos",[t.x,t.y,t.z]),this.material.setParameter("uStartDir",[e.x,e.y,e.z]),this.material.setParameter("uColor0",[1,.5,0,1]),this.material.setParameter("uColor1",[0,0,0,1])},EffectFlame.prototype.initialize=function(){},EffectFlame.prototype.update=function(t){if(this.animInfo){var e=.001*(Date.now()-this.animInfo.createtime);e>=this.animInfo.lifetime?this.entity.enabled=!1:this.material.setParameter("uTime",e)}};var EffectTrail=pc.createScript("effectTrail");EffectTrail.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectTrail.prototype.firstTimeCreate=function(t,e){var i=e.script.meshCreator.getCapsuleModel_HI().clone();this.entity.model||this.entity.addComponent("model"),i.meshInstances[0].cull=!1,this.entity.model.model=i,this.entity.model.receiveShadows=!0,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.material=t.clone(),i.meshInstances[0].material=this.material},EffectTrail.prototype.spawn=function(t,e){this.entity.setPosition(t),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;e.clone().sub(t).normalize();this.animInfo={createtime:Date.now(),lifetime:.6},this.material.setParameter("uPerlinTexture",this.perlinTexture.resource),this.material.setParameter("uTime",0),this.material.setParameter("uRandomSeed",Math.random()),this.material.setParameter("uPos0",[t.x,t.y,t.z]),this.material.setParameter("uPos1",[e.x,e.y,e.z]),this.material.setParameter("uColor0",[.75,.75,.75,1]),this.material.setParameter("uColor1",[.25,.25,.25,1])},EffectTrail.prototype.initialize=function(){},EffectTrail.prototype.update=function(t){if(this.animInfo){var e=.001*(Date.now()-this.animInfo.createtime);e>=this.animInfo.lifetime?this.entity.enabled=!1:this.material.setParameter("uTime",e)}};var EffectRocketTrail=pc.createScript("effectRocketTrail");EffectRocketTrail.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectRocketTrail.prototype.firstTimeCreate=function(t){var e=this.app.root.findByName("MeshCreator").script.meshCreator.getCapsuleModel_VHI().clone();this.entity.model||this.entity.addComponent("model"),e.meshInstances[0].cull=!1,this.entity.model.model=e,this.entity.model.receiveShadows=!1,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.material=t.clone(),e.meshInstances[0].material=this.material,this.material.useFog=!1},EffectRocketTrail.prototype.spawn=function(t,e,i){this.entity.setPosition(t),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0,this.animInfo={createtime:Date.now(),lifetime:5,pivot:i,pos:t},this.material.setParameter("uPerlinTexture",this.perlinTexture.resource),this.material.setParameter("uTime",0),this.material.setParameter("uRandomSeed",Math.random()),this.material.setParameter("uPos0",[t.x,t.y,t.z]),this.material.setParameter("uDir0",[e.x,e.y,e.z]),this.material.setParameter("uColor0",[.75,.75,.75,1]),this.material.setParameter("uColor1",[.25,.25,.25,1])},EffectRocketTrail.prototype.initialize=function(){},EffectRocketTrail.prototype.update=function(t){if(this.animInfo){var e=.001*(Date.now()-this.animInfo.createtime);e>=this.animInfo.lifetime?this.entity.enabled=!1:(this.material.setParameter("uTime",e),this.animInfo.pivot&&(this.animInfo.pos=this.animInfo.pivot.getPosition(),this.animInfo.pivot.enabled||(this.animInfo.pivot=null)))}};var EffectSmokeRingInstanced=pc.createScript("effectSmokeRingInstanced");EffectSmokeRingInstanced.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectSmokeRingInstanced.prototype.refreshMaterial=function(){var t=this.material;t||(t=new pc.StandardMaterial),t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.diffusePS=this.app.assets.find("diffusePS_SmokeRing").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,t.chunks.emissivePS=this.app.assets.find("emissionPS_Zero").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Grey").resource,t.chunks.transformVS=this.app.assets.find("transformVS_SmokeRingInstanced").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Smoke").resource,t.chunks.instancingVS=this.app.assets.find("instancingVS_2xVec4").resource,t.specularTint=pc.Color.BLACK,t.blendType=pc.BLEND_NORMAL,t.useSkybox=!1,t.depthWrite=!1,t.update(),t.setParameter("uPerlinTexture",this.perlinTexture.resource),t.setParameter("uRandom",Math.random()),t.setParameter("uScale",.25),this.material=t,this.entity.model.meshInstances[0].material=this.material},EffectSmokeRingInstanced.prototype.spawn=function(t,e,s){this.entity.setPosition(t),this.entity.setRotation(e),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;var n=e.transformVector(pc.Vec3.FORWARD),i=(this.oldestInstance+this.activeInstances)%this.maxInstances,a=this.instanceData,c=i*this.floatsPerInstance;a[c++]=t.x,a[c++]=t.y,a[c++]=t.z,a[c++]=this.oldestInstance,a[c++]=n.x,a[c++]=n.y,a[c++]=n.z,a[c++]=.001*(Date.now()-this.baseTime),this.pivotArray[i]=s,this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectSmokeRingInstanced.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectSmokeRingInstanced.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){var t=this.app.root.findByName("MeshCreator").script.meshCreator.getTorusModel().clone();t.meshInstances[0].cull=!1,this.entity.model.model=t,this.entity.model.receiveShadows=!0,this.entity.model.castShadows=!1,this.entity.model.castShadowsLightmap=!1,this.refreshMaterial(),this.floatsPerInstance=8,this.maxInstances=8,this.oldestInstance=0,this.baseTime=Date.now(),this.pivotArray=[null,null,null,null,null,null,null,null],this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var e=0;e<this.maxInstances;e++)this.retireOldest();this.activeInstances=0;var s=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,s,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.isInitialized=!0}},EffectSmokeRingInstanced.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing){var e=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",e),this.activeInstances>0)e-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>.6&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));for(var s=this.instanceData,n=0;n<this.activeInstances;n++){var i=(this.oldestInstance+n)%this.maxInstances,a=i*this.floatsPerInstance;if(e-this.instanceData[a+7]<.2){var c=this.pivotArray[i];if(c){var r=c.getPosition(),h=c.getRotation().transformVector(pc.Vec3.FORWARD);s[a++]=r.x,s[a++]=r.y,s[a++]=r.z,a++,s[a++]=h.x,s[a++]=h.y,s[a++]=h.z,this.uncommitedChanges=!0}}}this.uncommitedChanges&&(this.instanceVertexBuffer.setData(s),this.uncommitedChanges=!1)}};var EffectFlameInstanced=pc.createScript("effectFlameInstanced");EffectFlameInstanced.prototype.refreshMaterial=function(){this.materialFlame?material=this.materialFlame:material=new pc.StandardMaterial,material.specularTint=pc.Color.BLACK,material.chunks.transformVS=this.app.assets.find("transformVS_Flame").resource,material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Ribbon").resource,material.chunks.diffusePS=this.app.assets.find("diffusePS_Ribbon").resource,material.useSkybox=!1,this.materialFlame=material},EffectFlameInstanced.prototype.initialize=function(){this.refreshMaterial()},EffectFlameInstanced.prototype.update=function(e){};var EffectMuzzleFlashInstanced=pc.createScript("effectMuzzleFlashInstanced");EffectMuzzleFlashInstanced.prototype.refreshMaterial=function(){var t=this.app.assets.find("MaterialMuzzleFlash").resource.clone();t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.opacityPS=this.app.assets.find("opacityPS_MuzzleFlashInstanced").resource,t.chunks.transformVS=this.app.assets.find("transformVS_MuzzleFlashInstanced").resource,t.blendType=pc.BLEND_NORMAL,t.update(),this.material=t,this.entity.model.meshInstances[0].material=this.material},EffectMuzzleFlashInstanced.prototype.spawn=function(t,s,e){this.entity.setPosition(t),this.entity.setRotation(s),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;var n=s.transformVector(pc.Vec3.FORWARD),a=(this.oldestInstance+this.activeInstances)%this.maxInstances,i=this.instanceData,c=a*this.floatsPerInstance;i[c++]=t.x,i[c++]=t.y,i[c++]=t.z,i[c++]=this.oldestInstance,i[c++]=n.x,i[c++]=n.y,i[c++]=n.z,i[c++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectMuzzleFlashInstanced.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectMuzzleFlashInstanced.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.floatsPerInstance=8,this.maxInstances=8,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var s=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,s,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.isInitialized=!0}},EffectMuzzleFlashInstanced.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing){var s=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",s),this.activeInstances>0)s-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>.1&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));this.uncommitedChanges&&(this.instanceVertexBuffer.setData(this.instanceData),this.uncommitedChanges=!1)}};var PerformanceController=pc.createScript("performanceController");PerformanceController.attributes.add("light",{type:"entity"}),PerformanceController.attributes.add("grass",{type:"entity"});var currentQualityLevel=5;PerformanceController.prototype.updatePerformanceSettings=function(){console.log("PerformanceController: State = "+this.lastGameState),console.log("PerformanceController: Fps in = "+this.fpsInGame),console.log("PerformanceController: Fps out = "+this.fpsOutGame),MobileController.instance.active?(currentQualityLevel=0,this.grass.script.grassTest.setQualityLevel(currentQualityLevel),this.light.light.shadowUpdateMode=pc.SHADOWUPDATE_NONE,this.light.light.castShadows=!1):this.fpsOutGame>0&&(this.fpsOutGame<45?currentQualityLevel>0&&(currentQualityLevel--,this.grass.script.grassTest.setQualityLevel(currentQualityLevel),this.light.light.shadowUpdateMode=currentQualityLevel>=5?pc.SHADOWUPDATE_REALTIME:pc.SHADOWUPDATE_NONE):this.fpsOutGame>=59&&currentQualityLevel<6&&(currentQualityLevel++,this.grass.script.grassTest.setQualityLevel(currentQualityLevel),this.light.light.shadowUpdateMode=currentQualityLevel>=5?pc.SHADOWUPDATE_REALTIME:pc.SHADOWUPDATE_NONE),this.light.light.shadowUpdateMode==pc.SHADOWUPDATE_NONE?this.light.light.castShadows=!1:this.light.light.castShadows=!0,this.fpsOutGame=0),console.log("PerformanceController: Quality level = "+currentQualityLevel)},PerformanceController.prototype.init=function(){this.device=pc.Application.getApplication().graphicsDevice,MobileController.instance.active?(window.devicePixelRatio>1.5?this.device.maxPixelRatio=1.5:this.device.maxPixelRatio=window.devicePixelRatio,currentQualityLevel=0,this.grass.script.grassTest.setQualityLevel(currentQualityLevel),this.light.light.shadowUpdateMode=pc.SHADOWUPDATE_NONE,this.light.light.castShadows=!1):this.device.maxPixelRatio=window.devicePixelRatio,this.frameCounter=0,this.time=0,this.app.on("localPlayerInitialized",this.updatePerformanceSettings,this),this.app.on("respawnClicked",this.updatePerformanceSettings,this),this.app.on("localPlayerSpawned",this.onLocalPlayerSpawned,this),this.app.on("playerKilled",this.onPlayerKilled,this),this.app.on("connectionLost",this.onConnectionLost,this),this.app.on("leftGame",this.onLeftGame,this),this.currentGameState="Intro",this.lastGameState="",this.fpsInGame=0,this.fpsOutGame=0},PerformanceController.prototype.update=function(t){this.frameCounter++,t>.1&&(t=.1),this.time+=t;if(this.time>=1){if(this.currentGameState!=this.lastGameState)return void(this.lastGameState=this.currentGameState);var e=Math.round(this.frameCounter/this.time);this.time-=1,this.frameCounter=0,"InGame"==this.currentGameState?this.fpsInGame=e:this.fpsOutGame=e}},PerformanceController.prototype.onLocalPlayerSpawned=function(){this.currentGameState="InGame"},PerformanceController.prototype.onPlayerKilled=function(t,e,i,a){a&&(this.currentGameState="GameOver")},PerformanceController.prototype.onConnectionLost=function(){this.currentGameState="GameOver"},PerformanceController.prototype.onLeftGame=function(){this.currentGameState="Intro"};var LenseFlares=pc.createScript("lenseFlares");LenseFlares.attributes.add("materialFlare",{type:"asset",assetType:"material"}),LenseFlares.attributes.add("light",{type:"entity"}),LenseFlares.attributes.add("seed",{type:"number"}),LenseFlares.prototype.refreshMaterial=function(){this.material||(this.material=this.materialFlare.resource.clone()),this.material.onUpdateShader=function(e){return e.useInstancing=!0,e},this.material.chunks.diffusePS=this.app.assets.find("diffusePS_Flare").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_FlareInstanced").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,this.material.chunks.emissivePS=this.app.assets.find("emissionPS_Zero").resource,this.material.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Zero").resource,this.material.specularTint=pc.Color.BLACK,this.material.useSkybox=!1,this.material.depthWrite=!1,this.material.update();var e=this.light.getRotation().transformVector(pc.Vec3.UP);this.material.setParameter("uSunDir",[e.x,e.y,e.z]),this.material.setParameter("uAlpha",1)},LenseFlares.prototype.createInstances=function(){var e=[1,5,9,13,17,21,25,29,33],t=[[1,2,0,0,e[4],1,60,0,1,1,.9,.95],[1,.6,0,0,e[8],1,60,0,1,.2,.4,.05],[1,1,0,0,e[0],40,6,0,1,1,.9,.2],[1,.6,.5,0,e[0],40,6,0,1,1,.9,.6]],s=new Float32Array(240),a=0,i=new alea("hello."+this.seed);new pc.Vec3;(new pc.Quat).setFromEulerAngles(-90,0,0);pc.Vec3.ONE,pc.Vec3.UP,new pc.Vec4(0,0,0,0);for(var r=[1],n=0;n<20;n++)if(n<t.length)for(var c=0;c<12;c++)s[a++]=t[n][c];else{s[a++]=3.5*i()-2,s[a++]=Math.pow(.5*Math.random()+.3,3),s[a++]=0,s[a++]=0;var p=Math.floor(i()*r.length);s[a++]=r[p],s[a++]=1,s[a++]=i()<.5?6:60,s[a++]=1,s[a++]=.25*i()+.75,s[a++]=.25*i()+.75,s[a++]=.25*i()+.75,s[a++]=.25*i()+.25}var h=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR14,components:4,type:pc.TYPE_FLOAT32}]),o=new pc.VertexBuffer(this.app.graphicsDevice,h,20,pc.BUFFER_STATIC,s);this.entity.model.meshInstances[0].setInstancing(o)},LenseFlares.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){var e=navigator.userAgent.toLowerCase();e.indexOf("safari/")>=0&&e.indexOf("chrome")<0||(this.refreshMaterial(),this.createInstances(),this.entity.model.meshInstances[0].material=this.material,this.on("attr:seed",(function(e,t){this.refreshMaterial(),this.createInstances(),this.entity.model.meshInstances[0].material=this.material})),this.isInitialized=!0)}},LenseFlares.prototype.postUpdate=function(e){this.isInitialized&&this.app.graphicsDevice.supportsInstancing};var DamageDoneLabelPositionHandler=pc.createScript("damageDoneLabelPositionHandler");DamageDoneLabelPositionHandler.prototype.init=function(){this.isInitialized||(this.isInitialized=!0,this.peakPosition=null,this.hasReachedPeakPosition=!1,this.finalPosition=null,this.hasReachedFinalPosition=!1,this.element=this.entity.element,this.randomValue=0,this.xOffset=new pc.Vec3,this.isShowing=!1,this.flashCompleted=!1,this.flashDuration=.05,this.flashCurrentTime=0,this.flashAnimationSpeed=30,this.flashColorProgress=0,this.completedFlashPhase1=!1,this.initialColor=Damage_Done_Label_Color,this.flashColor=new pc.Color,this.initialOutlineColor=Damage_Done_Label_Outline_Color,this.flashOutlineColor=new pc.Color)},DamageDoneLabelPositionHandler.prototype.show=function(i,t,e,o){this.init(),this.hasReachedPeakPosition=!1,this.randomValue=Math.random();var s=this.randomValue/10,l=this.randomValue/4*(Math.random()>.5?1:-1);this.direction=l>0?2:-2,this.xOffset.set(l,s,0);var h=i.add(this.xOffset);this.entity.setLocalPosition(h),this.entity.setRotation(t),this.peakPosition=h.y+this.randomValue+e/50,this.finalPosition=h.y-.8,this.movementSpeed=4,this.fadeSpeed=1.7,this.entity.enabled=!0,this.element.fontSize=this.getFontSizeForDistance(e),this.element.opacity=1,this.element.outlineThickness=.8,this.element.text="-"+o,this.isShowing=!0},DamageDoneLabelPositionHandler.prototype.isEnabled=function(){return this.entity.enabled},DamageDoneLabelPositionHandler.prototype.update=function(i){if(this.isShowing)if(this.flashCompleted||((this.flashColor.r<pc.Color.WHITE.r||this.flashColor.g<pc.Color.WHITE.g||this.flashColor.b<pc.Color.WHITE.b)&&!this.completedFlashPhase1?(this.flashColor.lerp(this.initialColor,pc.Color.WHITE,this.flashColorProgress),this.flashOutlineColor.lerp(this.initialOutlineColor,pc.Color.WHITE,this.flashColorProgress),this.flashColorProgress+=i*this.flashAnimationSpeed,this.element.color=this.flashColor):this.flashColor.r>this.initialColor.r||this.flashColor.g>this.initialColor.g||this.flashColor.b>this.initialColor.b?this.completedFlashPhase1?(this.flashColor.lerp(this.initialColor,pc.Color.WHITE,this.flashColorProgress),this.flashOutlineColor.lerp(this.initialOutlineColor,pc.Color.WHITE,this.flashColorProgress),this.flashColorProgress-=i*this.flashAnimationSpeed,this.element.color=this.flashColor):(this.completedFlashPhase1=!0,this.element.color=pc.Color.WHITE,this.element.outlineColor=pc.Color.WHITE):(this.flashCompleted=!0,this.flashCurrentTime=0,this.flashColorProgress=0,this.element.color=this.initialColor,this.element.outlineColor=this.initialOutlineColor)),this.hasReachedPeakPosition){this.entity.translateLocal(i*(this.direction-this.randomValue),-i*this.movementSpeed,0);var t=i*this.fadeSpeed;this.element.opacity>t?this.element.opacity-=t:this.element.opacity=0,this.element.outlineThickness>t?this.element.outlineThickness-=t:this.element.outlineThickness=0,this.entity.getLocalPosition().y<=this.finalPosition&&(this.isShowing=!1,this.flashCompleted=!1,this.completedFlashPhase1=!1,this.entity.enabled=!1)}else this.entity.translateLocal(i*(this.direction*this.randomValue),i*this.movementSpeed,0),this.entity.getLocalPosition().y>=this.peakPosition&&(this.hasReachedPeakPosition=!0)},DamageDoneLabelPositionHandler.prototype.getFontSizeForDistance=function(i){return i<10?45:i<20?50:i<30?70:i<50?100:120};var EffectDecal=pc.createScript("effectDecal");EffectDecal.attributes.add("terrainRamp",{type:"asset",assetType:"texture"}),EffectDecal.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectDecal.attributes.add("decalAtlas",{type:"asset",assetType:"texture"}),EffectDecal.prototype.refreshMaterial=function(){var t=new pc.StandardMaterial;t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.transformVS=this.app.assets.find("transformVS_DecalInstanced").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Zero").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Decal").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,t.blendType=pc.BLEND_NORMAL,t.update(),t.depthWrite=!1,t.cull=pc.CULLFACE_NONE,this.material=t,t.setParameter("uTerrainRamp",this.terrainRamp.resource),t.setParameter("uPerlinTexture",this.perlinTexture.resource),t.setParameter("uDecalAtlas",this.decalAtlas.resource);var e=new pc.Vec3(0,-23.335987091064453,0);this.material.setParameter("uRampMinY",8.108262544156844),this.material.setParameter("uRampHeight",26.300610290295523),this.material.setParameter("uTerrainPos",[e.x,e.y,e.z]),this.entity.model.meshInstances[0].material=this.material},EffectDecal.prototype.spawn=function(t,e,s){this.entity.setPosition(e),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;var a=(this.oldestInstance+this.activeInstances)%this.maxInstances,n=this.instanceData,i=a*this.floatsPerInstance;n[i++]=e.x,n[i++]=e.y,n[i++]=e.z,n[i++]=this.decalInfo[t][0],n[i++]=s.x,n[i++]=s.y,n[i++]=s.z,n[i++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectDecal.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectDecal.prototype.initialize=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.decalInfo=[[2,1,0,1,.75,2,.05],[3,1,0,1,.5,.25,.2],[0,0,0,1,.5,.25,.1],[0,0,0,0,.5,.5,.1],[0,0,0,0,1,1,.1],[1,0,1,0,1,1,.1],[0,0,0,0,.5,.25,.1],[0,0,0,0,1,1,.1],[0,0,0,0,1,1,.1],[2,1,1,0,1,1,.1]],this.floatsPerInstance=8,this.maxInstances=256,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var e=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,e,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1}},EffectDecal.prototype.update=function(t){if(this.app.graphicsDevice.supportsInstancing){var e=.001*(Date.now()-this.baseTime);this.material.setParameter("uTime",e),this.uncommitedChanges&&(this.instanceVertexBuffer.setData(this.instanceData),this.uncommitedChanges=!1)}};pc.extend(pc,function(){var PeepHoleEffect=function(e){this.shader=new pc.Shader(e,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+e.precision+" float;","uniform sampler2D uColorBuffer;","uniform vec4 uScreenSize;","uniform vec2 uScreenPos;","uniform float uRadius;","varying vec2 vUv0;","void main() {","gl_FragColor = texture2D( uColorBuffer, vUv0 );","float aspect_ratio = uScreenSize.x / uScreenSize.y;","vUv0 -= vec2(0.5, 0.5);","vUv0.y *= aspect_ratio;","float r = length(Uv0);","float a = smoothstep(uRadius - 0.01, uRadius + 0.01, r);","gl_FragColor.rgb *= a;","}"].join("\n")}),this.screenpos=0,this.radius=0};return(PeepHoleEffect=pc.inherits(PeepHoleEffect,pc.PostEffect)).prototype=pc.extend(PeepHoleEffect.prototype,{render:function(e,t,i){var o=this.device,s=o.scope;s.resolve("uScreenPos").setValue([this.screenpos.x,this.screenpos.y]),s.resolve("uRadius").setValue(this.radius),s.resolve("uColorBuffer").setValue(e.colorBuffer),pc.drawFullscreenQuad(o,t,this.vertexBuffer,this.shader,i)}}),{PeepHoleEffect:PeepHoleEffect}}());var PeepHole=pc.createScript("peepHole");PeepHole.attributes.add("screenpos",{type:"vec2",default:[0,0],title:"Screen Pos"}),PeepHole.attributes.add("radius",{type:"number",default:0,min:0,max:1,precision:5,title:"Radius"}),PeepHole.prototype.setShader=function(){var e=this.app.assets.find("postEffectPS_PeepHole").resource;this.effect.shader=new pc.Shader(this.app.graphicsDevice,{attributes:{aPosition:pc.SEMANTIC_POSITION},vshader:["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition.xy + 1.0) * 0.5;","}"].join("\n"),fshader:["precision "+this.app.graphicsDevice.precision+" float;",e].join("\n")})},PeepHole.prototype.initialize=function(){this.effect=new pc.PeepHoleEffect(this.app.graphicsDevice),this.effect.screenpos=this.screenpos,this.effect.radius=0,this.setShader(),this.on("attr",(function(e,t,i){this.effect[e]=t}));var e=this.entity.camera.postEffects;e.addEffect(this.effect),this.on("state",(function(t){t?e.addEffect(this.effect):e.removeEffect(this.effect)})),this.on("destroy",(function(){e.removeEffect(this.effect)}))},PeepHole.prototype.update=function(e){};var EffectImpactSpray=pc.createScript("effectImpactSpray");EffectImpactSpray.attributes.add("terrainRamp",{type:"asset",assetType:"texture"}),EffectImpactSpray.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectImpactSpray.attributes.add("sprayAtlas",{type:"asset",assetType:"texture"}),EffectImpactSpray.prototype.refreshMaterial=function(){var t=new pc.StandardMaterial;t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.transformVS=this.app.assets.find("transformVS_ImpactSprayInstanced").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Zero").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_ImpactSpray").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,t.blendType=pc.BLEND_NORMAL,t.update(),t.depthWrite=!1,t.cull=pc.CULLFACE_NONE,this.material=t,t.setParameter("uTerrainRamp",this.terrainRamp.resource),t.setParameter("uPerlinTexture",this.perlinTexture.resource),t.setParameter("uSprayAtlas",this.sprayAtlas.resource);var e=new pc.Vec3(0,-23.335987091064453,0);this.material.setParameter("uRampMinY",8.108262544156844),this.material.setParameter("uRampHeight",26.300610290295523),this.material.setParameter("uTerrainPos",[e.x,e.y,e.z]),this.entity.model.meshInstances[0].material=this.material},EffectImpactSpray.prototype.spawn=function(t,e,s){this.entity.setPosition(e),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0,t==ObjectMaterials.material_dirt&&e.y>-11&&(t=0);var a=(this.oldestInstance+this.activeInstances)%this.maxInstances,i=this.instanceData,n=a*this.floatsPerInstance;i[n++]=e.x,i[n++]=e.y,i[n++]=e.z,i[n++]=this.sprayInfo[t][0],i[n++]=s.x,i[n++]=s.y,i[n++]=s.z,i[n++]=.001*(Date.now()-this.baseTime),i[n++]=this.sprayInfo[t][0],i[n++]=this.sprayInfo[t][1],i[n++]=this.sprayInfo[t][2],i[n++]=this.sprayInfo[t][3],i[n++]=Math.random(),i[n++]=this.sprayInfo[t][4],i[n++]=this.sprayInfo[t][5],i[n++]=this.sprayInfo[t][6],this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectImpactSpray.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectImpactSpray.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){var t=this.app.root.findByName("MeshCreator").script.meshCreator.getMultiQuadModel().clone();this.entity.model.model=t,this.refreshMaterial(),this.sprayInfo=[[2,1,0,1,.75,2,.1],[3,1,0,1,.35,.25,.2],[3,0,0,1,.15,.25,.1],[0,0,0,0,.5,.15,.1],[0,0,0,0,1,1,.1],[1,0,1,0,1,1,.1],[0,0,0,0,.5,.15,.1],[0,0,0,0,1,1,.1],[0,0,0,0,1,1,.1],[2,1,1,0,1,1,.1]],this.floatsPerInstance=16,this.maxInstances=8,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var e=0;e<this.maxInstances;e++)this.retireOldest();this.activeInstances=0;var s=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR14,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR15,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,s,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.isInitialized=!0}},EffectImpactSpray.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing){var e=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",e),this.activeInstances>0)e-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>1&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));this.uncommitedChanges&&(this.instanceVertexBuffer.setData(this.instanceData),this.uncommitedChanges=!1)}};var LoadAssetManager=pc.createScript("loadAssetManager");LoadAssetManager.attributes.add("bundles",{type:"asset",assetType:"bundle",array:!0,title:"Bundles"}),LoadAssetManager.attributes.add("environmentRootEntity",{type:"entity",title:"Environment Root Entity"}),LoadAssetManager.prototype.init=function(e,s,t,i,o,l,n,a){var d=this;this.scriptReference=this.entity.script.loadAssetManager,this.propsController=e,this.grassTest=s,this.specksTest=t,this.gameController=i,this.effectController=n,this.initialAssetsToLoad=0,this.initialAssetsLoaded=0,this.areInitialModelsLoaded=!1,this.initialAssetLoadingComplete=!1,this.totalAssetsToLoad=0,this.totalAssetsLoaded=0,this.areAllModelsLoaded=!1,this.app.once("postrender",this.onGameLoaded,this),this.modelsBundleAsset=this.bundles[0],this.musicBundleAsset=this.bundles[1],this.texturesBundleAsset=this.bundles[2],this.ingameAnimationsBundleAsset=this.bundles[3],this.musicBundleLoaded=!1,this.texturesBundleLoaded=!1,this.modelsBundleLoaded=!1,this.animationsBundleLoaded=!1,this.musicBundleAsset.ready((function(e){this.musicBundleLoaded=!0}),this),this.texturesBundleAsset.ready((function(e){this.texturesBundleLoaded=!0}),this),this.modelFileNamesToLoad=[],this.modelFileAssetsToLoad={},this.modelFileAssetsLoaded=[],this.introCharacterScripts=[],this.firstPersonAnimationFileAssetsToLoad={},this.firstPersonAnimationFileAssetsLoaded=[],this.firstPersonAnimationFileNamesToLoad=["Bull_1st_Idle_Rifle.glb","Bull_1st_Idle_RocketLauncher.glb","Bull_1st_Idle_TommyGun.glb","Bull_1st_Idle_TwoGuns.glb","Bull_1st_Jump_Rifle.glb","Bull_1st_Jump_RocketLauncher.glb","Bull_1st_Jump_TommyGun.glb","Bull_1st_Jump_TwoGuns.glb","Bull_1st_Run_Rifle.glb","Bull_1st_Run_RocketLauncher.glb","Bull_1st_Run_TommyGun.glb","Bull_1st_Run_TwoGuns.glb","Bull_1st_Shoot_Rifle.glb","Bull_1st_Shoot_RocketLauncher.glb","Bull_1st_ShootL_TwoGuns.glb","Bull_1st_ShootR_TwoGuns.glb","Bull_1st_ShootRata_TommyGun.glb","Bull_1st_ShootRata_TwoGuns.glb","Chicken_1st_Idle_Rifle.glb","Chicken_1st_Idle_RocketLauncher.glb","Chicken_1st_Idle_TommyGun.glb","Chicken_1st_Idle_TwoGuns.glb","Chicken_1st_Jump_Rifle.glb","Chicken_1st_Jump_RocketLauncher.glb","Chicken_1st_Jump_TommyGun.glb","Chicken_1st_Jump_TwoGuns.glb","Chicken_1st_Run_Rifle.glb","Chicken_1st_Run_RocketLauncher.glb","Chicken_1st_Run_TommyGun.glb","Chicken_1st_Run_TwoGuns.glb","Chicken_1st_Shoot_Rifle.glb","Chicken_1st_Shoot_RocketLauncher.glb","Chicken_1st_ShootL_TwoGuns.glb","Chicken_1st_ShootR_TwoGuns.glb","Chicken_1st_ShootRata_TommyGun.glb","Chicken_1st_ShootRata_TwoGuns.glb","Fox_1st_Idle_Rifle.glb","Fox_1st_Idle_RocketLauncher.glb","Fox_1st_Idle_TommyGun.glb","Fox_1st_Idle_TwoGuns.glb","Fox_1st_Jump_Rifle.glb","Fox_1st_Jump_RocketLauncher.glb","Fox_1st_Jump_TommyGun.glb","Fox_1st_Jump_TwoGuns.glb","Fox_1st_Run_Rifle.glb","Fox_1st_Run_RocketLauncher.glb","Fox_1st_Run_TommyGun.glb","Fox_1st_Run_TwoGuns.glb","Fox_1st_Shoot_Rifle.glb","Fox_1st_Shoot_RocketLauncher.glb","Fox_1st_ShootL_TwoGuns.glb","Fox_1st_ShootR_TwoGuns.glb","Fox_1st_ShootRata_TommyGun.glb","Fox_1st_ShootRata_TwoGuns.glb"],this.thirdPersonAnimationFileAssetsToLoad={},this.thirdPersonAnimationFileAssetsLoaded=[],this.thirdPersonAnimationFileNamesToLoad=["Bull_3rd_Die1.glb","Bull_3rd_Die2.glb","Bull_3rd_Flying_Rifle.glb","Bull_3rd_Flying_TommyGun.glb","Bull_3rd_Flying_TwoGuns.glb","Bull_3rd_Idle_Rifle.glb","Bull_3rd_Idle_RocketLauncher.glb","Bull_3rd_Idle_TommyGun.glb","Bull_3rd_Idle_TwoGuns.glb","Bull_3rd_IdleBlink_Rifle.glb","Bull_3rd_IdleBlink_RocketLauncher.glb","Bull_3rd_IdleBlink_TommyGun.glb","Bull_3rd_IdleBlink_TwoGuns.glb","Bull_3rd_Jump_IP_Rifle.glb","Bull_3rd_Jump_IP_RocketLauncher.glb","Bull_3rd_Jump_IP_TommyGun.glb","Bull_3rd_Jump_IP_TwoGuns.glb","Bull_3rd_RocketJump_RocketLauncher.glb","Bull_3rd_Run_Rifle.glb","Bull_3rd_Run_RocketLauncher.glb","Bull_3rd_Run_TommyGun.glb","Bull_3rd_Run_TwoGuns.glb","Bull_3rd_RunBack_Rifle.glb","Bull_3rd_RunBack_RocketLauncher.glb","Bull_3rd_RunBack_TommyGun.glb","Bull_3rd_RunBack_TwoGuns.glb","Bull_3rd_RunJump_Rifle.glb","Bull_3rd_RunJump_RocketLauncher.glb","Bull_3rd_RunJump_TommyGun.glb","Bull_3rd_RunJump_TwoGuns.glb","Bull_3rd_Shoot_Rifle.glb","Bull_3rd_Shoot_RocketLauncher.glb","Bull_3rd_Shoot_TommyGun.glb","Bull_3rd_ShootL_TwoGuns.glb","Bull_3rd_ShootR_TwoGuns.glb","Bull_3rd_StrafeL_Rifle.glb","Bull_3rd_StrafeL_RocketLauncher.glb","Bull_3rd_StrafeL_TommyGun.glb","Bull_3rd_StrafeL_TwoGuns.glb","Bull_3rd_StrafeR_Rifle.glb","Bull_3rd_StrafeR_RocketLauncher.glb","Bull_3rd_StrafeR_TommyGun.glb","Bull_3rd_StrafeR_TwoGuns.glb","Chicken_3rd_Flying_Rifle.glb","Chicken_3rd_Flying_TommyGun.glb","Chicken_3rd_Flying_TwoGuns.glb","Chicken_3rd_Idle_Rifle.glb","Chicken_3rd_Idle_RocketLauncher.glb","Chicken_3rd_Idle_TommyGun.glb","Chicken_3rd_Idle_TwoGuns.glb","Chicken_3rd_IdleBlink_Rifle.glb","Chicken_3rd_IdleBlink_RocketLauncher.glb","Chicken_3rd_IdleBlink_TommyGun.glb","Chicken_3rd_IdleBlink_TwoGuns.glb","Chicken_3rd_Jump_IP_Rifle.glb","Chicken_3rd_Jump_IP_RocketLauncher.glb","Chicken_3rd_Jump_IP_TommyGun.glb","Chicken_3rd_Jump_IP_TwoGuns.glb","Chicken_3rd_Die1.glb","Chicken_3rd_Die2.glb","Chicken_3rd_RocketJump_RocketLauncher.glb","Chicken_3rd_Run_Rifle.glb","Chicken_3rd_Run_RocketLauncher.glb","Chicken_3rd_Run_TommyGun.glb","Chicken_3rd_Run_TwoGuns.glb","Chicken_3rd_RunBack_Rifle.glb","Chicken_3rd_RunBack_RocketLauncher.glb","Chicken_3rd_RunBack_TommyGun.glb","Chicken_3rd_RunBack_TwoGuns.glb","Chicken_3rd_RunJump_Rifle.glb","Chicken_3rd_RunJump_RocketLauncher.glb","Chicken_3rd_RunJump_TommyGun.glb","Chicken_3rd_RunJump_TwoGuns.glb","Chicken_3rd_Shoot_Rifle.glb","Chicken_3rd_Shoot_RocketLauncher.glb","Chicken_3rd_Shoot_TommyGun.glb","Chicken_3rd_ShootL_TwoGuns.glb","Chicken_3rd_ShootR_TwoGuns.glb","Chicken_3rd_StrafeL_Rifle.glb","Chicken_3rd_StrafeL_RocketLauncher.glb","Chicken_3rd_StrafeL_TommyGun.glb","Chicken_3rd_StrafeL_TwoGuns.glb","Chicken_3rd_StrafeR_Rifle.glb","Chicken_3rd_StrafeR_RocketLauncher.glb","Chicken_3rd_StrafeR_TommyGun.glb","Chicken_3rd_StrafeR_TwoGuns.glb","Fox_3rd_Flying_Rifle.glb","Fox_3rd_Flying_TommyGun.glb","Fox_3rd_Flying_TwoGuns.glb","Fox_3rd_Idle_Rifle.glb","Fox_3rd_Idle_RocketLauncher.glb","Fox_3rd_Idle_TommyGun.glb","Fox_3rd_Idle_TwoGuns.glb","Fox_3rd_IdleBlink_Rifle.glb","Fox_3rd_IdleBlink_RocketLauncher.glb","Fox_3rd_IdleBlink_TommyGun.glb","Fox_3rd_IdleBlink_TwoGuns.glb","Fox_3rd_Jump_IP_Rifle.glb","Fox_3rd_Jump_IP_RocketLauncher.glb","Fox_3rd_Jump_IP_TommyGun.glb","Fox_3rd_Jump_IP_TwoGuns.glb","Fox_3rd_Die1.glb","Fox_3rd_Die2.glb","Fox_3rd_RocketJump_RocketLauncher.glb","Fox_3rd_Run_Rifle.glb","Fox_3rd_Run_RocketLauncher.glb","Fox_3rd_Run_TommyGun.glb","Fox_3rd_Run_TwoGuns.glb","Fox_3rd_RunBack_Rifle.glb","Fox_3rd_RunBack_RocketLauncher.glb","Fox_3rd_RunBack_TommyGun.glb","Fox_3rd_RunBack_TwoGuns.glb","Fox_3rd_RunJump_Rifle.glb","Fox_3rd_RunJump_RocketLauncher.glb","Fox_3rd_RunJump_TommyGun.glb","Fox_3rd_RunJump_TwoGuns.glb","Fox_3rd_Shoot_Rifle.glb","Fox_3rd_Shoot_RocketLauncher.glb","Fox_3rd_Shoot_TommyGun.glb","Fox_3rd_ShootL_TwoGuns.glb","Fox_3rd_ShootR_TwoGuns.glb","Fox_3rd_StrafeL_Rifle.glb","Fox_3rd_StrafeL_RocketLauncher.glb","Fox_3rd_StrafeL_TommyGun.glb","Fox_3rd_StrafeL_TwoGuns.glb","Fox_3rd_StrafeR_Rifle.glb","Fox_3rd_StrafeR_RocketLauncher.glb","Fox_3rd_StrafeR_TommyGun.glb","Fox_3rd_StrafeR_TwoGuns.glb"],this.ingameCharacterModelFileAssetsToLoad={},this.ingameCharacterModelFileAssetsLoaded=[],this.ingameCharacterModelFileNamesToLoad=["Ape_Model.glb","Bull_Model.glb","Chicken_Model.glb","Fox_Model.glb","Lion_Model.glb","Rhino_Model.glb","Toucan_Model.glb","Dog_Model.glb"],this.placerScripts=[],this.shaderChangers=this.app.root.findByTag("shaderChanger");var _=this.app.root.findByTag("loadUiTexture");this.uiTextureFileNamesToLoad=[],this.uiTextureFileAssetsToLoad={},this.uiTextureFileAssetsLoaded=[],_.forEach((function(e){e.script.assetAssigner.uiTexturesToLoad.forEach((function(e){if(""!==e&&!d.uiTextureFileNamesToLoad.includes(e)){d.uiTextureFileNamesToLoad.push(e);var s=d.app.assets.find(e);s.ready((function(s){d.uiTextureFileAssetsLoaded.includes(e)||(d.initialAssetsLoaded++,d.totalAssetsLoaded++,d.uiTextureFileAssetsLoaded.push(e))}),this),d.uiTextureFileAssetsToLoad[e]=s}})),e.script.assetAssigner.init(d.scriptReference)}));var r=this.app.root.findByTag("loadUiSprite");this.uiSpriteFileNamesToLoad=[],this.uiSpriteFileAssetsToLoad={},this.uiSpriteFileAssetsLoaded=[],r.forEach((function(e){e.script.assetAssigner.uiSpritesToLoad.forEach((function(e){if(""!==e&&!d.uiSpriteFileNamesToLoad.includes(e)){d.uiSpriteFileNamesToLoad.push(e);var s=d.app.assets.find(e);s.ready((function(s){d.uiSpriteFileAssetsLoaded.includes(e)||(d.initialAssetsLoaded++,d.totalAssetsLoaded++,d.uiSpriteFileAssetsLoaded.push(e))}),this),d.uiSpriteFileAssetsToLoad[e]=s}})),e.script.assetAssigner.init(d.scriptReference)}));var h=this.app.root.findByTag("loadFont");this.fontFileNamesToLoad=[],this.fontFileAssetsToLoad={},this.fontFileAssetsLoaded=[],h.forEach((function(e){var s=e.script.assetAssigner.fontToLoad;if(""!==s&&!d.fontFileNamesToLoad.includes(s)){d.fontFileNamesToLoad.push(s);var t=d.app.assets.find(s);t.ready((function(e){d.fontFileAssetsLoaded.includes(s)||(d.initialAssetsLoaded++,d.totalAssetsLoaded++,d.fontFileAssetsLoaded.push(s))}),this),d.fontFileAssetsToLoad[s]=t}e.script.assetAssigner.init(d.scriptReference)})),this.ingameTextureFileAssetsToLoad={},this.ingameTextureFileAssetsLoaded=[],this.ingameTextureFileNamesToLoad=["CH_Ape.png","CH_Bull.png","CH_Bull_2.png","CH_Bull_3.png","CH_Bull_4.png","CH_Bull_5.png","CH_Bull_6.png","CH_Chicken.png","CH_Chicken_2.png","CH_Chicken_3.png","CH_Chicken_4.png","CH_Chicken_5.png","CH_Chicken_6.png","CH_Fox.png","CH_Fox_2.png","CH_Fox_3.png","CH_Fox_4.png","CH_Fox_5.png","CH_Fox_6.png","CH_Lion.png","CH_Rhino.png","CH_Toucan.png","CH_Dog.png","CH_Eye.png","noise.png","PerlinNoise.png","GrassColor.png","perlin.png","ImpactSpray.png","circle.png","FlareRamp.png","GrassBillboard.png","beam_ramp.png","cloud_ramp.png","shotgunCrosshair.png"],this.ingameTextureFileNamesToLoad.forEach((function(e){var s=d.app.assets.find(e);s.ready((function(s){d.ingameTextureFileAssetsLoaded.includes(e)||(d.initialAssetsLoaded++,d.totalAssetsLoaded++,d.ingameTextureFileAssetsLoaded.push(e))}),this),d.ingameTextureFileAssetsToLoad[e]=s}));var u=this.app.root.findByTag("loadModel");this.modelsBundleAsset.ready((function(e){for(var s=0;s<u.length;s++){var t=u[s],i=t.script.assetAssigner.modelToLoad;if(""!==i&&!this.modelFileNamesToLoad.includes(i)){this.modelFileNamesToLoad.push(i);var n=this.app.assets.find(i);n.ready((function(e){this.modelFileAssetsLoaded.includes(i)||(this.initialAssetsLoaded++,this.totalAssetsLoaded++,this.modelFileAssetsLoaded.push(i))}),this),this.modelFileAssetsToLoad[i]=n}var _=t.script.assetAssigner.collisionModelToLoad;if(""!==_&&!this.modelFileNamesToLoad.includes(_)){this.modelFileNamesToLoad.push(i);var r=this.app.assets.find(_);r.ready((function(e){this.modelFileAssetsLoaded.includes(_)||(this.initialAssetsLoaded++,this.totalAssetsLoaded++,this.modelFileAssetsLoaded.push(_))}),this),this.modelFileAssetsToLoad[_]=r}var h=t.script.assetAssigner.animationsToLoad;h.length>0&&h.forEach((function(e){if(!d.modelFileNamesToLoad.includes(e)){d.modelFileNamesToLoad.push(e);var s=d.app.assets.find(e);s.ready((function(s){d.modelFileAssetsLoaded.includes(e)||(d.initialAssetsLoaded++,d.totalAssetsLoaded++,d.modelFileAssetsLoaded.push(e))}),this),d.modelFileAssetsToLoad[e]=s}}));var c=t.script.assetAssigner.particleModelToLoad;if(""!==c&&!this.modelFileNamesToLoad.includes(c)){this.modelFileNamesToLoad.push(c);var g=this.app.assets.find(c);g.ready((function(e){this.modelFileAssetsLoaded.includes(c)||(this.initialAssetsLoaded++,this.totalAssetsLoaded++,this.modelFileAssetsLoaded.push(c))}),this),this.modelFileAssetsToLoad[c]=g}if(t.tags.has("lodModel")){var m=t.script.lod.lod1AssetName;if(""!==m&&!this.modelFileNamesToLoad.includes(m)){this.modelFileNamesToLoad.push(m);var p=this.app.assets.find(m);p.ready((function(e){this.modelFileAssetsLoaded.includes(m)||(this.initialAssetsLoaded++,this.totalAssetsLoaded++,this.modelFileAssetsLoaded.push(m))}),this),this.modelFileAssetsToLoad[m]=p,t.script.lod.init(this.scriptReference,this.propsController,this.gameController)}}t.script.assetAssigner.init(this.scriptReference)}for(var L=l.children,T=0;T<L.length;T++){var f=L[T];if(f.script)if(f.script.weaponPickupPoint.weaponIndex){var b=f.script.weaponPickupPoint.getWeaponModelAssetName();if(""!==b&&!this.modelFileNamesToLoad.includes(b)){this.modelFileNamesToLoad.push(b);var F=this.app.assets.find(b);this.modelFileAssetsToLoad[b]=F}var A=f.script.weaponPickupPoint.getCylinderModelAssetName();if(""!==A&&!this.modelFileNamesToLoad.includes(A)){this.modelFileNamesToLoad.push(A);var R=this.app.assets.find(A);this.modelFileAssetsToLoad[A]=R}f.script.weaponPickupPoint.init(this.scriptReference)}}o.forEach((function(e){for(var s=e.children,t=0;t<s.length;t++){var i=s[t];if(i.script){var o=i.script.propPlacer2;o.count&&d.placerScripts.push(o)}}})),a.forEach((function(e){for(var s=e.children,t=0;t<s.length;t++){var i=s[t];if(i.script){var o=i.script.introCharacterManager;o&&d.introCharacterScripts.push(o)}}})),this.ingameCharacterModelFileNamesToLoad.forEach((function(e){var s=d.app.assets.find(e);s.ready((function(s){d.ingameCharacterModelFileAssetsLoaded.includes(e)||(d.totalAssetsLoaded++,d.ingameCharacterModelFileAssetsLoaded.push(e))}),this),d.ingameCharacterModelFileAssetsToLoad[e]=s})),this.cubemapAsset=this.app.assets.find("Tyrkis2","cubemap"),this.cubemapAsset.loadFaces=!0,this.skyboxLoaded=!1,this.cubemapAsset.ready((function(e){this.app.setSkybox(e),this.skyboxLoaded=!0,this.initialAssetsLoaded++,this.totalAssetsLoaded++,setTimeout(function(){this.loadInitialAssets()}.bind(this),100)}),this),this.app.assets.load(this.cubemapAsset),this.initialAssetsToLoad=this.modelFileNamesToLoad.length+this.uiTextureFileNamesToLoad.length+this.uiSpriteFileNamesToLoad.length+this.fontFileNamesToLoad.length+this.ingameTextureFileNamesToLoad.length,this.modelsBundleLoaded=!0}),this),this.ingameAnimationsBundleAsset.ready((function(e){this.firstPersonAnimationFileNamesToLoad.forEach((function(e){var s=d.app.assets.find(e);s.ready((function(s){d.firstPersonAnimationFileAssetsLoaded.includes(e)||(d.totalAssetsLoaded++,d.firstPersonAnimationFileAssetsLoaded.push(e))}),this),d.firstPersonAnimationFileAssetsToLoad[e]=s}));for(const e in this.firstPersonAnimationFileAssetsToLoad)this.app.assets.load(this.firstPersonAnimationFileAssetsToLoad[e]);this.thirdPersonAnimationFileNamesToLoad.forEach((function(e){var s=d.app.assets.find(e);s.ready((function(s){d.thirdPersonAnimationFileAssetsLoaded.includes(e)||(d.totalAssetsLoaded++,d.thirdPersonAnimationFileAssetsLoaded.push(e))}),this),d.thirdPersonAnimationFileAssetsToLoad[e]=s}));for(const e in this.thirdPersonAnimationFileAssetsToLoad)this.app.assets.load(this.thirdPersonAnimationFileAssetsToLoad[e]);this.totalAssetsToLoad=this.initialAssetsToLoad+this.ingameCharacterModelFileNamesToLoad.length+this.firstPersonAnimationFileNamesToLoad.length+this.thirdPersonAnimationFileNamesToLoad.length,this.animationsBundleLoaded=!0}),this),this.app.keyboard.on(pc.EVENT_KEYDOWN,this.onKeyDown,this)},LoadAssetManager.prototype.isInitialAssetLoadingComplete=function(){return this.initialAssetLoadingComplete},LoadAssetManager.prototype.onGameLoaded=function(){},LoadAssetManager.prototype.areInitiallyRequiredAssetsLoaded=function(){return this.modelsBundleLoaded&&this.skyboxLoaded&&this.musicBundleLoaded&&this.texturesBundleLoaded&&this.modelFileAssetsLoaded.length>0&&this.modelFileAssetsLoaded.length>=this.modelFileNamesToLoad.length&&this.uiTextureFileAssetsLoaded.length>0&&this.uiTextureFileAssetsLoaded.length>=this.uiTextureFileNamesToLoad.length&&this.uiSpriteFileAssetsLoaded.length>0&&this.uiSpriteFileAssetsLoaded.length>=this.uiSpriteFileNamesToLoad.length&&this.fontFileAssetsLoaded.length>0&&this.fontFileAssetsLoaded.length>=this.fontFileNamesToLoad.length&&this.ingameTextureFileAssetsLoaded.length>0&&this.ingameTextureFileAssetsLoaded.length>=this.ingameTextureFileNamesToLoad.length},LoadAssetManager.prototype.areAllRequiredAssetsLoaded=function(){return this.areInitiallyRequiredAssetsLoaded()&&this.animationsBundleLoaded&&this.ingameCharacterModelFileAssetsLoaded.length>0&&this.ingameCharacterModelFileAssetsLoaded.length>=this.ingameCharacterModelFileNamesToLoad.length&&this.firstPersonAnimationFileAssetsLoaded.length>0&&this.firstPersonAnimationFileAssetsLoaded.length>=this.firstPersonAnimationFileNamesToLoad.length&&this.thirdPersonAnimationFileAssetsLoaded.length>0&&this.thirdPersonAnimationFileAssetsLoaded.length>=this.thirdPersonAnimationFileNamesToLoad.length},LoadAssetManager.prototype.startLoadingAssets=function(){this.app.assets.load(this.modelsBundleAsset)},LoadAssetManager.prototype.loadInitialAssets=function(){this.app.assets.load(this.musicBundleAsset),this.app.assets.load(this.texturesBundleAsset);for(const e in this.modelFileAssetsToLoad)this.app.assets.load(this.modelFileAssetsToLoad[e]);for(const e in this.ingameTextureFileAssetsToLoad)this.app.assets.load(this.ingameTextureFileAssetsToLoad[e]);for(const e in this.uiTextureFileAssetsToLoad)this.app.assets.load(this.uiTextureFileAssetsToLoad[e]);for(const e in this.uiSpriteFileAssetsToLoad)this.app.assets.load(this.uiSpriteFileAssetsToLoad[e],"sprite");for(const e in this.fontFileAssetsToLoad)this.app.assets.load(this.fontFileAssetsToLoad[e])},LoadAssetManager.prototype.loadRemainingAssets=function(){this.app.assets.load(this.ingameAnimationsBundleAsset);for(const e in this.ingameCharacterModelFileAssetsToLoad)this.app.assets.load(this.ingameCharacterModelFileAssetsToLoad[e])},LoadAssetManager.prototype.update=function(e){if(this.skyboxLoaded)if(this.areInitialModelsLoaded){if(!this.areAllAssetsLoaded){this.areAllRequiredAssetsLoaded()&&(this.areAllAssetsLoaded=!0,this.fire("allAssetsLoaded"))}}else if(this.areInitiallyRequiredAssetsLoaded()){this.areInitialModelsLoaded=!0,this.environmentRootEntity.enabled=!0,this.loadRemainingAssets();var s=this;this.shaderChangers.forEach((function(e){e.script.shaderChanger.init(s.gameController)})),setTimeout(function(){this.placerScripts.forEach((function(e){e.init()})),this.effectController.init(this.gameController,this.scriptReference),this.introCharacterScripts.forEach((function(e){e.setupCharacter()})),this.grassTest.init(),this.specksTest.init(),this.propsController.init(),this.fire("assetsDoneLoading"),this.initialAssetLoadingComplete=!0}.bind(this),500)}};var Vr=pc.createScript("vr");Vr.attributes.add("button",{type:"entity"}),Vr.attributes.add("cameraEntity",{type:"entity"}),Vr.prototype.initialize=function(){this.button.button.active=this.app.xr.supported,this.button.element.on("click",(function(){this.app.xr.isAvailable(pc.XRTYPE_VR)&&(window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(function(t){"granted"==t&&window.addEventListener("deviceorientation",function(t){this.cameraEntity.camera.startXr(pc.XRTYPE_VR,pc.XRSPACE_LOCAL)}.bind(this))}.bind(this)).catch(console.error):this.cameraEntity.camera.startXr(pc.XRTYPE_VR,pc.XRSPACE_LOCAL))}),this),this.app.keyboard.on("keydown",(function(t){t.key===pc.KEY_ESCAPE&&this.app.xr.end()}),this),this.app.xr.on("start",(function(){this.button.enabled=!1}),this),this.app.xr.on("end",(function(){this.button.enabled=!0}),this)};var SAMPLE_COUNT=15;function computeGaussian(e,t){return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-e*e/(2*t*t))}function calculateBlurValues(e,t,r,o,s){e[0]=computeGaussian(0,s),t[0]=0,t[1]=0;var a,i,l=e[0];for(a=0,i=Math.floor(SAMPLE_COUNT/2);a<i;a++){var u=computeGaussian(a+1,s);e[2*a]=u,e[2*a+1]=u,l+=2*u;var n=2*a+1.5;t[4*a]=r*n,t[4*a+1]=o*n,t[4*a+2]=-r*n,t[4*a+3]=-o*n}for(a=0,i=e.length;a<i;a++)e[a]/=l}function SateurateBloomPeepEffect(e){pc.PostEffect.call(this,e);var t={aPosition:pc.SEMANTIC_POSITION},r=["attribute vec2 aPosition;","","varying vec2 vUv0;","","void main(void)","{"," gl_Position = vec4(aPosition, 0.0, 1.0);"," vUv0 = (aPosition + 1.0) * 0.5;","}"].join("\n"),o=["precision "+e.precision+" float;","","varying vec2 vUv0;","","uniform sampler2D uBaseTexture;","uniform float uBloomThreshold;","","void main(void)","{"," vec4 color = texture2D(uBaseTexture, vUv0);",""," gl_FragColor = clamp((color - uBloomThreshold) / (1.0 - uBloomThreshold), 0.0, 1.0);","}"].join("\n"),s=["precision "+e.precision+" float;","","#define SAMPLE_COUNT "+SAMPLE_COUNT,"","varying vec2 vUv0;","","uniform sampler2D uBloomTexture;","uniform vec2 uBlurOffsets[SAMPLE_COUNT];","uniform float uBlurWeights[SAMPLE_COUNT];","","void main(void)","{"," vec4 color = vec4(0.0);"," for (int i = 0; i < SAMPLE_COUNT; i++)"," {"," color += texture2D(uBloomTexture, vUv0 + uBlurOffsets[i]) * uBlurWeights[i];"," }",""," gl_FragColor = color;","}"].join("\n"),a=["precision "+e.precision+" float;","","varying vec2 vUv0;","","uniform float uBloomEffectIntensity;","uniform sampler2D uBaseTexture;","uniform sampler2D uBloomTexture;","","uniform float uSaturation;","","uniform vec4 uScreenSize;","uniform vec2 uPeepScreenPos;","uniform float uPeepRadius;","uniform vec4 uPeepColor;","","uniform float uBrightness;","uniform float uContrast;","","void main(void)","{"," vec4 bloom = texture2D(uBloomTexture, vUv0) * uBloomEffectIntensity;"," vec4 base = texture2D(uBaseTexture, vUv0);",""," base *= (1.0 - clamp(bloom, 0.0, 1.0));",""," gl_FragColor = base + bloom;",""," gl_FragColor.rgb += uBrightness;"," if (uContrast > 0.0) {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - uContrast) + 0.5;"," } else {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + uContrast) + 0.5;"," }"," float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;"," if (uSaturation > 0.0) {"," gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - uSaturation));"," } else {"," gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-uSaturation);"," }",""," float aspect_ratio = uScreenSize.x / uScreenSize.y;"," vec2 pos = vUv0 - vec2(0.5, 0.5);"," pos.x *= aspect_ratio;"," float r = length(pos);"," float a = smoothstep(uPeepRadius - 0.002, uPeepRadius + 0.002, r);"," gl_FragColor.rgb = mix(gl_FragColor.rgb, uPeepColor.rgb, a * uPeepColor.a);","}"].join("\n");this.extractShader=new pc.Shader(e,{attributes:t,vshader:r,fshader:o}),this.blurShader=new pc.Shader(e,{attributes:t,vshader:r,fshader:s}),this.combineShader=new pc.Shader(e,{attributes:t,vshader:r,fshader:a});var i=e.width,l=e.height;this.targets=[];for(var u=0;u<2;u++){var n=new pc.Texture(e,{format:pc.PIXELFORMAT_R8_G8_B8_A8,width:i>>1,height:l>>1,mipmaps:!1});n.minFilter=pc.FILTER_LINEAR,n.magFilter=pc.FILTER_LINEAR,n.addressU=pc.ADDRESS_CLAMP_TO_EDGE,n.addressV=pc.ADDRESS_CLAMP_TO_EDGE,n.name="pe-bloom";var h=new pc.RenderTarget({colorBuffer:n,depth:!1});this.targets.push(h)}this.bloomThreshold=.25,this.blurAmount=4,this.bloomIntensity=1.25,this.saturation=0,this.screenpos=0,this.radius=0,this.color=pc.Color.BLACK,this.brightness=0,this.contrast=0,this.sampleWeights=new Float32Array(SAMPLE_COUNT),this.sampleOffsets=new Float32Array(2*SAMPLE_COUNT)}SateurateBloomPeepEffect.prototype=Object.create(pc.PostEffect.prototype),SateurateBloomPeepEffect.prototype.constructor=SateurateBloomPeepEffect,Object.assign(SateurateBloomPeepEffect.prototype,{render:function(e,t,r){var o=this.device,s=o.scope;s.resolve("uBloomThreshold").setValue(this.bloomThreshold),s.resolve("uBaseTexture").setValue(e.colorBuffer),pc.drawFullscreenQuad(o,this.targets[0],this.vertexBuffer,this.extractShader),MobileController.instance.active||(calculateBlurValues(this.sampleWeights,this.sampleOffsets,1/this.targets[1].width,0,this.blurAmount),s.resolve("uBlurWeights[0]").setValue(this.sampleWeights),s.resolve("uBlurOffsets[0]").setValue(this.sampleOffsets),s.resolve("uBloomTexture").setValue(this.targets[0].colorBuffer),pc.drawFullscreenQuad(o,this.targets[1],this.vertexBuffer,this.blurShader),calculateBlurValues(this.sampleWeights,this.sampleOffsets,0,1/this.targets[0].height,this.blurAmount),s.resolve("uBlurWeights[0]").setValue(this.sampleWeights),s.resolve("uBlurOffsets[0]").setValue(this.sampleOffsets),s.resolve("uBloomTexture").setValue(this.targets[1].colorBuffer),pc.drawFullscreenQuad(o,this.targets[0],this.vertexBuffer,this.blurShader),s.resolve("uBloomEffectIntensity").setValue(this.bloomIntensity),s.resolve("uBloomTexture").setValue(this.targets[0].colorBuffer),s.resolve("uBaseTexture").setValue(e.colorBuffer)),s.resolve("uSaturation").setValue(this.saturation),s.resolve("uPeepScreenPos").setValue([this.screenpos.x,this.screenpos.y]),s.resolve("uPeepRadius").setValue(this.radius),s.resolve("uPeepColor").setValue([this.color.r,this.color.g,this.color.b,this.color.a]),s.resolve("uBrightness").setValue(this.brightness),s.resolve("uContrast").setValue(this.contrast),pc.drawFullscreenQuad(o,t,this.vertexBuffer,this.combineShader,r)}});var SaturateBloomPeep=pc.createScript("saturateBloomPeep");SaturateBloomPeep.attributes.add("bloomIntensity",{type:"number",default:1,min:0,title:"Intensity"}),SaturateBloomPeep.attributes.add("bloomThreshold",{type:"number",default:.25,min:0,max:1,title:"Threshold"}),SaturateBloomPeep.attributes.add("blurAmount",{type:"number",default:4,min:1,title:"Blur amount"}),SaturateBloomPeep.attributes.add("saturation",{type:"number",default:0,min:-1,max:1,title:"Saturation"}),SaturateBloomPeep.attributes.add("screenpos",{type:"vec2",default:[0,0],title:"Peephole Screen Pos"}),SaturateBloomPeep.attributes.add("radius",{type:"number",default:0,min:0,max:1,precision:5,title:"Peephole Radius"}),SaturateBloomPeep.attributes.add("color",{type:"rgba",title:"Peephole Color"}),SaturateBloomPeep.attributes.add("brightness",{type:"number",default:0,min:-1,max:1,precision:5,title:"Brightness"}),SaturateBloomPeep.attributes.add("contrast",{type:"number",default:0,min:-1,max:1,precision:5,title:"Contrast"}),SaturateBloomPeep.prototype.initialize=function(){this.effect=new SateurateBloomPeepEffect(this.app.graphicsDevice),this.effect.bloomThreshold=this.bloomThreshold,this.effect.blurAmount=this.blurAmount,this.effect.bloomIntensity=this.bloomIntensity,this.effect.saturation=this.saturation,this.effect.screenpos=this.screenpos,this.effect.radius=0,this.effect.color=this.color,this.effect.brightness=this.brightness,this.effect.contrast=this.contrast;var e=this.entity.camera.postEffects;e.addEffect(this.effect),this.on("attr",(function(e,t){this.effect[e]=t}),this),this.on("state",(function(t){t?e.addEffect(this.effect):e.removeEffect(this.effect)})),this.on("destroy",(function(){e.removeEffect(this.effect)}))};var LimitedCharTimerLabel=pc.createScript("limitedCharTimerLabel");LimitedCharTimerLabel.prototype.init=function(t){this.hasInitialized=!1,this.limitedEndTime=t,this.timeRemaining=this.limitedEndTime.getTime()-Date.now(),this.daysLeft=0,this.tempDays=0,this.hoursLeft=0,this.minutesLeft=0,this.refreshTime=1,this.timer=0,this.tempText="",this.formatTimeLeft(),this.hasInitialized=!0},LimitedCharTimerLabel.prototype.update=function(t){this.entity.enabled&&this.hasInitialized&&(this.timer+=t,this.timer>this.refreshTime&&(this.timer=0,this.formatTimeLeft()))},LimitedCharTimerLabel.prototype.formatTimeLeft=function(){this.timeRemaining=this.limitedEndTime.getTime()-Date.now(),this.daysLeft=this.timeRemaining/1e3/60/60/24,this.hoursLeft=this.timeRemaining/1e3/60/60,this.minutesLeft=this.timeRemaining/1e3/60,this.daysLeft>1?(this.tempDays=this.daysLeft.toFixed(0),1==this.tempDays?this.entity.element.text='ACTIVE FOR [color="#FCC14A"]'+this.daysLeft.toFixed(0)+"[/color] DAY":this.entity.element.text='ACTIVE FOR [color="#FCC14A"]'+this.daysLeft.toFixed(0)+"[/color] DAYS"):this.hoursLeft>1?this.entity.element.text='ACTIVE FOR [color="#FCC14A"]'+this.hoursLeft.toFixed(0)+"[/color] HOURS":this.minutesLeft>1?this.entity.element.text='ACTIVE FOR [color="#FCC14A"]'+this.minutesLeft.toFixed(0)+"[/color] MINUTES":this.entity.element.text="Timelimit Expired"};var MobileControlsHelper=pc.createScript("mobileControlsHelper");MobileControlsHelper.attributes.add("movementHitbox",{type:"entity"}),MobileControlsHelper.attributes.add("jumpButton",{type:"entity"}),MobileControlsHelper.attributes.add("shootButton",{type:"entity"}),MobileControlsHelper.attributes.add("shootAimReference",{type:"entity"}),MobileControlsHelper.attributes.add("aimHitbox",{type:"entity"}),MobileControlsHelper.attributes.add("leaderboardButton",{type:"entity"}),MobileControlsHelper.attributes.add("moveBackground",{type:"entity"}),MobileControlsHelper.attributes.add("moveButton",{type:"entity"}),MobileControlsHelper.attributes.add("moveReference",{type:"entity"}),MobileControlsHelper.attributes.add("cameraEntity",{type:"entity"}),MobileControlsHelper.attributes.add("screen",{type:"entity"}),pc.extend(MobileControlsHelper.prototype,{init:function(){MobileController.instance.active?(this.entity.enabled=!0,this._jumped=!1,this._dpr=Math.min(window.devicePixelRatio,this.app.graphicsDevice.maxPixelRatio),this.defaultMoveBackgroundPosition=this.moveBackground.getLocalPosition().clone(),this.defaultShootButtonPosition=this.shootButton.getLocalPosition().clone(),this.startMovePosition=new pc.Vec2,this.startShootAimPosition=new pc.Vec2,this.moveDeltaVector=new pc.Vec3,this.shootAimDeltaVector=new pc.Vec3,this.moveRadius=152,this.startAimTouchPosition=new pc.Vec2,this.previousAimTouchPosition=new pc.Vec2,this.movementTouchPosition=new pc.Vec2,this.aimHitbox.element.on(pc.EVENT_MOUSEDOWN,this._aimStart,this),this.aimHitbox.element.on(pc.EVENT_MOUSEMOVE,this._aimMove,this),this.aimHitbox.element.on(pc.EVENT_MOUSEUP,this._aimEnd,this),this.movementHitbox.element.on(pc.EVENT_MOUSEDOWN,this._movementStart,this),this.movementHitbox.element.on(pc.EVENT_MOUSEMOVE,this._movementMove,this),this.movementHitbox.element.on(pc.EVENT_MOUSEUP,this._movementEnd,this),this.jumpButton.element.on(pc.EVENT_MOUSEDOWN,this._jumpPressed,this),this.shootButton.element.on(pc.EVENT_MOUSEDOWN,this._shootPressed,this),this.shootButton.element.on(pc.EVENT_MOUSEMOVE,this._shootMove,this),this.shootButton.element.on(pc.EVENT_MOUSEUP,this._shootReleased,this),this.leaderboardButton.element.on(pc.EVENT_MOUSEDOWN,this._leaderboardButtonPressed,this),this.leaderboardButton.element.on(pc.EVENT_MOUSEUP,this._leaderboardButtonReleased,this),this.app.touch&&(this.aimHitbox.element.on(pc.EVENT_TOUCHSTART,this._aimStart,this),this.aimHitbox.element.on(pc.EVENT_TOUCHMOVE,this._aimMove,this),this.aimHitbox.element.on(pc.EVENT_TOUCHEND,this._aimEnd,this),this.movementHitbox.element.on(pc.EVENT_TOUCHSTART,this._movementStart,this),this.movementHitbox.element.on(pc.EVENT_TOUCHMOVE,this._movementMove,this),this.movementHitbox.element.on(pc.EVENT_TOUCHEND,this._movementEnd,this),this.movementHitbox.element.on(pc.EVENT_TOUCHCANCEL,this._movementEnd,this),this.jumpButton.element.on(pc.EVENT_TOUCHSTART,this._jumpPressed,this),this.shootButton.element.on(pc.EVENT_TOUCHSTART,this._shootPressed,this),this.shootButton.element.on(pc.EVENT_TOUCHMOVE,this._shootMove,this),this.shootButton.element.on(pc.EVENT_TOUCHEND,this._shootReleased,this),this.shootButton.element.on(pc.EVENT_TOUCHCANCEL,this._shootReleased,this),this.leaderboardButton.element.on(pc.EVENT_TOUCHSTART,this._leaderboardButtonPressed,this),this.leaderboardButton.element.on(pc.EVENT_TOUCHEND,this._leaderboardButtonReleased,this),this.leaderboardButton.element.on(pc.EVENT_TOUCHCANCEL,this._leaderboardButtonReleased,this))):this.entity.enabled=!1},_jumpPressed:function(){this.fire("jump")},_shootPressed:function(t){this.fire("shoot"),this._aimStart(t)},_shootMove:function(t){this._aimMove(t);var e=t.x/this.screen.screen.scale*this._dpr,o=-t.y/this.screen.screen.scale*this._dpr;this.shootAimReference.setLocalPosition(e,o,0),this.shootButton.setPosition(this.shootAimReference.getPosition()),this.startShootAimPosition.set(t.x,t.y)},update:function(t){this._aiming&&this.startAimTouchPosition.lerp(this.startAimTouchPosition,this.previousAimTouchPosition,.8)},_shootReleased:function(t){this.fire("stopShooting"),this.shootButton.setLocalPosition(this.defaultShootButtonPosition)},_aimStart:function(t){this._aiming=!0,this.startAimTouchPosition.set(t.x,t.y),this.previousAimTouchPosition.set(t.x,t.y),this.fire("aimStart",t)},_aimMove:function(t){var e=t.x-this.startAimTouchPosition.x,o=t.y-this.startAimTouchPosition.y,i=Math.sqrt(e*e+o*o),s=pc.math.clamp(i/1.2,0,1);t.dx=t.x-this.previousAimTouchPosition.x,t.dy=t.y-this.previousAimTouchPosition.y,this.fire("aimMove",t,s),this.previousAimTouchPosition.set(t.x,t.y)},_aimEnd:function(){this._aiming=!1},_leaderboardButtonPressed:function(){this.fire("leaderboard",!0)},_leaderboardButtonReleased:function(){this.fire("leaderboard",!1)},_movementStart:function(t){var e=t.x/this.screen.screen.scale*this._dpr,o=-t.y/this.screen.screen.scale*this._dpr;this.moveReference.setLocalPosition(e,o,0),this.moveBackground.setPosition(this.moveReference.getPosition()),this.moveButton.setLocalPosition(0,0,0),this.startMovePosition.set(t.x,t.y)},_movementMove:function(t){var e=(this.startMovePosition.x-t.x)/this.screen.screen.scale*this._dpr,o=(this.startMovePosition.y-t.y)/this.screen.screen.scale*this._dpr;this.moveDeltaVector.set(-e,o,0);var i=pc.math.clamp(this.moveDeltaVector.length()/this.moveRadius,.65,1);i>=1&&this.moveDeltaVector.normalize().scale(this.moveRadius),this.fire("move",MobileControlsHelper.VEC_3.copy(this.moveDeltaVector).normalize(),i),this.moveButton.setLocalPosition(this.moveDeltaVector)},_movementEnd:function(t){this.moveBackground.setLocalPosition(this.defaultMoveBackgroundPosition),this.moveButton.setLocalPosition(0,0,0),this.fire("move",pc.Vec3.ZERO,0)}}),MobileControlsHelper.VEC_3=new pc.Vec3;var EffectRippleInstanced=pc.createScript("effectRippleInstanced");EffectRippleInstanced.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectRippleInstanced.prototype.refreshMaterial=function(){var t=this.material;t||(t=this.app.assets.find("MaterialWaterRipples").resource.clone()),t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.transformVS=this.app.assets.find("transformVS_RippleInstanced").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Ripples").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Dummy").resource,t.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Splash").resource,t.chunks.instancingVS=this.app.assets.find("instancingVS_2xVec4").resource,t.setParameter("tex0",this.perlinTexture.resource),t.specularTint=pc.Color.BLACK,t.diffuseMap=this.perlinTexture.resource,t.diffuseMapUv=0,t.blendType=pc.BLEND_NONE,t.useLighting=!0,t.useSkybox=!1,t.depthWrite=!0,t.cull=pc.CULLFACE_NONE,t.update(),this.material=t,this.entity.model.meshInstances[0].material=this.material},EffectRippleInstanced.prototype.spawn=function(t,e){this.entity.setPosition(t),this.entity.enabled=!0;var s=(this.oldestInstance+this.activeInstances)%this.maxInstances,n=this.instanceData,a=s*this.floatsPerInstance;n[a++]=t.x,n[a++]=t.y,n[a++]=t.z,n[a++]=this.oldestInstance,n[a++]=Math.random(),n[a++]=e,n[a++]=0,n[a++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectRippleInstanced.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectRippleInstanced.prototype.initialize=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.floatsPerInstance=8,this.maxInstances=16,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var e=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,e,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1}},EffectRippleInstanced.prototype.update=function(t){if(this.app.graphicsDevice.supportsInstancing){var e=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",e),this.activeInstances>0)e-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>2&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));if(this.uncommitedChanges){var s=this.instanceData;this.instanceVertexBuffer.setData(s),this.uncommitedChanges=!1}}};var ProfanityFilter=pc.createScript("profanityFilter");ProfanityFilter.attributes.add("textAsset",{type:"asset",title:"textAsset"});var profaneWords=[];ProfanityFilter.prototype.init=function(){this.textFilterFile=new Blob([this.textAsset.resource],{type:"text/plain"});var t=new FileReader;t.onload=function(t){var e=t.target.result;profaneWords=e.split(/\r\n|\n/)},t.onerror=function(t){alert(t.target.error.name)},t.readAsText(this.textFilterFile)};var MobileController=pc.createScript("mobileController");MobileController.attributes.add("mobileControlsHelperEntity",{type:"entity"}),MobileController.attributes.add("mobileSensitivity",{type:"number",default:4}),MobileController.attributes.add("mobileSensitivityYScaleFactor",{type:"number",default:.75}),pc.extend(MobileController.prototype,{init:function(){MobileController.instance=this,this._jump=!1,this._preventDefault=!0,this.mobileControlsHelper=this.mobileControlsHelperEntity.script.get("mobileControlsHelper"),this.active=pc.platform.touch&&!pc.platform.desktop,this.active&&(this.app.touch.on(pc.EVENT_TOUCHCANCEL,this.preventDefaultBehaviour,this),this.app.touch.on(pc.EVENT_TOUCHSTART,this.preventDefaultBehaviour,this),this.app.touch.on(pc.EVENT_TOUCHEND,this.preventDefaultBehaviour,this),this.app.touch.on(pc.EVENT_TOUCHMOVE,this.preventDefaultBehaviour,this),this.mobileControlsHelper.on("jump",this._jumping,this),this.mobileControlsHelper.on("shoot",this._shooting,this),this.mobileControlsHelper.on("stopShooting",this._stopShooting,this),this.mobileControlsHelper.on("aimMove",this._aimMove,this),this.mobileControlsHelper.on("move",this._move,this),this.mobileControlsHelper.on("leaderboard",this._showLeaderboard,this))},preventDefaultBehaviour:function(t){this._preventDefault&&t.event.preventDefault()},setPreventDefault:function(t){this._preventDefault=t},_jumping:function(){this._jump=!0},_shooting:function(){this.fire("shooting",!0)},_stopShooting:function(){this.fire("stopShooting",!0)},_move:function(t,e){this.fire("move",t,e)},_showLeaderboard:function(t){this.fire("leaderboard",t)},_aimMove:function(t,e){t.dx*=this.mobileSensitivity*e,t.dy*=this.mobileSensitivity*e*this.mobileSensitivityYScaleFactor,this.fire("aimMove",t)},postUpdate:function(){this._resetInput()},_resetInput:function(){this._jump=!1},wasPressed:function(t){switch(t){case MobileController.JUMP:return this._jump}}}),pc.extend(MobileController,{JUMP:"jump",SHOOT:"shoot"});var SpecksOfDust=pc.createScript("specksOfDust");SpecksOfDust.attributes.add("materialSpecks",{type:"asset",assetType:"material"}),SpecksOfDust.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),SpecksOfDust.prototype.refreshMaterial=function(){this.material||(this.material=this.materialSpecks.resource.clone()),this.material.onUpdateShader=function(e){return e.useInstancing=!0,e},this.material.chunks.diffusePS=this.app.assets.find("diffusePS_SpecksInstanced").resource,this.material.chunks.transformVS=this.app.assets.find("transformVS_SpecksInstanced").resource,this.material.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,this.material.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,this.material.chunks.emissivePS=this.app.assets.find("emissionPS_Zero").resource,this.material.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Zero").resource,this.material.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Specks").resource,this.material.chunks.instancingVS=this.app.assets.find("instancingVS_Vec4").resource,this.material.specularTint=pc.Color.BLACK,this.material.useSkybox=!1,this.material.depthWrite=!1,this.material.update(),this.material.setParameter("uPerlinTexture",this.perlinTexture.resource)},SpecksOfDust.prototype.createInstances=function(e,t,s){var i=new Float32Array(4*s),a=0;new pc.Vec3;(new pc.Quat).setFromEulerAngles(-90,0,0);pc.Vec3.ONE,pc.Vec3.UP,new pc.Vec4(0,0,0,0);for(var r=0;r<s;r++)i[a++]=Math.random(),i[a++]=Math.random(),i[a++]=Math.random(),i[a++]=r;var n=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32}]),c=new pc.VertexBuffer(this.app.graphicsDevice,n,s,pc.BUFFER_STATIC,i);return e.model.meshInstances[0].setInstancing(c),s},SpecksOfDust.prototype.init=function(){if(MobileController.instance.active)this.entity.enabled=!1;else if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial();var e=new pc.Entity;this.entity.addChild(e),e.addComponent("model",{type:"asset"}),e.model.castShadows=!1,e.model.asset=this.entity.model.asset,e.model.meshInstances[0].material=this.material;var t=pc.Vec3.ZERO;e.setPosition(t),this.createInstances(e,t,500),this.instancedEntity=e,this.time=0,this.isInitialized=!0}},SpecksOfDust.prototype.postUpdate=function(e){this.isInitialized&&this.app.graphicsDevice.supportsInstancing&&!MobileController.instance.active&&(this.time+=e,this.material.setParameter("uTime",this.time))};var EffectCloud=pc.createScript("effectCloud");function getCroissantShape(t){return.5*Math.sin(3.14*t-1.57)+.5}EffectCloud.attributes.add("terrainRamp",{type:"asset",assetType:"texture"}),EffectCloud.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectCloud.attributes.add("seed",{type:"number"}),EffectCloud.prototype.refreshMaterial=function(){var t=new pc.StandardMaterial;t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.name="CustomCloudMaterial",t.chunks.diffusePS=this.app.assets.find("diffusePS_CloudNew").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_CloudNew").resource,t.chunks.transformVS=this.app.assets.find("transformVS_CloudNew").resource,t.chunks.instancingVS=this.app.assets.find("instancingVS_2xVec4").resource,t.blendType=pc.BLEND_NORMAL,t.specularTint=pc.Color.BLACK,t.useFog=!1,t.useSkybox=!1,t.update(),this.material=t,t.setParameter("uTerrainRamp",this.terrainRamp.resource),t.setParameter("uPerlinTexture",this.perlinTexture.resource);new pc.Vec3(0,-23.335987091064453,0);this.material.setParameter("uCircleCenter",[0,0,0]),this.material.setParameter("uCircleRadius",1),this.entity.model.meshInstances[0].material=this.material},EffectCloud.prototype.spawn=function(t,e,s){this.entity.setPosition(e),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;var n=(this.oldestInstance+this.activeInstances)%this.maxInstances,a=this.instanceData,i=n*this.floatsPerInstance;a[i++]=e.x,a[i++]=e.y,a[i++]=e.z,a[i++]=t,a[i++]=s.x,a[i++]=s.y,a[i++]=s.z,a[i++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectCloud.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectCloud.prototype.randomRange=function(t,e){return t+this.arng()*(e-t)},EffectCloud.prototype.spawnGroup=function(t,e,s){this.arng=new alea("hello."+s);for(var n=0;n<e;n++){var a=10*this.randomRange(.5,1.5),i=.6*a,r=1.4*a,c=new pc.Vec3(t.x+Math.random()*a*3,t.y,t.z+Math.random()*a*2),o=new pc.Vec3(this.randomRange(i,r),this.randomRange(i,r),this.randomRange(i,r));this.spawn(0,c,o)}this.arng=null},EffectCloud.prototype.spawnLine=function(t,e,s){this.arng=new alea("hello."+s);for(var n=t.x,a=0;a<e;a++){var i=1-Math.abs(.5*(e-1)-a)/(.5*(e-1)),r=Math.pow(i,2)+.2,c=10*this.randomRange(.75,1.25)*r,o=.6*c,h=1.4*c,p=this.randomRange(o,h),u=new pc.Vec3(p,1.5*c,c);n+=.5*p;var l=new pc.Vec3(n,t.y,t.z);n+=.5*p,this.spawn(0,l,u)}this.arng=null},EffectCloud.prototype.refreshClouds=function(){for(;this.activeInstances>0;)this.retireOldest();var t=this.seed;this.spawnLine(new pc.Vec3(-100,50,50),12,t+2),this.spawnLine(new pc.Vec3(-50,50,-250),12,t+4),this.spawnLine(new pc.Vec3(0,50,0),12,t+1),this.spawnLine(new pc.Vec3(100,50,-200),12,t+3),this.spawnLine(new pc.Vec3(150,50,-50),12,t+5)},EffectCloud.prototype.init=function(){if(MobileController.instance.active)this.entity.enabled=!1;else if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.baseTime=Date.now(),this.floatsPerInstance=8,this.maxInstances=64,this.oldestInstance=0,this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var e=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,e,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.refreshClouds(),this.on("attr:seed",(function(t,e){this.refreshClouds()})),this.isInitialized=!0}},EffectCloud.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing&&!MobileController.instance.active){var e=.001*(Date.now()-this.baseTime);this.material.setParameter("uTime",e),this.uncommitedChanges&&(this.instanceVertexBuffer.setData(this.instanceData),this.uncommitedChanges=!1)}};var EffectSplashInstanced=pc.createScript("effectSplashInstanced");EffectSplashInstanced.attributes.add("perlinTexture",{type:"asset",assetType:"texture"}),EffectSplashInstanced.prototype.refreshMaterial=function(){var t=this.material;t||(t=this.app.assets.find("MaterialWaterSplash").resource.clone()),t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.transformVS=this.app.assets.find("transformVS_SplashInstanced").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Splash").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Splash").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_Dummy").resource,t.chunks.lightDiffuseLambertPS=this.app.assets.find("lightDiffuseLambertPS_Splash").resource,t.chunks.instancingVS=this.app.assets.find("instancingVS_2xVec4").resource,t.setParameter("tex0",this.perlinTexture.resource),t.specularTint=pc.Color.BLACK,t.blendType=pc.BLEND_NORMAL,t.useLighting=!0,t.useSkybox=!1,t.ambient=pc.Color.WHITE,t.update(),this.material=t,this.entity.model.meshInstances[0].material=this.material},EffectSplashInstanced.prototype.spawn=function(t,s){this.entity.setPosition(t),this.entity.enabled=!0;var e=(this.oldestInstance+this.activeInstances)%this.maxInstances,a=this.instanceData,n=e*this.floatsPerInstance;a[n++]=t.x,a[n++]=t.y,a[n++]=t.z,a[n++]=this.oldestInstance,a[n++]=Math.random(),a[n++]=s,a[n++]=0,a[n++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectSplashInstanced.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectSplashInstanced.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.floatsPerInstance=8,this.maxInstances=16,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var s=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,s,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.isInitialized=!0}},EffectSplashInstanced.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing){var s=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",s),this.activeInstances>0)s-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>2&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));if(this.uncommitedChanges){var e=this.instanceData;this.instanceVertexBuffer.setData(e),this.uncommitedChanges=!1}}};var OrientationOverlay=pc.createScript("orientationOverlay");OrientationOverlay.attributes.add("background",{type:"entity"}),OrientationOverlay.attributes.add("screenEntity",{type:"entity"}),OrientationOverlay.attributes.add("imageAsset",{type:"asset"}),pc.extend(OrientationOverlay.prototype,{init:function(t){MobileController.instance.active?(this.imageWidth=0,this.imageHeight=0,this.loaded=!1,this.createOverlay(),this.app.on("ViewportManager:resize",this.checkViewport,this)):this.entity.enabled=!1},checkViewport:function(){this.loaded&&(innerWidth<innerHeight?this.enableOverlay():this.disableOverlay())},createOverlay:function(){this.div=document.createElement("div"),this.div.style["background-color"]="black",this.div.id="orientationOverlay",this.div.style.position="fixed",this.div.style.display="flex",this.div.style["justify-content"]="center",this.image=document.createElement("IMG"),this.image.style.margin="auto",this.image.setAttribute("src",this.imageAsset.resource.getSource().src),this.image.addEventListener("load",this.onload.bind(this)),this.imageWidth=this.imageAsset.resource.width,this.imageHeight=this.imageAsset.resource.height;var t=document.getElementById("headerTitel");document.body.insertBefore(this.div,t),this.div.appendChild(this.image),this.disableOverlay()},onload:function(){this.loaded=!0,this.checkViewport()},enableOverlay:function(){this.div.style.width=innerWidth+"px",this.div.style.height=innerHeight+"px",this.image.style.width=this.imageWidth+"px",this.image.style.height=this.imageHeight+"px"},disableOverlay:function(){this.div.style.width="0px",this.div.style.height="0px",this.image.style.width="0px",this.image.style.height="0px"}});var ViewportManager=pc.createScript("viewportManager");pc.extend(ViewportManager.prototype,{initialize:function(){ViewportManager.instance=this,window.addEventListener("resize",this._onResize.bind(this))},_onResize:function(){setTimeout(function(){var e=getWindowWidth(),i=getWindowHeight();this.app.resizeCanvas(e,i),this.app.fire("ViewportManager:resize",e,i),setTimeout(function(){e===getWindowWidth()&&i===getWindowHeight()||this._onResize()}.bind(this),2e3)}.bind(this),this.getResizeDelay())},getResizeDelay:()=>pc.platform.ios?ViewportManager.IOS_DELAY:ViewportManager.DEFAULT_DELAY}),pc.extend(ViewportManager,{DEFAULT_DELAY:0,IOS_DELAY:500});var AssetAssigner=pc.createScript("assetAssigner");AssetAssigner.attributes.add("collisionModelToLoad",{type:"string",default:"",title:"Collision Model To Load"}),AssetAssigner.attributes.add("modelToLoad",{type:"string",default:"",title:"Model To Load"}),AssetAssigner.attributes.add("animationsToLoad",{type:"string",array:"true",title:"Animations To Load"}),AssetAssigner.attributes.add("particleModelToLoad",{type:"string",default:"",title:"Particle Model To Load"}),AssetAssigner.attributes.add("fontToLoad",{type:"string",default:"",title:"Font To Load"}),AssetAssigner.attributes.add("uiTexturesToLoad",{type:"string",array:!0,title:"UI Textures To Load"}),AssetAssigner.attributes.add("uiSpritesToLoad",{type:"string",array:!0,title:"UI Sprites To Load"}),AssetAssigner.prototype.init=function(s){var e=this;this.numberOfAssetsToLoad=0,this.numberOfAssetsLoaded=0,s.modelsBundleAsset.ready((function(t){""!==this.modelToLoad&&(s.modelFileAssetsToLoad[this.modelToLoad].ready((function(e){var t=this.modelToLoad;""===this.collisionModelToLoad&&this.entity.collision&&(this.entity.collision.asset=e),this.entity.model&&(this.entity.model.asset=e),s.modelFileAssetsLoaded.includes(t)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.modelFileAssetsLoaded.push(t)),this.increaseNumberOfAssetsLoaded()}),this),this.increaseNumberOfAssetsToLoad()),""!==this.collisionModelToLoad&&(s.modelFileAssetsToLoad[this.collisionModelToLoad].ready((function(e){var t=this.collisionModelToLoad;""!==this.collisionModelToLoad&&this.entity.collision&&(this.entity.collision.asset=e),s.modelFileAssetsLoaded.includes(t)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.modelFileAssetsLoaded.push(t)),this.increaseNumberOfAssetsLoaded()}),this),this.increaseNumberOfAssetsToLoad()),this.animationsToLoad.length>0&&this.animationsToLoad.forEach((function(t){s.modelFileAssetsToLoad[t].ready((function(i){var o=t;e.entity.animation&&(e.entity.animation.animations[o]=i.resource),s.modelFileAssetsLoaded.includes(o)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.modelFileAssetsLoaded.push(o)),e.increaseNumberOfAssetsLoaded()}),this),e.increaseNumberOfAssetsToLoad()})),""!==this.particleModelToLoad&&(s.modelFileAssetsToLoad[this.particleModelToLoad].ready((function(e){var t=this.particleModelToLoad;this.entity.particlesystem&&(this.entity.particlesystem.meshAsset=e),s.modelFileAssetsLoaded.includes(t)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.modelFileAssetsLoaded.push(t)),this.increaseNumberOfAssetsLoaded()}),this),this.increaseNumberOfAssetsToLoad())}),this),""!==this.fontToLoad&&(s.fontFileAssetsToLoad[this.fontToLoad].ready((function(e){var t=this.fontToLoad;this.entity.element&&(this.entity.element.fontAsset=e),s.fontFileAssetsLoaded.includes(t)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.fontFileAssetsLoaded.push(t)),this.increaseNumberOfAssetsLoaded()}),this),this.increaseNumberOfAssetsToLoad()),this.uiTexturesToLoad.length>0&&this.uiTexturesToLoad.forEach((function(t){""!==t&&(s.uiTextureFileAssetsToLoad[t].ready((function(i){var o=t;e.entity.element&&(e.entity.element.texture=i.resource),s.uiTextureFileAssetsLoaded.includes(o)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.uiTextureFileAssetsLoaded.push(o)),e.increaseNumberOfAssetsLoaded()}),this),e.increaseNumberOfAssetsToLoad())})),this.uiSpritesToLoad.length>0&&this.uiSpritesToLoad.forEach((function(t){""!==t&&(s.uiSpriteFileAssetsToLoad[t].ready((function(i){var o=t;e.entity.element&&(e.entity.element.spriteAsset=i.id),s.uiSpriteFileAssetsLoaded.includes(o)||(s.initialAssetsLoaded++,s.totalAssetsLoaded++,s.uiSpriteFileAssetsLoaded.push(o)),e.increaseNumberOfAssetsLoaded()}),this),e.increaseNumberOfAssetsToLoad())}))},AssetAssigner.prototype.increaseNumberOfAssetsToLoad=function(){this.numberOfAssetsToLoad++},AssetAssigner.prototype.increaseNumberOfAssetsLoaded=function(){this.numberOfAssetsLoaded++,this.areAllAssetsLoaded()&&this.fire("assetsLoadedFinished")},AssetAssigner.prototype.areAllAssetsLoaded=function(){return this.numberOfAssetsLoaded>0&&this.numberOfAssetsLoaded>=this.numberOfAssetsToLoad};var EffectImpactInstanced=pc.createScript("effectImpactInstanced");EffectImpactInstanced.attributes.add("terrainRamp",{type:"asset",assetType:"texture"}),EffectImpactInstanced.prototype.refreshMaterial=function(){var t=new pc.StandardMaterial;t.onUpdateShader=function(t){return t.useInstancing=!0,t},t.chunks.transformVS=this.app.assets.find("transformVS_ImpactInstanced").resource,t.chunks.ambientConstantPS=this.app.assets.find("ambientConstantPS_White").resource,t.chunks.diffusePS=this.app.assets.find("diffusePS_Impact").resource,t.chunks.opacityPS=this.app.assets.find("opacityPS_Dummy").resource,t.chunks.normalVS=this.app.assets.find("normalVS_Dummy").resource,t.chunks.instancingVS=this.app.assets.find("instancingVS_2xVec4").resource,t.blendType=pc.BLEND_NORMAL,t.depthWrite=!1,t.update(),this.material=t,t.setParameter("uTerrainRamp",this.terrainRamp.resource);var e=new pc.Vec3(0,-23.335987091064453,0);this.material.setParameter("uRampMinY",8.108262544156844),this.material.setParameter("uRampHeight",26.300610290295523),this.material.setParameter("uTerrainPos",[e.x,e.y,e.z]),this.entity.model.meshInstances[0].material=this.material},EffectImpactInstanced.prototype.spawn=function(t,e){this.entity.setPosition(t),this.entity.setRotation(pc.Quat.IDENTITY),this.entity.setLocalScale(pc.Vec3.ONE),this.entity.enabled=!0;var s=(this.oldestInstance+this.activeInstances)%this.maxInstances,a=this.instanceData,n=s*this.floatsPerInstance;a[n++]=t.x,a[n++]=t.y,a[n++]=t.z,a[n++]=this.oldestInstance,a[n++]=e.x,a[n++]=e.y,a[n++]=e.z,a[n++]=.001*(Date.now()-this.baseTime),this.activeInstances<this.maxInstances?this.activeInstances++:this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectImpactInstanced.prototype.retireOldest=function(){this.instanceData[this.oldestInstance*this.floatsPerInstance+3]=-1,this.activeInstances--,this.oldestInstance=(this.oldestInstance+1)%this.maxInstances,this.uncommitedChanges=!0},EffectImpactInstanced.prototype.init=function(){if(this.app.graphicsDevice.supportsInstancing){this.refreshMaterial(),this.floatsPerInstance=8,this.maxInstances=8,this.oldestInstance=0,this.baseTime=Date.now(),this.instanceData=new Float32Array(this.maxInstances*this.floatsPerInstance);for(var t=0;t<this.maxInstances;t++)this.retireOldest();this.activeInstances=0;var e=new pc.VertexFormat(this.app.graphicsDevice,[{semantic:pc.SEMANTIC_ATTR12,components:4,type:pc.TYPE_FLOAT32},{semantic:pc.SEMANTIC_ATTR13,components:4,type:pc.TYPE_FLOAT32}]);this.instanceVertexBuffer=new pc.VertexBuffer(this.app.graphicsDevice,e,this.maxInstances,pc.BUFFER_DYNAMIC,this.instanceData),this.entity.model.meshInstances[0].setInstancing(this.instanceVertexBuffer),this.uncommitedChanges=!1,this.isInitialized=!0}},EffectImpactInstanced.prototype.update=function(t){if(this.isInitialized&&this.app.graphicsDevice.supportsInstancing){var e=.001*(Date.now()-this.baseTime);if(this.material.setParameter("uTime",e),this.activeInstances>0)e-this.instanceData[this.oldestInstance*this.floatsPerInstance+7]>1&&(this.retireOldest(),0===this.activeInstances&&(this.baseTime=Date.now()));this.uncommitedChanges&&(this.instanceVertexBuffer.setData(this.instanceData),this.uncommitedChanges=!1)}};var LoadButton=pc.createScript("loadButton");LoadButton.attributes.add("foregroundEntity",{type:"entity",title:"Foreground"}),LoadButton.attributes.add("spinnerEntity",{type:"entity",title:"Spinner"}),LoadButton.attributes.add("textEntity",{type:"entity",title:"Text"}),LoadButton.prototype.init=function(t){this.backgroundElement=this.entity.element,this.foregroundElement=this.foregroundEntity.element,this.textElement=this.textEntity.element,this.textElement.text=t,this.isPressed=!1},LoadButton.prototype.show=function(){this.entity.enabled=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this)),this.app.mouse.on(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this),this.showNormalState()},LoadButton.prototype.hide=function(){this.entity.element.off(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.off(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.mouse.off(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this),this.entity.enabled=!1,this.spinnerEntity.enabled=!1},LoadButton.prototype.onPress=function(t){this.isPressed||(this.isPressed=!0,this.showPressedState())},LoadButton.prototype.onRelease=function(t){this.isPressed&&(this.isPressed=!1,this.buttonClicked())},LoadButton.prototype.onUnfocusedRelease=function(t){this.isPressed&&(this.isPressed=!1,this.showNormalState())},LoadButton.prototype.buttonClicked=function(){this.textEntity.enabled=!1,this.spinnerEntity.enabled=!0,this.fire("buttonClicked")},LoadButton.prototype.showNormalState=function(){this.textEntity.enabled=!0,this.spinnerEntity.enabled=!1,this.backgroundElement.color=Button_Default_Light_Background_Color,this.foregroundElement.color=Button_Default_Green_Foreground_Color,this.textElement.color=Button_Default_Text_Color,this.textElement.shadowOffset=Button_Default_Text_Shadow_Offset,this.textElement.shadowColor=Button_Default_Green_Text_Shadow_Color},LoadButton.prototype.showPressedState=function(){this.backgroundElement.color=Button_Pressed_Background_Color,this.foregroundElement.color=Button_Pressed_Foreground_Color,this.textElement.color=Button_Pressed_Text_Color,this.textElement.shadowOffset=Button_Pressed_Text_Shadow_Offset};var ScoreLabelHelper=pc.createScript("scoreLabelHelper");ScoreLabelHelper.attributes.add("background",{type:"entity",title:"Background"}),ScoreLabelHelper.prototype.init=function(){this.element=this.entity.element,this.initialBackgroundWidth=this.background.element.width,this.characterWidth=this.element.fontSize/2},ScoreLabelHelper.prototype.updateLabel=function(e){this.element.text=e+" Points";var t=this.element.text.length>0?this.element.text.length-1:this.element.text.length,i=this.initialBackgroundWidth+t*this.characterWidth;null!=i&&this.background.element.width};var PreloadScreen=pc.createScript("preloadScreen");PreloadScreen.attributes.add("logoParentEntity",{type:"entity",title:"Logo Parent"}),PreloadScreen.attributes.add("inputBoxEntity",{type:"entity",title:"Input Box"}),PreloadScreen.attributes.add("loadButtonEntity",{type:"entity",title:"Load Button"}),PreloadScreen.attributes.add("feedbackLabelEntity",{type:"entity",title:"Feedback Label"}),PreloadScreen.attributes.add("playerNameLabel",{type:"entity",title:"Player Name Label"}),PreloadScreen.attributes.add("gameBackground",{type:"entity",title:"Game Background"}),PreloadScreen.attributes.add("openLogInScreenButton",{type:"entity",title:"Open Log In Screen Button"}),PreloadScreen.attributes.add("logOutButton",{type:"entity",title:"Log Out Button"});var PreLoadScreenStates={input:0,loading:1};PreloadScreen.prototype.getScreenType=function(){return UIScreenTypes.PreloadScreen},PreloadScreen.prototype.init=function(e,t,o,n,i){if(!this.isInitialized){this.isInitialized=!0,this.isUserLoggedIn=!1,this.storageManager=t,this.globalsController=e,this.loadAssetManager=o,this.popupController=n,this.firebase=i,this.firebase.on("Firebase:signedOut",this.onFirebaseSignedOut,this),this.feedbackHandler=this.feedbackLabelEntity.script.feedbackHandler,this.feedbackHandler.init("");var a=t.load(STORAGE_PlayerName_KEY);this.keyboardInputHelper=this.playerNameLabel.script.keyboardInputHelper,this.keyboardInputHelper.init(a,this.feedbackHandler,"Invalid character","Invalid name","Name is too long"),this.loadButton=this.loadButtonEntity.script.uiButton,this.loadButton.init(Ok_Button_Default_Text,!0),this.loadButton.on("buttonClicked",this.onLoadButtonClicked,this),this.openLogInScreenButtonScript=this.openLogInScreenButton.script.uiButton,this.openLogInScreenButtonScript.init("REGISTER OR LOG IN",!0),this.openLogInScreenButtonScript.on("buttonClicked",this.openLogInScreen,this),this.logOutButtonScript=this.logOutButton.script.uiButton,this.logOutButtonScript.init("LOG OUT",!0),this.logOutButtonScript.on("buttonClicked",this.logOut,this),this.setLogInAndOutButtonState(this.firebase.authenticated)}},PreloadScreen.prototype.show=function(e,t){this.subscribedToEvents||(this.subscribedToEvents=!0,this.app.on("serverError",this.onServerError,this),this.app.on("playerNameValidated",this.onPlayerNameValidated,this),this.app.on("serverError",this.onServerError,this),this.storageManager.on("onUserChanged",this.onUserChanged,this),this.popupController.on("popupOpened",this.onPopupOpened,this),this.popupController.on("popupClosed",this.onPopupClosed,this)),this.inputBoxEntity.enabled=!0,this.loadButton.show(),this.keyboardInputHelper.enable(),this.feedbackHandler.show(),this.logoParentEntity.enabled=!0,this.gameBackground.enabled=!0,this.setLogInAndOutButtonState(this.firebase.authenticated),null!==t&&null!==t.feedbackMessage&&this.feedbackHandler.displayFeedback(t.feedbackMessage,3,FeedbackType.Warning)},PreloadScreen.prototype.hide=function(e){this.subscribedToEvents&&(this.subscribedToEvents=!1,this.app.off("serverError",this.onServerError,this),this.app.off("playerNameValidated",this.onPlayerNameValidated,this),this.app.off("serverError",this.onServerError,this),this.storageManager.off("onUserChanged",this.onUserChanged,this),this.popupController.off("popupOpened",this.onPopupOpened,this),this.popupController.off("popupClosed",this.onPopupClosed,this)),this.gameBackground.enabled=!1,this.keyboardInputHelper.disable(),this.feedbackHandler.hide(),this.logoParentEntity.enabled=!1,this.openLogInScreenButtonScript.hide(),this.logOutButtonScript.hide(),this.loadButton.hide()},PreloadScreen.prototype.onLoadButtonClicked=function(){this.validatePlayerName()},PreloadScreen.prototype.onServerError=function(e){e===ServerErrorCodes.IncompatibleClientVersion&&(this.feedbackHandler.displayFeedback("Game outdated. Please refresh",3,FeedbackType.Warning),this.loadButton.show())},PreloadScreen.prototype.validatePlayerName=function(){var e=this.keyboardInputHelper.getValidatedInputName();null!==e&&""!==e?(this.feedbackHandler.clearFeedback(),this.remoteValidatePlayerName(e)):this.loadButton.show()},PreloadScreen.prototype.remoteValidatePlayerName=function(e){this.feedbackHandler.displayFeedback("Checking name...",0,FeedbackType.Message),this.keyboardInputHelper.disableInput(),this.app.fire("requestPlayerNameValidation",e,this.arenaIDToUse)},PreloadScreen.prototype.onPlayerNameValidated=function(e,t){this.feedbackHandler.clearFeedback(),t?(this.feedbackHandler.displayFeedback("Welcome "+e,0,FeedbackType.Message),this.storageManager.save(STORAGE_PlayerName_KEY,e),this.app.fire("uiController:showScreen",UIScreenTypes.LoadingScreen,{loadingScreenType:LoadingScreenStates.waitForAssetsToLoad})):(this.keyboardInputHelper.enableInput(),this.loadButton.show(),this.feedbackHandler.displayFeedback("Name already in use",3,FeedbackType.Warning))},PreloadScreen.prototype.setLogInAndOutButtonState=function(e){e?(this.openLogInScreenButtonScript.hide(),this.logOutButtonScript.show()):(this.openLogInScreenButtonScript.show(),this.logOutButtonScript.hide())},PreloadScreen.prototype.openLogInScreen=function(){this.firebase.authenticated?this.setLogInAndOutButtonState(this.firebase.authenticated):this.firebase.isLoggingIn()?this.openLogInScreenButtonScript.showLoadingState():this.popupController.showPopup(UIPopupTypes.LogInPopup)},PreloadScreen.prototype.onUserChanged=function(e){if(this.logOutButtonScript.enabled||this.openLogInScreenButtonScript.enabled){this.setLogInAndOutButtonState(e),this.playerGuid=this.storageManager.loadPlayerGuid();var t=this.storageManager.load(STORAGE_PlayerName_KEY);this.keyboardInputHelper.changeName(t)}},PreloadScreen.prototype.onPopupOpened=function(){this.openLogInScreenButtonScript.hide(),this.logOutButtonScript.hide()},PreloadScreen.prototype.onPopupClosed=function(){this.setLogInAndOutButtonState(this.firebase.authenticated)},PreloadScreen.prototype.logOut=function(){this.firebase.signOut()},PreloadScreen.prototype.onFirebaseSignedOut=function(e){e||this.logOutButtonScript.showNormalState()};var InputBoxHelper=pc.createScript("inputBoxHelper");InputBoxHelper.attributes.add("inputFieldBackgroundEntity",{type:"entity",title:"Input Field Background"}),InputBoxHelper.attributes.add("inputFieldContentsEntity",{type:"entity",title:"Input Field Contents"}),InputBoxHelper.attributes.add("playerNameEntity",{type:"entity",title:"Player Name"}),InputBoxHelper.attributes.add("feedbackTextEntity",{type:"entity",title:"Input Field Feedback"}),InputBoxHelper.attributes.add("inputBoxContentEntity",{type:"entity",title:"Input Box Content"}),InputBoxHelper.prototype.init=function(t,e){this.globalsController=t;var n="";switch(this.globalsController.deployPlatform){case DeployPlatforms.all_except_facebook:case DeployPlatforms.facebook:n=""}this.feedbackHandler=this.feedbackTextEntity.script.feedbackHandler,this.feedbackHandler.init(n);var i=e.load(STORAGE_PlayerName_KEY);this.keyboardInputHelper=this.playerNameEntity.script.keyboardInputHelper,this.keyboardInputHelper.init(i,this.feedbackHandler,"Invalid character","Invalid name","Name is too long")},InputBoxHelper.prototype.show=function(t){this.entity.enabled=!0,this.enableInput(),this.configureInputBox(),t&&(this.includeInputField(!0),this.feedbackHandler.show()),this.inputBoxContentEntity.element.height=this.calculateInputBoxHeight()},InputBoxHelper.prototype.hide=function(){this.disableInput(),this.entity.enabled=!1},InputBoxHelper.prototype.configureInputBox=function(){if(!this.configured)switch(this.configured=!0,this.globalsController.deployPlatform){case DeployPlatforms.all_except_facebook:this.includeInputField(!0),this.feedbackHandler.show();break;case DeployPlatforms.facebook:this.includeInputField(!1),this.feedbackHandler.hide()}},InputBoxHelper.prototype.includeInputField=function(t){this.inputFieldBackgroundEntity.enabled=t,this.inputFieldContentsEntity.enabled=t,t?this.keyboardInputHelper.enable():this.keyboardInputHelper.disable()},InputBoxHelper.prototype.enableInput=function(){this.keyboardInputHelper.enableInput()},InputBoxHelper.prototype.disableInput=function(){this.keyboardInputHelper.disableInput()},InputBoxHelper.prototype.changeName=function(t){this.keyboardInputHelper.changeName(t)},InputBoxHelper.prototype.exitEditMode=function(){this.keyboardInputHelper.exitEditMode()},InputBoxHelper.prototype.animateErrorFlash=function(){this.keyboardInputHelper.animateErrorFlash()},InputBoxHelper.prototype.getValidatedInputName=function(){return this.keyboardInputHelper.getValidatedInputName()},InputBoxHelper.prototype.displayFeedback=function(t,e,n){this.feedbackHandler.displayFeedback(t,e,n)},InputBoxHelper.prototype.clearFeedback=function(){this.feedbackHandler.clearFeedback()},InputBoxHelper.prototype.calculateInputBoxHeight=function(){var t=50;return this.inputFieldBackgroundEntity.enabled||this.inputFieldContentsEntity.enabled||(t+=25),this.inputFieldBackgroundEntity.enabled&&(t+=this.inputBoxContentEntity.layoutgroup.spacing.y,t+=this.inputFieldBackgroundEntity.element.height),this.inputFieldContentsEntity.enabled&&(t+=this.inputBoxContentEntity.layoutgroup.spacing.y,t+=this.playerNameEntity.element.height),t};var AnimatedBackground=pc.createScript("animatedBackground");AnimatedBackground.attributes.add("clipPlayInterval",{type:"number"}),AnimatedBackground.prototype.initialize=function(){this.time=0,this.sprites=this.entity.children,this.currentSpriteIndex=0,this.done=!1},AnimatedBackground.prototype.update=function(t){this.done||(this.time+=t,this.time>this.clipPlayInterval&&(this.time=0,this.sprites[this.currentSpriteIndex].sprite.play("Idle"),this.currentSpriteIndex++,this.currentSpriteIndex>this.sprites.length-1&&(this.done=!0)))};var IncrementalProgressBar=pc.createScript("incrementalProgressBar");IncrementalProgressBar.attributes.add("progressImage",{type:"entity"}),IncrementalProgressBar.attributes.add("progressImageMaxWidth",{type:"number"}),IncrementalProgressBar.prototype.init=function(){this.updateProgress(0),this.targetValueReached=!0,this.isInitialValueSet=!1},IncrementalProgressBar.prototype.setProgress=function(e){e=pc.math.clamp(e,0,1),this.targetValue=e,this.targetValueReached=!1},IncrementalProgressBar.prototype.update=function(e){this.targetValueReached||(this.isInitialValueSet?(this.progress=this.targetValue,this.targetValueReached=!0):(this.progress=this.targetValue,this.isInitialValueSet=!0),this.updateProgress(this.progress))},IncrementalProgressBar.prototype.updateProgress=function(e){e=pc.math.clamp(e,0,1),this.currentState=e;var t=pc.math.lerp(0,this.progressImageMaxWidth,e);this.progressImage.element.width=t,this.progressImage.element.rect.z=e};var ScrollVerticalAreaFitter=pc.createScript("scrollVerticalAreaFitter");ScrollVerticalAreaFitter.prototype._onContentChanged=function(){var t=this.entity.layoutgroup;if(t){for(var e=t.padding.y+t.padding.w,i=0,n=this.entity.children,r=0;r<n.length;++r){var a=n[r];a.layoutchild&&a.enabled&&(i+=1,e+=a.element.height)}e+=Math.max(0,i-1)*t.spacing.y,this.entity.element.height=e}},ScrollVerticalAreaFitter.prototype.initialize=function(){this.entity.on("contentchanged",this._onContentChanged,this),this._onContentChanged()};var ScrollController=pc.createScript("scrollController");ScrollController.attributes.add("textField",{type:"entity",title:"Text Content Field"}),ScrollController.prototype.initialize=function(){this._content=this.entity.scrollview.contentEntity,"string"==typeof this._content&&(this._content=this.app.getEntityFromIndex(this._content)),this.textField&&this.textField.on("destroy",(function(){this._content.fire("contentchanged")}),this),this._content.fire("contentchanged"),this._content.element.on("mousewheel",(function(t){var e=this.entity.scrollview.scroll;this.entity.scrollview._onSetScroll(e.x,e.y+.15*t.wheelDelta,!1)}),this)},ScrollController.prototype.RefreshContent=function(){this._content.fire("contentchanged")},ScrollController.prototype.ResetScrollbarPosition=function(){var t=this.entity.scrollview.scroll;this.entity.scrollview._onSetScroll(t.x,0,!1)};function Firebase(e){pc.EventHandler.call(this),this.initialize(e)}Firebase.prototype=Object.create(pc.EventHandler.prototype),pc.extend(Firebase.prototype,{constructor:pc.EventHandler,initialize:function(e){switch(e.firebaseBackendType){case FirebaseBackendType.test:this.firebaseConfig={apiKey:"AIzaSyA6Aern3zq67XYPk83cJQL8YMRvw2xRLnM",authDomain:"kiloo-test.firebaseapp.com",databaseURL:"https://kiloo-test-default-rtdb.europe-west1.firebasedatabase.app",projectId:"kiloo-test",storageBucket:"kiloo-test.appspot.com",messagingSenderId:"161265056741",appId:"1:161265056741:web:947b924b2dd12c4fb5cd0c"};break;case FirebaseBackendType.production:default:this.firebaseConfig={apiKey:"AIzaSyC_IBcFdeLNJXU7N_PGwekpoxgTfnP5rs0",authDomain:"bullet-bonanza.firebaseapp.com",databaseURL:"https://bullet-bonanza-default-rtdb.europe-west1.firebasedatabase.app",projectId:"bullet-bonanza",storageBucket:"bullet-bonanza.appspot.com",messagingSenderId:"836916308295",appId:"1:836916308295:web:c6ba62f746b89cb982c462"}}this.initialized=!1,this.globalsController=e,pc.app.on("receivedServerTime",this.onReceivedServerTime,this),pc.app.on("sessionStarted",this.onSessionStarted,this),pc.app.on("cooldownStarted",this.onCooldownStarted,this),pc.app.on("windowLostFocus",this.onWindowLostFocus,this),pc.app.on("windowGainedFocus",this.onWindowGainedFocus,this),this.nloaded=0,this.logging=!1,this.lastSaveTime=null,this.data={},this.dataToSave={},this.saving=!1,this.signOutInterval=null,this.waitingForNameCheck=!1,this.user=void 0,this.dataLoaded=!1,this.authenticated=!1,this.dataToSaveQueue=[],this.saveQueueEmpty=!0,this.pendingSave=!1,this.load()},load:function(){var e=document.createElement("script");e.type="text/javascript",e.src="https://www.gstatic.com/firebasejs/8.7.1/firebase-app.js",document.head.append(e);var t=this;e.onload=function(){var e=document.createElement("script");e.type="text/javascript",e.src="https://www.gstatic.com/firebasejs/8.7.1/firebase-auth.js",document.head.append(e);var i=document.createElement("script");i.type="text/javascript",i.src="https://www.gstatic.com/firebasejs/8.7.1/firebase-database.js",document.head.append(i),t.scripts=[e,i];for(var a=0;a<t.scripts.length;a++){t.scripts[a].onload=t.onLoaded.bind(t)}}},onLoaded:function(){this.nloaded++,this.nloaded===this.scripts.length&&this.complete()},complete:function(){firebase.initializeApp(this.firebaseConfig);var e=this;firebase.auth().onAuthStateChanged((function(t){e.setUser(t)}))},onReceivedServerTime:function(e){null!=e&&(this.lastSaveTime=new Date(e).getTime(),this.keepLastSaveTimeUpdated())},onSessionStarted:function(e,t){null!=t&&(this.lastSaveTime=new Date(t).getTime(),this.keepLastSaveTimeUpdated())},onCooldownStarted:function(e,t){null!=t&&(this.lastSaveTime=new Date(t).getTime(),this.keepLastSaveTimeUpdated())},onWindowLostFocus:function(){"undefined"!=typeof firebase&&firebase.database().goOffline()},onWindowGainedFocus:function(){"undefined"!=typeof firebase&&firebase.database().goOnline()},setUser:function(e){this.logging=!1;var t=this.user!==e;this.user=e;var i=this;if(this.user){if(!this.isUserVerified())return void this.signOut();t&&firebase.database().ref("data/private/"+e.uid+"/clientData").get().then((function(e){i.setData(e),i.initialized||(i.initialized=!0,pc.app.fire("firebaseInitialized")),i.dataLoaded=!0,i.authenticated=!!i.user,i.keepLastSaveTimeUpdated(),i.fire("userChanged",!!i.user)})).catch((function(e){console.log(e),i.signOut()}))}else this.dataLoaded=!0,this.data={},this.initialized||(this.initialized=!0,pc.app.fire("firebaseInitialized")),t&&(this.authenticated=!!this.user,this.fire("userChanged",!!this.user),t=!1)},isInitialized:function(){return this.initialized},isLoggingIn:function(){return!!this.user&&!this.dataLoaded},isLoggedIn:function(){return!!this.user&&this.dataLoaded},setData:function(e){const t=e.val();null===this.data&&(this.data={});var i=this;t&&Object.keys(t).forEach((function(e){i.data[e]=t[e]}))},isUserVerified:function(){return!!this.user.providerData.find((e=>"facebook.com"===e.providerId))||this.user.emailVerified},getUserGuid:function(){var e=null;return void 0!==this.user&&null!==this.user&&(e=this.user.uid),e},signInGoogle:function(){var e=this;return new Promise((function(t,i){if(!e.logging){e.logging=!0;var a=new firebase.auth.GoogleAuthProvider;return firebase.auth().signInWithPopup(a).then((function(){t(),e.saveAfterDelay()})).catch((function(e){i(e)})).finally((function(){e.logging=!1}))}i()}))},signInFacebook:function(){var e=this;return new Promise((function(t,i){if(e.logging)return console.log("I'm already logging",this.user),void i();e.logging=!0;var a=new firebase.auth.FacebookAuthProvider;return firebase.auth().signInWithPopup(a).then((function(){t(),e.saveAfterDelay()})).catch((t=>{i(t),e.logging=!1}))}))},registerEmailAndPassword:function(e,t){var i=this;return new Promise((function(a,n){if(i.logging)return console.log("I'm already logging",this.user),void n();i.logging=!0,firebase.auth().createUserWithEmailAndPassword(e,t).then((function(e){e.user;a(),i.saveAfterDelay()})).catch((function(e){n(e)})).finally((function(){i.logging=!1}))}))},signInEmailAndPassword:function(e,t){var i=this;return new Promise((function(a,n){if(i.logging)return console.log("I'm already logging",this.user),void n();i.logging=!0,firebase.auth().signInWithEmailAndPassword(e,t).then((function(e){e.user;a(),i.saveAfterDelay()})).catch((function(e){n(e)})).finally((function(){i.logging=!1}))}))},signOut:function(){this.pendingSave||this.saving||!this.saveQueueEmpty?null===this.signOutInterval&&(this.signOutInterval=setInterval(function(){this.pendingSave||this.saving||!this.saveQueueEmpty||(this.signOutDelayed(),clearInterval(this.signOutInterval),this.signOutInterval=null)}.bind(this),10)):this.signOutDelayed()},signOutDelayed:function(){var e=this;new Promise((function(t,i){e.logging?i():(e.logging=!0,firebase.auth().signOut().then((function(){e.fire("Firebase:signedOut",!0),t()})).catch((function(t){e.fire("Firebase:signedOut",!1),i(t)})).finally((function(){e.logging=!1})))}))},sendVerificationEmail:function(){var e=this;return new Promise((function(t,i){e.user.sendEmailVerification().then((function(e){t()})).catch((function(e){i(e)}))}))},sendPasswordResetEmail:function(e){return new Promise((function(t,i){firebase.auth().sendPasswordResetEmail(e).then((()=>{t()})).catch((e=>{i(e)}))}))},get:function(e){return this.data[e]},delete:function(e){this.save(e,void 0)},save:function(e,t){let i=this.data[e];if(null==i||i!==t&&i!==""+t){if(this.saving)return this.saveQueueEmpty=!1,void this.dataToSaveQueue.push(this.save.bind(this,e,t));this.pendingSave=!0,this.dataToSave[e]="string"==typeof t?t:JSON.stringify(t),clearTimeout(this.saveDelay),null!==this.lastSaveTime&&(this.saveDelay=setTimeout(this.saveAfterDelay.bind(this),Firebase.SAVE_DELAY))}},saveAfterDelay:function(){var e=firebase.auth().currentUser;if(null!=e){this.saving=!0;var t=this;if(Object.keys(this.dataToSave).includes(STORAGE_PlayerName_KEY)){var i=this.dataToSave[STORAGE_PlayerName_KEY],a={};a[STORAGE_PlayerName_KEY]=i,firebase.database().ref("data/public/"+e.uid).update(a).then((function(){})).catch((function(e){console.error(e)}))}this.dataToSave.clientVersion=this.globalsController.clientVersionNumber,this.dataToSave.lastSaveTime=this.lastSaveTime,firebase.database().ref("data/private/"+firebase.auth().currentUser.uid+"/clientData").update(this.dataToSave).then((function(){var e=Object.keys(t.data);for(var i in t.dataToSave)e.includes(i)&&(t.data[i]=t.dataToSave[i]);t.dataToSave={}})).catch((function(e){console.error(e)})).finally((function(){0===t.dataToSaveQueue.length&&(t.saveQueueEmpty=!0,t.pendingSave=!1),t.saving=!1,t.onSaveCompleted()}))}else this.onSaveCompleted()},onSaveCompleted:function(){this.dataToSaveQueue.length>0&&this.dataToSaveQueue.shift()()},keepLastSaveTimeUpdated:function(){if(null===this.lastSaveTime)return;let e=0,t=this.data.lastSaveTime;if(null==t)t=0;else{let e=parseInt(""+t);(isNaN(e)||e<0)&&(t=0)}e=this.lastSaveTime-t,e>864e5&&this.saveAfterDelay()}}),Firebase.SAVE_DELAY=1e3;var AboutPopup=pc.createScript("aboutPopup");AboutPopup.attributes.add("html",{type:"asset",assetType:"html",title:"HTML Asset"}),AboutPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),AboutPopup.attributes.add("scrollController",{type:"entity",title:"ScrollController"}),AboutPopup.attributes.add("headerTitel",{type:"entity"}),AboutPopup.attributes.add("subheader1",{type:"entity"}),AboutPopup.attributes.add("paragraph1",{type:"entity"}),AboutPopup.attributes.add("subheader2",{type:"entity"}),AboutPopup.attributes.add("paragraph2",{type:"entity"}),AboutPopup.attributes.add("subheader3",{type:"entity"}),AboutPopup.attributes.add("paragraph3",{type:"entity"}),AboutPopup.attributes.add("subheader4",{type:"entity"}),AboutPopup.attributes.add("paragraph4",{type:"entity"}),AboutPopup.attributes.add("subheader5",{type:"entity"}),AboutPopup.attributes.add("paragraph5",{type:"entity"}),AboutPopup.attributes.add("subheader6",{type:"entity"}),AboutPopup.attributes.add("paragraph6",{type:"entity"}),AboutPopup.attributes.add("subheader7",{type:"entity"}),AboutPopup.attributes.add("paragraph7",{type:"entity"}),AboutPopup.attributes.add("subheader8",{type:"entity"}),AboutPopup.attributes.add("paragraph8",{type:"entity"}),AboutPopup.attributes.add("subheader9",{type:"entity"}),AboutPopup.attributes.add("paragraph9",{type:"entity"}),AboutPopup.attributes.add("reference1",{type:"entity"}),AboutPopup.attributes.add("reference2",{type:"entity"}),AboutPopup.attributes.add("reference3",{type:"entity"}),AboutPopup.attributes.add("reference4",{type:"entity"}),AboutPopup.attributes.add("reference5",{type:"entity"}),AboutPopup.prototype.init=function(t){if(this.popupType=UIPopupTypes.AboutPopup,t.musicBundleAsset.ready((function(t){e=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=e}),this),this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),document.getElementById("headerTitel"))this.loadText();else{var e=this.html,n=this;e.on("load",(function(){var t=document.createElement("div");t.innerHTML=e.resource||"",document.body.appendChild(t),n.loadText(),document.body.removeChild(t)})),this.app.assets.load(e)}},AboutPopup.prototype.getPopupType=function(){return this.popupType},AboutPopup.prototype.loadText=function(){var t=document.getElementById("headerTitel"),e=document.getElementById("subheader1"),n=document.getElementById("paragraph1"),o=document.getElementById("subheader2"),p=document.getElementById("paragraph2"),u=document.getElementById("subheader3"),a=document.getElementById("paragraph3"),r=document.getElementById("subheader4"),d=document.getElementById("paragraph4"),i=document.getElementById("subheader5"),s=document.getElementById("paragraph5"),h=document.getElementById("reference1"),l=document.getElementById("reference2"),y=document.getElementById("reference3"),b=document.getElementById("reference4"),m=document.getElementById("reference5"),c=document.getElementById("subheader6"),g=document.getElementById("paragraph6"),x=document.getElementById("subheader7"),P=document.getElementById("paragraph7"),A=document.getElementById("subheader8"),C=document.getElementById("paragraph8"),B=document.getElementById("subheader9"),f=document.getElementById("paragraph9");try{this.headerTitel.element.text=t.textContent,this.subheader1.element.text=e.textContent,this.paragraph1.element.text=n.textContent,this.subheader2.element.text=o.textContent,this.paragraph2.element.text=p.textContent,this.subheader3.element.text=u.textContent,this.paragraph3.element.text=a.textContent,this.subheader4.element.text=r.textContent,this.paragraph4.element.text=d.textContent,this.subheader5.element.text=i.textContent,this.paragraph5.element.text=s.textContent,this.reference1.element.text=h.textContent,this.reference2.element.text=l.textContent,this.reference3.element.text=y.textContent,this.reference4.element.text=b.textContent,this.reference5.element.text=m.textContent,this.subheader6.element.text=c.textContent,this.paragraph6.element.text=g.textContent,this.subheader7.element.text=x.textContent,this.paragraph7.element.text=P.textContent,this.subheader8.element.text=A.textContent,this.paragraph8.element.text=C.textContent,this.subheader9.element.text=B.textContent,this.paragraph9.element.text=f.textContent}catch(t){console.error("Error loading AboutPopup text content! Maybe you forgot to add it to the index.html after export: "+t)}},AboutPopup.prototype.show=function(){this.entity.enabled=!0,this.scrollController.script.scrollController.RefreshContent(),this.closeButtonScript.show(),this.fire("popupOpened",this.popupType)},AboutPopup.prototype.hide=function(){this.entity.enabled&&(this.closeButtonScript.hide(),this.entity.enabled=!1,this.fire("popupClosed",this.popupType))},AboutPopup.prototype.reset=function(){},AboutPopup.prototype.onPopupCloseButtonClicked=function(){this.hide(),this.entity.sound.slot("button_small").play()};var UrlOpenButton=pc.createScript("urlOpenButton");UrlOpenButton.prototype.initialize=function(){this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this)),this.entity.element.color=new pc.Color(6/255,69/255,173/255)},UrlOpenButton.prototype.onRelease=function(){window.open(this.entity.element.text),this.entity.element.color=new pc.Color(11/255,0,128/255)};var PopupController=pc.createScript("popupController");PopupController.attributes.add("semitransparentBackgroundOverlay",{type:"entity",title:"semitransparentBackgroundOverlay"}),PopupController.attributes.add("worldSemitransparentBackgroundOverlay",{type:"entity",title:"worldSemitransparentBackgroundOverlay"}),PopupController.attributes.add("inputBlocker",{type:"entity",title:"inputBlocker"}),PopupController.attributes.add("aboutPopupEntity",{type:"entity",title:"About Popup"}),PopupController.attributes.add("hatsPopupEntity",{type:"entity",title:"Hats Popup"}),PopupController.attributes.add("outfitsPopupEntity",{type:"entity",title:"Outfits Popup"}),PopupController.attributes.add("earnedCurrencyPopupEntity",{type:"entity",title:"Earned Currency Popup"}),PopupController.attributes.add("globalLeaderboardsPopupEntity",{type:"entity",title:"Global Leaderboards Popup"}),PopupController.attributes.add("privateArenaPopupEntity",{type:"entity",title:"Private Arena Popup"}),PopupController.attributes.add("loginPopupEntity",{type:"entity",title:"Login Popup"}),PopupController.attributes.add("userIdPopupEntity",{type:"entity",title:"User ID Popup"}),PopupController.attributes.add("ranksPopupEntity",{type:"entity",title:"Ranks Popup"}),PopupController.attributes.add("settingsPopupEntity",{type:"entity",title:"Settings Popup"}),PopupController.prototype.init=function(t,p,e,o,i,u,s,n,r){this.activePopup=null,this.cacheReferences(),this.disableReferences(),this.initializeReferences(t,p,e,o,i,u,s,n,r),this.entity.enabled=!0},PopupController.prototype.cacheReferences=function(){this.aboutPopup=this.aboutPopupEntity.script.aboutPopup,this.privateArenaPopup=this.privateArenaPopupEntity.script.privateArenaPopup,this.loginPopup=this.loginPopupEntity.script.logInPopup,this.userIdPopup=this.userIdPopupEntity.script.userIdPopup,this.ranksPopup=this.ranksPopupEntity.script.ranksPopup,this.settingsPopup=this.settingsPopupEntity.script.settingsPopup,this.globalLeaderboardsPopup=this.globalLeaderboardsPopupEntity.script.globalLeaderboardsPopup,this.hatsPopup=this.hatsPopupEntity.script.hatsPopup,this.outfitsPopup=this.outfitsPopupEntity.script.outfitsPopup,this.earnedCurrencyPopup=this.earnedCurrencyPopupEntity.script.earnedCurrencyPopup},PopupController.prototype.disableReferences=function(){this.aboutPopup.entity.enabled=!1,this.privateArenaPopup.entity.enabled=!1,this.loginPopup.entity.enabled=!1,this.userIdPopup.entity.enabled=!1,this.ranksPopup.entity.enabled=!1,this.settingsPopup.entity.enabled=!1,this.globalLeaderboardsPopup.entity.enabled=!1,this.hatsPopup.entity.enabled=!1,this.outfitsPopup.entity.enabled=!1,this.earnedCurrencyPopup.entity.enabled=!1},PopupController.prototype.initializeReferences=function(t,p,e,o,i,u,s,n,r){this.aboutPopup.init(t),this.privateArenaPopup.init(t),this.loginPopup.init(p,t,e),this.userIdPopup.init(t,e),this.ranksPopup.init(t,o),this.settingsPopup.init(t,i,p),this.globalLeaderboardsPopup.init(t,o,u),this.hatsPopup.init(t,s,n,r),this.outfitsPopup.init(t,s,n,r),this.earnedCurrencyPopup.init(t)},PopupController.prototype.showPopup=function(t,p){if(null!==this.activePopup){var e=this.activePopup.getPopupType();if(t===e)return void this.activePopup.show(p);this.hidePopup(e)}switch(t){case UIPopupTypes.AboutPopup:this.activePopup=this.aboutPopup;break;case UIPopupTypes.PrivateArenaPopup:this.activePopup=this.privateArenaPopup;break;case UIPopupTypes.LogInPopup:this.activePopup=this.loginPopup;break;case UIPopupTypes.UserIDPopup:this.activePopup=this.userIdPopup;break;case UIPopupTypes.RanksPopup:this.activePopup=this.ranksPopup;break;case UIPopupTypes.SettingsPopup:this.activePopup=this.settingsPopup;break;case UIPopupTypes.GlobalLeaderboardsPopup:this.activePopup=this.globalLeaderboardsPopup;break;case UIPopupTypes.HatsPopup:this.activePopup=this.hatsPopup;break;case UIPopupTypes.OutfitsPopup:this.activePopup=this.outfitsPopup;break;case UIPopupTypes.EarnedCurrencyPopup:this.activePopup=this.earnedCurrencyPopup}null!=this.activePopup&&(this.activePopup.entity.enabled=!0,this.activePopup.on("popupOpened",this.onPopupOpened,this),this.activePopup.on("popupClosed",this.onPopupClosed,this),this.activePopup.on("popupAction",this.onPopupAction,this),this.activePopup.show(p))},PopupController.prototype.hidePopup=function(t){null!==this.activePopup&&this.activePopup.getPopupType()===t&&this.activePopup.hide()},PopupController.prototype.resetActivePopup=function(){null!==this.activePopup&&this.activePopup.reset()},PopupController.prototype.getActivePopupType=function(){var t=null;return null!==this.activePopup&&(t=this.activePopup.getPopupType()),t},PopupController.prototype.onPopupOpened=function(t){switch(t){case UIPopupTypes.EarnedCurrencyPopup:this.inputBlocker.enabled=!0,this.semitransparentBackgroundOverlay.enabled=!0;break;case UIPopupTypes.OutfitsPopup:case UIPopupTypes.HatsPopup:this.worldSemitransparentBackgroundOverlay.enabled=!0;break;default:this.semitransparentBackgroundOverlay.enabled=!0}this.fire("popupOpened",t)},PopupController.prototype.onPopupClosed=function(t){this.semitransparentBackgroundOverlay.enabled=!1,this.worldSemitransparentBackgroundOverlay.enabled=!1,this.inputBlocker.enabled=!1,null!==this.activePopup&&this.activePopup.getPopupType()===t&&(this.activePopup.off("popupOpened",this.onPopupOpened,this),this.activePopup.off("popupClosed",this.onPopupClosed,this),this.activePopup.off("popupAction",this.onPopupAction,this),this.activePopup=null),this.fire("popupClosed",t)},PopupController.prototype.onPopupAction=function(t,p,e){this.fire("popupAction",t,p,e)};var UiButton=pc.createScript("uiButton"),UIButtonTypes={regular:1,tab:2,toggle:3};UiButton.attributes.add("buttonType",{type:"number",enum:[{regular:UIButtonTypes.regular},{tab:UIButtonTypes.tab},{toggle:UIButtonTypes.toggle}],default:UIButtonTypes.regular,title:"Button Type"}),UiButton.attributes.add("backgroundEntity",{type:"entity",title:"Background"}),UiButton.attributes.add("textEntity",{type:"entity",title:"Text"}),UiButton.attributes.add("spinnerEntity",{type:"entity",title:"Spinner"}),UiButton.attributes.add("pressedStateIndicatorEntity",{type:"entity",title:"Pressed State Indicator"}),UiButton.attributes.add("backgrounds",{type:"asset",assetType:"sprite",array:!0,title:"Background Sprites"}),UiButton.attributes.add("backgroundTextures",{type:"asset",assetType:"texture",array:!0,title:"Background Textures"}),UiButton.attributes.add("textColors",{type:"json",schema:[{name:"defaultTextColor",type:"rgba",array:!0},{name:"defaultTextShadowColor",type:"rgba",array:!0},{name:"defaultTextShadowOffset",type:"number",array:!0},{name:"pressedTextColor",type:"rgba",array:!0},{name:"pressedTextShadowColor",type:"rgba",array:!0},{name:"pressedTextShadowOffset",type:"number",array:!0}]});var UiButtonStates={normal:0,pressed:1};UiButton.prototype.init=function(t,e){this.isSubscribedToEvents=!1,this.stateTimeout=null,this.spinnerTimeout=null,this.activeState=UiButtonStates.normal,this.backgroundEntity?this.backgroundElement=this.backgroundEntity.element:this.backgroundElement=this.entity.element,this.textEntity&&(this.textElement=this.textEntity.element),this.backgrounds.length>0&&(this.normalBackground=this.backgrounds[0],this.pressedBackground=this.backgrounds[1]),this.backgroundTextures.length>0&&(this.normalBackground=this.backgroundTextures[0],this.pressedBackground=this.backgroundTextures[1]),this.textColors.defaultTextColor.length>0&&(this.defaultTextColor=this.textColors.defaultTextColor[0]),this.textColors.defaultTextShadowColor.length>0&&(this.defaultShadowTextColor=this.textColors.defaultTextShadowColor[0],this.defaultShadowTextOffset=new pc.Vec2(this.textColors.defaultTextShadowOffset[0],this.textColors.defaultTextShadowOffset[1])),this.textColors.pressedTextColor.length>0&&(this.pressedTextColor=this.textColors.pressedTextColor[0]),this.textColors.pressedTextShadowColor.length>0&&(this.pressedShadowTextColor=this.textColors.pressedTextShadowColor[0],this.pressedShadowTextOffset=new pc.Vec2(this.textColors.pressedTextShadowOffset[0],this.textColors.pressedTextShadowOffset[1])),this.spinnerEntity?this.showSpinnerOnClick=null!=e&&e:this.showSpinnerOnClick=!1,this.textElement&&(this.textElement.text=t),this.isPressed=!1,this.allowInteraction=!0},UiButton.prototype.show=function(t,e,s){this.entity.enabled=!0,this.isSubscribedToEvents||(this.isSubscribedToEvents=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this)),this.app.mouse.on(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this)),null!=s&&null!==this.textElement&&(this.textElement.text=s),this.spinnerEntity&&null!=e&&(this.showSpinnerOnClick=e,this.spinnerTimeout=null),t?this.showPressedState():this.showNormalState()},UiButton.prototype.hide=function(){this.isSubscribedToEvents&&(this.isSubscribedToEvents=!1,this.entity.element.off(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.off(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.off(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.off(pc.EVENT_TOUCHEND,this.onRelease,this)),this.app.mouse.off(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this)),null!==this.stateTimeout&&(clearTimeout(this.stateTimeout),this.stateTimeout=null),this.spinnerEntity&&(this.spinnerEntity.enabled=!1),null!==this.spinnerTimeout&&(clearTimeout(this.spinnerTimeout),this.spinnerTimeout=null),this.entity.enabled=!1},UiButton.prototype.onPress=function(t){if(!this.isPressed&&this.allowInteraction)switch(this.isPressed=!0,this.buttonType){case UIButtonTypes.regular:case UIButtonTypes.tab:this.showPressedState();break;case UIButtonTypes.toggle:this.activeState===UiButtonStates.normal?this.showPressedState():this.showNormalState()}},UiButton.prototype.onRelease=function(t){this.isPressed&&(this.isPressed=!1,this.buttonClicked())},UiButton.prototype.onUnfocusedRelease=function(t){if(this.isPressed)switch(this.isPressed=!1,this.buttonType){case UIButtonTypes.regular:case UIButtonTypes.tab:this.showNormalState();break;case UIButtonTypes.toggle:this.activeState===UiButtonStates.normal?this.showPressedState():this.showNormalState()}},UiButton.prototype.buttonClicked=function(){this.showSpinnerOnClick&&(this.textEntity&&(this.textEntity.enabled=!1),this.spinnerEntity&&(this.spinnerEntity.enabled=!0,null===this.spinnerTimeout&&(this.spinnerTimeout=setTimeout(function(){this.showNormalState(),this.fire("buttonTimedOut"),this.spinnetTimeout=null}.bind(this),3e4)))),this.fire("buttonClicked")},UiButton.prototype.showNormalState=function(){this.activeState=UiButtonStates.normal,this.allowInteraction=!0,this.textEntity&&(this.textEntity.enabled=!0),this.backgrounds.length>0&&this.normalBackground?this.backgroundElement.sprite=this.normalBackground.resource:this.backgroundTextures.length>0&&this.normalBackground&&(this.backgroundElement.texture=this.normalBackground.resource),this.textElement&&(this.defaultTextColor&&(this.textElement.color=this.defaultTextColor),this.defaultShadowTextColor?(this.textElement.shadowOffset=this.defaultShadowTextOffset,this.textElement.shadowColor=this.defaultShadowTextColor):this.textElement.shadowOffset=pc.Vec2.ZERO),this.spinnerEntity&&(this.spinnerEntity.enabled=!1,null!==this.spinnerTimeout&&(clearTimeout(this.spinnerTimeout),this.spinnerTimeout=null)),this.pressedStateIndicatorEntity&&(this.pressedStateIndicatorEntity.enabled=!1)},UiButton.prototype.showPressedState=function(){switch(this.activeState=UiButtonStates.pressed,this.buttonType){case UIButtonTypes.regular:case UIButtonTypes.tab:this.allowInteraction=!1;break;case UIButtonTypes.toggle:this.allowInteraction=!0}this.textEntity&&(this.textEntity.enabled=!0),this.backgrounds.length>0&&this.pressedBackground?this.backgroundElement.sprite=this.pressedBackground.resource:this.backgroundTextures.length>0&&this.pressedBackground&&(this.backgroundElement.texture=this.pressedBackground.resource),this.textElement&&(this.pressedTextColor&&(this.textElement.color=this.pressedTextColor),this.pressedShadowTextColor?(this.textElement.shadowOffset=this.pressedShadowTextOffset,this.textElement.shadowColor=this.pressedShadowTextColor):this.textElement.shadowOffset=pc.Vec2.ZERO),this.spinnerEntity&&(this.spinnerEntity.enabled=!1,null!==this.spinnerTimeout&&(clearTimeout(this.spinnerTimeout),this.spinnerTimeout=null)),this.pressedStateIndicatorEntity&&(this.pressedStateIndicatorEntity.enabled=!0)};var LogInPopup=pc.createScript("logInPopup");LogInPopup.attributes.add("logInButton",{type:"entity",title:"Log In Button"}),LogInPopup.attributes.add("registerButton",{type:"entity",title:"Register Button"}),LogInPopup.attributes.add("forgotPasswordButton",{type:"entity",title:"Forgot Password Button"}),LogInPopup.attributes.add("googleButton",{type:"entity",title:"Google Button"}),LogInPopup.attributes.add("facebookButton",{type:"entity",title:"Facebook Button"}),LogInPopup.attributes.add("feedbackTextEntity",{type:"entity",title:"Feedback Text Entity"}),LogInPopup.attributes.add("emailPasswordInputEntity",{type:"entity",title:"Email Password Input Entity"}),LogInPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),LogInPopup.attributes.add("errorMessages",{type:"json",array:!0,title:"Custom Error messages",schema:[{name:"code",type:"string",default:"auth/"},{name:"message",type:"string",default:""}]}),pc.extend(LogInPopup.prototype,{getPopupType:function(){return this.popupType},init:function(t,e,i){this.popupType=UIPopupTypes.LogInPopup,e.musicBundleAsset.ready((function(t){asset=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=asset}),this),this.storageManager=t,this.firebase=i,this.feedbackHandlerTimeout=null,this.logInButtonScript=this.logInButton.script.uiButton,this.logInButtonScript.init("LOG IN",!0),this.logInButtonScript.on("buttonClicked",this.emailPasswordSignIn,this),this.registerButtonScript=this.registerButton.script.uiButton,this.registerButtonScript.init("REGISTER",!0),this.registerButtonScript.on("buttonClicked",this.emailPasswordRegister,this),this.forgotPasswordButtonScript=this.forgotPasswordButton.script.forgotPasswordButton,this.forgotPasswordButtonScript.init("Forgot your password?"),this.forgotPasswordButtonScript.on("buttonClicked",this.passwordReset,this),this.googleButtonScript=this.googleButton.script.uiButton,this.googleButtonScript.init("GOOGLE",!0),this.googleButtonScript.on("buttonClicked",this.googleSignIn,this),this.facebookButtonScript=this.facebookButton.script.uiButton,this.facebookButtonScript.init("FACEBOOK",!0),this.facebookButtonScript.on("buttonClicked",this.facebookSignIn,this),this.emailPasswordInputHelper=this.emailPasswordInputEntity.script.emailPasswordInputHelper,this.emailPasswordInputHelper.init(),this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onCloseButtonPressed,this)},show:function(){this.entity.enabled=!0,this.emailPasswordInputHelper.enable(),this.closeButtonScript.show(),this.logInButtonScript.show(),this.registerButtonScript.show(),this.forgotPasswordButtonScript.show(),this.googleButtonScript.show(),this.facebookButtonScript.show(),this.setErrorFeedbackText(),this.storageManager.on("onUserChanged",this.onUserChanged,this),this.emailPasswordInputHelper.on("complete",this.logInButtonScript.buttonClicked,this.logInButtonScript),this.fire("popupOpened",this.popupType)},onCloseButtonPressed:function(){this.hide(),this.entity.sound.slot("button_small").play()},hide:function(){this.entity.enabled=!1,this.emailPasswordInputHelper.disable(),this.closeButtonScript.hide(),this.logInButtonScript.hide(),this.registerButtonScript.hide(),this.forgotPasswordButtonScript.hide(),this.googleButtonScript.hide(),this.facebookButtonScript.hide(),this.emailPasswordInputHelper.off("complete",this.logInButtonScript.buttonClicked,this.logInButtonScript),this.storageManager.off("onUserChanged",this.hide,this),this.fire("popupClosed",this.popupType)},reset:function(){},onUserChanged:function(t){t&&this.hide()},emailPasswordRegister:function(){this.setErrorFeedbackText();var t=this.firebase.registerEmailAndPassword(this.emailPasswordInputHelper.getEmail(),this.emailPasswordInputHelper.getPassword()),e=this;t.then((function(){e.onRegisterSuccess()})).catch((function(t){e.onSignInFail(t),e.registerButtonScript.showNormalState()})),this.entity.sound.slot("button_small").play()},emailPasswordSignIn:function(){if(this.emailPasswordInputHelper.getPassword().length<6)return this.setErrorFeedbackText("The password must be 6 characters long or more."),void this.logInButtonScript.showNormalState();this.setErrorFeedbackText();var t=this.firebase.signInEmailAndPassword(this.emailPasswordInputHelper.getEmail(),this.emailPasswordInputHelper.getPassword()),e=this;t.then((function(){e.onSignInSuccess()})).catch((function(t){console.log(t),e.onSignInFail(t),e.logInButtonScript.showNormalState()})),this.entity.sound.slot("button_small").play()},googleSignIn:function(){this.setErrorFeedbackText();var t=this.firebase.signInGoogle(),e=this;t.then((function(){e.onSignInSuccess()})).catch((function(t){console.log(t),e.onSignInFail(t),e.googleButtonScript.showNormalState()})),this.entity.sound.slot("button_small").play()},facebookSignIn:function(){this.setErrorFeedbackText();var t=this.firebase.signInFacebook(),e=this;t.then((function(){e.onSignInSuccess()})).catch((function(t){e.onSignInFail(t),e.facebookButtonScript.showNormalState()})),this.entity.sound.slot("button_small").play()},onRegisterSuccess:function(){this.registerButtonScript.showNormalState();var t=this;this.firebase.isUserVerified()?this.hide():this.firebase.sendVerificationEmail().then((function(){t.setSuccessFeedbackText("A verification email has been sent.")})).catch((function(e){t.setSuccessFeedbackText(e)}))},passwordReset:function(){this.setErrorFeedbackText();var t=this;this.firebase.sendPasswordResetEmail(this.emailPasswordInputHelper.getEmail()).then((function(){t.setSuccessFeedbackText("A password reset email has been sent.")})).catch((function(e){t.setErrorFeedbackText(e)})).finally((function(){t.forgotPasswordButtonScript.showNormalState()})),this.entity.sound.slot("button_small").play()},onSignInSuccess:function(){this.firebase.isUserVerified()?this.hide():this.setErrorFeedbackText("Please verify your email."),this.logInButtonScript.showNormalState(),this.googleButtonScript.showNormalState(),this.facebookButtonScript.showNormalState()},onSignInFail:function(t){this.setErrorFeedbackText(t)},setSuccessFeedbackText:function(t){this.setText(t,SUCCESS_TEXT_COLOR)},setErrorFeedbackText:function(t){this.setText(t,ERROR_TEXT_COLOR)},setText:function(t,e){var i="";if(t)if("string"==typeof t)i=t;else if("string"==typeof t.message){var s=this.errorMessages.find((e=>e.code===t.code));i=s?s.message:t.message}this.feedbackTextEntity.element.text=i,this.feedbackTextEntity.element.color=e,i&&(clearTimeout(this.feedbackHandlerTimeout),this.feedbackHandlerTimeout=setTimeout(function(){this.feedbackTextEntity.element.text=""}.bind(this),7e3))}});var GlobalLeaderboardElementHelper=pc.createScript("globalLeaderboardElementHelper");GlobalLeaderboardElementHelper.attributes.add("numberLabelEntity",{type:"entity",title:"Rank Label"}),GlobalLeaderboardElementHelper.attributes.add("nameLabelEntity",{type:"entity",title:"Name Label"}),GlobalLeaderboardElementHelper.attributes.add("scoreLabelEntity",{type:"entity",title:"Score Label"}),GlobalLeaderboardElementHelper.attributes.add("specialBackgrounds",{type:"asset",assetType:"sprite",array:!0,title:"Timer Foreground Options"}),GlobalLeaderboardElementHelper.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),GlobalLeaderboardElementHelper.prototype.init=function(e){this.Million_Threshold_Number=1e6,this.Max_Whole_Number=1e5,this.backgroundElement=this.entity.element,this.numberElement=this.numberLabelEntity.element,this.nameElement=this.nameLabelEntity.element,this.scoreElement=this.scoreLabelEntity.element,e<3?(this.numberElement.color=Leaderboard_Element_Default_Text_Color_TOP3,this.nameElement.color=Leaderboard_Element_Default_Text_Color_TOP3,this.scoreElement.color=Leaderboard_Element_Default_Text_Color_TOP3):(this.numberElement.color=Leaderboard_Element_Default_Text_Color,this.nameElement.color=Leaderboard_Element_Default_Text_Color,this.scoreElement.color=Leaderboard_Element_Default_Text_Color),this.backgroundElement.sprite=void 0,this.backgroundElement.opacity=1,0===e?this.backgroundElement.color=Leaderboard_Element_Background_Gold:1===e?this.backgroundElement.color=Leaderboard_Element_Background_Silver:2===e&&(this.backgroundElement.color=Leaderboard_Element_Background_Bronze),this.backgroundElement.name="Element"+e,this.nameElement.outlineColor=Leaderboard_Element_Highlighted_Text_Shadow_Color},GlobalLeaderboardElementHelper.prototype.show=function(e,t,l,r,o){var a,n;(e=parseInt(e),!isNaN(e)&&e>=this.Max_Whole_Number)&&(e>=this.Million_Threshold_Number?e=(a=e/this.Million_Threshold_Number).toFixed(1)+"M":e>=this.Max_Whole_Number&&(a=e/1e3,e=Math.trunc(a)+"K"));(scoreNumber=parseInt(l),!isNaN(scoreNumber)&&scoreNumber>=this.Max_Whole_Number)&&(scoreNumber>=this.Million_Threshold_Number?(n=scoreNumber/this.Million_Threshold_Number,scoreNumber=n.toFixed(2)+"M"):scoreNumber>=this.Max_Whole_Number&&(n=scoreNumber/1e3,scoreNumber=Math.trunc(n)+"K"),l=scoreNumber);this.numberElement.text=e,this.nameElement.text=t,this.scoreElement.text=l,r?(this.nameElement.color=Leaderboard_Element_Highlighted_Text_Color,this.nameElement.outlineThickness=1):(this.nameElement.color=e<4?Leaderboard_Element_Default_Text_Color_TOP3:Leaderboard_Element_Default_Text_Color,this.nameElement.outlineThickness=0),o?(this.profileRankEmblem.enabled=!0,this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper,this.profileRankEmblemHelper.setEmblem(o)):this.profileRankEmblem.enabled=!1,this.entity.enabled=!0},GlobalLeaderboardElementHelper.prototype.hide=function(){this.entity.enabled=!1};var ButtonTimerHandler=pc.createScript("buttonTimerHandler");ButtonTimerHandler.prototype.init=function(){this.label=this.entity.element,this.isSubscribedToEvents=!1},ButtonTimerHandler.prototype.show=function(i){this.label.entity.enabled=!0,this.isSubscribedToEvents||(this.isSubscribedToEvents=!0,this.app.on("windowGainedFocus",this.onGainedFocus,this)),this.nowTime=Date.now(),this.countDownTime=new Date(i).getTime();var t=this.countDownTime-this.nowTime;this.updateTimerLabel(t,!0),this.timerStart=!0},ButtonTimerHandler.prototype.hide=function(){this.isSubscribedToEvents&&(this.isSubscribedToEvents=!1,this.app.off("windowGainedFocus",this.onGainedFocus,this)),this.timerStart=!1,this.label.entity.enabled=!1},ButtonTimerHandler.prototype.update=function(i){if(this.timerStart){this.nowTime+=1e3*i;var t=this.countDownTime-this.nowTime;this.updateTimerLabel(t,!1)}},ButtonTimerHandler.prototype.updateTimerLabel=function(i,t){this.secondsRemaining=Math.floor(i%6e4/1e3),this.totalSecondsRemaining=Math.floor(i/1e3),(this.previousSecond!=this.secondsRemaining||t)&&(this.daysRemaining=Math.floor(i%6048e5/864e5),this.hoursRemaining=Math.floor(i%864e5/36e5),this.minutesRemaining=Math.ceil(i%36e5/6e4),this.secondsRemaining>=0?(this.previousSecond=this.secondsRemaining,this.daysRemaining<=0&&(this.daysRemaining="00"),this.hoursRemaining>0?this.hoursRemaining<10&&(this.hoursRemaining="0"+this.hoursRemaining):this.hoursRemaining="00",this.minutesRemaining>0?this.minutesRemaining<10&&(this.minutesRemaining="0"+this.minutesRemaining):this.minutesRemaining="00","00"!==this.daysRemaining?this.daysRemaining>1?this.label.text="ENDS IN "+this.daysRemaining+" DAYS":this.label.text="ENDS IN "+this.daysRemaining+" DAY":this.label.text="ENDS IN "+this.hoursRemaining+":"+this.minutesRemaining):(this.label.text="00:00:00",this.timerStart=!1))},ButtonTimerHandler.prototype.onGainedFocus=function(){this.nowTime=Date.now()};var GlobalText=pc.createScript("globalText");const Close_Popup_Button_Default_Text="X",Back_Button_Default_Text="BACK",Ok_Button_Default_Text="OK",About_Button_Default_Text="ABOUT",Play_Button_Default_Text="PLAY",Play_Button_Join_Text="JOIN",Private_Arena_Button_Default_Text="PLAY WITH FRIENDS",Leaderboards_Button_Default_Text="LEADERBOARDS",RANKS_Button_Default_Text="",Outfits_Button_Default_Text="OUTFITS",Hats_Button_Default_Text="HATS",Respawn_Button_Default_Text="RESPAWN",Leave_Button_Default_Text="LEAVE",Copy_Link_Button_Default_Text="COPY LINK",Daily_Leaderboard_Button_Default_Text="DAILY LEADERS",Weekly_Leaderboard_Button_Default_Text="WEEKLY LEADERS";var Vomanager=pc.createScript("vomanager"),VOEvents={leadTaken:0,leadLost:1,firstPlace:2,secondPlace:3,thirdPlace:4,roundStart:5,roundEnded:6,thirtysecondsleft:7,jumpshot:8,newHighScore:9,collateral:10,sleepingwithfishes:11,kill:12,death:13,weaponPickup:14,rocketJumpInAir:15,sixtysecondsleft:16,halfTime:17};Vomanager.prototype.init=function(e){this.localPlayerID=null,this.localPlayerIsJumping=!1,this.localPlayerKillsInARow=0,this.localPlayerKilledPlayerWithRocketRecently=!1,this.localPlayerLeaderboardPosition=0,this.localPlayerIsOnFire=!1,this.localPlayerIsInTheLead=!1,this.localPlayerHasSetNewHighscoreInRound=!0,this.hasPlayedPickupSoundForWeaponInSession={},this.slotVariations={},this.queuedSoundsToPlay=[],this.queueTimeOut=null,this.isPlayingSound=!1,this.allowLeadSounds=!0,this.lastLeadSoundWasTaken=!1,this.lastKillSoundIndex=8;var a=this;this.voFilenames=["airborne.mp3","amazing.mp3","astounding.mp3","bitesTheDust.mp3","careful.mp3","collateral.mp3","combo.mp3","dangerousArea.mp3","firstPlace.mp3","flyingHigh.mp3","great.mp3","groovy.mp3","inconceivable.mp3","incredible.mp3","jumpshot.mp3","leadLost.mp3","leadTaken.mp3","magnificent.mp3","newHighScore.mp3","niceTry.mp3","onFire.mp3","oof.mp3","oops.mp3","ouch.mp3","riflePickup.mp3","rocketJump.mp3","rocketLauncherPickup.mp3","roundEnded.mp3","roundStart.mp3","secondPlace.mp3","shotgunPickup.mp3","sleepingWithFishes.mp3","soClose.mp3","thatsGottaHurt.mp3","thatsRough.mp3","thirdPlace.mp3","thirtysecondsleft.mp3","toast.mp3","tommygunPickup.mp3","tooFar.mp3","unbelievable.mp3","uziPickup.mp3","wee.mp3","whatAShame.mp3","whoa.mp3","yikes.mp3","youAreOut.mp3","youreGone.mp3","monsterFrag.mp3","megaFrag.mp3","Frag9.mp3","Frag8.mp3","Frag7.mp3","Frag6.mp3","Frag5.mp3","Frag4.mp3","tripleFrag.mp3","doubleFrag.mp3","oneMinuteLeft.mp3","halftime.mp3"],e.musicBundleAsset.ready((function(e){var t;a.voFilenames.forEach((function(e){t=a.app.assets.find(e,"audio"),a.addSoundAsset(t,a.entity)}))}),this),this.app.on("VOS_trigger",this.onVOSTrigger,this),this.app.on("VOS_leaderboardPosition",this.onLeaderBoardPositionChanged,this),this.app.on("VOS_setHasNewHighScore",this.onSetNewHighscore,this),this.app.on("sessionStarted",this.onSessionStarted,this),this.app.on("cooldownStarted",this.onCooldownStarted,this),this.app.on("killMade",this.onKillMade,this),this.app.on("weaponPickedUp",this.OnWeaponPickup,this),this.app.on("localPlayerInitialized",this.LocalPlayerCreated,this),this.app.on("jumpingStateChanged",this.OnJumpingStateChanged,this)},Vomanager.prototype.update=function(e){},Vomanager.prototype.playNextSound=function(e){if(!this.isPlayingSound){var a=this.queuedSoundsToPlay.shift();if(void 0!==a){var t=this.entity.sound.slot(a);void 0!==t&&(t.isPlaying||(this.isPlayingSound=!0,setTimeout(function(){t.play()}.bind(this),e),this.playNextSoundAfterCurrent(1e3*t.duration)))}}},Vomanager.prototype.queueSound=function(e,a){this.queuedSoundsToPlay.push(e),this.playNextSound(a)},Vomanager.prototype.playNextSoundAfterCurrent=function(e){clearTimeout(this.queueTimeOut),this.queueTimeOut=setTimeout(function(){this.isPlayingSound=!1,this.playNextSound()}.bind(this),e)},Vomanager.prototype.onVOSTrigger=function(e,a){switch(e){case VOEvents.leadTaken:this.localPlayerIsInTheLead||(this.localPlayerIsInTheLead=!0,this.allowLeadSounds&&!this.lastLeadSoundWasTaken&&(this.queueSound("leadTaken",500),this.app.fire("VO_text_trigger","You took the lead!"),this.lastLeadSoundWasTaken=!0,this.allowLeadSounds=!1,setTimeout(function(){this.allowLeadSounds=!0}.bind(this),5e3)));break;case VOEvents.leadLost:this.localPlayerIsInTheLead&&(this.localPlayerIsInTheLead=!1,this.allowLeadSounds&&this.lastLeadSoundWasTaken&&(this.queueSound("leadLost",500),this.app.fire("VO_text_trigger","You lost the lead."),this.lastLeadSoundWasTaken=!1,this.allowLeadSounds=!1,setTimeout(function(){this.allowLeadSounds=!0}.bind(this),5e3)));break;case VOEvents.firstPlace:this.queueSound("firstPlace",500);break;case VOEvents.secondPlace:this.queueSound("secondPlace",500);break;case VOEvents.thirdPlace:this.queueSound("thirdPlace",500);break;case VOEvents.roundStart:this.queueSound("roundStart",400);break;case VOEvents.roundEnded:this.queueSound("roundEnded",0);break;case VOEvents.thirtysecondsleft:this.queueSound("thirtysecondsleft");break;case VOEvents.sixtysecondsleft:this.queueSound("oneMinuteLeft");break;case VOEvents.halfTime:this.queueSound("halftime");break;case VOEvents.jumpshot:this.queueSound("jumpshot",400);break;case VOEvents.newHighScore:this.queueSound("newHighScore",500);break;case VOEvents.collateral:this.queueSound("collateral",400);break;case VOEvents.kill:this.playKillVariation();break;case VOEvents.death:this.playDeathVariation(a);break;case VOEvents.weaponPickup:this.playWeaponPickupVariation(a);break;case VOEvents.rocketJumpInAir:this.playRocketJumpVariation();break;default:console.error("Unhandled VOS trigger occurred!")}},Vomanager.prototype.onLeaderBoardPositionChanged=function(e){this.localPlayerLeaderboardPosition=e},Vomanager.prototype.playKillVariation=function(e){var a=1650;switch(void 0!==e?e:this.localPlayerKillsInARow){case 0:case 1:a=0;break;case 2:this.queueSound("doubleFrag",500),a=1800;break;case 3:this.queueSound("tripleFrag",500);break;case 4:this.queueSound("Frag4",500);break;case 5:this.queueSound("Frag5",500);break;case 6:this.queueSound("Frag6",500),a=1800;break;case 7:this.queueSound("Frag7",500),a=1200;break;case 8:this.queueSound("Frag8",500),a=1800;break;case 9:this.queueSound("Frag9",500);break;default:switch(Math.round(generateRandomNumber())){case 0:this.queueSound("megaFrag",500);break;case 1:this.queueSound("monsterFrag",500),a=2e3}}var t=!1;if(this.localPlayerKillsInARow<4)t=!0;else{if(4==this.localPlayerKillsInARow)return this.queueSound("onFire",500),void this.app.fire("VO_text_trigger","You are on fire!");this.localPlayerKillsInARow>4&&(t=!1)}for(var o=this.lastKillSoundIndex;o==this.lastKillSoundIndex;)o=this.getRandomKillSoundIndex(t);switch(this.lastKillSoundIndex=o,this.lastKillSoundIndex){case 0:this.queueSound("great",500+a);break;case 1:this.queueSound("groovy",500+a);break;case 2:this.queueSound("amazing",500+a);break;case 3:this.queueSound("incredible",500+a);break;case 4:this.queueSound("astounding",500+a);break;case 5:this.queueSound("unbelievable",500+a);break;case 6:this.queueSound("inconceivable",500+a);break;case 7:default:this.queueSound("magnificent",500+a)}},Vomanager.prototype.getRandomKillSoundIndex=function(e){return e?Math.floor(5*generateRandomNumber()):3+Math.floor(5*generateRandomNumber())},Vomanager.prototype.playDeathVariation=function(e){if(e==Weapons.Mine){switch(Math.floor(3*Math.random())){case 0:this.queueSound("tooFar",1e3);break;case 1:this.queueSound("careful",1e3);break;case 2:default:this.queueSound("dangerousArea",1e3)}}else{switch(Math.floor(13*Math.random())){case 0:this.queueSound("youAreOut",1e3);break;case 1:this.queueSound("toast",1e3);break;case 2:this.queueSound("youreGone",1e3);break;case 3:this.queueSound("whatAShame",1e3);break;case 4:this.queueSound("yikes",1e3);break;case 5:this.queueSound("ouch",1e3);break;case 6:this.queueSound("oops",1e3);break;case 7:this.queueSound("thatsRough",1e3);break;case 8:this.queueSound("thatsGottaHurt",1e3);break;case 9:this.queueSound("soClose",1e3);break;case 10:this.queueSound("oof",1e3);break;case 11:this.queueSound("niceTry",1e3);break;case 12:default:this.queueSound("whoa",1e3)}}},Vomanager.prototype.playWeaponPickupVariation=function(e){{let a="",t=400;switch(e){case Weapons.Rifle:a="riflePickup";break;case Weapons.Shotgun:a="shotgunPickup";break;case Weapons.Minigun:a="tommygunPickup";break;case Weapons.RocketLauncher:a="rocketLauncherPickup";break;case Weapons.Uzi:a="uziPickup"}this.queueSound(a,t),this.hasPlayedPickupSoundForWeaponInSession[e]=!0}},Vomanager.prototype.playRocketJumpVariation=function(){switch(Math.floor(10*Math.random())){case 0:this.queueSound("flyingHigh",500);break;case 1:this.queueSound("wee",500);break;case 2:this.queueSound("airborne",500);break;case 3:this.queueSound("rocketJump",500)}},Vomanager.prototype.onSetNewHighscore=function(){this.localPlayerHasSetNewHighscoreInRound=!0},Vomanager.prototype.onSessionStarted=function(e,a,t,o,i){var s=new Date(a).getTime(),n=new Date(e).getTime()-s;Math.floor(n/1e3)>.9*i&&this.onVOSTrigger(VOEvents.roundStart),this.localPlayerKillsInARow=0,this.localPlayerLeaderboardPosition=0,this.localPlayerIsOnFire=!1,this.localPlayerIsInTheLead=!1,this.localPlayerHasSetNewHighscoreInRound=!1,this.lastLeadSoundWasTaken=!1},Vomanager.prototype.onCooldownStarted=function(){0==this.localPlayerLeaderboardPosition?this.onVOSTrigger(VOEvents.firstPlace):1==this.localPlayerLeaderboardPosition?this.onVOSTrigger(VOEvents.secondPlace):2==this.localPlayerLeaderboardPosition?this.onVOSTrigger(VOEvents.thirdPlace):this.onVOSTrigger(VOEvents.roundEnded),this.localPlayerHasSetNewHighscoreInRound&&this.onVOSTrigger(VOEvents.newHighScore),this.localPlayerKillsInARow=0,this.localPlayerLeaderboardPosition=0,this.localPlayerIsOnFire=!1,this.localPlayerIsInTheLead=!1,this.localPlayerHasSetNewHighscoreInRound=!1},Vomanager.prototype.onKillMade=function(e,a,t,o,i){if(o&&!t){if(this.localPlayerKillsInARow++,i==Weapons.RocketLauncher){if(this.localPlayerKilledPlayerWithRocketRecently)return this.onVOSTrigger(VOEvents.collateral),void(this.localPlayerKilledPlayerWithRocketRecently=!1);this.localPlayerKilledPlayerWithRocketRecently=!0,setTimeout(function(){this.localPlayerKilledPlayerWithRocketRecently=!1}.bind(this),300)}this.localPlayerIsJumping&&i!=Weapons.RocketLauncher&&i!=Weapons.Mine?this.onVOSTrigger(VOEvents.jumpshot):this.onVOSTrigger(VOEvents.kill)}else t&&(this.localPlayerKillsInARow=0,this.onVOSTrigger(VOEvents.death,i))},Vomanager.prototype.OnWeaponPickup=function(e,a,t,o,i,s){this.localPlayerID===e&&this.onVOSTrigger(VOEvents.weaponPickup,a)},Vomanager.prototype.LocalPlayerCreated=function(e){this.localPlayerID=e},Vomanager.prototype.OnJumpingStateChanged=function(e){this.localPlayerIsJumping=e},Vomanager.prototype.addSoundAsset=function(e,a,t,o){void 0!==t&&null!=t||(t=(t=(t=e.file.filename.replace(".mp3","")).replace(/_\d*\.?\d+s(ec)?/i,"")).replace(/_x\d+/i,""));var i=void 0!==a.sound.slots[t]?a.sound.slots[t]:a.sound.addSlot(t);i.asset=e;const s=/(\d*\.?\d+)s/i.exec(e.file.filename),n=/x(\d+)/i.exec(e.file.filename);s&&void 0!==s[1]&&(i.duration=parseFloat(s)),n&&void 0!==n[1]&&(this.slotVariations[t]={variations:parseInt(n[1]),lastPlayedIndex:0});for(const e in o)i[e]=o[e]};var EmailPasswordInputHelper=pc.createScript("emailPasswordInputHelper");EmailPasswordInputHelper.attributes.add("emailInputFieldEntity",{type:"entity",title:"Email Input Field"}),EmailPasswordInputHelper.attributes.add("emailTextEntity",{type:"entity",title:"Email Text"}),EmailPasswordInputHelper.attributes.add("typeYourEmailLabel",{type:"entity",title:"Type Your Email"}),EmailPasswordInputHelper.attributes.add("emailIndicatorEntity",{type:"entity",title:"Email Indicator"}),EmailPasswordInputHelper.attributes.add("passwordInputFieldEntity",{type:"entity",title:"Password Input FieldEntity"}),EmailPasswordInputHelper.attributes.add("passwordTextEntity",{type:"entity",title:"Password Text"}),EmailPasswordInputHelper.attributes.add("typeYourPasswordLabel",{type:"entity",title:"Type Your Password"}),EmailPasswordInputHelper.attributes.add("passwordIndicatorEntity",{type:"entity",title:"Password Indicator"}),pc.extend(EmailPasswordInputHelper.prototype,{init:function(){this.textIndicator="|",this.emailTextElement=this.emailTextEntity.element,this.passwordTextElement=this.passwordTextEntity.element,this.emailIndicatorEntity.enabled=!1,this.passwordIndicatorEntity.enabled=!1,this.emailIndicatorElement=this.emailIndicatorEntity.element,this.passwordIndicatorElement=this.passwordIndicatorEntity.element,this.maxWidth=429,this.timePassed=0,this.indicatorShowThreshold=.5,this.indicatorHideThreshold=.5,this.isIndicatorVisible=!1,this.updateIndicator=!1,this.selectedInputBox=EmailPasswordInputHelper.INPUT_BOXES.NONE,this.isWindowFocused=!0,this.isInputAllowed=!0,this.app.on("windowLostFocus",this.onLostFocus,this),this.app.on("windowGainedFocus",this.onGainedFocus,this)},enable:function(){this.active||(this.emailTextElement.text="",this.passwordTextElement.text="",this.active=!0,this.updateIndicator=!0,this.emailArea=document.createElement("input"),this.emailArea.type="email",this.emailArea.value="",this.emailArea.id="email",this.emailArea.style.position="fixed",this.passwordArea=document.createElement("input"),this.passwordArea.value="",this.passwordArea.id="password",this.passwordArea.type="password",this.passwordArea.style.position="fixed",this.emailArea.onfocus=this.emailAreaOnFocus.bind(this),this.emailArea.onblur=this.emailAreaOnBlur.bind(this),this.emailArea.addEventListener("input",this.onInputChange.bind(this)),this.emailArea.addEventListener("keyup",this.onKeyUp.bind(this)),this.passwordArea.onfocus=this.passwordAreaOnFocus.bind(this),this.passwordArea.onblur=this.passwordAreaOnBlur.bind(this),this.passwordArea.addEventListener("input",this.onInputChange.bind(this)),this.passwordArea.addEventListener("keyup",this.onKeyUp.bind(this)),MobileController.instance.active||this.emailArea.focus(),this.emailArea.style.opacity=0,this.passwordArea.style.opacity=0,document.body.appendChild(this.emailArea),document.body.appendChild(this.passwordArea),this.checkEmailPlaceHolder(),this.checkPasswordPlaceHolder(),this.setEmailIndicatorPosition(),this.setPasswordIndicatorPosition(),setTimeout((()=>{this.onResize()}),200),this.app.on("ViewportManager:resize",this.onResize,this),this.enableInput())},disable:function(){this.active&&(this.active=!1,this.updateIndicator=!1,this.app.off("ViewportManager:resize",this.onResize,this),null!==this.emailArea&&(document.body.removeChild(this.emailArea),this.emailArea=null),null!==this.passwordArea&&(document.body.removeChild(this.passwordArea),this.passwordArea=null),this.disableInput())},update:function(t){this.isWindowFocused&&this.isInputAllowed?this.selectedInputBox!==EmailPasswordInputHelper.INPUT_BOXES.NONE&&this.updateIndicator&&(this.timePassed+=t,this.timePassed>this.indicatorShowThreshold&&(this.emailIndicatorElement.text=this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.EMAIL&&this.isIndicatorVisible?this.textIndicator:"",this.passwordIndicatorElement.text=this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.PASSWORD&&this.isIndicatorVisible?this.textIndicator:"",this.isIndicatorVisible=!this.isIndicatorVisible,this.timePassed=0)):this.isIndicatorVisible&&(this.isIndicatorVisible=!1,this.timePassed=0)},emailAreaOnFocus:function(){MobileController.instance.active&&MobileController.instance.setPreventDefault(!1),this.selectedInputBox=EmailPasswordInputHelper.INPUT_BOXES.EMAIL,this.emailIndicatorEntity.enabled=!0,this.typeYourEmailLabel.enabled=!1},emailAreaOnBlur:function(){this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.EMAIL&&(this.selectedInputBox=EmailPasswordInputHelper.INPUT_BOXES.NONE,MobileController.instance.active&&MobileController.instance.setPreventDefault(!0)),this.emailIndicatorEntity.enabled=!1,this.checkEmailPlaceHolder()},passwordAreaOnFocus:function(){MobileController.instance.active&&MobileController.instance.setPreventDefault(!1),this.selectedInputBox=EmailPasswordInputHelper.INPUT_BOXES.PASSWORD,this.passwordIndicatorEntity.enabled=!0,this.typeYourPasswordLabel.enabled=!1},passwordAreaOnBlur:function(){this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.PASSWORD&&(this.selectedInputBox=EmailPasswordInputHelper.INPUT_BOXES.NONE,MobileController.instance.active&&MobileController.instance.setPreventDefault(!0)),this.passwordIndicatorEntity.enabled=!1,this.checkPasswordPlaceHolder()},enableInput:function(){this.isInputAllowed=!0},disableInput:function(){this.isInputAllowed=!1},onLostFocus:function(){this.isWindowFocused=!1},onGainedFocus:function(){this.isWindowFocused=!0},checkEmailPlaceHolder:function(){this.typeYourEmailLabel.enabled=0===this.emailTextElement.text.length},checkPasswordPlaceHolder:function(){this.typeYourPasswordLabel.enabled=0===this.passwordTextElement.text.length},onResize:function(t){if(this.emailArea){var e=(o=this.emailInputFieldEntity.element.canvasCorners)[0].x,i=o[2].y,s=(l=document.getElementById("discordiFrame"))?Number.parseInt(l.style.width):0,a=o[1].x-o[0].x,n=o[1].y-o[2].y;this.emailArea.style.width=a+"px",this.emailArea.style.height=n+"px",this.emailArea.style.left=e+s+"px",this.emailArea.style.top=i+"px"}if(this.passwordArea){var o,l;e=(o=this.passwordInputFieldEntity.element.canvasCorners)[0].x,i=o[2].y,s=(l=document.getElementById("discordiFrame"))?Number.parseInt(l.style.width):0,a=o[1].x-o[0].x,n=o[1].y-o[2].y;this.passwordArea.style.width=a+"px",this.passwordArea.style.height=n+"px",this.passwordArea.style.left=e+s+"px",this.passwordArea.style.top=i+"px"}var r=this;t||setTimeout((function(){r.onResize(!0)}),500)},onInputChange:function(t){switch(this.selectedInputBox){case EmailPasswordInputHelper.INPUT_BOXES.EMAIL:this.emailTextElement.text=t.srcElement.value,this.setEmailIndicatorPosition();break;case EmailPasswordInputHelper.INPUT_BOXES.PASSWORD:var e="".padStart(t.srcElement.value.length,"*");this.passwordTextElement.text=e,this.setPasswordIndicatorPosition();break;default:console.log(this.selectedInputBox)}},onKeyUp:function(t){switch(t.key){case"Tab":case"Enter":this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.EMAIL?(this.emailArea.blur(),this.passwordArea.focus()):this.selectedInputBox===EmailPasswordInputHelper.INPUT_BOXES.PASSWORD&&(this.passwordArea.blur(),this.fire("complete"))}},setEmailIndicatorPosition:function(){var t=1;this.emailTextElement.width>this.maxWidth&&(t=this.maxWidth/this.emailTextElement.width),this.emailTextEntity.setLocalScale(t,t,t);var e=this.emailTextEntity.getLocalPosition();this.emailIndicatorEntity.setLocalPosition((e.x+this.emailTextElement.width/2)*t+5,e.y+5,e.z)},setPasswordIndicatorPosition:function(){var t=1;this.passwordTextElement.width>this.maxWidth&&(t=this.maxWidth/this.passwordTextElement.width),this.passwordTextEntity.setLocalScale(t,t,t);var e=this.passwordTextEntity.getLocalPosition();this.passwordIndicatorEntity.setLocalPosition((e.x+this.passwordTextElement.width/2)*t+5,e.y+5,e.z)},getEmail:function(){return this.emailArea.value},getPassword:function(){return this.passwordArea.value}}),EmailPasswordInputHelper.INPUT_BOXES=Object.freeze({EMAIL:"email",PASSWORD:"password",NONE:null});var GlobalLeaderboardsManager=pc.createScript("globalLeaderboardsManager"),GlobalLeaderboardsFetchErrorTypes={timedOut:1,gameOutdated:2};GlobalLeaderboardsManager.prototype.init=function(e){this.Default_Global_Leaderboard_Size=11,this.cachedLeaderboardsData=null,this.globalLeaderboardsRequestFrequency=1e3,this.lastTimeGlobalLeaderboardsRequested=null,this.leaderboardsFetchTimeoutInterval=2e4,this.leaderboardsFetchTimeout=null,this.cachedStandingsData=null,this.globalLeaderboardStandingsRequestFrequency=1e3,this.lastTimeGlobalLeaderboardStandingsRequested=null,this.leaderboardStandingsFetchTimeoutInterval=2e4,this.leaderboardStandingsFetchTimeout=null,this.storageManager=e,this.playerGuid=this.storageManager.loadPlayerGuid(),this.app.on("serverError",this.onServerError,this),this.app.on("responseGlobalLeaderboards",this.onResponseGlobalLeaderboards,this),this.app.on("responseGlobalLeaderboardStandings",this.onResponseGlobalLeaderboardStandings,this)},GlobalLeaderboardsManager.prototype.fetchGlobalLeaderboards=function(e){if(e||null===this.lastTimeGlobalLeaderboardsRequested||Date.now()>this.lastTimeGlobalLeaderboardsRequested+this.globalLeaderboardsRequestFrequency)this.playerGuid=this.storageManager.loadPlayerGuid(),void 0!==this.playerGuid&&null!==this.playerGuid&&(this.lastTimeGlobalLeaderboardsRequested=Date.now(),this.app.fire("requestGlobalLeaderboards",this.playerGuid,this.Default_Global_Leaderboard_Size)),null!==this.leaderboardsFetchTimeout&&(clearTimeout(this.leaderboardsFetchTimeout),this.leaderboardsFetchTimeout=null),this.leaderboardsFetchTimeout=setTimeout(function(){this.fire("onErrorFetchingGlobalLeaderboards",GlobalLeaderboardsFetchErrorTypes.timedOut),this.leaderboardsFetchTimeout=null}.bind(this),this.leaderboardsFetchTimeoutInterval);else if(null!==this.cachedLeaderboardsData){var a=!!this.cachedLeaderboardsData.dailyLeaderboadData.previousWinner&&this.playerGuid===this.cachedLeaderboardsData.dailyLeaderboadData.previousWinner.id,r=!!this.cachedLeaderboardsData.weeklyLeaderboadData.previousWinner&&this.playerGuid===this.cachedLeaderboardsData.weeklyLeaderboadData.previousWinner.id;this.fire("onGlobalLeaderboardsUpdated",this.cachedLeaderboardsData,a,r)}},GlobalLeaderboardsManager.prototype.onResponseGlobalLeaderboards=function(e){null!==this.leaderboardsFetchTimeout&&(clearTimeout(this.leaderboardsFetchTimeout),this.leaderboardsFetchTimeout=null),this.cachedLeaderboardsData=e;var a=!!e.dailyLeaderboadData.previousWinner&&this.playerGuid===e.dailyLeaderboadData.previousWinner.id,r=!!e.weeklyLeaderboadData.previousWinner&&this.playerGuid===e.weeklyLeaderboadData.previousWinner.id;this.fire("onGlobalLeaderboardsUpdated",e,a,r)},GlobalLeaderboardsManager.prototype.fetchGlobalLeaderboardStandings=function(e){e||null===this.lastTimeGlobalLeaderboardStandingsRequested||Date.now()>this.lastTimeGlobalLeaderboardStandingsRequested+this.globalLeaderboardStandingsRequestFrequency?(this.playerGuid=this.storageManager.loadPlayerGuid(),void 0!==this.playerGuid&&null!==this.playerGuid&&(this.lastTimeGlobalLeaderboardStandingsRequested=Date.now(),this.app.fire("requestGlobalLeaderboardStandings",this.playerGuid)),null!==this.leaderboardStandingsFetchTimeout&&(clearTimeout(this.leaderboardStandingsFetchTimeout),this.leaderboardStandingsFetchTimeout=null),this.leaderboardStandingsFetchTimeout=setTimeout(function(){this.fire("onErrorFetchingGlobalLeaderboardStandings",GlobalLeaderboardsFetchErrorTypes.timedOut),this.leaderboardStandingsFetchTimeout=null}.bind(this),this.leaderboardStandingsFetchTimeoutInterval)):null!==this.cachedLeaderboardStandingsData&&this.fire("onGlobalLeaderboardStandingsUpdated",this.cachedLeaderboardStandingsData)},GlobalLeaderboardsManager.prototype.onResponseGlobalLeaderboardStandings=function(e){null!==this.leaderboardStandingsFetchTimeout&&(clearTimeout(this.leaderboardStandingsFetchTimeout),this.leaderboardStandingsFetchTimeout=null),this.cachedLeaderboardStandingsData=e,this.fire("onGlobalLeaderboardStandingsUpdated",e)},GlobalLeaderboardsManager.prototype.onServerError=function(e){e===ServerErrorCodes.IncompatibleClientVersion&&(null!==this.leaderboardsFetchTimeout&&(clearTimeout(this.leaderboardsFetchTimeout),this.leaderboardsFetchTimeout=null,this.fire("onErrorFetchingGlobalLeaderboards",GlobalLeaderboardsFetchErrorTypes.gameOutdated)),null!==this.leaderboardStandingsFetchTimeout&&(clearTimeout(this.leaderboardStandingsFetchTimeout),this.leaderboardStandingsFetchTimeout=null,this.fire("onErrorFetchingGlobalLeaderboardStandings",GlobalLeaderboardsFetchErrorTypes.gameOutdated)))};var LoadingScreen=pc.createScript("loadingScreen");LoadingScreen.attributes.add("loadingBackgroundEntity",{type:"entity",title:"Loading Background"}),LoadingScreen.attributes.add("topDownViewCameraEntity",{type:"entity",title:"Top Down View Camera"}),LoadingScreen.attributes.add("loadingLabel",{type:"entity",title:"Loading Label"}),LoadingScreen.attributes.add("loadingSpinner",{type:"entity",title:"Loading Spinner"}),LoadingScreen.attributes.add("gameBackground",{type:"entity",title:"Game Background"}),LoadingScreen.attributes.add("progressBarEntity",{type:"entity",title:"Progress Bar Entity"});var LoadingScreenStates={waitForAssetsToLoad:0,waitForPlayerToSpawn:1,waitForFirebaseInit:2};LoadingScreen.prototype.getScreenType=function(){return UIScreenTypes.LoadingScreen},LoadingScreen.prototype.init=function(e,i,t){this.isInitialized||(this.isInitialized=!0,this.loadAssetManager=e,this.firebase=i,this.adsManager=t,this.adsManager.on("onAdCompleted",this.onAdCompleted,this),this.wasAdShown=this.adsManager.wasAdShown(),this.transitioningFromScreen=null,this.activeScreenState=null,this.isInitializingPlayer=!1,this.playerInitializationParameters=null,this.loadingStatusInterval=null,this.progressBar=this.progressBarEntity.script.incrementalProgressBar,this.progressBar.init(),this.progressBarEntity.enabled=!1,this.loadingCameraManager=this.topDownViewCameraEntity.script.cameraManager,this.loadingCameraManager.init(),this.loadingCameraManager.disable())},LoadingScreen.prototype.show=function(e,i){switch(this.transitioningFromScreen=e,this.subscribedToEvents||(this.subscribedToEvents=!0,this.app.on("serverError",this.onServerError,this),this.loadAssetManager.on("allAssetsLoaded",this.onAllAssetsLoaded,this)),i.loadingScreenType){case LoadingScreenStates.waitForAssetsToLoad:this.activeScreenState=LoadingScreenStates.waitingForAssetsToLoad,this.adsManager.showAd(),this.loadingCameraManager.disable(),this.loadingLabel.element.text="LOADING",this.progressBarEntity.enabled=!0,this.gameBackground.enabled=!0,null===this.loadingStatusInterval&&(this.loadAssetManager.startLoadingAssets(),this.loadingStatusInterval=setInterval(function(){this.loadAssetManager.modelsBundleLoaded?this.progressBar.setProgress(this.loadAssetManager.initialAssetsLoaded/this.loadAssetManager.initialAssetsToLoad):this.progressBar.setProgress(0)}.bind(this),10));break;case LoadingScreenStates.waitForPlayerToSpawn:this.activeScreenState=LoadingScreenStates.waitingForPlayerToSpawn,this.progressBarEntity.enabled=!1,this.loadingLabel.element.text="SPAWNING",this.playerInitializationParameters=i.playerInitializationParams,this.loadingCameraManager.enable(),this.wasAdShown&&this.loadAssetManager.areAllRequiredAssetsLoaded()&&this.initializePlayer();break;case LoadingScreenStates.waitForFirebaseInit:this.activeScreenState=LoadingScreenStates.waitForFirebaseInit,this.progressBarEntity.enabled=!1,this.loadingLabel.element.text="LOADING",this.gameBackground.enabled=!0,this.firebase.isInitialized()?this.onFirebaseInitialized():this.app.on("firebaseInitialized",this.onFirebaseInitialized,this)}this.loadingBackgroundEntity.enabled=!0,this.loadingLabel.enabled=!0,this.loadingSpinner.enabled=!0},LoadingScreen.prototype.hide=function(e){switch(this.subscribedToEvents&&(this.subscribedToEvents=!1,this.app.off("severError",this.onServerError,this),this.loadAssetManager.off("allAssetsLoaded",this.onAllAssetsLoaded,this),this.app.off("firebaseInitialized",this.onFirebaseInitialized,this)),this.activeScreenState){case LoadingScreenStates.waitForAssetsToLoad:this.progressBar.setProgress(this.loadAssetManager.initialAssetsLoaded/this.loadAssetManager.initialAssetsToLoad);break;case LoadingScreenStates.waitForPlayerToSpawn:}this.isInitializingPlayer=!1,clearInterval(this.loadingStatusInterval),this.loadingStatusInterval=null,this.loadingCameraManager.disable(),this.gameBackground.enabled=!1,this.loadingBackgroundEntity.enabled=!1,this.loadingLabel.enabled=!1,this.loadingSpinner.enabled=!1},LoadingScreen.prototype.onAdCompleted=function(){this.wasAdShown=!0},LoadingScreen.prototype.onAllAssetsLoaded=function(){void 0!==this.playerInitializationParameters&&null!==this.playerInitializationParameters&&this.initializePlayer(this.playerInitializationParameters)},LoadingScreen.prototype.initializePlayer=function(){this.isInitializingPlayer||(this.isInitializingPlayer=!0,this.app.fire("initializePlayer",this.playerInitializationParameters))},LoadingScreen.prototype.onFirebaseInitialized=function(){this.app.fire("uiController:showScreen",UIScreenTypes.PreloadScreen,null)},LoadingScreen.prototype.onServerError=function(e){var i="Server Error "+e;switch(e){case ServerErrorCodes.ArenaIsFull:i="Sorry, the arena is full";break;case ServerErrorCodes.UserAlreadyConnected:i="Sorry, you are alerady connected"}null!==this.transitioningFromScreen&&this.app.fire("uiController:showScreen",this.transitioningFromScreen,{feedbackMessage:i})};var ForgotPasswordButton=pc.createScript("forgotPasswordButton");ForgotPasswordButton.attributes.add("spinnerEntity",{type:"entity",title:"Spinner"}),ForgotPasswordButton.attributes.add("textEntity",{type:"entity",title:"Text"}),ForgotPasswordButton.attributes.add("lineEntity",{type:"entity",title:"Line"}),ForgotPasswordButton.attributes.add("pressedColor",{type:"rgba",title:"pressedColor"}),ForgotPasswordButton.attributes.add("unpressedColor",{type:"rgba",title:"unpressedColor"}),pc.extend(ForgotPasswordButton.prototype,{init:function(t){this.backgroundElement=this.entity.element,this.textElement=this.textEntity.element,this.textElement.text=t,this.isPressed=!1},show:function(){this.entity.enabled=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this)),this.app.mouse.on(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this),this.showNormalState()},hide:function(){this.entity.element.off(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.off(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.mouse.off(pc.EVENT_MOUSEUP,this.onUnfocusedRelease,this),this.spinnerEntity.enabled=!1,this.lineEntity.enabled=!1,this.entity.enabled=!1},onPress:function(t){this.isPressed||(this.isPressed=!0,this.showPressedState())},onRelease:function(t){this.isPressed&&(this.isPressed=!1,this.buttonClicked())},onUnfocusedRelease:function(t){this.isPressed&&(this.isPressed=!1,this.showNormalState())},buttonClicked:function(){this.textEntity.enabled=!1,this.spinnerEntity.enabled=!0,this.lineEntity.enabled=!1,this.fire("buttonClicked")},showNormalState:function(){this.textEntity.enabled=!0,this.spinnerEntity.enabled=!1,this.lineEntity.enabled=!0,this.textEntity.element.color=this.unpressedColor,this.lineEntity.element.color=this.unpressedColor},showPressedState:function(){this.textEntity.element.color=this.pressedColor,this.lineEntity.element.color=this.pressedColor}});var UserIdPopup=pc.createScript("userIdPopup");UserIdPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),UserIdPopup.attributes.add("idTextLabel",{type:"entity"}),UserIdPopup.attributes.add("feedbackTextEntity",{type:"entity",title:"Feedback Text Entity"}),UserIdPopup.prototype.init=function(e,t){this.popupType=UIPopupTypes.UserIDPopup,this.fireBaseController=t,e.musicBundleAsset.ready((function(e){asset=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=asset}),this),this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),this.feedbackHandlerTimeout=null,this.feedbackTextEntity.element.text="Z"},UserIdPopup.prototype.getPopupType=function(){return this.popupType},UserIdPopup.prototype.show=function(){this.entity.enabled=!0,this.closeButtonScript.show();var e=this;if(null!=this.fireBaseController.user&&null!=this.fireBaseController.user){if(this.idTextLabel.element.text=this.fireBaseController.user.uid,void 0===navigator.clipboard){var t=document.createElement("textarea");t.value=this.fireBaseController.user.uid,t.style.position="fixed",t.style.opacity=0,MobileController.instance.active||(this.textArea.style.display="none"),document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy")?"successful":"unsuccessful";console.log(o)}catch(e){console.warning("Was not possible to copy the text: ",e)}return void document.body.removeChild(t)}navigator.clipboard.writeText(this.fireBaseController.user.uid).then((function(){e.feedbackTextEntity.element.text="User ID was successfully copied to clipboard.",e.feedbackTextEntity.element.color=SUCCESS_TEXT_COLOR,clearTimeout(e.feedbackHandlerTimeout),e.feedbackHandlerTimeout=setTimeout(function(){e.feedbackTextEntity.element.text=""}.bind(e),5e3)}),(function(){e.feedbackTextEntity.element.text="User ID could not be copied to clipboard.",e.feedbackTextEntity.element.color=ERROR_TEXT_COLOR,clearTimeout(e.feedbackHandlerTimeout),e.feedbackHandlerTimeout=setTimeout(function(){e.feedbackTextEntity.element.text=""}.bind(e),5e3)}))}else this.idTextLabel.element.text="No ID to show - User not logged in.";this.fire("popupOpened",this.popupType)},UserIdPopup.prototype.hide=function(){this.entity.enabled&&(this.closeButtonScript.hide(),this.entity.enabled=!1,this.fire("popupClosed",this.popupType))},UserIdPopup.prototype.reset=function(){},UserIdPopup.prototype.onPopupCloseButtonClicked=function(){this.hide(),this.entity.sound.slot("button_small").play()};var RankManager=pc.createScript("rankManager");RankManager.attributes.add("emblemIcons",{type:"asset",assetType:"texture",array:!0,title:"Emblem Icons"}),RankManager.attributes.add("emblemBackgrounds",{type:"asset",assetType:"texture",array:!0,title:"Emblem Backgrounds"});var USE_FAKE_TOTAL_RANK_POINS=!1;function Rank(e,n,s,t,a){this.requiredPoints=e,this.rankName=n,this.emblemIcon=s,this.emblemBackground=t,this.proceduralLevel=a}RankManager.prototype.init=function(e,n){this.firebaseManager=e,this.storageManager=n,this.ranks=[],this.ranks[0]=new Rank(0,"Rookie",null,null,0),this.ranks[1]=new Rank(250,"Junior Scout",this.emblemIcons[0],this.emblemBackgrounds[0],0),this.ranks[2]=new Rank(750,"Junior Fighter",this.emblemIcons[1],this.emblemBackgrounds[0],0),this.ranks[3]=new Rank(1650,"Junior Huntsman",this.emblemIcons[2],this.emblemBackgrounds[0],0),this.ranks[4]=new Rank(3150,"Junior Private",this.emblemIcons[3],this.emblemBackgrounds[0],0),this.ranks[5]=new Rank(5150,"Junior Corporal",this.emblemIcons[4],this.emblemBackgrounds[0],0),this.ranks[6]=new Rank(7650,"Junior Sergeant",this.emblemIcons[5],this.emblemBackgrounds[0],0),this.ranks[7]=new Rank(10650,"Junior Captain",this.emblemIcons[6],this.emblemBackgrounds[0],0),this.ranks[8]=new Rank(14250,"Junior Commander",this.emblemIcons[7],this.emblemBackgrounds[0],0),this.ranks[9]=new Rank(18550,"Junior Templar",this.emblemIcons[8],this.emblemBackgrounds[0],0),this.ranks[10]=new Rank(23750,"Junior Seer",this.emblemIcons[9],this.emblemBackgrounds[0],0),this.ranks[11]=new Rank(29950,"Junior Zealot",this.emblemIcons[10],this.emblemBackgrounds[0],0),this.ranks[12]=new Rank(37450,"Junior Prophet",this.emblemIcons[11],this.emblemBackgrounds[0],0),this.ranks[13]=new Rank(46450,"Senior Scout",this.emblemIcons[0],this.emblemBackgrounds[1],0),this.ranks[14]=new Rank(57450,"Senior Fighter",this.emblemIcons[1],this.emblemBackgrounds[1],0),this.ranks[15]=new Rank(70450,"Senior Huntsman",this.emblemIcons[2],this.emblemBackgrounds[1],0),this.ranks[16]=new Rank(85450,"Senior Private",this.emblemIcons[3],this.emblemBackgrounds[1],0),this.ranks[17]=new Rank(103450,"Senior Corporal",this.emblemIcons[4],this.emblemBackgrounds[1],0),this.ranks[18]=new Rank(125450,"Senior Sergeant",this.emblemIcons[5],this.emblemBackgrounds[1],0),this.ranks[19]=new Rank(151450,"Senior Captain",this.emblemIcons[6],this.emblemBackgrounds[1],0),this.ranks[20]=new Rank(182450,"Senior Commander",this.emblemIcons[7],this.emblemBackgrounds[1],0),this.ranks[21]=new Rank(219450,"Senior Templar",this.emblemIcons[8],this.emblemBackgrounds[1],0),this.ranks[22]=new Rank(263450,"Senior Seer",this.emblemIcons[9],this.emblemBackgrounds[1],0),this.ranks[23]=new Rank(316450,"Senior Zealot",this.emblemIcons[10],this.emblemBackgrounds[1],0),this.ranks[24]=new Rank(380450,"Senior Prophet",this.emblemIcons[11],this.emblemBackgrounds[1],0),this.ranks[25]=new Rank(457450,"Expert Scout",this.emblemIcons[0],this.emblemBackgrounds[2],0),this.ranks[26]=new Rank(549450,"Expert Fighter",this.emblemIcons[1],this.emblemBackgrounds[2],0),this.ranks[27]=new Rank(659450,"Expert Huntsman",this.emblemIcons[2],this.emblemBackgrounds[2],0),this.ranks[28]=new Rank(789450,"Expert Private",this.emblemIcons[3],this.emblemBackgrounds[2],0),this.ranks[29]=new Rank(939450,"Expert Corporal",this.emblemIcons[4],this.emblemBackgrounds[2],0),this.ranks[30]=new Rank(1119450,"Expert Sergeant",this.emblemIcons[5],this.emblemBackgrounds[2],0),this.ranks[31]=new Rank(1339450,"Expert Captain",this.emblemIcons[6],this.emblemBackgrounds[2],0),this.ranks[32]=new Rank(1599450,"Expert Commander",this.emblemIcons[7],this.emblemBackgrounds[2],0),this.ranks[33]=new Rank(1909450,"Expert Templar",this.emblemIcons[8],this.emblemBackgrounds[2],0),this.ranks[34]=new Rank(2279450,"Expert Seer",this.emblemIcons[9],this.emblemBackgrounds[2],0),this.ranks[35]=new Rank(2719450,"Expert Zealot",this.emblemIcons[10],this.emblemBackgrounds[2],0),this.ranks[36]=new Rank(3249450,"Expert Prophet",this.emblemIcons[11],this.emblemBackgrounds[2],0),this.ranks[37]=new Rank(3889450,"Master Scout",this.emblemIcons[0],this.emblemBackgrounds[3],0),this.ranks[38]=new Rank(4659450,"Master Fighter",this.emblemIcons[1],this.emblemBackgrounds[3],0),this.ranks[39]=new Rank(5579450,"Master Huntsman",this.emblemIcons[2],this.emblemBackgrounds[3],0),this.ranks[40]=new Rank(6679450,"Master Private",this.emblemIcons[3],this.emblemBackgrounds[3],0),this.ranks[41]=new Rank(7979450,"Master Corporal",this.emblemIcons[4],this.emblemBackgrounds[3],0),this.ranks[42]=new Rank(9479450,"Master Sergeant",this.emblemIcons[5],this.emblemBackgrounds[3],0),this.ranks[43]=new Rank(11279450,"Master Captain",this.emblemIcons[6],this.emblemBackgrounds[3],0),this.ranks[44]=new Rank(13479450,"Master Commander",this.emblemIcons[7],this.emblemBackgrounds[3],0),this.ranks[45]=new Rank(16079450,"Master Templar",this.emblemIcons[8],this.emblemBackgrounds[3],0),this.ranks[46]=new Rank(19179450,"Master Seer",this.emblemIcons[9],this.emblemBackgrounds[3],0),this.ranks[47]=new Rank(22879450,"Master Zealot",this.emblemIcons[10],this.emblemBackgrounds[3],0),this.ranks[48]=new Rank(27279450,"Master Prophet",this.emblemIcons[11],this.emblemBackgrounds[3],0),this.ranks[49]=new Rank(32579450,"Legend 1",this.emblemIcons[0],this.emblemBackgrounds[4],1),this.proceduralLevelsGenerated=1},RankManager.prototype.GetRank=function(e){USE_FAKE_TOTAL_RANK_POINS&&(e=Math.floor(pc.math.random(0,8e6)/pc.math.random(1,100)));var n=this.getRankIndexFromPoints(e);return this.ranks[n]},RankManager.prototype.GetNextRank=function(e){var n=this.getRankIndexFromPoints(e)+1;return this.ranks[n]},RankManager.prototype.GetNewRanksFromPoints=function(e,n){var s=0;for(let t=1;t<this.ranks.length;++t)if(e<this.ranks[t].requiredPoints){if(!(e+n>=this.ranks[t].requiredPoints))break;s++}return s},RankManager.prototype.GetAllRanksInArray=function(){return this.ranks},RankManager.prototype.getRankIndexFromPoints=function(e){for(var n=0;!this.appropiateNextRankExists(e);)this.createNextProcedualRank();for(var s=0;s<this.ranks.length&&e>=this.ranks[s].requiredPoints;s++)n=s;return n},RankManager.prototype.appropiateNextRankExists=function(e){return!(e>=this.ranks[this.ranks.length-1].requiredPoints)},RankManager.prototype.createNextProcedualRank=function(){this.proceduralLevelsGenerated++,this.ranks[this.ranks.length]=new Rank(Math.floor(1.2*this.ranks[this.ranks.length-1].requiredPoints),"Legend "+this.proceduralLevelsGenerated,this.emblemIcons[0],this.emblemBackgrounds[4],this.proceduralLevelsGenerated)};var RankEmblemHelper=pc.createScript("rankEmblemHelper");RankEmblemHelper.attributes.add("background",{type:"entity",title:"background"}),RankEmblemHelper.attributes.add("icon",{type:"entity",title:"icon"}),RankEmblemHelper.attributes.add("proceduralNumberLabel",{type:"entity",title:"proceduralNumberLabel"}),RankEmblemHelper.prototype.setEmblem=function(e){e.emblemIcon&&e.emblemBackground?(this.background.enabled=!0,this.icon.enabled=!0,this.background.element.texture=e.emblemBackground.resource,this.icon.element.texture=e.emblemIcon.resource,e.proceduralLevel?this.proceduralNumberLabel.element.text=""+pc.math.clamp(e.proceduralLevel,1,999):this.proceduralNumberLabel.element.text=""):(this.background.enabled=!1,this.icon.enabled=!1)};var GameOverRankUphelper=pc.createScript("gameOverRankUphelper");GameOverRankUphelper.attributes.add("profileRankEmblemOld",{type:"entity",title:"Old Profile Rank Emblem"}),GameOverRankUphelper.attributes.add("profileRankEmblemNext",{type:"entity",title:"Next Profile Rank Emblem"}),GameOverRankUphelper.attributes.add("progressText",{type:"entity",title:"Progress Text"}),GameOverRankUphelper.attributes.add("progressTipGroup",{type:"entity",title:"Progress Tip Group"}),GameOverRankUphelper.attributes.add("progressTipText",{type:"entity",title:"Progress Tip Text"}),GameOverRankUphelper.attributes.add("progressBarFillOld",{type:"entity",title:"Bar Old"}),GameOverRankUphelper.attributes.add("progressBarFillNew",{type:"entity",title:"Bar New"}),GameOverRankUphelper.attributes.add("loginNotifyText",{type:"entity",title:"Login Tip Text"}),GameOverRankUphelper.prototype.init=function(e){this.animating=!1,this.rankManager=e,this.oldProfileRankEmblemHelper=this.profileRankEmblemOld.script.rankEmblemHelper,this.nextProfileRankEmblemHelper=this.profileRankEmblemNext.script.rankEmblemHelper,this.totalProgressBarWidth=392,this.defaultProgressBarScale=new pc.Vec2(0,0),this.currentProgressBarScale=new pc.Vec2(1,1),this.defaultNewEmblemScale=new pc.Vec3(this.profileRankEmblemNext.getLocalScale().x,this.profileRankEmblemNext.getLocalScale().y,this.profileRankEmblemNext.getLocalScale().z),this.largeNewEmblemScale=new pc.Vec3(1.25*this.profileRankEmblemNext.getLocalScale().x,1.35*this.profileRankEmblemNext.getLocalScale().y,1.25*this.profileRankEmblemNext.getLocalScale().z),this.extraRankInQueue=!1,this.extraPointsForRanks=0,this.defaultNewProgressAnimationSpeed=1.4,this.newProgressAnimationSpeed=1.4,this.isLoggedIn=!1,this.activeTween=null},GameOverRankUphelper.prototype.setContent=function(e,t,r){if(r){this.isLoggedIn?this.loginNotifyText.enabled=!1:(this.loginNotifyText.enabled=!0,t=0),this.animating&&this.activeTween&&this.activeTween.stop(),this.animating=!0;var i=this.rankManager.GetNewRanksFromPoints(e,t);this.newProgressAnimationSpeed=this.defaultNewProgressAnimationSpeed,i>1&&(this.newProgressAnimationSpeed=this.defaultNewProgressAnimationSpeed/i*1.6)}this.progressTipGroup.enabled=!1;var s=e+t,a=this.rankManager.GetRank(e),n=this.rankManager.GetNextRank(e);this.oldProfileRankEmblemHelper.setEmblem(a),this.nextProfileRankEmblemHelper.setEmblem(n),this.pointsInbetweenRanks=n.requiredPoints-a.requiredPoints,this.oldPointsObtainedForNextRank=e-a.requiredPoints,this.newPointsObtainedForNextRank=t,s>=n.requiredPoints?(this.extraRankInQueue=!0,this.newPointsObtainedForNextRank=this.pointsInbetweenRanks-this.oldPointsObtainedForNextRank,this.extraPointsForRanks=t-this.newPointsObtainedForNextRank,this.extraRankStartingPoint=n.requiredPoints):(this.extraRankInQueue=!1,this.extraPointsForRanks=0,this.extraRankStartingPoint=0),this.progressTextValue=s,this.progressTextValue>n.requiredPoints&&(this.progressTextValue=n.requiredPoints),this.progressNextTargetValue=n.requiredPoints,this.progressText.element.text="0 / "+n.requiredPoints,this.progressTextOldRequired=a.requiredPoints,this.progressBarFillOld.element.width=0,this.progressBarFillNew.element.width=0,this.scaleOldProgressBar()},GameOverRankUphelper.prototype.scaleOldProgressBar=function(){var e=this;this.widthOfOldProgressBar=this.oldPointsObtainedForNextRank/this.pointsInbetweenRanks,this.currentProgressBarScale.x=this.totalProgressBarWidth*this.widthOfOldProgressBar;var t=this.progressBarFillOld.element,r=.7;0===this.widthOfOldProgressBar&&(r=.01);var i=this.defaultProgressBarScale.clone();this.activeTween=this.entity.tween(i).to(this.currentProgressBarScale,r,pc.CubicOut).on("update",(function(){t.width=i.x,0!==e.currentProgressBarScale.x&&(e.progressText.element.text=e.progressTextOldRequired+Math.round(i.x/e.currentProgressBarScale.x*e.oldPointsObtainedForNextRank)+" / "+e.progressNextTargetValue)})).on("complete",(function(){e.scaleNewProgressBar()})).start()},GameOverRankUphelper.prototype.scaleNewProgressBar=function(){var e=this;this.progressTipText.element.text=""+this.newPointsObtainedForNextRank,0!==this.newPointsObtainedForNextRank&&(this.progressTipGroup.enabled=!0),this.widthOfNextProgressBar=this.newPointsObtainedForNextRank/this.pointsInbetweenRanks,this.currentProgressBarScale.x=this.totalProgressBarWidth*this.widthOfNextProgressBar;var t=this.progressBarFillNew.element,r=this.defaultProgressBarScale.clone();this.activeTween=this.entity.tween(r).to(this.currentProgressBarScale,this.newProgressAnimationSpeed,pc.CubicOut).on("update",(function(){t.width=r.x,0!==e.currentProgressBarScale.x&&(e.progressText.element.text=e.progressTextOldRequired+e.oldPointsObtainedForNextRank+Math.round(r.x/e.currentProgressBarScale.x*e.newPointsObtainedForNextRank)+" / "+e.progressNextTargetValue)})).on("complete",(function(){e.extraRankInQueue?e.scaleNewRankEmblem():(e.animating=!1,e.activeTween=null)})).start()},GameOverRankUphelper.prototype.scaleNewRankEmblem=function(){var e=this,t=this.profileRankEmblemNext,r=this.largeNewEmblemScale.clone();this.activeTween=this.entity.tween(r).to(this.defaultNewEmblemScale,.55,pc.BackOut).on("update",(function(){t.setLocalScale(r)})).on("complete",(function(){e.setContent(e.extraRankStartingPoint,e.extraPointsForRanks,!1)})).start()},GameOverRankUphelper.prototype.setLoggedInState=function(e){this.isLoggedIn=e};var RanksPopup=pc.createScript("ranksPopup");RanksPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),RanksPopup.attributes.add("scrollController",{type:"entity",title:"ScrollController"}),RanksPopup.attributes.add("rankElement",{type:"entity",title:"Rank Element"}),RanksPopup.prototype.init=function(t,e){this.popupType=UIPopupTypes.RanksPopup,t.musicBundleAsset.ready((function(t){asset=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=asset}),this),this.rankManager=e,this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),this.ranks=this.rankManager.GetAllRanksInArray(),this.addedRankElements=[];for(let t=0;t<this.ranks.length;++t)if(0===t)this.rankElement.script.profileRankElementHelper.setContent(this.ranks[t]),this.addedRankElements.push(this.rankElement);else{var n=this.rankElement.clone();this.addedRankElements.push(n),n.script.profileRankElementHelper.setContent(this.ranks[t]),this.rankElement.parent.addChild(n)}},RanksPopup.prototype.getPopupType=function(){return this.popupType},RanksPopup.prototype.show=function(t){this.entity.enabled=!0,this.scrollController.script.scrollController.RefreshContent(),t&&t.userRankPoints?this.toggleElementHighlights(t.userRankPoints):this.toggleElementHighlights(-1),this.closeButtonScript.show(),this.fire("popupOpened",this.popupType)},RanksPopup.prototype.toggleElementHighlights=function(t){var e=null,n=!1;e=-1===t?-1:this.rankManager.GetRank(t).requiredPoints;for(let s=0;s<this.addedRankElements.length;++s)this.addedRankElements[s].script.profileRankElementHelper.currentRank.requiredPoints===e?this.addedRankElements[s].script.profileRankElementHelper.setActive(!0,!0,t,n):this.addedRankElements[s].script.profileRankElementHelper.currentRank.requiredPoints<e?this.addedRankElements[s].script.profileRankElementHelper.setActive(!1,!0,t,n):this.addedRankElements[s].script.profileRankElementHelper.setActive(!1,!1,t,n),t<this.addedRankElements[s].script.profileRankElementHelper.currentRank.requiredPoints&&(n=!0)},RanksPopup.prototype.hide=function(){this.entity.enabled&&(this.closeButtonScript.hide(),this.entity.enabled=!1,this.fire("popupClosed",this.popupType))},RanksPopup.prototype.reset=function(){},RanksPopup.prototype.onPopupCloseButtonClicked=function(){this.hide(),this.entity.sound.slot("button_small").play()};var ProfileRankElementHelper=pc.createScript("profileRankElementHelper");ProfileRankElementHelper.attributes.add("profileRankEmblem",{type:"entity",title:"Profile Rank Emblem"}),ProfileRankElementHelper.attributes.add("profileRankLabelEntity",{type:"entity",title:"Profile Rank Text"}),ProfileRankElementHelper.attributes.add("backgroundFrame",{type:"entity",title:"Frame"}),ProfileRankElementHelper.attributes.add("pointsLabel",{type:"entity",title:"Points Label"}),ProfileRankElementHelper.prototype.setContent=function(e){this.profileRankEmblemHelper=this.profileRankEmblem.script.rankEmblemHelper,this.profileRankLabelEntity.element.text=e.rankName.toUpperCase(),this.profileRankEmblemHelper.setEmblem(e),this.backgroundFrame.enabled=!1,this.currentRank=e,this.pointsLabel.element.text=""},ProfileRankElementHelper.prototype.setActive=function(e,t,n,i){this.backgroundFrame.enabled=!1,e?(this.profileRankLabelEntity.element.opacity=1,this.backgroundFrame.enabled=e,this.backgroundFrame.element.opacity=.8,0!==this.currentRank.requiredPoints&&(this.pointsLabel.element.text=this.currentRank.requiredPoints+" / "+this.currentRank.requiredPoints)):t&&!e?(this.profileRankLabelEntity.element.opacity=1,this.backgroundFrame.enabled=!0,this.backgroundFrame.element.opacity=.135,0!==this.currentRank.requiredPoints&&(this.pointsLabel.element.text=this.currentRank.requiredPoints+" / "+this.currentRank.requiredPoints)):(this.profileRankLabelEntity.element.opacity=.35,i||0===this.currentRank.requiredPoints?this.pointsLabel.element.text="":this.pointsLabel.element.text=n+" / "+this.currentRank.requiredPoints)};var SettingsPopup=pc.createScript("settingsPopup"),SettingsPopupIsShowing=!1;SettingsPopup.attributes.add("closeButton",{type:"entity",title:"Close Button"}),SettingsPopup.attributes.add("leaveButton",{type:"entity",title:"Leave Button"}),SettingsPopup.attributes.add("soundButtonEntity",{type:"entity",title:"Sound Button"}),SettingsPopup.attributes.add("musicButtonEntity",{type:"entity",title:"Music Button"}),SettingsPopup.attributes.add("sensitivitySlider",{type:"entity",title:"Sensitivity Slider"}),SettingsPopup.attributes.add("invertedMouseButton",{type:"entity",title:"Inverted Mouse Button"}),SettingsPopup.prototype.init=function(t,i,e){this.popupType=UIPopupTypes.SettingsPopup,this.subscribedToEvents=!1,this.musicManager=i,this.storageManager=e,t.musicBundleAsset.ready((function(t){asset=this.app.assets.find("ui_button_click.mp3","audio"),this.entity.sound.slot("button_small").asset=asset}),this),this.closeButtonScript=this.closeButton.script.uiButton,this.closeButtonScript.init("RETURN TO GAME"),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),this.invertedMouseButtonScript=this.invertedMouseButton.script.uiButton,this.invertedMouseButtonScript.init(""),this.invertedMouseButtonScript.on("buttonClicked",this.onInvertedMouseButtonClicked,this),this.leaveButtonScript=this.leaveButton.script.uiButton,this.leaveButtonScript.on("buttonClicked",this.onLeaveButtonClicked,this),this.leaveButtonScript.init("EXIT TO MAIN MENU"),this.soundButton=this.soundButtonEntity.script.uiButton,this.soundButton.init(),this.soundButton.on("buttonClicked",this.onSoundButtonClicked,this),this.musicButton=this.musicButtonEntity.script.uiButton,this.musicButton.init(),this.musicButton.on("buttonClicked",this.onMusicButtonClicked,this),this.sensitivityChangedWhileScreenWasOpened=!1,this.minSensitivity=.01,this.maxSensitivity=.4,this.sensitivitySliderScript=this.sensitivitySlider.script.uiSlider,this.currentSensitivity=DefaultMouseSensitivity,this.sensitivitySliderScript.init(this.currentSensitivity,this.minSensitivity,this.maxSensitivity)},SettingsPopup.prototype.getPopupType=function(){return this.popupType},SettingsPopup.prototype.show=function(t){this.subscribedToEvents||(this.subscribedToEvents=!0,this.musicManager.on("soundToggled",this.onSoundToggled,this),this.musicManager.on("musicToggled",this.onMusicToggled,this),this.sensitivitySliderScript.on("sliderValueUpdated",this.onSensitivitySliderValueChanged,this)),this.entity.enabled=!0,this.closeButtonScript.show(),this.leaveButtonScript.show(),this.invertedMouseButtonScript.show(invertedMouse),this.soundButton.show(!soundEnabled),this.musicButton.show(!musicEnabled),this.sensitivityChangedWhileScreenWasOpened=!1,this.currentSensitivity=mouseSensitivity,this.sensitivitySliderScript.show(this.currentSensitivity,this.minSensitivity,this.maxSensitivity),SettingsPopupIsShowing=!0,this.fire("popupOpened",this.popupType)},SettingsPopup.prototype.hide=function(){this.entity.enabled&&(this.sensitivityChangedWhileScreenWasOpened&&this.app.fire("mouseSensitivityChanged",this.currentSensitivity),this.subscribedToEvents&&(this.subscribedToEvents=!1,this.musicManager.off("soundToggled",this.onSoundToggled,this),this.musicManager.off("musicToggled",this.onMusicToggled,this),this.sensitivitySliderScript.off("sliderValueUpdated",this.onSensitivitySliderValueChanged,this)),this.closeButtonScript.hide(),this.leaveButtonScript.hide(),this.invertedMouseButtonScript.hide(),this.soundButton.hide(),this.musicButton.hide(),this.entity.enabled=!1,SettingsPopupIsShowing=!1,this.fire("popupClosed",this.popupType))},SettingsPopup.prototype.reset=function(){},SettingsPopup.prototype.onPopupCloseButtonClicked=function(){this.hide(),this.entity.sound.slot("button_small").play()},SettingsPopup.prototype.onInvertedMouseButtonClicked=function(){this.app.fire("invertedMouseChanged",!invertedMouse),this.entity.sound.slot("button_small").play()},SettingsPopup.prototype.onLeaveButtonClicked=function(){this.hide(),this.entity.sound.slot("button_small").play(),this.app.fire("localPlayerWillLeave"),setTimeout(function(){this.app.fire("leftGame")}.bind(this),10)},SettingsPopup.prototype.onSoundButtonClicked=function(){this.musicManager.onSoundButtonClicked()},SettingsPopup.prototype.onMusicButtonClicked=function(){this.musicManager.onMusicButtonClicked()},SettingsPopup.prototype.onMusicToggled=function(){this.musicButton.show(!musicEnabled)},SettingsPopup.prototype.onSoundToggled=function(){this.soundButton.show(!soundEnabled)},SettingsPopup.prototype.onSensitivitySliderValueChanged=function(t){this.currentSensitivity=t,this.currentSensitivity<this.minSensitivity&&(this.currentSensitivity=this.minSensitivity),this.sensitivityChangedWhileScreenWasOpened=!0};var AdsManager=pc.createScript("adsManager");AdsManager.attributes.add("adOverlayBlocker",{type:"entity",title:"adOverlayBlocker"}),AdsManager.attributes.add("adOverlayCloseButton",{type:"entity",title:"adOverlayCloseButton"}),AdsManager.prototype.init=function(t){switch(console.log("AdsManager init"),this.globalsController=t,this.adsProvider=null,this.waitingForAdToShow=!1,this.showingAd=!1,this.adShown=!1,this.minAdShowTimePassed=!1,this.closeButtonScript=this.adOverlayCloseButton.script.uiButton,this.closeButtonScript.init(Close_Popup_Button_Default_Text),this.closeButtonScript.on("buttonClicked",this.onPopupCloseButtonClicked,this),this.closeButtonTimer=null,this.closeButtonScript.hide(),this.closeButtonScript.entity.enabled=!1,this.globalsController.adsProvider){case AdsProviders.crazyGames:this.adsProvider=this.entity.script.crazyGamesProvider;break;case AdsProviders.gameDistribution:this.adsProvider=this.entity.script.gameDistributionProvider}null!==this.adsProvider?(this.adsProvider.on("onAdStarted",this.onAdStarted,this),this.adsProvider.on("onAdCompleted",this.onAdCompleted,this),this.adsProvider.on("minAdShowTimePassed",this.onMinAdShowTimePassed,this),this.adsProvider.init()):this.adShown=!0},AdsManager.prototype.showAd=function(){console.log("AdsManager showAd"),this.adShown||this.waitingForAdToShow||this.showingAd||null===this.adsProvider||(this.waitingForAdToShow=!0,this.adsProvider.providerID!=AdsProviders.crazyGames&&this.enableAdOverlay(),this.adsProvider.showAd())},AdsManager.prototype.onAdStarted=function(){console.log("AdsManager onAdStarted"),this.showingAd=!0,this.waitingForAdToShow=!1,this.fire("onAdStarted")},AdsManager.prototype.onAdCompleted=function(){console.log("AdsManager onAdCompleted"),this.adShown=!0,this.waitingForAdToShow=!1,this.showingAd=!1,this.disableAdOverlay(),this.fire("onAdCompleted")},AdsManager.prototype.isShowingAd=function(){var t=this.waitingForAdToShow||this.showingAd;return console.log("AdsManager isShowingAd "+t),t},AdsManager.prototype.wasAdShown=function(){return console.log("AdsManager wasAdShown "+this.adShown),this.adShown},AdsManager.prototype.onPopupCloseButtonClicked=function(){this.disableAdOverlay()},AdsManager.prototype.enableAdOverlay=function(){this.adOverlayBlocker.enabled=!0,this.closeButtonTimer=setTimeout(function(){this.closeButtonScript.entity.enabled=!0,this.closeButtonScript.show()}.bind(this),4e3)},AdsManager.prototype.disableAdOverlay=function(){clearTimeout(this.closeButtonTimer),this.adOverlayBlocker.enabled=!1,this.closeButtonScript.hide(),this.closeButtonScript.entity.enabled=!1},AdsManager.prototype.hasMinAdShowTimePassed=function(){return null!==this.adsProvider?this.minAdShowTimePassed=this.adsProvider.hasMinAdShowTimePassed():this.minAdShowTimePassed=!0,console.log("AdsManager hasMinAdShowTimePassed "+this.minAdShowTimePassed),this.minAdShowTimePassed},AdsManager.prototype.onMinAdShowTimePassed=function(){console.log("AdsManager onMinAdShowTimePassed"),this.adShown||this.onAdCompleted(),this.fire("minAdShowTimePassed")};var UiSlider=pc.createScript("uiSlider");UiSlider.attributes.add("sliderHandle",{type:"entity",title:"Slider Handle"}),UiSlider.prototype.init=function(e,i,t){this.currentSliderValue=0,this.valueRangeForReturnMin=i,this.valueRangeForReturnMax=t,this.adjustedOutputValueForRange=0,this.minSliderValue=0,this.maxSliderValue=this.entity.element.width,this.currentSliderPosition=new pc.Vec3,this.currentSliderPosition.set(this.sliderHandle.getLocalPosition().x,this.sliderHandle.getLocalPosition().y,this.sliderHandle.getLocalPosition().z),this.updateSlider(this.getNormalizedValue(e,i,t)),this.isSubscribedToEvents=!1,this.isSubscribedToEvents||(this.isSubscribedToEvents=!0,this.entity.element.on(pc.EVENT_MOUSEDOWN,this.onPress,this),this.entity.element.on(pc.EVENT_MOUSEUP,this.onRelease,this),this.app.touch&&(this.entity.element.on(pc.EVENT_TOUCHSTART,this.onPress,this),this.entity.element.on(pc.EVENT_TOUCHEND,this.onRelease,this)),this.app.mouse.on(pc.EVENT_MOUSEUP,this.onRelease,this)),this.subscribedToMove=!1},UiSlider.prototype.getNormalizedValue=function(e,i,t){return(e-i)/(t-i)},UiSlider.prototype.show=function(e,i,t){this.updateSlider(this.getNormalizedValue(e,i,t))},UiSlider.prototype.updateSlider=function(e){this.sliderHandle.setLocalPosition(this.maxSliderValue*e,this.currentSliderPosition.y,this.currentSliderPosition.z),this.updateSliderValue(!0)},UiSlider.prototype.updateSliderValue=function(e){this.currentSliderValue=(this.sliderHandle.getLocalPosition().x-this.minSliderValue)/(this.maxSliderValue-this.minSliderValue),this.adjustedOutputValueForRange=this.valueRangeForReturnMin+this.currentSliderValue*(this.valueRangeForReturnMax-this.valueRangeForReturnMin),e||this.fire("sliderValueUpdated",this.adjustedOutputValueForRange)},UiSlider.prototype.onPress=function(e){this.subscribedToMove||(this.app.mouse.on(pc.EVENT_MOUSEMOVE,this.onMouseMove,this),this.subscribedToMove=!0)},UiSlider.prototype.onRelease=function(e){this.subscribedToMove&&(this.app.mouse.off(pc.EVENT_MOUSEMOVE,this.onMouseMove,this),this.subscribedToMove=!1)},UiSlider.prototype.onMouseMove=function(e){this.currentSliderPosition.set(this.sliderHandle.getLocalPosition().x,this.sliderHandle.getLocalPosition().y,this.sliderHandle.getLocalPosition().z);var i=this.currentSliderPosition.x+e.dx;i<this.minSliderValue&&(i=this.minSliderValue),i>this.maxSliderValue&&(i=this.maxSliderValue),this.sliderHandle.setLocalPosition(i,this.currentSliderPosition.y,this.currentSliderPosition.z),this.updateSliderValue(!1)};var _crazyGamesProvider,CrazyGamesProvider=pc.createScript("crazyGamesProvider");CrazyGamesProvider.prototype.init=function(){this.providerID=AdsProviders.crazyGames,console.log("CrazyGamesProvider init"),_crazyGamesProvider=this;const{CrazySDK:e}=window.CrazyGames;this.crazysdk=e.getInstance(),this.crazysdk.init(),this.addListeners(),this.adShownTimestamp=null,this.adWaitTimeout=null,this.adCompletedTimeout=null,this.minBannerAdWaitTime=2e3,this.minBannerAdShowTime=5e3,this.adShowTimePassed=!1,this.bannerAdDiv=null},CrazyGamesProvider.prototype.showAd=function(){this.bannerAdDiv=document.createElement("div"),this.bannerAdDiv.id="banner-container",this.bannerAdDiv.style.width="728px",this.bannerAdDiv.style.height="90px",this.bannerAdDiv.style.position="absolute",this.bannerAdDiv.style.top="10%",this.bannerAdDiv.style.left="50%",this.bannerAdDiv.style.transform="translate(-50%, -10%)",document.body.appendChild(this.bannerAdDiv),console.log("CrazyGamesProvider showAd"),null===this.adWaitTimeout&&(this.adWaitTimeout=setTimeout(function(){console.log("_crazyGamesProvider.adWaitTimeout ran out"),this.onMinAdShowTimePassed(),this.adWaitTimeout=null}.bind(this),this.minBannerAdWaitTime)),this.crazysdk.requestBanner([{containerId:"banner-container",size:"728x90"}])},CrazyGamesProvider.prototype.addListeners=function(){console.log("CrazyGamesProvider addListeners"),this.app.on("uiScreenShown",this.onUIScreenShown,this),this.crazysdk.addEventListener("initialized",this.sdkInitialized),this.crazysdk.addEventListener("bannerRendered",this.bannerRendered),this.crazysdk.addEventListener("bannerError",this.bannerError)},CrazyGamesProvider.prototype.removeListeners=function(){console.log("CrazyGamesProvider removeListeners"),this.app.off("uiScreenShown",this.onUIScreenShown,this),this.crazysdk.removeEventListener("initialized",this.sdkInitialized),this.crazysdk.removeEventListener("bannerRendered",this.bannerRendered),this.crazysdk.removeEventListener("bannerError",this.bannerError)},CrazyGamesProvider.prototype.onUIScreenShown=function(e){switch(console.log("CrazyGamesProvider onUIScreenShown "+e),e){case UIScreenTypes.HomeScreen:if(null!==this.bannerAdDiv){var r=document.getElementById(this.bannerAdDiv.id);r.parentNode.removeChild(r),this.removeListeners()}}},CrazyGamesProvider.prototype.sdkInitialized=function(e){console.log("CrazyGamesProvider sdkInitialized "+JSON.stringify(e))},CrazyGamesProvider.prototype.bannerRendered=function(e){console.log(`Banner for container ${e.containerId} has been rendered!`),null!==_crazyGamesProvider.adWaitTimeout&&(clearTimeout(_crazyGamesProvider.adWaitTimeout),_crazyGamesProvider.adWaitTimeout=null),null===_crazyGamesProvider.adCompletedTimeout&&(_crazyGamesProvider.adCompletedTimeout=setTimeout((function(){console.log("_crazyGamesProvider.adCompletedTimeout ran out"),_crazyGamesProvider.onMinAdShowTimePassed(),_crazyGamesProvider.adCompletedTimeout=null}),_crazyGamesProvider.minBannerAdShowTime))},CrazyGamesProvider.prototype.bannerError=function(e){console.log(`Banner render error: ${e.error}`),console.log("_crazyGamesProvider.adWaitTimeout "+_crazyGamesProvider.adWaitTimeout),console.log("_crazyGamesProvider.adCompletedTimeout "+_crazyGamesProvider.adCompletedTimeout),null!==_crazyGamesProvider.adWaitTimeout&&(clearTimeout(_crazyGamesProvider.adWaitTimeout),_crazyGamesProvider.adWaitTimeout=null),null!==_crazyGamesProvider.adCompletedTimeout&&(clearTimeout(_crazyGamesProvider.adCompletedTimeout),_crazyGamesProvider.adCompletedTimeout=null),_crazyGamesProvider.onMinAdShowTimePassed()},Cra