redux-query
Advanced tools
Comparing version 3.5.1-alpha.1 to 3.5.1
@@ -63,5 +63,5 @@ "use strict"; | ||
}; | ||
return function (_ref3) { | ||
var dispatch = _ref3.dispatch, | ||
getState = _ref3.getState; | ||
return function (_ref) { | ||
var dispatch = _ref.dispatch, | ||
getState = _ref.getState; | ||
return function (next) { | ||
@@ -74,3 +74,2 @@ return function (action) { | ||
{ | ||
var _ref, _ref2; | ||
var url = action.url, | ||
@@ -100,4 +99,4 @@ body = action.body, | ||
var queriesState = queries[queryKey]; | ||
var isPending = (_ref2 = queriesState) != null ? _ref2.isPending : _ref2; | ||
var status = (_ref = queriesState) != null ? _ref.status : _ref; | ||
var isPending = queriesState === null || queriesState === void 0 ? void 0 : queriesState.isPending; | ||
var status = queriesState === null || queriesState === void 0 ? void 0 : queriesState.status; | ||
var hasSucceeded = isStatusOk(status); | ||
@@ -104,0 +103,0 @@ if (force || !queriesState || retry && !isPending && !hasSucceeded) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
var responseBody = function responseBody(errorsState, queryConfig) { | ||
var _ref3; | ||
var _errorsState$queryKey; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -15,7 +15,7 @@ if (!queryKey) { | ||
} | ||
return (_ref3 = errorsState) != null ? (_ref3 = _ref3[queryKey]) != null ? _ref3.responseBody : _ref3 : _ref3; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey = errorsState[queryKey]) === null || _errorsState$queryKey === void 0 ? void 0 : _errorsState$queryKey.responseBody; | ||
}; | ||
exports.responseBody = responseBody; | ||
var responseText = function responseText(errorsState, queryConfig) { | ||
var _ref2; | ||
var _errorsState$queryKey2; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -25,7 +25,7 @@ if (!queryKey) { | ||
} | ||
return (_ref2 = errorsState) != null ? (_ref2 = _ref2[queryKey]) != null ? _ref2.responseText : _ref2 : _ref2; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey2 = errorsState[queryKey]) === null || _errorsState$queryKey2 === void 0 ? void 0 : _errorsState$queryKey2.responseText; | ||
}; | ||
exports.responseText = responseText; | ||
var responseHeaders = function responseHeaders(errorsState, queryConfig) { | ||
var _ref; | ||
var _errorsState$queryKey3; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -35,4 +35,4 @@ if (!queryKey) { | ||
} | ||
return (_ref = errorsState) != null ? (_ref = _ref[queryKey]) != null ? _ref.responseHeaders : _ref : _ref; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey3 = errorsState[queryKey]) === null || _errorsState$queryKey3 === void 0 ? void 0 : _errorsState$queryKey3.responseHeaders; | ||
}; | ||
exports.responseHeaders = responseHeaders; |
@@ -16,3 +16,3 @@ "use strict"; | ||
var getQueryDetails = function getQueryDetails(queriesState, queryConfig) { | ||
var _ref; | ||
var _queriesState$queryKe; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -22,3 +22,3 @@ if (!queryKey) { | ||
} | ||
return ((_ref = queriesState) != null ? _ref[queryKey] : _ref) || defaultDetailsObject; | ||
return (_queriesState$queryKe = queriesState === null || queriesState === void 0 ? void 0 : queriesState[queryKey]) !== null && _queriesState$queryKe !== void 0 ? _queriesState$queryKe : defaultDetailsObject; | ||
}; | ||
@@ -25,0 +25,0 @@ exports.getQueryDetails = getQueryDetails; |
@@ -63,5 +63,5 @@ "use strict"; | ||
}; | ||
return function (_ref3) { | ||
var dispatch = _ref3.dispatch, | ||
getState = _ref3.getState; | ||
return function (_ref) { | ||
var dispatch = _ref.dispatch, | ||
getState = _ref.getState; | ||
return function (next) { | ||
@@ -74,3 +74,2 @@ return function (action) { | ||
{ | ||
var _ref, _ref2; | ||
var url = action.url, | ||
@@ -100,4 +99,4 @@ body = action.body, | ||
var queriesState = queries[queryKey]; | ||
var isPending = (_ref2 = queriesState) != null ? _ref2.isPending : _ref2; | ||
var status = (_ref = queriesState) != null ? _ref.status : _ref; | ||
var isPending = queriesState === null || queriesState === void 0 ? void 0 : queriesState.isPending; | ||
var status = queriesState === null || queriesState === void 0 ? void 0 : queriesState.status; | ||
var hasSucceeded = isStatusOk(status); | ||
@@ -104,0 +103,0 @@ if (force || !queriesState || retry && !isPending && !hasSucceeded) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
var responseBody = function responseBody(errorsState, queryConfig) { | ||
var _ref3; | ||
var _errorsState$queryKey; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -15,7 +15,7 @@ if (!queryKey) { | ||
} | ||
return (_ref3 = errorsState) != null ? (_ref3 = _ref3[queryKey]) != null ? _ref3.responseBody : _ref3 : _ref3; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey = errorsState[queryKey]) === null || _errorsState$queryKey === void 0 ? void 0 : _errorsState$queryKey.responseBody; | ||
}; | ||
exports.responseBody = responseBody; | ||
var responseText = function responseText(errorsState, queryConfig) { | ||
var _ref2; | ||
var _errorsState$queryKey2; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -25,7 +25,7 @@ if (!queryKey) { | ||
} | ||
return (_ref2 = errorsState) != null ? (_ref2 = _ref2[queryKey]) != null ? _ref2.responseText : _ref2 : _ref2; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey2 = errorsState[queryKey]) === null || _errorsState$queryKey2 === void 0 ? void 0 : _errorsState$queryKey2.responseText; | ||
}; | ||
exports.responseText = responseText; | ||
var responseHeaders = function responseHeaders(errorsState, queryConfig) { | ||
var _ref; | ||
var _errorsState$queryKey3; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -35,4 +35,4 @@ if (!queryKey) { | ||
} | ||
return (_ref = errorsState) != null ? (_ref = _ref[queryKey]) != null ? _ref.responseHeaders : _ref : _ref; | ||
return errorsState === null || errorsState === void 0 ? void 0 : (_errorsState$queryKey3 = errorsState[queryKey]) === null || _errorsState$queryKey3 === void 0 ? void 0 : _errorsState$queryKey3.responseHeaders; | ||
}; | ||
exports.responseHeaders = responseHeaders; |
@@ -16,3 +16,3 @@ "use strict"; | ||
var getQueryDetails = function getQueryDetails(queriesState, queryConfig) { | ||
var _ref; | ||
var _queriesState$queryKe; | ||
var queryKey = (0, _queryKey.getQueryKey)(queryConfig); | ||
@@ -22,3 +22,3 @@ if (!queryKey) { | ||
} | ||
return ((_ref = queriesState) != null ? _ref[queryKey] : _ref) || defaultDetailsObject; | ||
return (_queriesState$queryKe = queriesState === null || queriesState === void 0 ? void 0 : queriesState[queryKey]) !== null && _queriesState$queryKe !== void 0 ? _queriesState$queryKe : defaultDetailsObject; | ||
}; | ||
@@ -25,0 +25,0 @@ exports.getQueryDetails = getQueryDetails; |
@@ -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,c=t.replacer||function(e,t){return t},s=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=c.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(s&&s(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 c(e){return e&&e!==o&&a("Expected '"+e+"' instead of '"+o+"'"),o=u.charAt(n),n+=1,o}function s(){var e,t="";for("-"===o&&(t="-",c("-"));o>="0"&&o<="9";)t+=o,c();if("."===o)for(t+=".";c()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,c(),"-"!==o&&"+"!==o||(t+=o,c());o>="0"&&o<="9";)t+=o,c();return e=Number(t),isFinite(e)||a("Bad number"),e}function f(){var e,t,r,n="";if('"'===o)for(;c();){if('"'===o)return c(),n;if("\\"===o)if(c(),"u"===o){for(r=0,t=0;t<4&&(e=parseInt(c(),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<=" ";)c()}function y(){switch(l(),o){case"{":return function(){var e,t={};if("{"===o){if(c("{"),l(),"}"===o)return c("}"),t;for(;o;){if(e=f(),l(),c(":"),Object.prototype.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=y(),l(),"}"===o)return c("}"),t;c(","),l()}}a("Bad object")}();case"[":return function(){var e=[];if("["===o){if(c("["),l(),"]"===o)return c("]"),e;for(;o;){if(e.push(y()),l(),"]"===o)return c("]"),e;c(","),l()}}a("Bad array")}();case'"':return f();case"-":return s();default:return o>="0"&&o<="9"?s():function(){switch(o){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("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 c(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,s,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 c(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 s=0===l.length?"[]":n?"[\n"+n+l.join(",\n"+n)+"\n"+y+"]":"["+l.join(",")+"]",n=y,s}if(u&&"object"==typeof u)for(f=u.length,i=0;i<f;i+=1)"string"==typeof(a=u[i])&&(s=e(a,p))&&l.push(c(a)+(n?": ":":")+s);else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(s=e(a,p))&&l.push(c(a)+(n?": ":":")+s);return s=0===l.length?"{}":n?"{\n"+n+l.join(",\n"+n)+"\n"+y+"}":"{"+l.join(",")+"}",n=y,s}}("",{"":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 we})),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 ce})),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 c})),r.d(n,"REQUEST_FAILURE",(function(){return s})),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 j})),r.d(o,"responseText",(function(){return S})),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 U})),r.d(u,"status",(function(){return C})),r.d(u,"headers",(function(){return _})),r.d(u,"lastUpdated",(function(){return K})),r.d(u,"queryCount",(function(){return N}));var i="@@query/REQUEST_ASYNC",a="@@query/REQUEST_START",c="@@query/REQUEST_SUCCESS",s="@@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})},j=function(e,t){var r,n=O(t);return n?null!=(r=e)&&null!=(r=r[n])?r.responseBody:r:null},S=function(e,t){var r,n=O(t);return n?null!=(r=e)&&null!=(r=r[n])?r.responseText:r:null},w=function(e,t){var r,n=O(t);return n?null!=(r=e)&&null!=(r=r[n])?r.responseHeaders:r: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,c=void 0===a?1:a,s=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===c?(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=[]}}}(c,f);function y(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),s){var r=l.getEntries(),n=r.find((function(e){return s(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return y.clearCache=function(){return l.clear()},y}function T(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 q(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},c=n.pop();if("object"==typeof c&&(a=c,c=n.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var s=a,f=s.memoizeOptions,l=void 0===f?r:f,y=Array.isArray(l)?l:[l],p=T(n),d=e.apply(void 0,[function(){return i++,c.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:c,memoizedResultFunc:d,dependencies:p,lastResult:function(){return u},recomputations:function(){return i},resetRecomputations:function(){return i=0}}),b};return o}var x=q(P),A={isFinished:!1,isPending:!1,headers:null,queryCount:0},D=function(e,t){var r,n=O(t);return n&&(null!=(r=e)?r[n]:r)||A},k=x(D,(function(e){return e.isFinished})),U=x(D,(function(e){return e.isPending})),C=x(D,(function(e){return e.status})),_=x(D,(function(e){return e.headers})),K=x(D,(function(e){return e.lastUpdated})),N=x(D,(function(e){return e.queryCount}));function R(e){return(R="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"!==R(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===R(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 c:case d:case p:case s: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===c||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 s: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,c=e.transform,s=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:c,update:s,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,c=e.update,s=e.url;return{type:l,body:t,meta:r,optimisticUpdate:n,options:o,queryKey:u,rollback:i,transform:a,update:c,url:s}},ae=function(e){return{type:f,queryKey:e}},ce=function(e){return{type:v,update:e}};function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){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"!==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 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){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 me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){he(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function he(e,t,r){return(t=function(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)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ge={backoff:{maxAttempts:5,minDuration:300,maxDuration:5e3},retryableStatusCodes:[0,408,429,503,504]},Oe=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.isPending&&(t[r]=n)}return t},je=function(e){return null!=e&&e>=200&&e<300},Se=function(e){return e||{}},we=function(e,t,r,n){var o={},u=function(e){var t=o[e];t&&(t.abort(),delete o[e])};return function(v){var h=v.dispatch,g=v.getState;return function(v){return function(j){var S,w=me(me({},ge),n);switch(j.type){case i:var E,P,T=j.url,q=j.body,x=j.force,A=j.retry,D=j.transform,k=void 0===D?Se:D,U=j.update,C=j.options,_=void 0===C?{}:C,K=j.meta;if(!T)throw new Error("Missing required url field for request");var N=O({body:j.body,queryKey:j.queryKey,url:j.url});if(!N)throw new Error("Failed to generate queryKey for request");var R=g(),B=t(R)[N],M=null!=(P=B)?P.isPending:P,F=null!=(E=B)?E.status:E,H=je(F);(x||!B||A&&!M&&!H)&&(S=new Promise((function(t){var n=new Date,u=_.method,i=void 0===u?m.GET:u,f=0,l=new oe.a({min:w.backoff.minDuration,max:w.backoff.maxDuration});!function u(){var y=e(T,i,{body:q,headers:_.headers,credentials:_.credentials});o[N]=y,h(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:K,queryKey:N,url:T})),f+=1,y.execute((function(e,i,a,y,p){if(w.retryableStatusCodes.includes(i)&&f<w.backoff.maxAttempts)setTimeout(u,l.duration());else{var d,b,v=new Date-n;if(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!je(i))h(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,c=e.status,f=e.url;return{type:s,url:f,body:t,duration:r,status:c,responseBody:u,responseText:a,responseHeaders:i,meta:n,queryKey:o,time:Date.now()}}({body:q,duration:v,meta:K,queryKey:N,responseBody:a,responseHeaders:p,status:i,responseText:y,url:T})),t({body:a,duration:v,status:i,text:y,headers:p});else{var m=g(),O=r(m);d=k(a,y),b=I(U,O,d),h(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,f=e.status,l=e.url;return{type:c,url:l,body:t,duration:r,status:f,entities:n,responseBody:i,responseText:s,responseHeaders:a,meta:o,queryKey:u,time:Date.now()}}({body:q,duration:v,meta:K,entities:b,queryKey:N,responseBody:a,responseHeaders:p,status:i,responseText:y,url:T})),t({body:a,duration:v,status:i,text:y,transformed:d,entities:b,headers:p})}delete o[N]}}))}()})));break;case l:var Q=j.url,L=j.transform,Y=void 0===L?Se: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=g(),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");S=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,h(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,i,a,c){var s,f,l,y=new Date-n,b=g(),v=r(b);(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!je(u))?(V&&(l=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(v,Object.keys(ee)))),h(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,c=e.rolledBackEntities,s=e.status,f=e.url;return{type:d,url:f,body:t,duration:r,status:s,responseBody:u,responseText:a,responseHeaders:i,rolledBackEntities:c,queryKey:o,time:Date.now(),meta:n}}({body:$,duration:y,meta:Z,queryKey:ne,responseBody:i,responseHeaders:c,status:u,responseText:a,rolledBackEntities:l,url:Q})),t({body:i,duration:y,status:u,text:a,headers:c})):(s=Y(i,a),f=I(z,v,s),h(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,s=e.status,f=e.url;return{type:p,url:f,body:t,duration:r,status:s,responseBody:i,responseText:c,responseHeaders:a,entities:n,queryKey:u,time:Date.now(),meta:o}}({url:Q,body:$,duration:y,status:u,entities:f,queryKey:ne,responseBody:i,responseText:a,responseHeaders:c,meta:Z})),t({body:i,duration:y,status:u,text:a,transformed:s,entities:f,headers:c}));delete o[ne]}))}));break;case f:var ue=j.queryKey;if(!ue)throw new Error("Missing required queryKey field");var ie=g(),ae=t(ie);ue in Oe(ae)?(u(ue),S=v(j)):(console.warn("Trying to cancel a request that is not in flight: ",ue),S=null);break;case b:var ce=g(),se=t(ce),fe=Oe(se);for(var le in fe)fe.hasOwnProperty(le)&&u(le);S=v(j);break;default:S=v(j)}return S}}}}}])})); | ||
!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,c=t.replacer||function(e,t){return t},s=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=c.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(s&&s(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 c(e){return e&&e!==o&&a("Expected '"+e+"' instead of '"+o+"'"),o=u.charAt(n),n+=1,o}function s(){var e,t="";for("-"===o&&(t="-",c("-"));o>="0"&&o<="9";)t+=o,c();if("."===o)for(t+=".";c()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,c(),"-"!==o&&"+"!==o||(t+=o,c());o>="0"&&o<="9";)t+=o,c();return e=Number(t),isFinite(e)||a("Bad number"),e}function f(){var e,t,r,n="";if('"'===o)for(;c();){if('"'===o)return c(),n;if("\\"===o)if(c(),"u"===o){for(r=0,t=0;t<4&&(e=parseInt(c(),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<=" ";)c()}function y(){switch(l(),o){case"{":return function(){var e,t={};if("{"===o){if(c("{"),l(),"}"===o)return c("}"),t;for(;o;){if(e=f(),l(),c(":"),Object.prototype.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=y(),l(),"}"===o)return c("}"),t;c(","),l()}}a("Bad object")}();case"[":return function(){var e=[];if("["===o){if(c("["),l(),"]"===o)return c("]"),e;for(;o;){if(e.push(y()),l(),"]"===o)return c("]"),e;c(","),l()}}a("Bad array")}();case'"':return f();case"-":return s();default:return o>="0"&&o<="9"?s():function(){switch(o){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("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 c(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,s,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 c(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 s=0===l.length?"[]":n?"[\n"+n+l.join(",\n"+n)+"\n"+y+"]":"["+l.join(",")+"]",n=y,s}if(u&&"object"==typeof u)for(f=u.length,i=0;i<f;i+=1)"string"==typeof(a=u[i])&&(s=e(a,p))&&l.push(c(a)+(n?": ":":")+s);else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(s=e(a,p))&&l.push(c(a)+(n?": ":":")+s);return s=0===l.length?"{}":n?"{\n"+n+l.join(",\n"+n)+"\n"+y+"}":"{"+l.join(",")+"}",n=y,s}}("",{"":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 we})),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 ce})),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 c})),r.d(n,"REQUEST_FAILURE",(function(){return s})),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 j})),r.d(o,"responseText",(function(){return S})),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 U})),r.d(u,"status",(function(){return C})),r.d(u,"headers",(function(){return _})),r.d(u,"lastUpdated",(function(){return K})),r.d(u,"queryCount",(function(){return N}));var i="@@query/REQUEST_ASYNC",a="@@query/REQUEST_START",c="@@query/REQUEST_SUCCESS",s="@@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})},j=function(e,t){var r,n=O(t);return n?null==e||null===(r=e[n])||void 0===r?void 0:r.responseBody:null},S=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,c=void 0===a?1:a,s=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===c?(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=[]}}}(c,f);function y(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),s){var r=l.getEntries(),n=r.find((function(e){return s(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return y.clearCache=function(){return l.clear()},y}function T(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 q(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},c=n.pop();if("object"==typeof c&&(a=c,c=n.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var s=a,f=s.memoizeOptions,l=void 0===f?r:f,y=Array.isArray(l)?l:[l],p=T(n),d=e.apply(void 0,[function(){return i++,c.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:c,memoizedResultFunc:d,dependencies:p,lastResult:function(){return u},recomputations:function(){return i},resetRecomputations:function(){return i=0}}),b};return o}var x=q(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})),U=x(D,(function(e){return e.isPending})),C=x(D,(function(e){return e.status})),_=x(D,(function(e){return e.headers})),K=x(D,(function(e){return e.lastUpdated})),N=x(D,(function(e){return e.queryCount}));function R(e){return(R="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"!==R(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===R(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 c:case d:case p:case s: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===c||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 s: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,c=e.transform,s=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:c,update:s,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,c=e.update,s=e.url;return{type:l,body:t,meta:r,optimisticUpdate:n,options:o,queryKey:u,rollback:i,transform:a,update:c,url:s}},ae=function(e){return{type:f,queryKey:e}},ce=function(e){return{type:v,update:e}};function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){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"!==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 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){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 me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){he(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function he(e,t,r){return(t=function(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)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ge={backoff:{maxAttempts:5,minDuration:300,maxDuration:5e3},retryableStatusCodes:[0,408,429,503,504]},Oe=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.isPending&&(t[r]=n)}return t},je=function(e){return null!=e&&e>=200&&e<300},Se=function(e){return e||{}},we=function(e,t,r,n){var o={},u=function(e){var t=o[e];t&&(t.abort(),delete o[e])};return function(v){var h=v.dispatch,g=v.getState;return function(v){return function(j){var S,w=me(me({},ge),n);switch(j.type){case i:var E=j.url,P=j.body,T=j.force,q=j.retry,x=j.transform,A=void 0===x?Se:x,D=j.update,k=j.options,U=void 0===k?{}:k,C=j.meta;if(!E)throw new Error("Missing required url field for request");var _=O({body:j.body,queryKey:j.queryKey,url:j.url});if(!_)throw new Error("Failed to generate queryKey for request");var K=g(),N=t(K)[_],R=null==N?void 0:N.isPending,B=null==N?void 0:N.status,M=je(B);(T||!N||q&&!R&&!M)&&(S=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:w.backoff.minDuration,max:w.backoff.maxDuration});!function u(){var y=e(E,i,{body:P,headers:U.headers,credentials:U.credentials});o[_]=y,h(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:P,meta:C,queryKey:_,url:E})),f+=1,y.execute((function(e,i,a,y,p){if(w.retryableStatusCodes.includes(i)&&f<w.backoff.maxAttempts)setTimeout(u,l.duration());else{var d,b,v=new Date-n;if(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!je(i))h(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,c=e.status,f=e.url;return{type:s,url:f,body:t,duration:r,status:c,responseBody:u,responseText:a,responseHeaders:i,meta:n,queryKey:o,time:Date.now()}}({body:P,duration:v,meta:C,queryKey:_,responseBody:a,responseHeaders:p,status:i,responseText:y,url:E})),t({body:a,duration:v,status:i,text:y,headers:p});else{var m=g(),O=r(m);d=A(a,y),b=I(D,O,d),h(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,f=e.status,l=e.url;return{type:c,url:l,body:t,duration:r,status:f,entities:n,responseBody:i,responseText:s,responseHeaders:a,meta:o,queryKey:u,time:Date.now()}}({body:P,duration:v,meta:C,entities:b,queryKey:_,responseBody:a,responseHeaders:p,status:i,responseText:y,url:E})),t({body:a,duration:v,status:i,text:y,transformed:d,entities:b,headers:p})}delete o[_]}}))}()})));break;case l:var F=j.url,H=j.transform,Q=void 0===H?Se:H,L=j.update,Y=j.rollback,z=j.body,G=j.optimisticUpdate,$=j.options,V=void 0===$?{}:$,W=j.meta;if(!F)throw new Error("Missing required url field for mutation");var X,Z=g(),ee=r(Z);G&&(X=J(G,ee));var te=O({queryKey:j.queryKey,url:j.url,body:j.body});if(!te)throw new Error("Failed to generate queryKey for mutation");S=new Promise((function(t){var n=new Date,u=V.method,i=void 0===u?m.POST:u,a=e(F,i,{body:z,headers:V.headers,credentials:V.credentials});o[te]=a,h(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:z,meta:W,optimisticEntities:X,queryKey:te,url:F})),a.execute((function(e,u,i,a,c){var s,f,l,y=new Date-n,b=g(),v=r(b);(j.unstable_preDispatchCallback&&j.unstable_preDispatchCallback(),e||!je(u))?(G&&(l=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}),{})}(Y,de(ee,Object.keys(X)),de(v,Object.keys(X)))),h(function(e){var t=e.body,r=e.duration,n=e.meta,o=e.queryKey,u=e.responseBody,i=e.responseHeaders,a=e.responseText,c=e.rolledBackEntities,s=e.status,f=e.url;return{type:d,url:f,body:t,duration:r,status:s,responseBody:u,responseText:a,responseHeaders:i,rolledBackEntities:c,queryKey:o,time:Date.now(),meta:n}}({body:z,duration:y,meta:W,queryKey:te,responseBody:i,responseHeaders:c,status:u,responseText:a,rolledBackEntities:l,url:F})),t({body:i,duration:y,status:u,text:a,headers:c})):(s=Q(i,a),f=I(L,v,s),h(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,s=e.status,f=e.url;return{type:p,url:f,body:t,duration:r,status:s,responseBody:i,responseText:c,responseHeaders:a,entities:n,queryKey:u,time:Date.now(),meta:o}}({url:F,body:z,duration:y,status:u,entities:f,queryKey:te,responseBody:i,responseText:a,responseHeaders:c,meta:W})),t({body:i,duration:y,status:u,text:a,transformed:s,entities:f,headers:c}));delete o[te]}))}));break;case f:var re=j.queryKey;if(!re)throw new Error("Missing required queryKey field");var ne=g(),ue=t(ne);re in Oe(ue)?(u(re),S=v(j)):(console.warn("Trying to cancel a request that is not in flight: ",re),S=null);break;case b:var ie=g(),ae=t(ie),ce=Oe(ae);for(var se in ce)ce.hasOwnProperty(se)&&u(se);S=v(j);break;default:S=v(j)}return S}}}}}])})); |
{ | ||
"name": "redux-query", | ||
"version": "3.5.1-alpha.1", | ||
"version": "3.5.1", | ||
"description": "A library for querying and managing network state in Redux applications", | ||
@@ -37,3 +37,2 @@ "homepage": "https://github.com/amplitude/redux-query", | ||
"backo": "^1.1.0", | ||
"idx": "^2.5.6", | ||
"invariant": "^2.2.0", | ||
@@ -57,3 +56,2 @@ "json-stable-stringify": "^1.0.0", | ||
"babel-loader": "^8.0.2", | ||
"babel-plugin-idx": "^2.4.0", | ||
"cross-env": "^1.0.7", | ||
@@ -78,3 +76,3 @@ "eslint": "^5.11.1", | ||
}, | ||
"gitHead": "d1d923c8305bf6d5137e88c9558726ad48d7bb39" | ||
"gitHead": "b1f53ca628ff9082ddc3e4a247b15fc6226bfc7d" | ||
} |
// @flow | ||
import Backoff from 'backo'; | ||
import idx from 'idx'; | ||
@@ -140,4 +139,4 @@ import { | ||
const queriesState = queries[queryKey]; | ||
const isPending = idx(queriesState, _ => _.isPending); | ||
const status = idx(queriesState, _ => _.status); | ||
const isPending = queriesState?.isPending; | ||
const status = queriesState?.status; | ||
const hasSucceeded = isStatusOk(status); | ||
@@ -144,0 +143,0 @@ |
// @flow | ||
import idx from 'idx'; | ||
import type { State as ErrorsState } from '../reducers/errors'; | ||
@@ -19,3 +17,3 @@ import { getQueryKey } from '../lib/query-key'; | ||
return idx(errorsState, _ => _[queryKey].responseBody); | ||
return errorsState?.[queryKey]?.responseBody; | ||
}; | ||
@@ -30,3 +28,3 @@ | ||
return idx(errorsState, _ => _[queryKey].responseText); | ||
return errorsState?.[queryKey]?.responseText; | ||
}; | ||
@@ -44,3 +42,3 @@ | ||
return idx(errorsState, _ => _[queryKey].responseHeaders); | ||
return errorsState?.[queryKey]?.responseHeaders; | ||
}; |
// @flow | ||
import idx from 'idx'; | ||
import type { State as QueriesState } from '../reducers/queries'; | ||
@@ -27,3 +25,3 @@ import { getQueryKey } from '../lib/query-key'; | ||
return idx(queriesState, _ => _[queryKey]) || defaultDetailsObject; | ||
return queriesState?.[queryKey] ?? defaultDetailsObject; | ||
}; | ||
@@ -34,6 +32,3 @@ | ||
queryConfig: ?QueryConfig, | ||
) => boolean = createSelector( | ||
getQueryDetails, | ||
query => query.isFinished, | ||
); | ||
) => boolean = createSelector(getQueryDetails, query => query.isFinished); | ||
@@ -43,6 +38,3 @@ export const isPending: ( | ||
queryConfig: ?QueryConfig, | ||
) => boolean = createSelector( | ||
getQueryDetails, | ||
query => query.isPending, | ||
); | ||
) => boolean = createSelector(getQueryDetails, query => query.isPending); | ||
@@ -52,6 +44,3 @@ export const status: ( | ||
queryConfig: ?QueryConfig, | ||
) => ?number = createSelector( | ||
getQueryDetails, | ||
query => query.status, | ||
); | ||
) => ?number = createSelector(getQueryDetails, query => query.status); | ||
@@ -61,6 +50,3 @@ export const headers: ( | ||
queryConfig: ?QueryConfig, | ||
) => ?{ [key: string]: any } = createSelector( | ||
getQueryDetails, | ||
query => query.headers, | ||
); | ||
) => ?{ [key: string]: any } = createSelector(getQueryDetails, query => query.headers); | ||
@@ -70,6 +56,3 @@ export const lastUpdated: ( | ||
queryConfig: ?QueryConfig, | ||
) => ?number = createSelector( | ||
getQueryDetails, | ||
query => query.lastUpdated, | ||
); | ||
) => ?number = createSelector(getQueryDetails, query => query.lastUpdated); | ||
@@ -79,5 +62,2 @@ export const queryCount: ( | ||
queryConfig: ?QueryConfig, | ||
) => number = createSelector( | ||
getQueryDetails, | ||
query => query.queryCount, | ||
); | ||
) => number = createSelector(getQueryDetails, query => query.queryCount); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
183846
5
20
0
3586
- Removedidx@^2.5.6
- Removedidx@2.5.6(transitive)