UNPKG

deox

Version:

Functional Type-safe Flux Standard Utilities

17 lines (14 loc) 26.7 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs/operators")):"function"==typeof define&&define.amd?define(["exports","rxjs/operators"],t):t((e=e||self).Deox={},e.rxjs.operators)}(this,(function(e,t){"use strict";var r=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),n=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function i(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function a(e,t,n){var u;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(a)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,s=t,f=[],p=f,l=!1;function d(){p===f&&(p=f.slice())}function h(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function y(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return d(),p.push(e),function(){if(t){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,d();var r=p.indexOf(e);p.splice(r,1),f=null}}}function v(e){if(!i(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,s=c(s,e)}finally{l=!1}for(var t=f=p,r=0;r<t.length;r++){(0,t[r])()}return e}function b(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=e,v({type:o.REPLACE})}function g(){var e,t=y;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(h())}return r(),{unsubscribe:t(r)}}})[r]=function(){return this},e}return v({type:o.INIT}),(u={dispatch:v,subscribe:y,getState:h,replaceReducer:b})[r]=g,u}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function c(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function s(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];"production"!==process.env.NODE_ENV&&void 0===e[a]&&u('No reducer provided for key "'+a+'"'),"function"==typeof e[a]&&(r[a]=e[a])}var s,f,p=Object.keys(r);"production"!==process.env.NODE_ENV&&(s={});try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:o.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+o.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(r)}catch(e){f=e}return function(e,t){if(void 0===e&&(e={}),f)throw f;if("production"!==process.env.NODE_ENV){var n=function(e,t,r,n){var a=Object.keys(t),u=r&&r.type===o.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===a.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!i(e))return"The "+u+' has unexpected type of "'+{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following keys: "'+a.join('", "')+'"';var c=Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)&&!n[e]}));return c.forEach((function(e){n[e]=!0})),r&&r.type===o.REPLACE?void 0:c.length>0?"Unexpected "+(c.length>1?"keys":"key")+' "'+c.join('", "')+'" found in '+u+'. Expected to find one of the known reducer keys instead: "'+a.join('", "')+'". Unexpected keys will be ignored.':void 0}(e,r,t,s);n&&u(n)}for(var a=!1,l={},d=0;d<p.length;d++){var h=p[d],y=r[h],v=e[h],b=y(v,t);if(void 0===b){var g=c(h,t);throw new Error(g)}l[h]=b,a=a||b!==v}return(a=a||p.length!==Object.keys(e).length)?l:e}}function f(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(r,!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function y(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return d({},r,{dispatch:n=h.apply(void 0,i)(r.dispatch)})}}}function v(){}"production"!==process.env.NODE_ENV&&"string"==typeof v.name&&"isCrushed"!==v.name&&u('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');var b,g=Object.freeze({__proto__:null,__DO_NOT_USE__ActionTypes:o,applyMiddleware:y,bindActionCreators:function(e,t){if("function"==typeof e)return f(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var n in e){var o=e[n];"function"==typeof o&&(r[n]=f(o,t))}return r},combineReducers:s,compose:h,createStore:a}),m="undefined"!=typeof Symbol?Symbol("immer-nothing"):((b={})["immer-nothing"]=!0,b),w="undefined"!=typeof Symbol?Symbol.for("immer-draftable"):"__$immer_draftable",O="undefined"!=typeof Symbol?Symbol.for("immer-state"):"__$immer_state";function j(e){return!!e&&!!e[O]}function E(e){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return!0;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype||(!!e[w]||!!e.constructor[w])}var P=Object.assign||function(e,t){for(var r in t)k(t,r)&&(e[r]=t[r]);return e},A="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function _(e,t){if(void 0===t&&(t=!1),Array.isArray(e))return e.slice();var r=Object.create(Object.getPrototypeOf(e));return A(e).forEach((function(n){if(n!==O){var o=Object.getOwnPropertyDescriptor(e,n),i=o.value;if(o.get){if(!t)throw new Error("Immer drafts cannot have computed properties");i=o.get.call(e)}o.enumerable?r[n]=i:Object.defineProperty(r,n,{value:i,writable:!0,configurable:!0})}})),r}function x(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t(r,e[r],e);else A(e).forEach((function(r){return t(r,e[r],e)}))}function S(e,t){return Object.getOwnPropertyDescriptor(e,t).enumerable}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var z=function(e){this.drafts=[],this.parent=e,this.canAutoFreeze=!0,this.patches=null};function D(e){e[O].revoke()}z.prototype.usePatches=function(e){e&&(this.patches=[],this.inversePatches=[],this.patchListener=e)},z.prototype.revoke=function(){this.leave(),this.drafts.forEach(D),this.drafts=null},z.prototype.leave=function(){this===z.current&&(z.current=this.parent)},z.current=null,z.enter=function(){return this.current=new z(this.current)};var T={};function I(e,t){var r=Array.isArray(e),n=M(e);x(n,(function(t){!function(e,t,r){var n=T[t];n?n.enumerable=r:T[t]=n={configurable:!0,enumerable:r,get:function(){return function(e,t){L(e);var r=F(C(e),t);if(e.finalizing)return r;if(r===F(e.base,t)&&E(r))return V(e),e.copy[t]=I(r,e);return r}(this[O],t)},set:function(e){!function(e,t,r){if(L(e),e.assigned[t]=!0,!e.modified){if(N(r,F(C(e),t)))return;U(e),V(e)}e.copy[t]=r}(this[O],t,e)}};Object.defineProperty(e,t,n)}(n,t,r||S(e,t))}));var o,i,a,u=t?t.scope:z.current;return o=n,i=O,a={scope:u,modified:!1,finalizing:!1,finalized:!1,assigned:{},parent:t,base:e,draft:n,copy:null,revoke:R,revoked:!1},Object.defineProperty(o,i,{value:a,enumerable:!1,writable:!0}),u.drafts.push(n),n}function R(){this.revoked=!0}function C(e){return e.copy||e.base}function F(e,t){var r=e[O];if(r&&!r.finalizing){r.finalizing=!0;var n=e[t];return r.finalizing=!1,n}return e[t]}function U(e){e.modified||(e.modified=!0,e.parent&&U(e.parent))}function V(e){e.copy||(e.copy=M(e.base))}function M(e){var t=e&&e[O];if(t){t.finalizing=!0;var r=_(t.draft,!0);return t.finalizing=!1,r}return _(e)}function L(e){if(!0===e.revoked)throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+JSON.stringify(C(e)))}function X(e){for(var t=e.length-1;t>=0;t--){var r=e[t][O];r.modified||(Array.isArray(r.base)?Y(r)&&U(r):K(r)&&U(r))}}function K(e){for(var t=e.base,r=e.draft,n=Object.keys(r),o=n.length-1;o>=0;o--){var i=n[o],a=t[i];if(void 0===a&&!k(t,i))return!0;var u=r[i],c=u&&u[O];if(c?c.base!==a:!N(u,a))return!0}return n.length!==Object.keys(t).length}function Y(e){var t=e.draft;if(t.length!==e.base.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}var W=Object.freeze({willFinalize:function(e,t,r){e.drafts.forEach((function(e){e[O].finalizing=!0})),r?j(t)&&t[O].scope===e&&X(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var r=t[O];if(!r)return;var n=r.base,o=r.draft,i=r.assigned;if(Array.isArray(t)){if(Y(r)){if(U(r),i.length=!0,o.length<n.length)for(var a=o.length;a<n.length;a++)i[a]=!1;else for(var u=n.length;u<o.length;u++)i[u]=!0;for(var c=0;c<o.length;c++)void 0===i[c]&&e(o[c])}}else Object.keys(o).forEach((function(t){void 0!==n[t]||k(n,t)?i[t]||e(o[t]):(i[t]=!0,U(r))})),Object.keys(n).forEach((function(e){void 0!==o[e]||k(o,e)||(i[e]=!1,U(r))}))}(e.drafts[0]),X(e.drafts))},createProxy:I});function q(e,t){var r=t?t.scope:z.current,n={scope:r,modified:!1,finalized:!1,assigned:{},parent:t,base:e,draft:null,drafts:{},copy:null,revoke:null},o=Array.isArray(e)?Proxy.revocable([n],$):Proxy.revocable(n,B),i=o.revoke,a=o.proxy;return n.draft=a,n.revoke=i,r.drafts.push(a),a}var B={get:function(e,t){if(t===O)return e;var r=e.drafts;if(!e.modified&&k(r,t))return r[t];var n=G(e)[t];if(e.finalized||!E(n))return n;if(e.modified){if(n!==H(e.base,t))return n;r=e.copy}return r[t]=q(n,e)},has:function(e,t){return t in G(e)},ownKeys:function(e){return Reflect.ownKeys(G(e))},set:function(e,t,r){if(!e.modified){var n=H(e.base,t);if(r?N(n,r)||r===e.drafts[t]:N(n,r)&&t in e.base)return!0;J(e)}return e.assigned[t]=!0,e.copy[t]=r,!0},deleteProperty:function(e,t){(void 0!==H(e.base,t)||t in e.base)&&(e.assigned[t]=!1,J(e));e.copy&&delete e.copy[t];return!0},getOwnPropertyDescriptor:function(e,t){var r=G(e),n=Reflect.getOwnPropertyDescriptor(r,t);n&&(n.writable=!0,n.configurable=!Array.isArray(r)||"length"!==t);return n},defineProperty:function(){throw new Error("Object.defineProperty() cannot be used on an Immer draft")},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base)},setPrototypeOf:function(){throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")}},$={};function G(e){return e.copy||e.base}function H(e,t){var r=e[O],n=Reflect.getOwnPropertyDescriptor(r?G(r):e,t);return n&&n.value}function J(e){e.modified||(e.modified=!0,e.copy=P(_(e.base),e.drafts),e.drafts=null,e.parent&&J(e.parent))}x(B,(function(e,t){$[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),$.deleteProperty=function(e,t){if(isNaN(parseInt(t)))throw new Error("Immer only supports deleting array indices");return B.deleteProperty.call(this,e[0],t)},$.set=function(e,t,r){if("length"!==t&&isNaN(parseInt(t)))throw new Error("Immer only supports setting array indices and the 'length' property");return B.set.call(this,e[0],t,r)};var Z=Object.freeze({willFinalize:function(){},createProxy:q});function Q(e,t,r,n){Array.isArray(e.base)?function(e,t,r,n){var o,i,a=e.base,u=e.copy,c=e.assigned;u.length<a.length&&(a=(o=[u,a])[0],u=o[1],r=(i=[n,r])[0],n=i[1]);var s=u.length-a.length,f=0;for(;a[f]===u[f]&&f<a.length;)++f;var p=a.length;for(;p>f&&a[p-1]===u[p+s-1];)--p;for(var l=f;l<p;++l)if(c[l]&&u[l]!==a[l]){var d=t.concat([l]);r.push({op:"replace",path:d,value:u[l]}),n.push({op:"replace",path:d,value:a[l]})}for(var h=p!=a.length,y=r.length,v=p+s-1;v>=p;--v){var b=t.concat([v]);r[y+v-p]={op:"add",path:b,value:u[v]},h&&n.push({op:"remove",path:b})}h||n.push({op:"replace",path:t.concat(["length"]),value:a.length})}(e,t,r,n):function(e,t,r,n){var o=e.base,i=e.copy;x(e.assigned,(function(e,a){var u=o[e],c=i[e],s=a?e in o?"replace":"add":"remove";if(u!==c||"replace"!==s){var f=t.concat(e);r.push("remove"===s?{op:s,path:f}:{op:s,path:f,value:c}),n.push("add"===s?{op:"remove",path:f}:"remove"===s?{op:"add",path:f,value:u}:{op:"replace",path:f,value:u})}}))}(e,t,r,n)}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n.path;if(0===o.length&&"replace"===n.op)e=n.value;else{for(var i=e,a=0;a<o.length-1;a++)if(!(i=i[o[a]])||"object"!=typeof i)throw new Error("Cannot apply patch, path doesn't resolve: "+o.join("/"));var u=o[o.length-1];switch(n.op){case"replace":i[u]=n.value;break;case"add":Array.isArray(i)?i.splice(u,0,n.value):i[u]=n.value;break;case"remove":Array.isArray(i)?i.splice(u,1):delete i[u];break;default:throw new Error("Unsupported patch operation: "+n.op)}}}return e}var te={useProxies:"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect,autoFreeze:"undefined"!=typeof process?"production"!==process.env.NODE_ENV:"verifyMinified"===function(){}.name,onAssign:null,onDelete:null,onCopy:null},re=function(e){P(this,te,e),this.setUseProxies(this.useProxies),this.produce=this.produce.bind(this)};re.prototype.produce=function(e,t,r){var n,o=this;if("function"==typeof e&&"function"!=typeof t){var i=t;return t=e,function(e){void 0===e&&(e=i);for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];return o.produce(e,(function(e){return t.call.apply(t,[e,e].concat(r))}))}}if("function"!=typeof t)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==r&&"function"!=typeof r)throw new Error("The third argument to `produce` must be a function or undefined");if(E(e)){var a=z.enter(),u=this.createProxy(e),c=!0;try{n=t.call(u,u),c=!1}finally{c?a.revoke():a.leave()}return n instanceof Promise?n.then((function(e){return a.usePatches(r),o.processResult(e,a)}),(function(e){throw a.revoke(),e})):(a.usePatches(r),this.processResult(n,a))}return void 0===(n=t(e))?e:n!==m?n:void 0},re.prototype.createDraft=function(e){if(!E(e))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var t=z.enter(),r=this.createProxy(e);return r[O].isManual=!0,t.leave(),r},re.prototype.finishDraft=function(e,t){var r=e&&e[O];if(!r||!r.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(r.finalized)throw new Error("The given draft is already finalized");var n=r.scope;return n.usePatches(t),this.processResult(void 0,n)},re.prototype.setAutoFreeze=function(e){this.autoFreeze=e},re.prototype.setUseProxies=function(e){this.useProxies=e,P(this,e?Z:W)},re.prototype.applyPatches=function(e,t){return j(e)?ee(e,t):this.produce(e,(function(e){return ee(e,t)}))},re.prototype.processResult=function(e,t){var r=t.drafts[0],n=void 0!==e&&e!==r;if(this.willFinalize(t,e,n),n){if(r[O].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");E(e)&&(e=this.finalize(e,null,t)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:r[O].base}))}else e=this.finalize(r,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==m?e:void 0},re.prototype.finalize=function(e,t,r){var n=this,o=e[O];if(!o)return Object.isFrozen(e)?e:this.finalizeTree(e,null,r);if(o.scope!==r)return e;if(!o.modified)return o.base;if(!o.finalized){if(o.finalized=!0,this.finalizeTree(o.draft,t,r),this.onDelete)if(this.useProxies){var i=o.assigned;for(var a in i)i[a]||this.onDelete(o,a)}else{var u=o.base,c=o.copy;x(u,(function(e){k(c,e)||n.onDelete(o,e)}))}this.onCopy&&this.onCopy(o),this.autoFreeze&&r.canAutoFreeze&&Object.freeze(o.copy),t&&r.patches&&Q(o,t,r.patches,r.inversePatches)}return o.copy},re.prototype.finalizeTree=function(e,t,r){var n=this,o=e[O];o&&(this.useProxies||(o.copy=_(o.draft,!0)),e=o.copy);var i=!!t&&!!r.patches,a=function(u,c,s){if(c===s)throw Error("Immer forbids circular references");var f=!!o&&s===e;if(j(c)){var p=f&&i&&!o.assigned[u]?t.concat(u):null;if(j(c=n.finalize(c,p,r))&&(r.canAutoFreeze=!1),Array.isArray(s)||S(s,u)?s[u]=c:Object.defineProperty(s,u,{value:c}),f&&c===o.base[u])return}else{if(f&&N(c,o.base[u]))return;E(c)&&!Object.isFrozen(c)&&x(c,a)}f&&n.onAssign&&n.onAssign(o,u,c)};return x(e,a),e};var ne=new re;ne.setAutoFreeze.bind(ne),ne.setUseProxies.bind(ne),ne.applyPatches.bind(ne),ne.createDraft.bind(ne),ne.finishDraft.bind(ne);var oe,ie=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){var r=g.compose;t.__esModule=!0,t.composeWithDevTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r:r.apply(null,arguments)},t.devToolsEnhancer="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}}}));(oe=ie)&&oe.__esModule&&Object.prototype.hasOwnProperty.call(oe,"default")&&oe.default;var ae=ie.composeWithDevTools;ie.devToolsEnhancer;function ue(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var ce=ue();function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pe(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function le(e){if("object"!==se(e)||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function de(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||le(e)}ce.withExtraArgument=ue;var he=["A non-serializable value was detected in the state, in the path: `%s`. Value: %o","Take a look at the reducer(s) handling this action type: %s.","(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)"].join("\n"),ye=["A non-serializable value was detected in an action, in the path: `%s`. Value: %o","Take a look at the logic that dispatched this action: %o.","(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)"].join("\n");function ve(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:de;if(!n(e))return{keyPath:r.join(".")||"<root>",value:e};if("object"!==se(e)||null===e)return!1;for(var o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],u=r.concat(a),c=e[a];if(!n(c))return{keyPath:u.join("."),value:c};if("object"===se(c)&&(t=ve(c,u,n)))return t}return!1}function be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isSerializable,r=void 0===t?de:t;return function(e){return function(t){return function(n){var o=ve(n,[],r);if(o){var i=o.keyPath,a=o.value;console.error(ye,i,a,n)}var u=t(n),c=ve(e.getState());if(c){var s=c.keyPath,f=c.value;console.error(he,s,f,n.type)}return u}}}}var ge="production"===process.env.NODE_ENV; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var me=function(){return(me=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function we(e,t,r){return me({type:e},void 0!==t?{payload:t}:{},void 0!==r?{meta:r}:{},t instanceof Error?{error:!0}:{})}function Oe(e,t){void 0===t&&(t=function(e){return function(){return e()}});var r=t((function(t,r){return we(e,t,r)}));return Object.assign(r,{type:e,toString:function(){return e}})}function je(e){if(!e.type&&!e.hasOwnProperty("toString"))throw new Error("Action creator that has been passed to getType() does not provide any API to expose action type. You can use createAction() to create an action creator without any unsense errors.");return e.type||e.toString()}var Ee=Symbol("others");function Pe(e,t){return(Array.isArray(e)?e:[e]).map(je).reduce((function(e,r){return e[r]=t,e}),{})}Pe.others=function(e){var t;return(t={})[Ee]=e,t};var Ae=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object.assign.apply(Object,[{}].concat(e))};function _e(e,t){var r,n=(r=e,[].concat(r)).map((function(e){return"string"==typeof e?e:je(e)})),o=function(e){return n.includes(e.type)};return void 0===t?o:o(t)}e.action=we,e.configureStore=function(e){var t,r,n=e||{},o=n.reducer,i=void 0===o?void 0:o,u=n.middleware,c=void 0===u?(t=[ce],"production"!==process.env.NODE_ENV&&(t=[(0,require("redux-immutable-state-invariant").default)(),ce,be()]),t):u,f=n.devTools,p=void 0===f||f,l=n.preloadedState,d=void 0===l?void 0:l,v=n.enhancers,b=void 0===v?[]:v;if("function"==typeof i)r=i;else{if(!le(i))throw new Error("Reducer argument must be a function or an object of functions that can be passed to combineReducers");r=s(i)}var g=y.apply(void 0,pe(c)),m=h;p&&(m=ae(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fe(e,t,r[t])}))}return e}({trace:!ge},"object"===se(p)&&p)));var w=[g].concat(pe(b));return a(r,d,m.apply(void 0,pe(w)))},e.createAction=Oe,e.createActionCreator=Oe,e.createReducer=function(e,t){var r=Ae.apply(void 0,t(Pe));return function(t,n){void 0===t&&(t=e);var o=r[n.type]||r[Ee];return o?o(t,n):t}},e.getType=je,e.isOfType=_e,e.ofType=function(e){return t.filter(_e(e))},Object.defineProperty(e,"__esModule",{value:!0})}));