text: parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"d6sW":[function(require,module,exports) {
  var t=new Date,n=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),e=t.getFullYear();t=a+"/"+n+"/"+e;var c=document.querySelector(".top-banner form"),o=document.querySelector(".top-banner input"),i=document.querySelector(".top-banner .msg"),r=document.querySelector(".ajax-section .cities"),s="4d8fb5b93d4af21d66a2948710284366";c.addEventListener("submit",function(n){n.preventDefault();var a=o.value,e="https://api.openweathermap.org/data/2.5/weather?q=".concat(a,"&appid=").concat(s,"&units=metric");fetch(e).then(function(t){return t.json()}).then(function(n){var a=n.main,e=n.name,c=n.sys,o=n.weather,i="https://openweathermap.org/img/wn/".concat(o[0].icon,"@2x.png"),s=document.createElement("li");s.classList.add("city");var p='\n        <h2 class="city-name" data-name="'.concat(e,",").concat(c.country,'">\n          <span>').concat(t,"</span>\n          <span>").concat(e,"</span>\n          <sup>").concat(c.country,'</sup>\n        </h2>\n        <div class="city-temp">').concat(Math.round(a.temp),"<sup>°C</sup></div>\n          <span>Humidity ").concat(a.humidity,'<span>\n        <figure>\n          <img class="city-icon" src=').concat(i," alt=").concat(o[0].main,">\n          <figcaption>").concat(o[0].description,"</figcaption>\n        </figure>\n      ");s.innerHTML=p,r.appendChild(s)}).catch(function(){i.textContent="Please search for a valid city 😩"}),i.textContent="",c.reset(),o.focus()});
  },{}]},{},["d6sW"], null)
  //# sourceMappingURL=/main.79157a22.js.map