"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2172],{26597:function(e,t,a){var n=a(12739),r=a(41376),i=a(75469),o=a(42010),s=a(54354),l=a(65322),p=a(31998),c=a(95783),u=a(12810),d=new r.Z({layers:[new o.Z({source:new p.Z({attributions:'© MapTiler © OpenStreetMap contributors',url:"https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=get_your_own_D6rA4zTHduk6KOKTXzGB",tileSize:512})})],target:document.getElementById("map"),view:new s.ZP({center:[0,4e6],zoom:2})}),f=new c.Z({features:[],attributions:"National UFO Reporting Center"}),g={variables:{filterShape:"all"},filter:["case",["!=",["var","filterShape"],"all"],["==",["get","shape"],["var","filterShape"]],!0],symbol:{symbolType:"image",src:"data/ufo_shapes.png",size:16,color:["interpolate",["linear"],["get","year"],1950,[255,160,110],2013,[180,255,200]],rotateWithView:!1,offset:[0,0],textureCoord:["match",["get","shape"],"light",[0,0,.25,.5],"sphere",[.25,0,.5,.5],"circle",[.25,0,.5,.5],"disc",[.5,0,.75,.5],"oval",[.5,0,.75,.5],"triangle",[.75,0,1,.5],"fireball",[0,.5,.25,1],[.75,.5,1,1]]}},h={all:0},m=document.getElementById("shape-filter");m.addEventListener("input",(function(){g.variables.filterShape=m.options[m.selectedIndex].value,d.render()}));var v=new XMLHttpRequest;v.open("GET","data/csv/ufo_sighting_data.csv"),v.onload=function(){for(var e,t=v.responseText,a=[],r=t.indexOf("\n")+1;-1!=(e=t.indexOf("\n",r));){var o=t.substr(r,e-r).split(",");r=e+1;var s=(0,u.mi)([parseFloat(o[5]),parseFloat(o[4])]);if(!isNaN(s[0])&&!isNaN(s[1])){var l=o[2];h[l]=(h[l]?h[l]:0)+1,h.all++,a.push(new n.Z({datetime:o[0],year:parseInt(/[0-9]{4}/.exec(o[0])[0]),shape:l,duration:o[3],geometry:new i.Z(s)}))}}f.addFeatures(a),Object.keys(h).sort((function(e,t){return h[t]-h[e]})).forEach((function(e){var t=document.createElement("option");t.text="".concat(e," (").concat(h[e]," sightings)"),t.value=e,m.appendChild(t)}))},v.send(),d.addLayer(new l.Z({source:f,style:g}));var w=document.getElementById("info");d.on("pointermove",(function(e){if(!d.getView().getInteracting()&&!d.getView().getAnimating()){var t=e.pixel;w.innerText="",d.forEachFeatureAtPixel(t,(function(e){var t=e.get("datetime"),a=e.get("duration"),n=e.get("shape");w.innerText="On "+t+", lasted "+a+' seconds and had a "'+n+'" shape.'}))}}))}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(26597)}]);
//# sourceMappingURL=icon-sprite-webgl.js.map