Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-query

Package Overview
Dependencies
Maintainers
7
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-query - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1-rc.1

12

dist/commonjs/actions/index.js

@@ -157,3 +157,4 @@ "use strict";

url = _ref7.url,
unstable_preDispatchCallback = _ref7.unstable_preDispatchCallback;
unstable_preDispatchCallback = _ref7.unstable_preDispatchCallback,
customQueryMiddlewareConfig = _ref7.customQueryMiddlewareConfig;
return {

@@ -170,3 +171,4 @@ type: actionTypes.REQUEST_ASYNC,

url: url,
unstable_preDispatchCallback: unstable_preDispatchCallback
unstable_preDispatchCallback: unstable_preDispatchCallback,
customQueryMiddlewareConfig: customQueryMiddlewareConfig
};

@@ -184,3 +186,4 @@ };

update = _ref8.update,
url = _ref8.url;
url = _ref8.url,
customQueryMiddlewareConfig = _ref8.customQueryMiddlewareConfig;
return {

@@ -196,3 +199,4 @@ type: actionTypes.MUTATE_ASYNC,

update: update,
url: url
url: url,
customQueryMiddlewareConfig: customQueryMiddlewareConfig
};

@@ -199,0 +203,0 @@ };

@@ -8,2 +8,5 @@ "use strict";

function getCookie(name) {
if (!document || !document.cookie) {
return;
}
var value = "; ".concat(document.cookie);

@@ -10,0 +13,0 @@ var parts = value.split("; ".concat(name, "="));

@@ -71,3 +71,4 @@ "use strict";

var returnValue;
var config = _objectSpread(_objectSpread({}, defaultConfig), customConfig);
var customQueryMiddlewareConfigFromAction = action.customQueryMiddlewareConfig || {};
var config = _objectSpread(_objectSpread(_objectSpread({}, defaultConfig), customConfig), customQueryMiddlewareConfigFromAction);
switch (action.type) {

@@ -74,0 +75,0 @@ case actionTypes.REQUEST_ASYNC:

@@ -157,3 +157,4 @@ "use strict";

url = _ref7.url,
unstable_preDispatchCallback = _ref7.unstable_preDispatchCallback;
unstable_preDispatchCallback = _ref7.unstable_preDispatchCallback,
customQueryMiddlewareConfig = _ref7.customQueryMiddlewareConfig;
return {

@@ -170,3 +171,4 @@ type: actionTypes.REQUEST_ASYNC,

url: url,
unstable_preDispatchCallback: unstable_preDispatchCallback
unstable_preDispatchCallback: unstable_preDispatchCallback,
customQueryMiddlewareConfig: customQueryMiddlewareConfig
};

@@ -184,3 +186,4 @@ };

update = _ref8.update,
url = _ref8.url;
url = _ref8.url,
customQueryMiddlewareConfig = _ref8.customQueryMiddlewareConfig;
return {

@@ -196,3 +199,4 @@ type: actionTypes.MUTATE_ASYNC,

update: update,
url: url
url: url,
customQueryMiddlewareConfig: customQueryMiddlewareConfig
};

@@ -199,0 +203,0 @@ };

@@ -8,2 +8,5 @@ "use strict";

