UNPKG

x-weather

Version:

A collection of web components implementing portions of the OpenWeatherMap API.

2 lines (1 loc) 2.97 kB
import{loadState as t,saveState as r}from"./utilities.js";import"./types.js";import{a as n}from"./_rollupPluginBabelHelpers-5bd7183e.js";import{c as e,a as i,b as o}from"./redux-a2f99696.js";import a from"./initialState.js";import"./utilities2.js";import"./current.js";import"./forecast.js";import"./preferences.js";import"./index2.js";import{rootReducer as u}from"./root.js";import"./middleware.js";function f(t){return function(r){var n=r.dispatch,e=r.getState;return function(r){return function(i){return"function"==typeof i?i(n,e,t):r(i)}}}}var c=f();function l(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}c.withExtraArgument=f;var s="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,v=s||p||Function("return this")(),m=function(){return v.Date.now()},b=v.Symbol,d=Object.prototype,j=d.hasOwnProperty,g=d.toString,y=b?b.toStringTag:void 0;var h=Object.prototype.toString;var x="[object Null]",O="[object Undefined]",T=b?b.toStringTag:void 0;function S(t){return null==t?void 0===t?O:x:T&&T in Object(t)?function(t){var r=j.call(t,y),n=t[y];try{t[y]=void 0;var e=!0}catch(t){}var i=g.call(t);return e&&(r?t[y]=n:delete t[y]),i}(t):function(t){return h.call(t)}(t)}var w="[object Symbol]";var E=NaN,$=/^\s+|\s+$/g,N=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,M=/^0o[0-7]+$/i,P=parseInt;function A(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&S(t)==w}(t))return E;if(l(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=l(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace($,"");var n=W.test(t);return n||M.test(t)?P(t.slice(2),n?2:8):N.test(t)?E:+t}var B="Expected a function",D=Math.max,F=Math.min;function H(t,r,n){var e,i,o,a,u,f,c=0,s=!1,p=!1,v=!0;if("function"!=typeof t)throw new TypeError(B);function b(r){var n=e,o=i;return e=i=void 0,c=r,a=t.apply(o,n)}function d(t){var n=t-f;return void 0===f||n>=r||n<0||p&&t-c>=o}function j(){var t=m();if(d(t))return g(t);u=setTimeout(j,function(t){var n=r-(t-f);return p?F(n,o-(t-c)):n}(t))}function g(t){return u=void 0,v&&e?b(t):(e=i=void 0,a)}function y(){var t=m(),n=d(t);if(e=arguments,i=this,f=t,n){if(void 0===u)return function(t){return c=t,u=setTimeout(j,r),s?b(t):a}(f);if(p)return clearTimeout(u),u=setTimeout(j,r),b(f)}return void 0===u&&(u=setTimeout(j,r)),a}return r=A(r)||0,l(n)&&(s=!!n.leading,o=(p="maxWait"in n)?D(A(n.maxWait)||0,r):o,v="trailing"in n?!!n.trailing:v),y.cancel=function(){void 0!==u&&clearTimeout(u),c=0,e=f=i=u=void 0},y.flush=function(){return void 0===u?a:g(m())},y}var I="Expected a function";var U=(t=>e(u,t,i(o(c))))(n({},a,{},t()));U.subscribe(function(t,r,n){var e=!0,i=!0;if("function"!=typeof t)throw new TypeError(I);return l(n)&&(e="leading"in n?!!n.leading:e,i="trailing"in n?!!n.trailing:i),H(t,r,{leading:e,maxWait:r,trailing:i})}(()=>{var t=U.getState();r(t)},1e3));export{U as store};