2023-12-19 23:46:00 -06:00
|
|
|
(()=>{"use strict";var e={407:(e,t,n)=>{var s=n(929),r=n(739),a=n(523),i=n(594);document.addEventListener("DOMContentLoaded",(()=>{d()}));const o=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(","),l="#txtAddress",c="#ToggleFullScreen",u="#btnGetGps",d=()=>{document.querySelector(l).addEventListener("focus",(e=>{e.target.select()})),(0,a.uL)(w),document.querySelector("#NavigateMenu").addEventListener("click",p),document.querySelector("#NavigateRefresh").addEventListener("click",S),document.querySelector("#NavigateNext").addEventListener("click",b),document.querySelector("#NavigatePrevious").addEventListener("click",C),document.querySelector("#NavigatePlay").addEventListener("click",D),document.querySelector(c).addEventListener("click",f);const e=document.querySelector(u);e.addEventListener("click",L),navigator.geolocation||(e.style.display="none"),document.querySelector("#divTwc").addEventListener("click",(()=>{document.fullscreenElement&&x()})),document.querySelector(l).addEventListener("keydown",(e=>{"Enter"===e.code&&t()})),document.querySelector("#btnGetLatLng").addEventListener("click",(()=>t())),document.addEventListener("keydown",k),document.addEventListener("touchmove",(e=>{document.fullscreenElement&&e.preventDefault()})),$(l).devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:o,maxSuggestions:10},dataType:"json",transformResult:e=>({suggestions:e.suggestions.map((e=>({value:e.text,data:e.magicKey})))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect(e){h(e,this)},width:490});const t=()=>{const e=$(l).devbridgeAutocomplete();return e.suggestions[0]&&$(e.suggestionsContainer.children[0]).trigger("click"),!1},n=localStorage.getItem("latLonQuery"),s=localStorage.getItem("latLon"),r=localStorage.getItem("latLonFromGPS");if(n&&s&&!r){document.querySelector(l).value=n,w(JSON.parse(s))}r&&L();const i=localStorage.getItem("play");null!==i&&"true"!==i||M("navButton","play"),document.querySelector("#btnClearQuery").addEventListener("click",(()=>{document.querySelector("#spanCity").innerHTML="",document.querySelector("#spanState").innerHTML="",document.querySelector("#spanStationId").innerHTML="",document.querySelector("#spanRadarId").innerHTML="",document.querySelector("#spanZoneId").innerHTML="",document.querySelector("#chkAutoRefresh").checked=!0,localStorage.removeItem("autoRefresh"),localStorage.removeItem("play"),M("navButton","play"),localStorage.removeItem("latLonQuery"),localStorage.removeItem("latLon"),localStorage.removeItem("latLonFromGPS"),document.querySelector(u).classList.remove("active")})),document.querySelector("#container").addEventListener("swiped-left",(()=>v("left"))),document.querySelector("#container").addEventListener("swiped-right",(()=>v("right")))},h=async(e,t)=>{if(t.previousSuggestionValue===e.value)return;const n=(await(0,s.AV)("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:e.value,magicKey:e.data,f:"json"}})).locations[0];n?(localStorage.removeItem("latLonFromGPS"),document.querySelector(u).classList.remove("active"),m(n.feature.geometry)):console.error("An unexpected error occurred. Please try a different search string.")},m=(e,t)=>{const n={lat:(0,i.Xp)(e.y,4),lon:(0,i.Xp)(e.x,4)};localStorage.setItem("latLonQuery",document.querySelector(l).value),localStorage.setItem("latLon",JSON.stringify(n)),w(n,t)},f=()=>(document.fullscreenElement?y():g(),(0,a.yA)()?(0,r.Z)(!0):(0,r.Z)(!1),x(),!1),
|