function getCookie(name) {
if (!document || !document.cookie) {
return;
}
var value = "; ".concat(document.cookie);

@@ -10,0 +13,0 @@ var parts = value.split("; ".concat(name, "="));

@@ -71,3 +71,4 @@ "use strict";

var returnValue;
var config = _objectSpread(_objectSpread({}, defaultConfig), customConfig);
var customQueryMiddlewareConfigFromAction = action.customQueryMiddlewareConfig || {};
var config = _objectSpread(_objectSpread(_objectSpread({}, defaultConfig), customConfig), customQueryMiddlewareConfigFromAction);
switch (action.type) {

@@ -74,0 +75,0 @@ case actionTypes.REQUEST_ASYNC:

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ReduxQuery=t():e.ReduxQuery=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";var n="undefined"!=typeof JSON?JSON:r(2),o=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},u=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in e)t.call(e,n)&&r.push(n);return r};e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var i,a="boolean"==typeof t.cycles&&t.cycles,s=t.replacer||function(e,t){return t},c=t.cmp&&(i=t.cmp,function(e){return function(t,r){var n={key:t,value:e[t]},o={key:r,value:e[r]};return i(n,o)}}),f=[];return function e(t,i,l,y){var p=r?"\n"+new Array(y+1).join(r):"",d=r?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=s.call(t,i,l))){if("object"!=typeof l||null===l)return n.stringify(l);if(o(l)){for(var b=[],v=0;v<l.length;v++){var m=e(l,v,l[v],y+1)||n.stringify(null);b.push(p+r+m)}return"["+b.join(",")+p+"]"}if(-1!==f.indexOf(l)){if(a)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}f.push(l);var h=u(l).sort(c&&c(l));for(b=[],v=0;v<h.length;v++){var g=e(l,i=h[v],l[i],y+1);if(g){var O=n.stringify(i)+d+g;b.push(p+r+O)}}return f.splice(f.indexOf(l),1),"{"+b.join(",")+p+"}"}}({"":e},"",e,0)}},function(e,t){function r(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=r,r.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},r.prototype.reset=function(){this.attempts=0}},function(e,t,r){"use strict";t.parse=r(3),t.stringify=r(4)},function(e,t,r){"use strict";var n,o,u,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function a(e){throw{name:"SyntaxError",message:e,at:n,text:u}}function s(e){return e&&e!==o&&a("Expected '"+e+"' instead of '"+o+"'"),o=u.charAt(n),n+=1,o}function c(){var e,t="";for("-"===o&&(t="-",s("-"));o>="0"&&o<="9";)t+=o,s();if("."===o)for(t+=".";s()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,s(),"-"!==o&&"+"!==o||(t+=o,s());o>="0"&&o<="9";)t+=o,s();return e=Number(t),isFinite(e)||a("Bad number"),e}function f(){var e,t,r,n="";if('"'===o)for(;s();){if('"'===o)return s(),n;if("\\"===o)if(s(),"u"===o){for(r=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof i[o])break;n+=i[o]}else n+=o}a("Bad string")}function l(){for(;o&&o<=" ";)s()}function y(){switch(l(),o){case"{":return function(){var e,t={};if("{"===o){if(s("{"),l(),"}"===o)return s("}"),t;for(;o;){if(e=f(),l(),s(":"),Object.prototype.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=y(),l(),"}"===o)return s("}"),t;s(","),l()}}a("Bad object")}();case"[":return function(){var e=[];if("["===o){if(s("["),l(),"]"===o)return s("]"),e;for(;o;){if(e.push(y()),l(),"]"===o)return s("]"),e;s(","),l()}}a("Bad array")}();case'"':return f();case"-":return c();default:return o>="0"&&o<="9"?c():function(){switch(o){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:a("Unexpected '"+o+"'")}}()}}e.exports=function(e,t){var r;return u=e,n=0,o=" ",r=y(),l(),o&&a("Syntax error"),"function"==typeof t?function e(r,n){var o,u,i=r[n];if(i&&"object"==typeof i)for(o in y)Object.prototype.hasOwnProperty.call(i,o)&&(void 0===(u=e(i,o))?delete i[o]:i[o]=u);return t.call(r,n,i)}({"":r},""):r}},function(e,t,r){"use strict";var n,o,u,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}e.exports=function(e,t,r){var i;if(n="",o="","number"==typeof r)for(i=0;i<r;i+=1)o+=" ";else"string"==typeof r&&(o=r);if(u=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return function e(t,r){var i,a,c,f,l,y=n,p=r[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof u&&(p=u.call(r,t,p)),typeof p){case"string":return s(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(n+=o,l=[],"[object Array]"===Object.prototype.toString.apply(p)){for(f=p.length,i=0;i<f;i+=1)l[i]=e(i,p)||"null";return c=0===l.length?"[]":n?"[\n"+n+l.join(",\n"+n)+"\n"+y+"]":"["+l.join(",")+"]",n=y,c}if(u&&"object"==typeof u)for(f=u.length,i=0;i<f;i+=1)"string"==typeof(a=u[i])&&(c=e(a,p))&&l.push(s(a)+(n?": ":":")+c);else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(c=e(a,p))&&l.push(s(a)+(n?": ":":")+c);return c=0===l.length?"{}":n?"{\n"+n+l.join(",\n"+n)+"\n"+y+"}":"{"+l.join(",")+"}",n=y,c}}("",{"":e})}},function(e,t,r){"use strict";r.r(t),r.d(t,"getQueryKey",(function(){return O})),r.d(t,"queriesReducer",(function(){return Q})),r.d(t,"entitiesReducer",(function(){return V})),r.d(t,"errorsReducer",(function(){return re})),r.d(t,"queryMiddleware",(function(){return Ae})),r.d(t,"cancelQuery",(function(){return ae})),r.d(t,"mutateAsync",(function(){return ie})),r.d(t,"requestAsync",(function(){return ue})),r.d(t,"updateEntities",(function(){return se})),r.d(t,"actionTypes",(function(){return n})),r.d(t,"errorSelectors",(function(){return o})),r.d(t,"httpMethods",(function(){return m})),r.d(t,"querySelectors",(function(){return u}));var n={};r.r(n),r.d(n,"REQUEST_ASYNC",(function(){return i})),r.d(n,"REQUEST_START",(function(){return a})),r.d(n,"REQUEST_SUCCESS",(function(){return s})),r.d(n,"REQUEST_FAILURE",(function(){return c})),r.d(n,"CANCEL_QUERY",(function(){return f})),r.d(n,"MUTATE_ASYNC",(function(){return l})),r.d(n,"MUTATE_START",(function(){return y})),r.d(n,"MUTATE_SUCCESS",(function(){return p})),r.d(n,"MUTATE_FAILURE",(function(){return d})),r.d(n,"RESET",(function(){return b})),r.d(n,"UPDATE_ENTITIES",(function(){return v}));var o={};r.r(o),r.d(o,"responseBody",(function(){return S})),r.d(o,"responseText",(function(){return j})),r.d(o,"responseHeaders",(function(){return w}));var u={};r.r(u),r.d(u,"getQueryDetails",(function(){return D})),r.d(u,"isFinished",(function(){return k})),r.d(u,"isPending",(function(){return _})),r.d(u,"status",(function(){return U})),r.d(u,"headers",(function(){return C})),r.d(u,"lastUpdated",(function(){return R})),r.d(u,"queryCount",(function(){return K}));var i="@@query/REQUEST_ASYNC",a="@@query/REQUEST_START",s="@@query/REQUEST_SUCCESS",c="@@query/REQUEST_FAILURE",f="@@query/CANCEL_QUERY",l="@@query/MUTATE_ASYNC",y="@@query/MUTATE_START",p="@@query/MUTATE_SUCCESS",d="@@query/MUTATE_FAILURE",b="@@query/RESET",v="@@query/UPDATE_ENTITIES",m={DELETE:"DELETE",GET:"GET",HEAD:"HEAD",POST:"POST",PUT:"PUT",PATCH:"PATCH"},h=r(0),g=r.n(h),O=function(e){if(!e)return null;var t=e.url,r=e.body,n=e.queryKey;return null!=n?n:g()({url:t,body:r})},S=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseBody:null},j=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseText:null},w=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseHeaders:null};var E=function(e,t){return e===t};function P(e,t){var r,n,o="object"==typeof t?t:{equalityCheck:t},u=o.equalityCheck,i=void 0===u?E:u,a=o.maxSize,s=void 0===a?1:a,c=o.resultEqualityCheck,f=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o<n;o++)if(!e(t[o],r[o]))return!1;return!0}}(i),l=1===s?(r=f,{get:function(e){return n&&r(n.key,e)?n.value:"NOT_FOUND"},put:function(e,t){n={key:e,value:t}},getEntries:function(){return n?[n]:[]},clear:function(){n=void 0}}):function(e,t){var r=[];function n(e){var n=r.findIndex((function(r){return t(e,r.key)}));if(n>-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return"NOT_FOUND"}return{get:n,put:function(t,o){"NOT_FOUND"===n(t)&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(s,f);function y(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),c){var r=l.getEntries(),n=r.find((function(e){return c(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return y.clearCache=function(){return l.clear()},y}function q(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function T(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var u,i=0,a={memoizeOptions:void 0},s=n.pop();if("object"==typeof s&&(a=s,s=n.pop()),"function"!=typeof s)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]");var c=a,f=c.memoizeOptions,l=void 0===f?r:f,y=Array.isArray(l)?l:[l],p=q(n),d=e.apply(void 0,[function(){return i++,s.apply(null,arguments)}].concat(y)),b=e((function(){for(var e=[],t=p.length,r=0;r<t;r++)e.push(p[r].apply(null,arguments));return u=d.apply(null,e)}));return Object.assign(b,{resultFunc:s,memoizedResultFunc:d,dependencies:p,lastResult:function(){return u},recomputations:function(){return i},resetRecomputations:function(){return i=0}}),b};return o}var x=T(P),A={isFinished:!1,isPending:!1,headers:null,queryCount:0},D=function(e,t){var r,n=O(t);return n&&null!==(r=null==e?void 0:e[n])&&void 0!==r?r:A},k=x(D,(function(e){return e.isFinished})),_=x(D,(function(e){return e.isPending})),U=x(D,(function(e){return e.status})),C=x(D,(function(e){return e.headers})),R=x(D,(function(e){return e.lastUpdated})),K=x(D,(function(e){return e.queryCount}));function N(e){return(N="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 B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H={},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b:return{};case y:case a:var r=t.queryKey;return M(M({},e),{},F({},r,{isFinished:!1,isPending:!0,isMutation:t.type===y,queryCount:e[r]?e[r].queryCount+1:1}));case s:case d:case p:case c:var n=t.queryKey;return M(M({},e),{},F({},n,M(M({},e[n]),{},{isFinished:!0,isPending:!1,lastUpdated:t.time,status:t.status,headers:t.responseHeaders})));case f:var o=t.queryKey;return o&&e[o].isPending?M(M({},e),{},F({},o,M(M({},e[o]),{},{isFinished:!0,isPending:!1,status:0}))):e;default:return e}},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(e).reduce((function(n,o){return n[o]=e[o](t[o],r[o]),n}),{})},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(r,n){return r[n]=e[n](t[n]),r}),{})};function L(e){return(L="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 Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==L(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===L(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $={},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;return t.type===b?"entities"in t?t.entities:$:t.type===y&&t.optimisticEntities?z(z({},e),t.optimisticEntities):t.type===d&&t.rolledBackEntities?z(z({},e),t.rolledBackEntities):t.type===s||t.type===p?z(z({},e),t.entities):t.type===v?z(z({},e),J(t.update,e)):e};function W(e){return(W="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 X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ee(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te={},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b:return{};case y:case a:var r=t.queryKey,n=Z({},e);return delete n[r],n;case d:case c:var o=t.queryKey;return Z(Z({},e),{},ee({},o,Z(Z({},e[o]),{},{responseBody:t.responseBody,responseText:t.responseText,responseHeaders:t.responseHeaders})));default:return e}},ne=r(1),oe=r.n(ne),ue=function(e){var t=e.body,r=e.force,n=e.meta,o=e.options,u=e.queryKey,a=e.retry,s=e.transform,c=e.update,f=e.url,l=e.unstable_preDispatchCallback;return{type:i,body:t,force:r,queryKey:u,meta:n,options:o,retry:a,transform:s,update:c,url:f,unstable_preDispatchCallback:l}},ie=function(e){var t=e.body,r=e.meta,n=e.optimisticUpdate,o=e.options,u=e.queryKey,i=e.rollback,a=e.transform,s=e.update,c=e.url;return{type:l,body:t,meta:r,optimisticUpdate:n,options:o,queryKey:u,rollback:i,transform:a,update:s,url:c}},ae=function(e){return{type:f,queryKey:e}},se=function(e){return{type:v,update:e}};function ce(e){return(ce="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){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,u=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw u}}}}function le(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}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ce(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ce(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var de=function(e,t){var r,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),o=new Set(t),u=fe(Object.keys(e).filter((function(e){return!o.has(e)})));try{for(u.s();!(r=u.n()).done;){var i=r.value;n.hasOwnProperty(i)&&delete n[i]}}catch(e){u.e(e)}finally{u.f()}return n};function be(e){return(be="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 ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ge(n.key),n)}}function me(e,t,r){return t&&ve(e.prototype,t),r&&ve(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function he(e,t,r){return(t=ge(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ge(e){var t=function(e,t){if("object"!==be(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===be(t)?t:String(t)}var Oe=me((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),he(this,"requests",{rest:{},gql:{}}),he(this,"getShouldStoreRequests",(function(){return"true"===function(e){var t="; ".concat(document.cookie).split("; ".concat(e,"="));if(2===t.length)return t.pop().split(";").shift()}("redux_query_store_requests_for_test_data")})),he(this,"getRequests",(function(){return t.requests})),he(this,"clearRequests",(function(){t.requests={rest:{},gql:{}}})),he(this,"addRequest",(function(e,r,n,o){if(t.getShouldStoreRequests()){var u=null,i=e;if(r&&r.hasOwnProperty("query")){var a=r.query,s=-1!==a.indexOf("(")?a.indexOf("("):a.indexOf(" {");u=a.slice(6,s),t.requests.gql[u]={response:o}}else i=-1!==e.indexOf("?")?e.slice(0,e.indexOf("?")):e,t.requests.rest[i]={method:n,body:r,response:o}}})),this.getShouldStoreRequests()&&(window.getRequestsForTestData=this.getRequests,window.clearRequestsForTestData=this.clearRequests)}));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 je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ee(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Se(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pe={backoff:{maxAttempts:5,minDuration:300,maxDuration:5e3},retryableStatusCodes:[0,408,429,503,504]},qe=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.isPending&&(t[r]=n)}return t},Te=function(e){return null!=e&&e>=200&&e<300},xe=function(e){return e||{}},Ae=function(e,t,r,n){var o={},u=function(e){var t=o[e];t&&(t.abort(),delete o[e])},v=new Oe;return function(h){var g=h.dispatch,S=h.getState;return function(h){return function(j){var w,E=we(we({},Pe),n);switch(j.type){case i:var P=j.url,q=j.body,T=j.force,x=j.retry,A=j.transform,D=void 0===A?xe:A,k=j.update,_=j.options,U=void 0===_?{}:_,C=j.meta;if(!P)throw new Error("Missing required url field for request");var R=O({body:j.body,queryKey:j.queryKey,url:j.url});if(!R)throw new Error("Failed to generate queryKey for request");var K=S(),N=t(K)[R],B=null==N?void 0:N.isPending,M=null==N?void 0:N.status,F=Te(M);(T||!N||x&&!B&&!F)&&(w=new Promise((function(t){var n=new Date,u=U.method,i=void 0===u?m.GET:u,f=0,l=new oe.a({min:E.backoff.minDuration,max:E.backoff.maxDuration});!function u(){var y=e(P,i,{body:q,headers:U.headers,credentials:U.credentials});o[R]=y,g(function(e){var t=e.body,r=e.meta,n=e.queryKey,o=e.url;return{type:a,url:o,body:t,meta:r,queryKey:n}}({body:q,meta:C,queryKey:R,url:P})),f+=1,y.execute((function(e,a,y,p,d){if(v.addRequest(P,q,i,y),E.retryableStatusCodes.includes(a)&&f<E.backoff.maxAttempts)setTimeout(u,l.duration());else{var b,m,h=new Date-n;if(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!Te(a))g(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,s=e.status,f=e.url;return{type:c,url:f,body:t,duration:r,status:s,responseBody:u,responseText:a,responseHeaders:i,meta:n,queryKey:o,time:Date.now()}}({body:q,duration:h,meta:C,queryKey:R,responseBody:y,responseHeaders:d,status:a,responseText:p,url:P})),t({body:y,duration:h,status:a,text:p,headers:d});else{var O=S(),w=r(O);b=D(y,p),m=I(k,w,b),g(function(e){var t=e.body,r=e.duration,n=e.entities,o=e.meta,u=e.queryKey,i=e.responseBody,a=e.responseHeaders,c=e.responseText,f=e.status,l=e.url;return{type:s,url:l,body:t,duration:r,status:f,entities:n,responseBody:i,responseText:c,responseHeaders:a,meta:o,queryKey:u,time:Date.now()}}({body:q,duration:h,meta:C,entities:m,queryKey:R,responseBody:y,responseHeaders:d,status:a,responseText:p,url:P})),t({body:y,duration:h,status:a,text:p,transformed:b,entities:m,headers:d})}delete o[R]}}))}()})));break;case l:var H=j.url,Q=j.transform,L=void 0===Q?xe:Q,Y=j.update,z=j.rollback,G=j.body,$=j.optimisticUpdate,V=j.options,W=void 0===V?{}:V,X=j.meta;if(!H)throw new Error("Missing required url field for mutation");var Z,ee=S(),te=r(ee);$&&(Z=J($,te));var re=O({queryKey:j.queryKey,url:j.url,body:j.body});if(!re)throw new Error("Failed to generate queryKey for mutation");w=new Promise((function(t){var n=new Date,u=W.method,i=void 0===u?m.POST:u,a=e(H,i,{body:G,headers:W.headers,credentials:W.credentials});o[re]=a,g(function(e){var t=e.body,r=e.meta,n=e.optimisticEntities,o=e.queryKey,u=e.url;return{type:y,url:u,body:t,optimisticEntities:n,queryKey:o,meta:r}}({body:G,meta:X,optimisticEntities:Z,queryKey:re,url:H})),a.execute((function(e,u,a,s,c){v.addRequest(H,G,i,a);var f,l,y,b=new Date-n,m=S(),h=r(m);(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!Te(u))?($&&(y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(t).reduce((function(n,o){return e[o]?n[o]=e[o](t[o],r[o]):n[o]=t[o],n}),{})}(z,de(te,Object.keys(Z)),de(h,Object.keys(Z)))),g(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,s=e.rolledBackEntities,c=e.status,f=e.url;return{type:d,url:f,body:t,duration:r,status:c,responseBody:u,responseText:a,responseHeaders:i,rolledBackEntities:s,queryKey:o,time:Date.now(),meta:n}}({body:G,duration:b,meta:X,queryKey:re,responseBody:a,responseHeaders:c,status:u,responseText:s,rolledBackEntities:y,url:H})),t({body:a,duration:b,status:u,text:s,headers:c})):(f=L(a,s),l=I(Y,h,f),g(function(e){var t=e.body,r=e.duration,n=e.entities,o=e.meta,u=e.queryKey,i=e.responseBody,a=e.responseHeaders,s=e.responseText,c=e.status,f=e.url;return{type:p,url:f,body:t,duration:r,status:c,responseBody:i,responseText:s,responseHeaders:a,entities:n,queryKey:u,time:Date.now(),meta:o}}({url:H,body:G,duration:b,status:u,entities:l,queryKey:re,responseBody:a,responseText:s,responseHeaders:c,meta:X})),t({body:a,duration:b,status:u,text:s,transformed:f,entities:l,headers:c}));delete o[re]}))}));break;case f:var ne=j.queryKey;if(!ne)throw new Error("Missing required queryKey field");var ue=S(),ie=t(ue);ne in qe(ie)?(u(ne),w=h(j)):(console.warn("Trying to cancel a request that is not in flight: ",ne),w=null);break;case b:var ae=S(),se=t(ae),ce=qe(se);for(var fe in ce)ce.hasOwnProperty(fe)&&u(fe);w=h(j);break;default:w=h(j)}return w}}}}}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ReduxQuery=t():e.ReduxQuery=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";var n="undefined"!=typeof JSON?JSON:r(2),o=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},u=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in e)t.call(e,n)&&r.push(n);return r};e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var i,a="boolean"==typeof t.cycles&&t.cycles,s=t.replacer||function(e,t){return t},c=t.cmp&&(i=t.cmp,function(e){return function(t,r){var n={key:t,value:e[t]},o={key:r,value:e[r]};return i(n,o)}}),f=[];return function e(t,i,l,y){var p=r?"\n"+new Array(y+1).join(r):"",d=r?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=s.call(t,i,l))){if("object"!=typeof l||null===l)return n.stringify(l);if(o(l)){for(var b=[],v=0;v<l.length;v++){var m=e(l,v,l[v],y+1)||n.stringify(null);b.push(p+r+m)}return"["+b.join(",")+p+"]"}if(-1!==f.indexOf(l)){if(a)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}f.push(l);var h=u(l).sort(c&&c(l));for(b=[],v=0;v<h.length;v++){var g=e(l,i=h[v],l[i],y+1);if(g){var O=n.stringify(i)+d+g;b.push(p+r+O)}}return f.splice(f.indexOf(l),1),"{"+b.join(",")+p+"}"}}({"":e},"",e,0)}},function(e,t){function r(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=r,r.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},r.prototype.reset=function(){this.attempts=0}},function(e,t,r){"use strict";t.parse=r(3),t.stringify=r(4)},function(e,t,r){"use strict";var n,o,u,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function a(e){throw{name:"SyntaxError",message:e,at:n,text:u}}function s(e){return e&&e!==o&&a("Expected '"+e+"' instead of '"+o+"'"),o=u.charAt(n),n+=1,o}function c(){var e,t="";for("-"===o&&(t="-",s("-"));o>="0"&&o<="9";)t+=o,s();if("."===o)for(t+=".";s()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,s(),"-"!==o&&"+"!==o||(t+=o,s());o>="0"&&o<="9";)t+=o,s();return e=Number(t),isFinite(e)||a("Bad number"),e}function f(){var e,t,r,n="";if('"'===o)for(;s();){if('"'===o)return s(),n;if("\\"===o)if(s(),"u"===o){for(r=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof i[o])break;n+=i[o]}else n+=o}a("Bad string")}function l(){for(;o&&o<=" ";)s()}function y(){switch(l(),o){case"{":return function(){var e,t={};if("{"===o){if(s("{"),l(),"}"===o)return s("}"),t;for(;o;){if(e=f(),l(),s(":"),Object.prototype.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=y(),l(),"}"===o)return s("}"),t;s(","),l()}}a("Bad object")}();case"[":return function(){var e=[];if("["===o){if(s("["),l(),"]"===o)return s("]"),e;for(;o;){if(e.push(y()),l(),"]"===o)return s("]"),e;s(","),l()}}a("Bad array")}();case'"':return f();case"-":return c();default:return o>="0"&&o<="9"?c():function(){switch(o){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:a("Unexpected '"+o+"'")}}()}}e.exports=function(e,t){var r;return u=e,n=0,o=" ",r=y(),l(),o&&a("Syntax error"),"function"==typeof t?function e(r,n){var o,u,i=r[n];if(i&&"object"==typeof i)for(o in y)Object.prototype.hasOwnProperty.call(i,o)&&(void 0===(u=e(i,o))?delete i[o]:i[o]=u);return t.call(r,n,i)}({"":r},""):r}},function(e,t,r){"use strict";var n,o,u,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}e.exports=function(e,t,r){var i;if(n="",o="","number"==typeof r)for(i=0;i<r;i+=1)o+=" ";else"string"==typeof r&&(o=r);if(u=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return function e(t,r){var i,a,c,f,l,y=n,p=r[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof u&&(p=u.call(r,t,p)),typeof p){case"string":return s(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(n+=o,l=[],"[object Array]"===Object.prototype.toString.apply(p)){for(f=p.length,i=0;i<f;i+=1)l[i]=e(i,p)||"null";return c=0===l.length?"[]":n?"[\n"+n+l.join(",\n"+n)+"\n"+y+"]":"["+l.join(",")+"]",n=y,c}if(u&&"object"==typeof u)for(f=u.length,i=0;i<f;i+=1)"string"==typeof(a=u[i])&&(c=e(a,p))&&l.push(s(a)+(n?": ":":")+c);else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(c=e(a,p))&&l.push(s(a)+(n?": ":":")+c);return c=0===l.length?"{}":n?"{\n"+n+l.join(",\n"+n)+"\n"+y+"}":"{"+l.join(",")+"}",n=y,c}}("",{"":e})}},function(e,t,r){"use strict";r.r(t),r.d(t,"getQueryKey",(function(){return O})),r.d(t,"queriesReducer",(function(){return Q})),r.d(t,"entitiesReducer",(function(){return V})),r.d(t,"errorsReducer",(function(){return re})),r.d(t,"queryMiddleware",(function(){return Ae})),r.d(t,"cancelQuery",(function(){return ae})),r.d(t,"mutateAsync",(function(){return ie})),r.d(t,"requestAsync",(function(){return ue})),r.d(t,"updateEntities",(function(){return se})),r.d(t,"actionTypes",(function(){return n})),r.d(t,"errorSelectors",(function(){return o})),r.d(t,"httpMethods",(function(){return m})),r.d(t,"querySelectors",(function(){return u}));var n={};r.r(n),r.d(n,"REQUEST_ASYNC",(function(){return i})),r.d(n,"REQUEST_START",(function(){return a})),r.d(n,"REQUEST_SUCCESS",(function(){return s})),r.d(n,"REQUEST_FAILURE",(function(){return c})),r.d(n,"CANCEL_QUERY",(function(){return f})),r.d(n,"MUTATE_ASYNC",(function(){return l})),r.d(n,"MUTATE_START",(function(){return y})),r.d(n,"MUTATE_SUCCESS",(function(){return p})),r.d(n,"MUTATE_FAILURE",(function(){return d})),r.d(n,"RESET",(function(){return b})),r.d(n,"UPDATE_ENTITIES",(function(){return v}));var o={};r.r(o),r.d(o,"responseBody",(function(){return S})),r.d(o,"responseText",(function(){return j})),r.d(o,"responseHeaders",(function(){return w}));var u={};r.r(u),r.d(u,"getQueryDetails",(function(){return D})),r.d(u,"isFinished",(function(){return k})),r.d(u,"isPending",(function(){return C})),r.d(u,"status",(function(){return _})),r.d(u,"headers",(function(){return U})),r.d(u,"lastUpdated",(function(){return R})),r.d(u,"queryCount",(function(){return K}));var i="@@query/REQUEST_ASYNC",a="@@query/REQUEST_START",s="@@query/REQUEST_SUCCESS",c="@@query/REQUEST_FAILURE",f="@@query/CANCEL_QUERY",l="@@query/MUTATE_ASYNC",y="@@query/MUTATE_START",p="@@query/MUTATE_SUCCESS",d="@@query/MUTATE_FAILURE",b="@@query/RESET",v="@@query/UPDATE_ENTITIES",m={DELETE:"DELETE",GET:"GET",HEAD:"HEAD",POST:"POST",PUT:"PUT",PATCH:"PATCH"},h=r(0),g=r.n(h),O=function(e){if(!e)return null;var t=e.url,r=e.body,n=e.queryKey;return null!=n?n:g()({url:t,body:r})},S=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseBody:null},j=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseText:null},w=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseHeaders:null};var E=function(e,t){return e===t};function P(e,t){var r,n,o="object"==typeof t?t:{equalityCheck:t},u=o.equalityCheck,i=void 0===u?E:u,a=o.maxSize,s=void 0===a?1:a,c=o.resultEqualityCheck,f=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o<n;o++)if(!e(t[o],r[o]))return!1;return!0}}(i),l=1===s?(r=f,{get:function(e){return n&&r(n.key,e)?n.value:"NOT_FOUND"},put:function(e,t){n={key:e,value:t}},getEntries:function(){return n?[n]:[]},clear:function(){n=void 0}}):function(e,t){var r=[];function n(e){var n=r.findIndex((function(r){return t(e,r.key)}));if(n>-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return"NOT_FOUND"}return{get:n,put:function(t,o){"NOT_FOUND"===n(t)&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(s,f);function y(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),c){var r=l.getEntries(),n=r.find((function(e){return c(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return y.clearCache=function(){return l.clear()},y}function q(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function T(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var u,i=0,a={memoizeOptions:void 0},s=n.pop();if("object"==typeof s&&(a=s,s=n.pop()),"function"!=typeof s)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]");var c=a,f=c.memoizeOptions,l=void 0===f?r:f,y=Array.isArray(l)?l:[l],p=q(n),d=e.apply(void 0,[function(){return i++,s.apply(null,arguments)}].concat(y)),b=e((function(){for(var e=[],t=p.length,r=0;r<t;r++)e.push(p[r].apply(null,arguments));return u=d.apply(null,e)}));return Object.assign(b,{resultFunc:s,memoizedResultFunc:d,dependencies:p,lastResult:function(){return u},recomputations:function(){return i},resetRecomputations:function(){return i=0}}),b};return o}var x=T(P),A={isFinished:!1,isPending:!1,headers:null,queryCount:0},D=function(e,t){var r,n=O(t);return n&&null!==(r=null==e?void 0:e[n])&&void 0!==r?r:A},k=x(D,(function(e){return e.isFinished})),C=x(D,(function(e){return e.isPending})),_=x(D,(function(e){return e.status})),U=x(D,(function(e){return e.headers})),R=x(D,(function(e){return e.lastUpdated})),K=x(D,(function(e){return e.queryCount}));function N(e){return(N="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 M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H={},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b:return{};case y:case a:var r=t.queryKey;return B(B({},e),{},F({},r,{isFinished:!1,isPending:!0,isMutation:t.type===y,queryCount:e[r]?e[r].queryCount+1:1}));case s:case d:case p:case c:var n=t.queryKey;return B(B({},e),{},F({},n,B(B({},e[n]),{},{isFinished:!0,isPending:!1,lastUpdated:t.time,status:t.status,headers:t.responseHeaders})));case f:var o=t.queryKey;return o&&e[o].isPending?B(B({},e),{},F({},o,B(B({},e[o]),{},{isFinished:!0,isPending:!1,status:0}))):e;default:return e}},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(e).reduce((function(n,o){return n[o]=e[o](t[o],r[o]),n}),{})},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(r,n){return r[n]=e[n](t[n]),r}),{})};function L(e){return(L="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 Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==L(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===L(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $={},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;return t.type===b?"entities"in t?t.entities:$:t.type===y&&t.optimisticEntities?z(z({},e),t.optimisticEntities):t.type===d&&t.rolledBackEntities?z(z({},e),t.rolledBackEntities):t.type===s||t.type===p?z(z({},e),t.entities):t.type===v?z(z({},e),J(t.update,e)):e};function W(e){return(W="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 X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ee(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te={},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case b:return{};case y:case a:var r=t.queryKey,n=Z({},e);return delete n[r],n;case d:case c:var o=t.queryKey;return Z(Z({},e),{},ee({},o,Z(Z({},e[o]),{},{responseBody:t.responseBody,responseText:t.responseText,responseHeaders:t.responseHeaders})));default:return e}},ne=r(1),oe=r.n(ne),ue=function(e){var t=e.body,r=e.force,n=e.meta,o=e.options,u=e.queryKey,a=e.retry,s=e.transform,c=e.update,f=e.url,l=e.unstable_preDispatchCallback,y=e.customQueryMiddlewareConfig;return{type:i,body:t,force:r,queryKey:u,meta:n,options:o,retry:a,transform:s,update:c,url:f,unstable_preDispatchCallback:l,customQueryMiddlewareConfig:y}},ie=function(e){var t=e.body,r=e.meta,n=e.optimisticUpdate,o=e.options,u=e.queryKey,i=e.rollback,a=e.transform,s=e.update,c=e.url,f=e.customQueryMiddlewareConfig;return{type:l,body:t,meta:r,optimisticUpdate:n,options:o,queryKey:u,rollback:i,transform:a,update:s,url:c,customQueryMiddlewareConfig:f}},ae=function(e){return{type:f,queryKey:e}},se=function(e){return{type:v,update:e}};function ce(e){return(ce="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){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return le(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,u=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw u}}}}function le(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}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ce(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ce(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var de=function(e,t){var r,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),o=new Set(t),u=fe(Object.keys(e).filter((function(e){return!o.has(e)})));try{for(u.s();!(r=u.n()).done;){var i=r.value;n.hasOwnProperty(i)&&delete n[i]}}catch(e){u.e(e)}finally{u.f()}return n};function be(e){return(be="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 ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ge(n.key),n)}}function me(e,t,r){return t&&ve(e.prototype,t),r&&ve(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function he(e,t,r){return(t=ge(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ge(e){var t=function(e,t){if("object"!==be(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===be(t)?t:String(t)}var Oe=me((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),he(this,"requests",{rest:{},gql:{}}),he(this,"getShouldStoreRequests",(function(){return"true"===function(e){if(document&&document.cookie){var t="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===t.length?t.pop().split(";").shift():void 0}}("redux_query_store_requests_for_test_data")})),he(this,"getRequests",(function(){return t.requests})),he(this,"clearRequests",(function(){t.requests={rest:{},gql:{}}})),he(this,"addRequest",(function(e,r,n,o){if(t.getShouldStoreRequests()){var u=null,i=e;if(r&&r.hasOwnProperty("query")){var a=r.query,s=-1!==a.indexOf("(")?a.indexOf("("):a.indexOf(" {");u=a.slice(6,s),t.requests.gql[u]={response:o}}else i=-1!==e.indexOf("?")?e.slice(0,e.indexOf("?")):e,t.requests.rest[i]={method:n,body:r,response:o}}})),this.getShouldStoreRequests()&&(window.getRequestsForTestData=this.getRequests,window.clearRequestsForTestData=this.clearRequests)}));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 je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){Ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ee(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Se(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pe={backoff:{maxAttempts:5,minDuration:300,maxDuration:5e3},retryableStatusCodes:[0,408,429,503,504]},qe=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.isPending&&(t[r]=n)}return t},Te=function(e){return null!=e&&e>=200&&e<300},xe=function(e){return e||{}},Ae=function(e,t,r,n){var o={},u=function(e){var t=o[e];t&&(t.abort(),delete o[e])},v=new Oe;return function(h){var g=h.dispatch,S=h.getState;return function(h){return function(j){var w,E=j.customQueryMiddlewareConfig||{},P=we(we(we({},Pe),n),E);switch(j.type){case i:var q=j.url,T=j.body,x=j.force,A=j.retry,D=j.transform,k=void 0===D?xe:D,C=j.update,_=j.options,U=void 0===_?{}:_,R=j.meta;if(!q)throw new Error("Missing required url field for request");var K=O({body:j.body,queryKey:j.queryKey,url:j.url});if(!K)throw new Error("Failed to generate queryKey for request");var N=S(),M=t(N)[K],B=null==M?void 0:M.isPending,F=null==M?void 0:M.status,H=Te(F);(x||!M||A&&!B&&!H)&&(w=new Promise((function(t){var n=new Date,u=U.method,i=void 0===u?m.GET:u,f=0,l=new oe.a({min:P.backoff.minDuration,max:P.backoff.maxDuration});!function u(){var y=e(q,i,{body:T,headers:U.headers,credentials:U.credentials});o[K]=y,g(function(e){var t=e.body,r=e.meta,n=e.queryKey,o=e.url;return{type:a,url:o,body:t,meta:r,queryKey:n}}({body:T,meta:R,queryKey:K,url:q})),f+=1,y.execute((function(e,a,y,p,d){if(v.addRequest(q,T,i,y),P.retryableStatusCodes.includes(a)&&f<P.backoff.maxAttempts)setTimeout(u,l.duration());else{var b,m,h=new Date-n;if(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!Te(a))g(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,s=e.status,f=e.url;return{type:c,url:f,body:t,duration:r,status:s,responseBody:u,responseText:a,responseHeaders:i,meta:n,queryKey:o,time:Date.now()}}({body:T,duration:h,meta:R,queryKey:K,responseBody:y,responseHeaders:d,status:a,responseText:p,url:q})),t({body:y,duration:h,status:a,text:p,headers:d});else{var O=S(),w=r(O);b=k(y,p),m=I(C,w,b),g(function(e){var t=e.body,r=e.duration,n=e.entities,o=e.meta,u=e.queryKey,i=e.responseBody,a=e.responseHeaders,c=e.responseText,f=e.status,l=e.url;return{type:s,url:l,body:t,duration:r,status:f,entities:n,responseBody:i,responseText:c,responseHeaders:a,meta:o,queryKey:u,time:Date.now()}}({body:T,duration:h,meta:R,entities:m,queryKey:K,responseBody:y,responseHeaders:d,status:a,responseText:p,url:q})),t({body:y,duration:h,status:a,text:p,transformed:b,entities:m,headers:d})}delete o[K]}}))}()})));break;case l:var Q=j.url,L=j.transform,Y=void 0===L?xe:L,z=j.update,G=j.rollback,$=j.body,V=j.optimisticUpdate,W=j.options,X=void 0===W?{}:W,Z=j.meta;if(!Q)throw new Error("Missing required url field for mutation");var ee,te=S(),re=r(te);V&&(ee=J(V,re));var ne=O({queryKey:j.queryKey,url:j.url,body:j.body});if(!ne)throw new Error("Failed to generate queryKey for mutation");w=new Promise((function(t){var n=new Date,u=X.method,i=void 0===u?m.POST:u,a=e(Q,i,{body:$,headers:X.headers,credentials:X.credentials});o[ne]=a,g(function(e){var t=e.body,r=e.meta,n=e.optimisticEntities,o=e.queryKey,u=e.url;return{type:y,url:u,body:t,optimisticEntities:n,queryKey:o,meta:r}}({body:$,meta:Z,optimisticEntities:ee,queryKey:ne,url:Q})),a.execute((function(e,u,a,s,c){v.addRequest(Q,$,i,a);var f,l,y,b=new Date-n,m=S(),h=r(m);(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!Te(u))?(V&&(y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(t).reduce((function(n,o){return e[o]?n[o]=e[o](t[o],r[o]):n[o]=t[o],n}),{})}(G,de(re,Object.keys(ee)),de(h,Object.keys(ee)))),g(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,s=e.rolledBackEntities,c=e.status,f=e.url;return{type:d,url:f,body:t,duration:r,status:c,responseBody:u,responseText:a,responseHeaders:i,rolledBackEntities:s,queryKey:o,time:Date.now(),meta:n}}({body:$,duration:b,meta:Z,queryKey:ne,responseBody:a,responseHeaders:c,status:u,responseText:s,rolledBackEntities:y,url:Q})),t({body:a,duration:b,status:u,text:s,headers:c})):(f=Y(a,s),l=I(z,h,f),g(function(e){var t=e.body,r=e.duration,n=e.entities,o=e.meta,u=e.queryKey,i=e.responseBody,a=e.responseHeaders,s=e.responseText,c=e.status,f=e.url;return{type:p,url:f,body:t,duration:r,status:c,responseBody:i,responseText:s,responseHeaders:a,entities:n,queryKey:u,time:Date.now(),meta:o}}({url:Q,body:$,duration:b,status:u,entities:l,queryKey:ne,responseBody:a,responseText:s,responseHeaders:c,meta:Z})),t({body:a,duration:b,status:u,text:s,transformed:f,entities:l,headers:c}));delete o[ne]}))}));break;case f:var ue=j.queryKey;if(!ue)throw new Error("Missing required queryKey field");var ie=S(),ae=t(ie);ue in qe(ae)?(u(ue),w=h(j)):(console.warn("Trying to cancel a request that is not in flight: ",ue),w=null);break;case b:var se=S(),ce=t(se),fe=qe(ce);for(var le in fe)fe.hasOwnProperty(le)&&u(le);w=h(j);break;default:w=h(j)}return w}}}}}])}));

