var config={apiKey:"AIzaSyA8aLVHWe7TVmctOXXVXYTl4pnzTgUydG4",authDomain:"swd-user.firebaseapp.com",databaseURL:"https://swd-user.firebaseio.com",storageBucket:"swd-user.appspot.com"};firebase.initializeApp(config);var SWD=SWD||{};SWD.user=null,SWD.analytics=null,SWD.mgr=null,SWD.locale="en",SWD.API_KEY="6bff2f89-84ab-463c-886e-fc0f443da4cf",SWD.RADAR_API_KEY="772e6cda60a5a959965040814aa1f071-d96be1c1-ff71-4b04-92c5-77a87c8caeb8-haPmTD9Kf21KA1iW",SWD.Observations=null,SWD.SWUser=null,SWD.TemperatureValue=null,SWD.WeatherTiles=null,SWD.WeatherTile=null,SWD.Graph=null,SWD.D3Graph=null,SWD.DeviceListItems=null,SWD.DerivedValues=null,SWD.StateManager=null,SWD.SettingsStateManager=null,SWD.Analytics=null,SWD.Diagnostics=null,SWD.Storage=SWD.Storage||{},SWD.LocationIntegrations=null,SWD.RESTHelper=null,SWD.LocationSelection=null,SWD.DataDisplay={},SWD.HistoryView=null,SWD.WeatherListSummaryUpdater=null,SWD.DeviceType={AIR:"AIR",SKY:"SKY"},SWD.ObRecord={AirDensity:"air_density",AirTemp:"air_temp_display",AirTempObserved:"air_temp_observed",AirTempWithSymbol:"air_temp_with_symbol",AirTempWithSymbolAndUnits:"air_temp_with_symbol_and_units",AvgStrikeDistance:"avg_dist",Battery:"battery",BatteryState:"battery_state",Backfill:"backfill",DeviceId:"device_id",DeltaT:"dew_point_display",DeltaTObserved:"delta_t_observed",DeltaTWithSymbol:"delta_t_with_symbol",DeltaTWithSymbolAndUnits:"delta_t_with_symbol_and_units",DewPoint:"dew_point_display",DewPointObserved:"dew_point_observed",DewPointWithSymbol:"dew_point_with_symbol",DewPointWithSymbolAndUnits:"dew_point_with_symbol_and_units",FeelsLike:"feels_like",FeelsLikeObserved:"feels_like_observed",FeelsLikeWithSymbol:"feels_like_with_symbol",FeelsLikeWithSymbolAndUnits:"feels_like_with_symbol_and_units",HeatIndex:"heat_index_display",HeatIndexObserved:"heat_index_observed",HeatIndexWithSymbol:"heat_index_with_symbol",HeatIndexWithSymbolAndUnits:"heat_index_with_symbol_and_units",HeatIndexOrDewPointDisplay:"heat_index_or_dew_point_display",HeatIndexOrDewPointLabel:"heat_index_or_dew_point_label",Humidity:"rh",HumidityWithSymbol:"rh_with_symbol",LightningLastStrikeObserved:"lightning_last_strike_observed",LightningLastStrikeFuzzy:"lightning_last_strike_fuzzy",LightningLastStrikeDistanceObserved:"lightning_last_strike_distance_observed",LightningLastStrikeDistanceDisplay:"lightning_last_strike_distance_display",LightningLastStrikeDistanceDisplayWithUnits:"lightning_last_strike_distance_display_with_units",LightningLastStrikeDistanceTextDisplay:"lightning_last_strike_distance_text_display",LightningStrikeCountLast3Hrs:"lightning_strike_count_last_3hrs",LightningStrikeDistanceObserved:"lightning_strike_distance_observed",LightningStrikeDistanceDisplay:"lightning_strike_distance_display",LightningStrikeDistanceDisplayWithUnits:"lightning_strike_distance_with_units",LightningStrikeDistanceTextDisplay:"lightning_strike_distance_text_display",Lux:"lux",LuxDisplayValueWithUnits:"lux_display_with_units",Pressure:"pres_display",PressureObserved:"pres_observed",PressureWithUnits:"pres_with_units",PressureUnits:"pres_units",PressureTrendLocalized:"pres_trend_localized",PressureTrend:"pres_trend",PrecipAccumLocalYesterdaySensor:"precip_accum_local_yesterday_sensor",PrecipAccumLocalYesterdaySensorDisplayWithUnits:"precip_accum_local_yesterday_sensor_display_with_units",PrecipAccumLocalYesterdayFinal:"precip_accum_local_yesterday_final",PrecipAccumLocalYesterdayFinalDisplayWithUnits:"precip_accumm_local_yesterday_final_display_with_units",PrecipAccumLocalToday:"precip_accum_local_today",PrecipAccumLocalTodayDisplayWithUnits:"precip_accum_local_today_display_with_units",PrecipAccumLocalTodayFinal:"precip_accum_local_today_final",PrecipAccumLocalTodayFinalDisplayWithUnits:"precip_accum_local_today_final_display_with_units",PrecipDurationLocalDay:"precip_duration_local_day",PrecipDurationLocalDayWithUnit:"precip_duration_local_day_with_units",PrecipDurationLocalYesterday:"precip_duration_local_yesterday",PrecipDurationLocalYesterdayWithUnits:"precip_duration_local_yesterday_with_units",PrecipRatePerHour:"precip_rate_per_hour_in_mm",PrecipRateDisplay:"precip_rate_display",PrecipRateDisplayWithUnits:"precip_rate_display_with_units",PrecipRateTextDisplay:"precip_rate_text_display",PrecipRateTextDisplayLocalized:"precip_rate_text_display_localized",PrecipRateTextAndValueDisplay:"precip_rate_text_and_value_display",Precip:"precip_total_observed",PrecipDisplay:"precip_total_display",PrecipDisplayWithUnits:"precip_total_display_with_units",PrecipTotalReportedLastHour:"precip_total_reported_last_hour",PrecipTotalDisplayLastHour:"precip_total_display_last_hour",PrecipTotalDisplayLastHourWithUnits:"precip_total_display_last_hour_with_units",PrecipTotalReportedLast24Hours:"precip_total_reported_last_24",PrecipTotalDisplayLast24Hours:"precip_total_display_last_24",PrecipTotalDisplayLast24HoursWithUnits:"precip_total_display_last_24_with_units",PrecipType:"precip_type",RawObservation:"raw_ob",ReportingInterval:"reporting_interval_in_minutes",SeaLevelPressureRaw:"sea_level_pres_raw",SeaLevelPressure:"sea_level_pres_display",SeaLevelPressureWithUnits:"sea_level_pres_with_units",SerialNumber:"serial",SolarRadiation:"solar_radiation",SolarRadiationDisplayWithUnits:"solar_radiation_display_with_units",Source:"source",StrikeCount:"strike_count",TimestampObserved:"timestamp_observed",TimestampLocalFuzzy:"timestamp_local_fuzzy",TimestampLocalLong:"timestamp_local_long",WetBulbTemp:"wet_bulb_temp_display",WetBulbGlobeTemp:"wet_bulb_globe_temp_display",WetBulbTempObserved:"wet_bulb_temp_observed",WetBulbGlobeTempObserved:"wet_bulb_globe_temp_observed",WetBulbTempWithSymbol:"wet_bulb_temp_with_symbol",WetBulbGlobeTempWithSymbol:"wet_bulb_globe_temp_with_symbol",WetBulbTempWithSymbolAndUnits:"wet_bulb_temp_with_symbol_and_units",WetBulbGlobeTempWithSymbolAndUnits:"wet_bulb_globe_temp_with_symbol_and_units",WindDir:"wind_dir_display",WindDirObserved:"wind_dir_observed",WindDirCardinal:"wind_dir_cardinal",WindChill:"wind_chill_display",WindChillObserved:"wind_chill_observed",WindChillWithSymbol:"wind_chill_with_symbol",WindChillWithSymbolAndUnits:"wind_chill_with_symbol_and_units",WindDirection:"wind_direction_display",WindAvg:"wind_avg_display",WindAvgObserved:"wind_avg_observed",WindAvgWithUnits:"wind_avg_with_units",WindGust:"wind_gust_display",WindGustObserved:"wind_gust_observed",WindGustWithUnits:"wind_gust_with_units",WindInterval:"wind_interval",WindLull:"wind_lull_display",WindLullObserved:"wind_lull_observed",WindLullWithUnits:"wind_lull_with_units",WindLullAndGustWithUnits:"wind_lull_gust_with_units",WindUnits:"wind_units",TempUnits:"temp_units",Timestamp:"timestamp",UV:"uv",UVWithIndex:"uv_with_index"},SWD.RapidWindObRecord={RapidWindSpeedObserved:"rapid_wind_observed",RapidWindSpeed:"rapid_wind_display",RapidWindSpeedWithUnits:"rapid_wind_with_units",RapidWindDirectionObserved:"rapid_wind_dir_observed",RapidWindDirectionCardinal:"rapid_wind_dir_cardinal",RapidWindDirection:"rapid_wind_dir_display",RapidWindAvg:"rapid_wind_avg_display",RapidWindAvgObserved:"rapid_wind_avg_observed",RapidWindAvgWithUnits:"rapid_wind_avg_with_units",RawObservation:"raw_ob",RapidWindTimestamp:"rapid_wind_timestamp"},SWD.TemperatureUnit={CELSIUS:"c",FAHRENHEIT:"f"},SWD.DistanceUnit={MILES:"mi",KILOMETERS:"km"},SWD.PressureUnit={INCHES:"inhg",MILLIBAR:"mb",MILLIMETERS:"mmhg",HECTOPASCAL:"hpa"},SWD.WindUnit={MPS:"mps",MPH:"mph",KPH:"kph",KTS:"kts",BFT:"bft",LFM:"lfm"},SWD.PrecipUnit={INCHES:"in",MILLIMETERS:"mm",CENTIMETERS:"cm"},SWD.DirectionUnit={DEGREES:"degrees",CARDINAL:"cardinal"},SWD.OtherUnit={IMPERIAL:"imperial",METRIC:"metric"},SWD.ElevationUnit={IMPERIAL:"ft",METRIC:"m"},SWD.UserTheme={LIGHT:"light",DARK:"dark",SYSTEM:"system"},SWD.SettingsKey={CURRENT_LOCATION:"current_location",DIRECTION:"units_direction",DISTANCE:"units_distance",LIGHTNING_EVENT:"events_lightning",STATUS_EVENT:"events_status",QUALITY_CONTROL_EVENT:"events_qc",PRECIP:"units_precip",PRESSURE:"units_pressure",RAIN_START_EVENT:"events_rain_start",TEMP:"units_temp",WIND:"units_wind",THEME:"user_theme",TIME:"units_time",MINI_MAP:"user_mini_map",OTHER:"units_other"},SWD.LocalStorage={TEMP_SETTING:"temp_units",DISTANCE_SETTING:"dist_units",MAIN_VIEW:"main_view"},SWD.LocationStatus={ONLINE:"online",OFFLINE:"offline"},SWD.DarkModeMapStyles=[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.stroke",stylers:[{color:"#512b59"}]},{elementType:"labels.text.fill",stylers:[{color:"#AE9AB3"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#AE9AB3"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#866a8a"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],SWD.apiBaseURL="https://swd.weatherflow.com/swd/rest/",SWD.makeRequest=function(e,t,a){var i=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;null!=SWD.user&&null!=SWD.user.token()&&(t.token=SWD.user.token()),$.getJSON(i,t,(function(e){a&&"function"==typeof a&&a(e)}))},SWD.makeDownloadRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;$.ajax({contentType:"application/json",data:t,method:"GET",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeAsyncRequest=async function(e,t){var a=SWD.apiBaseURL+e+"?callback=?&api_key="+SWD.API_KEY+"&build="+window.SWDDebug.appBuild;return null!=SWD.user&&null!=SWD.user.token()&&(t.token=SWD.user.token()),await $.getJSON(a,t)},SWD.makeCreateRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({contentType:"application/json",data:t,method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeCreateRequestWithURLParams=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.each(t,(function(e,t){i=i+"&"+e+"="+encodeURIComponent(t)})),$.ajax({contentType:"application/json",method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeUpdateRequest=function(e,t,a){if(null!=SWD.user.jwt){var i=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({contentType:"application/json",data:t,method:"PUT",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.makeDeleteRequestWithoutParams=function(e,t){if(null!=SWD.user.jwt){var a=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt;$.ajax({method:"DELETE",url:a,success:function(e,a,i){t&&"function"==typeof t&&t(e)}})}},SWD.makeDeleteRequest=function(e,t,a){if(null!=SWD.user.jwt){var i="";$.each(t,(function(e,t){i+="&"+e+"="+t}));var n=SWD.apiBaseURL+e+"?api_key="+SWD.API_KEY+"&token="+SWD.user.jwt+i;$.ajax({method:"DELETE",url:n,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})}},SWD.IdApiBaseURL="https://swd.weatherflow.com/id/oauth2/",SWD.makeIdRequest=function(e,t,a){var i=SWD.IdApiBaseURL+e+"?callback=?";$.getJSON(i,t,(function(e){a&&"function"==typeof a&&a(e)}))},SWD.makeIdPostRequest=function(e,t,a){var i=SWD.IdApiBaseURL+e+"?callback=?",n=$.param(t);$.ajax({contentType:"application/x-www-form-urlencoded",data:n,processData:!1,method:"POST",url:i,success:function(e,t,i){a&&"function"==typeof a&&a(e)}})},SWD.parseJSON=function(e){var t=null;try{var a=JSON.parse(e);a&&"object"==typeof a&&(t=a)}catch(e){t=null}return t},SWD.isMobile=function(){return window.getComputedStyle(document.body,":after").getPropertyValue("content").indexOf("mobile")>-1},SWD.debouncer=function(e,t){var a;return t=t||200,function(){var i=this,n=arguments;clearTimeout(a),a=setTimeout((function(){e.apply(i,Array.prototype.slice.call(n))}),t)}},SWD.sanitizeForHTML=function(e){const t=String(e);if(null!=t){const e={"&":"&","<":"<",">":">",'"':""","/":"/"},a=/[&<>"/]/gi;return t.replace(a,(function(t){return e[t]}))}},SWD.rainCheckEnabled=function(e){var t=!1;return null!=e.device_settings&&null!=e.device_settings.show_precip_final&&e.device_settings.show_precip_final&&(t=e.device_settings.show_precip_final),t},SWD.Storage.isAvailable=function(){var e;if(null==SWD.isLocalStorageAvailable)try{var t="__storage_test__";(e=window.localStorage).setItem(t,t),e.removeItem(t),SWD.isLocalStorageAvailable=!0}catch(e){SWD.isLocalStorageAvailable=!1}return SWD.isLocalStorageAvailable},SWD.Storage.saveSessionItem=function(e,t){this.isAvailable()&&window.sessionStorage.setItem(e,t)},SWD.Storage.getSessionItem=function(e){return this.isAvailable()?window.sessionStorage.getItem(e):null},SWD.Storage.saveLocalItem=function(e,t){this.isAvailable()&&window.localStorage.setItem(e,t)},SWD.Storage.getLocalItem=function(e){return this.isAvailable()?window.localStorage.getItem(e):null},SWD.Storage.removeLocalItem=function(e){return this.isAvailable()?window.localStorage.removeItem(e):null},SWD.Storage.removeSessionItem=function(e){this.isAvailable()&&window.sessionStorage.removeItem(e)},SWD.Storage.saveLocalBooleanItem=function(e,t){this.isAvailable()&&window.localStorage.setItem(e,JSON.stringify(t))},SWD.Storage.getLocalObject=function(e){return this.isAvailable()?JSON.parse(window.localStorage.getItem(e)):null},SWD.isDarkMode=function(){var e=!1;return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&!$("html").hasClass("light")&&(e=!0),$("html").hasClass("dark")&&(e=!0),e},SWD.isLocalStorageAvailable=null;var Util={convertValue:function(e,t,a,i){var n=null;return i=void 0!==i&&i,0==e?0:(t==SWD.TemperatureUnit.CELSIUS&&a==SWD.TemperatureUnit.FAHRENHEIT&&(n=1.8*e+32,i&&(n=Math.round(10*n)/10)),t==SWD.TemperatureUnit.FAHRENHEIT&&a==SWD.TemperatureUnit.CELSIUS&&(n=(e-32)/1.8,i&&(n=Math.round(10*n)/10)),n)},getUrlParamByName:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},isDocumentHidden:function(){var e=this._getDocumentHiddenProp();return!!e&&document[e]},_getDocumentHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;tn?1:0}))}};$.fn.stripClass=function(e,t){var a=new RegExp((t?"\\S+":"\\b")+e+"\\S*","g");return this.attr("class",(function(e,t){if(t)return t.replace(a,"")})),this},function(e){e.SWUser=function(t){this.defaultSettings={defaultUnits:null,ready:null,userSignedIn:null,accessToken:null},this.settings=$.extend({},this.defaultSettings,t),this.isTime24HourFormat=this._isTime24HourFormat(),null!=this.settings.defaultUnits&&null!=this.settings.defaultUnits[e.SettingsKey.WIND]&&"km/h"==this.settings.defaultUnits[e.SettingsKey.WIND]&&(this.settings.defaultUnits[e.SettingsKey.WIND]=e.WindUnit.KPH),this.l10n=new e.Locale,this.userSettings=this.settings.defaultUnits||null,this.jwt=null,this.autoConnect=!1,this.unauthenticatedPages=["/alexa.html","/authorize.html","/forums.html","/google-home.html","/ifttt.html","/reset.html","/signin.html","/support-signin.html","/support-signout.html","/index.html"],this._init()},e.SWUser.IFTTT_SIGN_IN="ifttt",e.SWUser.ALEXA_SIGN_IN="alexa",e.SWUser.GOOGLE_HOME_SIGN_IN="google-home",e.SWUser.FORUMS_SIGN_IN="forums",e.SWUser.SUPPORT="support",e.SWUser.SUPPORT_SIGN_OUT="support-signout",e.SWUser.IMPLICIT_OAUTH="authorize-implicit",e.SWUser.CODE_OAUTH="authorize-code",e.SWUser.DEFAULT_SIGN_IN="default",e.SWUser.prototype._init=function(){var t=this;null!=this.settings.accessToken?"function"==typeof this.settings.ready&&"function"==typeof this.settings.ready&&this.settings.ready():firebase.auth().onAuthStateChanged((function(a){var i=t.signInType();a?(i==e.SWUser.DEFAULT_SIGN_IN&&"/signin.html"==location.pathname?(e.Storage.removeSessionItem("sharedStationId"),window.location.href="/index.html"):t.autoConnect||$("body").addClass("signed-in"),"undefined"!=typeof bugsnagClient&&(bugsnagClient.user={id:a.uid}),a.getToken().then((function(n){switch(t.jwt=n,i){case e.SWUser.IFTTT_SIGN_IN:t.autoConnect&&t.doIFTTTSignIn();break;case e.SWUser.ALEXA_SIGN_IN:t.autoConnect?t.doImplicitOAuth(!0):$("#signed-in-user").html(e.user.username());break;case e.SWUser.GOOGLE_HOME_SIGN_IN:t.autoConnect?t.doImplicitOAuth(!1):$("#signed-in-user").html(e.user.username());break;case e.SWUser.FORUMS_SIGN_IN:t.autoConnect?t.doForumsOAuth():$("#signed-in-user").html(e.user.username());break;case e.SWUser.IMPLICIT_OAUTH:t.autoConnect?t.doImplicitOAuth(!1):$("#signed-in-user").html(e.user.username());break;case e.SWUser.CODE_OAUTH:t.autoConnect?t.doAuthorizationFlow():$("#signed-in-user").html(e.user.username());break;case e.SWUser.SUPPORT:t.autoConnect?t.doSupportOAuth():t.autoConnect=!0;break;default:t._updateUser(),null==t.settings.defaultUnits?t.getUnitSettings((function(){"function"==typeof t.settings.userSignedIn&&t.settings.userSignedIn(a),"function"==typeof t.settings.ready&&t.settings.ready()})):"function"==typeof t.settings.ready&&t.settings.ready()}}))):t._isAuthenticatedPage()?window.location.href="/signin.html":(i&&(t.autoConnect=!0),"function"==typeof t.settings.ready&&t.settings.ready())}))},e.SWUser.prototype.signInType=function(){var t=e.SWUser.DEFAULT_SIGN_IN;return document.body.hasAttribute("data-auth")&&(t=$("body").attr("data-auth")),t},e.SWUser.prototype._isAuthenticatedPage=function(){var e=window.location.pathname,t=!0;return(this.unauthenticatedPages.indexOf(e)>-1||e.indexOf("/share")>-1||e.indexOf("/map")>-1||e.indexOf("/station")>-1||e.indexOf("/history")>-1||e.indexOf("/forecast")>-1)&&(t=!1),t},e.SWUser.prototype.doIFTTTSignIn=function(){this._sendJWTToAPI(this.jwt,(function(e){if(e&&Object.prototype.hasOwnProperty.call(e,"auth_token")){var t=Util.getUrlParamByName("state");window.location.href="https://ifttt.com/channels/weatherflow/authorize?state="+t+"&code="+e.auth_token}}))},e.SWUser.prototype.doImplicitOAuth=function(t){var a=Util.getUrlParamByName("client_id"),i=Util.getUrlParamByName("redirect_uri"),n={client_id:a,redirect_uri:i,fb_user_token:encodeURIComponent(this.jwt)};t=t||!1,e.makeIdRequest("token_implicit",n,(function(e){if(null!=e.status.status_code&&0==e.status.status_code&&null!=e.access_token){var a=Util.getUrlParamByName("state"),n=t?"&token_type=Bearer":"";window.location.href=i+"#state="+a+"&access_token="+e.access_token+n}else $("#authorize-instructions").hide(),$("#authorize-logged-in").hide(),$("#sign-in-wrapper").hide(),$("#oauth-error").show()}))},e.SWUser.prototype.doAuthorizationFlow=function(){var t=Util.getUrlParamByName("client_id"),a=Util.getUrlParamByName("redirect_uri"),i=Util.getUrlParamByName("code_challenge"),n={client_id:t,redirect_uri:a,fb_user_token:encodeURIComponent(this.jwt),code_challenge:i};e.makeIdRequest("auth_token",n,(function(e){if(null!=e.status.status_code&&0==e.status.status_code&&null!=e.auth_token){var t=Util.getUrlParamByName("state");window.location.href=a+"?code="+e.auth_token+"&state="+t}else $("#authorize-instructions").hide(),$("#authorize-logged-in").hide(),$("#sign-in-wrapper").hide(),$("#oauth-error").show()}))},e.SWUser.prototype.doForumsOAuth=function(){var t=Util.getUrlParamByName("sso"),a={sig:Util.getUrlParamByName("sig"),payload:t,fb_user_token:encodeURIComponent(this.jwt)};e.makeIdRequest("discourse",a,(function(e){null!=e.status.status_code&&0==e.status.status_code&&null!=e.payload&&null!=e.redirect_uri&&null!=e.sig&&(window.location.href=e.redirect_uri+"?sso="+encodeURIComponent(e.payload)+"&sig="+e.sig)}))},e.SWUser.prototype.doGeneralOAuth=function(){var t=Util.getUrlParamByName("redirect_uri");if("token"==Util.getUrlParamByName("response_type")){var a=Util.getUrlParamByName("state");window.location.href=t+"#token="+e.user.jwt+"&state="+a}},e.SWUser.prototype.doSupportOAuth=function(){var t=Util.getUrlParamByName("return_to"),a={fb_user_token:encodeURIComponent(this.jwt)};e.makeIdRequest("zendesk_jwt",a,(function(e){null!=e.status.status_code&&0==e.status.status_code&&null!=e.jwt&&(window.location.href="https://smartweather.zendesk.com/access/jwt?jwt="+e.jwt+"&return_to="+encodeURIComponent(t))}))},e.SWUser.prototype._sendJWTToAPI=function(e,t){var a={fb_user_token:encodeURIComponent(e),client_id:Util.getUrlParamByName("client_id"),redirect_uri:Util.getUrlParamByName("redirect_uri")};$.getJSON("https://swd.weatherflow.com/id/oauth2/auth_token?callback=?",a,(function(e){t&&"function"==typeof t&&t(e)}))},e.SWUser.prototype.signOut=function(){firebase.auth().signOut()},e.SWUser.prototype.username=function(){return firebase.auth().currentUser.email},e.SWUser.prototype.localize=function(e){return this.l10n.localize(e)},e.SWUser.prototype.localizeDate=function(e){return this.l10n.localizeDate(e.toDate())},e.SWUser.prototype.localizeDateNoYear=function(e){return this.l10n.localizeDateNoYear(e.toDate())},e.SWUser.prototype.getUnitSettings=function(t){var a=this;e.makeRequest("user_settings",{},(function(i){Object.prototype.hasOwnProperty.call(i,"status")&&0==i.status.status_code&&Object.prototype.hasOwnProperty.call(i,"settings")&&null!=i.settings?(a.userSettings=i.settings,"km/h"==a.userWindUnits()&&a.setSetting(e.SettingsKey.WIND,e.WindUnit.KPH),"function"==typeof t&&t()):(a.userSettings=a._getDefaultSettings(),"function"==typeof t&&t())}))},e.SWUser.prototype.setUnitSettings=function(e){this.userSettings=e},e.SWUser.prototype.userTemperatureUnits=function(){return this._getSetting(e.SettingsKey.TEMP)},e.SWUser.prototype.userPressureUnits=function(){return this._getSetting(e.SettingsKey.PRESSURE)},e.SWUser.prototype.userWindUnits=function(){return this._getSetting(e.SettingsKey.WIND)},e.SWUser.prototype.userDistanceUnits=function(){return this._getSetting(e.SettingsKey.DISTANCE)},e.SWUser.prototype.userTimeUnits=function(){return null===e.Storage.getLocalItem(e.SettingsKey.TIME)?(this.setUserTime("12"),"12"):e.Storage.getLocalItem(e.SettingsKey.TIME)},e.SWUser.prototype.userPrecipUnits=function(){return this._getSetting(e.SettingsKey.PRECIP)},e.SWUser.prototype.userDirectionUnits=function(){return this._getSetting(e.SettingsKey.DIRECTION)},e.SWUser.prototype.userOtherUnits=function(){return this._getSetting(e.SettingsKey.OTHER)},e.SWUser.prototype.userLightningEvent=function(){return this._getSetting(e.SettingsKey.LIGHTNING_EVENT)},e.SWUser.prototype.userRainEvent=function(){return this._getSetting(e.SettingsKey.RAIN_START_EVENT)},e.SWUser.prototype.userStatusEvent=function(){return this._getSetting(e.SettingsKey.STATUS_EVENT)},e.SWUser.prototype.userQualityControlEvent=function(){return this._getSetting(e.SettingsKey.QUALITY_CONTROL_EVENT)},e.SWUser.prototype.userLastViewed=function(){return e.Storage.getLocalObject("lastViewed")},e.SWUser.prototype.userTheme=function(){return e.Storage.getLocalItem(e.SettingsKey.THEME)},e.SWUser.prototype.setUserTheme=function(t){t==e.UserTheme.SYSTEM?(e.Storage.removeLocalItem(e.SettingsKey.THEME),enableTheme()):(e.Storage.saveLocalItem(e.SettingsKey.THEME,t),enableTheme())},e.SWUser.prototype.userMiniMapOptions=function(){return e.Storage.getLocalObject(e.SettingsKey.MINI_MAP)},e.SWUser.prototype.setUserMiniMap=function(t,a){let i={mini_map:t,percent_chance:parseInt(a)};e.Storage.saveLocalItem(e.SettingsKey.MINI_MAP,JSON.stringify(i))},e.SWUser.prototype.setUserTime=function(t){e.Storage.saveLocalItem(e.SettingsKey.TIME,t)},e.SWUser.prototype.getUserCurrentLocation=function(){if(null!=this.userSettings.current_location)return this.userSettings.current_location},e.SWUser.prototype.userCurrentLocation=function(){var e=this.userLastViewed(),t=null;return null!=e&&Object.prototype.hasOwnProperty.call(e,"id")&&(t=e.id),t},e.SWUser.prototype.isCurrentLocationArbitrary=function(){var e=this.userLastViewed(),t=null;return null!=e&&Object.prototype.hasOwnProperty.call(e,"isArbitrary")&&(t=e.isArbitrary),t},e.SWUser.prototype.userTemperatureDisplay=function(t){return new e.TemperatureValue(t,e.user.userTemperatureUnits()).displayValueWithSymbolAndUnits()},e.SWUser.prototype.userPressureDisplay=function(t){return new e.PressureValue(t,e.user.userPressureUnits()).displayValueWithUnits()},e.SWUser.prototype.userHumidityDisplay=function(t){return new e.HumidityValue(t).displayValueWithSymbol()},e.SWUser.prototype.userPrecipAmountDisplay=function(t){return new e.PrecipValue(t,e.user.userPrecipUnits()).displayValueWithUnits()},e.SWUser.prototype.userWindSpeedDisplay=function(t){return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValueWithUnits()},e.SWUser.prototype.userWindDirectionDisplay=function(t){return new e.WindDirectionValue(t,e.user.userDirectionUnits()).displayValue()},e.SWUser.prototype.userDistanceDisplay=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValueWithUnits()},e.SWUser.prototype.userBrightnessDisplay=function(e){return e+" lux"},e.SWUser.prototype.userSolarRadiationDisplay=function(e){return e+" W/m2"},e.SWUser.prototype.userFuzzyTimeDisplay=function(t){return new e.TimestampValue(t).localFuzzyTime(!0)},e.SWUser.prototype.userFuzzyTimeDisplayNoSeconds=function(t){return new e.TimestampValue(t).localFuzzyTime(!1)},e.SWUser.prototype.userDateTimeDisplayLocal=function(e){return moment(1e3*e).format("YYYY-MM-DD h:mm:ss A")},e.SWUser.prototype.userDateTimeDisplayStationTime=function(t,a){var i=navigator.language.slice(0,2),n=e.user.isTime24HourFormat?"L H:mm:ss":"L h:mm:ss a",r=moment(1e3*t).tz(a);return r.locale(i),r.format(n)},e.SWUser.prototype.userUVDisplay=function(t){return new e.UVValue(t).displayValue()},e.SWUser.prototype.userDeltaTDisplay=function(t){return e.user.userTemperatureUnits()==e.TemperatureUnit.FAHRENHEIT?Math.abs(1.8*t).toFixed(1)+"° "+e.user.userTemperatureUnits().toUpperCase():t+"° "+e.user.userTemperatureUnits().toUpperCase()},e.SWUser.prototype.userAirDensityDisplay=function(t){return e.user.userOtherUnits()==e.OtherUnit.IMPERIAL?(.062428*t).toFixed(5)+" lbs/ft3":t+" kg/m3"},e.SWUser.prototype.userBatteryDisplay=function(e){return e.toFixed(2)+"v"},e.SWUser.prototype.userBatteryDisplayWithUnits=function(t,a){var i=null;if(null!=t&&1==a){switch(t){case 2:i=e.user.localize("StatusTextBatteryPowerSave");break;case 4:i=e.user.localize("StatusTextBatteryGood");break;case 5:i=e.user.localize("StatusTextBatteryEco");break;case 9:i="---";break;default:i=e.user.localize("StatusTextBatteryGood")}return i}return null!=t&&0==a?e.user.localize("StatusTextBatteryGood"):"---"},e.SWUser.prototype.userStatusDisplay=function(t,a){var i=a;switch(a){case e.LocationStatus.ONLINE:i=e.user.localize("StatusTextStatusOnline");break;case e.LocationStatus.OFFLINE:i=e.user.localize("StatusTextStatusOffline")}return i},e.SWUser.prototype.userLocationStatusDisplay=function(t){var a=t;switch(t){case e.LocationStatus.ONLINE:a="Online";break;case e.LocationStatus.OFFLINE:a="Offline"}return a},e.SWUser.prototype.userWifiSignalDisplay=function(t){var a;return t<=-99?a=`${e.user.localize("StatusTextSignalNotConnected")} (${t})`:t<-80&&t>-99?a=`${e.user.localize("StatusTextSignalWeak")} (${t})`:t<-70&&t>=-80?a=`${e.user.localize("StatusTextGood")} (${t})`:t>=-70&&(a=`${e.user.localize("StatusTextSignalStrong")} (${t})`),a},e.SWUser.prototype.userCellularSignalDisplay=function(t,a){let i;return 99===t?i=`${e.user.localize("StatusTextNoSignal")}`:t>0?t>=36&&t<=65?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t>=26&&t<=35?i=`${e.user.localize("StatusTextSignalSatisfactory")} (${a}, ${t})`:t>=0&&t<=25&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):t<=0&&t>=-30?t>-10?i=`${e.user.localize("StatusTextSignalExcellent")} (${a}, ${t})`:t>=-20&&t<=-10?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t<-20&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):t<=-40&&t>=-110?t>=-65?i=`${e.user.localize("StatusTextSignalExcellent")} (${a}, ${t})`:t>=-75&&t<-65?i=`${e.user.localize("StatusTextGood")} (${a}, ${t})`:t>=-85&&t<-75?i=`${e.user.localize("StatusTextSignalSatisfactory")} (${a}, ${t})`:t<-85&&(i=`${e.user.localize("StatusTextSignalPoor")} (${a}, ${t})`):i=`${e.user.localize("StatusTextNoSignal")}`,i},e.SWUser.prototype.userDeviceSignalDisplay=function(t,a){var i;return"offline"!==a?t<-85?i=`${e.user.localize("StatusTextSignalWeak")} (${t})`:t>=-85&&(i=`${e.user.localize("StatusTextGood")} (${t})`):i="---",i},e.SWUser.prototype.userLightningDistanceTextDisplay=function(t){return new e.LightningDistanceValue(t,e.user.userDistanceUnits()).textDisplay()},e.SWUser.prototype.userRainAccumulationDisplay=function(t,a){a=null==a||a;var i=new e.PrecipValue(t,e.user.userPrecipUnits());return a?i.displayValueWithUnits():i.displayValue()},e.SWUser.prototype.userPrecipMinutesDisplay=function(e){var t="";return null!=e&&null!=e&&(t=e+" min"),t},e.SWUser.prototype._isTime24HourFormat=function(){let e=!1;return e="12"!==this.userTimeUnits(),e},e.SWUser.prototype.defaultDisplay=function(e){return e},e.SWUser.prototype._getDefaultSettings=function(t){var a={};return a[e.SettingsKey.DIRECTION]=e.DirectionUnit.CARDINAL,a[e.SettingsKey.DISTANCE]=e.DistanceUnit.MILES,a[e.SettingsKey.PRECIP]=e.PrecipUnit.INCHES,a[e.SettingsKey.PRESSURE]=e.PressureUnit.MILLIBAR,a[e.SettingsKey.TEMP]=e.TemperatureUnit.FAHRENHEIT,a[e.SettingsKey.WIND]=e.WindUnit.MPH,a[e.SettingsKey.LIGHTNING_EVENT]=!1,a[e.SettingsKey.RAIN_START_EVENT]=!1,a[e.SettingsKey.QUALITY_CONTROL_EVENT]=!1,a[e.SettingsKey.THEME]=e.UserTheme.SYSTEM,a[e.SettingsKey.OTHER]=e.OtherUnit.IMPERIAL,this._createSettings(a,t),a},e.SWUser.prototype._getSetting=function(e){if(null!=this.userSettings&&Object.prototype.hasOwnProperty.call(this.userSettings,e))return this.userSettings[e]},e.SWUser.prototype.setSetting=function(e,t){this.userSettings[e]=t,this._saveSettings()},e.SWUser.prototype._createSettings=function(t,a){if(null!=t){var i={settings:t};e.makeCreateRequest("user_settings",JSON.stringify(i),a)}},e.SWUser.prototype._saveSettings=function(){if(null!=this.userSettings){var t={settings:this.userSettings};e.makeUpdateRequest("user_settings",JSON.stringify(t))}},e.SWUser.prototype._updateUser=function(){var t={locale:navigator.language||""};e.makeUpdateRequest("user",JSON.stringify(t),(function(){}))},e.SWUser.prototype.token=function(){var e=null;return null!=this.settings.accessToken?e=this.settings.accessToken:null!=this.jwt&&(e=this.jwt),e},e.SWUser.LOW_POWER_FLAGS={LOW_POWER_MODE1:2048,LOW_POWER_MODE2:4096,LOW_POWER_MODE3:8192,LOW_POWER_MODE4:1048576,LOW_POWER_MODE5:2097152}}(window.SWD=window.SWD||{}),function(e,t){e.Locale=function(){this.defaultCode="en-US",this.browserCode=this.defaultCode,this.code=this.defaultCode,this.locale=null,this.defaultUnits={imperial:{temp_units:e.TemperatureUnit.FAHRENHEIT,dist_units:e.DistanceUnit.MILES},metric:{temp_units:e.TemperatureUnit.CELSIUS,dist_units:e.DistanceUnit.KILOMETERS}},this.languageMap={"en-US":"en-US","es-ES":"es-ES","es-AR":"es-ES","fr-FR":"fr-FR","fr-CA":"fr-CA"},this.localizations={"en-US":{units:"imperial",translations:{AccountManagementButtonDeleteData:"Delete All Data",AccountManagementMessageDeleteConfirm:"Are you sure you want to delete your data? This operation cannot be reversed.",AccountMangementMessageDataError:"There was an error deleting your data. ",AccountSetupCreateButtonCreateAccount:"Create Account",AccountSetupCreateButtonHaveAccount:"Have an account?",AccountSetupCreateButtonPrivacyPolicy:"Privacy Policy",AccountSetupCreateButtonToS:"Terms of Use",AccountSetupCreateNavTitle:"Create Account",AccountSetupCreateTextfieldEmail:"Email",AccountSetupCreateTextfieldPassword:"Password",AccountSetupCreateTextfieldPasswordConfirm:"Re-enter Password",AccountSetupErrorMessageInvalidAccount:"There is an error with your account. Please contact customer support.",AccountSetupErrorMessageInvalidEmail:"Please enter a valid email address.",AccountSetupErrorMessageInvalidPassword:"Please enter a valid password.",AccountSetupErrorMessagePasswordLength:"Your password must be 6 or more characters long.",AccountSetupErrorMessagePasswordMismatch:"Please check to make sure your passwords match.",AccountSetupErrorMessageRequiredFields:"Email and password are required",AccountSetupErrorTitleInvalidEmail:"Invalid Email",AccountSetupErrorTitleInvalidPassword:"Invalid Password",AccountSetupErrorTitlePasswordMismatch:"Passwords don't match",AccountSetupForgotButtonReset:"Reset Password",AccountSetupForgotErrorPasswordMismatach:"The passwords entered do not match",AccountSetupForgotErrorRequiredFields:"Please enter a password and password confirmation",AccountSetupForgotErrorResetError:"Unable to reset password",AccountSetupForgotMessageConfirm:"Confirm new password",AccountSetupForgotMessageResetExpired:"Your password reset code has expired",AccountSetupForgotMessageSuccess:"An email with instructions on how to reset your password has been sent.",AccountSetupForgotMessageUser:"Reset password for",AccountSetupForgotNavTitle:"Forgot Password",AccountSetupForgotTextfieldEmail:"Email",AccountSetupForgotTitleNewPassword:"New Password",AccountSetupMessageContinueToTempest:"Continue to Tempest website",AccountSetupMessageCreateLogIn:"To create a WeatherFlow login: Download the Tempest app from the app stores.",AccountSetupMessagePasswordResetSuccess:"Your password has been reset.",AccountSetupSignInButtonForgot:"Forgot Password?",AccountSetupSignInButtonSignIn:"Sign In",AccountSetupSignInNavTitle:"Sign In",AccountSetupSignInTextfieldEmail:"Email",AccountSetupSignInTextfieldPassword:"Password",AccountSetupStartButtonAboutTemptest:"about the Tempest Weather System",AccountSetupStartButtonCreateAccount:"Create Account",AccountSetupStartButtonLearnMore:"Learn More",AccountSetupStartButtonSignIn:"Sign In",AccountSetupStartNavTitle:"Get Started",AccountSetupStartTitle:"Let's get started",AlertsMessageFurtherNotice:"Until further notice",AlertsTextNowUntil:"Now until",AlertsTextTodayAt:"Today at",AlertsTextUntil:"Until",CalibrationMessageError:"There was an error saving the calibration. ",CalibrationMessageSaved:"Calibration saved. ",DevelopersButtonCreate:"Create Application",DevelopersButtonCreateToken:"Create Token",DevelopersButtonUpdate:"Update Application",DevelopersButtonViewTokens:"View Tokens",DevelopersMessageConfirmDelete:"Are you sure you want to delete this application?",DevelopersMessageCreateApplication:"Create an application if you would like users of your application to be able to access their Tempest station data.",DevelopersMessageCreateToken:"Create an access token. ",DevelopersMessageDeauthorize:'Deauthorizing will cause this integration to stop working. You will need to set it up again if you want to use it in the future.',DevelopersMessageDeleteTokenConfirm:"Are you sure you want to delete this token?",DevelopersMessageInfo:'For more information on developing apps for the Tempest Weather System, please visit the Tempest API & Developer Platform documentation.',DevelopersMessageIntegrations:"Integrations allow you to link your account and station seamlessly. You can usually unlink your account from within those applications, but you can also revoke access here, if necessary.",DevelopersMessagePersonalTokenNote:"Note: You do not need a Personal Use Token for applications & integrations that do not ask for one.",DevelopersMessageRequired:"Please fill out all required fields.",DevelopersMessageThirdParty:"Some third-party applications & integrations require a Personal Use Token to access data from your weather station. Create and use a different token for each app.",DevelopersMessageTokenNoteLink:'Developers, please see our API Documentation for information on how to use Personal Use Tokens in your project.',DevelopersTitle:"Developers",DevelopersTitleAccessToken:"Access Token",DevelopersTitleAccessTokenName:"Token Name",DevelopersTitleAppDescription:"Application Description",DevelopersTitleApplicationName:"Application Name",DevelopersTitleCallbackUrl:"Authorization Callback URL (one per line)",DevelopersTitleClientId:"Client ID",DevelopersTitleDeauthorize:"Deauthorize",DevelopersTitleIntegration:"Integration",DevelopersTitleIntegrations:"Integrations",DevelopersTitlePersonalUse:"Personal Use Tokens",DevelopersTitleRedirect:"Redirect URL",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Token Name: (Optional)",DevelopersTitleTokens:"Developers Tokens",DevelopersTitleViewApplications:"View Applications",DeviceSetupAddedButtonAddAnother:"Add Another Device",DeviceSetupAddedButtonNext:"Next",DeviceSetupAddedDescriptionEnd:"has been added to",DeviceSetupAddedDescriptionStart:"Your device",ForecastSettingsMiniMapPrecipChance:"Precip Chance",ForecastSettingsMiniMapShow:"Show",ForecastSettingsMiniMapValueAlways:"Always",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Never",ForecastSettingsTitleMiniMap:"Mini Map",GeneralAlertDeviceOffline:"One or more of your devices is offline",GeneralAlertStationOffline:"Your station is currently offline",GeneralAlexaMessageConnect:"Connect Alexa to your Tempest account.",GeneralAlexaMessageError:"We are unable to link your account using the Alexa app. Please link your account using the Alexa website.",GeneralAlexaMessageInstructions:"to connect Alexa to your account.",GeneralAuthButtonAllow:"Allow",GeneralAuthButtonDeny:"Deny",GeneralAuthError:"Unable to link account.",GeneralAuthErrorApplication:"Unknown Application",GeneralButtonCancel:"Cancel",GeneralButtonClose:"Close",GeneralButtonCopy:"Copy",GeneralButtonDismiss:"Dismiss",GeneralButtonDone:"Done",GeneralButtonNext:"Next",GeneralButtonRefresh:"Refresh",GeneralButtonRemove:"Remove",GeneralButtonRetry:"Retry",GeneralButtonRevoke:"Revoke",GeneralButtonShowBatteryCard:"Show Battery Card",GeneralButtonSignOut:"Sign Out",GeneralButtonSkip:"Skip",GeneralButtonViewMore:"View More",GeneralCalibrateTitleOffset:"Offset",GeneralCustomNetworkButtonEditShared:"Edit Shared Station Name",GeneralCustomNetworkButtonUnlinkStation:"Want to unlink your station? Contact us.",GeneralCustomNetworkClemsonDescription:"is part of the Clemson Tempest Network.",GeneralCustomNetworkMessage:"This station, named",GeneralCustomNetworkMessageClemson:"Observations from this station are being sent to Clemson University.",GeneralCustomNetworkTempestDescription:"is part of the Tempest Network.",GeneralDashboardMessageNoDisplay:"Please use a larger screen to view the dashboard.",GeneralDashboardTitleBatteryDevice:"Battery Device",GeneralDashboardTitleSettings:"Dashboard Settings",GeneralDashboardTitleStatType:"Stat Type",GeneralErrorCheckForMistakes:"The page you requested can not be found. Please check the URL for mistakes and try again.",GeneralErrorPageNotFound:"Page Not Found",GeneralErrorTitle:"Error",GeneralForumMessageConnect:"Connect your account to the Tempest community",GeneralLimitLinkGetPlus:"Get Plus Membership",GeneralLimitTitleViewOn:"View on",GeneralLimitWarningStationView:"You have reached the station owner's personal weather page. Real-time data is not currently available on this page. To access this Tempest weather station's weather data right now, choose from the options below:",GeneralMapMessageNoObs:"No recent observation.",GeneralMessageBuyWs:"Buy a weather station",GeneralMessageLocationMapInstructions:"Drag marker to update location.",GeneralMessageRequestError:"Invalid Request.",GeneralMessageSearchWeather:"Search for weather",GeneralMessageSkyOffline:"SKY Offline",GeneralMessageSocketError:"Unable to connect.",GeneralMessageSocketRetry:"Unable to connect. Retrying connection in ",GeneralMessageTempestLearnMore:"Don't own a Tempest? Learn more about Tempest.",GeneralMessageWeatherFlowSignIn:"Sign into WeatherFlow",GeneralMessageWifiNotSetup:"Your station is offline. Check your station's network connection and/or WiFi setup.",GeneralNavTitleHistory:"History",GeneralNavTitleLogIn:"Log In",GeneralNavTitleMap:"Map",GeneralNavTitleMaps:"Maps",GeneralNavTitleMyStation:"My Station",GeneralNavTitleSettings:"Settings",GeneralNavTitleWeather:"Weather",GeneralPowerSaveMessageBattery:"Your Tempest is conserving power.",GeneralPowerSaveMessageRain:"Your Tempest rain sensor is disabled from active listening to conserve power.",GeneralPowerSaveMessageWind:"Your Tempest is on a lower wind sampling frequency to conserve power.",GeneralPowerSaveTitle:"Power Save Mode",GeneralSettingsMessageConfig:"To add / remove devices or stations, configure WiFi, etc, please use the Tempest mobile app to connect directly with your WeatherFlow device.",GeneralSocketMessageRetrying:"Retrying...",GeneralTextBatteryVoltage:"Battery Voltage",GeneralTextConnect:"Connect",GeneralTextCount:"Count",GeneralTextCurrentConditions:"Current Conditions",GeneralTextDelete:"Delete",GeneralTextHour:"Hour",GeneralTitleAccount:"Account",GeneralTitleAdvanced:"Advanced",GeneralTitleAirTemperature:"Air Temperature",GeneralTitleAlerts:"Alerts",GeneralTitleBrightness:"Brightness",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Data",GeneralTitleDataAuth:"Data Authorizations",GeneralTitleDevice:"Device",GeneralTitleDevices:"Devices",GeneralTitleDewPoint:"Dew Point",GeneralTitleDisableLightning:"Disable Lightning",GeneralTitleDisclaimer:"Disclaimer",GeneralTitleDisplayOptions:"Display Options",GeneralTitleEdit:"Edit",GeneralTitleElevation:"Elevation",GeneralTitleEnviroment:"Environment",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Feels Like",GeneralTitleForecast:"Forecast",GeneralTitleFullScreenMode:"Full Screen Mode",GeneralTitleHeightAboveGround:"Height Above Ground",GeneralTitleHelp:"Help",GeneralTitleHumidity:"Relative Humidity",GeneralTitleHumidityShort:"Humidity",GeneralTitleImperial:"Imperial",GeneralTitleInstallationTip:"Installation Tips",GeneralTitleLast3Hrs:"Last 3 Hrs",GeneralTitleLastOb:"Last Observation",GeneralTitleLastSrikeDistance:"Last Strike Distance",GeneralTitleLastStrike:"Last Detected",GeneralTitleLightning:"Lightning",GeneralTitleLightningDistance:"Lightning Distance",GeneralTitleLightningDistanceDetected:"Lightning Distance Detected",GeneralTitleLightningLast3Hrs:"Lightning Detected Last 3 Hrs",GeneralTitleLightningLastDetected:"Lightning Last Detected",GeneralTitleLightningStrikeCount:"Lightning Strike Count",GeneralTitleLocation:"Location",GeneralTitleLocations:"Locations",GeneralTitleLux:"Lux",GeneralTitleManage:"Manage",GeneralTitleManageDevices:"Manage Devices",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Metric",GeneralTitleMore:"More",GeneralTitleNA:"N/A",GeneralTitleNewsletter:"Newsletter",GeneralTitleOther:"Other",GeneralTitlePressure:"Sea Level Pressure",GeneralTitlePressureShort:"Pressure",GeneralTitlePublicData:"Public Data",GeneralTitlePublicName:"Public Name",GeneralTitleQualityControl:"Quality Control",GeneralTitleRain:"Rain",GeneralTitleRainAccumToday:"Rain Accumulation (Today)",GeneralTitleRainAccumYesterday:"Rain Accumulation (Yesterday)",GeneralTitleRainCheck:"Rain Check",GeneralTitleRainDurationToday:"Rain Duration (Today)",GeneralTitleRainDurationYesterday:"Rain Duration (Yesterday)",GeneralTitleRainIntensity:"Rain Intensity",GeneralTitleRainRate:"Rain Rate",GeneralTitleRainStart:"Rain Start",GeneralTitleRainToday:"Rain (Today)",GeneralTitleRainYesterday:"Rain (Yesterday)",GeneralTitleRequiredField:"Required Fields",GeneralTitleReset:"Reset",GeneralTitleShareDialog:"Your Station's URL",GeneralTitleSharePage:"Share Page",GeneralTitleSharePublicly:"Share Publicly",GeneralTitleShowNCRain:"Show NC Rain",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Smart Home Integrations",GeneralTitleSolarRadiation:"Solar Radiation",GeneralTitleStaionMap:"Station Map",GeneralTitleStationPressure:"Station Pressure",GeneralTitleStations:"Stations",GeneralTitleStatus:"Status",GeneralTitleSwitchLocations:"Switch Locations",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Tempest Network",GeneralTitleTermsConditions:"Terms & Conditions",GeneralTitleTheme:"Theme",GeneralTitleTime:"Time",GeneralTitleToday:"Today",GeneralTitleTrend:"Trend",GeneralTitleTrendFalling:"Falling",GeneralTitleTrendRising:"Rising",GeneralTitleTrendSteady:"Steady",GeneralTitleUVIndex:"UV Index",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Wind",GeneralTitleWindChill:"Wind Chill",GeneralTitleWindDirection:"Wind Direction",GeneralTitleWindDirectionOffset:"Wind Direction Offset",GeneralTitleWindGust:"Wind Gust",GeneralTitleWindLull:"Wind Lull",GeneralTitleWindSpeed:"Wind Speed",GeneralTitleWUSetup:"WU Setup",GeneralTokenErrorDeleteApplication:"Unable to delete application. Please try your request again.",GeneralTokenErrorDeleteIntegration:"Unable to delete integration. Please try your request again.",GeneralTokenErrorDeleteToken:"Unable to delete access token. Please try your request again.",GeneralTokenMessageCopied:"Token copied to clipboard. ",GeneralTokenMessageDeleteConfirm:"Are you sure you want to delete this token?",GeneralTokenMessageNoPersonalTokens:"You have not created any personal use tokens.",GeneralValueAvg:"Avg",GeneralValueClear:"Clear",GeneralValueCloudy:"Cloudy",GeneralValueDisplayDark:"Dark",GeneralValueDisplayLight:"Light",GeneralValueDisplaySystem:"System",GeneralValueDistance:"Distance",GeneralValueDuration:"Duration",GeneralValueEmail:"Email",GeneralValueExtremeRain:"Extreme Rain",GeneralValueFoggy:"Foggy",GeneralValueGust:"Gust",GeneralValueGusting:"Gusting",GeneralValueHeatIndex:"Heat Index",GeneralValueHeavyRain:"Heavy Rain",GeneralValueIndoor:"Indoor",GeneralValueLightRain:"Light Rain",GeneralValueLull:"Lull",GeneralValueMax:"Max",GeneralValueMin:"Min",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixed",GeneralValueModerateRain:"Moderate Rain",GeneralValueOutdoor:"Outdoor",GeneralValuePartlyCloudy:"Partly Cloudy",GeneralValueRainExtreme:"Extreme",GeneralValueRainHeavy:"Heavy",GeneralValueRainLight:"Light",GeneralValueRainLikely:"Rain Likely",GeneralValueRainModerate:"Moderate",GeneralValueRainNone:"None",GeneralValueRainPossible:"Rain Possible",GeneralValueRainVeryHeavy:"Very Heavy",GeneralValueRainVeryLight:"Very Light",GeneralValueSnow:"Snow",GeneralValueSnowLikely:"Snow Likely",GeneralValueSnowPossible:"Snow Possible",GeneralValueStrikeCount:"Strike Count",GeneralValueStrikes:"Strikes",GeneralValueSunny:"Sunny",GeneralValueTemp:"Temperature",GeneralValueThunderstormsLikely:"Thunderstorms Likely",GeneralValueThunderstormsPossible:"Thunderstorms Possible",GeneralValueTimestamp:"Timestamp",GeneralValueTimezone:"Timezone",GeneralValueTotal:"Total",GeneralValueUnits:"Units",GeneralValueUnknown:"Unknown",GeneralValueVeryHeavyRain:"Very Heavy Rain",GeneralValueVeryLightRain:"Very Light Rain",GeneralValueVolts:"volts",GeneralValueWetBulb:"Wet Bulb Temperature",GeneralValueWetBulbGlobe:"Wet Bulb Globe Temperature",GeneralValueWindy:"Windy",GeneralValueWintryMixLikely:"Wintry Mix Likely",GeneralValueWintryMixPossible:"Wintry Mix Possible",GeneralWarningDeviceLate:"One or more of your devices is late",GeneralWarningStationLate:"Your station is late",GraphMessageNoObs:"There are no observations for the current time period. Zoom in or out to adjust the graph's date range.",GraphTextAccumulation:"Accumulation",GraphTitleLightningStrikesDetected:"Strikes Detected",GraphTitleNewData:"New Data",GraphValueTemp:"Temp",GraphValueTempHigh:"Temp (High)",GraphValueTempLow:"Temp (Low)",GridTextAdvancedStats:"Advanced Stats",GridTextAirDensity:"Air Density",GridTextDeltaT:"Delta T",HistoryErrorMissingData:"No data available for this date.",HistoryErrorNonStation:"Detailed weather statistics are available for locations with Tempest hardware.\n\nPlease switch to a Tempest station to view history.",HistoryRangeAllTime:"All Time",HistoryRangeDay:"Day",HistoryRangeMonth:"Month",HistoryRangeWeek:"Week",HistoryRangeYear:"Year",HistoryTitleNonStationErrorTitle:"History",HistoryTitleWeek:"Week Of",IftttMessageConnect:"Connect IFTTT to your WeatherFlow account.",IftttMessageInstructions:"to connect IFTTT to your account.",LocationAddNavTitle:"Add Location",LocationButtonAdd:"Add",LocationListMessageDeleteConfirm:"Are you sure you want to delete this location?",LocationListMessageDeleteSuccess:"Location successfully deleted",LocationListNavTitle:"Locations",LocationListSectionTitleLocations:"Locations",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Save with different name",LocationMapDescription:"Unlike other weather apps we forecast for your neighborhood, not just your city. Move the map to position the pin and that is the location we will deliver a forecast for.",LocationMapMessageSelect:"Select location using map",LocationMapMessageUpdateError:"Unable to update location. ",LocationMapNavTitle:"Neighborhood Location",LocationMapTitleAddLocation:"Map Location",LocationMapTitleSelectedLocation:"Selected Location:",LocationMessageSearchError:"Unable to fetch location forecast.",LocationNameButtonSave:"Save",LocationNameTextfieldPlaceholder:"Your Name",LocationNameTitleMapLocation:"Map Location",LocationNameTitleNewName:"New Name",MapSettingsTitle:"Map Settings",MapSettingsTitleHybrid:"Hybrid",MapSettingsTitleLegend:"Legend",MapSettingsTitleMapType:"Map Type",MapSettingsTitleOverlayType:"Overlay Type",MapSettingsTitleRadar:"Radar / Precipitation",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Show Legend",MapSettingsTitleTempestStations:"Tempest Stations",MapSettingsTitleTheme:"Map Theme",MapSettingsTitleZoomControl:"Show Zoom Control",NearcastMessageInfo:"This forecast is powered by our patented Nearcast technology which provides accurate point-specific weather data everywhere you need it.",RadarForecastPrecipTypeRain:"Rain near",RadarForecastPrecipTypeSleet:"Sleet near",RadarForecastPrecipTypeSnow:"Snow near",RadarForecastPrecipTypeStorm:"Storm near",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrees",StatusButtonTroubleshoot:"Troubleshoot >",StatusMessageTimezone:"All times are displayed in station local time.",StatusMessageTroubleshootDevice:"Use the troubleshooting tips to reconnect your Hub.",StatusNavTitle:"Status",StatusTextBatteryEco:"Eco",StatusTextBatteryGood:"Good",StatusTextBatteryLow:"Low",StatusTextBatteryPowerSave:"Power Save",StatusTextBatteryReplace:"Replace",StatusTextBLEStatusConnected:"Connected",StatusTextBLEStatusDisconnected:"Disconnected",StatusTextGood:"Good",StatusTextLightningDisturber:"Lightning Disturber",StatusTextLightningFailed:"Lightning Failed",StatusTextLightningNoise:"Lightning Noise",StatusTextNoSignal:"No Signal",StatusTextPrecipFailed:"Precip Failed",StatusTextPressureFailed:"Pressure Failed",StatusTextRHFailed:"RH Failed",StatusTextSatisfactory:"Satisfactory",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Good",StatusTextSignalNotConnected:"Not Connected",StatusTextSignalPoor:"Poor",StatusTextSignalStrong:"Strong",StatusTextSignalWeak:"Weak",StatusTextStatusOffline:"Offline",StatusTextStatusOnline:"Online",StatusTextTemperatureFailed:"Temperature Failed",StatusTextUVFailed:"UV Failed",StatusTextWindFailed:"Wind Failed",StatusTitleBattery:"Battery",StatusTitleBatteryState:"State",StatusTitleBLEStatus:"Bluetooth Connection Status",StatusTitleCellStatus:"Cell Status (CREG, RSSI)",StatusTitleDeviceId:"Device ID",StatusTitleDeviceSignal:"Device Signal (RSSI)",StatusTitleFirmware:"Firmware Revision",StatusTitleHub:"Hub - ",StatusTitleLastObservation:"Last Observation",StatusTitleLastStatusMessage:"Last Status Message",StatusTitleLearnMore:"Learn More",StatusTitleName:"Name",StatusTitleSensorStatus:"Sensor Status",StatusTitleSerial:"Serial Number",StatusTitleStationId:"Station ID",StatusTitleStatus:"Network Status",StatusTitleUptime:"Uptime",StatusTitleWifiSignal:"Wi-Fi Signal (RSSI)",WeatherUndergroundButtonLink:"Link",WeatherUndergroundButtonRemoveLink:"Remove WU Link",WeatherUndergroundErrorForecastFailed:"Forecast failed to load.",WeatherUndergroundLink:"Link Weather Underground",WeatherUndergroundMessageConfirm:"Are you sure you want to remove your WU station link?",WeatherUndergroundMessageRemoveLink:"Unable to remove WU station link.",WeatherUndergroundMessageSharingRestricted:"To view your Tempest data on other weather apps, please contact customer support for a list of current options.",WeatherUndergroundTitleSendRain:"Send Rain",WeatherUndergroundTitleStationKey:"Station Key",WuSetupMessageRequiredFieldError:"Station ID and Station Key are required",WuSetupMessageSaveError:"Unable to link station to WU"}},"fr-FR":{translations:{AccountManagementButtonDeleteData:"Supprimer toutes les données",AccountManagementMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer vos données ? Cette opération est irréversible.",AccountMangementMessageDataError:"Une erreur s'est produite lors de la suppression de vos données.",AccountSetupCreateButtonCreateAccount:"Créer un compte",AccountSetupCreateButtonHaveAccount:"Avez-vous un compte?",AccountSetupCreateButtonPrivacyPolicy:"Politique de confidentialité",AccountSetupCreateButtonToS:"Conditions d'utilisation",AccountSetupCreateNavTitle:"Créer un compte",AccountSetupCreateTextfieldEmail:"E-mail",AccountSetupCreateTextfieldPassword:"Mot de passe",AccountSetupCreateTextfieldPasswordConfirm:"Entrez à nouveau le mot de passe",AccountSetupErrorMessageInvalidAccount:"Il y a un problème avec votre compte. Veuillez contacter le service client.",AccountSetupErrorMessageInvalidEmail:"SVP, mettez une adresse email valide.",AccountSetupErrorMessageInvalidPassword:"Entrer un mot de passe valide svp.",AccountSetupErrorMessagePasswordLength:"Votre mot de passe doit comporter 6 caractères ou plus.",AccountSetupErrorMessagePasswordMismatch:"Veuillez vérifier que vos mots de passe correspondent.",AccountSetupErrorMessageRequiredFields:"L'e-mail et le mot de passe sont requis",AccountSetupErrorTitleInvalidEmail:"Email invalide",AccountSetupErrorTitleInvalidPassword:"Mot de passe incorrect",AccountSetupErrorTitlePasswordMismatch:"Les mots de passe ne correspondent pas",AccountSetupForgotButtonReset:"Réinitialiser le mot de passe",AccountSetupForgotErrorPasswordMismatach:"Les mots de passe saisis ne correspondent pas",AccountSetupForgotErrorRequiredFields:"Veuillez saisir un mot de passe et une confirmation du mot de passe",AccountSetupForgotErrorResetError:"Impossible de réinitialiser le mot de passe",AccountSetupForgotMessageConfirm:"Confirmer le nouveau mot de passe",AccountSetupForgotMessageResetExpired:"Votre code de réinitialisation de mot de passe a expiré",AccountSetupForgotMessageSuccess:"Un e-mail contenant des instructions sur la façon de réinitialiser votre mot de passe a été envoyé.",AccountSetupForgotMessageUser:"Réinitialiser le mot de passe pour",AccountSetupForgotNavTitle:"Mot de passe oublié",AccountSetupForgotTextfieldEmail:"E-mail",AccountSetupForgotTitleNewPassword:"Nouveau mot de passe",AccountSetupMessageContinueToTempest:"Continuer vers le site Web de Tempest",AccountSetupMessageCreateLogIn:"Pour créer une connexion WeatherFlow : Téléchargez l'application Tempest depuis les magasins d'applications.",AccountSetupMessagePasswordResetSuccess:"Votre mot de passe a été réinitialisé.",AccountSetupSignInButtonForgot:"Mot de passe oublié?",AccountSetupSignInButtonSignIn:"Se connecter",AccountSetupSignInNavTitle:"Se connecter",AccountSetupSignInTextfieldEmail:"E-mail",AccountSetupSignInTextfieldPassword:"Mot de passe",AccountSetupStartButtonAboutTemptest:"A propos du système météo Tempest",AccountSetupStartButtonCreateAccount:"Créer un compte",AccountSetupStartButtonLearnMore:"Apprenez-en plus",AccountSetupStartButtonSignIn:"Se connecter",AccountSetupStartNavTitle:"Commencez",AccountSetupStartTitle:"Commençons",AlertsMessageFurtherNotice:"Jusqu'à nouvel ordre",AlertsTextNowUntil:"Maintenant jusqu'à",AlertsTextTodayAt:"Aujourd'hui à",AlertsTextUntil:"Jusqu'à",CalibrationMessageError:"Une erreur s'est produite lors de l'enregistrement de l'étalonnage.",CalibrationMessageSaved:"Calibrage enregistré.",DevelopersButtonCreate:"Créer une application",DevelopersButtonCreateToken:"Créer un jeton",DevelopersButtonUpdate:"Mettre à jour l'application",DevelopersButtonViewTokens:"Voir les jetons",DevelopersMessageConfirmDelete:"Êtes-vous sûr de vouloir supprimer cette application ?",DevelopersMessageCreateApplication:"Créez une application si vous souhaitez que les utilisateurs de votre application puissent accéder aux données de leur station Tempest.",DevelopersMessageCreateToken:"Créez un jeton d'accès.",DevelopersMessageDeauthorize:"La désautorisation de entraînera l'arrêt de cette intégration. Vous devrez le reconfigurer si vous souhaitez l'utiliser à l'avenir.",DevelopersMessageDeleteTokenConfirm:"Êtes-vous sûr de vouloir supprimer ce jeton ?",DevelopersMessageInfo:"Pour plus d'informations sur le développement d'applications pour le système météo Tempest, veuillez consulter la documentation de l'API Tempest et de la plateforme de développement.",DevelopersMessageIntegrations:"Les intégrations vous permettent de lier votre compte et votre station de manière transparente. Vous pouvez généralement dissocier votre compte depuis ces applications, mais vous pouvez également révoquer l'accès ici, si nécessaire.",DevelopersMessagePersonalTokenNote:"Remarque : Vous n'avez pas besoin d'un jeton d'utilisation personnelle pour les applications et les intégrations qui n'en demandent pas.",DevelopersMessageRequired:"S'il-vous-plaît remplissez tous les champs requis.",DevelopersMessageThirdParty:"Certaines applications et intégrations tierces nécessitent un jeton d'utilisation personnelle pour accéder aux données de votre station météo. Créez et utilisez un jeton différent pour chaque application.",DevelopersMessageTokenNoteLink:"Développeurs, veuillez consulter notre Documentation API pour plus d'informations sur la façon d'utiliser les jetons à usage personnel dans votre projet.",DevelopersTitle:"Développeurs",DevelopersTitleAccessToken:"Jeton d'accès",DevelopersTitleAccessTokenName:"Nom du jeton",DevelopersTitleAppDescription:"Description de l'application",DevelopersTitleApplicationName:"Nom de l'application",DevelopersTitleCallbackUrl:"URL de rappel d'autorisation (une par ligne)",DevelopersTitleClientId:"Numéro de client",DevelopersTitleDeauthorize:"Annuler l'autorisation",DevelopersTitleIntegration:"L'intégration",DevelopersTitleIntegrations:"Intégrations",DevelopersTitlePersonalUse:"Jetons à usage personnel",DevelopersTitleRedirect:"URL de redirection",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Nom du jeton : (facultatif)",DevelopersTitleTokens:"Jetons de développeurs",DevelopersTitleViewApplications:"Voir les applications",DeviceSetupAddedButtonAddAnother:"Ajouter un autre appareil",DeviceSetupAddedButtonNext:"Suivant",DeviceSetupAddedDescriptionEnd:"A été ajouté à",DeviceSetupAddedDescriptionStart:"Votre appareil",ForecastSettingsMiniMapPrecipChance:"Risque de Pluie",ForecastSettingsMiniMapShow:"Montrez",ForecastSettingsMiniMapValueAlways:"Toujours",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Jamais",ForecastSettingsTitleMiniMap:"Mini Carte",GeneralAlertDeviceOffline:"Un ou plusieurs de vos appareils sont hors ligne",GeneralAlertStationOffline:"Votre station est actuellement hors ligne",GeneralAlexaMessageConnect:"Connectez Alexa à votre compte Tempest.",GeneralAlexaMessageError:"Nous ne parvenons pas à associer votre compte à l'aide de l'application Alexa. Veuillez lier votre compte en utilisant le site Web Alexa.",GeneralAlexaMessageInstructions:"pour connecter Alexa à votre compte.",GeneralAuthButtonAllow:"Permettre",GeneralAuthButtonDeny:"Refuser",GeneralAuthError:"Impossible de lier le compte.",GeneralAuthErrorApplication:"Application inconnue",GeneralButtonCancel:"Abandon",GeneralButtonClose:"Fermer",GeneralButtonCopy:"Copier",GeneralButtonDismiss:"Rejeter ",GeneralButtonDone:"Terminé",GeneralButtonNext:"Suivant",GeneralButtonRefresh:"Rafraichir",GeneralButtonRemove:"Retirer",GeneralButtonRetry:"Recommencer",GeneralButtonRevoke:"Révoquer",GeneralButtonShowBatteryCard:"Afficher la carte de batterie",GeneralButtonSignOut:"Se déconnecter",GeneralButtonSkip:"Passer",GeneralButtonViewMore:"Voir plus",GeneralCalibrateTitleOffset:"Compenser",GeneralCustomNetworkButtonEditShared:"Modifier le nom de la station partagée",GeneralCustomNetworkButtonUnlinkStation:"Vous souhaitez dissocier votre station ? Contactez-nous.",GeneralCustomNetworkClemsonDescription:"Fait partie du réseau Clemson Tempest.",GeneralCustomNetworkMessage:"Cette station, nommée",GeneralCustomNetworkMessageClemson:"Les observations de cette station sont envoyées à l'Université de Clemson.",GeneralCustomNetworkTempestDescription:"Fait partie du réseau Tempest.",GeneralDashboardMessageNoDisplay:"Veuillez utiliser un écran plus grand pour afficher le tableau de bord.",GeneralDashboardTitleBatteryDevice:"Appareil à batterie",GeneralDashboardTitleSettings:"Paramètres du tableau de bord",GeneralDashboardTitleStatType:"Type de statistiques",GeneralErrorCheckForMistakes:"La page que vous recherchez n'a pu être trouvée. Veuillez vérifier l'URL pour détecter les erreurs et réessayer.",GeneralErrorPageNotFound:"Page non trouvée",GeneralErrorTitle:"Erreur",GeneralForumMessageConnect:"Connectez votre compte à la communauté Tempest",GeneralLimitLinkGetPlus:"Obtenez un abonnement Plus",GeneralLimitTitleViewOn:"Voir sur",GeneralLimitWarningStationView:"Vous avez atteint la page météo personnelle du propriétaire de la station. Les données en temps réel ne sont actuellement pas disponibles sur cette page. Pour accéder dès maintenant aux données météorologiques de cette station météo Tempest, choisissez parmi les options ci-dessous :",GeneralMapMessageNoObs:"Aucune observation récente.",GeneralMessageBuyWs:"Acheter une station météo",GeneralMessageLocationMapInstructions:"Faites glisser le marqueur pour mettre à jour l'emplacement.",GeneralMessageRequestError:"Requête invalide.",GeneralMessageSearchWeather:"Rechercher la météo",GeneralMessageSkyOffline:"Sky hors ligne",GeneralMessageSocketError:"Impossible de se connecter.",GeneralMessageSocketRetry:"Impossible de se connecter. Nouvelle tentative de connexion dans",GeneralMessageTempestLearnMore:"Vous ne possédez pas de Tempest ? Apprenez-en davantage sur Tempest.",GeneralMessageWeatherFlowSignIn:"Connectez-vous à Tempest",GeneralMessageWifiNotSetup:"Votre station est hors ligne. Vérifiez la connexion réseau de votre station et/ou la configuration WiFi.",GeneralNavTitleHistory:"Historique",GeneralNavTitleLogIn:"Se connecter",GeneralNavTitleMap:"Carte",GeneralNavTitleMaps:"Cartes",GeneralNavTitleMyStation:"Ma station",GeneralNavTitleSettings:"Paramètres",GeneralNavTitleWeather:"Météo",GeneralPowerSaveMessageBattery:"Votre Tempête conserve l'énergie.",GeneralPowerSaveMessageRain:"Votre capteur de pluie Tempest est désactivé pour économiser l'énergie.",GeneralPowerSaveMessageWind:"Votre Tempest utilise une fréquence d'échantillonnage du vent inférieure pour économiser l'énergie.",GeneralPowerSaveTitle:"Mode économie d'énergie",GeneralSettingsMessageConfig:"Pour ajouter/supprimer des appareils ou des stations, configurer le WiFi, etc., veuillez utiliser l'application mobile Tempest pour vous connecter directement à votre appareil Tempest",GeneralSocketMessageRetrying:"Nouvelle tentative...",GeneralTextBatteryVoltage:"Tension de la batterie",GeneralTextConnect:"Connecter",GeneralTextCount:"Compte",GeneralTextCurrentConditions:"Conditions actuelles",GeneralTextDelete:"Supprimer",GeneralTextHour:"Heure",GeneralTitleAccount:"Compte",GeneralTitleAdvanced:"Avancé",GeneralTitleAirTemperature:"Température de l'air",GeneralTitleAlerts:"Alertes",GeneralTitleBrightness:"Luminosité",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Données",GeneralTitleDataAuth:"Autorisations de données",GeneralTitleDevice:"Appareil",GeneralTitleDevices:"Appareils",GeneralTitleDewPoint:"Point de rosée",GeneralTitleDisableLightning:"Désactiver la foudre",GeneralTitleDisclaimer:"Clause de non-responsabilité",GeneralTitleDisplayOptions:"Option d'affichage",GeneralTitleEdit:"Modifier",GeneralTitleElevation:"Élévation",GeneralTitleEnviroment:"Environnement",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Température ressenti",GeneralTitleForecast:"Prévision",GeneralTitleFullScreenMode:"Mode plein écran",GeneralTitleHeightAboveGround:"Hauteur au-dessus du sol",GeneralTitleHelp:"Aide",GeneralTitleHumidity:"Humidité relative",GeneralTitleHumidityShort:"Humidité",GeneralTitleImperial:"Impérial",GeneralTitleInstallationTip:"Conseils d'installation",GeneralTitleLast3Hrs:"Depuis 3 h.",GeneralTitleLastOb:"Dernière observation",GeneralTitleLastSrikeDistance:"Distance du dernier impact de foudre",GeneralTitleLastStrike:"Dernière détection",GeneralTitleLightning:"Foudre",GeneralTitleLightningDistance:"Distance de la foudre",GeneralTitleLightningDistanceDetected:"Distance de foudre détectée",GeneralTitleLightningLast3Hrs:"Foudres détectées au cours des 3 dernières heures",GeneralTitleLightningLastDetected:"Derniere foudre détectée",GeneralTitleLightningStrikeCount:"Nombre de coups de foudre",GeneralTitleLocation:"Emplacement",GeneralTitleLocations:"Emplacements",GeneralTitleLux:"Lux",GeneralTitleManage:"Gérer",GeneralTitleManageDevices:"Gérer les appareils",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Métrique",GeneralTitleMore:"Plus",GeneralTitleNA:"N/D",GeneralTitleNewsletter:"lettre d'info",GeneralTitleOther:"Autre",GeneralTitlePressure:"Pression au niveau de la mer",GeneralTitlePressureShort:"Pression",GeneralTitlePublicData:"Données publiques",GeneralTitlePublicName:"Nom public",GeneralTitleQualityControl:"Contrôle de qualité",GeneralTitleRain:"Pluie",GeneralTItleRainAccumToday:"Accumulation de pluie (aujourd'hui)",GeneralTitleRainAccumYesterday:"Accumulation de pluie (hier)",GeneralTitleRainCheck:"Contrôle de pluie",GeneralTitleRainDurationToday:"Durée de la pluie (aujourd'hui)",GeneralTitleRainDurationYesterday:"Durée de la pluie (hier)",GeneralTitleRainIntensity:"Intensité de la pluie",GeneralTitleRainRate:"Intensité de pluie",GeneralTitleRainStart:"Début de pluie",GeneralTitleRainToday:"Pluie (aujourd'hui)",GeneralTitleRainYesterday:"Pluie (hier)",GeneralTitleRequiredField:"Champs obligatoires",GeneralTitleReset:"Réinitialiser",GeneralTitleShareDialog:"L'URL de votre station",GeneralTitleSharePage:"Partager la page",GeneralTitleSharePublicly:"Partager publiquement",GeneralTitleShowNCRain:"Afficher NC Pluie",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Intégrations à des applications 'maison'",GeneralTitleSolarRadiation:"Radiation solaire",GeneralTitleStaionMap:"Plan des stations",GeneralTitleStationPressure:"Pression de la station",GeneralTitleStations:"Stations",GeneralTitleStatus:"Statut",GeneralTitleSwitchLocations:"Changer de localisation",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Réseau Tempest",GeneralTitleTermsConditions:"Termes et conditions",GeneralTitleTheme:"Thème",GeneralTitleTime:"Temps",GeneralTitleToday:"Aujourd'hui",GeneralTitleTrend:"Tendance",GeneralTitleTrendFalling:"En chute",GeneralTitleTrendRising:"En hausse",GeneralTitleTrendSteady:"Constant",GeneralTitleUVIndex:"L'indice UV",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Vent",GeneralTitleWindChill:"Refroidissement éolien",GeneralTitleWindDirection:"Direction du vent",GeneralTitleWindDirectionOffset:"Décalage de la direction du vent",GeneralTitleWindGust:"Rafale de vent",GeneralTitleWindLull:"Accalmie du vent",GeneralTitleWindSpeed:"Vitesse du vent",GeneralTitleWUSetup:"Configuration WU",GeneralTokenErrorDeleteApplication:"Impossible de supprimer l'application. Veuillez réessayer.",GeneralTokenErrorDeleteIntegration:"Impossible de supprimer l'intégration. Veuillez réessayer.",GeneralTokenErrorDeleteToken:"Impossible de supprimer le jeton d'accès. Veuillez réessayer.",GeneralTokenMessageCopied:"Jeton copié dans le presse-papiers.",GeneralTokenMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer ce jeton ?",GeneralTokenMessageNoPersonalTokens:"Vous n'avez créé aucun jeton à usage personnel.",GeneralValueAvg:"Moy.",GeneralValueClear:"Clair",GeneralValueCloudy:"Nuageux",GeneralValueDisplayDark:"Sombre",GeneralValueDisplayLight:"Clair",GeneralValueDisplaySystem:"Système",GeneralValueDistance:"Distance",GeneralValueDuration:"Durée",GeneralValueEmail:"E-mail",GeneralValueExtremeRain:"Pluie extrême",GeneralValueFoggy:"Brumeux",GeneralValueGust:"Rafale",GeneralValueGusting:"Rafales",GeneralValueHeatIndex:"Indice de chaleur",GeneralValueHeavyRain:"Forte pluie",GeneralValueIndoor:"Intérieur",GeneralValueLightRain:"Pluie légère",GeneralValueLull:"Accalmie",GeneralValueMax:"Max.",GeneralValueMin:"Min.",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixtes",GeneralValueModerateRain:"Pluie modérée",GeneralValueOutdoor:"Extérieur",GeneralValuePartlyCloudy:"Partiellement nuageux",GeneralValueRainExtreme:"Extrême",GeneralValueRainHeavy:"Fort",GeneralValueRainLight:"Faible",GeneralValueRainLikely:"Pluie probable",GeneralValueRainModerate:"Modéré",GeneralValueRainNone:"Aucun",GeneralValueRainPossible:"Pluie possible",GeneralValueRainVeryHeavy:"Très fort",GeneralValueRainVeryLight:"Très léger",GeneralValueSnow:"Neige",GeneralValueSnowLikely:"Neige probable",GeneralValueSnowPossible:"Neige possible",GeneralValueStrikeCount:"Nombre d'impacts",GeneralValueStrikes:"Impacts",GeneralValueSunny:"Ensoleillé",GeneralValueTemp:"Température",GeneralValueThunderstormsLikely:"Des orages probables",GeneralValueThunderstormsPossible:"Des orages possibles",GeneralValueTimestamp:"Horodatage",GeneralValueTimezone:"Fuseau horaire",GeneralValueTotal:"Total",GeneralValueUnits:"Unités",GeneralValueUnknown:"Inconnu",GeneralValueVeryHeavyRain:"Pluie forte",GeneralValueVeryLightRain:"Très légère pluie",GeneralValueVolts:"Volts",GeneralValueWetBulb:"Température humide",GeneralValueWetBulbGlobe:"Température du globe humide",GeneralValueWindy:"Venteux",GeneralValueWintryMixLikely:"Mélange hivernal probable",GeneralValueWintryMixPossible:"Mélange hivernal possible",GeneralWarningDeviceLate:"Un ou plusieurs de vos appareils sont en retard",GeneralWarningStationLate:"Votre station est en retard",GraphMessageNoObs:"Il n’y a aucune observation pour la période actuelle. Effectuez un zoom avant ou arrière pour ajuster la plage de dates du graphique.",GraphTextAccumulation:"Accumulation",GraphTitleLightningStrikesDetected:"Foudres détectées",GraphTitleNewData:"Nouvelles données",GraphValueTemp:"Température",GraphValueTempHigh:"Température (haute)",GraphValueTempLow:"Température (basse)",GridTextAdvancedStats:"Statistiques avancées",GridTextAirDensity:"Densité de l'air",GridTextDeltaT:"DeltaT",HistoryErrorMissingData:"Aucune donnée disponible pour cette date.",HistoryErrorNonStation:"Des statistiques météorologiques détaillées sont disponibles pour les emplacements équipés du matériel Tempest.\n\nVeuillez choissir une station Tempest pour afficher l'historique.",HistoryRangeAllTime:"Toujours",HistoryRangeDay:"Jour",HistoryRangeMonth:"Mois",HistoryRangeWeek:"Semaine",HistoryRangeYear:"Année",HistoryTitleNonStationErrorTitle:"Historique",HistoryTitleWeek:"Semaine de",IftttMessageConnect:"Connectez IFTTT à votre compte Tempest",IftttMessageInstructions:"Pour connecter IFTTT à votre compte.",LocationAddNavTitle:"Ajouter un emplacement",LocationButtonAdd:"Ajouter",LocationListMessageDeleteConfirm:"Êtes-vous sûr de vouloir supprimer cet emplacement?",LocationListMessageDeleteSuccess:"Emplacement supprimé avec succès",LocationListNavTitle:"Emplacements",LocationListSectionTitleLocations:"Emplacements",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Enregistrer sous un nom différent",LocationMapDescription:"Contrairement à d'autres applications météo, nous avons une prévision pour votre quartier, pas seulement pour votre ville. Déplacez la carte pour positionner l’épingle et c’est l’emplacement pour lequel nous fournirons une prévision.",LocationMapMessageSelect:"Sélectionnez l'emplacement à l'aide de la carte",LocationMapMessageUpdateError:"Impossible de mettre à jour l'emplacement.",LocationMapNavTitle:"Emplacement du quartier",LocationMapTitleAddLocation:"Emplacement sur la carte",LocationMapTitleSelectedLocation:"Emplacement sélectionné :",LocationMessageSearchError:"Impossible de récupérer les prévisions de la localisation.",LocationNameButtonSave:"Sauvegarder",LocationNameTextfieldPlaceholder:"votre nom",LocationNameTitleMapLocation:"Emplacement sur la carte",LocationNameTitleNewName:"Nouveau nom",MapSettingsTitle:"Paramètres de la carte",MapSettingsTitleHybrid:"Hybride",MapSettingsTitleLegend:"Légende",MapSettingsTitleMapType:"Type de carte",MapSettingsTitleOverlayType:"Type de superposition",MapSettingsTitleRadar:"Radar / précipitations",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Afficher la légende",MapSettingsTitleTempestStations:"Stations Tempest",MapSettingsTitleTheme:"Thème de la carte",MapSettingsTitleZoomControl:"Afficher le contrôle de zoom",NearcastMessageInfo:"Cette prévision est alimentée par notre technologie brevetée Nearcast, qui fournit des données météorologiques précises et spécifiques à chaque point, partout où vous en avez besoin.",RadarForecastPrecipTypeRain:"De la pluie à proximité",RadarForecastPrecipTypeSleet:"Du grésil à proximité",RadarForecastPrecipTypeSnow:"De la neige à proximité",RadarForecastPrecipTypeStorm:"Tempête à proximité",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrés",StatusButtonTroubleshoot:"Dépanner >",StatusMessageTimezone:"Toutes les heures sont affichées en heure locale de la station.",StatusMessageTroubleshootDevice:"Utilisez les conseils de dépannage pour reconnecter votre Hub.",StatusNavTitle:"Statut",StatusTextBatteryEco:"Éco",StatusTextBatteryGood:"Bien",StatusTextBatteryLow:"Faible",StatusTextBatteryPowerSave:"Économie d'énergie",StatusTextBatteryReplace:"Remplacer",StatusTextBLEStatusConnected:"Connecté",StatusTextBLEStatusDisconnected:"Débranché",StatusTextGood:"Bien",StatusTextLightningDisturber:"Filte parasite actif : foudre",StatusTextLightningFailed:"Échec du capteur de foudre",StatusTextLightningNoise:"Signaux parasite : foudre",StatusTextNoSignal:"Pas de signal",StatusTextPrecipFailed:"Échec capteur pluie",StatusTextPressureFailed:"Échec capteur pression",StatusTextRHFailed:"Échec capteur humidité",StatusTextSatisfactory:"Satisfaisant",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Bien",StatusTextSignalNotConnected:"Pas connecté",StatusTextSignalPoor:"Faible",StatusTextSignalStrong:"Fort",StatusTextSignalWeak:"Faible",StatusTextStatusOffline:"Hors ligne",StatusTextStatusOnline:"En ligne",StatusTextTemperatureFailed:"Échec capteur température",StatusTextUVFailed:"Échec capteur UV",StatusTextWindFailed:"Échec capteur de vent ",StatusTitleBattery:"Batterie",StatusTitleBatteryState:"État",StatusTitleBLEStatus:"État de la connexion Bluetooth",StatusTitleCellStatus:"État cellulaire (CREG, RSSI)",StatusTitleDeviceId:"Reference de l'appareil",StatusTitleDeviceSignal:"Signal de l'appareil (RSSI)",StatusTitleFirmware:"Révision du micrologiciel",StatusTitleHub:"Hub -",StatusTitleLastObservation:"Dernière observation",StatusTitleLastStatusMessage:"Dernier message d'état",StatusTitleLearnMore:"En savoir plus",StatusTitleName:"Nom",StatusTitleSensorStatus:"État du capteur",StatusTitleSerial:"Numéro de série",StatusTitleStationId:"Identifiant de la station",StatusTitleStatus:"L'état du réseau",StatusTitleUptime:"Temps de disponibilité",StatusTitleWifiSignal:"Signal Wi-Fi (RSSI)",WeatherUndergroundButtonLink:"Lien",WeatherUndergroundButtonRemoveLink:"Supprimer le lien WU",WeatherUndergroundErrorForecastFailed:"La prévision n'a pas pu être chargée.",WeatherUndergroundLink:"Lien Weather Underground",WeatherUndergroundMessageConfirm:"Êtes-vous sûr de vouloir supprimer le lien de votre station WU ?",WeatherUndergroundMessageRemoveLink:"Impossible de supprimer le lien de la station WU.",WeatherUndergroundMessageSharingRestricted:"Pour afficher vos données Tempest sur d'autres applications météo, veuillez contacter le support client pour obtenir une liste des options actuelles.",WeatherUndergroundTitleSendRain:"Envoyer les données de pluie",WeatherUndergroundTitleStationKey:"Clé de la station",WuSetupMessageRequiredFieldError:"L'ID de la station et la clé de la station sont requises",WuSetupMessageSaveError:"Impossible de lier la station à WU"}},"fr-CA":{translations:{AccountManagementButtonDeleteData:"Effacer toutes les données",AccountManagementMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer tes données? Cette opération ne peut pas être annulée",AccountMangementMessageDataError:"Il y a eu une erreur lors de la suppression de vos données",AccountSetupCreateButtonCreateAccount:"Créer un compte",AccountSetupCreateButtonHaveAccount:"Tu as un compte?",AccountSetupCreateButtonPrivacyPolicy:"Politique de confidentialité",AccountSetupCreateButtonToS:"Conditions d'utilisation",AccountSetupCreateNavTitle:"Créer un compte",AccountSetupCreateTextfieldEmail:"Courriel",AccountSetupCreateTextfieldPassword:"Mot de passe",AccountSetupCreateTextfieldPasswordConfirm:"Réinscris le mot de passe",AccountSetupErrorMessageInvalidAccount:"Il y a une erreur avec votre compte Veuillez contacter le service client",AccountSetupErrorMessageInvalidEmail:"Veuillez entrer une adresse courriel valide",AccountSetupErrorMessageInvalidPassword:"Veuillez entrer un mot de passe valide",AccountSetupErrorMessagePasswordLength:"Votre mot de passe doit comporter 6 caractères ou plus",AccountSetupErrorMessagePasswordMismatch:"Veuillez vérifier que vos mots de passe correspondent",AccountSetupErrorMessageRequiredFields:"Courriel et mot de passe sont nécessaire",AccountSetupErrorTitleInvalidEmail:"Courriel invalide",AccountSetupErrorTitleInvalidPassword:"Mot de passe invalide",AccountSetupErrorTitlePasswordMismatch:"Les mots de passe ne correspondent pas",AccountSetupForgotButtonReset:"Réinitialiser le mot de passe",AccountSetupForgotErrorPasswordMismatach:"Les mots de passe saisis ne correspondent pas",AccountSetupForgotErrorRequiredFields:"Veuillez entrer un mot de passe et confirmer le mot de passe",AccountSetupForgotErrorResetError:"Impossible de réinitialiser le mot de passe",AccountSetupForgotMessageConfirm:"Confirme ton nouveau mot de passe",AccountSetupForgotMessageResetExpired:"Votre code de réinitialisation de mot de passe a expiré",AccountSetupForgotMessageSuccess:"Un courriel contenant des instructions pour réinitialiser votre mot de passe a été envoyé",AccountSetupForgotMessageUser:"Réinitialiser le mot de passe pour",AccountSetupForgotNavTitle:"Mot de passe oublié",AccountSetupForgotTextfieldEmail:"Courriel",AccountSetupForgotTitleNewPassword:"Nouveau mot de passe",AccountSetupMessageContinueToTempest:"Continuez vers le site web de Tempest",AccountSetupMessageCreateLogIn:"Pour créer un compte Tempest : Téléchargez l'application Tempest depuis les magasins d'applications",AccountSetupMessagePasswordResetSuccess:"Votre mot de passe a été réinitialisé",AccountSetupSignInButtonForgot:"Mot de passe oublié?",AccountSetupSignInButtonSignIn:"Connexion",AccountSetupSignInNavTitle:"Connexion",AccountSetupSignInTextfieldEmail:"Courriel",AccountSetupSignInTextfieldPassword:"Mot de passe",AccountSetupStartButtonAboutTemptest:"Concernant le système météorologique Tempest",AccountSetupStartButtonCreateAccount:"Créer un compte",AccountSetupStartButtonLearnMore:"Apprends-en plus",AccountSetupStartButtonSignIn:"Connexion",AccountSetupStartNavTitle:"Commencez",AccountSetupStartTitle:"Commençons",AlertsMessageFurtherNotice:"Jusqu'à nouvel ordre",AlertsTextNowUntil:"Maintenant jusqu’à ce que",AlertsTextTodayAt:"Aujourd'hui à",AlertsTextUntil:"Jusqu’à ce que ",CalibrationMessageError:"Il y a eu une erreur lors de l'enregistrement de la calibration",CalibrationMessageSaved:"Calibration sauvegardée",DevelopersButtonCreate:"Créer une application",DevelopersButtonCreateToken:"Crée un jeton",DevelopersButtonUpdate:"Mettre à jour l'application",DevelopersButtonViewTokens:"Voir les jetons",DevelopersMessageConfirmDelete:"Es-tu sûr(e) de vouloir supprimer cette application?",DevelopersMessageCreateApplication:"Créez une application si vous souhaitez que les utilisateurs de votre application puissent accéder à leurs données de station Tempest",DevelopersMessageCreateToken:"Crée un jeton d'accès",DevelopersMessageDeauthorize:"Révoquer entraînera l'arrêt de cette intégration Vous devrez la configurer à nouveau si vous souhaitez l'utiliser à l'avenir",DevelopersMessageDeleteTokenConfirm:"Es-tu sûr(e) de vouloir supprimer ce jeton?",DevelopersMessageInfo:"Pour plus d'informations sur le développement d'applications pour le système météorologique Tempest, veuillez consulter la documentation de l'API et de la plateforme pour les développeurs sur ce lien",DevelopersMessageIntegrations:"Les intégrations vous permettent de lier votre compte et votre station de manière transparente. Vous pouvez généralement dissocier votre compte de ces applications, mais vous pouvez également révoquer l’accès ici, si nécessaire.",DevelopersMessagePersonalTokenNote:"Remarque : Vous n’avez pas besoin d’un jeton d’utilisation personnelle pour les applications et les intégrations qui n’en demandent pas.",DevelopersMessageRequired:"Veuillez remplir tous les champs obligatoires",DevelopersMessageThirdParty:"Certaines applications et intégrations tierces nécessitent un jeton d’utilisation personnelle pour accéder aux données de votre station météorologique. Créez et utilisez un jeton différent pour chaque application.",DevelopersMessageTokenNoteLink:'Développeurs, veuillez consulter notre documentation API pour plus d’informations sur l’utilisation des jetons d’utilisation personnelle dans votre projet.',DevelopersTitle:"Développeurs",DevelopersTitleAccessToken:"jeton d'accès",DevelopersTitleAccessTokenName:"Nom de jeton",DevelopersTitleAppDescription:"Description de l’application",DevelopersTitleApplicationName:"Nom de l'application",DevelopersTitleCallbackUrl:"URL de rappel d’autorisation (une par ligne)",DevelopersTitleClientId:"Numéro de client",DevelopersTitleDeauthorize:"Révoquer",DevelopersTitleIntegration:"L'intégration",DevelopersTitleIntegrations:"Intégrations",DevelopersTitlePersonalUse:"Jetons à usage personnel",DevelopersTitleRedirect:"URL de redirection",DevelopersTitleSecret:"Secret",DevelopersTitleTokenName:"Nom du jeton : (Facultatif)",DevelopersTitleTokens:"Jetons de développeurs",DevelopersTitleViewApplications:"Voir les applications",DeviceSetupAddedButtonAddAnother:"Ajouter un autre appareil",DeviceSetupAddedButtonNext:"Suivant",DeviceSetupAddedDescriptionEnd:"a été ajouté à",DeviceSetupAddedDescriptionStart:"Votre appareil",ForecastSettingsMiniMapPrecipChance:"Risque de Pluie",ForecastSettingsMiniMapShow:"Montre",ForecastSettingsMiniMapValueAlways:"Toujours",ForecastSettingsMiniMapValueAuto:"Auto",ForecastSettingsMiniMapValueNever:"Jamais",ForecastSettingsTitleMiniMap:"Mini map",GeneralAlertDeviceOffline:"Un ou plusieurs de vos appareils sont hors ligne",GeneralAlertStationOffline:"Ta station est actuellement hors ligne",GeneralAlexaMessageConnect:"Connectez Alexa à votre compte Tempest",GeneralAlexaMessageError:"Nous ne sommes pas en mesure de lier votre compte à l’aide de l’application Alexa. Veuillez lier votre compte à l’aide du site Web d’Alexa.",GeneralAlexaMessageInstructions:"Pour connecter Alexa à votre compte",GeneralAuthButtonAllow:"Autoriser",GeneralAuthButtonDeny:"Refuser",GeneralAuthError:"Impossible de lier le compte",GeneralAuthErrorApplication:"Application inconnue",GeneralButtonCancel:"Annuler",GeneralButtonClose:"Fermer",GeneralButtonCopy:"Copier",GeneralButtonDismiss:"Rejeter",GeneralButtonDone:"Terminé",GeneralButtonNext:"Suivant",GeneralButtonRefresh:"Rafraîchir",GeneralButtonRemove:"Supprimer ",GeneralButtonRetry:"Nouvelle tentative",GeneralButtonRevoke:"Révoquer",GeneralButtonShowBatteryCard:"Afficher la carte de la batterie",GeneralButtonSignOut:"Se déconnecter",GeneralButtonSkip:"Sauter",GeneralButtonViewMore:"Voir plus",GeneralCalibrateTitleOffset:"Décalage",GeneralCustomNetworkButtonEditShared:"Modifier le nom de la station partagée",GeneralCustomNetworkButtonUnlinkStation:"Vous voulez dissocier votre station ? Contactez-nous.",GeneralCustomNetworkClemsonDescription:"fait partie du réseau Clemson Tempest.",GeneralCustomNetworkMessage:"Cette station, nommée",GeneralCustomNetworkMessageClemson:"Les observations de cette station sont envoyées à l'Université de Clemson",GeneralCustomNetworkTempestDescription:"fait partie du réseau Tempest.",GeneralDashboardMessageNoDisplay:"Veuillez utiliser un écran plus grand pour afficher le tableau de bord",GeneralDashboardTitleBatteryDevice:"Dispositif de batterie",GeneralDashboardTitleSettings:"Paramètres du tableau de bord",GeneralDashboardTitleStatType:"Type de statistique",GeneralErrorCheckForMistakes:"La page que vous avez demandée ne peut pas être trouvée Veuillez vérifier l'URL pour des erreurs et réessayer",GeneralErrorPageNotFound:"Page introuvable",GeneralErrorTitle:"Erreur",GeneralForumMessageConnect:"Connecte ton compte à la communauté Tempest",GeneralLimitLinkGetPlus:"Obtiens l'adhésion Plus",GeneralLimitTitleViewOn:"Voir sur",GeneralLimitWarningStationView:"Vous êtes arrivé sur la page météo personnelle du propriétaire de la station. Les données en temps réel ne sont pas disponibles actuellement sur cette page. Pour accéder aux données météo de la station Tempest dès maintenant, choisissez parmi les options ci-dessous",GeneralMapMessageNoObs:"Aucune observation récente.",GeneralMessageBuyWs:"Achète une station météo",GeneralMessageLocationMapInstructions:"Déplacez le marqueur pour mettre à jour l'emplacement",GeneralMessageRequestError:"Demande invalide",GeneralMessageSearchWeather:"Rechercher la météo",GeneralMessageSkyOffline:"Sky hors ligne",GeneralMessageSocketError:"Impossible de se connecter",GeneralMessageSocketRetry:"Impossible de se connecter Réessai de la connexion dans",GeneralMessageTempestLearnMore:"N'as-tu pas de Tempest ? Apprends-en plus sur Tempest",GeneralMessageWeatherFlowSignIn:"Connectez-vous à Tempest",GeneralMessageWifiNotSetup:"Votre station est hors ligne Vérifiez la connexion réseau de votre station et/ou la configuration WiFi",GeneralNavTitleHistory:"Historique",GeneralNavTitleLogIn:"S’identifier",GeneralNavTitleMap:"Carte",GeneralNavTitleMaps:"Cartes",GeneralNavTitleMyStation:"Ma Station",GeneralNavTitleSettings:"Réglages",GeneralNavTitleWeather:"Temps",GeneralPowerSaveMessageBattery:"Votre Tempest est en mode ECO",GeneralPowerSaveMessageRain:"Votre capteur de pluie Tempest est désactivé pour économiser de l'énergie",GeneralPowerSaveMessageWind:"Votre tempest a une fréquence d'échantillonnage du vent plus basse pour économiser de l'énergie",GeneralPowerSaveTitle:"Mode d'économie d'énergie",GeneralSettingsMessageConfig:"Pour ajouter / supprimer des appareils ou des stations, configurer le WiFi, etc, veuillez utiliser l'application mobile Tempest pour vous connecter directement à votre appareil Tempest",GeneralSocketMessageRetrying:"Réessayer...",GeneralTextBatteryVoltage:"Tension de la batterie",GeneralTextConnect:"Connecter",GeneralTextCount:"Compte",GeneralTextCurrentConditions:"Conditions actuelles",GeneralTextDelete:"Effacer",GeneralTextHour:"Heure",GeneralTitleAccount:"Compte",GeneralTitleAdvanced:"Avancé",GeneralTitleAirTemperature:"Température de l'air",GeneralTitleAlerts:"Alertes",GeneralTitleBrightness:"Luminosité",GeneralTitleCelsius:"Celsius",GeneralTitleData:"Données",GeneralTitleDataAuth:"Autorisations de données",GeneralTitleDevice:"Appareil",GeneralTitleDevices:"Appareils",GeneralTitleDewPoint:"Point de rosée",GeneralTitleDisableLightning:"Désactiver la foudre",GeneralTitleDisclaimer:"Clause de non-responsabilité",GeneralTitleDisplayOptions:"Option d'affichage",GeneralTitleEdit:"Modifier",GeneralTitleElevation:"Élévation",GeneralTitleEnviroment:"Environnement",GeneralTitleFahrenheit:"Fahrenheit",GeneralTitleFeelsLike:"Température ressenti",GeneralTitleForecast:"Prévision",GeneralTitleFullScreenMode:"Mode plein écran",GeneralTitleHeightAboveGround:"Hauteur au-dessus du sol",GeneralTitleHelp:"Aide",GeneralTitleHumidity:"Humidité relative",GeneralTitleHumidityShort:"Humidité",GeneralTitleImperial:"Impérial",GeneralTitleInstallationTip:"Conseils d’installation",GeneralTitleLast3Hrs:"Depuis 3 h.",GeneralTitleLastOb:"Dernière observation",GeneralTitleLastSrikeDistance:"Dernière distance d'éclair",GeneralTitleLastStrike:"Dernière détection",GeneralTitleLightning:"Foudre",GeneralTitleLightningDistance:"Distance de l'éclair",GeneralTitleLightningDistanceDetected:"Distance de l'éclair détecté",GeneralTitleLightningLast3Hrs:"Eclairs détectés depuis 3 heures",GeneralTitleLightningLastDetected:"Détection dernier éclair",GeneralTitleLightningStrikeCount:"Nombre d'éclairs",GeneralTitleLocation:"Emplacement",GeneralTitleLocations:"Emplacements",GeneralTitleLux:"Lux",GeneralTitleManage:"Gérer",GeneralTitleManageDevices:"Gérer les appareils",GeneralTitleMessages:"Messages",GeneralTitleMetric:"Métrique",GeneralTitleMore:"Plus",GeneralTitleNA:"N/D",GeneralTitleNewsletter:"Bulletin d’information",GeneralTitleOther:"Autre",GeneralTitlePressure:"Pression au niveau de la mer",GeneralTitlePressureShort:"Pression",GeneralTitlePublicData:"Données publiques",GeneralTitlePublicName:"Nom public",GeneralTitleQualityControl:"Contrôle de la qualité",GeneralTitleRain:"Pluie",GeneralTItleRainAccumToday:"Accumulation de pluie (aujourd'hui)",GeneralTitleRainAccumYesterday:"Accumulation de pluie (hier)",GeneralTitleRainCheck:"Contrôle de pluie",GeneralTitleRainDurationToday:"Durée de la pluie (aujourd’hui)",GeneralTitleRainDurationYesterday:"Durée de la pluie (hier)",GeneralTitleRainIntensity:"Intensité de pluie",GeneralTitleRainRate:"Intensité de pluie",GeneralTitleRainStart:"Début de pluie",GeneralTitleRainToday:"Pluie (Aujourd'hui)",GeneralTitleRainYesterday:"Pluie (Hier)",GeneralTitleRequiredField:"Champs obligatoires",GeneralTitleReset:"Réinitialiser",GeneralTitleShareDialog:"URL de ta station",GeneralTitleSharePage:"Partage la page",GeneralTitleSharePublicly:"Partager publiquement",GeneralTitleShowNCRain:"Afficher NC Pluie",GeneralTitleSky:"Sky",GeneralTitleSmartHome:"Intégrations de maison intelligente",GeneralTitleSolarRadiation:"Radiation solaire",GeneralTitleStaionMap:"Plan des stations",GeneralTitleStationPressure:"Pression au niveau de la station",GeneralTitleStations:"Stations",GeneralTitleStatus:"Statut",GeneralTitleSwitchLocations:"Changer d'endroits",GeneralTitleTempest:"Tempest",GeneralTitleTempestNetwork:"Réseau Tempest",GeneralTitleTermsConditions:"conditions générales",GeneralTitleTheme:"Thème",GeneralTitleTime:"Temps",GeneralTitleToday:"Aujourd'hui",GeneralTitleTrend:"Tendance",GeneralTitleTrendFalling:"Diminue",GeneralTitleTrendRising:"Augmente",GeneralTitleTrendSteady:"Stable",GeneralTitleUVIndex:"Index UV",GeneralTitleUVIndexShort:"UV",GeneralTitleWind:"Vent",GeneralTitleWindChill:"Refroidissement éolien",GeneralTitleWindDirection:"Direction du vent",GeneralTitleWindDirectionOffset:"Décalage de la direction du vent",GeneralTitleWindGust:"Rafale de vent",GeneralTitleWindLull:"Accalmie du vent",GeneralTitleWindSpeed:"Vitesse du vent",GeneralTitleWUSetup:"Configuration WU",GeneralTokenErrorDeleteApplication:"Impossible de supprimer l'application. Veuillez réessayer votre demande",GeneralTokenErrorDeleteIntegration:"Impossible de supprimer l’intégration. Veuillez réessayer votre demande.",GeneralTokenErrorDeleteToken:"Impossible de supprimer le jeton d'accès. Veuillez réessayer votre demande",GeneralTokenMessageCopied:"Jeton copié dans le presse-papiers",GeneralTokenMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer ce jeton?",GeneralTokenMessageNoPersonalTokens:"Vous n’avez pas créé de jetons d’utilisation personnelle.",GeneralValueAvg:"Moy",GeneralValueClear:"Clair",GeneralValueCloudy:"Nuageux",GeneralValueDisplayDark:"Sombre",GeneralValueDisplayLight:"Clair",GeneralValueDisplaySystem:"Système",GeneralValueDistance:"Distance",GeneralValueDuration:"Durée",GeneralValueEmail:"Courriel",GeneralValueExtremeRain:"Pluie extrême",GeneralValueFoggy:"Brumeux",GeneralValueGust:"Rafale",GeneralValueGusting:"Rafales",GeneralValueHeatIndex:"Indice de chaleur",GeneralValueHeavyRain:"Forte pluie",GeneralValueIndoor:"Intérieur",GeneralValueLightRain:"Pluie légère",GeneralValueLull:"Accalmie",GeneralValueMax:"Max",GeneralValueMin:"Min",GeneralValueMinutes:"Minutes",GeneralValueMixed:"Mixtes",GeneralValueModerateRain:"Pluie modérée",GeneralValueOutdoor:"Extérieur",GeneralValuePartlyCloudy:"Partiellement nuageux",GeneralValueRainExtreme:"Extrème",GeneralValueRainHeavy:"Fort",GeneralValueRainLight:"Léger",GeneralValueRainLikely:"Pluie probable",GeneralValueRainModerate:"Modéré",GeneralValueRainNone:"Aucun",GeneralValueRainPossible:"Pluie possible",GeneralValueRainVeryHeavy:"Très fort",GeneralValueRainVeryLight:"Très léger",GeneralValueSnow:"Neige",GeneralValueSnowLikely:"Neige probable",GeneralValueSnowPossible:"Neige possible",GeneralValueStrikeCount:"Nombre d'impacts",GeneralValueStrikes:"Impacts",GeneralValueSunny:"Ensoleillé",GeneralValueTemp:"Température",GeneralValueThunderstormsLikely:"Des orages probables",GeneralValueThunderstormsPossible:"Des orages possibles",GeneralValueTimestamp:"Horodatage",GeneralValueTimezone:"Fuseau horaire",GeneralValueTotal:"Total",GeneralValueUnits:"Unités",GeneralValueUnknown:"Inconnu ",GeneralValueVeryHeavyRain:"Pluie forte",GeneralValueVeryLightRain:"Très légère pluie",GeneralValueVolts:"Volts",GeneralValueWetBulb:"Température humide",GeneralValueWetBulbGlobe:"Température du globe humide",GeneralValueWindy:"Venteux",GeneralValueWintryMixLikely:"Mélange hivernal probable",GeneralValueWintryMixPossible:"Mélange hivernal possible",GeneralWarningDeviceLate:"Un ou plusieurs de vos appareils sont en retard",GeneralWarningStationLate:"Ta station est en retard",GraphMessageNoObs:"Il n'y a pas d'observations pour la période actuelle. Zoomez pour ajuster la plage de dates du graphique",GraphTextAccumulation:"Cumul",GraphTitleLightningStrikesDetected:"Eclairs détectés",GraphTitleNewData:"Nouvelles données",GraphValueTemp:"Temp",GraphValueTempHigh:"Temp (Max)",GraphValueTempLow:"Temp (Min)",GridTextAdvancedStats:"Statistiques avancées",GridTextAirDensity:"Densité de l’air",GridTextDeltaT:"Delta T",HistoryErrorMissingData:"Pas de données disponibles pour cette date",HistoryErrorNonStation:"Des statistiques météorologiques détaillées sont disponibles pour les endroits équipés de matériel Tempest .\n\nVeuillez passer à une station Tempest pour consulter l'historique",HistoryRangeAllTime:"Toujours",HistoryRangeDay:"Jour",HistoryRangeMonth:"Mois",HistoryRangeWeek:"Semaine",HistoryRangeYear:"Année",HistoryTitleNonStationErrorTitle:"Historique",HistoryTitleWeek:"Semaine de",IftttMessageConnect:"Connectez IFTTT à votre compte Tempest",IftttMessageInstructions:"pour connecter IFTTT à votre compte",LocationAddNavTitle:"Ajout lieux",LocationButtonAdd:"Ajouter",LocationListMessageDeleteConfirm:"Es-tu sûr(e) de vouloir supprimer cet emplacement?",LocationListMessageDeleteSuccess:"Lieux supprimé avec succès",LocationListNavTitle:"Lieux",LocationListSectionTitleLocations:"Lieux",LocationListSectionTitleStations:"Stations",LocationMapButtonSave:"Enregistre sous un nom différent",LocationMapDescription:"Contrairement à d'autres applications météo, nous avons une prévision pour votre quartier, pas seulement pour votre ville. Déplacez la carte pour positionner l’épingle et c’est l’emplacement pour lequel nous fournirons une prévision.",LocationMapMessageSelect:"Sélectionne l'emplacement à l'aide de la carte",LocationMapMessageUpdateError:"Impossible de mettre à jour le lieux.",LocationMapNavTitle:"Emplacement du quartier",LocationMapTitleAddLocation:"Emplacement de la carte",LocationMapTitleSelectedLocation:"Lieu sélectionné :",LocationMessageSearchError:"Impossible d’extraire les prévisions d’emplacement.",LocationNameButtonSave:"Enregistrer",LocationNameTextfieldPlaceholder:"Ton nom",LocationNameTitleMapLocation:"Emplacement de la carte",LocationNameTitleNewName:"Nouveau nom",MapSettingsTitle:"Paramètres de la carte",MapSettingsTitleHybrid:"Hybride",MapSettingsTitleLegend:"Légende",MapSettingsTitleMapType:"Type de carte",MapSettingsTitleOverlayType:"Type de superposition",MapSettingsTitleRadar:"Radar / précipitations",MapSettingsTitleSatellite:"Satellite",MapSettingsTitleShowLegend:"Afficher la légende",MapSettingsTitleTempestStations:"Stations Tempest",MapSettingsTitleTheme:"Thème de la carte",MapSettingsTitleZoomControl:"Afficher le contrôle de zoom",NearcastMessageInfo:"Cette prévision est alimentée par notre technologie brevetée Nearcast, qui fournit des données météorologiques précises et spécifiques à chaque point, partout où vous en avez besoin.",RadarForecastPrecipTypeRain:"De la pluie à proximité",RadarForecastPrecipTypeSleet:"Du grésil à proximité",RadarForecastPrecipTypeSnow:"De la neige à proximité",RadarForecastPrecipTypeStorm:"Tempête à proximité",SettingsButtonCardinal:"Cardinal",SettingsButtonDegrees:"Degrés",StatusButtonTroubleshoot:"Dépanner >",StatusMessageTimezone:"Toutes les heures sont affichées dans l'heure locale de la station",StatusMessageTroubleshootDevice:"Utilisez les conseils de dépannage pour reconnecter votre Hub.",StatusNavTitle:"Statut",StatusTextBatteryEco:"Eco",StatusTextBatteryGood:"Bon",StatusTextBatteryLow:"Bas",StatusTextBatteryPowerSave:"Economie d'énergie",StatusTextBatteryReplace:"Remplace",StatusTextBLEStatusConnected:"Connecté",StatusTextBLEStatusDisconnected:"Déconnecté",StatusTextGood:"Bien",StatusTextLightningDisturber:"Filte parasite actif : éclair",StatusTextLightningFailed:"Échec du capteur d'éclair",StatusTextLightningNoise:"Signaux parasite : éclair",StatusTextNoSignal:"Pas de signal",StatusTextPrecipFailed:"Échec capteur pluie",StatusTextPressureFailed:"Échec capteur pression",StatusTextRHFailed:"Échec capteur humidité",StatusTextSatisfactory:"Satisfaisant",StatusTextSignalExcellent:"Excellent",StatusTextSignalGood:"Bien",StatusTextSignalNotConnected:"Pas connecté",StatusTextSignalPoor:"Faible",StatusTextSignalStrong:"Fort",StatusTextSignalWeak:"Faible",StatusTextStatusOffline:"Hors ligne",StatusTextStatusOnline:"En ligne",StatusTextTemperatureFailed:"Échec capteur température",StatusTextUVFailed:"Échec capteur UV",StatusTextWindFailed:"Échec capteur de vent ",StatusTitleBattery:"Batterie",StatusTitleBatteryState:"Etat",StatusTitleBLEStatus:"État de la connexion Bluetooth",StatusTitleCellStatus:"État cellulaire (CREG, RSSI)",StatusTitleDeviceId:"ID de l’appareil",StatusTitleDeviceSignal:"Signal de l'appareil (RSSI)",StatusTitleFirmware:"Révision du firmware",StatusTitleHub:"Hub -",StatusTitleLastObservation:"Dernière observation",StatusTitleLastStatusMessage:"Dernier message d’état",StatusTitleLearnMore:"En savoir plus",StatusTitleName:"Nom",StatusTitleSensorStatus:"État du capteur",StatusTitleSerial:"Numéro de série",StatusTitleStationId:"ID Station",StatusTitleStatus:"Statut réseau",StatusTitleUptime:"Uptime",StatusTitleWifiSignal:"Signal Wi-Fi (RSSI)",WeatherUndergroundButtonLink:"Lien",WeatherUndergroundButtonRemoveLink:"Supprimer le lien WU",WeatherUndergroundErrorForecastFailed:"La prévision n'a pas pu être chargée.",WeatherUndergroundLink:"Lien Weather Underground",WeatherUndergroundMessageConfirm:"Es-tu sûr(e) de vouloir supprimer le lien de ta station WU?",WeatherUndergroundMessageRemoveLink:"Impossible de supprimer le lien de la station WU",WeatherUndergroundMessageSharingRestricted:"Pour voir vos données Tempest sur d'autres applications météo, veuillez contacter le service client pour obtenir une liste des options actuelles",WeatherUndergroundTitleSendRain:"Envoyer les données de pluie",WeatherUndergroundTitleStationKey:"Clé de la station",WuSetupMessageRequiredFieldError:"L'ID de la station et la clé de la station sont nécessaires",WuSetupMessageSaveError:"Impossible de lier la station à WU"}}},this._init()},e.Locale.prototype._init=function(){this._setCountryAndLanguageCode(),this._loadLocale(),this._translateHTML()},e.Locale.prototype._setCountryAndLanguageCode=function(){this.browserCode=Util.getUrlParamByName("lang"),this.browserCode||(navigator.browserLanguage?this.browserCode=navigator.browserLanguage:navigator.language&&(this.browserCode=navigator.language)),Object.prototype.hasOwnProperty.call(this.languageMap,this.browserCode)?this.code=this.languageMap[this.browserCode]:this.code=this.browserCode;var t=this.code.split("-")[0];e.locale=t},e.Locale.prototype._loadLocale=function(){Object.prototype.hasOwnProperty.call(this.localizations,this.code)?this.locale=t.extend({},this.localizations[this.defaultCode],this.localizations[this.code]):this.locale=this.localizations[this.defaultCode]},e.Locale.prototype._translateHTML=function(){var e=this;t("[data-l10n-html]").each((function(){var a=t(this).attr("data-l10n-html"),i=t(this).attr("data-l10n-args"),n=i?JSON.parse(i):void 0;t(this).html(e.localize(a,n))})),t("[data-l10n-placeholder]").each((function(){var a=t(this).attr("data-l10n-placeholder"),i=t(this).attr("data-l10n-args"),n=i?JSON.parse(i):void 0;t(this).attr("placeholder",e.localize(a,n))}))},e.Locale.prototype.localize=function(e,t){var a="";if(!Object.prototype.hasOwnProperty.call(this.locale.translations,e))return"";if(a=this.locale.translations[e],t&&"object"==typeof t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a=a.replace(new RegExp("\\{"+i+"\\}","g"),t[i]));return a},e.Locale.prototype.localizeDate=function(e){return new Intl.DateTimeFormat(this.code).format(e)},e.Locale.prototype.localizeDateNoYear=function(e){return new Intl.DateTimeFormat(this.code,{month:"numeric",day:"numeric"}).format(e)},e.Locale.prototype.getDefaultUnit=function(e){return this.defaultUnits[this.locale.units][e]}}(window.SWD=window.SWD||{},jQuery),$(document).ready((function(){$("#nav a").on("click touchend",(function(e){e.stopPropagation()})),$("#nav a#my-station").on("click touchend",(function(e){SWD.Storage.removeLocalItem("lastViewed"),SWD.Storage.removeSessionItem("sharedStationId")})),$("#nav a#weather").on("click touchend",(function(){null==$("body").attr("id")&&SWD.Storage.removeSessionItem("sharedStationId")})),$("#fs-ctn a#my-station").on("click touchend",(function(e){e.stopPropagation(),SWD.Storage.removeLocalItem("lastViewed"),SWD.Storage.removeSessionItem("sharedStationId")}))})),function(e){e.Analytics=function(){},e.Analytics.prototype._trackerEnabled=function(){var e=!1;return"undefined"!=typeof gtag&&(e=!0),e},e.Analytics.prototype.trackLocationEvent=function(e){this._trackerEnabled()&&window.gtag("event","Viewed",{event_category:"Location Viewed",location_id:e})},e.Analytics.prototype.trackSharedLocationEvent=function(e){this._trackerEnabled()&&window.gtag("event","SharedViewed",{event_category:"Shared Location Viewed",location_id:e})},e.Analytics.prototype.trackGraphEvent=function(e,t){this._trackerEnabled()&&window.gtag("event","Viewed",{event_category:"Graph Viewed",event_label:"param:"+e+", zoom:"+t})},e.Analytics.prototype.trackStatusEvent=function(e){this._trackerEnabled()&&window.gtag("event","StatusViewed",{event_category:"Location Status Viewed",location_id:e})},e.Analytics.prototype.trackDetailViewedEvent=function(e){this._trackerEnabled()&&window.gtag("event","DetailViewed",{event_category:"Location Detail Viewed",location_id:e})},e.Analytics.prototype.trackDetailEditedEvent=function(e){this._trackerEnabled()&&window.gtag("event","DetailEdited",{event_category:"Location Detail Edited",location_id:e})},e.Analytics.prototype.trackDeviceViewedEvent=function(e){this._trackerEnabled()&&window.gtag("event","DetailViewed",{event_category:"Device Viewed",device_id:e})},e.Analytics.prototype.trackDeviceEditedEvent=function(e){this._trackerEnabled()&&window.gtag("event","DetailEdited",{event_category:"Device Edited",device_id:e})},e.Analytics.prototype.trackLocationPublicDataViewedEvent=function(e){this._trackerEnabled()&&window.gtag("event","PublicDataViewed",{event_category:"Public Data Viewed",location_id:e})},e.Analytics.prototype.trackLocationPublicDataEditedEvent=function(e){this._trackerEnabled()&&window.gtag("event","PublicDataEdited",{event_category:"Public Data Edited",location_id:e})},e.Analytics.prototype.trackUpSellClickEvent=function(){this._trackerEnabled()&&window.gtag("event","UpSellClick",{event_category:"Sign In Up Sell"})},e.Analytics.prototype.trackLifeStyleClickEvent=function(e,t,a){this._trackerEnabled()&&window.gtag("event","LifeStyleClick",{event_category:"LifeStyle App Clicked",location_id:t,coastal_spot_id:a,lifestyle_app:e})},e.Analytics.prototype.setPage=function(e){this._trackerEnabled()&&window.gtag("config","G-EKSZ108N0J",{page_path:e})},e.Analytics.prototype.setUserId=function(){if(this._trackerEnabled()){const e=firebase.auth().currentUser?firebase.auth().currentUser.uid:null;e&&null!==e&&window.gtag("config","G-EKSZ108N0J",{user_id:e,send_page_view:!1})}}}(window.SWD=window.SWD||{}),function(e,t){e.Locations=function(e){this.data=null,this.currentLocation=null,this.totalElevationForDevices=null,this.userOwnsStations=!1,this.tileGraphParameters={air_temperature_humidity:["temp-graph","humidity-graph"],barometric_pressure:["pressure-graph"],diagnostics:["battery-graph"],light:["uv-graph","brightness-graph","solar-radiation-graph"],lightning:["lightning-graph","strike-count-graph"],rain:["rain-graph","rain-rate-graph"],wind:["wind-graph"]},this.settings=t.extend({},{locationToSelect:null,locationsLoaded:null,locationId:null,userMustOwn:!0,userSignedIn:!1},e);var a=this;this._init((function(e){!e&&a.settings.userSignedIn&&(a.settings.locationId=a.getLocationIdToLoad()),null!=a.settings.locationId&&(a.setLocationId(a.settings.locationId),a.currentLocation=a._getLocation(a.settings.locationId),a._buildDeviceElevationInfo()),"function"==typeof a.settings.locationsLoaded&&a.settings.locationsLoaded()}))},e.Locations.prototype._init=function(e){var t=this.settings.userSignedIn||null==this.settings.locationId?null:this.settings.locationId,a=this;this._getLocations(t,(function(t){var i=!1;0==t.status.status_code&&(a.data=t,null!=a.settings.locationId&&a.hasLocation(a.settings.locationId)?(i=!0,a.settings.userSignedIn&&(a.userOwnsStations=!0),"function"==typeof e&&e(i)):a.settings.userSignedIn&&null!=a.settings.locationId?a._getLocations(a.settings.locationId,(function(t){0==t.status.status_code&&(a.data=t,a.hasLocation(a.settings.locationId)&&(i=!0)),"function"==typeof e&&e(i)})):"function"==typeof e&&e(i))}))},e.Locations.prototype._getLocations=function(t,a){var i=void 0!==t&&null!=t?"/"+t:"";e.makeRequest("locations"+i,{include_arbitrary_locations:"true"},(function(e){"function"==typeof a&&a(e)}))},e.Locations.prototype.getLocationsList=async function(){const t=await e.makeAsyncRequest("locations",{include_arbitrary_locations:"true"});if(0===t.status.status_code)return t},e.Locations.prototype.userOwnsStation=function(){return this.userOwnsStations},e.Locations.prototype.getLocationIdToLoad=function(){var t=null!=this.settings.locationId?this.settings.locationId:e.user.userCurrentLocation();return null!=t&&null==t||(t=this._defaultLocationId()),t},e.Locations.prototype.getNetworkData=function(a,i){let n=null!=a?a:this.settings.locationId;e.makeRequest(`networks/station/${n}`,(function(e){"function"==typeof i&&(void 0!==e.station_network_data.network_data&&e.station_network_data.network_data.length>0?i(e.station_network_data.network_data):t("#custom-network").css("display","none"))}))},e.Locations.prototype.getCurrentLocationId=function(){var e=null;return null!=this.currentLocation&&null!=this.currentLocation.location_id&&(e=this.currentLocation.location_id),null!=this.currentLocation&&null!=this.currentLocation.arbitrary_location_id&&(e=this.currentLocation.arbitrary_location_id),e},e.Locations.prototype.isCurrentLocationArbitrary=function(){var e=!1;return null!=this.currentLocation&&null!=this.currentLocation.arbitrary_location_id&&(e=!0),e},e.Locations.prototype.getCurrentLocation=function(){return this._getLocation(this.getCurrentLocationId())},e.Locations.prototype.getLocationById=function(e){return this._getLocation(e)},e.Locations.prototype.getNameForCurrentLocation=function(){var e=null;return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"name")&&(e=this.currentLocation.name),e},e.Locations.prototype.getPublicNameForCurrentLocation=function(){var e=null;return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"public_name")&&(e=this.currentLocation.public_name),e},e.Locations.prototype.getTimezoneForCurrentLocation=function(){return null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"timezone")?this.currentLocation.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},e.Locations.prototype.isCurrentLocationPublic=function(){var e=!1;return null!=this.currentLocation&&null!=this.currentLocation.location_meta.share_with_wf&&(e=this.currentLocation.location_meta.share_with_wf),e},e.Locations.prototype.getDevicesForCurrentLocation=function(){var e=null;if(null!=this.currentLocation&&Object.prototype.hasOwnProperty.call(this.currentLocation,"devices")&&(e=this.currentLocation.devices),e)for(var t=0;t-1||"forecast"==i.item)&&e.push(i)})),Util.sortByKey(e,"sort"),e},e.Locations.prototype.getHUDTilesForCurrentLocation=function(){var e=[],a=this.getDeviceIdsForCurrentLocation(),i=null;return Util.sortByKey(this.currentLocation.location_items,"sort"),null!=this.currentLocation&&null!=a&&Object.prototype.hasOwnProperty.call(this.currentLocation,"location_items")&&(t.each(this.currentLocation.location_items,(function(t,n){"forecast"==n.item?i=n:Object.prototype.hasOwnProperty.call(n,"device_id")&&a.indexOf(n.device_id)>-1&&e.length<6&&e.push(n)})),null!=i&&e.push(i)),e},e.Locations.prototype.getGraphParametersForCurrentLocation=function(){for(var e={},t=this.getTilesForCurrentLocation(),a=0;a0&&(e=this.data.locations[0].location_id,this.userOwnsStations=!0),e},e.Locations.prototype._getLocation=function(e){var t=null;if(null!=this.data&&Object.prototype.hasOwnProperty.call(this.data,"locations")&&this.data.locations instanceof Array)for(var a=0;a0&&(e=!0),e}}(window.SWD=window.SWD||{},jQuery),function(e,t){e.WeatherList=function(a,i,n){this.summaryTarget=i,this.deviceTarget=n,this.stationTimezone=null,this.summaryMap={outdoor:{label:e.user.localize("GeneralTextCurrentConditions")}},this.listMap={air_density:{label:e.user.localize("GridTextAirDensity"),formatter:e.user.userAirDensityDisplay},air_temperature:{label:e.user.localize("GeneralTitleAirTemperature"),value:e.ObRecord.AirTempWithSymbolAndUnits,graph:e.Graph.TEMP,formatter:e.user.userTemperatureDisplay},barometric_pressure:{label:e.user.localize("GeneralTitleStationPressure"),value:e.ObRecord.PressureWithUnits,graph:e.Graph.PRESSURE,formatter:e.user.userPressureDisplay},brightness:{label:e.user.localize("GeneralTitleBrightness"),value:e.ObRecord.LuxDisplayValueWithUnits,graph:e.Graph.BRIGHTNESS,formatter:e.user.userBrightnessDisplay},delta_t:{label:e.user.localize("GridTextDeltaT"),formatter:e.user.userDeltaTDisplay},dew_point:{label:e.user.localize("GeneralTitleDewPoint"),value:e.ObRecord.DewPointWithSymbolAndUnits,formatter:e.user.userTemperatureDisplay},feels_like:{label:e.user.localize("GeneralTitleFeelsLike"),formatter:e.user.userTemperatureDisplay},heat_index:{label:e.user.localize("GeneralValueHeatIndex"),formatter:e.user.userTemperatureDisplay},lightning_strike_distance:{label:e.user.localize("GeneralTitleLightningDistance"),value:e.ObRecord.LightningStrikeDistanceTextDisplay,formatter:e.user.userDistanceDisplay},lightning_strike_count:{label:e.user.localize("GeneralTitleLightningStrikeCount"),value:e.ObRecord.StrikeCount,formatter:e.user.defaultDisplay},lightning_strike_count_last_3hr:{label:e.user.localize("GeneralTitleLightningLast3Hrs"),value:e.ObRecord.LightningStrikeCountLast3Hrs,formatter:e.user.defaultDisplay},lightning_strike_last_distance:{label:e.user.localize("GeneralTitleLightningDistanceDetected"),formatter:e.user.userLightningDistanceTextDisplay},lightning_strike_last_epoch:{label:e.user.localize("GeneralTitleLightningLastDetected"),formatter:e.user.userFuzzyTimeDisplayNoSeconds},precip:{label:e.user.localize("GeneralTitleRainIntensity"),value:e.ObRecord.PrecipRateTextAndValueDisplay,formatter:this.userPrecipRateTextAndValue,graph:e.Graph.RAIN},precip_accum_local_day:{label:e.user.localize("GeneralTitleRainAccumToday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_day_final:{label:e.user.localize("GeneralTitleRainAccumToday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_yesterday:{label:e.user.localize("GeneralTitleRainAccumYesterday"),formatter:e.user.userPrecipAmountDisplay},precip_accum_local_yesterday_final:{label:e.user.localize("GeneralTitleRainAccumYesterday"),formatter:e.user.userPrecipAmountDisplay},precip_minutes_local_day:{label:e.user.localize("GeneralTitleRainDurationToday"),formatter:e.user.userPrecipMinutesDisplay},precip_minutes_local_yesterday_final:{label:e.user.localize("GeneralTitleRainDurationYesterday"),formatter:e.user.userPrecipMinutesDisplay},precip_minutes_local_yesterday:{label:e.user.localize("GeneralTitleRainDurationYesterday"),formatter:e.user.userPrecipMinutesDisplay},rain_accum_local_day:{label:e.user.localize("GeneralTItleRainAccumToday"),formatter:e.user.userRainAccumulationDisplay},relative_humidity:{label:e.user.localize("GeneralTitleHumidity"),value:e.ObRecord.HumidityWithSymbol,graph:e.Graph.TEMP,formatter:e.user.userHumidityDisplay},timestamp:{label:e.user.localize("GeneralValueTimestamp"),value:e.ObRecord.TimestampLocalLong,formatter:e.user.userDateTimeDisplayStationTime},sea_level_pressure:{label:e.user.localize("GeneralTitlePressure"),value:e.ObRecord.SeaLevelPressureWithUnits,graph:e.Graph.PRESSURE,formatter:e.user.userPressureDisplay},solar_radiation:{label:e.user.localize("GeneralTitleSolarRadiation"),value:e.ObRecord.SolarRadiationDisplayWithUnits,graph:e.Graph.SOLAR_RADIATION,formatter:function(e){return e+" W/m2"}},uv:{label:e.user.localize("GeneralTitleUVIndex"),value:e.ObRecord.UVWithIndex,graph:e.Graph.UV,formatter:e.user.userUVDisplay},wet_bulb_temperature:{label:e.user.localize("GeneralValueWetBulb"),formatter:e.user.userTemperatureDisplay},wind_avg:{label:e.user.localize("GeneralTitleWindSpeed"),value:e.ObRecord.WindAvgWithUnits,graph:e.Graph.Wind,formatter:e.user.userWindSpeedDisplay},wind_chill:{label:e.user.localize("GeneralTitleWindChill"),graph:e.Graph.Wind,formatter:e.user.userTemperatureDisplay},wind_direction:{label:e.user.localize("GeneralTitleWindDirection"),value:e.ObRecord.WindDir,graph:e.Graph.Wind,formatter:e.user.userWindDirectionDisplay},wind_gust:{label:e.user.localize("GeneralTitleWindGust"),value:e.ObRecord.WindGustWithUnits,graph:e.Graph.WIND,formatter:e.user.userWindSpeedDisplay},wind_lull:{label:e.user.localize("GeneralTitleWindLull"),value:e.ObRecord.WindLullWithUnits,graph:e.Graph.WIND,formatter:e.user.userWindSpeedDisplay},wind_speed:{label:e.user.localize("GeneralTitleWindSpeed"),value:e.ObRecord.WindAvgWithUnits,graph:e.Graph.WIND}},this.settings=t.extend({},{devices:[],itemClicked:null,locationId:null,locationObservationLoaded:null,useLocationUnits:!1},a);const r=this;this._getObservationsByLocation((function(t){r.settings.useLocationUnits&&null!=t.location_units&&e.user.setUnitSettings(t.location_units),void 0!==t&&r._drawObservationForLocation(t),r._setUpdater()})),this._getDeviceListItems((function(){r._draw()}))},e.WeatherList.prototype._getObservationsByLocation=function(t){if(null!=this.settings.locationId){const a=this,i={location_id:this.settings.locationId};e.makeRequest("observations/location",i,(function(e){null==e&&null==e||(null!=e.status.status_code&&0==e.status.status_code&&null!=e.timezone?a.stationTimezone=e.timezone:a.stationTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone,"function"==typeof t&&t(e),"function"==typeof a.settings.locationObservationLoaded&&a.settings.locationObservationLoaded(e))}))}},e.WeatherList.prototype._getDeviceListItems=function(t){null==e.DeviceListItems?e.makeRequest("location_item_list_configuration",{},(function(a){Object.prototype.hasOwnProperty.call(a,"status")&&0==a.status.status_code&&(e.DeviceListItems=a,"function"==typeof t&&t())})):"function"==typeof t&&t()},e.WeatherList.prototype._drawObservationForLocation=function(a){const i=this;let n,r="";const s=a.capabilities.filter((function(e){return"rain"===e.capability}))[0];null!=s&&(n=s.show_precip_final),n?"precip_accum_local_day_final"in a.outdoor&&delete a.outdoor.precip_accum_local_day:delete a.outdoor.precip_accum_local_day_final,t.each(a,(function(s,o){if(Object.prototype.hasOwnProperty.call(i.summaryMap,s)){const l=i.summaryMap[s];let u="style='display:none;'";Object.prototype.hasOwnProperty.call(o,"timestamp")&&(u="style='display:block;'"),r+="
    ",r+="
  • "+l.label+"
  • ",t.each(o,(function(t,o){if(a[s+"_keys"].indexOf(t)>-1&&Object.prototype.hasOwnProperty.call(i.listMap,t)){const a=i.listMap[t],s=Object.prototype.hasOwnProperty.call(a,"formatter")?a.formatter:null;let l=o;null!=s&&(l="timestamp"==t?s(o,i.stationTimezone):s(o)),r+="precip_accum_local_day_final"!=t&&"precip_accum_local_yesterday_final"!=t||1!=n||null==n||0==n?"
  • "+a.label+""+l+"
  • ":"
  • "+a.label+""+l+"
  • ","timestamp"==t&&(r+="
  • "+e.user.localize("GeneralValueTimezone")+""+i.stationTimezone+"
  • ")}})),r+="
"}})),t(this.summaryTarget).empty().append(r)},e.WeatherList.prototype._draw=function(){let e="";if(null!=this.settings.devices)for(var a=0;a",Object.prototype.hasOwnProperty.call(t,"device_meta")&&Object.prototype.hasOwnProperty.call(t.device_meta,"name")&&null!=t.device_meta.name&&(e+="
  • "+t.device_meta.name+"
  • ");for(var i=0;i",e+=""+a.label+"",e+="",e+=""}}e+=""}}}t(this.deviceTarget).empty().append(e),this._attachEventHandlers()},e.WeatherList.prototype._attachEventHandlers=function(){if("function"==typeof this.settings.itemClicked){const e=this;t(".weather-list-item").on("click",(function(){const a=t(this).attr("data-graph");a&&e.settings.itemClicked(t(this).parent().attr("data-device-id"),a)}))}},e.WeatherList.prototype._setUpdater=function(){const t=this;null!=e.WeatherListSummaryUpdater&&clearInterval(e.WeatherListSummaryUpdater),e.WeatherListSummaryUpdater=setInterval((function(){(t.settings.useLocationUnits||"list"==e.mgr.View())&&t.doSummaryUpdate()}),6e4)},e.WeatherList.prototype._getDeviceKey=function(e){let t=null;return Object.prototype.hasOwnProperty.call(e,"device_type")&&Object.prototype.hasOwnProperty.call(e,"hardware_revision")&&Object.prototype.hasOwnProperty.call(e,"firmware_revision")&&(t=e.device_type+"_"+e.hardware_revision+"_"+e.firmware_revision),t},e.WeatherList.prototype._getListItemsForDeviceType=function(t){let a=null;return Object.prototype.hasOwnProperty.call(e.DeviceListItems,"location_item_list_configuration_json")&&Object.prototype.hasOwnProperty.call(e.DeviceListItems.location_item_list_configuration_json,t)&&(a=e.DeviceListItems.location_item_list_configuration_json[t]),a},e.WeatherList.prototype.update=function(a){const i=a[e.ObRecord.DeviceId];null!=i&&t.each(a,(function(e,a){const n=t("ul[data-device-id="+i+"] span[data-param=param-"+e+"]");n&&n.html(a)}))},e.WeatherList.prototype.doSummaryUpdate=function(){const e=this;this._getObservationsByLocation((function(t){e._updateSummary(t)}))},e.WeatherList.prototype._updateSummary=function(e){const a=this;t.each(e,(function(e,i){Object.prototype.hasOwnProperty.call(a.summaryMap,e)&&t.each(i,(function(i,n){if(Object.prototype.hasOwnProperty.call(a.listMap,i)){const r=a.listMap[i],s=Object.prototype.hasOwnProperty.call(r,"formatter")?r.formatter:null;let o=n;null!=s&&(o="timestamp"==i?s(n,a.stationTimezone):s(n)),t("ul[data-summary="+e+"] span[data-param="+i+"]").html(o)}t("ul[data-summary="+e+"]").show()}))}))},e.WeatherList.prototype.userPrecipRateTextAndValue=function(t){return new e.PrecipRateValue(t,1,e.user.userPrecipUnits()).textDisplayLocalizedWithRate()}}(window.SWD=window.SWD||{},jQuery),function(e){e.TimestampValue=function(t,a){this.nullLabel=a||e.user.localize("GeneralValueUnknown"),this.value=t,this.moment=moment.unix(t)},e.TimestampValue.prototype.localFuzzyTime=function(t){return null!=this.value?(moment.updateLocale(e.locale,{}),"en"===e.locale&&(t?moment.updateLocale("en",{relativeTime:{past:"%s ago",s:"%d secs"}}):moment.updateLocale("en",{relativeTime:{past:"%s",s:"Just Now"}})),this.moment.fromNow()):this.nullLabel},e.TimestampValue.prototype.localRadarFuzzyTime=function(){if(null==this.value)return this.nullLabel;{moment.updateLocale(e.locale,{});const t=moment().diff(this.moment,"minutes");if("en"===e.locale)return t<=1?`${t} min ago`:`${t} mins ago`;if("fr"===e.locale)return t<=1?`il y a ${t} minute`:`il y a ${t} minutes`}},e.TimestampValue.prototype.minutesAgo=function(){return moment().diff(this.moment,"minutes")},e.TimestampValue.prototype.secondsAgo=function(){return moment().diff(this.moment,"seconds")}}(window.SWD=window.SWD||{}),function(e){e.TemperatureValue=function(e,t,a,i){this.settings=$.extend({},{convert:!0,checkValid:!0},i),a=a||!1,this.settings.checkValid?this.value=this._isValid(e)?e:null:this.value=e,this.wholeNumber=a,this.units=t,this.degreeSymbol="°",this.dashedPlaceholder="---",this.convertedValue=null==this.value||isNaN(this.value)?this.dashedPlaceholder:this.convertTo(!a)},e.TemperatureValue.prototype.observed=function(){return this.value},e.TemperatureValue.prototype.displayValue=function(){var e=this.wholeNumber?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),e},e.TemperatureValue.prototype.displayValueWithSymbol=function(){if(this.convertedValue!=this.dashedPlaceholder){var e=this.wholeNumer?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),e+this.degreeSymbol}return this.convertedValue},e.TemperatureValue.prototype.displayValueWithSymbolAndUnits=function(){if(this.convertedValue!=this.dashedPlaceholder){var e=this.wholeNumber?Math.round(this.convertedValue):this.convertedValue;return Object.is(e,-0)&&(e=0),void 0!==this.units?e+" "+this.degreeSymbol+this.units.toUpperCase():e+" "+this.degreeSymbol}return this.convertedValue},e.TemperatureValue.prototype.convertTo=function(t){var a=this.value;if(t=t||!1,this.settings.convert)switch(this.units){case e.TemperatureUnit.FAHRENHEIT:a=e.TemperatureValue.convertToF(this.value)}return t?parseFloat(a).toFixed(1):a},e.TemperatureValue.convertFToC=function(e){return(e-32)/1.8},e.TemperatureValue.convertToF=function(e){return 1.8*e+32},e.TemperatureValue.prototype._isValid=function(e){return!(e>85||e<-40)}}(window.SWD=window.SWD||{}),function(e){e.PressureValue=function(e,t){this.value=this._isValid(e)?e:null,this.units=t,this.dashedPlaceholder="---",this.convertedValue=null!=this.value?this._convert(this.value):this.dashedPlaceholder},e.PressureValue.prototype.observed=function(){return this.value},e.PressureValue.prototype.displayValue=function(){return this.convertedValue},e.PressureValue.prototype.displayValueWithUnits=function(){return this.convertedValue!=this.dashedPlaceholder?this.convertedValue+" "+e.PressureValue.DisplayUnits(this.units):this.convertedValue},e.PressureValue.prototype.calculateSeaLevelPressure=function(t){if(null!=this.value){var a=[];t=t||0;var i=this._convertToSeaLevel(t);if(this._isValid(i)){var n=this._convert(i);a.push(i),a.push(n),a.push(n+" "+e.PressureValue.DisplayUnits(this.units))}else a.push(null),a.push("---"),a.push("---");return a}return[null,this.dashedPlaceholder,this.dashedPlaceholder]},e.PressureValue.prototype._convert=function(t){if(null==t)return null;switch(this.units){case e.PressureUnit.INCHES:return parseFloat(.0295301*t).toFixed(3);case e.PressureUnit.MILLIMETERS:return parseFloat(.750062*t).toFixed(2);default:return parseFloat(t).toFixed(1)}},e.PressureValue.prototype._convertToSeaLevel=function(e){var t=this.value-0;return t*Math.pow(1+Math.pow(1013.25/t,1.865825/9.80665)*(.0065*e/288.15),9.80665/1.865825)},e.PressureValue.prototype._isValid=function(e){return!(e>1100||e<301)},e.PressureValue.DisplayUnits=function(e){var t=e,a={inhg:"inHg",mb:"mb",mmhg:"mmHg",hpa:"hPa"};return null!=a[e]&&(t=a[e]),t}}(window.SWD=window.SWD||{}),function(e){e.HumidityValue=function(e){this.value=this._isValid(e)?e:null,this.dashedPlaceholder="---"},e.HumidityValue.prototype.observed=function(){return this.value},e.HumidityValue.prototype.displayValue=function(){return null!=this.value?this.value:this.dashedPlaceholder},e.HumidityValue.prototype.displayValueWithSymbol=function(){return null!=this.value?this.value+"%":this.dashedPlaceholder},e.HumidityValue.prototype._isValid=function(e){return!(e>100||e<0)},e.HumidityValue.prototype.isValid=function(){return null!=this.value}}(window.SWD=window.SWD||{}),function(e){e.PrecipRateValue=function(e,t,a){this.value=e,this.interval=t||1,this.units=a,this.hourlyRate=this._calculateRatePerHour(),this.hourlyRateConverted=this._convertTo(),this.text=this._convertToText()},e.PrecipRateValue.NONE="none",e.PrecipRateValue.VERY_LIGHT="very light",e.PrecipRateValue.LIGHT="light",e.PrecipRateValue.MODERATE="moderate",e.PrecipRateValue.HEAVY="heavy",e.PrecipRateValue.VERY_HEAVY="very heavy",e.PrecipRateValue.EXTREME="extreme",e.PrecipRateValue.prototype.ratePerHour=function(){return this.hourlyRate},e.PrecipRateValue.prototype.ratePerHourDisplay=function(){return this.hourlyRateConverted},e.PrecipRateValue.prototype.ratePerHourDisplayWithUnits=function(){return this.hourlyRateConverted+" "+this.units+" / "+e.user.localize("GeneralTextHour").toLowerCase()},e.PrecipRateValue.prototype.textDisplay=function(){return this.text},e.PrecipRateValue.prototype.textDisplayLocalized=function(){const t="GeneralValueRain"+this.text.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("");return e.user.localize(t)},e.PrecipRateValue.prototype.textDisplayLocalizedWithRate=function(){return this.textDisplayLocalized().toUpperCase()+" ("+this.ratePerHourDisplayWithUnits()+")"},e.PrecipRateValue.prototype.graphTextYAxisValue=function(){var t=0;switch(this.textDisplay()){case e.PrecipRateValue.VERY_LIGHT:t=1;break;case e.PrecipRateValue.LIGHT:t=2;break;case e.PrecipRateValue.MODERATE:t=3;break;case e.PrecipRateValue.HEAVY:t=4;break;case e.PrecipRateValue.VERY_HEAVY:t=5;break;case e.PrecipRateValue.EXTREME:t=6;break;default:t=0}return t},e.PrecipRateValue.prototype._calculateRatePerHour=function(){var e=null;return null!=this.value&&(e=this.value/this.interval*60),e},e.PrecipRateValue.prototype._convertTo=function(){return new e.PrecipValue(this.hourlyRate,this.units).displayValue()},e.PrecipRateValue.prototype._convertToText=function(){var t=e.PrecipRateValue.NONE;return this.hourlyRate>50?t=e.PrecipRateValue.EXTREME:this.hourlyRate>=16?t=e.PrecipRateValue.VERY_HEAVY:this.hourlyRate>=4?t=e.PrecipRateValue.HEAVY:this.hourlyRate>=1?t=e.PrecipRateValue.MODERATE:this.hourlyRate>=.25?t=e.PrecipRateValue.LIGHT:this.hourlyRate>0&&(t=e.PrecipRateValue.VERY_LIGHT),t}}(window.SWD=window.SWD||{}),function(e){e.PrecipValue=function(e,t){this.value=e,this.units=t,this.dashedPlaceholder="---",this.isTrace=!1,this.convertedValue=null==this.value||isNaN(this.value)?this.dashedPlaceholder:this._convertTo(!0)},e.PrecipValue.prototype.observed=function(){return this.value},e.PrecipValue.prototype.displayValue=function(){return this.convertedValue},e.PrecipValue.prototype.displayValueWithUnits=function(){var t=this.convertedValue;return this.isTrace||this.convertedValue==this.dashedPlaceholder||(this.units==e.PrecipUnit.INCHES?t+='"':t+=" "+this.units),t},e.PrecipValue.prototype.displayValueIncludingTrace=function(){return e.PrecipValue.isTrace(this.value,e.PrecipUnit.MILLIMETERS)?"Trace":this.displayValue()},e.PrecipValue.prototype.displayValueWithUnitsIncludingTrace=function(){return e.PrecipValue.isTrace(this.value,e.PrecipUnit.MILLIMETERS)?"Trace":this.displayValueWithUnits()},e.PrecipValue.prototype._convertTo=function(t){var a=this.value;switch(t=t||!1,this.units){case e.PrecipUnit.INCHES:a=.0393701*this.value;break;case e.PrecipUnit.CENTIMETERS:a=.1*this.value}return t?e.PrecipValue.round(a,this.units):a},e.PrecipValue.isTrace=function(t,a){var i={},n=!1;return i[e.PrecipUnit.INCHES]=".005",i[e.PrecipUnit.MILLIMETERS]=".127",i[e.PrecipUnit.CENTIMETERS]=".0127",null!=i[a]&&t>0&&t=32.7?12:0;break;case e.WindUnit.LFM:a=2.2369362920544*this.value*88}return t?parseFloat(a).toFixed(1):a},e.WindSpeedValue.DisplayUnits=function(t){switch(t){case e.WindUnit.KPH:return"km/h";case e.WindUnit.MPS:return"m/s";default:return t}}}(window.SWD=window.SWD||{}),function(e){e.WindDirectionValue=function(e,t){this.dashedPlaceholder="---",this.value=e,this.units=t,this.degreeSymbol="°",this.directionString=null!=this.value?this._getDirectionString():"---"},e.WindDirectionValue.prototype.observed=function(){return this.value},e.WindDirectionValue.prototype.displayValue=function(){return this.units==e.DirectionUnit.CARDINAL?this.displayValueInText():this.displayValueWithSymbol()},e.WindDirectionValue.prototype.displayValueWithSymbol=function(){return null!=this.value?this.value+this.degreeSymbol:this.dashedPlaceholder},e.WindDirectionValue.prototype.displayValueInText=function(){return this.directionString},e.WindDirectionValue.prototype._getDirectionString=function(){var e="";return this.value<=360&&this.value>=348.75?e="N":this.value>=0&&this.value<=11.25?e="N":this.value>=11.25&&this.value<=33.75?e="NNE":this.value>=33.75&&this.value<=56.25?e="NE":this.value>=56.25&&this.value<=78.75?e="ENE":this.value>=78.75&&this.value<=101.25?e="E":this.value>=101.25&&this.value<=123.75?e="ESE":this.value>=123.75&&this.value<=146.25?e="SE":this.value>=146.25&&this.value<=168.75?e="SSE":this.value>=168.75&&this.value<=191.25?e="S":this.value>=191.25&&this.value<=213.75?e="SSW":this.value>=213.75&&this.value<=236.25?e="SW":this.value>=236.25&&this.value<=258.75?e="WSW":this.value>=258.75&&this.value<=281.25?e="W":this.value>=281.25&&this.value<=303.75?e="WNW":this.value>=303.75&&this.value<=326.25?e="NW":this.value>=326.25&&this.value<=348.47&&(e="NNW"),e}}(window.SWD=window.SWD||{}),function(e){e.LightningDistanceValue=function(e,t){this.value=e,this.units=t,this.info=this._getMinMax(),this.textValue=this._convertToText()},e.LightningDistanceValue.prototype.textDisplay=function(){return this.textValue},e.LightningDistanceValue.prototype.binnedInfo=function(){return this.info},e.LightningDistanceValue.prototype._convertToText=function(){var e="---";return null!=this.info.graphMin&&null!=this.info.graphMax&&(e=Math.round(this.info.graphMin)+" - "+Math.round(this.info.graphMax)+" "+this.units),e},e.LightningDistanceValue.prototype._getMinMax=function(){var t={graphMin:null,graphMax:null};switch(this.value){case 0:case 1:t.graphMin=0,t.graphMax=new e.DistanceValue(3,this.units,!1).displayValue();break;default:var a=this.value-2,i=this.value+2;a<0&&(a=0),t.graphMin=parseFloat(new e.DistanceValue(a,this.units,!1).displayValue()),t.graphMax=parseFloat(new e.DistanceValue(i,this.units,!1).displayValue())}return t}}(window.SWD=window.SWD||{}),function(e){e.DistanceValue=function(e,t,a){a=null==a||a,this.value=e,this.units=t,this.convertedValue=this._convertTo(a)},e.DistanceValue.prototype.observed=function(){return this.value},e.DistanceValue.prototype.displayValue=function(){return this.convertedValue},e.DistanceValue.prototype.displayValueWithUnits=function(){return this.convertedValue+" "+this.units},e.DistanceValue.prototype._convertTo=function(t){var a=this.value;switch(t=t||!1,this.units){case e.DistanceUnit.MILES:a=.62137*this.value}return t?parseFloat(a).toFixed(1):a}}(window.SWD=window.SWD||{}),function(e){e.UVValue=function(e){this.value=this._isValid(e)?e:null,this.dashedPlaceholder="---"},e.UVValue.prototype.observed=function(){return this.value},e.UVValue.prototype.displayValue=function(){return null!=this.value?(Math.round(10*this.value)/10).toFixed(1):this.dashedPlaceholder},e.UVValue.prototype._isValid=function(e){return!(e>20)}}(window.SWD=window.SWD||{}),function(e,t){e.Graph=function(e,a){this.target=a,this.d3Graph=null,this.data=null,this.requestingData=!1,this.bucket=null,this.graphTarget=null,this.mainYAxisTarget=null,this.secondaryYAxisTarget=null,this.refreshNeeded=!1,this.xDomain=null,this.zoomSteps=[1,5,30,180,1440],this.settings=t.extend({},{device:null,deviceName:null,graphType:null,powerSaveMode:null,stationTimezone:null,zoomChanged:null,zoom:1},e),this.scrollPosition=null,this._init(),this._attachEventHandlers()},e.Graph.prototype._init=function(){t(this.target).empty(),null!=this.settings.device&&(t("#graph-parameter").html(this._getGraphTitle()),this._showPowerSaveIcon(),this.bucket=this._getBucket(),this._draw(),this._getData())},e.Graph.prototype._showPowerSaveIcon=function(){null!=this.settings.powerSaveMode?t("#graph-parameter-ctn .power-save-mode-icon").attr("data-tile",this.settings.powerSaveMode).show():t("#graph-parameter-ctn .power-save-mode-icon").attr("data-tile","").hide()},e.Graph.prototype._getData=function(){var e=this,t=this._getGraphInfoByZoomLevel();null!=t.evtType&&null!=t.evtType?this._getEventData(t,(function(a){if(null!=a[t.evtType]&&null!=a[t.evtType]){a.bucket_step_minutes=t.bucketMins;var i=e._processEventData(a[t.evtType]);e._initGraph(a,i,t)}else e._showNoObsMessage()})):this._getObservationData(t,(function(a){if(null!=a.obs&&null!=e.settings.graphType){var i=e._processData(a.obs,a.bucket_step_minutes);e._initGraph(a,i,t)}else e._showNoObsMessage()}))},e.Graph.prototype._initGraph=function(a,i,n){var r=this;if(this.data=a,this.xDomain=[1e3*n.startTime,1e3*n.endTime],this._clearNoObsMessage(),null==this.d3Graph){var s=this._getGraphLineSettings(n.bucket);this._drawLegend(s),this.d3Graph=new e.D3Graph({lineData:i,lines:s,bucketTimeStep:a.bucket_step_minutes,xIndex:e.ObservationRecord.TIMESTAMP,xAxisDomain:this.xDomain,yAxes:this._getGraphYAxisSettings(),graphDrawn:function(){var e=null!=r.scrollPosition?r.scrollPosition:t(r.graphTarget)[0].scrollWidth;t(r.graphTarget).scrollLeft(e),r.scrollPosition=null},graphHover:function(e,t){r._graphHover(e,t)},stationTimezone:this.settings.stationTimezone},this.graphTarget)}else this.d3Graph.update(i,a.bucket_step_minutes,this.xDomain,!0)},e.Graph.prototype._getObservationData=function(t,a){var i={device_id:this.settings.device.device_id,bucket:t.bucket,time_start:t.startTime,time_end:t.endTime};this.requestingData=!0,e.makeRequest("observations",i,(function(e){self.requestingData=!1,"function"==typeof a&&a(e)}))},e.Graph.prototype._getEventData=function(t,a){var i={device_id:this.settings.device.device_id,time_start:t.startTime,time_end:t.endTime,types:t.evtType};this.requestingData=!0,e.makeRequest("events/device/"+this.settings.device.device_id,i,(function(e){self.requestingData=!1,"function"==typeof a&&a(e)}))},e.Graph.prototype._draw=function(){t(this.target).attr("data-graph-type",this.settings.graphType),this.mainYAxisTarget=t("
    ").appendTo(this.target),this.graphTarget=t("
    ").appendTo(this.target),t(this.target).append("
    "+e.user.localize("GraphTitleNewData")+"
    "),this._hasDualYAxis()&&(this.secondaryYAxisTarget=t("
    ").appendTo(this.target))},e.Graph.prototype._attachEventHandlers=function(){var e=this;t("#graph-zoom-out").on("click touchend",(function(){return e._zoomOut(),!1})),t("#graph-zoom-in").on("click touchend",(function(){return e._zoomIn(),!1})),t("#new-obs").on("click touchend",(function(){t(e.graphTarget).animate({scrollLeft:t(e.graphTarget)[0].scrollWidth},800),t(this).removeClass("show")})),t(this.graphTarget).on("scroll",(function(){t(this).scrollLeft()+t(this).width()>=t(this)[0].scrollWidth&&t("#new-obs").removeClass("show")}))},e.Graph.prototype._getGraphInfoByZoomLevel=function(){var t={endTime:moment.utc().unix(),evtType:null,startTime:null,bucket:null};switch(this._getZoom()){case 1:t.bucket="a",t.bucketMins=1,t.startTime=moment.utc().subtract(1,"days").unix();break;case 2:t.bucket="b",t.bucketMins=5,t.startTime=moment.utc().subtract(5,"days").unix();break;case 3:t.bucket="c",t.bucketMins=30,t.startTime=moment.utc().subtract(30,"days").unix();break;case 4:t.bucket="d",t.bucketMins=180,t.startTime=moment.utc().subtract(180,"days").unix();break;case 5:t.bucket="e",t.bucketMins=1440,t.startTime=moment.utc().subtract(3,"years").unix()}switch(this.settings.graphType){case e.Graph.LIGHTNING:t.evtType="evt_strike"}return t},e.Graph.prototype._getGraphYAxisSettings=function(){switch(this.settings.graphType){case e.Graph.WIND:return{main:{formatter:this.windspeedFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.TEMP:return{main:{formatter:this.tempFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.HUMIDITY:return{main:{formatter:function(e){return e},target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.PRESSURE:return{main:{formatter:this.pressureFormatter,target:this.mainYAxisTarget,d3Format:d3.format(".1f"),label:this._getGraphYTitle()}};case e.Graph.LIGHTNING:return{main:{formatter:this.lightningFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle(),minValue:0,maxValue:e.user.userDistanceUnits()==e.DistanceUnit.MILES?30:45}};case e.Graph.STRIKE_COUNT:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle(),d3Format:d3.format("d"),minTickStep:1}};case e.Graph.RAIN:return{main:{formatter:function(t,a){return e.user.userRainAccumulationDisplay(t,!1)},target:this.mainYAxisTarget,label:this._getGraphYTitle()},secondary:{formatter:function(t,a){var i=0;switch(t){case e.PrecipRateValue.VERY_LIGHT:i=1;break;case e.PrecipRateValue.LIGHT:i=2;break;case e.PrecipRateValue.MODERATE:i=3;break;case e.PrecipRateValue.HEAVY:i=4;break;case e.PrecipRateValue.VERY_HEAVY:i=5;break;case e.PrecipRateValue.EXTREME:i=6;break;default:i=0}return i},target:this.secondaryYAxisTarget,label:"",d3Format:function(e){return""},minValue:0,maxValue:6}};case e.Graph.RAIN_RATE:var t=this;return{main:{formatter:function(a,i){return"accumulation"==i.name?e.user.userRainAccumulationDisplay(a,!1):t.precipRateFormatter(a,!1)},target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.UV:return{main:{formatter:this.uvFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.SOLAR_RADIATION:case e.Graph.BRIGHTNESS:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,label:this._getGraphYTitle()}};case e.Graph.BATTERY:return{main:{formatter:this.defaultFormatter,target:this.mainYAxisTarget,d3Format:d3.format(".2f"),label:this._getGraphYTitle(),minValue:1.6,maxValue:3.7,doNice:!1}}}},e.Graph.prototype._getGraphLineSettings=function(t){switch(this.settings.graphType){case e.Graph.WIND:return[{name:"avg",fill:!0,yIndex:e.ObservationRecord.WIND_AVG,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueAvg")},{name:"gust",yIndex:e.ObservationRecord.WIND_GUST,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueGust")},{name:"lull",yIndex:e.ObservationRecord.WIND_LULL,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.windspeedTooltipFormatter,legendLabel:e.user.localize("GeneralValueLull")},{name:"wind-arrow",yIndex:e.ObservationRecord.WIND_DIR,type:e.D3Graph.TYPE_WIND_ARROW,formatter:null}];case e.Graph.TEMP:return"e"==t?[{name:"temp",yIndexHigh:e.ObservationRecord.TEMP_HIGH,yIndexLow:e.ObservationRecord.TEMP_LOW,yIndexAvg:e.ObservationRecord.TEMP,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userTemperatureDisplay,legendLabel:e.user.localize("GraphValueTemp"),order:0}]:[{name:"dew-point",yIndex:e.ObservationRecord.DEW_POINT,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userTemperatureDisplay,tooltipLabel:e.user.localize("GeneralTitleDewPoint")+":",legendLabel:e.user.localize("GeneralTitleDewPoint"),order:1},{name:"temp",yIndex:e.ObservationRecord.TEMP,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userTemperatureDisplay,tooltipLabel:e.user.localize("GraphValueTemp")+":",legendLabel:e.user.localize("GraphValueTemp"),order:0}];case e.Graph.HUMIDITY:return"e"==t?[{name:"humidity",yIndexHigh:e.ObservationRecord.HUMIDITY_HIGH,yIndexLow:e.ObservationRecord.HUMIDITY_LOW,yIndexAvg:e.ObservationRecord.HUMIDITY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userHumidityDisplay,legendLabel:e.user.localize("GeneralTitleHumidity")}]:[{name:"humidity",yIndex:e.ObservationRecord.HUMIDITY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userHumidityDisplay,tooltipLabel:e.user.localize("GeneralTitleHumidity")+":",legendLabel:e.user.localize("GeneralTitleHumidity"),order:0}];case e.Graph.PRESSURE:return"e"==t?[{name:"pressure",yIndexHigh:e.ObservationRecord.PRESSURE_HIGH,yIndexLow:e.ObservationRecord.PRESSURE_LOW,yIndexAvg:e.ObservationRecord.PRESSURE,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userPressureDisplay,legendLabel:e.user.localize("GeneralTitlePressure")}]:[{name:"pressure",yIndex:e.ObservationRecord.PRESSURE,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userPressureDisplay,tooltipLabel:e.user.localize("GeneralTitlePressure")+":",legendLabel:e.user.localize("GeneralTitlePressure")}];case e.Graph.LIGHTNING:return[{name:"lightning",yIndexHigh:e.ObservationRecord.STRIKE_EVENT_MAX,yIndexLow:e.ObservationRecord.STRIKE_EVENT_MIN,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:this.defaultFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTitleLightningStrikesDetected")}];case e.Graph.STRIKE_COUNT:return[{name:"lightning",yIndex:e.ObservationRecord.STRIKE_COUNT,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_BAR,formatter:this.defaultFormatter,tooltipLabel:e.user.localize("GeneralTitleLightningStrikeCount"),legendLabel:e.user.localize("GraphTitleLightningStrikesDetected")}];case e.Graph.RAIN:return"e"==t?[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:this.precipAccumTooltipFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}]:[{name:"rain",yIndex:e.ObservationRecord.PRECIP_RATE_TEXT,yAxis:e.D3Graph.YAXIS_SECONDARY,type:e.D3Graph.TYPE_BAR,formatter:function(t){return e.user.localize("GeneralValueRain"+t.replace(/ /g,""))},tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleRainIntensity")},{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:this.precipAccumTooltipFormatter,tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}];case e.Graph.RAIN_RATE:var a=this;return"e"==t?[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:function(t){return e.user.userRainAccumulationDisplay(t,!0)},tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")}]:[{name:"accumulation",yIndex:e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,fill:!0,formatter:function(t){return e.user.userRainAccumulationDisplay(t,!0)},tooltipLabel:"",legendLabel:e.user.localize("GraphTextAccumulation")},{name:"rain",yIndex:e.ObservationRecord.PRECIP_DISPLAY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_BAR,formatter:function(e){return a.precipRateFormatter(e,!0)},tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleRainRate")}];case e.Graph.UV:return"e"==t?[{name:"uv",yIndexHigh:e.ObservationRecord.UV_HIGH,yIndexLow:e.ObservationRecord.UV_LOW,yIndexAvg:e.ObservationRecord.UV,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:this.uvFormatter,tooltipLabel:e.user.localize("GeneralTitleUVIndexShort")+":",legendLabel:e.user.localize("GeneralTitleUVIndex")}]:[{name:"uv",yIndex:e.ObservationRecord.UV,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:this.uvFormatter,tooltipLabel:e.user.localize("GeneralTitleUVIndexShort")+":",legendLabel:e.user.localize("GeneralTitleUVIndex")}];case e.Graph.BRIGHTNESS:return"e"==t?[{name:"brightness",yIndexHigh:e.ObservationRecord.LUX_HIGH,yIndexLow:e.ObservationRecord.LUX_LOW,yIndexAvg:e.ObservationRecord.LUX,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userBrightnessDisplay,legendLabel:e.user.localize("GeneralTitleBrightness")}]:[{name:"brightness",yIndex:e.ObservationRecord.LUX,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userBrightnessDisplay,tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleBrightness")}];case e.Graph.SOLAR_RADIATION:return"e"==t?[{name:"solar-radiation",yIndexHigh:e.ObservationRecord.SOLAR_RADIATION_HIGH,yIndexLow:e.ObservationRecord.SOLAR_RADIATION_LOW,yIndexAvg:e.ObservationRecord.SOLAR_RADIATION,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_CANDLESTICK,formatter:e.user.userSolarRadiationDisplay,legendLabel:e.user.localize("GeneralTitleSolarRadiation")}]:[{name:"solar-radiation",yIndex:e.ObservationRecord.SOLAR_RADIATION,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userSolarRadiationDisplay,tooltipLabel:"",legendLabel:e.user.localize("GeneralTitleSolarRadiation")}];case e.Graph.BATTERY:return[{name:"battery",yIndex:e.ObservationRecord.BATTERY,yAxis:e.D3Graph.YAXIS_MAIN,type:e.D3Graph.TYPE_LINE,formatter:e.user.userBatteryDisplay,tooltipLabel:e.user.localize("GeneralTextBatteryVoltage"),legendLabel:e.user.localize("GeneralTextBatteryVoltage")}];default:return null}},e.Graph.prototype.windspeedFormatter=function(t){if(null!=t)return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValue()},e.Graph.prototype.windspeedTooltipFormatter=function(t){if(null!=t)return new e.WindSpeedValue(t,e.user.userWindUnits()).displayValueWithUnits()},e.Graph.prototype.tempFormatter=function(t){var a=null,i=new e.TemperatureValue(t,e.user.userTemperatureUnits());return"---"!=i.displayValue()&&(a=i.displayValue()),a},e.Graph.prototype.pressureFormatter=function(t){return new e.PressureValue(t,e.user.userPressureUnits()).displayValue()},e.Graph.prototype.distanceFormatter=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValue()},e.Graph.prototype.distanceTooltipFormatter=function(t){return new e.DistanceValue(t,e.user.userDistanceUnits()).displayValueWithUnits()},e.Graph.prototype.precipRateFormatter=function(t,a){if(null!=t){var i=null,n=this._getGraphInfoByZoomLevel();return i=new e.PrecipValue(t/n.bucketMins*60,e.user.userPrecipUnits()),a?i.displayValue()+" "+e.user.userPrecipUnits()+" / "+e.user.localize("GeneralTextHour").toLowerCase():i.displayValue()}return""},e.Graph.prototype.precipAccumTooltipFormatter=function(t){return new e.PrecipValue(t,e.user.userPrecipUnits()).displayValueWithUnitsIncludingTrace()},e.Graph.prototype.defaultFormatter=function(e){return e},e.Graph.prototype.lightningFormatter=function(e){return e},e.Graph.prototype.uvFormatter=function(t){var a=null,i=new e.UVValue(t);return"---"!=i.displayValue()&&(a=i.displayValue()),a},e.Graph.prototype._getGraphTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.WIND:t=e.user.localize("GeneralTitleWindSpeed");break;case e.Graph.PRESSURE:t=e.user.localize("GeneralTitlePressure");break;case e.Graph.TEMP:t=e.user.localize("GraphValueTemp");break;case e.Graph.HUMIDITY:t=e.user.localize("GeneralTitleHumidity");break;case e.Graph.LIGHTNING:t=e.user.localize("GeneralTitleLightning");break;case e.Graph.STRIKE_COUNT:t=e.user.localize("GeneralTitleLightningStrikeCount");break;case e.Graph.RAIN:t=e.user.localize("GeneralTitleRain");break;case e.Graph.RAIN_RATE:t=e.user.localize("GeneralTitleRainRate");break;case e.Graph.UV:t=e.user.localize("GeneralTitleUVIndex");break;case e.Graph.BRIGHTNESS:t=e.user.localize("GeneralTitleBrightness");break;case e.Graph.SOLAR_RADIATION:t=e.user.localize("GeneralTitleSolarRadiation");break;case e.Graph.BATTERY:t=e.user.localize("GeneralTextBatteryVoltage")}return Object.prototype.hasOwnProperty.call(this.settings.device,"device_meta")&&null!=this.settings.device.device_meta.name&&(t+=" - "+this.settings.device.device_meta.name),t},e.Graph.prototype._getGraphYTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.PRESSURE:t=e.user.userPressureUnits();break;case e.Graph.TEMP:t=String.fromCharCode(176)+" "+e.user.userTemperatureUnits();break;case e.Graph.HUMIDITY:t=e.user.localize("GeneralTitleHumdity");break;case e.Graph.WIND:t=e.WindSpeedValue.DisplayUnits(e.user.userWindUnits());break;case e.Graph.LIGHTNING:t=e.user.localize("GeneralValueDistance")+" ("+e.user.userDistanceUnits()+")";break;case e.Graph.STRIKE_COUNT:t=e.user.localize("GraphTitleLightningStrikesDetected");break;case e.Graph.RAIN:t=e.user.userPrecipUnits();break;case e.Graph.UV:t=e.user.localize("GeneralTitleUVShort");break;case e.Graph.BRIGHTNESS:t=e.user.localize("GeneralTitleLux");break;case e.Graph.SOLAR_RADIATION:t="W/m2";break;case e.Graph.BATTERY:t=e.user.localize("GeneralValueVolts")}return t},e.Graph.prototype._getGraphSecondaryYTitle=function(){var t="";switch(this.settings.graphType){case e.Graph.TEMP:t="% "+e.user.localize("GeneralTitleHumdityShort")}return t},e.Graph.prototype._processData=function(a,i){for(var n=t.extend(!0,[],a),r=null,s=null,o=[],l=this._disconnectIntervalInMinutes(i),u=this._getTotalElevation(),c=new e.ObservationRecord({bucketInMinutes:i,deviceType:this.settings.device.device_type}),p=0;pl&&o.push(null)}var h=c.getObjectForOb(n[p]);if(this.settings.graphType==e.Graph.WIND)0!=h[e.ObservationRecord.WIND_AVG]&&null!=h[e.ObservationRecord.WIND_AVG]||null==h[e.ObservationRecord.WIND_DIR]||(h[e.ObservationRecord.WIND_DIR]=null);else if(this.settings.graphType==e.Graph.TEMP&&1440!=i){var m=new e.TemperatureValue(h[e.ObservationRecord.TEMP],e.user.userTemperatureUnits());if(h[e.ObservationRecord.TEMP]=m.observed(),null!=h[e.ObservationRecord.TEMP]){var g=new e.HumidityValue(h[e.ObservationRecord.HUMIDITY]);h[e.ObservationRecord.HUMIDITY]=g.observed();var y=h[e.ObservationRecord.HUMIDITY],T=h[e.ObservationRecord.TEMP];if(null!=T&&null!=y){var S=this._getDewPoint(y,T);if(isNaN(S))h[e.ObservationRecord.DEW_POINT]=null;else{var v=new e.TemperatureValue(S,e.user.userTemperatureUnits());h[e.ObservationRecord.DEW_POINT]=v.observed()}}else h[e.ObservationRecord.DEW_POINT]=null}else h=null}else if(this.settings.graphType==e.Graph.PRESSURE)null!=h[e.ObservationRecord.PRESSURE]&&(h[e.ObservationRecord.PRESSURE]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE],u)),null!=h[e.ObservationRecord.PRESSURE_HIGH]&&(h[e.ObservationRecord.PRESSURE_HIGH]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE_HIGH],u)),null!=h[e.ObservationRecord.PRESSURE_LOW]&&(h[e.ObservationRecord.PRESSURE_LOW]=this._getSeaLevelPressure(h[e.ObservationRecord.PRESSURE_LOW],u));else if(this.settings.graphType==e.Graph.RAIN||this.settings.graphType==e.Graph.RAIN_RATE){var f=e.rainCheckEnabled(this.settings.device),_=null,b=null;if(h.rain_check=!1,1440==i?(_=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],f&&null!=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]&&(_=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL],h.rain_check=!0)):(_=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],b=h[e.ObservationRecord.PRECIP],f&&null!=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]&&(_=h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL],h.rain_check=!0),f&&null!=h[e.ObservationRecord.PRECIP_FINAL]&&(b=h[e.ObservationRecord.PRECIP_FINAL])),h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_DISPLAY]=_,h[e.ObservationRecord.PRECIP_DISPLAY]=b,1440!=i){var D=f?h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL_FINAL]:h[e.ObservationRecord.PRECIP_ACCUM_TODAY_LOCAL],w=new e.PrecipValue(D,e.PrecipUnit.MILLIMETERS),G="---"!=w.displayValue()?parseFloat(w.displayValue()):"---";null!=s&&"---"!=s&&s>G&&o.push(null);var L=new e.PrecipRateValue(h[e.ObservationRecord.PRECIP_DISPLAY],i,e.user.userPressureUnits());h[e.ObservationRecord.PRECIP_RATE_TEXT]=L.textDisplay(),s=G}}else if(this.settings.graphType==e.Graph.UV){var I=this.uvFormatter(h[e.ObservationRecord.UV]);h[e.ObservationRecord.UV]=I}else this.settings.graphType==e.Graph.BATTERY&&0==h[e.ObservationRecord.BATTERY]&&(h=null);o.push(h),null!=h&&null!=h[e.ObservationRecord.TIMESTAMP]&&null!=h[e.ObservationRecord.TIMESTAMP]&&(r=moment.utc(1e3*h[e.ObservationRecord.TIMESTAMP]))}return o},e.Graph.prototype._processEventData=function(t){for(var a=[],i=0;i"+a[n].legendLabel+"",l=Object.prototype.hasOwnProperty.call(r,"order")?r.order:n;i.splice(l,0,o)}}t("#graph-legend").empty().append(i.join(""))},e.Graph.prototype.addPoint=function(e){if(null!=this.data&&1==this.data.bucket_step_minutes&&(this.data&&Object.prototype.hasOwnProperty.call(this.data,"obs")&&null!=this.d3Graph&&this.data.obs[this.data.obs.length-1][0]!=e[0])){var a=t(this.graphTarget).scrollLeft(),i=a+t(this.graphTarget).width(),n=t(this.graphTarget)[0].scrollWidth,r=a+t(this.graphTarget).width()/2,s=this.d3Graph.getTimestampByPixelLocation(r),o=new moment(1e3*e[0]);o.startOf("minute"),e[0]=o.unix(),this.data.obs.push(e);var l=this._isTimestampVisible(1e3*e[0]),u=this._processData(this.data.obs,this.data.bucket_step_minutes);if(this.d3Graph.update(u,this.data.bucket_step_minutes,this.xDomain,!Util.isDocumentHidden()),this.refreshNeeded=Util.isDocumentHidden(),n==i)t(this.graphTarget).animate({scrollLeft:n},800);else if(!l&!this.refreshNeeded){var c=this.d3Graph.getPixelLocationByTimestamp(s);t(this.graphTarget).scrollLeft(c-t(this.graphTarget).width()/2),t("#new-obs").addClass("show")}}},e.Graph.prototype.addEvent=function(e){if(null!=this.data&&1==this.data.bucket_step_minutes){var a=this._getGraphInfoByZoomLevel();if(this.data&&Object.prototype.hasOwnProperty.call(this.data,a.evtType)&&null!=this.d3Graph)if(this.data[a.evtType][this.data[a.evtType].length-1][0]!=e[0]){var i=t(this.graphTarget).scrollLeft(),n=i+t(this.graphTarget).width(),r=t(this.graphTarget)[0].scrollWidth,s=i+t(this.graphTarget).width()/2,o=this.d3Graph.getTimestampByPixelLocation(s);this.data[a.evtType].push(e);var l=this._isTimestampVisible(1e3*e[0]),u=this._processEventData(this.data[a.evtType],a.bucketMins);if(this.d3Graph.update(u,a.bucketMins,this.xDomain,!Util.isDocumentHidden()),this.refreshNeeded=Util.isDocumentHidden(),r==n)t(this.graphTarget).animate({scrollLeft:r},800);else if(!l&!this.refreshNeeded){var c=this.d3Graph.getPixelLocationByTimestamp(o);t(this.graphTarget).scrollLeft(c-t(this.graphTarget).width()/2),t("#new-obs").addClass("show")}}}},e.Graph.prototype._isTimestampVisible=function(e){var a=t(this.graphTarget).scrollLeft(),i=a+t(this.graphTarget).width(),n=this.d3Graph.getPixelLocationByTimestamp(e),r=!1;return n>=a&&n<=i&&(r=!0),r},e.Graph.prototype._getTotalElevation=function(){return(null!=this.settings.device.location_elevation?this.settings.device.location_elevation:0)+(null!=this.settings.device.device_meta.agl?this.settings.device.device_meta.agl:0)},e.Graph.prototype._getSeaLevelPressure=function(t,a){return new e.PressureValue(t,e.user.userPressureUnits()).calculateSeaLevelPressure(a)[0]},e.Graph.prototype._getDewPoint=function(e,t){return parseFloat(243.04*(Math.log(e/100)+17.625*t/(243.04+t))/(17.625-Math.log(e/100)-17.625*t/(243.04+t))).toFixed(4)},e.Graph.prototype.refreshGraph=function(){!Util.isDocumentHidden()&&this.refreshNeeded&&null!=this.d3Graph&&(this.d3Graph.refresh(),this.refreshNeeded=!1)},e.Graph.prototype._getBucket=function(){return t("input[name=graph-view]:checked").attr("data-bucket")},e.Graph.prototype._zoomIn=function(){var e=this._getZoom(),t=e>1?e-1:e;t!=e&&(this._setZoom(t),this._doZoom(e))},e.Graph.prototype._zoomOut=function(){var e=this._getZoom(),t=e-1&&(t=this.zoomSteps.indexOf(e)+1),t},e.Graph.prototype._doZoom=function(e){var a=this._getZoom();t(this.graphTarget).scrollLeft(t(this.graphTarget)[0].scrollWidth),5==a||5==e?(t(this.target).empty(),this.d3Graph=null,this._init()):this._getData(),"function"==typeof this.settings.zoomChanged&&this.settings.zoomChanged(this.settings.deviceId,this._getZoom(),this.settings.graphType)},e.Graph.prototype._showNoObsMessage=function(){t("#graph").hide(),t("#graph-legend").hide(),t("#graph-no-obs").show(),t(".tooltip").html("")},e.Graph.prototype._clearNoObsMessage=function(){t("#graph-no-obs").hide(),t("#graph").show(),t("#graph-legend").show()},e.Graph.prototype._graphHover=function(a,i){var n=this,r=this._getGraphInfoByZoomLevel(),s="";var o="24"===e.user.userTimeUnits()?"HH:mm":"LT",l="

    "+("

    "+(s=1440==r.bucketMins||null==this.settings.stationTimezone?moment(1e3*a[e.ObservationRecord.TIMESTAMP]):moment(1e3*a[e.ObservationRecord.TIMESTAMP]).tz(this.settings.stationTimezone)).format("l"))+(1440!=r.bucketMins?" "+s.format(o):"")+"

    ",u=[];switch(this.settings.graphType){case e.Graph.WIND:if(null!=a){var c=new e.WindSpeedValue(a[e.ObservationRecord.WIND_AVG],e.user.userWindUnits()).displayValue(),p=new e.WindSpeedValue(a[e.ObservationRecord.WIND_LULL],e.user.userWindUnits()).displayValue(),d=new e.WindSpeedValue(a[e.ObservationRecord.WIND_GUST],e.user.userWindUnits()).displayValue(),h=new e.WindDirectionValue(a[e.ObservationRecord.WIND_DIR],e.user.userDirectionUnits()).displayValue();l+="

    ",null!=c&&(l+=""+c+""),null!=p&&null!=d&&(l+=" ("+p+" - "+d+")"),l+=" "+e.WindSpeedValue.DisplayUnits(e.user.userWindUnits()),null!=h&&(l+=" "+h),l+="

    "}break;default:l+="
      ",t.each(i,(function(t,i){if(null!=i.formatter)switch(i.type){case e.D3Graph.TYPE_CANDLESTICK:if(n.settings.graphType==e.Graph.LIGHTNING){var r=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"",s="
    • "+r+" "+new e.LightningDistanceValue(a.distance,e.user.userDistanceUnits()).textDisplay()+"
    • ";u.push(s)}else{var o="
    • ";o+=(r=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"")+i.formatter(a[i.yIndexAvg])+" ("+i.formatter(a[i.yIndexLow])+" - "+i.formatter(a[i.yIndexHigh])+")",o+="
    • ",u.push(o)}break;default:r=Object.prototype.hasOwnProperty.call(i,"tooltipLabel")&&null!=i.tooltipLabel?i.tooltipLabel+" ":"";var l=Object.prototype.hasOwnProperty.call(i,"order")?i.order:t,c="";n.settings.graphType!=e.Graph.RAIN&&n.settings.graphType!=e.Graph.RAIN_RATE||"precip_accum_today_local_display"==i.yIndex&&a.rain_check&&(c=" raincheck");s="
    • "+r+i.formatter(a[i.yIndex])+"
    • ";u.splice(l,0,s)}})),l+=u.join(""),l+="
    "}t(".tooltip").html(l)},e.Graph.prototype.update=function(e,a,i,n,r){this.settings.device=e,this.settings.deviceId=a,this.settings.graphType=i,this.d3Graph=null,this.scrollPosition=n?t(this.graphTarget).scrollLeft():null,this.settings.powerSaveMode=r||null,this._init()},e.Graph.prototype.deviceId=function(){return this.settings.deviceId},e.Graph.prototype.setPowerSaveMode=function(e){this.settings.powerSaveMode=e,this._showPowerSaveIcon()},e.Graph.WIND="wind-graph",e.Graph.TEMP="temp-graph",e.Graph.HUMIDITY="humidity-graph",e.Graph.PRESSURE="pressure-graph",e.Graph.LIGHTNING="lightning-graph",e.Graph.STRIKE_COUNT="strike-count-graph",e.Graph.RAIN="rain-graph",e.Graph.RAIN_RATE="rain-rate-graph",e.Graph.UV="uv-graph",e.Graph.BRIGHTNESS="brightness-graph",e.Graph.SOLAR_RADIATION="solar-radiation-graph",e.Graph.BATTERY="battery-graph"}(window.SWD=window.SWD||{},jQuery),function(e){e.StateManager=function(t){this.settings=$.extend({},{stateChanged:null},t),this.state={locationId:null,view:"",stationName:"",graph:{deviceId:null,param:null,zoom:null},history:{period:null,day:null,month:null,year:null},map:{lat:null,lon:null,zoom:null,mapType:null,overlayType:null,showZoom:!0,showLegend:!0,mapTheme:null,clickedMarkerId:null},dashboard:{},alertInfo:!1,alertId:null,isArbitrary:!1,isClicked:!1,tab:e.StateManager.TAB_FORECAST},this._parse(),this._attachEventHandlers()},e.StateManager.prototype._parse=function(){let t=window.location.pathname;t=t.replace(/^\//,""),t=t.replace(/\/$/,"");const a=t.split("/"),i=new URLSearchParams(window.location.search),n=JSON.parse(e.Storage.getLocalItem("mapState"));n&&(n.mapType&&(this.state.map.mapType=n.mapType),void 0!==n.showZoom&&(this.state.map.showZoom=n.showZoom),void 0!==n.showLegend&&(this.state.map.showLegend=n.showLegend),n.mapTheme&&(this.state.map.mapTheme=n.mapTheme),n.lat&&(this.state.map.lat=n.lat),n.lon&&(this.state.map.lon=n.lon),n.zoom&&(this.state.map.zoom=n.zoom),n.overlayType&&(this.state.map.overlayType=n.overlayType),n.clickedMarkerId&&(this.state.map.clickedMarkerId=n.clickedMarkerId));const r=a[0];if("radar"===r?(this.state.tab=e.StateManager.TAB_RADAR,this.state.map.overlayType="radar"):"map"===r?(this.state.map.overlayType||(this.state.map.overlayType="map"),"radar"===this.state.map.overlayType?this.state.tab=e.StateManager.TAB_RADAR:this.state.tab=e.StateManager.TAB_MAP):"history"===r?this.state.tab=e.StateManager.TAB_HISTORY:"loc"===r?(this.state.tab=e.StateManager.TAB_FORECAST,this.state.isArbitrary=!0):"forecast"===r&&(this.state.tab=e.StateManager.TAB_FORECAST),this.state.tab===e.StateManager.TAB_MAP||this.state.tab===e.StateManager.TAB_RADAR){const e=a.indexOf(r),t=a.length-(e+1);if(1===t)this.state.locationId=this._getIntValue(a[e+1]);else if(3===t)this.state.map.lat=this._getFloatValue(a[e+1]),this.state.map.lon=this._getFloatValue(a[e+2]),this.state.map.zoom=this._getIntValue(a[e+3]);else if(4===t)this.state.locationId=this._getIntValue(a[e+1]),this.state.map.lat=this._getFloatValue(a[e+2]),this.state.map.lon=this._getFloatValue(a[e+3]),this.state.map.zoom=this._getIntValue(a[e+4]);else if(5===t){this.state.locationId=this._getIntValue(a[e+1]),this.state.map.lat=this._getFloatValue(a[e+2]),this.state.map.lon=this._getFloatValue(a[e+3]),this.state.map.zoom=this._getIntValue(a[e+4]);const t=a[e+5];this.state.map.clickedMarkerId=t}}else if(this.state.tab===e.StateManager.TAB_HISTORY)for(let e=0;e0?e>=0&&e=this.times.length&&(e=0),this.setFrameIdx(e)},e.RadarAnimator.prototype.previous=function(){var e=this.frameIdx-1;e<0&&(e=this.times.length-1),this.setFrameIdx(e)},e.RadarAnimator.prototype.first=function(){this.frameCount>0&&this.setFrameIdx(0)},e.RadarAnimator.prototype.last=function(){this.frameCount>0&&this.setFrameIdx(this.times.length-1)},e.RadarAnimator.prototype.start=function(){if(null==this.intervalId){var e=this,t=0;this.intervalId=setInterval((function(){e.frameIdx==e.times.length-1&&t<3?t++:(t=0,e.stepFrame())}),this.interval)}},e.RadarAnimator.prototype.stop=function(){null!=this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},e.RadarAnimator.prototype.stepFrame=function(){var e=!0;0==this.overlay.stepFrame()&&(e=!1),e&&(this.next(),this.updateTimestamp(this.times[this.frameIdx]),this.updateSlider(this.frameIdx))},e.RadarAnimator.prototype.addOverlay=function(e){this.overlay=e,this.calcFrames()},e.RadarAnimator.prototype.removeOverlay=function(e){this.overlay===e&&this.overlay.splice(0,1),this.calcFrames()},e.RadarAnimator.prototype.getTimeSteps=function(){return this.times},e.RadarAnimator.prototype.calcFrames=function(){this.frameCount=-1,this.timeStep=-1,this.times=new Array,this.overlay.getDefaultFrameCount()>this.frameCount&&(this.frameCount=this.overlay.getDefaultFrameCount()),this.overlay.getDefaultTimeStep()>this.timeStep&&(this.timeStep=this.overlay.getDefaultTimeStep()),this.calcDates(),this.syncOverlays();var e=null;if(this.times.length>0&&this.frameIdx>=0&&this.frameIdx0&&this.timeStep>0){this.now=this.latestRadarTimestamp?e:Math.floor((e-9e4)/this.timeStep)*this.timeStep,this.times=new Array;for(var t=this.frameCount-1;t>=0;t--){var a=this.latestRadarTimestamp&&0==t?new Date(this.now):new Date(this.now-this.timeStep*t);this.times.push(a)}}},e.RadarAnimator.prototype.getFrameStart=function(){var e=0;return this.times.length>0&&(e=this.times.length-1),this.overlay.hasOwnProperty("defaultAnimationStart")&&0==this.overlay.defaultAnimationStart&&(e=0),e},e.RadarAnimator.prototype.setLatestRadarTimestamp=function(e){this.latestRadarTimestamp=e?new Date(e):null,this.updateSlider(this.frameIdx),this.updateTimestamp(e)},e.RadarAnimator.prototype.updateTimestamp=function(t){let a,i=Intl.DateTimeFormat().resolvedOptions().timeZone;const n=this._isTime24HourFormat()?"HH:mm":"h:mm A";a=i&&moment.tz.names().includes(i)?moment(t).tz(i).format(`ddd MMM D | ${n} z`):moment(t).format(`ddd MMM D | ${n}`);const r=new e.TimestampValue(moment(t).unix()).localRadarFuzzyTime();$(".swd-timeline__timestamp").text(a).show(),$(".swd-timeline__mins-ago").text(r)},e.RadarAnimator.prototype._isTime24HourFormat=function(){return"24"===e.user.userTimeUnits()},e.RadarAnimator.prototype.updateSlider=function(e){const t=this.times.length-1,a=Math.min(e,t),i=document.querySelector(".swd-timeline__slider-track"),n=document.querySelector(".swd-timeline__slider-thumb"),r=i.offsetWidth-n.offsetWidth,s=r/t*a,o=s/r*100;n.style.left=`${s}px`,i.style.backgroundSize=`${o}% 100%`},e.RadarAnimator.prototype.refresh=function(){this.calcFrames(),null!=this.map.overlays[0].overlay&&this.map.overlays[0].overlay.reload()}}(window.SWD=window.SWD||{}),function(e){e.RadarTiles=function(e){this.defaultSettings={defaultFrameCount:25},this.settings=$.extend({},this.defaultSettings,e),this.alt=null,this.name=null,this.projection=null,this.radius=6378137,this.frameIdx=0,this.transparency=.75,this.dates=[],this.tiles=new Array,this.transparency=.75,this.defaultTimeStep=3e5,this.timeStep=this.defaultTimeStep,this.frameCount=this.settings.defaultFrameCount,this.tileSize=new google.maps.Size(256,256),this.baseURL="https://d2ws9h7mk4m5xb.cloudfront.net/tiles/",this.devURL="https://d1p7nsbn36wy46.cloudfront.net/tiles/"},e.RadarTiles.prototype.getTile=function(e,t,a){const i=this.drawTileDiv(e,t,a);return this.createImg(i,this.frameIdx),this.loadImage(i,this.frameIdx),this.tiles.push(i),i},e.RadarTiles.prototype.drawTileDiv=function(e,t,a){const i=a.createElement("div");return i.style.width=this.tileSize.width+"px",i.style.height=this.tileSize.height+"px",i.style.fontSize="10",$(i).css({opacity:this.transparency}),i.coord=e,i.zoom=t,i.frames=this.getFrames(e,t),i},e.RadarTiles.prototype.releaseTile=function(e){for(var t=0;t=this.frameCount&&(this.frameIdx=this.frameCount-1),this.reloadFrames()}},e.RadarTiles.prototype.getDefaultFrameCount=function(){return this.settings.defaultFrameCount},e.RadarTiles.prototype.getMeta=function(){return""},e.RadarTiles.prototype.getDates=function(){return this.dates},e.RadarTiles.prototype.setDates=function(e){this.dates=e},e.RadarTiles.prototype.setDate=function(e){var t=this.dates;if(t[0].getTime()>e.getTime())return!1;if(t[t.length-1].getTime()=e.getTime()){this.setFrameIdx(a);break}return!0},e.RadarTiles.prototype.getCurrentFrameIdx=function(){return this.frameIdx},e.RadarTiles.prototype.setFrameIdx=function(e){this.frameIdx!=e&&(this.frameIdx=e,this.frameIdx<0&&(this.frameIdx=0),this.frameIdx>=this.frameCount&&(this.frameIdx=this.frameCount-1),this.refresh())},e.RadarTiles.prototype.stepFrame=function(){for(var e=(this.frameIdx+1)%this.frameCount,t=!0,a=0;a{const t=e.getCenter();this.settings.stateMgr.setMapView(t.lat(),t.lng(),e.getZoom())}),[{data:this.settings.stationLocations,icon:this.getMarkerIcon("regular")}].forEach(t=>{t.data.forEach(a=>{const i=new google.maps.Marker({position:{lat:a.latitude,lng:a.longitude},map:e,icon:{url:t.icon,scaledSize:new google.maps.Size(33,42),anchor:new google.maps.Point(14,35)}});this.markers.push(i);let n=null;i.addListener("click",()=>{if(n)n.close(),n=null;else{const t=`\n\t\t\t\t\t\t

    ${a.name}

    \n\t\t\t\t\t\t`;n=new google.maps.InfoWindow({content:t}),n.open(e,i)}})})})},e.RadarMap.prototype._attachEventHandlers=function(){const e=this;document.addEventListener("visibilitychange",(function(){document.hidden&&e.stopRadar()})),$(".swd-timeline__play-button").on("click",(function(){$(this).toggleClass("pause"),$(this).hasClass("pause")?e.animator.start():e.animator.stop()})),$(".swd-timeline__slider-thumb").draggable({axis:"x",containment:".swd-timeline__slider-track",drag:function(t,a){const i=a.position.left;e.updatePositionAndRadar(i)}}),$(".swd-timeline__slider-track").on("mousedown touchstart",(function(t){t.preventDefault();const a=$(this).offset(),i=$(".swd-timeline__slider-thumb").width(),n=(t.pageX||t.originalEvent.touches[0].pageX)-a.left-i/2;e.updatePositionAndRadar(n),$(".swd-timeline__slider-thumb").focus(),$(document).on("mousemove.slider touchmove.slider",(function(t){const n=(t.pageX||t.originalEvent.touches[0].pageX)-a.left-i/2;e.updatePositionAndRadar(n)})).on("mouseup.slider touchend.slider",(function(){$(document).off(".slider")}))})),$(".swd-timeline__slider-thumb").on("keydown",(function(t){const a=t.which,i=e.timestamps.length-1,n=$(".swd-timeline__slider-track").width(),r=$(this).width();let s=parseInt($(this).attr("data-index"),10)||0;37===a&&s>0?s--:39===a&&s{if(e.ok)return e.json();throw e.status}).then(e=>{const t=e.timestamps?e.timestamps[e.timestamps.length-1]:null;this.timestamps=e.timestamps,this.radarTiles.settings.defaultFrameCount=this.timestamps.length,this.animator.setLatestRadarTimestamp(t),this.addMapOverlay()}).catch(e=>{this.animator.setLatestRadarTimestamp(null),this.addMapOverlay()})},e.RadarMap.prototype.addMapOverlay=function(){this.animator.addOverlay(this.radarTiles),this.createOverlay()},e.RadarMap.prototype.createOverlay=function(){const e=this.settings.map,t=this;e.overlayMapTypes.getArray().includes(t.radarTiles)||e.overlayMapTypes.insertAt(0,t.radarTiles),null!==t.radarTiles&&null!==t.radarTiles.reload&&(t.radarTiles.reloadInterval||(t.radarTiles.reloadInterval=setInterval((function(){t.stopInterval?(clearInterval(t.radarTiles.reloadInterval),t.radarTiles.reloadInterval=null):(t.radarTiles.reload(),t.checkAndFetchNewTimestamps())}),3e5)))},e.RadarMap.prototype.updatePositionAndRadar=function(e){const t=$(".swd-timeline__slider-track").width()-$(".swd-timeline__slider-thumb").width();let a=Math.max(0,Math.min(e,t));const i=this.getIndexFromPosition(a),n=100*(a/t);$(".swd-timeline__slider-thumb").css("left",a+"px").attr("data-index",i),$(".swd-timeline__slider-track").css("background-size",`${n}% 100%`),this.animator.setFrameIdx(i),this.animator.setLatestRadarTimestamp(this.timestamps[i])},e.RadarMap.prototype.getIndexFromPosition=function(e){const t=$(".swd-timeline__slider-track").width()-$(".swd-timeline__slider-thumb").width(),a=this.timestamps.length-1,i=e/t;return Math.round(a*i)},e.RadarMap.prototype.getMarkerIcon=function(e){const t=$("html").hasClass("light")?"light":"dark";return{regular:{light:"/images/location-marker-3x.png",dark:"/images/location-marker-white-3x.png"}}[e][t]},e.RadarMap.prototype.removeMarkers=function(){this.markers.forEach(e=>e.setMap(null)),this.markers=[]},e.RadarMap.prototype._initLegend=function(){function e(e){return`linear-gradient(to right, ${e.join(", ")})`}$(".snow-legend").css("background",e(["rgba(0, 188, 236, 1)","rgba(0, 152, 218, 1)","rgba(0, 116, 199, 1)","rgba(0, 79, 180, 1)","rgba(0, 43, 162, 1)","rgba(0, 25, 92, 1)"])),$(".mixed-legend").css("background",e(["rgba(217, 9, 209, 1)","rgba(181, 12, 187, 1)","rgba(147, 11, 165, 1)","rgba(115, 7, 141, 1)","rgba(85, 3, 117, 1)","rgba(57, 0, 92, 1)"])),$(".rain-legend").css("background",e(["rgba(0, 128, 0, 1)","rgba(0, 155, 0, 1)","rgba(0, 182, 0, 1)","rgba(154, 205, 50, 1)","rgba(255, 255, 0, 1)","rgba(255, 215, 0, 1)","rgba(255, 69, 0, 1)","rgba(255, 0, 0, 1)","rgba(193, 0, 0, 1)","rgba(154, 0, 0, 1)","rgba(87, 0, 0, 1)"]))},e.RadarMap.prototype.destroy=function(){this.radarTiles&&this.radarTiles.reloadInterval&&(clearInterval(this.radarTiles.reloadInterval),this.radarTiles.reloadInterval=null),this.animator&&(this.animator.stop(),this.animator=null),this.removeMarkers(),this.settings.map&&this.radarTiles&&this.settings.map.overlayMapTypes.clear(),$(".swd-timeline__play-button").removeClass("pause"),$(".swd-timeline__play-button").off("click"),$(".swd-timeline__slider-thumb").off("keydown focus blur"),$(".swd-timeline__slider-track").off("mousedown touchstart"),$(document).off("mousemove.slider touchmove.slider mouseup.slider touchend.slider"),$(".swd-map__zoom-control-in").off("click"),$(".swd-map__zoom-control-out").off("click"),$(".map-type-options .map-option").off("click"),$("#toggle-legend").off("click"),this.radarTiles=null,this.timestamps=null,this.markers=[]},e.RadarMap.prototype.stopRadar=function(){$(".swd-timeline__play-button").hasClass("pause")&&this.animator&&"function"==typeof this.animator.stop&&($(".swd-timeline__play-button").toggleClass("pause"),this.animator.stop())}}(window.SWD=window.SWD||{}),function(e){e.StationsMap=function(e){this.selectedFeature=null,this.previousBounds=null,this.idleListener=null,this.clickListener=null,this.settings=$.extend({},{map:null,stateMgr:null},e),this._init(),this._attachEventHandlers()},e.StationsMap.prototype._init=function(){const e=this.settings.map,t=this.settings.stateMgr,a=this;this.idleListener=google.maps.event.addListener(e,"idle",(function(){const i=e.getCenter();t.setMapView(i.lat(),i.lng(),e.getZoom()),a.getStations()})),e.data.setStyle((function(e){var t=e.getProperty("name");return{icon:{url:"/images/location-marker-3x.png",scaledSize:new google.maps.Size(33,42),anchor:new google.maps.Point(14,35)},title:t,zIndex:10}})),this.clickListener=e.data.addListener("click",(function(e){var i=Number(e.feature.getId());null!=a.selectedFeature&&a.selectedFeature.getId()==i?a.closeStationDetailPanel():(a.selectedFeature=e.feature,a.selectFeature(e.feature),a.displayStationDetail(e.feature.getId()),t.setLocationId(i))})),this.getStations()},e.StationsMap.prototype._attachEventHandlers=function(){const e=this;$("#station-detail-close").on("click touchend",(function(){return e.closeStationDetailPanel(),!1})),$(".swd-map__zoom-control-in").on("click",(function(){const t=e.settings.map.getZoom();e.settings.map.setZoom(t+1)})),$(".swd-map__zoom-control-out").on("click",(function(){const t=e.settings.map.getZoom();e.settings.map.setZoom(t-1)}))},e.StationsMap.prototype.getStations=function(){const t=this.settings.map,a=this.settings.stateMgr,i=this;var n=t.getBounds(),r=this.calculateNewBounds(n);if(r){var s={lat_min:r.getSouthWest().lat(),lon_min:r.getSouthWest().lng(),lat_max:r.getNorthEast().lat(),lon_max:r.getNorthEast().lng()};e.makeRequest("map/stations",s,(function(e){if(e&&0==e.status.status_code&&null!=e.features){var n=a.getState(),r=null;t.data.addGeoJson(e),null!=i.selectedFeature?r=i.selectedFeature.getId():null!=n.locationId&&(r=n.locationId),t.data.forEach((function(e){e.getId()==r&&(i.selectedFeature=e,i.selectFeature(i.selectedFeature))}))}})),this.previousBounds=n}},e.StationsMap.prototype.calculateNewBounds=function(e){if(!this.previousBounds)return e;var t=this.previousBounds.getSouthWest(),a=this.previousBounds.getNorthEast(),i=e.getSouthWest(),n=e.getNorthEast(),r=[];if(i.lng()a.lng()&&r.push(new google.maps.LatLngBounds(new google.maps.LatLng(i.lat(),a.lng()),new google.maps.LatLng(n.lat(),n.lng()))),i.lat()a.lat()&&r.push(new google.maps.LatLngBounds(new google.maps.LatLng(a.lat(),i.lng()),new google.maps.LatLng(n.lat(),n.lng()))),r.length>0){var s=new google.maps.LatLngBounds;return r.forEach((function(e){s.extend(e.getSouthWest()),s.extend(e.getNorthEast())})),s}return null},e.StationsMap.prototype.selectFeature=function(e){this.settings.map.data.revertStyle(),this.settings.map.data.overrideStyle(e,{icon:{url:"/images/location-marker-grow-3x.png",scaledSize:new google.maps.Size(33,42),anchor:new google.maps.Point(14,35)},zIndex:100})},e.StationsMap.prototype.displayStationDetail=function(t){const a=this;$("#station-name").html(""),this.settings.map.data.forEach((function(e){e.getId()==t&&(a.selectedFeature=e,a.selectFeature(a.selectedFeature))})),$("body").addClass("show-station-detail");new e.WeatherList({locationId:t,locationObservationLoaded:function(t){(0!=t.status.status_code||null==t.outdoor||$.isEmptyObject(t.outdoor))&&$("#list-view").empty().append("

    "+e.user.localize("GeneralMapMessageNoObs")+"

    "),$("#station-name a").html(t.public_name)},useLocationUnits:!0},$("#list-view"),null)},e.StationsMap.prototype.closeStationDetailPanel=function(){this.settings.map.data.revertStyle(),this.selectedFeature=null,$("body").removeClass("show-station-detail"),this.settings.stateMgr.setLocationId(null)},e.StationsMap.prototype.resetListeners=function(){this.idleListener&&(google.maps.event.removeListener(this.idleListener),this.idleListener=null),this.clickListener&&(google.maps.event.removeListener(this.clickListener),this.clickListener=null)},e.StationsMap.prototype.destroy=function(){this.resetListeners(),this.settings.map&&this.settings.map.data.forEach(e=>this.settings.map.data.remove(e)),this.selectedFeature=null,this.previousBounds=null}}(window.SWD=window.SWD||{}),function(e,t){e.Forecast=function(a,i){this.target=i,this.baseURL=null,this.unitsDisplay=null,this.isTime24HourFormat=this._isTime24HourFormat(),this.rapidWindLoaded=!1,this.windTypeAverage="avg",this.windTypeRapid="rapid",this.settings=t.extend({},{lat:null,lon:null,stationId:null,units_temp:null,units_wind:null,units_wind_dir:null,units_pressure:null,units_precip:null,units_distance:null,units_other:null,show_radar:null,source:null},a),this._attachEventHandlers(),this.rapidWindHelper=new e.RapidWind({rapidWindTarget:t("#cc-wind"),rapidWindBarParentElement:t("#forecast-ctn .cc-rapid-wind-bar"),rapidWindBarElement:t("#forecast-ctn .cc-rapid-wind"),directionElement:t("#forecast-ctn .wind-direction-icon"),units_wind:this.settings.units_wind,showScale:!1,showMinFill:!0})},e.Forecast.prototype._attachEventHandlers=function(){t(this.target).off(),t(this.target).on("click",".forecast-day",(function(){t(this).toggleClass("expanded"),t(".forecast-day-general",this).toggleClass("on-bg")})),t(this.target).on("click",".forecast-day td",(function(){return!1}))},e.Forecast.prototype.update=function(e){if(null!=e.type&&null!=e.type)switch(e.type){case"rapid_wind":this.rapidWindHelper.showRapidWind(e.rapid_wind_display,e.rapid_wind_dir_display,e.rapid_wind_timestamp);break;case"evt_strike":this._showLightningStrike(e.time)}else null!=e.client.base_url&&(this.baseURL=e.client.base_url),null!=e.units_display&&(this.unitsDisplay=e.units_display),this._drawForecast(e)},e.Forecast.prototype._drawForecast=function(e){this._update10DayForecast(e),this._updateCurrentConditions(e),this._drawStationMessage(e)},e.Forecast.prototype._updateStationMessage=function(t){if(null!=t.station.state)switch(t.station.state){case 1:this._showStationMessage(e.user.localize("GeneralWarningStationLate"),"warning");break;case 2:this._showStationMessage(e.user.localize("GeneralAlertStationOffline"),"alert");break;case 3:this._showStationMessage(e.user.localize("GeneralWarningDeviceLate"),"warning");break;case 4:this._showStationMessage(e.user.localize("GeneralAlertDeviceOffline"),"alert");break;default:this._hideStationMessage()}},e.Forecast.prototype._showStationMessage=function(e,a){t("#cc-station-message").html(e).attr("data-msg-level",a).show()},e.Forecast.prototype._hideStationMessage=function(){t("#cc-station-message p").html("").attr("data-msg-level","").hide()},e.Forecast.prototype._drawAQI=function(e){if(null!=e.current_conditions.aq){var a=e.current_conditions.aq,i="";switch(i+=""+a.category+"",i+="AQI("+a.scale.short_name+")",i+="
    ",t("#aqi-display",this.target).empty().append(i),a.category){case"Good":t(".square").css({background:"#00E400"});break;case"Moderate":t(".square").css({background:"#FFFF00"});break;case"Unhealthy for Sensitive Groups":t(".square").css({background:"#FF7E00"});break;case"Unhealthy":t(".square").css({background:"#FF0000"});break;case"Very Unhealthy":t(".square").css({background:"#8F3F97"});break;case"Hazardous":t(".square").css({background:"#7E0023"})}var n=t(".square")[0];this._setAQI(n,a)}else t("#aqi-display").css({display:"none"})},e.Forecast.prototype._setAQI=function(e,t){const a=t.aqi,i=t.scale.display_max,n=Number(100*(a-0)/(i-0));e.textContent=t.aqi,e.style.left=`calc(${n}% - 14px)`},e.Forecast.prototype._drawHourlyForecast=function(e,a,i){t(e).is(":empty")?t(e,this.target).empty().append(this._getHourlyForecast(a,i)):this._updateHourlyForecast(e,a,i)},e.Forecast.prototype._getHourlyForecast=function(e,t){for(var a=[],i=[],n=[],r=[],s=[],o=0;o"+this._getHourlyValue(l.time,t)+""),n.push(""+this._getSkyValue(l.icon)+""),i.push(""+this._getTempValue(l.air_temperature)+""),r.push(""+this._getPrecipValues(l.precip_probability,l.precip_icon)+""),s.push(""+this._getWindValue(l.wind_avg,l.wind_direction_icon)+"")}var u="";return u+=""+a.join("")+"",u+=""+n.join("")+"",u+=""+i.join("")+"",u+=""+r.join("")+"",u+=""+s.join("")+"",u+="
    "},e.Forecast.prototype._updateHourlyForecast=function(e,a,i){for(var n=0;n0||a.current_conditions.precip_accum_local_day>0)?this._showConditionalParams():this._hideConditionalParams()},e.Forecast.prototype._showRadar=function(a){const i=this;let n=e.user.userMiniMapOptions(),r=!1,s=null;n||(n={mini_map:"auto",percent_chance:0});const o=n.mini_map,l=parseInt(n.percent_chance,10)||0;if("always"===o){if(a.forecast.hourly&&Array.isArray(a.forecast.hourly)){let e=!0;for(let t=0;t0){e=!1;break}}s=e?"none":a.forecast.hourly[0].precip_type}r=!0}else if("never"===o)r=!1;else if("auto"===o&&a.forecast.hourly&&Array.isArray(a.forecast.hourly)){for(let e=0;el){r=!0;break}}else if(i>=l){r=!0;break}}s=a.forecast.hourly[0].precip_type}a.forecast.hourly[0]&&"function"==typeof i.settings.show_radar&&(r?i.settings.show_radar(s):t("#radar-map-ctn").hide())},e.Forecast.prototype._showConditionalParams=function(){t(".cc-conditional-param").show()},e.Forecast.prototype._hideConditionalParams=function(){t(".cc-conditional-param").hide()},e.Forecast.prototype._showLightningStrike=function(a){var i=this._isActiveLightning(a)?"active-lightning lightning-event":"",n=t("#cc-lightning").attr("data-lightning-timestamp"),r=new e.TimestampValue(a,e.user.localize("GeneralValueRainNone"));a>(n=null==n?0:n)&&t("#cc-lightning").attr("data-lightning-timestamp",a).removeClass("lightning-event").addClass(i),t("span[data-param='lightning_strike_3hr_last_epoch'").html(r.localFuzzyTime(!1))},e.Forecast.prototype.hideRapidWind=function(){this.rapidWindHelper.hideRapidWind()},e.Forecast.prototype._isActiveLightning=function(t){var a=!1;return new e.TimestampValue(t).minutesAgo()<=5&&(a=!0),a},e.Forecast.prototype._drawStationMessage=function(e){var a="";(null!=e.forecast_message&&null!=e.forecast_message&&(a+="

    "+e.forecast_message+"

    "),this._hasValue(e.source_id))&&(a+="

    "+(e.source_id+"").padStart(3,"0")+"

    ");t("#station-message",this.target).empty().append(a)},e.Forecast.prototype._getRainCheckClass=function(e){var t="";return e&&(t="raincheck"),t},e.Forecast.prototype._getPressureClass=function(e){return"pressure-"+e},e.Forecast.prototype._getCurrentForecastDay=function(e){var t=null;return null!=e.forecast.daily&&Array.isArray(e.forecast.daily)&&e.forecast.daily.length>0&&(t=e.forecast.daily[0]),t},e.Forecast.prototype._getForecastHoursForDay=function(e,t,a){var i=[];if(null!=e.forecast.hourly&&null!=e.forecast.hourly&&Array.isArray(e.forecast.hourly))for(var n=new moment.unix(t).tz(a),r=n.format("DDD"),s=n.add(1,"days").format("DDD"),o=0,l=0;l"),t},e.Forecast.prototype._getPrecipValues=function(e,t){var a="";return e=this._getValue(e),t=this._getValue(t),null!=e&&(a+="

    "+e+"%

    "),a},e.Forecast.prototype._getWindValue=function(e,t){var a="";return e=this._getValue(e),t=this._getValue(t),null!=e&&(a+="

    "+e+"

    "),a},e.Forecast.prototype._getSunriseSunset=function(e,t){var a="";return""!=e&&(a="
    "+e+"
    "),""!=t&&(a=a+"
    "+t+"
    "),a},e.Forecast.prototype._getValue=function(e){return this._hasValue(e)?e:null},e.Forecast.prototype._getValueWithUnits=function(e,t,a){return this._hasValue(e)?e+(a=null!=a?a:"")+(t=null!=t&&""!=t?" "+t:""):null},e.Forecast.prototype._hasValue=function(e){var t=!1;return null!=e&&null!=e&&(t=!0),t},e.Forecast.prototype._getPercentage=function(e){return null!=e&&null!=e?e+"%":e},e.Forecast.prototype._getTempValueWithDegress=function(e){return null!=e&&null!=e?e+"°":e},e.Forecast.prototype._getHumidityValueWithPercentSign=function(e){return null!=e&&null!=e?e+"%":e},e.Forecast.prototype._getIconURL=function(e){if(null!=e&&null!=e)return"/images/Updated/"+(e=e.replace("cc-",""))+".svg"},e.Forecast.prototype._getAriaLabel=function(e){return e.replace(/-/g," ")},e.Forecast.prototype._getDisplayUnit=function(e){var t="";return null!=this.unitsDisplay&&null!=this.unitsDisplay[e]&&(t=this.unitsDisplay[e]),t},e.Forecast.prototype._isTime24HourFormat=function(){let t=!1;return t="12"!==e.user.userTimeUnits(),t},e.Forecast.prototype._displayBlending=function(e){if(null!=e.debug.blender_log&&null!=e.debug.blender_log){for(var a="",i=0;i"+e.debug.blender_log[i]+"

    ";t("#blending-debug").empty().append(a).show()}else t("#blending-debug").hide()},e.Forecast.prototype._formatPrecipAccum=function(t,a,i){return e.PrecipValue.isTrace(t,i._getDisplayUnit(a))?"Trace":i._getValueWithUnits(e.PrecipValue.round(t,i._getDisplayUnit(a)),i._getDisplayUnit(a))},e.Forecast.prototype.changeLocation=function(){null!=this.rapidWindHelper&&this.rapidWindHelper.reset()},e.Forecast.TEMP_UNIT="units_temp",e.Forecast.WIND_UNIT="units_wind",e.Forecast.PRECIP_UNIT="units_precip",e.Forecast.PRESSURE_UNIT="units_pressure",e.Forecast.DISTANCE_UNIT="units_distance",e.Forecast.BRIGHTNESS_UNIT="units_brightness",e.Forecast.SOLAR_RADIATION_UNIT="units_solar_radiation",e.Forecast.AIR_DENSITY_UNIT="units_air_density"}(window.SWD=window.SWD||{},jQuery),String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if((e=+e)!=e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e==1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0==t.length||0==e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var a=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+=t.substring(0,a-t.length)}),function(e,t){e.DropDown=function(e){this._refreshInterval=9e5,this._lastAPICall=0,this._timeout=null,this.settings=t.extend({},{locationId:null,locationType:null,isArbitrary:!1,isDashboard:!1,isMap:!1,changeLocationData:null,showSearchLocation:null,getLocationlist:null,changeView:null,closeList:null,deleteLocation:null},e),this._init()},e.DropDown.prototype._init=function(){const t=e.Storage.getLocalObject("lastViewed");("arbitrary"==this.settings.locationType||t.isArbitrary)&&(this.settings.isArbitrary=!0),this.addEvents(),this.addSearchEvents(),this.initArbView(),this._watchForOpen()},e.DropDown.prototype._watchForOpen=function(){const e=this,t=document.getElementById("locations-list");t&&new MutationObserver((function(a){a.forEach(a=>{"attributes"===a.type&&"class"===a.attributeName&&t.classList.contains("show")&&e._maybeRefresh()})})).observe(t,{attributes:!0})},e.DropDown.prototype._maybeRefresh=function(){const e=Date.now();0!==this._lastAPICall&&e-this._lastAPICall0))return"function"==typeof a.settings.changeLocationData&&a.settings.changeLocationData(a.settings.locationId),"function"==typeof a.settings.closeList&&a.settings.closeList(!0),!1})),t(".hdr-menu").on("click",".arb-delete-btn",(function(e){e.stopPropagation(),e.preventDefault();const a=t(this).closest(".location-list-item").attr("data-id");t(".delete-arb-location[data-id='"+a+"']").removeClass("sr-only")})),t(".hdr-menu").on("click",".delete-arb-location",(function(e){e.stopPropagation(),e.preventDefault();const i=t(this).attr("data-id");"function"==typeof a.settings.deleteLocation&&a.settings.deleteLocation(i),t(this).addClass("sr-only")})),t(".dd-item").on("mouseenter",(function(){t(this).find(".arb-delete-btn").css("visibility","visible")})).on("mouseleave",(function(){const e=t(this).attr("data-id");t(this).find(".arb-delete-btn").css("visibility","hidden"),t(".delete-arb-location[data-id='"+e+"']").addClass("sr-only")}))},e.DropDown.prototype.addSearchEvents=function(){const a=this;t("input[type='text']").keyup("#search-bar",(function(i){if(38!=i.which&&40!=i.which)if(13==i.which){const n=t("#arb-location-list").find("#arb-location-item.highlight").attr("data-key"),r=t("#arb-location-list").find("#arb-location-item.highlight").text();t("body").removeClass("arb-grid");let s=e.mgr.getState();if(s.view="",e.mgr.setState(s),null!=n&&""!=r&&"function"==typeof a.settings.deleteLocation){const e={key:n};a.settings.showSearchLocation(e,r)}else i.preventDefault()}else a.settings.getLocationList()})),t("input[type='text']").keyup("#search-bar",(function(e){38!=e.which&&40!=e.which&&(t("#search-bar").val()?t(".search-close").show():t(".search-close").hide(),8==e.which&&""==!t("#search-bar").val()&&a.settings.getLocationList(),27==e.which&&(t("#search-bar").val(""),t(".search-close").hide(),a.settings.closeList()))})),t(".search-close").on("click touchend",(function(){return t("body").hasClass("temp-view")||a.settings.closeList(),t("#search-bar").val(""),t(".search-close").hide(),!1})),t("body").on("click touchend","#arb-location-item",(function(){let i=e.mgr.getState();i.view="",e.mgr.setState(i);const n=t(this).attr("data-key"),r=t(this).find(".search-location-name").text(),s={key:n};t("#arb-location-list>#arb-location-item.highlight").removeClass("highlight"),t("body").removeClass("arb-grid"),t(this,"arb-location-item").addClass("highlight"),"function"==typeof a.settings.deleteLocation&&a.settings.showSearchLocation(s,r)}))},e.DropDown.prototype.initStationListConditions=async function(){const a=t("#station-location-list").children(),i=this;for(var n=0;nthis.initStationListConditions(),e)},e.DropDown.prototype.destroyTimeout=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}}(window.SWD=window.SWD||{},jQuery);let map=null,locations=null,locationId=null,userSignedIn=null,userCoords=null,stateMgr=null,arbitrayLocations=null,stationLocations=null,radarMap=null,stationsMap=null,userTheme=null,isArbitrary=!1,dropdown=null;const darkModeStyles=SWD.DarkModeMapStyles,lightModeStyles=[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}];function attachEventHandlers(){$(".map-type-options").on("click",".map-option",(function(){const e=$(this).attr("data-map-type");if(map.setMapTypeId(google.maps.MapTypeId[e.toUpperCase()]),stateMgr.setMapType(e),$(".map-type-options .map-option").removeClass("selected"),$(this).addClass("selected"),"hybrid"!==e){const e="dark"===userTheme?darkModeStyles:lightModeStyles;map.setOptions({styles:e})}else map.setOptions({styles:lightModeStyles})})),$(".map-overlay-options").on("click",".overlay-option",(function(){const e=$(this).attr("data-overlay-type");"map"===e?($(".swd-map__overlay-type h3").html(SWD.user.localize("MapSettingsTitleTempestStations")),initStations(),null!=stateMgr.clickedMarkerId()?toggleStationDetail(stateMgr.clickedMarkerId()):toggleStationDetail(stateMgr.LocationId())):"radar"===e&&$("body").hasClass("signed-in")&&($(".swd-map__overlay-type h3").html(SWD.user.localize("MapSettingsTitleRadar")),initRadar()),$(".map-overlay-options .overlay-option").removeClass("selected"),$(this).addClass("selected")})),$(".toggle-zoom-control").on("change",(function(){$(this).is(":checked")?(stateMgr.setZoom(!0),$(".swd-map__zoom-controls").show()):(stateMgr.setZoom(!1),$(".swd-map__zoom-controls").hide())})),$(".toggle-legend").on("change",(function(){$(this).is(":checked")?(stateMgr.setLegend(!0),$("#toggle-legend").show()):(stateMgr.setLegend(!1),$("#toggle-legend").hide(),$(".radar-legend").hide())})),$("#overlayButton .swd-map__type-control-overlay").on("click",(function(){toggleModal("#overlayModal.modal","#settingsModal.modal")})),$("#settingsButton .swd-map__type-control").on("click",(function(){toggleModal("#settingsModal.modal","#overlayModal.modal")})),$(".swd-map__overlay-type").on("click",(function(){toggleModal("#overlayModal.modal","#settingsModal.modal")})),$(".close-btn").on("click",(function(){$(".modal").removeClass("open")})),$("#current-location").on("click touchend",(function(){if(userSignedIn)return $("#locations-list").toggleClass("show"),!1}))}function loadState(e){let t=getMapCoordinates(e);const a=null!=e.map.zoom?e.map.zoom:8,i=e.map.mapType||"roadmap";let n=e.tab===SWD.StateManager.TAB_RADAR?"radar":"map";$("html").hasClass("dark")?updateMapStyle("dark"):$("html").hasClass("light")&&updateMapStyle("light"),updateUIState({overlayType:n,mapType:e.map.mapType,showZoom:e.map.showZoom,showLegend:e.map.showLegend}),initMap(t,a,i),"radar"===n&&$("body").hasClass("signed-in")?initRadar():"map"===n&&(initStations(),null!=e.map.clickedMarkerId?toggleStationDetail(e.map.clickedMarkerId):toggleStationDetail(e.locationId))}function getMapCoordinates(e){if(locations.userOwnsStation()){const{lat:e,lon:t}=locations.getCoordinatesForCurrentLocation()||{};if(null!=e&&null!=t)return{lat:e,lng:t}}return null!=e.map.lat&&null!=e.map.lon?{lat:e.map.lat,lng:e.map.lon}:null!=userCoords&&null!=userCoords.lat&&null!=userCoords.lon?{lat:userCoords.lat,lng:userCoords.lon}:{lat:40.7127,lng:-74.0059}}function setLocationsHeader(){if(userSignedIn){var e="",t=locations.userOwnsStation()?"":" - Tempest by WeatherFlow";if($("#current-location").html(SWD.sanitizeForHTML(locations.getNameForCurrentLocation())+t),!$("#shared-location").length>0){var a=locations.getLocationList(),i=locations.getArbitraryLocationList();if(a.length>0){e+="

    "+SWD.user.localize("GeneralTitleStations")+"

    ";for(var n=0;n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t

    ${r.name}

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t`}}if(i.length>0){e+="

    "+SWD.user.localize("GeneralTitleLocations")+"

    ";for(var s=0;s\n\t\t\t\t\t\t\t\x3c!-- Delete button is always accessible to screen readers --\x3e\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    ${o.name}

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

    \n\n\t\t\t\t\t\t\t\t\x3c!-- Ellipsis button for sighted users, hidden to screen readers --\x3e\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t`}}$("#station-location-list").append(e),initDropDown()}}else $("#current-location").html(SWD.user.localize("GeneralTitleStationMap"))}function initDropDown(){var e=locations.getCurrentLocationId();dropdown=new SWD.DropDown({locationId:e,isMap:!0,changeLocationData:function(e){changeLocation(e)},closeList:function(e){closeLocationList(e)},deleteLocation:function(e){deleteLocation(e)}})}function initMap(e,t,a){const i=window.matchMedia("(prefers-color-scheme: dark)").matches;let n="dark"===(userTheme||(i?"dark":"light"))?darkModeStyles:lightModeStyles;"hybrid"===a.toLowerCase()&&(n=lightModeStyles),map=new google.maps.Map(document.getElementById("station-map"),{zoom:t,center:e,zoomControl:!1,disableDefaultUI:!0,mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,mapTypeId:google.maps.MapTypeId[a.toUpperCase()],minZoom:3,panControl:!1,rotateControl:!1,styles:n,tilt:0,restriction:{latLngBounds:{north:80,south:-80,east:180,west:-180},strictBounds:!0}})}function initRadar(){clearOverlays("stations"),$("body").removeClass("stations").addClass("radar"),stateMgr.setOverlayType("radar"),stateMgr.setLocationId(null,!1),map&&map.setOptions({maxZoom:13}),null===radarMap&&(radarMap=new SWD.RadarMap({map:map,arbitrayLocations:arbitrayLocations,stationLocations:stationLocations,stateMgr:stateMgr}))}function initStations(){clearOverlays("radar"),$("body").removeClass("radar").addClass("stations"),stateMgr.setOverlayType("map"),map&&map.setOptions({maxZoom:20}),null===stationsMap&&(stationsMap=new SWD.StationsMap({map:map,stateMgr:stateMgr}))}function getLocationIdToSelect(){var e=null;if(null!=stateMgr.LocationId())e=stateMgr.LocationId();else if(userSignedIn&&null!=SWD.user.userCurrentLocation())e=SWD.user.userCurrentLocation();else if(null!=SWD.Storage.getSessionItem("sharedStationId"))return SWD.Storage.getSessionItem("sharedStationId");return e}function clearOverlays(e){radarMap&&"radar"===e&&(radarMap.destroy(),radarMap=null),stationsMap&&"stations"===e&&(stateMgr.setClickedMarkerId(null),stationsMap.destroy(),stationsMap=null)}function updateUIState(e){null===e.mapType&&stateMgr.setMapType("roadmap"),$(".map-type-options .map-option").removeClass("selected"),$(".map-type-options .map-option[data-map-type='"+e.mapType+"']").addClass("selected"),$(".map-overlay-options .overlay-option").removeClass("selected"),$(".map-overlay-options .overlay-option[data-overlay-type='"+e.overlayType+"']").addClass("selected"),"radar"===e.overlayType?$(".swd-map__overlay-type h3").html(SWD.user.localize("MapSettingsTitleRadar")):"map"===e.overlayType&&$(".swd-map__overlay-type h3").html(SWD.user.localize("MapSettingsTitleTempestStations")),$(".toggle-zoom-control").prop("checked",e.showZoom),$(".toggle-legend").prop("checked",e.showLegend),e.showZoom?$(".swd-map__zoom-controls").show():$(".swd-map__zoom-controls").hide(),e.showLegend?$("#toggle-legend").show():($("#toggle-legend").hide(),$(".radar-legend").hide())}function updateMapStyle(e){userTheme="system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,"dark"===userTheme?($("#mapSettingsMap").attr("src","/images/mapSettingsMapDark.png"),$("#tempestStationThumbnail").attr("src","/images/tempestStationThumbnailDark.png"),$("#radarThumbnail").attr("src","/images/radarThumbnailDark.png")):"light"===userTheme&&($("#mapSettingsMap").attr("src","/images/mapSettingsMapLight.png"),$("#tempestStationThumbnail").attr("src","/images/tempestStationThumbnailLight.png"),$("#radarThumbnail").attr("src","/images/radarThumbnailLight.png"));const t="dark"===userTheme?darkModeStyles:lightModeStyles;map&&map.setOptions({styles:t}),stateMgr.setTheme(e)}function toggleModal(e,t){$(e).hasClass("open")?$(e).removeClass("open"):(t&&$(t).removeClass("open"),$(e).addClass("open"))}function deleteLocation(e){1==confirm(SWD.user.localize("LocationListMessageDeleteConfirm"))?SWD.makeDeleteRequestWithoutParams("arbitrary_locations/"+e+"/",(function(t){alert(SWD.user.localize("LocationListMessageDeleteSuccess"));var a=window.location.origin,i=locations.getCurrentLocationId(),n=locations.getLocationIdToLoad();i==e?window.location=a+`/map/${n}`:window.location.reload()})):$(".delete-arb-location[data-id='"+e+"']").removeClass("sr-only")}function changeLocation(e){locations.setLocationId(e);const t=locations.getCoordinatesForCurrentLocation(),a=locations.getNameForCurrentLocation();$("#current-location").html(a),stateMgr.setLocationId(e),toggleStationDetail(e),map.panTo({lat:t.lat,lng:t.lon})}function toggleStationDetail(e){isArbitrary=SWD.user.isCurrentLocationArbitrary(),null!==stationsMap&&(null!=e&&!1===isArbitrary?stationsMap.displayStationDetail(e):stationsMap.closeStationDetailPanel())}function closeLocationList(e){e&&$("#locations-list").removeClass("show")}$(document).ready((function(){SWD.analytics=new SWD.Analytics,SWD.analytics.setPage("/radar.html"),stateMgr=new SWD.StateManager({stateChanged:function(e){loadState(e)}}),SWD.user=new SWD.SWUser({userSignedIn:function(){userSignedIn=!0},ready:function(){locationId=getLocationIdToSelect(),locations=new SWD.Locations({locationId:locationId,userSignedIn:userSignedIn,locationsLoaded:async function(){if(userSignedIn){userCoords=locations.getCoordinatesForCurrentLocation(),isArbitrary=SWD.user.isCurrentLocationArbitrary();const e=await locations.getLocationsList();arbitrayLocations=e.arbitrary_locations,stationLocations=e.locations,locations.userOwnsStation()||($("body").attr("id","shared-location"),$("#my-station").attr("href","/map")),$("#radarOverlay").removeClass("hidden")}else $("body").attr("id","shared-location"),stateMgr.setOverlayType("map");stateMgr.setLocationId(locationId,isArbitrary),loadState(stateMgr.getState()),setLocationsHeader()}}),$("body").hasClass("signed-in")||$("#station-upsale").css("display","flex")}}),attachEventHandlers()})); //# sourceMappingURL=../../sourcemaps/js/map-d6a513dc8b.min.js.map