UNPKG

test-weather-fork

Version:
2 lines 122 kB
/*! For license information please see ReactWeather.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("ReactWeather",["react"],t):"object"==typeof exports?exports.ReactWeather=t(require("react")):e.ReactWeather=t(e.react)}(self,(function(e){return(()=>{var t={7228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},2858:e=>{e.exports=function(e){if(Array.isArray(e))return e}},8926:e=>{function t(e,t,r,n,o,i,s){try{var a=e[i](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var s=e.apply(r,n);function a(e){t(s,o,i,a,u,"next",e)}function u(e){t(s,o,i,a,u,"throw",e)}a(void 0)}))}}},3884:e=>{e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},3038:(e,t,r)=>{var n=r(2858),o=r(3884),i=r(379),s=r(521);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||s()}},379:(e,t,r)=>{var n=r(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},1553:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),s=new H(n||[]);return i._invoke=function(e,t,r){var n=d;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=L(s,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,s),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",y={};function m(){}function v(){}function g(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,q=w&&w(w(G([])));q&&q!==r&&n.call(q,i)&&(b=q);var x=g.prototype=m.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,i,s,a){var u=c(e[o],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,a)}))}a(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function L(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=c(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function G(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}return{next:R}}function R(){return{value:t,done:!0}}return v.prototype=x.constructor=g,g.constructor=v,v.displayName=u(g,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,a,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},j(S.prototype),S.prototype[s]=function(){return this},e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var s=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},j(x),u(x,a,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=G,H.prototype={constructor:H,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(u&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},7757:(e,t,r)=>{e.exports=r(1553)},9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var n=r(4867),o=r(6026),i=r(4372),s=r(5327),a=r(4097),u=r(4109),l=r(7985),c=r(5061);e.exports=function(e){return new Promise((function(t,r){var d=e.data,f=e.headers;n.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(p+":"+y)}var m=a(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),s(m,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h};o(t,r,i),h=null}},h.onabort=function(){h&&(r(c("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){r(c("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(c(t,e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var v=(e.withCredentials||l(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;v&&(f[e.xsrfHeaderName]=v)}if("setRequestHeader"in h&&n.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),r(e),h=null)})),d||(d=null),h.send(d)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),o=r(1849),i=r(321),s=r(7185);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(5655));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(5263),u.CancelToken=r(4972),u.isCancel=r(8085),u.all=function(e){return Promise.all(e)},u.spread=r(8713),u.isAxiosError=r(6268),e.exports=u,e.exports.default=u},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},8085:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),o=r(5327),i=r(782),s=r(3572),a=r(7185);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},u.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=u},782:(e,t,r)=>{"use strict";var n=r(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,r)=>{"use strict";var n=r(1793),o=r(7303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},3572:(e,t,r)=>{"use strict";var n=r(4867),o=r(8527),i=r(8085),s=r(5655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function l(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,l),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var c=o.concat(i).concat(s).concat(a),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return n.forEach(d,l),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),o=r(6016),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(a=r(5448)),a),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4867:(e,t,r)=>{"use strict";var n=r(1849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:l,isStream:function(e){return a(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},3762:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n,o=r(9297),i=r.n(o),s=r(5697),a=r.n(s),u=r(9912),l=r(9952);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var c=function(e){var t=e.unitsLabels,r=e.forecast,n=e.theme,o=(0,l.Z)({theme:n});return i().createElement("div",{className:o.daysPanel},r.map((function(e,r){return r>0?i().createElement("div",{key:e.date,className:o.day},i().createElement("div",{className:o.date},e.date),i().createElement("div",{className:o.icon},i().createElement(u.Z,{path:e.icon,title:e.description,color:n.forecastIconColor})),i().createElement("div",{className:o.desc},e.description),i().createElement("div",{className:o.range},e.temperature.max," / ",e.temperature.min," ",t.temperature)):""})))};("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(c,"useStyles{classes}",(function(){return[l.Z]})),c.propTypes={unitsLabels:a().object.isRequired,forecast:a().array.isRequired,theme:a().object.isRequired};var d=c;const f=d;var h,p;(h="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(h.register(c,"Forecast","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Forecast.js"),h.register(d,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Forecast.js")),(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&p(e)},9952:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n,o=r(3532);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=(0,o.QM)({daysPanel:{clear:"both",display:"flex",borderLeft:function(e){var t=e.theme;return"solid 1px #".concat(t.forecastBackgroundColor)},borderRight:function(e){var t=e.theme;return"solid 1px #".concat(t.forecastBackgroundColor)},borderBottom:function(e){var t=e.theme;return"solid 1px #".concat(t.forecastBackgroundColor)},borderRadius:"0 0 5px 5px",fontSize:11,backgroundColor:function(e){return e.theme.forecastBackgroundColor}},day:{width:"25%",textAlign:"center",margin:10,"&:not(:first-child)":{borderLeft:function(e){var t=e.theme;return"solid 1px ".concat(t.forecastSeparatorColor)}}},date:{color:function(e){return e.theme.forecastDateColor},fontSize:11,fontWeight:"bold"},desc:{color:function(e){return e.theme.forecastDescColor},margin:[10,0,10,0],fontSize:12},range:{color:function(e){return e.theme.forecastRangeColor},fontSize:11},icon:{paddingTop:10}}),s=i;const a=s;var u,l;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(i,"useStyles","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Forecast.styles.js"),u.register(s,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Forecast.styles.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},6528:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n,o=r(9297),i=r.n(o),s=r(5697),a=r.n(s),u=r(1407),l=r(3762),c=r(9912),d=r(543),f=r(2139);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var h=function(e){var t=e.unitsLabels,r=e.showForecast,n=e.lang,o=e.data,s=e.locationLabel,a=e.isLoading,f=e.errorMessage,h=e.theme;if(o){var p=(0,d.Z)({showForecast:r,theme:h}),y=o.forecast,m=o.current;return i().createElement("div",{className:p.container},i().createElement("div",{className:p.main},i().createElement("div",{className:p.left},i().createElement("h2",{className:p.header},s),i().createElement(u.Z,{current:m,unitsLabels:t,lang:n,theme:h})),i().createElement("div",{className:p.right},i().createElement(c.Z,{path:m.icon,size:120,color:h.todayIconColor,title:m.description}))),r&&i().createElement(l.Z,{unitsLabels:t,forecast:y,lang:n,theme:h}))}return a?i().createElement("div",null,"Loading..."):f?i().createElement("div",null,f):null};("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(h,"useStyles{classes}",(function(){return[d.Z]})),h.propTypes={data:a().object,isLoading:a().bool,errorMessage:a().string,unitsLabels:a().object,showForecast:a().bool,lang:a().string,locationLabel:a().string,theme:a().object},h.defaultProps={data:null,locationLabel:"",errorMessage:null,isLoading:!1,unitsLabels:{temperature:"C",windSpeed:"Km/h"},showForecast:!0,lang:"en",theme:f.Z};var p=h;const y=p;var m,v;(m="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(m.register(h,"ReactWeather","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/ReactWeather.js"),m.register(p,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/ReactWeather.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},543:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n,o=r(3532);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=(0,o.QM)({container:{fontFamily:function(e){return e.theme.fontFamily},fontSize:13,boxShadow:function(e){return e.theme.containerDropShadow},borderRadius:"0 0 5px 5px"},main:{color:function(e){return e.theme.locationFontColor},width:"100%",height:"100%",background:function(e){var t=e.theme;return"linear-gradient(to bottom right, ".concat(t.gradientStart,", ").concat(t.gradientMid,", ").concat(t.gradientEnd,")")},display:"flex"},header:{margin:[0,0,10,0],fontWeight:"300",fontSize:"small",letterSpacing:2},left:{padding:25,width:"60%"},right:{backgroundColor:"rgba(0,0,0,0.1)",width:"40%",display:"flex",alignItems:"center",justifyContent:"center"}}),s=i;const a=s;var u,l;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(i,"useStyles","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/ReactWeather.styles.js"),u.register(s,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/ReactWeather.styles.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},1407:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n,o=r(9297),i=r.n(o),s=r(5697),a=r.n(s),u=r(4624),l=r(386);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var c=function(e){var t=e.current,r=e.unitsLabels,n=e.lang,o=e.theme,s=(0,l.Z)({theme:o}),a=(0,u.E)(n),c=void 0!==t.temperature.min&&void 0!==t.temperature.max;return i().createElement("div",{className:"rw-today"},i().createElement("div",{className:s.date},t.date),i().createElement("div",{className:s.hr}),i().createElement("div",{className:s.current},t.temperature.current," ",r.temperature),c&&i().createElement("div",{className:s.range},t.temperature.max," / ",t.temperature.min," ",r.temperature),i().createElement("div",{className:s.desc},t.description),i().createElement("div",{className:s.hr}),i().createElement("div",{className:s.info},i().createElement("div",null,a.wind,": ",i().createElement("b",null,t.wind)," ",r.windSpeed),i().createElement("div",null,a.humidity,": ",i().createElement("b",null,t.humidity)," %")))};("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(c,"useStyles{classes}",(function(){return[l.Z]})),c.propTypes={current:a().object.isRequired,unitsLabels:a().object.isRequired,lang:a().string.isRequired,theme:a().object.isRequired};var d=c;const f=d;var h,p;(h="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(h.register(c,"Today","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Today.js"),h.register(d,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Today.js")),(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&p(e)},386:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n,o=r(3532);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=(0,o.QM)({date:{color:function(e){return e.theme.todayDateFontColor}},current:{fontSize:35,color:function(e){return e.theme.todayTempFontColor}},range:{color:function(e){return e.theme.todayRangeFontColor},fontSize:12,margin:[0,0,5,2]},desc:{color:function(e){return e.theme.todayDescFontColor},fontSize:16},info:{color:function(e){return e.theme.todayInfoFontColor},"& div":{marginBottom:5}},hr:{width:"100%",height:0,borderBottom:"solid 1px #fff",opacity:"0.4",margin:[10,0]}}),s=i;const a=s;var u,l;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(i,"useStyles","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Today.styles.js"),u.register(s,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/Today.styles.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},9912:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n,o=r(9297),i=r.n(o),s=r(3532),a=r(5697),u=r.n(a);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},c=(0,s.QM)({svg:{fill:function(e){return e.color}}}),d=function(e){var t=e.title,r=e.path,n=e.size,o=e.viewBox,s=e.color,a=c({color:s});return i().createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:o,className:a.svg},i().createElement("title",null,t),i().createElement("path",{d:r}))};l(d,"useStyles{classes}",(function(){return[c]})),d.propTypes={path:u().string.isRequired,title:u().string.isRequired,viewBox:u().string,color:u().string,size:u().number},d.defaultProps={color:"#4BC4F7",size:40,viewBox:"0 0 35 40"};var f=d;const h=f;var p,y;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(c,"useStyles","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/WeatherIcon.js"),p.register(d,"WeatherIcon","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/WeatherIcon.js"),p.register(f,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/components/WeatherIcon.js")),(y="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&y(e)},2139:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>i}),e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o={fontFamily:"Helvetica, sans-serif",gradientStart:"#0181C2",gradientMid:"#04A7F9",gradientEnd:"#4BC4F7",locationFontColor:"#FFF",todayTempFontColor:"#FFF",todayDateFontColor:"#B5DEF4",todayRangeFontColor:"#B5DEF4",todayDescFontColor:"#B5DEF4",todayInfoFontColor:"#B5DEF4",todayIconColor:"#FFF",forecastBackgroundColor:"#FFF",forecastSeparatorColor:"#DDD",forecastDateColor:"#777",forecastDescColor:"#777",forecastRangeColor:"#777",forecastIconColor:"#4BC4F7",containerDropShadow:"0px 3px 6px 0px rgba(50, 50, 50, 0.5)"};const i=o;var s,a;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&s.register(o,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/defaultTheme.js"),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&a(e)},4126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u,useOpenWeather:()=>i.ZP,useWeatherBit:()=>s.ZP});var n,o=r(6528),i=r(6502),s=r(4015);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var a=o.Z;const u=a;var l,c;(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&l.register(a,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/index.js"),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},6751:(e,t,r)=>{"use strict";var n;r.d(t,{I:()=>s}),e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o,i,s={en:{wind:"Wind",humidity:"Humidity"},es:{wind:"Viento",humidity:"Humedad"},zh_tw:{wind:"風速",humidity:"濕度"},de:{wind:"Windstärke",humidity:"Feuchtigkeit"}};(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&o.register(s,"langText","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/lang.js"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},1267:(e,t,r)=>{"use strict";r.d(t,{q:()=>u});var n,o=r(9163);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,s,a={"01d":o.Z.sunny,"02d":o.Z.cloudy,"03d":o.Z.cloudy,"04d":o.Z.cloudy,"09d":o.Z.showers,"10d":o.Z.rain,"11d":o.Z.thunderstorms,"13d":o.Z.windySnow,"50d":o.Z.fog,"01n":o.Z.sunny,"02n":o.Z.cloudy,"03n":o.Z.cloudy,"04n":o.Z.cloudy,"09n":o.Z.showers,"10n":o.Z.rain,"11n":o.Z.thunderstorms,"13n":o.Z.windySnow,"50n":o.Z.fog},u=function(e){return a[e]?a[e]:o.Z.sunny};(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(a,"iconsMap","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/iconsMap.js"),i.register(u,"getIcon","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/iconsMap.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},6502:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>k});var n,o=r(7757),i=r.n(o),s=r(8926),a=r.n(s),u=r(3038),l=r.n(u),c=r(9297),d=r(7484),f=r.n(d),h=r(9669),p=r.n(h),y=r(1267);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var m="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},v=function(e){return e&&f()().isValid(e)?f().unix(e).format("ddd D MMMM"):""},g=function(e,t){return{date:v(e.dt),description:e.weather[0]?e.weather[0].description:null,icon:e.weather[0]&&(0,y.q)(e.weather[0].icon),temperature:{current:e.temp.toFixed(0),min:void 0,max:void 0},wind:e.wind_speed.toFixed(0),humidity:e.humidity}},b=function(e,t){for(var r=[],n=0;n<5;n+=1)r.push({date:v(e[n].dt),description:e[n].weather[0]?e[n].weather[0].description:null,icon:e[n].weather[0]&&(0,y.q)(e[n].weather[0].icon),temperature:{min:e[n].temp.min.toFixed(0),max:e[n].temp.max.toFixed(0)},wind:e[n].wind_speed.toFixed(0),humidity:e[n].humidity});return r},w=function(e,t,r){var n={};if(e&&t){var o=e;n.current=g(t),n.forecast=b(o)}return n},q="SUCCESS",x="FAILURE",j={data:null,isLoading:!0,errorMessage:null},S=function(e,t){var r=t.type,n=t.payload;switch(r){case q:return{data:n,isLoading:!1,errorMessage:null};case x:return{data:null,isLoading:!1,errorMessage:n};default:return e}},L=function(e){var t=(0,c.useReducer)(S,j),r=l()(t,2),n=r[0],o=r[1],s=n.data,u=n.isLoading,d=n.errorMessage,f=e.unit,h=e.lang,y=e.key,m=e.lon,v={appid:y,lang:h,units:f,lat:e.lat,lon:m},g=function(){var e=a()(i().mark((function e(){var t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p().get("//api.openweathermap.org/data/2.5/onecall",{params:v});case 3:t=e.sent,r=w(t.data.daily,t.data.current),o({type:q,payload:r}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0.message),o({type:x,payload:e.t0.message||e.t0});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){g()}),[]),{data:s,isLoading:u,errorMessage:d,fetchData:g}};m(L,"useReducer{[state, dispatch](initialState)}\nuseEffect{}");var M=L;const k=M;var H,G;(H="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(H.register(v,"formatDate","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(g,"mapCurrent","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(b,"mapForecast","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(w,"mapData","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(q,"SUCCESS","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(x,"FAILURE","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(j,"initialState","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(S,"fetchReducer","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(L,"useOpenWeather","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js"),H.register(M,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/openweather/useOpenWeather.js")),(G="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&G(e)},8908:(e,t,r)=>{"use strict";r.d(t,{q:()=>u});var n,o=r(9163);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,s,a={200:o.Z.thunderstorms,201:o.Z.thunderstorms,202:o.Z.thunderstorms,230:o.Z.thunderstorms,231:o.Z.thunderstorms,232:o.Z.thunderstorms,233:o.Z.thunderstorms,300:o.Z.showers,301:o.Z.showers,302:o.Z.showers,500:o.Z.rain,501:o.Z.rain,502:o.Z.rain,511:o.Z.rain,520:o.Z.rain,521:o.Z.showers,522:o.Z.rain,600:o.Z.snow,601:o.Z.snow,602:o.Z.snow,610:o.Z.snow,611:o.Z.sleet,612:o.Z.sleet,621:o.Z.snow,622:o.Z.snow,623:o.Z.snow,700:o.Z.fog,711:o.Z.fog,721:o.Z.fog,731:o.Z.fog,741:o.Z.fog,751:o.Z.fog,800:o.Z.sunny,801:o.Z.cloudy,802:o.Z.cloudy,803:o.Z.cloudy,804:o.Z.cloudy,900:o.Z.cloudy},u=function(e){return a[e]?a[e]:o.Z.sunny};(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(a,"iconsMap","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/iconsMap.js"),i.register(u,"getIcon","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/iconsMap.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},4015:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>k});var n,o=r(7757),i=r.n(o),s=r(8926),a=r.n(s),u=r(3038),l=r.n(u),c=r(9297),d=r(7484),f=r.n(d),h=r(9669),p=r.n(h),y=r(8908);e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e);var m="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},v="SUCCESS",g="FAILURE",b={data:null,isLoading:!1,errorMessage:null},w=function(e,t){var r=t.type,n=t.payload;switch(r){case v:return{data:n,isLoading:!1,errorMessage:null};case g:return{data:null,isLoading:!1,errorMessage:n};default:return e}},q=function(e){return e&&f()().isValid(e)?f()(e).format("ddd D MMMM"):""},x=function(e,t,r){return{date:q(e.datetime),description:e.weather?e.weather.description:null,icon:e.weather&&(0,y.q)(e.weather.code),temperature:{current:t.toFixed(0),min:e.min_temp.toFixed(0),max:e.max_temp.toFixed(0)},wind:e.wind_spd.toFixed(0),humidity:e.rh}},j=function(e,t){for(var r=[],n=0;n<5;n+=1)r.push({date:q(e[n].datetime),description:e[n].weather?e[n].weather.description:null,icon:e[n].weather&&(0,y.q)(e[n].weather.code),temperature:{min:e[n].min_temp.toFixed(0),max:e[n].max_temp.toFixed(0)},wind:e[n].wind_spd.toFixed(0),humidity:e[n].rh});return r},S=function(e,t,r){var n={};if(e&&t){var o=t.temp;n.location=t.city_name,n.forecast=j(e),n.current=x(e[0],o)}return n},L=function(e){var t="https://api.weatherbit.io/v2.0",r="".concat(t,"/forecast/daily"),n="".concat(t,"/current"),o=(0,c.useReducer)(w,b),s=l()(o,2),u=s[0],d=s[1],f=u.data,h=u.isLoading,y=u.errorMessage,m=e.unit,q=e.lang,x={key:e.key,days:5,lang:q,units:m,lon:e.lon,lat:e.lat},j=function(){var e=a()(i().mark((function e(){var t,o,s,a,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p().all([p().get(r,{params:x}),p().get(n,{params:x})]);case 3:t=e.sent,o=l()(t,2),s=o[0],a=o[1],u=S(s.data.data,a.data.data[0]),d({type:v,payload:u}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),d({type:g,payload:e.t0.message||e.t0});case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){j()}),[]),{data:f,isLoading:h,errorMessage:y,fetchData:j}};m(L,"useReducer{[state, dispatch](initialState)}\nuseEffect{}");var M=L;const k=M;var H,G;(H="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(H.register(v,"SUCCESS","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(g,"FAILURE","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(b,"initialState","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(w,"fetchReducer","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(q,"formatDate","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(x,"mapCurrent","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(j,"mapForecast","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(S,"mapData","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(L,"useWeatherBit","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js"),H.register(M,"default","/Users/jbjernin/Documents/GitHub/react-open-weather/src/js/providers/weatherbit/useWeatherBit.js")),(G="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&G(e)},9163:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>s}),e=r.hmd(e),(n="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&n(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o={cloudy:"M0 20.328q0-2.484 1.547-4.414t3.969-2.477q0.641-2.938 2.969-4.805t5.359-1.867q2.953 0 5.273 1.82t3.008 4.664h0.453q2.938 0 5.016 2.070t2.078 5.008-2.078 5.023-5.016 2.086h-15.469q-1.438 0-2.758-0.563t-2.273-1.516-1.516-2.273-0.563-2.758zM2.422 20.328q0 1.906 1.375 3.273t3.313 1.367h15.469q1.938 0 3.313-1.367t1.375-3.273-1.375-3.266-3.313-1.359h-2.313q-0.25 0-0.25-0.25l-0.109-0.813q-0.25-2.359-1.977-3.914t-4.086-1.555-4.102 1.563-1.961 3.906l-0.109 0.703q0 0.25-0.266 0.25l-0.75 0.109q-1.797 0.156-3.016 1.484t-1.219 3.141zM17.172 5.797q-0.25 0.234 0.125 0.344 1.078 0.469 1.797 0.922 0.281 0.078 0.375-0.047 1.516-1.438 3.531-1.438t3.492 1.352 1.648 3.336l0.156 1.063h2.359q1.625 0 2.797 1.164t1.172 2.773q0 1.5-1.031 2.609t-2.547 1.281q-0.25 0-0.25 0.266v1.891q0 0.266 0.25 0.266 2.516-0.156 4.25-1.984t1.734-4.328q0-2.641-1.867-4.508t-4.508-1.867h-0.25q-0.656-2.5-2.742-4.117t-4.664-1.617q-3.531 0-5.828 2.641z",fog:"M0 26.078q0-0.609 0.422-1.016t1.047-0.406h31.109q0.625 0 1.023 0.398t0.398 1.023q0 0.578-0.414 0.969t-1.008 0.391h-31.109q-0.625 0-1.047-0.391t-0.422-0.969zM4.359 20.844q0-0.609 0.438-1 0.375-0.375 0.984-0.375h31.125q0.578 0 0.969 0.398t0.391 0.977q0 0.594-0.391 1.008t-0.969 0.414h-31.125q-0.594 0-1.008-0.422t-0.414-1zM4.578 16.875q0 0.219 0.25 0.219h2.391q0.156 0 0.328-0.266 0.594-1.297 1.773-2.125t2.586-0.938l0.922-0.125q0.281 0 0.281-0.297l0.109-0.828q0.266-2.703 2.289-4.508t4.742-1.805q2.703 0 4.711 1.781t2.289 4.469l0.125 0.953q0 0.281 0.328 0.281h2.656q1.609 0 2.93 0.859t1.961 2.281q0.172 0.266 0.344 0.266h2.391q0.297 0 0.234-0.375-0.734-2.563-2.906-4.188t-4.953-1.625h-0.531q-0.828-3.328-3.492-5.445t-6.086-2.117q-3.5 0-6.219 2.195t-3.484 5.602q-2.125 0.5-3.727 2.016t-2.227 3.625v-0.063q-0.016 0.047-0.016 0.156zM7.266 31.188q0-0.594 0.438-0.984 0.375-0.375 1-0.375h31.141q0.594 0 1.008 0.391t0.414 0.969q0 0.594-0.422 1.016t-1 0.422h-31.141q-0.578 0-1.008-0.43t-0.43-1.008z",hail:"M0 19.219q0 2.797 1.633 4.977t4.258 2.977q0.219 0.047 0.406-0.125l1.938-2.391q-2.219 0-3.797-1.594t-1.578-3.844q0-2.109 1.406-3.664t3.5-1.727l0.875-0.109q0.266 0 0.266-0.219l0.125-0.922q0.313-2.75 2.32-4.555t4.742-1.805q2.75 0 4.789 1.82t2.289 4.539l0.125 0.969q0.063 0.281 0.359 0.281h2.703q2.25 0 3.828 1.578t1.578 3.813q0 2.078-1.406 3.633t-3.453 1.805q-0.297 0-0.813 0.094-0.484 0.047-0.688 0.375l-3.938 4.656q-0.359 0.453-0.273 1.047t0.523 0.953q0.266 0.313 0.938 0.313 0.656 0 1.016-0.578l3.531-4.063q3.109-0.313 5.25-2.688t2.141-5.547q0-1.688-0.648-3.219t-1.75-2.633-2.625-1.758-3.211-0.656h-0.531q-0.828-3.313-3.539-5.43t-6.195-2.117q-2.328 0-4.383 0.992t-3.461 2.766-1.891 4.039q-2.813 0.625-4.586 2.867t-1.773 5.148zM5.641 32.578q0 0.156 0.094 0.5 0.219 0.531 0.734 0.734 0.547 0.25 1.109 0.031t0.766-0.75q0.25-0.547 0.031-1.078t-0.766-0.719q-0.563-0.266-1.078-0.047t-0.766 0.781q-0.125 0.266-0.125 0.547zM8.719 28.516v0.172q0.047 0.563 0.5 0.938 0.563 0.313 1.031 0.313 0.563 0 1.016-0.547l3.875-4.609q0.359-0.438 0.328-1.094-0.063-0.531-0.461-0.891t-0.867-0.359q-0.141 0-0.234 0.016-0.578 0.109-0.938 0.547l-3.938 4.625q-0.313 0.359-0.313 0.891zM10 36.375q0 0.297 0.125 0.531 0.203 0.531 0.734 0.781 0.266 0.125 0.547 0.125 0.313 0 0.516-0.125 0.578-0.234 0.781-0.688 0.25-0.547 0.039-1.109t-0.742-0.766q-0.547-0.25-1.117-0.031t-0.758 0.75q-0.125 0.234-0.125 0.531zM12.781 32.469v0.188q0.063 0.547 0.516 0.914t0.922 0.367q0.563 0 1.047-0.547l7.25-8.734q0.281-0.313 0.281-0.859v-0.203q-0.063-0.563-0.453-0.891t-0.875-0.328h-0.219q-0.578 0.031-0.922 0.516l-7.25 8.672q-0.297 0.438-0.297 0.906zM18.641 34.391q0 0.219 0.094 0.5 0.219 0.547 0.766 0.781 0.344 0.094 0.516 0.094 0.359 0 0.563-0.125 0.563-0.219 0.766-0.703 0.25-0.422 0.031-1.109-0.203-0.516-0.734-0.734l-0.594-0.156q-0.219 0.047-0.531 0.125-0.547 0.203-0.75 0.734-0.125 0.297-0.125 0.594z",rain:"M0 19.188q0-2.875 1.797-5.117t4.547-2.883q0.781-3.406 3.516-5.594t6.25-2.188q3.438 0 6.133 2.133t3.508 5.477h0.531q2.234 0 4.141 1.086t3.016 2.969 1.109 4.117q0 2.188-1.055 4.070t-2.883 3.008-4 1.188q-0.328 0-0.328-0.281v-2.219q0-0.297 0.328-0.297 2.125-0.109 3.633-1.703t1.508-3.766-1.625-3.773-3.844-1.602h-2.688q-0.297 0-0.297-0.281l-0.125-0.969q-0.281-2.703-2.32-4.523t-4.742-1.82q-2.734 0-4.758 1.82t-2.273 4.523l-0.125 0.891q0 0.313-0.328 0.313l-0.875 0.047q-2.078 0.25-3.492 1.781t-1.414 3.594q0 2.172 1.5 3.766t3.641 1.703q0.281 0 0.281 0.297v2.219q0 0.281-0.281 0.281-3.344-0.156-5.664-2.547t-2.32-5.719zM8.922 30.328q0-0.109 0.063-0.328l2.719-9.609q0.156-0.484 0.539-0.734t0.773-0.25q0.172 0 0.406 0.047 0.594 0.109 0.898 0.609t0.133 1.109l-2.719 9.547q-0.313 1.063-1.375 1.063-0.094 0-0.188-0.031-0.141-0.047-0.172-0.047-0.547-0.156-0.813-0.555t-0.266-0.82zM13.297 35.016l4.063-14.625q0.109-0.484 0.5-0.734t0.813-0.25q0.219 0 0.453 0.047 0.547 0.156 0.813 0.648t0.109 1.070l-4.047 14.641q-0.094 0.422-0.484 0.719t-0.844 0.297q-0.234 0-0.422-0.078-0.5-0.125-0.859-0.656-0.281-0.438-0.094-1.078zM20.172 30.375q0-0.094 0.063-0.375l2.719-9.609q0.141-0.484 0.508-0.734t0.773-0.25q0.203 0 0.438 0.047 0.516 0.141 0.773 0.516t0.258 0.781q0 0.078-0.031 0.227t-0.031 0.195l-2.719