@@ -42,11 +42,11 @@ declare module 'redux-query' {

export type Update<TEntities = Entities> = {
[K in keyof TEntities]?: UpdateStrategy<TEntities[K]>
[K in keyof TEntities]?: UpdateStrategy<TEntities[K]>;
};
export type OptimisticUpdate<TEntities = Entities> = {
[K in keyof TEntities]?: OptimisticUpdateStrategy<TEntities[K]>
[K in keyof TEntities]?: OptimisticUpdateStrategy<TEntities[K]>;
};
export type Rollback<TEntities = Entities> = {
[K in keyof TEntities]?: RollbackStrategy<TEntities[K]>
[K in keyof TEntities]?: RollbackStrategy<TEntities[K]>;
};

@@ -162,2 +162,11 @@

export type QueryMiddlewareConfig = {
backoff: {
maxAttempts: number;
minDuration: number;
maxDuration: number;
};
retryableStatusCodes: Array<Status>;
};
export interface QueryConfig<TEntities = Entities> {

@@ -176,2 +185,3 @@ body?: RequestBody;

url: Url;
customQueryMiddlewareConfig?: QueryMiddlewareConfig;
}

@@ -178,0 +188,0 @@

{
"name": "redux-query",
"version": "3.6.0",
"version": "3.6.1-rc.1",
"description": "A library for querying and managing network state in Redux applications",

@@ -74,3 +74,3 @@ "homepage": "https://github.com/amplitude/redux-query",

},
"gitHead": "266df9d57e3414f358c7c2c1c5efcc4e5a37a5a6"
"gitHead": "6937a1967c90ba7316fe351161d156334d3e3a3a"
}

