GoScrobble/web/node_modules/@reduxjs/toolkit/dist/redux-toolkit.umd.min.js

52 lines
32 KiB
JavaScript

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RTK = {}));
}(this, (function (exports) { 'use strict';
var t,e,n,r=undefined&&undefined.__extends||(t=function(e,n){return (t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e;}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r);}),o=undefined&&undefined.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:f(0),throw:f(1),return:f(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function f(i){return function(f){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u);}catch(t){i=[6,t],r=0;}finally{n=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,f])}}},i=undefined&&undefined.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},u=Object.defineProperty,f=Object.defineProperties,c=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,p=function(t,e,n){return e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},d=function(t,e){for(var n in e||(e={}))l.call(e,n)&&p(t,n,e[n]);if(a)for(var r=0,o=a(e);r<o.length;r++)s.call(e,n=o[r])&&p(t,n,e[n]);return t},v=function(t,e){return f(t,c(e))};function y(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return "'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function h(t){return !!t&&!!t[et]}function g(t){return !!t&&(function(t){if(!t||"object"!=typeof t)return !1;var e=Object.getPrototypeOf(t);if(null===e)return !0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return "function"==typeof n&&Function.toString.call(n)===nt}(t)||Array.isArray(t)||!!t[tt]||!!t.constructor[tt]||E(t)||A(t))}function b(t){return h(t)||y(23,t),t[et].t}function O(t,e,n){void 0===n&&(n=!1),0===m(t)?(n?Object.keys:rt)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t);})):t.forEach((function(n,r){return e(r,n,t)}));}function m(t){var e=t[et];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:E(t)?2:A(t)?3:0}function w(t,e){return 2===m(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function j(t,e,n){var r=m(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n;}function P(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function E(t){return H&&t instanceof Map}function A(t){return Q&&t instanceof Set}function S(t){return t.o||t.t}function _(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ot(t);delete e[et];for(var n=rt(e),r=0;r<n.length;r++){var o=n[r],i=e[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]});}return Object.create(Object.getPrototypeOf(t),e)}function x(t,e){return void 0===e&&(e=!1),D(t)||h(t)||!g(t)||(m(t)>1&&(t.set=t.add=t.clear=t.delete=I),Object.freeze(t),e&&O(t,(function(t,e){return x(e,!0)}),!0)),t}function I(){y(2);}function D(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function k(t){var e=it[t];return e||y(18,t),e}function N(){return n}function R(t,e){e&&(k("Patches"),t.u=[],t.s=[],t.v=e);}function M(t){C(t),t.p.forEach(F),t.p=null;}function C(t){t===n&&(n=t.l);}function T(t){return n={p:[],l:n,h:t,m:!0,_:0}}function F(t){var e=t[et];0===e.i||1===e.i?e.j():e.g=!0;}function q(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.O||k("ES5").S(e,t,r),r?(n[et].P&&(M(e),y(4)),g(t)&&(t=W(e,t),e.l||K(e,t)),e.u&&k("Patches").M(n[et],t,e.u,e.s)):t=W(e,n,[]),M(e),e.u&&e.v(e.u,e.s),t!==Z?t:void 0}function W(t,e,n){if(D(e))return e;var r=e[et];if(!r)return O(e,(function(o,i){return z(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return K(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=_(r.k):r.o;O(3===r.i?new Set(o):o,(function(e,i){return z(t,r,o,e,i,n)})),K(t,o,!1),n&&t.u&&k("Patches").R(r,n,t.u,t.s);}return r.o}function z(t,e,n,r,o,i){if(h(o)){var u=W(t,o,i&&e&&3!==e.i&&!w(e.D,r)?i.concat(r):void 0);if(j(n,r,u),!h(u))return;t.m=!1;}if(g(o)&&!D(o)){if(!t.h.F&&t._<1)return;W(t,o),e&&e.A.l||K(t,o);}}function K(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&x(e,n);}function U(t,e){var n=t[et];return (n?S(n):t)[e]}function L(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n);}}function V(t){t.P||(t.P=!0,t.l&&V(t.l));}function X(t){t.o||(t.o=_(t.t));}function B(t,e,n){var r=E(e)?k("MapSet").N(e,n):A(e)?k("MapSet").T(e,n):t.O?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:N(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=ut;n&&(o=[r],i=ft);var u=Proxy.revocable(o,i),f=u.revoke,c=u.proxy;return r.k=c,r.j=f,c}(e,n):k("ES5").J(e,n);return (n?n.A:N()).p.push(r),r}function G(t){return h(t)||y(22,t),function t(e){if(!g(e))return e;var n,r=e[et],o=m(e);if(r){if(!r.P&&(r.i<4||!k("ES5").K(r)))return r.t;r.I=!0,n=J(e,o),r.I=!1;}else n=J(e,o);return O(n,(function(e,o){r&&function(t,e){return 2===m(t)?t.get(e):t[e]}(r.t,e)===o||j(n,e,t(o));})),3===o?new Set(n):n}(t)}function J(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _(t)}var $="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),H="undefined"!=typeof Map,Q="undefined"!=typeof Set,Y="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Z=$?Symbol.for("immer-nothing"):((e={})["immer-nothing"]=!0,e),tt=$?Symbol.for("immer-draftable"):"__$immer_draftable",et=$?Symbol.for("immer-state"):"__$immer_state",nt=(""+Object.prototype.constructor),rt="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ot=Object.getOwnPropertyDescriptors||function(t){var e={};return rt(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n);})),e},it={},ut={get:function(t,e){if(e===et)return t;var n,r,o,i=S(t);if(!w(i,e))return n=t,(o=L(i,e))?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(n.k):void 0;var u=i[e];return t.I||!g(u)?u:u===U(t.t,e)?(X(t),t.o[e]=B(t.A.h,u,t)):u},has:function(t,e){return e in S(t)},ownKeys:function(t){return Reflect.ownKeys(S(t))},set:function(t,e,n){var r=L(S(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=U(S(t),e),i=null==o?void 0:o[et];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(P(n,o)&&(void 0!==n||w(t.t,e)))return !0;X(t),V(t);}return t.o[e]===n&&"number"!=typeof n||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==U(t.t,e)||e in t.t?(t.D[e]=!1,X(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=S(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){y(11);},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){y(12);}},ft={};O(ut,(function(t,e){ft[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)};})),ft.deleteProperty=function(t,e){return ut.deleteProperty.call(this,t[0],e)},ft.set=function(t,e,n){return ut.set.call(this,t[0],e,n,t[0])};var ct=new(function(){function t(t){var e=this;this.O=Y,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var o=n;n=t;var i=e;return function(t){var e=this;void 0===t&&(t=o);for(var r=arguments.length,u=Array(r>1?r-1:0),f=1;f<r;f++)u[f-1]=arguments[f];return i.produce(t,(function(t){var r;return (r=n).call.apply(r,[e,t].concat(u))}))}}var u;if("function"!=typeof n&&y(6),void 0!==r&&"function"!=typeof r&&y(7),g(t)){var f=T(e),c=B(e,t,void 0),a=!0;try{u=n(c),a=!1;}finally{a?M(f):C(f);}return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(t){return R(f,r),q(t,f)}),(function(t){throw M(f),t})):(R(f,r),q(u,f))}if(!t||"object"!=typeof t){if((u=n(t))===Z)return;return void 0===u&&(u=t),e.F&&x(u,!0),u}y(21,t);},this.produceWithPatches=function(t,n){return "function"==typeof t?function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(o))}))}:[e.produce(t,n,(function(t,e){r=t,o=e;})),r,o];var r,o;},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var e=t.prototype;return e.createDraft=function(t){g(t)||y(8),h(t)&&(t=G(t));var e=T(this),n=B(this,t,void 0);return n[et].C=!0,C(e),n},e.finishDraft=function(t,e){var n=(t&&t[et]).A;return R(n,e),q(void 0,n)},e.setAutoFreeze=function(t){this.F=t;},e.setUseProxies=function(t){t&&!Y&&y(20),this.O=t;},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}var o=k("Patches").$;return h(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),at=ct.produce,lt=(ct.produceWithPatches.bind(ct),ct.setAutoFreeze.bind(ct),ct.setUseProxies.bind(ct),ct.applyPatches.bind(ct),ct.createDraft.bind(ct),ct.finishDraft.bind(ct),at);function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r);}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){st(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}function vt(t){return "Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var yt="function"==typeof Symbol&&Symbol.observable||"@@observable",ht=function(){return Math.random().toString(36).substring(7).split("").join(".")},gt={INIT:"@@redux/INIT"+ht(),REPLACE:"@@redux/REPLACE"+ht(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+ht()}};function bt(t){if("object"!=typeof t||null===t)return !1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ot(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(vt(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(vt(1));return n(Ot)(t,e)}if("function"!=typeof t)throw new Error(vt(2));var o=t,i=e,u=[],f=u,c=!1;function a(){f===u&&(f=u.slice());}function l(){if(c)throw new Error(vt(3));return i}function s(t){if("function"!=typeof t)throw new Error(vt(4));if(c)throw new Error(vt(5));var e=!0;return a(),f.push(t),function(){if(e){if(c)throw new Error(vt(6));e=!1,a();var n=f.indexOf(t);f.splice(n,1),u=null;}}}function p(t){if(!bt(t))throw new Error(vt(7));if(void 0===t.type)throw new Error(vt(8));if(c)throw new Error(vt(9));try{c=!0,i=o(i,t);}finally{c=!1;}for(var e=u=f,n=0;n<e.length;n++)(0, e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(vt(10));o=t,p({type:gt.REPLACE});}function v(){var t,e=s;return (t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(vt(11));function n(){t.next&&t.next(l());}return n(),{unsubscribe:e(n)}}})[yt]=function(){return this},t}return p({type:gt.INIT}),(r={dispatch:p,subscribe:s,getState:l,replaceReducer:d})[yt]=v,r}function mt(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(n[o]=t[o]);}var i,u=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:gt.INIT}))throw new Error(vt(12));if(void 0===n(void 0,{type:gt.PROBE_UNKNOWN_ACTION()}))throw new Error(vt(13))}));}(n);}catch(t){i=t;}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},f=0;f<u.length;f++){var c=u[f],a=t[c],l=(0, n[c])(a,e);if(void 0===l)throw new Error(vt(14));o[c]=l,r=r||l!==a;}return (r=r||u.length!==Object.keys(t).length)?o:t}}function wt(t,e){return function(){return e(t.apply(this,arguments))}}function jt(t,e){if("function"==typeof t)return wt(t,e);if("object"!=typeof t||null===t)throw new Error(vt(16));var n={};for(var r in t){var o=t[r];"function"==typeof o&&(n[r]=wt(o,e));}return n}function Pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Et(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(vt(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=Pt.apply(void 0,i)(n.dispatch),dt(dt({},n),{},{dispatch:r})}}}function At(t,e){return t===e}function St(t,e,n){if(null===e||null===n||e.length!==n.length)return !1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return !1;return !0}function _t(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return "function"==typeof t}))){var n=e.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}var xt=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=0,u=r.pop(),f=_t(r),c=t.apply(void 0,[function(){return i++,u.apply(null,arguments)}].concat(n)),a=t((function(){for(var t=[],e=f.length,n=0;n<e;n++)t.push(f[n].apply(null,arguments));return c.apply(null,t)}));return a.resultFunc=u,a.dependencies=f,a.recomputations=function(){return i},a.resetRecomputations=function(){return i=0},a}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:At,n=null,r=null;return function(){return St(e,n,arguments)||(r=t.apply(null,arguments)),n=arguments,r}})),It=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xt.apply(void 0,t),r=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(void 0,i([h(t)?G(t):t],e))};return r},Dt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return "object"==typeof arguments[0]?Pt:Pt.apply(null,arguments)};function kt(t){if("object"!=typeof t||null===t)return !1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Nt(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return "function"==typeof o?o(n,r,t):e(o)}}}}var Rt=Nt();Rt.withExtraArgument=Nt;var Mt=Rt,Ct=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return r(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,i([void 0],t[0].concat(this)))):new(e.bind.apply(e,i([void 0],t.concat(this))))},e}(Array);function Tt(t){var e=typeof t;return "undefined"===e||null===t||"string"===e||"boolean"===e||"number"===e||Array.isArray(t)||kt(t)}function Ft(t,e,n,r,o){var i;if(void 0===e&&(e=""),void 0===n&&(n=Tt),void 0===o&&(o=[]),!n(t))return {keyPath:e||"<root>",value:t};if("object"!=typeof t||null===t)return !1;for(var u=null!=r?r(t):Object.entries(t),f=o.length>0,c=0,a=u;c<a.length;c++){var l=a[c],s=l[0],p=l[1],d=e?e+"."+s:s;if(!(f&&o.indexOf(d)>=0)){if(!n(p))return {keyPath:d,value:p};if("object"==typeof p&&(i=Ft(p,d,n,r,o)))return i}}return !1}function qt(t){return function(){return function(t){return function(e){return t(e)}}}}function Wt(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e,r=new Ct;return n&&r.push("boolean"==typeof n?Mt:Mt.withExtraArgument(n.extraArgument)),r}function zt(t){var e,n=function(t){return Wt(t)},r=t||{},o=r.reducer,u=void 0===o?void 0:o,f=r.middleware,c=void 0===f?n():f,a=r.devTools,l=void 0===a||a,s=r.preloadedState,p=void 0===s?void 0:s,v=r.enhancers,y=void 0===v?void 0:v;if("function"==typeof u)e=u;else {if(!kt(u))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=mt(u);}var h=c;"function"==typeof h&&(h=h(n));var g=Et.apply(void 0,h),b=Pt;l&&(b=Dt(d({trace:!1},"object"==typeof l&&l)));var O=[g];return Array.isArray(y)?O=i([g],y):"function"==typeof y&&(O=y(O)),Ot(e,p,b.apply(void 0,O))}function Kt(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return d(d({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return {type:t,payload:n[0]}}return n.toString=function(){return ""+t},n.type=t,n.match=function(e){return e.type===t},n}function Ut(t){return ["type","payload","error","meta"].indexOf(t)>-1}function Lt(t){return ""+t}function Vt(t){var e,n={},r=[],o={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,o},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[n,r,e]}function Xt(t,e,n,r){void 0===n&&(n=[]);var o="function"==typeof e?Vt(e):[e,n,r],u=o[0],f=o[1],c=o[2],a=lt(t,(function(){}));return function(t,e){void 0===t&&(t=a);var n=i([u[e.type]],f.filter((function(t){return (0, t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return !!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var r;if(h(t))return void 0===(r=n(t,e))?t:r;if(g(t))return lt(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}}function Bt(t){var e=t.name,n=t.initialState;if(!e)throw new Error("`name` is a required option for createSlice");var r=t.reducers||{},o="function"==typeof t.extraReducers?Vt(t.extraReducers):[t.extraReducers],i=o[0],u=void 0===i?{}:i,f=o[1],c=void 0===f?[]:f,a=o[2],l=void 0===a?void 0:a,s=Object.keys(r),p={},v={},y={};s.forEach((function(t){var n,o,i=r[t],u=e+"/"+t;"reducer"in i?(n=i.reducer,o=i.prepare):n=i,p[t]=n,v[u]=n,y[t]=o?Kt(u,o):Kt(u);}));var h=Xt(n,d(d({},u),v),c,l);return {name:e,reducer:h,actions:y,caseReducers:p}}function Gt(t){return "object"!=typeof t||null==t||Object.isFrozen(t)}function Jt(t){return function(){return function(t){return function(e){return t(e)}}}}function $t(t){return function(e,n){var r=function(e){var r;kt(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Ut)?t(n.payload,e):t(n,e);};return h(e)?(r(e),e):lt(e,r)}}function Ht(t,e){return e(t)}function Qt(t){return Array.isArray(t)||(t=Object.values(t)),t}function Yt(t,e,n){for(var r=[],o=[],i=0,u=t=Qt(t);i<u.length;i++){var f=u[i],c=Ht(f,e);c in n.entities?o.push({id:c,changes:f}):r.push(f);}return [r,o]}function Zt(t){function e(e,n){var r=Ht(e,t);r in n.entities||(n.ids.push(r),n.entities[r]=e);}function n(t,n){for(var r=0,o=t=Qt(t);r<o.length;r++)e(o[r],n);}function r(e,n){var r=Ht(e,t);r in n.entities||n.ids.push(r),n.entities[r]=e;}function o(t,e){var n=!1;t.forEach((function(t){t in e.entities&&(delete e.entities[t],n=!0);})),n&&(e.ids=e.ids.filter((function(t){return t in e.entities})));}function i(e,n){var r={},o={};e.forEach((function(t){t.id in n.entities&&(o[t.id]={id:t.id,changes:d(d({},o[t.id]?o[t.id].changes:null),t.changes)});})),(e=Object.values(o)).length>0&&e.filter((function(e){return function(e,n,r){var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t),u=i!==n.id;return u&&(e[n.id]=i,delete r.entities[n.id]),r.entities[i]=o,u}(r,e,n)})).length>0&&(n.ids=n.ids.map((function(t){return r[t]||t})));}function u(e,r){var o=Yt(e,t,r),u=o[0];i(o[1],r),n(u,r);}return {removeAll:(f=function(t){Object.assign(t,{ids:[],entities:{}});},c=$t((function(t,e){return f(e)})),function(t){return c(t,void 0)}),addOne:$t(e),addMany:$t(n),setOne:$t(r),setMany:$t((function(t,e){for(var n=0,o=t=Qt(t);n<o.length;n++)r(o[n],e);})),setAll:$t((function(t,e){t=Qt(t),e.ids=[],e.entities={},n(t,e);})),updateOne:$t((function(t,e){return i([t],e)})),updateMany:$t(i),upsertOne:$t((function(t,e){return u([t],e)})),upsertMany:$t(u),removeOne:$t((function(t,e){return o([t],e)})),removeMany:$t(o)};var f,c;}function te(t){void 0===t&&(t={});var e=d({sortComparer:!1,selectId:function(t){return t.id}},t),n=e.selectId,r=e.sortComparer,o={getInitialState:function(t){return void 0===t&&(t={}),Object.assign({ids:[],entities:{}},t)}},i={getSelectors:function(t){var e=function(t){return t.ids},n=function(t){return t.entities},r=It(e,n,(function(t,e){return t.map((function(t){return e[t]}))})),o=function(t,e){return e},i=function(t,e){return t[e]},u=It(e,(function(t){return t.length}));if(!t)return {selectIds:e,selectEntities:n,selectAll:r,selectTotal:u,selectById:It(n,o,i)};var f=It(t,n);return {selectIds:It(t,e),selectEntities:f,selectAll:It(t,r),selectTotal:It(t,u),selectById:It(f,o,i)}}},u=r?function(t,e){var n=Zt(t);function r(e,n){var r=(e=Qt(e)).filter((function(e){return !(Ht(e,t)in n.entities)}));0!==r.length&&f(r,n);}function o(t,e){0!==(t=Qt(t)).length&&f(t,e);}function i(e,n){var r=[];e.forEach((function(e){return function(e,n,r){if(!(n.id in r.entities))return !1;var o=Object.assign({},r.entities[n.id],n.changes),i=Ht(o,t);return delete r.entities[n.id],e.push(o),i!==n.id}(r,e,n)})),0!==r.length&&f(r,n);}function u(e,n){var o=Yt(e,t,n),u=o[0];i(o[1],n),r(u,n);}function f(n,r){n.forEach((function(e){r.entities[t(e)]=e;}));var o=Object.values(r.entities);o.sort(e);var i=o.map(t);(function(t,e){if(t.length!==e.length)return !1;for(var n=0;n<t.length&&n<e.length;n++)if(t[n]!==e[n])return !1;return !0})(r.ids,i)||(r.ids=i);}return {removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:$t((function(t,e){return r([t],e)})),updateOne:$t((function(t,e){return i([t],e)})),upsertOne:$t((function(t,e){return u([t],e)})),setOne:$t((function(t,e){return o([t],e)})),setMany:$t(o),setAll:$t((function(t,e){t=Qt(t),e.entities={},e.ids=[],r(t,e);})),addMany:$t(r),updateMany:$t(i),upsertMany:$t(u)}}(n,r):Zt(n);return d(d(d({selectId:n,sortComparer:r},o),i),u)}var ee=function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e},ne=["name","message","stack","code"],re=function(t,e){this.payload=t,this.meta=e;},oe=function(t,e){this.payload=t,this.meta=e;},ie=function(t){if("object"==typeof t&&null!==t){for(var e={},n=0,r=ne;n<r.length;n++){var o=r[n];"string"==typeof t[o]&&(e[o]=t[o]);}return e}return {message:String(t)}};function ue(t,e,n){var r=Kt(t+"/fulfilled",(function(t,e,n,r){return {payload:t,meta:v(d({},r||{}),{arg:n,requestId:e,requestStatus:"fulfilled"})}})),i=Kt(t+"/pending",(function(t,e,n){return {payload:void 0,meta:v(d({},n||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),u=Kt(t+"/rejected",(function(t,e,r,o,i){return {payload:o,error:(n&&n.serializeError||ie)(t||"Rejected"),meta:v(d({},i||{}),{arg:r,requestId:e,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),f="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return !1},onabort:function(){},removeEventListener:function(){}};}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(c,a,l){var s,p,d=(null!=(s=null==n?void 0:n.idGenerator)?s:ee)(),v=new f,y=new Promise((function(t,e){return v.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:p||"Aborted"})}))})),h=!1,g=function(){return f=this,s=function(){var f,s,p;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),n&&n.condition&&!1===n.condition(t,{getState:a,extra:l}))throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,c(i(d,t,null==(f=null==n?void 0:n.getPendingMeta)?void 0:f.call(n,{requestId:d,arg:t},{getState:a,extra:l}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:c,getState:a,extra:l,requestId:d,signal:v.signal,rejectWithValue:function(t,e){return new re(t,e)},fulfillWithValue:function(t,e){return new oe(t,e)}})).then((function(e){if(e instanceof re)throw e;return e instanceof oe?r(e.payload,d,t,e.meta):r(e,d,t)}))])];case 1:return s=o.sent(),[3,3];case 2:return p=o.sent(),s=p instanceof re?u(null,d,t,p.payload,p.meta):u(p,d,t),[3,3];case 3:return n&&!n.dispatchConditionRejection&&u.match(s)&&s.meta.condition||c(s),[2,s]}}))},new Promise((function(t,e){var n=function(t){try{o(s.next(t));}catch(t){e(t);}},r=function(t){try{o(s.throw(t));}catch(t){e(t);}},o=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(n,r)};o((s=s.apply(f,null)).next());}));var f,s;}();return Object.assign(g,{abort:function(t){h&&(p=t,v.abort());},requestId:d,arg:t,unwrap:function(){return g.then(fe)}})}}),{pending:i,rejected:u,fulfilled:r,typePrefix:t})}function fe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}var ce=function(t,e){return (n=t)&&"function"==typeof n.match?t.match(e):t(e);var n;};function ae(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.some((function(t){return ce(t,e)}))}}function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.every((function(t){return ce(t,e)}))}}function se(t,e){if(!t||!t.meta)return !1;var n="string"==typeof t.meta.requestId,r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function pe(t){return "function"==typeof t[0]&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function de(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["pending"])}:pe(t)?function(e){var n=t.map((function(t){return t.pending}));return ae.apply(void 0,n)(e)}:de()(t[0])}function ve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["rejected"])}:pe(t)?function(e){var n=t.map((function(t){return t.rejected}));return ae.apply(void 0,n)(e)}:ve()(t[0])}function ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t){return t&&t.meta&&t.meta.rejectedWithValue};return 0===t.length||pe(t)?function(e){return le(ve.apply(void 0,t),n)(e)}:ye()(t[0])}function he(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["fulfilled"])}:pe(t)?function(e){var n=t.map((function(t){return t.fulfilled}));return ae.apply(void 0,n)(e)}:he()(t[0])}function ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return se(t,["pending","fulfilled","rejected"])}:pe(t)?function(e){for(var n=[],r=0,o=t;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled);}return ae.apply(void 0,n)(e)}:ge()(t[0])}!function(){function t(t,e){var n=o[t];return n?n.enumerable=e:o[t]=n={configurable:!0,enumerable:e,get:function(){return ut.get(this[et],t)},set:function(e){ut.set(this[et],t,e);}},n}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][et];if(!o.P)switch(o.i){case 5:r(o)&&V(o);break;case 4:n(o)&&V(o);}}}function n(t){for(var e=t.t,n=t.k,r=rt(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==et){var u=e[i];if(void 0===u&&!w(e,i))return !0;var f=n[i],c=f&&f[et];if(c?c.t!==u:!P(f,u))return !0}}var a=!!e[et];return r.length!==rt(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return !0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);return !(!n||n.get)}var o={};it.ES5||(it.ES5={J:function(e,n){var r=Array.isArray(e),o=function(e,n){if(e){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,t(o,!0));return r}var i=ot(n);delete i[et];for(var u=rt(i),f=0;f<u.length;f++){var c=u[f];i[c]=t(c,e||!!i[c].enumerable);}return Object.create(Object.getPrototypeOf(n),i)}(r,e),i={i:r?5:4,A:n?n.A:N(),P:!1,I:!1,D:{},l:n,t:e,k:o,o:null,g:!1,C:!1};return Object.defineProperty(o,et,{value:i,writable:!0}),o},S:function(t,n,o){o?h(n)&&n[et].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[et];if(n){var o=n.t,i=n.k,u=n.D,f=n.i;if(4===f)O(i,(function(e){e!==et&&(void 0!==o[e]||w(o,e)?u[e]||t(i[e]):(u[e]=!0,V(n)));})),O(o,(function(t){void 0!==i[t]||w(i,t)||(u[t]=!1,V(n));}));else if(5===f){if(r(n)&&(V(n),u.length=!0),i.length<o.length)for(var c=i.length;c<o.length;c++)u[c]=!1;else for(var a=o.length;a<i.length;a++)u[a]=!0;for(var l=Math.min(i.length,o.length),s=0;s<l;s++)void 0===u[s]&&t(i[s]);}}}}(t.p[0]),e(t.p));},K:function(t){return 4===t.i?n(t):r(t)}});}();
exports.MiddlewareArray = Ct;
exports.__DO_NOT_USE__ActionTypes = gt;
exports.applyMiddleware = Et;
exports.bindActionCreators = jt;
exports.combineReducers = mt;
exports.compose = Pt;
exports.configureStore = zt;
exports.createAction = Kt;
exports.createAsyncThunk = ue;
exports.createDraftSafeSelector = It;
exports.createEntityAdapter = te;
exports.createImmutableStateInvariantMiddleware = Jt;
exports.createNextState = lt;
exports.createReducer = Xt;
exports.createSelector = xt;
exports.createSerializableStateInvariantMiddleware = qt;
exports.createSlice = Bt;
exports.createStore = Ot;
exports.current = G;
exports.findNonSerializableValue = Ft;
exports.freeze = x;
exports.getDefaultMiddleware = Wt;
exports.getType = Lt;
exports.isAllOf = le;
exports.isAnyOf = ae;
exports.isAsyncThunkAction = ge;
exports.isDraft = h;
exports.isFulfilled = he;
exports.isImmutableDefault = Gt;
exports.isPending = de;
exports.isPlain = Tt;
exports.isPlainObject = kt;
exports.isRejected = ve;
exports.isRejectedWithValue = ye;
exports.miniSerializeError = ie;
exports.nanoid = ee;
exports.original = b;
exports.unwrapResult = fe;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=redux-toolkit.umd.min.js.map