@@ -279,2 +279,3 @@ // @flow

unstable_preDispatchCallback,
customQueryMiddlewareConfig,
}: QueryConfig): RequestAsyncAction => {

@@ -293,2 +294,3 @@ return {

unstable_preDispatchCallback,
customQueryMiddlewareConfig,
};

@@ -312,2 +314,3 @@ };

url,
customQueryMiddlewareConfig,
}: QueryConfig): MutateAsyncAction => {

@@ -325,2 +328,3 @@ return {

url,
customQueryMiddlewareConfig,
};

@@ -327,0 +331,0 @@ };

// @flow
export function getCookie(name: string) {
if (!document || !document.cookie) {
return;
}
const value = `; ${document.cookie}`;

@@ -5,0 +8,0 @@ const parts = value.split(`; ${name}=`);

@@ -32,13 +32,5 @@ // @flow

Transform,
QueryMiddlewareConfig,
} from '../types';
type Config = {|
backoff: {|
maxAttempts: number,
minDuration: number,
maxDuration: number,
|},
retryableStatusCodes: Array<Status>,
|};
type ReduxStore = {|

@@ -51,3 +43,3 @@ dispatch: (action: Action) => any,

const defaultConfig: Config = {
const defaultConfig: QueryMiddlewareConfig = {
backoff: {

@@ -110,3 +102,4 @@ maxAttempts: 5,

let returnValue;
const config = { ...defaultConfig, ...customConfig };
const customQueryMiddlewareConfigFromAction = action.customQueryMiddlewareConfig || {};
const config = { ...defaultConfig, ...customConfig, ...customQueryMiddlewareConfigFromAction };

@@ -113,0 +106,0 @@ switch (action.type) {

@@ -16,2 +16,11 @@ // @flow

export type QueryMiddlewareConfig = {|
backoff: {|
maxAttempts: number,
minDuration: number,
maxDuration: number,
|},
retryableStatusCodes: Array<Status>,
|};
export type QueryConfig = {|

@@ -30,2 +39,3 @@ body?: RequestBody,

url: Url,
customQueryMiddlewareConfig?: QueryMiddlewareConfig,
|};

@@ -32,0 +42,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc