{"version":3,"file":"@reduxjs-CUZ_xBEO.js","sources":["../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js","../../node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js","../../node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a, b) {\r\n for (var prop in b || (b = {}))\r\n if (__hasOwnProp.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {\r\n var prop = _c[_i];\r\n if (__propIsEnum.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n }\r\n return a;\r\n};\r\nvar __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };\r\nvar __async = function (__this, __arguments, generator) {\r\n return new Promise(function (resolve, reject) {\r\n var fulfilled = function (value) {\r\n try {\r\n step(generator.next(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var rejected = function (value) {\r\n try {\r\n step(generator.throw(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };\r\n step((generator = generator.apply(__this, __arguments)).next());\r\n });\r\n};\r\n// src/index.ts\r\nimport { enableES5 } from \"immer\";\r\nexport * from \"redux\";\r\nimport { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from \"immer\";\r\nimport { createSelector as createSelector2 } from \"reselect\";\r\n// src/createDraftSafeSelector.ts\r\nimport { current, isDraft } from \"immer\";\r\nimport { createSelector } from \"reselect\";\r\nvar createDraftSafeSelector = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var selector = createSelector.apply(void 0, args);\r\n var wrappedSelector = function (value) {\r\n var rest = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n rest[_i - 1] = arguments[_i];\r\n }\r\n return selector.apply(void 0, __spreadArray([isDraft(value) ? current(value) : value], rest));\r\n };\r\n return wrappedSelector;\r\n};\r\n// src/configureStore.ts\r\nimport { createStore, compose as compose2, applyMiddleware, combineReducers } from \"redux\";\r\n// src/devtoolsExtension.ts\r\nimport { compose } from \"redux\";\r\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {\r\n if (arguments.length === 0)\r\n return void 0;\r\n if (typeof arguments[0] === \"object\")\r\n return compose;\r\n return compose.apply(null, arguments);\r\n};\r\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {\r\n return function (noop2) {\r\n return noop2;\r\n };\r\n};\r\n// src/isPlainObject.ts\r\nfunction isPlainObject(value) {\r\n if (typeof value !== \"object\" || value === null)\r\n return false;\r\n var proto = Object.getPrototypeOf(value);\r\n if (proto === null)\r\n return true;\r\n var baseProto = proto;\r\n while (Object.getPrototypeOf(baseProto) !== null) {\r\n baseProto = Object.getPrototypeOf(baseProto);\r\n }\r\n return proto === baseProto;\r\n}\r\n// src/getDefaultMiddleware.ts\r\nimport thunkMiddleware from \"redux-thunk\";\r\n// src/tsHelpers.ts\r\nvar hasMatchFunction = function (v) {\r\n return v && typeof v.match === \"function\";\r\n};\r\n// src/createAction.ts\r\nfunction createAction(type, prepareAction) {\r\n function actionCreator() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (prepareAction) {\r\n var prepared = prepareAction.apply(void 0, args);\r\n if (!prepared) {\r\n throw new Error(\"prepareAction did not return an object\");\r\n }\r\n return __spreadValues(__spreadValues({\r\n type: type,\r\n payload: prepared.payload\r\n }, \"meta\" in prepared && { meta: prepared.meta }), \"error\" in prepared && { error: prepared.error });\r\n }\r\n return { type: type, payload: args[0] };\r\n }\r\n actionCreator.toString = function () { return \"\" + type; };\r\n actionCreator.type = type;\r\n actionCreator.match = function (action) { return action.type === type; };\r\n return actionCreator;\r\n}\r\nfunction isAction(action) {\r\n return isPlainObject(action) && \"type\" in action;\r\n}\r\nfunction isActionCreator(action) {\r\n return typeof action === \"function\" && \"type\" in action && hasMatchFunction(action);\r\n}\r\nfunction isFSA(action) {\r\n return isAction(action) && typeof action.type === \"string\" && Object.keys(action).every(isValidKey);\r\n}\r\nfunction isValidKey(key) {\r\n return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\r\n}\r\nfunction getType(actionCreator) {\r\n return \"\" + actionCreator;\r\n}\r\n// src/actionCreatorInvariantMiddleware.ts\r\nfunction getMessage(type) {\r\n var splitType = type ? (\"\" + type).split(\"/\") : [];\r\n var actionName = splitType[splitType.length - 1] || \"actionCreator\";\r\n return \"Detected an action creator with type \\\"\" + (type || \"unknown\") + \"\\\" being dispatched. \\nMake sure you're calling the action creator before dispatching, i.e. `dispatch(\" + actionName + \"())` instead of `dispatch(\" + actionName + \")`. This is necessary even if the action has no payload.\";\r\n}\r\nfunction createActionCreatorInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c;\r\n return function () { return function (next) { return function (action) {\r\n if (isActionCreator2(action)) {\r\n console.warn(getMessage(action.type));\r\n }\r\n return next(action);\r\n }; }; };\r\n}\r\n// src/utils.ts\r\nimport createNextState, { isDraftable } from \"immer\";\r\nfunction getTimeMeasureUtils(maxDelay, fnName) {\r\n var elapsed = 0;\r\n return {\r\n measureTime: function (fn) {\r\n var started = Date.now();\r\n try {\r\n return fn();\r\n }\r\n finally {\r\n var finished = Date.now();\r\n elapsed += finished - started;\r\n }\r\n },\r\n warnIfExceeded: function () {\r\n if (elapsed > maxDelay) {\r\n console.warn(fnName + \" took \" + elapsed + \"ms, which is more than the warning threshold of \" + maxDelay + \"ms. \\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\\nIt is disabled in production builds, so you don't need to worry about that.\");\r\n }\r\n }\r\n };\r\n}\r\nvar MiddlewareArray = /** @class */ (function (_super) {\r\n __extends(MiddlewareArray, _super);\r\n function MiddlewareArray() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, MiddlewareArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(MiddlewareArray, Symbol.species, {\r\n get: function () {\r\n return MiddlewareArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n MiddlewareArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n MiddlewareArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return MiddlewareArray;\r\n}(Array));\r\nvar EnhancerArray = /** @class */ (function (_super) {\r\n __extends(EnhancerArray, _super);\r\n function EnhancerArray() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, EnhancerArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(EnhancerArray, Symbol.species, {\r\n get: function () {\r\n return EnhancerArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n EnhancerArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n EnhancerArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return EnhancerArray;\r\n}(Array));\r\nfunction freezeDraftable(val) {\r\n return isDraftable(val) ? createNextState(val, function () {\r\n }) : val;\r\n}\r\n// src/immutableStateInvariantMiddleware.ts\r\nvar isProduction = process.env.NODE_ENV === \"production\";\r\nvar prefix = \"Invariant failed\";\r\nfunction invariant(condition, message) {\r\n if (condition) {\r\n return;\r\n }\r\n if (isProduction) {\r\n throw new Error(prefix);\r\n }\r\n throw new Error(prefix + \": \" + (message || \"\"));\r\n}\r\nfunction stringify(obj, serializer, indent, decycler) {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent);\r\n}\r\nfunction getSerialize(serializer, decycler) {\r\n var stack = [], keys = [];\r\n if (!decycler)\r\n decycler = function (_, value) {\r\n if (stack[0] === value)\r\n return \"[Circular ~]\";\r\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\r\n };\r\n return function (key, value) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this);\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\r\n if (~stack.indexOf(value))\r\n value = decycler.call(this, key, value);\r\n }\r\n else\r\n stack.push(value);\r\n return serializer == null ? value : serializer.call(this, key, value);\r\n };\r\n}\r\nfunction isImmutableDefault(value) {\r\n return typeof value !== \"object\" || value == null || Object.isFrozen(value);\r\n}\r\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\r\n var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\r\n return {\r\n detectMutations: function () {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\r\n }\r\n };\r\n}\r\nfunction trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (path === void 0) { path = \"\"; }\r\n if (checkedObjects === void 0) { checkedObjects = new Set(); }\r\n var tracked = { value: obj };\r\n if (!isImmutable(obj) && !checkedObjects.has(obj)) {\r\n checkedObjects.add(obj);\r\n tracked.children = {};\r\n for (var key in obj) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\r\n }\r\n }\r\n return tracked;\r\n}\r\nfunction detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) {\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n if (sameParentRef === void 0) { sameParentRef = false; }\r\n if (path === void 0) { path = \"\"; }\r\n var prevObj = trackedProperty ? trackedProperty.value : void 0;\r\n var sameRef = prevObj === obj;\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path: path };\r\n }\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false };\r\n }\r\n var keysToDetect = {};\r\n for (var key in trackedProperty.children) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in obj) {\r\n keysToDetect[key] = true;\r\n }\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n var _loop_1 = function (key) {\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths) {\r\n var hasMatches = ignoredPaths.some(function (ignored) {\r\n if (ignored instanceof RegExp) {\r\n return ignored.test(nestedPath);\r\n }\r\n return nestedPath === ignored;\r\n });\r\n if (hasMatches) {\r\n return \"continue\";\r\n }\r\n }\r\n var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);\r\n if (result.wasMutated) {\r\n return { value: result };\r\n }\r\n };\r\n for (var key in keysToDetect) {\r\n var state_1 = _loop_1(key);\r\n if (typeof state_1 === \"object\")\r\n return state_1.value;\r\n }\r\n return { wasMutated: false };\r\n}\r\nfunction createImmutableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore;\r\n ignoredPaths = ignoredPaths || ignore;\r\n var track = trackForMutations.bind(null, isImmutable, ignoredPaths);\r\n return function (_c) {\r\n var getState = _c.getState;\r\n var state = getState();\r\n var tracker = track(state);\r\n var result;\r\n return function (next) { return function (action) {\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n invariant(!result.wasMutated, \"A state mutation was detected between dispatches, in the path '\" + (result.path || \"\") + \"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n var dispatchedAction = next(action);\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n result.wasMutated && invariant(!result.wasMutated, \"A state mutation was detected inside a dispatch, in the path: \" + (result.path || \"\") + \". Take a look at the reducer(s) handling the action \" + stringify(action) + \". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n measureUtils.warnIfExceeded();\r\n return dispatchedAction;\r\n }; };\r\n };\r\n}\r\n// src/serializableStateInvariantMiddleware.ts\r\nfunction isPlain(val) {\r\n var type = typeof val;\r\n return val == null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject(val);\r\n}\r\nfunction findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) {\r\n if (path === void 0) { path = \"\"; }\r\n if (isSerializable === void 0) { isSerializable = isPlain; }\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n var foundNestedSerializable;\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || \"\",\r\n value: value\r\n };\r\n }\r\n if (typeof value !== \"object\" || value === null) {\r\n return false;\r\n }\r\n if (cache == null ? void 0 : cache.has(value))\r\n return false;\r\n var entries = getEntries != null ? getEntries(value) : Object.entries(value);\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n var _loop_2 = function (key, nestedValue) {\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths) {\r\n var hasMatches = ignoredPaths.some(function (ignored) {\r\n if (ignored instanceof RegExp) {\r\n return ignored.test(nestedPath);\r\n }\r\n return nestedPath === ignored;\r\n });\r\n if (hasMatches) {\r\n return \"continue\";\r\n }\r\n }\r\n if (!isSerializable(nestedValue)) {\r\n return { value: {\r\n keyPath: nestedPath,\r\n value: nestedValue\r\n } };\r\n }\r\n if (typeof nestedValue === \"object\") {\r\n foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);\r\n if (foundNestedSerializable) {\r\n return { value: foundNestedSerializable };\r\n }\r\n }\r\n };\r\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\r\n var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];\r\n var state_2 = _loop_2(key, nestedValue);\r\n if (typeof state_2 === \"object\")\r\n return state_2.value;\r\n }\r\n if (cache && isNestedFrozen(value))\r\n cache.add(value);\r\n return false;\r\n}\r\nfunction isNestedFrozen(value) {\r\n if (!Object.isFrozen(value))\r\n return false;\r\n for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) {\r\n var nestedValue = _c[_i];\r\n if (typeof nestedValue !== \"object\" || nestedValue === null)\r\n continue;\r\n if (!isNestedFrozen(nestedValue))\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction createSerializableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? [\"meta.arg\", \"meta.baseQueryMeta\"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k;\r\n var cache = !disableCache && WeakSet ? new WeakSet() : void 0;\r\n return function (storeAPI) { return function (next) { return function (action) {\r\n var result = next(action);\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\r\n if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {\r\n measureUtils.measureTime(function () {\r\n var foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths, cache);\r\n if (foundActionNonSerializableValue) {\r\n var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in an action, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\r\n }\r\n });\r\n }\r\n if (!ignoreState) {\r\n measureUtils.measureTime(function () {\r\n var state = storeAPI.getState();\r\n var foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths, cache);\r\n if (foundStateNonSerializableValue) {\r\n var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in the state, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the reducer(s) handling this action type: \" + action.type + \".\\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)\");\r\n }\r\n });\r\n measureUtils.warnIfExceeded();\r\n }\r\n return result;\r\n }; }; };\r\n}\r\n// src/getDefaultMiddleware.ts\r\nfunction isBoolean(x) {\r\n return typeof x === \"boolean\";\r\n}\r\nfunction curryGetDefaultMiddleware() {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options);\r\n };\r\n}\r\nfunction getDefaultMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f;\r\n var middlewareArray = new MiddlewareArray();\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware);\r\n }\r\n else {\r\n middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));\r\n }\r\n }\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (immutableCheck) {\r\n var immutableOptions = {};\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck;\r\n }\r\n middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\r\n }\r\n if (serializableCheck) {\r\n var serializableOptions = {};\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck;\r\n }\r\n middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\r\n }\r\n if (actionCreatorCheck) {\r\n var actionCreatorOptions = {};\r\n if (!isBoolean(actionCreatorCheck)) {\r\n actionCreatorOptions = actionCreatorCheck;\r\n }\r\n middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));\r\n }\r\n }\r\n return middlewareArray;\r\n}\r\n// src/configureStore.ts\r\nvar IS_PRODUCTION = process.env.NODE_ENV === \"production\";\r\nfunction configureStore(options) {\r\n var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();\r\n var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h;\r\n var rootReducer;\r\n if (typeof reducer === \"function\") {\r\n rootReducer = reducer;\r\n }\r\n else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer);\r\n }\r\n else {\r\n throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');\r\n }\r\n var finalMiddleware = middleware;\r\n if (typeof finalMiddleware === \"function\") {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\"when using a middleware builder function, an array of middleware must be returned\");\r\n }\r\n }\r\n if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== \"function\"; })) {\r\n throw new Error(\"each middleware provided to configureStore must be a function\");\r\n }\r\n var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);\r\n var finalCompose = compose2;\r\n if (devTools) {\r\n finalCompose = composeWithDevTools(__spreadValues({\r\n trace: !IS_PRODUCTION\r\n }, typeof devTools === \"object\" && devTools));\r\n }\r\n var defaultEnhancers = new EnhancerArray(middlewareEnhancer);\r\n var storeEnhancers = defaultEnhancers;\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);\r\n }\r\n else if (typeof enhancers === \"function\") {\r\n storeEnhancers = enhancers(defaultEnhancers);\r\n }\r\n var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);\r\n return createStore(rootReducer, preloadedState, composedEnhancer);\r\n}\r\n// src/createReducer.ts\r\nimport createNextState2, { isDraft as isDraft2, isDraftable as isDraftable2 } from \"immer\";\r\n// src/mapBuilders.ts\r\nfunction executeReducerBuilderCallback(builderCallback) {\r\n var actionsMap = {};\r\n var actionMatchers = [];\r\n var defaultCaseReducer;\r\n var builder = {\r\n addCase: function (typeOrActionCreator, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addMatcher`\");\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n var type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\r\n if (!type) {\r\n throw new Error(\"`builder.addCase` cannot be called with an empty action type\");\r\n }\r\n if (type in actionsMap) {\r\n throw new Error(\"`builder.addCase` cannot be called with two reducers for the same action type\");\r\n }\r\n actionsMap[type] = reducer;\r\n return builder;\r\n },\r\n addMatcher: function (matcher, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n actionMatchers.push({ matcher: matcher, reducer: reducer });\r\n return builder;\r\n },\r\n addDefaultCase: function (reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addDefaultCase` can only be called once\");\r\n }\r\n }\r\n defaultCaseReducer = reducer;\r\n return builder;\r\n }\r\n };\r\n builderCallback(builder);\r\n return [actionsMap, actionMatchers, defaultCaseReducer];\r\n}\r\n// src/createReducer.ts\r\nfunction isStateFunction(x) {\r\n return typeof x === \"function\";\r\n}\r\nvar hasWarnedAboutObjectNotation = false;\r\nfunction createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {\r\n if (actionMatchers === void 0) { actionMatchers = []; }\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (typeof mapOrBuilderCallback === \"object\") {\r\n if (!hasWarnedAboutObjectNotation) {\r\n hasWarnedAboutObjectNotation = true;\r\n console.warn(\"The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\");\r\n }\r\n }\r\n }\r\n var _c = typeof mapOrBuilderCallback === \"function\" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];\r\n var getInitialState;\r\n if (isStateFunction(initialState)) {\r\n getInitialState = function () { return freezeDraftable(initialState()); };\r\n }\r\n else {\r\n var frozenInitialState_1 = freezeDraftable(initialState);\r\n getInitialState = function () { return frozenInitialState_1; };\r\n }\r\n function reducer(state, action) {\r\n if (state === void 0) { state = getInitialState(); }\r\n var caseReducers = __spreadArray([\r\n actionsMap[action.type]\r\n ], finalActionMatchers.filter(function (_c) {\r\n var matcher = _c.matcher;\r\n return matcher(action);\r\n }).map(function (_c) {\r\n var reducer2 = _c.reducer;\r\n return reducer2;\r\n }));\r\n if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer];\r\n }\r\n return caseReducers.reduce(function (previousState, caseReducer) {\r\n if (caseReducer) {\r\n if (isDraft2(previousState)) {\r\n var draft = previousState;\r\n var result = caseReducer(draft, action);\r\n if (result === void 0) {\r\n return previousState;\r\n }\r\n return result;\r\n }\r\n else if (!isDraftable2(previousState)) {\r\n var result = caseReducer(previousState, action);\r\n if (result === void 0) {\r\n if (previousState === null) {\r\n return previousState;\r\n }\r\n throw Error(\"A case reducer on a non-draftable value must not return undefined\");\r\n }\r\n return result;\r\n }\r\n else {\r\n return createNextState2(previousState, function (draft) {\r\n return caseReducer(draft, action);\r\n });\r\n }\r\n }\r\n return previousState;\r\n }, state);\r\n }\r\n reducer.getInitialState = getInitialState;\r\n return reducer;\r\n}\r\n// src/createSlice.ts\r\nvar hasWarnedAboutObjectNotation2 = false;\r\nfunction getType2(slice, actionKey) {\r\n return slice + \"/\" + actionKey;\r\n}\r\nfunction createSlice(options) {\r\n var name = options.name;\r\n if (!name) {\r\n throw new Error(\"`name` is a required option for createSlice\");\r\n }\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n if (options.initialState === void 0) {\r\n console.error(\"You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`\");\r\n }\r\n }\r\n var initialState = typeof options.initialState == \"function\" ? options.initialState : freezeDraftable(options.initialState);\r\n var reducers = options.reducers || {};\r\n var reducerNames = Object.keys(reducers);\r\n var sliceCaseReducersByName = {};\r\n var sliceCaseReducersByType = {};\r\n var actionCreators = {};\r\n reducerNames.forEach(function (reducerName) {\r\n var maybeReducerWithPrepare = reducers[reducerName];\r\n var type = getType2(name, reducerName);\r\n var caseReducer;\r\n var prepareCallback;\r\n if (\"reducer\" in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer;\r\n prepareCallback = maybeReducerWithPrepare.prepare;\r\n }\r\n else {\r\n caseReducer = maybeReducerWithPrepare;\r\n }\r\n sliceCaseReducersByName[reducerName] = caseReducer;\r\n sliceCaseReducersByType[type] = caseReducer;\r\n actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);\r\n });\r\n function buildReducer() {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (typeof options.extraReducers === \"object\") {\r\n if (!hasWarnedAboutObjectNotation2) {\r\n hasWarnedAboutObjectNotation2 = true;\r\n console.warn(\"The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\");\r\n }\r\n }\r\n }\r\n var _c = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f;\r\n var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);\r\n return createReducer(initialState, function (builder) {\r\n for (var key in finalCaseReducers) {\r\n builder.addCase(key, finalCaseReducers[key]);\r\n }\r\n for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) {\r\n var m = actionMatchers_1[_i];\r\n builder.addMatcher(m.matcher, m.reducer);\r\n }\r\n if (defaultCaseReducer) {\r\n builder.addDefaultCase(defaultCaseReducer);\r\n }\r\n });\r\n }\r\n var _reducer;\r\n return {\r\n name: name,\r\n reducer: function (state, action) {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer(state, action);\r\n },\r\n actions: actionCreators,\r\n caseReducers: sliceCaseReducersByName,\r\n getInitialState: function () {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer.getInitialState();\r\n }\r\n };\r\n}\r\n// src/entities/entity_state.ts\r\nfunction getInitialEntityState() {\r\n return {\r\n ids: [],\r\n entities: {}\r\n };\r\n}\r\nfunction createInitialStateFactory() {\r\n function getInitialState(additionalState) {\r\n if (additionalState === void 0) { additionalState = {}; }\r\n return Object.assign(getInitialEntityState(), additionalState);\r\n }\r\n return { getInitialState: getInitialState };\r\n}\r\n// src/entities/state_selectors.ts\r\nfunction createSelectorsFactory() {\r\n function getSelectors(selectState) {\r\n var selectIds = function (state) { return state.ids; };\r\n var selectEntities = function (state) { return state.entities; };\r\n var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });\r\n var selectId = function (_, id) { return id; };\r\n var selectById = function (entities, id) { return entities[id]; };\r\n var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });\r\n if (!selectState) {\r\n return {\r\n selectIds: selectIds,\r\n selectEntities: selectEntities,\r\n selectAll: selectAll,\r\n selectTotal: selectTotal,\r\n selectById: createDraftSafeSelector(selectEntities, selectId, selectById)\r\n };\r\n }\r\n var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)\r\n };\r\n }\r\n return { getSelectors: getSelectors };\r\n}\r\n// src/entities/state_adapter.ts\r\nimport createNextState3, { isDraft as isDraft3 } from \"immer\";\r\nfunction createSingleArgumentStateOperator(mutator) {\r\n var operator = createStateOperator(function (_, state) { return mutator(state); });\r\n return function operation(state) {\r\n return operator(state, void 0);\r\n };\r\n}\r\nfunction createStateOperator(mutator) {\r\n return function operation(state, arg) {\r\n function isPayloadActionArgument(arg2) {\r\n return isFSA(arg2);\r\n }\r\n var runMutator = function (draft) {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft);\r\n }\r\n else {\r\n mutator(arg, draft);\r\n }\r\n };\r\n if (isDraft3(state)) {\r\n runMutator(state);\r\n return state;\r\n }\r\n else {\r\n return createNextState3(state, runMutator);\r\n }\r\n };\r\n}\r\n// src/entities/utils.ts\r\nfunction selectIdValue(entity, selectId) {\r\n var key = selectId(entity);\r\n if (process.env.NODE_ENV !== \"production\" && key === void 0) {\r\n console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\r\n }\r\n return key;\r\n}\r\nfunction ensureEntitiesArray(entities) {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities);\r\n }\r\n return entities;\r\n}\r\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var added = [];\r\n var updated = [];\r\n for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {\r\n var entity = newEntities_1[_i];\r\n var id = selectIdValue(entity, selectId);\r\n if (id in state.entities) {\r\n updated.push({ id: id, changes: entity });\r\n }\r\n else {\r\n added.push(entity);\r\n }\r\n }\r\n return [added, updated];\r\n}\r\n// src/entities/unsorted_state_adapter.ts\r\nfunction createUnsortedStateAdapter(selectId) {\r\n function addOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (key in state.entities) {\r\n return;\r\n }\r\n state.ids.push(key);\r\n state.entities[key] = entity;\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {\r\n var entity = newEntities_2[_i];\r\n addOneMutably(entity, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (!(key in state.entities)) {\r\n state.ids.push(key);\r\n }\r\n state.entities[key] = entity;\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {\r\n var entity = newEntities_3[_i];\r\n setOneMutably(entity, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.ids = [];\r\n state.entities = {};\r\n addManyMutably(newEntities, state);\r\n }\r\n function removeOneMutably(key, state) {\r\n return removeManyMutably([key], state);\r\n }\r\n function removeManyMutably(keys, state) {\r\n var didMutate = false;\r\n keys.forEach(function (key) {\r\n if (key in state.entities) {\r\n delete state.entities[key];\r\n didMutate = true;\r\n }\r\n });\r\n if (didMutate) {\r\n state.ids = state.ids.filter(function (id) { return id in state.entities; });\r\n }\r\n }\r\n function removeAllMutably(state) {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {}\r\n });\r\n }\r\n function takeNewKey(keys, update, state) {\r\n var original2 = state.entities[update.id];\r\n var updated = Object.assign({}, original2, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n var hasNewKey = newKey !== update.id;\r\n if (hasNewKey) {\r\n keys[update.id] = newKey;\r\n delete state.entities[update.id];\r\n }\r\n state.entities[newKey] = updated;\r\n return hasNewKey;\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var newKeys = {};\r\n var updatesPerEntity = {};\r\n updates.forEach(function (update) {\r\n if (update.id in state.entities) {\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)\r\n };\r\n }\r\n });\r\n updates = Object.values(updatesPerEntity);\r\n var didMutateEntities = updates.length > 0;\r\n if (didMutateEntities) {\r\n var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;\r\n if (didMutateIds) {\r\n state.ids = Object.keys(state.entities);\r\n }\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably)\r\n };\r\n}\r\n// src/entities/sorted_state_adapter.ts\r\nfunction createSortedStateAdapter(selectId, sort) {\r\n var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;\r\n function addOneMutably(entity, state) {\r\n return addManyMutably([entity], state);\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n return setManyMutably([entity], state);\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.entities = {};\r\n state.ids = [];\r\n addManyMutably(newEntities, state);\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var appliedUpdates = false;\r\n for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) {\r\n var update = updates_1[_i];\r\n var entity = state.entities[update.id];\r\n if (!entity) {\r\n continue;\r\n }\r\n appliedUpdates = true;\r\n Object.assign(entity, update.changes);\r\n var newId = selectId(entity);\r\n if (update.id !== newId) {\r\n delete state.entities[update.id];\r\n state.entities[newId] = entity;\r\n }\r\n }\r\n if (appliedUpdates) {\r\n resortEntities(state);\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n function areArraysEqual(a, b) {\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n function merge(models, state) {\r\n models.forEach(function (model) {\r\n state.entities[selectId(model)] = model;\r\n });\r\n resortEntities(state);\r\n }\r\n function resortEntities(state) {\r\n var allEntities = Object.values(state.entities);\r\n allEntities.sort(sort);\r\n var newSortedIds = allEntities.map(selectId);\r\n var ids = state.ids;\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds;\r\n }\r\n }\r\n return {\r\n removeOne: removeOne,\r\n removeMany: removeMany,\r\n removeAll: removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably)\r\n };\r\n}\r\n// src/entities/create_adapter.ts\r\nfunction createEntityAdapter(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = __spreadValues({\r\n sortComparer: false,\r\n selectId: function (instance) { return instance.id; }\r\n }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;\r\n var stateFactory = createInitialStateFactory();\r\n var selectorsFactory = createSelectorsFactory();\r\n var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\r\n return __spreadValues(__spreadValues(__spreadValues({\r\n selectId: selectId,\r\n sortComparer: sortComparer\r\n }, stateFactory), selectorsFactory), stateAdapter);\r\n}\r\n// src/nanoid.ts\r\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\r\nvar nanoid = function (size) {\r\n if (size === void 0) { size = 21; }\r\n var id = \"\";\r\n var i = size;\r\n while (i--) {\r\n id += urlAlphabet[Math.random() * 64 | 0];\r\n }\r\n return id;\r\n};\r\n// src/createAsyncThunk.ts\r\nvar commonProperties = [\r\n \"name\",\r\n \"message\",\r\n \"stack\",\r\n \"code\"\r\n];\r\nvar RejectWithValue = /** @class */ (function () {\r\n function RejectWithValue(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return RejectWithValue;\r\n}());\r\nvar FulfillWithMeta = /** @class */ (function () {\r\n function FulfillWithMeta(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return FulfillWithMeta;\r\n}());\r\nvar miniSerializeError = function (value) {\r\n if (typeof value === \"object\" && value !== null) {\r\n var simpleError = {};\r\n for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {\r\n var property = commonProperties_1[_i];\r\n if (typeof value[property] === \"string\") {\r\n simpleError[property] = value[property];\r\n }\r\n }\r\n return simpleError;\r\n }\r\n return { message: String(value) };\r\n};\r\nvar createAsyncThunk = (function () {\r\n function createAsyncThunk2(typePrefix, payloadCreator, options) {\r\n var fulfilled = createAction(typePrefix + \"/fulfilled\", function (payload, requestId, arg, meta) { return ({\r\n payload: payload,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"fulfilled\"\r\n })\r\n }); });\r\n var pending = createAction(typePrefix + \"/pending\", function (requestId, arg, meta) { return ({\r\n payload: void 0,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"pending\"\r\n })\r\n }); });\r\n var rejected = createAction(typePrefix + \"/rejected\", function (error, requestId, arg, payload, meta) { return ({\r\n payload: payload,\r\n error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: \"rejected\",\r\n aborted: (error == null ? void 0 : error.name) === \"AbortError\",\r\n condition: (error == null ? void 0 : error.name) === \"ConditionError\"\r\n })\r\n }); });\r\n var displayedWarning = false;\r\n var AC = typeof AbortController !== \"undefined\" ? AbortController : /** @class */ (function () {\r\n function class_1() {\r\n this.signal = {\r\n aborted: false,\r\n addEventListener: function () {\r\n },\r\n dispatchEvent: function () {\r\n return false;\r\n },\r\n onabort: function () {\r\n },\r\n removeEventListener: function () {\r\n },\r\n reason: void 0,\r\n throwIfAborted: function () {\r\n }\r\n };\r\n }\r\n class_1.prototype.abort = function () {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (!displayedWarning) {\r\n displayedWarning = true;\r\n console.info(\"This platform does not implement AbortController. \\nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.\");\r\n }\r\n }\r\n };\r\n return class_1;\r\n }());\r\n function actionCreator(arg) {\r\n return function (dispatch, getState, extra) {\r\n var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();\r\n var abortController = new AC();\r\n var abortReason;\r\n var started = false;\r\n function abort(reason) {\r\n abortReason = reason;\r\n abortController.abort();\r\n }\r\n var promise2 = function () {\r\n return __async(this, null, function () {\r\n var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 4, , 5]);\r\n conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });\r\n if (!isThenable(conditionResult)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, conditionResult];\r\n case 1:\r\n conditionResult = _c.sent();\r\n _c.label = 2;\r\n case 2:\r\n if (conditionResult === false || abortController.signal.aborted) {\r\n throw {\r\n name: \"ConditionError\",\r\n message: \"Aborted due to condition callback returning false.\"\r\n };\r\n }\r\n started = true;\r\n abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener(\"abort\", function () { return reject({\r\n name: \"AbortError\",\r\n message: abortReason || \"Aborted\"\r\n }); }); });\r\n dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));\r\n return [4 /*yield*/, Promise.race([\r\n abortedPromise,\r\n Promise.resolve(payloadCreator(arg, {\r\n dispatch: dispatch,\r\n getState: getState,\r\n extra: extra,\r\n requestId: requestId,\r\n signal: abortController.signal,\r\n abort: abort,\r\n rejectWithValue: function (value, meta) {\r\n return new RejectWithValue(value, meta);\r\n },\r\n fulfillWithValue: function (value, meta) {\r\n return new FulfillWithMeta(value, meta);\r\n }\r\n })).then(function (result) {\r\n if (result instanceof RejectWithValue) {\r\n throw result;\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta);\r\n }\r\n return fulfilled(result, requestId, arg);\r\n })\r\n ])];\r\n case 3:\r\n finalAction = _c.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n err_1 = _c.sent();\r\n finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);\r\n return [3 /*break*/, 5];\r\n case 5:\r\n skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\r\n if (!skipDispatch) {\r\n dispatch(finalAction);\r\n }\r\n return [2 /*return*/, finalAction];\r\n }\r\n });\r\n });\r\n }();\r\n return Object.assign(promise2, {\r\n abort: abort,\r\n requestId: requestId,\r\n arg: arg,\r\n unwrap: function () {\r\n return promise2.then(unwrapResult);\r\n }\r\n });\r\n };\r\n }\r\n return Object.assign(actionCreator, {\r\n pending: pending,\r\n rejected: rejected,\r\n fulfilled: fulfilled,\r\n typePrefix: typePrefix\r\n });\r\n }\r\n createAsyncThunk2.withTypes = function () { return createAsyncThunk2; };\r\n return createAsyncThunk2;\r\n})();\r\nfunction unwrapResult(action) {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload;\r\n }\r\n if (action.error) {\r\n throw action.error;\r\n }\r\n return action.payload;\r\n}\r\nfunction isThenable(value) {\r\n return value !== null && typeof value === \"object\" && typeof value.then === \"function\";\r\n}\r\n// src/matchers.ts\r\nvar matches = function (matcher, action) {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action);\r\n }\r\n else {\r\n return matcher(action);\r\n }\r\n};\r\nfunction isAnyOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.some(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction isAllOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.every(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction hasExpectedRequestMetadata(action, validStatus) {\r\n if (!action || !action.meta)\r\n return false;\r\n var hasValidRequestId = typeof action.meta.requestId === \"string\";\r\n var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\r\n return hasValidRequestId && hasValidRequestStatus;\r\n}\r\nfunction isAsyncThunkArray(a) {\r\n return typeof a[0] === \"function\" && \"pending\" in a[0] && \"fulfilled\" in a[0] && \"rejected\" in a[0];\r\n}\r\nfunction isPending() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejected() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejectedWithValue() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n var hasFlag = function (action) {\r\n return action && action.meta && action.meta.rejectedWithValue;\r\n };\r\n if (asyncThunks.length === 0) {\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isFulfilled() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"fulfilled\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isAsyncThunkAction() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = [];\r\n for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {\r\n var asyncThunk = asyncThunks_1[_i];\r\n matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);\r\n }\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\n// src/listenerMiddleware/utils.ts\r\nvar assertFunction = function (func, expected) {\r\n if (typeof func !== \"function\") {\r\n throw new TypeError(expected + \" is not a function\");\r\n }\r\n};\r\nvar noop = function () {\r\n};\r\nvar catchRejection = function (promise2, onError) {\r\n if (onError === void 0) { onError = noop; }\r\n promise2.catch(onError);\r\n return promise2;\r\n};\r\nvar addAbortSignalListener = function (abortSignal, callback) {\r\n abortSignal.addEventListener(\"abort\", callback, { once: true });\r\n return function () { return abortSignal.removeEventListener(\"abort\", callback); };\r\n};\r\nvar abortControllerWithReason = function (abortController, reason) {\r\n var signal = abortController.signal;\r\n if (signal.aborted) {\r\n return;\r\n }\r\n if (!(\"reason\" in signal)) {\r\n Object.defineProperty(signal, \"reason\", {\r\n enumerable: true,\r\n value: reason,\r\n configurable: true,\r\n writable: true\r\n });\r\n }\r\n ;\r\n abortController.abort(reason);\r\n};\r\n// src/listenerMiddleware/exceptions.ts\r\nvar task = \"task\";\r\nvar listener = \"listener\";\r\nvar completed = \"completed\";\r\nvar cancelled = \"cancelled\";\r\nvar taskCancelled = \"task-\" + cancelled;\r\nvar taskCompleted = \"task-\" + completed;\r\nvar listenerCancelled = listener + \"-\" + cancelled;\r\nvar listenerCompleted = listener + \"-\" + completed;\r\nvar TaskAbortError = /** @class */ (function () {\r\n function TaskAbortError(code) {\r\n this.code = code;\r\n this.name = \"TaskAbortError\";\r\n this.message = task + \" \" + cancelled + \" (reason: \" + code + \")\";\r\n }\r\n return TaskAbortError;\r\n}());\r\n// src/listenerMiddleware/task.ts\r\nvar validateActive = function (signal) {\r\n if (signal.aborted) {\r\n throw new TaskAbortError(signal.reason);\r\n }\r\n};\r\nfunction raceWithSignal(signal, promise2) {\r\n var cleanup = noop;\r\n return new Promise(function (resolve, reject) {\r\n var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };\r\n if (signal.aborted) {\r\n notifyRejection();\r\n return;\r\n }\r\n cleanup = addAbortSignalListener(signal, notifyRejection);\r\n promise2.finally(function () { return cleanup(); }).then(resolve, reject);\r\n }).finally(function () {\r\n cleanup = noop;\r\n });\r\n}\r\nvar runTask = function (task2, cleanUp) { return __async(void 0, null, function () {\r\n var value, error_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 3, 4, 5]);\r\n return [4 /*yield*/, Promise.resolve()];\r\n case 1:\r\n _c.sent();\r\n return [4 /*yield*/, task2()];\r\n case 2:\r\n value = _c.sent();\r\n return [2 /*return*/, {\r\n status: \"ok\",\r\n value: value\r\n }];\r\n case 3:\r\n error_1 = _c.sent();\r\n return [2 /*return*/, {\r\n status: error_1 instanceof TaskAbortError ? \"cancelled\" : \"rejected\",\r\n error: error_1\r\n }];\r\n case 4:\r\n cleanUp == null ? void 0 : cleanUp();\r\n return [7 /*endfinally*/];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n}); };\r\nvar createPause = function (signal) {\r\n return function (promise2) {\r\n return catchRejection(raceWithSignal(signal, promise2).then(function (output) {\r\n validateActive(signal);\r\n return output;\r\n }));\r\n };\r\n};\r\nvar createDelay = function (signal) {\r\n var pause = createPause(signal);\r\n return function (timeoutMs) {\r\n return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));\r\n };\r\n};\r\n// src/listenerMiddleware/index.ts\r\nvar assign = Object.assign;\r\nvar INTERNAL_NIL_TOKEN = {};\r\nvar alm = \"listenerMiddleware\";\r\nvar createFork = function (parentAbortSignal, parentBlockingPromises) {\r\n var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };\r\n return function (taskExecutor, opts) {\r\n assertFunction(taskExecutor, \"taskExecutor\");\r\n var childAbortController = new AbortController();\r\n linkControllers(childAbortController);\r\n var result = runTask(function () { return __async(void 0, null, function () {\r\n var result2;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(parentAbortSignal);\r\n validateActive(childAbortController.signal);\r\n return [4 /*yield*/, taskExecutor({\r\n pause: createPause(childAbortController.signal),\r\n delay: createDelay(childAbortController.signal),\r\n signal: childAbortController.signal\r\n })];\r\n case 1:\r\n result2 = _c.sent();\r\n validateActive(childAbortController.signal);\r\n return [2 /*return*/, result2];\r\n }\r\n });\r\n }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });\r\n if (opts == null ? void 0 : opts.autoJoin) {\r\n parentBlockingPromises.push(result);\r\n }\r\n return {\r\n result: createPause(parentAbortSignal)(result),\r\n cancel: function () {\r\n abortControllerWithReason(childAbortController, taskCancelled);\r\n }\r\n };\r\n };\r\n};\r\nvar createTakePattern = function (startListening, signal) {\r\n var take = function (predicate, timeout) { return __async(void 0, null, function () {\r\n var unsubscribe, tuplePromise, promises, output;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(signal);\r\n unsubscribe = function () {\r\n };\r\n tuplePromise = new Promise(function (resolve, reject) {\r\n var stopListening = startListening({\r\n predicate: predicate,\r\n effect: function (action, listenerApi) {\r\n listenerApi.unsubscribe();\r\n resolve([\r\n action,\r\n listenerApi.getState(),\r\n listenerApi.getOriginalState()\r\n ]);\r\n }\r\n });\r\n unsubscribe = function () {\r\n stopListening();\r\n reject();\r\n };\r\n });\r\n promises = [\r\n tuplePromise\r\n ];\r\n if (timeout != null) {\r\n promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));\r\n }\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, , 3, 4]);\r\n return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))];\r\n case 2:\r\n output = _c.sent();\r\n validateActive(signal);\r\n return [2 /*return*/, output];\r\n case 3:\r\n unsubscribe();\r\n return [7 /*endfinally*/];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };\r\n};\r\nvar getListenerEntryPropsFrom = function (options) {\r\n var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;\r\n if (type) {\r\n predicate = createAction(type).match;\r\n }\r\n else if (actionCreator) {\r\n type = actionCreator.type;\r\n predicate = actionCreator.match;\r\n }\r\n else if (matcher) {\r\n predicate = matcher;\r\n }\r\n else if (predicate) {\r\n }\r\n else {\r\n throw new Error(\"Creating or removing a listener requires one of the known fields for matching an action\");\r\n }\r\n assertFunction(effect, \"options.listener\");\r\n return { predicate: predicate, type: type, effect: effect };\r\n};\r\nvar createListenerEntry = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;\r\n var id = nanoid();\r\n var entry = {\r\n id: id,\r\n effect: effect,\r\n type: type,\r\n predicate: predicate,\r\n pending: new Set(),\r\n unsubscribe: function () {\r\n throw new Error(\"Unsubscribe not initialized\");\r\n }\r\n };\r\n return entry;\r\n};\r\nvar cancelActiveListeners = function (entry) {\r\n entry.pending.forEach(function (controller) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n });\r\n};\r\nvar createClearListenerMiddleware = function (listenerMap) {\r\n return function () {\r\n listenerMap.forEach(cancelActiveListeners);\r\n listenerMap.clear();\r\n };\r\n};\r\nvar safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {\r\n try {\r\n errorHandler(errorToNotify, errorInfo);\r\n }\r\n catch (errorHandlerError) {\r\n setTimeout(function () {\r\n throw errorHandlerError;\r\n }, 0);\r\n }\r\n};\r\nvar addListener = createAction(alm + \"/add\");\r\nvar clearAllListeners = createAction(alm + \"/removeAll\");\r\nvar removeListener = createAction(alm + \"/remove\");\r\nvar defaultErrorHandler = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n console.error.apply(console, __spreadArray([alm + \"/error\"], args));\r\n};\r\nfunction createListenerMiddleware(middlewareOptions) {\r\n var _this = this;\r\n if (middlewareOptions === void 0) { middlewareOptions = {}; }\r\n var listenerMap = new Map();\r\n var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;\r\n assertFunction(onError, \"onError\");\r\n var insertEntry = function (entry) {\r\n entry.unsubscribe = function () { return listenerMap.delete(entry.id); };\r\n listenerMap.set(entry.id, entry);\r\n return function (cancelOptions) {\r\n entry.unsubscribe();\r\n if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n };\r\n };\r\n var findListenerEntry = function (comparator) {\r\n for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {\r\n var entry = _c[_i];\r\n if (comparator(entry)) {\r\n return entry;\r\n }\r\n }\r\n return void 0;\r\n };\r\n var startListening = function (options) {\r\n var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });\r\n if (!entry) {\r\n entry = createListenerEntry(options);\r\n }\r\n return insertEntry(entry);\r\n };\r\n var stopListening = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;\r\n var entry = findListenerEntry(function (entry2) {\r\n var matchPredicateOrType = typeof type === \"string\" ? entry2.type === type : entry2.predicate === predicate;\r\n return matchPredicateOrType && entry2.effect === effect;\r\n });\r\n if (entry) {\r\n entry.unsubscribe();\r\n if (options.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n }\r\n return !!entry;\r\n };\r\n var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {\r\n var internalTaskController, take, autoJoinPromises, listenerError_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n internalTaskController = new AbortController();\r\n take = createTakePattern(startListening, internalTaskController.signal);\r\n autoJoinPromises = [];\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, 3, 4, 6]);\r\n entry.pending.add(internalTaskController);\r\n return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {\r\n getOriginalState: getOriginalState,\r\n condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },\r\n take: take,\r\n delay: createDelay(internalTaskController.signal),\r\n pause: createPause(internalTaskController.signal),\r\n extra: extra,\r\n signal: internalTaskController.signal,\r\n fork: createFork(internalTaskController.signal, autoJoinPromises),\r\n unsubscribe: entry.unsubscribe,\r\n subscribe: function () {\r\n listenerMap.set(entry.id, entry);\r\n },\r\n cancelActiveListeners: function () {\r\n entry.pending.forEach(function (controller, _, set) {\r\n if (controller !== internalTaskController) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n set.delete(controller);\r\n }\r\n });\r\n }\r\n })))];\r\n case 2:\r\n _c.sent();\r\n return [3 /*break*/, 6];\r\n case 3:\r\n listenerError_1 = _c.sent();\r\n if (!(listenerError_1 instanceof TaskAbortError)) {\r\n safelyNotifyError(onError, listenerError_1, {\r\n raisedBy: \"effect\"\r\n });\r\n }\r\n return [3 /*break*/, 6];\r\n case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)];\r\n case 5:\r\n _c.sent();\r\n abortControllerWithReason(internalTaskController, listenerCompleted);\r\n entry.pending.delete(internalTaskController);\r\n return [7 /*endfinally*/];\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);\r\n var middleware = function (api) { return function (next) { return function (action) {\r\n if (!isAction(action)) {\r\n return next(action);\r\n }\r\n if (addListener.match(action)) {\r\n return startListening(action.payload);\r\n }\r\n if (clearAllListeners.match(action)) {\r\n clearListenerMiddleware();\r\n return;\r\n }\r\n if (removeListener.match(action)) {\r\n return stopListening(action.payload);\r\n }\r\n var originalState = api.getState();\r\n var getOriginalState = function () {\r\n if (originalState === INTERNAL_NIL_TOKEN) {\r\n throw new Error(alm + \": getOriginalState can only be called synchronously\");\r\n }\r\n return originalState;\r\n };\r\n var result;\r\n try {\r\n result = next(action);\r\n if (listenerMap.size > 0) {\r\n var currentState = api.getState();\r\n var listenerEntries = Array.from(listenerMap.values());\r\n for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {\r\n var entry = listenerEntries_1[_i];\r\n var runListener = false;\r\n try {\r\n runListener = entry.predicate(action, currentState, originalState);\r\n }\r\n catch (predicateError) {\r\n runListener = false;\r\n safelyNotifyError(onError, predicateError, {\r\n raisedBy: \"predicate\"\r\n });\r\n }\r\n if (!runListener) {\r\n continue;\r\n }\r\n notifyListener(entry, action, api, getOriginalState);\r\n }\r\n }\r\n }\r\n finally {\r\n originalState = INTERNAL_NIL_TOKEN;\r\n }\r\n return result;\r\n }; }; };\r\n return {\r\n middleware: middleware,\r\n startListening: startListening,\r\n stopListening: stopListening,\r\n clearListeners: clearListenerMiddleware\r\n };\r\n}\r\n// src/autoBatchEnhancer.ts\r\nvar SHOULD_AUTOBATCH = \"RTK_autoBatch\";\r\nvar prepareAutoBatched = function () { return function (payload) {\r\n var _c;\r\n return ({\r\n payload: payload,\r\n meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c)\r\n });\r\n}; };\r\nvar promise;\r\nvar queueMicrotaskShim = typeof queueMicrotask === \"function\" ? queueMicrotask.bind(typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () {\r\n throw err;\r\n}, 0); }); };\r\nvar createQueueWithTimer = function (timeout) {\r\n return function (notify) {\r\n setTimeout(notify, timeout);\r\n };\r\n};\r\nvar rAF = typeof window !== \"undefined\" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10);\r\nvar autoBatchEnhancer = function (options) {\r\n if (options === void 0) { options = { type: \"raf\" }; }\r\n return function (next) { return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var store = next.apply(void 0, args);\r\n var notifying = true;\r\n var shouldNotifyAtEndOfTick = false;\r\n var notificationQueued = false;\r\n var listeners = new Set();\r\n var queueCallback = options.type === \"tick\" ? queueMicrotaskShim : options.type === \"raf\" ? rAF : options.type === \"callback\" ? options.queueNotification : createQueueWithTimer(options.timeout);\r\n var notifyListeners = function () {\r\n notificationQueued = false;\r\n if (shouldNotifyAtEndOfTick) {\r\n shouldNotifyAtEndOfTick = false;\r\n listeners.forEach(function (l) { return l(); });\r\n }\r\n };\r\n return Object.assign({}, store, {\r\n subscribe: function (listener2) {\r\n var wrappedListener = function () { return notifying && listener2(); };\r\n var unsubscribe = store.subscribe(wrappedListener);\r\n listeners.add(listener2);\r\n return function () {\r\n unsubscribe();\r\n listeners.delete(listener2);\r\n };\r\n },\r\n dispatch: function (action) {\r\n var _a;\r\n try {\r\n notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]);\r\n shouldNotifyAtEndOfTick = !notifying;\r\n if (shouldNotifyAtEndOfTick) {\r\n if (!notificationQueued) {\r\n notificationQueued = true;\r\n queueCallback(notifyListeners);\r\n }\r\n }\r\n return store.dispatch(action);\r\n }\r\n finally {\r\n notifying = true;\r\n }\r\n }\r\n });\r\n }; };\r\n};\r\n// src/index.ts\r\nenableES5();\r\nexport { EnhancerArray, MiddlewareArray, SHOULD_AUTOBATCH, TaskAbortError, addListener, autoBatchEnhancer, clearAllListeners, configureStore, createAction, createActionCreatorInvariantMiddleware, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, createListenerMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAction, isActionCreator, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFSA as isFluxStandardAction, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, prepareAutoBatched, removeListener, unwrapResult };\r\n//# sourceMappingURL=redux-toolkit.esm.js.map","var __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a, b) {\r\n for (var prop in b || (b = {}))\r\n if (__hasOwnProp.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _j = 0, _k = __getOwnPropSymbols(b); _j < _k.length; _j++) {\r\n var prop = _k[_j];\r\n if (__propIsEnum.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n }\r\n return a;\r\n};\r\nvar __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };\r\nvar __objRest = function (source, exclude) {\r\n var target = {};\r\n for (var prop in source)\r\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\r\n target[prop] = source[prop];\r\n if (source != null && __getOwnPropSymbols)\r\n for (var _j = 0, _k = __getOwnPropSymbols(source); _j < _k.length; _j++) {\r\n var prop = _k[_j];\r\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\r\n target[prop] = source[prop];\r\n }\r\n return target;\r\n};\r\nvar __async = function (__this, __arguments, generator) {\r\n return new Promise(function (resolve, reject) {\r\n var fulfilled = function (value) {\r\n try {\r\n step(generator.next(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var rejected = function (value) {\r\n try {\r\n step(generator.throw(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };\r\n step((generator = generator.apply(__this, __arguments)).next());\r\n });\r\n};\r\n// src/query/core/apiState.ts\r\nvar QueryStatus;\r\n(function (QueryStatus2) {\r\n QueryStatus2[\"uninitialized\"] = \"uninitialized\";\r\n QueryStatus2[\"pending\"] = \"pending\";\r\n QueryStatus2[\"fulfilled\"] = \"fulfilled\";\r\n QueryStatus2[\"rejected\"] = \"rejected\";\r\n})(QueryStatus || (QueryStatus = {}));\r\nfunction getRequestStatusFlags(status) {\r\n return {\r\n status: status,\r\n isUninitialized: status === QueryStatus.uninitialized,\r\n isLoading: status === QueryStatus.pending,\r\n isSuccess: status === QueryStatus.fulfilled,\r\n isError: status === QueryStatus.rejected\r\n };\r\n}\r\n// src/query/utils/isAbsoluteUrl.ts\r\nfunction isAbsoluteUrl(url) {\r\n return new RegExp(\"(^|:)//\").test(url);\r\n}\r\n// src/query/utils/joinUrls.ts\r\nvar withoutTrailingSlash = function (url) { return url.replace(/\\/$/, \"\"); };\r\nvar withoutLeadingSlash = function (url) { return url.replace(/^\\//, \"\"); };\r\nfunction joinUrls(base, url) {\r\n if (!base) {\r\n return url;\r\n }\r\n if (!url) {\r\n return base;\r\n }\r\n if (isAbsoluteUrl(url)) {\r\n return url;\r\n }\r\n var delimiter = base.endsWith(\"/\") || !url.startsWith(\"?\") ? \"/\" : \"\";\r\n base = withoutTrailingSlash(base);\r\n url = withoutLeadingSlash(url);\r\n return \"\" + base + delimiter + url;\r\n}\r\n// src/query/utils/flatten.ts\r\nvar flatten = function (arr) { return [].concat.apply([], arr); };\r\n// src/query/utils/isOnline.ts\r\nfunction isOnline() {\r\n return typeof navigator === \"undefined\" ? true : navigator.onLine === void 0 ? true : navigator.onLine;\r\n}\r\n// src/query/utils/isDocumentVisible.ts\r\nfunction isDocumentVisible() {\r\n if (typeof document === \"undefined\") {\r\n return true;\r\n }\r\n return document.visibilityState !== \"hidden\";\r\n}\r\n// src/query/utils/copyWithStructuralSharing.ts\r\nimport { isPlainObject as _iPO } from \"@reduxjs/toolkit\";\r\nvar isPlainObject = _iPO;\r\nfunction copyWithStructuralSharing(oldObj, newObj) {\r\n if (oldObj === newObj || !(isPlainObject(oldObj) && isPlainObject(newObj) || Array.isArray(oldObj) && Array.isArray(newObj))) {\r\n return newObj;\r\n }\r\n var newKeys = Object.keys(newObj);\r\n var oldKeys = Object.keys(oldObj);\r\n var isSameObject = newKeys.length === oldKeys.length;\r\n var mergeObj = Array.isArray(newObj) ? [] : {};\r\n for (var _j = 0, newKeys_1 = newKeys; _j < newKeys_1.length; _j++) {\r\n var key = newKeys_1[_j];\r\n mergeObj[key] = copyWithStructuralSharing(oldObj[key], newObj[key]);\r\n if (isSameObject)\r\n isSameObject = oldObj[key] === mergeObj[key];\r\n }\r\n return isSameObject ? oldObj : mergeObj;\r\n}\r\n// src/query/fetchBaseQuery.ts\r\nimport { isPlainObject as isPlainObject2 } from \"@reduxjs/toolkit\";\r\nvar defaultFetchFn = function () {\r\n var args = [];\r\n for (var _j = 0; _j < arguments.length; _j++) {\r\n args[_j] = arguments[_j];\r\n }\r\n return fetch.apply(void 0, args);\r\n};\r\nvar defaultValidateStatus = function (response) { return response.status >= 200 && response.status <= 299; };\r\nvar defaultIsJsonContentType = function (headers) { return /ion\\/(vnd\\.api\\+)?json/.test(headers.get(\"content-type\") || \"\"); };\r\nfunction stripUndefined(obj) {\r\n if (!isPlainObject2(obj)) {\r\n return obj;\r\n }\r\n var copy = __spreadValues({}, obj);\r\n for (var _j = 0, _k = Object.entries(copy); _j < _k.length; _j++) {\r\n var _l = _k[_j], k = _l[0], v = _l[1];\r\n if (v === void 0)\r\n delete copy[k];\r\n }\r\n return copy;\r\n}\r\nfunction fetchBaseQuery(_a) {\r\n var _this = this;\r\n if (_a === void 0) { _a = {}; }\r\n var _b = _a, baseUrl = _b.baseUrl, _j = _b.prepareHeaders, prepareHeaders = _j === void 0 ? function (x) { return x; } : _j, _k = _b.fetchFn, fetchFn = _k === void 0 ? defaultFetchFn : _k, paramsSerializer = _b.paramsSerializer, _l = _b.isJsonContentType, isJsonContentType = _l === void 0 ? defaultIsJsonContentType : _l, _m = _b.jsonContentType, jsonContentType = _m === void 0 ? \"application/json\" : _m, jsonReplacer = _b.jsonReplacer, defaultTimeout = _b.timeout, globalResponseHandler = _b.responseHandler, globalValidateStatus = _b.validateStatus, baseFetchOptions = __objRest(_b, [\r\n \"baseUrl\",\r\n \"prepareHeaders\",\r\n \"fetchFn\",\r\n \"paramsSerializer\",\r\n \"isJsonContentType\",\r\n \"jsonContentType\",\r\n \"jsonReplacer\",\r\n \"timeout\",\r\n \"responseHandler\",\r\n \"validateStatus\"\r\n ]);\r\n if (typeof fetch === \"undefined\" && fetchFn === defaultFetchFn) {\r\n console.warn(\"Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments.\");\r\n }\r\n return function (arg, api) { return __async(_this, null, function () {\r\n var signal, getState, extra, endpoint, forced, type, meta, _a2, url, _j, headers, _k, params, _l, responseHandler, _m, validateStatus, _o, timeout, rest, config, _p, isJsonifiable, divider, query, request, requestClone, response, timedOut, timeoutId, e_1, responseClone, resultData, responseText, handleResponseError_1, e_2;\r\n return __generator(this, function (_q) {\r\n switch (_q.label) {\r\n case 0:\r\n signal = api.signal, getState = api.getState, extra = api.extra, endpoint = api.endpoint, forced = api.forced, type = api.type;\r\n _a2 = typeof arg == \"string\" ? { url: arg } : arg, url = _a2.url, _j = _a2.headers, headers = _j === void 0 ? new Headers(baseFetchOptions.headers) : _j, _k = _a2.params, params = _k === void 0 ? void 0 : _k, _l = _a2.responseHandler, responseHandler = _l === void 0 ? globalResponseHandler != null ? globalResponseHandler : \"json\" : _l, _m = _a2.validateStatus, validateStatus = _m === void 0 ? globalValidateStatus != null ? globalValidateStatus : defaultValidateStatus : _m, _o = _a2.timeout, timeout = _o === void 0 ? defaultTimeout : _o, rest = __objRest(_a2, [\r\n \"url\",\r\n \"headers\",\r\n \"params\",\r\n \"responseHandler\",\r\n \"validateStatus\",\r\n \"timeout\"\r\n ]);\r\n config = __spreadValues(__spreadProps(__spreadValues({}, baseFetchOptions), {\r\n signal: signal\r\n }), rest);\r\n headers = new Headers(stripUndefined(headers));\r\n _p = config;\r\n return [4 /*yield*/, prepareHeaders(headers, {\r\n getState: getState,\r\n extra: extra,\r\n endpoint: endpoint,\r\n forced: forced,\r\n type: type\r\n })];\r\n case 1:\r\n _p.headers = (_q.sent()) || headers;\r\n isJsonifiable = function (body) { return typeof body === \"object\" && (isPlainObject2(body) || Array.isArray(body) || typeof body.toJSON === \"function\"); };\r\n if (!config.headers.has(\"content-type\") && isJsonifiable(config.body)) {\r\n config.headers.set(\"content-type\", jsonContentType);\r\n }\r\n if (isJsonifiable(config.body) && isJsonContentType(config.headers)) {\r\n config.body = JSON.stringify(config.body, jsonReplacer);\r\n }\r\n if (params) {\r\n divider = ~url.indexOf(\"?\") ? \"&\" : \"?\";\r\n query = paramsSerializer ? paramsSerializer(params) : new URLSearchParams(stripUndefined(params));\r\n url += divider + query;\r\n }\r\n url = joinUrls(baseUrl, url);\r\n request = new Request(url, config);\r\n requestClone = new Request(url, config);\r\n meta = { request: requestClone };\r\n timedOut = false, timeoutId = timeout && setTimeout(function () {\r\n timedOut = true;\r\n api.abort();\r\n }, timeout);\r\n _q.label = 2;\r\n case 2:\r\n _q.trys.push([2, 4, 5, 6]);\r\n return [4 /*yield*/, fetchFn(request)];\r\n case 3:\r\n response = _q.sent();\r\n return [3 /*break*/, 6];\r\n case 4:\r\n e_1 = _q.sent();\r\n return [2 /*return*/, {\r\n error: {\r\n status: timedOut ? \"TIMEOUT_ERROR\" : \"FETCH_ERROR\",\r\n error: String(e_1)\r\n },\r\n meta: meta\r\n }];\r\n case 5:\r\n if (timeoutId)\r\n clearTimeout(timeoutId);\r\n return [7 /*endfinally*/];\r\n case 6:\r\n responseClone = response.clone();\r\n meta.response = responseClone;\r\n responseText = \"\";\r\n _q.label = 7;\r\n case 7:\r\n _q.trys.push([7, 9, , 10]);\r\n return [4 /*yield*/, Promise.all([\r\n handleResponse(response, responseHandler).then(function (r) { return resultData = r; }, function (e) { return handleResponseError_1 = e; }),\r\n responseClone.text().then(function (r) { return responseText = r; }, function () {\r\n })\r\n ])];\r\n case 8:\r\n _q.sent();\r\n if (handleResponseError_1)\r\n throw handleResponseError_1;\r\n return [3 /*break*/, 10];\r\n case 9:\r\n e_2 = _q.sent();\r\n return [2 /*return*/, {\r\n error: {\r\n status: \"PARSING_ERROR\",\r\n originalStatus: response.status,\r\n data: responseText,\r\n error: String(e_2)\r\n },\r\n meta: meta\r\n }];\r\n case 10: return [2 /*return*/, validateStatus(response, resultData) ? {\r\n data: resultData,\r\n meta: meta\r\n } : {\r\n error: {\r\n status: response.status,\r\n data: resultData\r\n },\r\n meta: meta\r\n }];\r\n }\r\n });\r\n }); };\r\n function handleResponse(response, responseHandler) {\r\n return __async(this, null, function () {\r\n var text;\r\n return __generator(this, function (_j) {\r\n switch (_j.label) {\r\n case 0:\r\n if (typeof responseHandler === \"function\") {\r\n return [2 /*return*/, responseHandler(response)];\r\n }\r\n if (responseHandler === \"content-type\") {\r\n responseHandler = isJsonContentType(response.headers) ? \"json\" : \"text\";\r\n }\r\n if (!(responseHandler === \"json\")) return [3 /*break*/, 2];\r\n return [4 /*yield*/, response.text()];\r\n case 1:\r\n text = _j.sent();\r\n return [2 /*return*/, text.length ? JSON.parse(text) : null];\r\n case 2: return [2 /*return*/, response.text()];\r\n }\r\n });\r\n });\r\n }\r\n}\r\n// src/query/HandledError.ts\r\nvar HandledError = /** @class */ (function () {\r\n function HandledError(value, meta) {\r\n if (meta === void 0) { meta = void 0; }\r\n this.value = value;\r\n this.meta = meta;\r\n }\r\n return HandledError;\r\n}());\r\n// src/query/retry.ts\r\nfunction defaultBackoff(attempt, maxRetries) {\r\n if (attempt === void 0) { attempt = 0; }\r\n if (maxRetries === void 0) { maxRetries = 5; }\r\n return __async(this, null, function () {\r\n var attempts, timeout;\r\n return __generator(this, function (_j) {\r\n switch (_j.label) {\r\n case 0:\r\n attempts = Math.min(attempt, maxRetries);\r\n timeout = ~~((Math.random() + 0.4) * (300 << attempts));\r\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(function (res) { return resolve(res); }, timeout); })];\r\n case 1:\r\n _j.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n}\r\nfunction fail(e) {\r\n throw Object.assign(new HandledError({ error: e }), {\r\n throwImmediately: true\r\n });\r\n}\r\nvar EMPTY_OPTIONS = {};\r\nvar retryWithBackoff = function (baseQuery, defaultOptions) { return function (args, api, extraOptions) { return __async(void 0, null, function () {\r\n var possibleMaxRetries, maxRetries, defaultRetryCondition, options, retry2, result, e_3;\r\n return __generator(this, function (_j) {\r\n switch (_j.label) {\r\n case 0:\r\n possibleMaxRetries = [\r\n 5,\r\n (defaultOptions || EMPTY_OPTIONS).maxRetries,\r\n (extraOptions || EMPTY_OPTIONS).maxRetries\r\n ].filter(function (x) { return x !== void 0; });\r\n maxRetries = possibleMaxRetries.slice(-1)[0];\r\n defaultRetryCondition = function (_, __, _j) {\r\n var attempt = _j.attempt;\r\n return attempt <= maxRetries;\r\n };\r\n options = __spreadValues(__spreadValues({\r\n maxRetries: maxRetries,\r\n backoff: defaultBackoff,\r\n retryCondition: defaultRetryCondition\r\n }, defaultOptions), extraOptions);\r\n retry2 = 0;\r\n _j.label = 1;\r\n case 1:\r\n if (!true) return [3 /*break*/, 7];\r\n _j.label = 2;\r\n case 2:\r\n _j.trys.push([2, 4, , 6]);\r\n return [4 /*yield*/, baseQuery(args, api, extraOptions)];\r\n case 3:\r\n result = _j.sent();\r\n if (result.error) {\r\n throw new HandledError(result);\r\n }\r\n return [2 /*return*/, result];\r\n case 4:\r\n e_3 = _j.sent();\r\n retry2++;\r\n if (e_3.throwImmediately) {\r\n if (e_3 instanceof HandledError) {\r\n return [2 /*return*/, e_3.value];\r\n }\r\n throw e_3;\r\n }\r\n if (e_3 instanceof HandledError && !options.retryCondition(e_3.value.error, args, {\r\n attempt: retry2,\r\n baseQueryApi: api,\r\n extraOptions: extraOptions\r\n })) {\r\n return [2 /*return*/, e_3.value];\r\n }\r\n return [4 /*yield*/, options.backoff(retry2, options.maxRetries)];\r\n case 5:\r\n _j.sent();\r\n return [3 /*break*/, 6];\r\n case 6: return [3 /*break*/, 1];\r\n case 7: return [2 /*return*/];\r\n }\r\n });\r\n}); }; };\r\nvar retry = /* @__PURE__ */ Object.assign(retryWithBackoff, { fail: fail });\r\n// src/query/core/setupListeners.ts\r\nimport { createAction } from \"@reduxjs/toolkit\";\r\nvar onFocus = /* @__PURE__ */ createAction(\"__rtkq/focused\");\r\nvar onFocusLost = /* @__PURE__ */ createAction(\"__rtkq/unfocused\");\r\nvar onOnline = /* @__PURE__ */ createAction(\"__rtkq/online\");\r\nvar onOffline = /* @__PURE__ */ createAction(\"__rtkq/offline\");\r\nvar initialized = false;\r\nfunction setupListeners(dispatch, customHandler) {\r\n function defaultHandler() {\r\n var handleFocus = function () { return dispatch(onFocus()); };\r\n var handleFocusLost = function () { return dispatch(onFocusLost()); };\r\n var handleOnline = function () { return dispatch(onOnline()); };\r\n var handleOffline = function () { return dispatch(onOffline()); };\r\n var handleVisibilityChange = function () {\r\n if (window.document.visibilityState === \"visible\") {\r\n handleFocus();\r\n }\r\n else {\r\n handleFocusLost();\r\n }\r\n };\r\n if (!initialized) {\r\n if (typeof window !== \"undefined\" && window.addEventListener) {\r\n window.addEventListener(\"visibilitychange\", handleVisibilityChange, false);\r\n window.addEventListener(\"focus\", handleFocus, false);\r\n window.addEventListener(\"online\", handleOnline, false);\r\n window.addEventListener(\"offline\", handleOffline, false);\r\n initialized = true;\r\n }\r\n }\r\n var unsubscribe = function () {\r\n window.removeEventListener(\"focus\", handleFocus);\r\n window.removeEventListener(\"visibilitychange\", handleVisibilityChange);\r\n window.removeEventListener(\"online\", handleOnline);\r\n window.removeEventListener(\"offline\", handleOffline);\r\n initialized = false;\r\n };\r\n return unsubscribe;\r\n }\r\n return customHandler ? customHandler(dispatch, { onFocus: onFocus, onFocusLost: onFocusLost, onOffline: onOffline, onOnline: onOnline }) : defaultHandler();\r\n}\r\n// src/query/core/buildSelectors.ts\r\nimport { createNextState as createNextState2, createSelector } from \"@reduxjs/toolkit\";\r\n// src/query/endpointDefinitions.ts\r\nvar DefinitionType;\r\n(function (DefinitionType2) {\r\n DefinitionType2[\"query\"] = \"query\";\r\n DefinitionType2[\"mutation\"] = \"mutation\";\r\n})(DefinitionType || (DefinitionType = {}));\r\nfunction isQueryDefinition(e) {\r\n return e.type === DefinitionType.query;\r\n}\r\nfunction isMutationDefinition(e) {\r\n return e.type === DefinitionType.mutation;\r\n}\r\nfunction calculateProvidedBy(description, result, error, queryArg, meta, assertTagTypes) {\r\n if (isFunction(description)) {\r\n return description(result, error, queryArg, meta).map(expandTagDescription).map(assertTagTypes);\r\n }\r\n if (Array.isArray(description)) {\r\n return description.map(expandTagDescription).map(assertTagTypes);\r\n }\r\n return [];\r\n}\r\nfunction isFunction(t) {\r\n return typeof t === \"function\";\r\n}\r\nfunction expandTagDescription(description) {\r\n return typeof description === \"string\" ? { type: description } : description;\r\n}\r\n// src/query/core/buildSlice.ts\r\nimport { combineReducers, createAction as createAction2, createSlice, isAnyOf, isFulfilled as isFulfilled2, isRejectedWithValue as isRejectedWithValue2, createNextState, prepareAutoBatched } from \"@reduxjs/toolkit\";\r\n// src/query/utils/isNotNullish.ts\r\nfunction isNotNullish(v) {\r\n return v != null;\r\n}\r\n// src/query/core/buildInitiate.ts\r\nvar forceQueryFnSymbol = Symbol(\"forceQueryFn\");\r\nvar isUpsertQuery = function (arg) { return typeof arg[forceQueryFnSymbol] === \"function\"; };\r\nfunction buildInitiate(_j) {\r\n var serializeQueryArgs = _j.serializeQueryArgs, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, api = _j.api, context = _j.context;\r\n var runningQueries = new Map();\r\n var runningMutations = new Map();\r\n var _k = api.internalActions, unsubscribeQueryResult = _k.unsubscribeQueryResult, removeMutationResult = _k.removeMutationResult, updateSubscriptionOptions = _k.updateSubscriptionOptions;\r\n return {\r\n buildInitiateQuery: buildInitiateQuery,\r\n buildInitiateMutation: buildInitiateMutation,\r\n getRunningQueryThunk: getRunningQueryThunk,\r\n getRunningMutationThunk: getRunningMutationThunk,\r\n getRunningQueriesThunk: getRunningQueriesThunk,\r\n getRunningMutationsThunk: getRunningMutationsThunk,\r\n getRunningOperationPromises: getRunningOperationPromises,\r\n removalWarning: removalWarning\r\n };\r\n function removalWarning() {\r\n throw new Error(\"This method had to be removed due to a conceptual bug in RTK.\\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.\");\r\n }\r\n function getRunningOperationPromises() {\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n removalWarning();\r\n }\r\n else {\r\n var extract = function (v) { return Array.from(v.values()).flatMap(function (queriesForStore) { return queriesForStore ? Object.values(queriesForStore) : []; }); };\r\n return __spreadArray(__spreadArray([], extract(runningQueries)), extract(runningMutations)).filter(isNotNullish);\r\n }\r\n }\r\n function getRunningQueryThunk(endpointName, queryArgs) {\r\n return function (dispatch) {\r\n var _a;\r\n var endpointDefinition = context.endpointDefinitions[endpointName];\r\n var queryCacheKey = serializeQueryArgs({\r\n queryArgs: queryArgs,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n });\r\n return (_a = runningQueries.get(dispatch)) == null ? void 0 : _a[queryCacheKey];\r\n };\r\n }\r\n function getRunningMutationThunk(_endpointName, fixedCacheKeyOrRequestId) {\r\n return function (dispatch) {\r\n var _a;\r\n return (_a = runningMutations.get(dispatch)) == null ? void 0 : _a[fixedCacheKeyOrRequestId];\r\n };\r\n }\r\n function getRunningQueriesThunk() {\r\n return function (dispatch) { return Object.values(runningQueries.get(dispatch) || {}).filter(isNotNullish); };\r\n }\r\n function getRunningMutationsThunk() {\r\n return function (dispatch) { return Object.values(runningMutations.get(dispatch) || {}).filter(isNotNullish); };\r\n }\r\n function middlewareWarning(dispatch) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (middlewareWarning.triggered)\r\n return;\r\n var registered = dispatch(api.internalActions.internal_probeSubscription({\r\n queryCacheKey: \"DOES_NOT_EXIST\",\r\n requestId: \"DUMMY_REQUEST_ID\"\r\n }));\r\n middlewareWarning.triggered = true;\r\n if (typeof registered !== \"boolean\") {\r\n throw new Error(\"Warning: Middleware for RTK-Query API at reducerPath \\\"\" + api.reducerPath + \"\\\" has not been added to the store.\\nYou must add the middleware for RTK-Query to function correctly!\");\r\n }\r\n }\r\n }\r\n function buildInitiateQuery(endpointName, endpointDefinition) {\r\n var queryAction = function (arg, _j) {\r\n var _k = _j === void 0 ? {} : _j, _l = _k.subscribe, subscribe = _l === void 0 ? true : _l, forceRefetch = _k.forceRefetch, subscriptionOptions = _k.subscriptionOptions, _m = forceQueryFnSymbol, forceQueryFn = _k[_m];\r\n return function (dispatch, getState) {\r\n var _j;\r\n var _a;\r\n var queryCacheKey = serializeQueryArgs({\r\n queryArgs: arg,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n });\r\n var thunk = queryThunk((_j = {\r\n type: \"query\",\r\n subscribe: subscribe,\r\n forceRefetch: forceRefetch,\r\n subscriptionOptions: subscriptionOptions,\r\n endpointName: endpointName,\r\n originalArgs: arg,\r\n queryCacheKey: queryCacheKey\r\n },\r\n _j[forceQueryFnSymbol] = forceQueryFn,\r\n _j));\r\n var selector = api.endpoints[endpointName].select(arg);\r\n var thunkResult = dispatch(thunk);\r\n var stateAfter = selector(getState());\r\n middlewareWarning(dispatch);\r\n var requestId = thunkResult.requestId, abort = thunkResult.abort;\r\n var skippedSynchronously = stateAfter.requestId !== requestId;\r\n var runningQuery = (_a = runningQueries.get(dispatch)) == null ? void 0 : _a[queryCacheKey];\r\n var selectFromState = function () { return selector(getState()); };\r\n var statePromise = Object.assign(forceQueryFn ? thunkResult.then(selectFromState) : skippedSynchronously && !runningQuery ? Promise.resolve(stateAfter) : Promise.all([runningQuery, thunkResult]).then(selectFromState), {\r\n arg: arg,\r\n requestId: requestId,\r\n subscriptionOptions: subscriptionOptions,\r\n queryCacheKey: queryCacheKey,\r\n abort: abort,\r\n unwrap: function () {\r\n return __async(this, null, function () {\r\n var result;\r\n return __generator(this, function (_j) {\r\n switch (_j.label) {\r\n case 0: return [4 /*yield*/, statePromise];\r\n case 1:\r\n result = _j.sent();\r\n if (result.isError) {\r\n throw result.error;\r\n }\r\n return [2 /*return*/, result.data];\r\n }\r\n });\r\n });\r\n },\r\n refetch: function () { return dispatch(queryAction(arg, { subscribe: false, forceRefetch: true })); },\r\n unsubscribe: function () {\r\n if (subscribe)\r\n dispatch(unsubscribeQueryResult({\r\n queryCacheKey: queryCacheKey,\r\n requestId: requestId\r\n }));\r\n },\r\n updateSubscriptionOptions: function (options) {\r\n statePromise.subscriptionOptions = options;\r\n dispatch(updateSubscriptionOptions({\r\n endpointName: endpointName,\r\n requestId: requestId,\r\n queryCacheKey: queryCacheKey,\r\n options: options\r\n }));\r\n }\r\n });\r\n if (!runningQuery && !skippedSynchronously && !forceQueryFn) {\r\n var running_1 = runningQueries.get(dispatch) || {};\r\n running_1[queryCacheKey] = statePromise;\r\n runningQueries.set(dispatch, running_1);\r\n statePromise.then(function () {\r\n delete running_1[queryCacheKey];\r\n if (!Object.keys(running_1).length) {\r\n runningQueries.delete(dispatch);\r\n }\r\n });\r\n }\r\n return statePromise;\r\n };\r\n };\r\n return queryAction;\r\n }\r\n function buildInitiateMutation(endpointName) {\r\n return function (arg, _j) {\r\n var _k = _j === void 0 ? {} : _j, _l = _k.track, track = _l === void 0 ? true : _l, fixedCacheKey = _k.fixedCacheKey;\r\n return function (dispatch, getState) {\r\n var thunk = mutationThunk({\r\n type: \"mutation\",\r\n endpointName: endpointName,\r\n originalArgs: arg,\r\n track: track,\r\n fixedCacheKey: fixedCacheKey\r\n });\r\n var thunkResult = dispatch(thunk);\r\n middlewareWarning(dispatch);\r\n var requestId = thunkResult.requestId, abort = thunkResult.abort, unwrap = thunkResult.unwrap;\r\n var returnValuePromise = thunkResult.unwrap().then(function (data) { return ({ data: data }); }).catch(function (error) { return ({ error: error }); });\r\n var reset = function () {\r\n dispatch(removeMutationResult({ requestId: requestId, fixedCacheKey: fixedCacheKey }));\r\n };\r\n var ret = Object.assign(returnValuePromise, {\r\n arg: thunkResult.arg,\r\n requestId: requestId,\r\n abort: abort,\r\n unwrap: unwrap,\r\n unsubscribe: reset,\r\n reset: reset\r\n });\r\n var running = runningMutations.get(dispatch) || {};\r\n runningMutations.set(dispatch, running);\r\n running[requestId] = ret;\r\n ret.then(function () {\r\n delete running[requestId];\r\n if (!Object.keys(running).length) {\r\n runningMutations.delete(dispatch);\r\n }\r\n });\r\n if (fixedCacheKey) {\r\n running[fixedCacheKey] = ret;\r\n ret.then(function () {\r\n if (running[fixedCacheKey] === ret) {\r\n delete running[fixedCacheKey];\r\n if (!Object.keys(running).length) {\r\n runningMutations.delete(dispatch);\r\n }\r\n }\r\n });\r\n }\r\n return ret;\r\n };\r\n };\r\n }\r\n}\r\n// src/query/core/buildThunks.ts\r\nimport { isAllOf, isFulfilled, isPending, isRejected, isRejectedWithValue } from \"@reduxjs/toolkit\";\r\nimport { isDraftable, produceWithPatches } from \"immer\";\r\nimport { createAsyncThunk, SHOULD_AUTOBATCH } from \"@reduxjs/toolkit\";\r\nfunction defaultTransformResponse(baseQueryReturnValue) {\r\n return baseQueryReturnValue;\r\n}\r\nfunction buildThunks(_j) {\r\n var _this = this;\r\n var reducerPath = _j.reducerPath, baseQuery = _j.baseQuery, endpointDefinitions = _j.context.endpointDefinitions, serializeQueryArgs = _j.serializeQueryArgs, api = _j.api, assertTagType = _j.assertTagType;\r\n var patchQueryData = function (endpointName, args, patches, updateProvided) { return function (dispatch, getState) {\r\n var endpointDefinition = endpointDefinitions[endpointName];\r\n var queryCacheKey = serializeQueryArgs({\r\n queryArgs: args,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n });\r\n dispatch(api.internalActions.queryResultPatched({ queryCacheKey: queryCacheKey, patches: patches }));\r\n if (!updateProvided) {\r\n return;\r\n }\r\n var newValue = api.endpoints[endpointName].select(args)(getState());\r\n var providedTags = calculateProvidedBy(endpointDefinition.providesTags, newValue.data, void 0, args, {}, assertTagType);\r\n dispatch(api.internalActions.updateProvidedBy({ queryCacheKey: queryCacheKey, providedTags: providedTags }));\r\n }; };\r\n var updateQueryData = function (endpointName, args, updateRecipe, updateProvided) {\r\n if (updateProvided === void 0) { updateProvided = true; }\r\n return function (dispatch, getState) {\r\n var _j, _k;\r\n var endpointDefinition = api.endpoints[endpointName];\r\n var currentState = endpointDefinition.select(args)(getState());\r\n var ret = {\r\n patches: [],\r\n inversePatches: [],\r\n undo: function () { return dispatch(api.util.patchQueryData(endpointName, args, ret.inversePatches, updateProvided)); }\r\n };\r\n if (currentState.status === QueryStatus.uninitialized) {\r\n return ret;\r\n }\r\n var newValue;\r\n if (\"data\" in currentState) {\r\n if (isDraftable(currentState.data)) {\r\n var _l = produceWithPatches(currentState.data, updateRecipe), value = _l[0], patches = _l[1], inversePatches = _l[2];\r\n (_j = ret.patches).push.apply(_j, patches);\r\n (_k = ret.inversePatches).push.apply(_k, inversePatches);\r\n newValue = value;\r\n }\r\n else {\r\n newValue = updateRecipe(currentState.data);\r\n ret.patches.push({ op: \"replace\", path: [], value: newValue });\r\n ret.inversePatches.push({\r\n op: \"replace\",\r\n path: [],\r\n value: currentState.data\r\n });\r\n }\r\n }\r\n dispatch(api.util.patchQueryData(endpointName, args, ret.patches, updateProvided));\r\n return ret;\r\n };\r\n };\r\n var upsertQueryData = function (endpointName, args, value) { return function (dispatch) {\r\n var _j;\r\n return dispatch(api.endpoints[endpointName].initiate(args, (_j = {\r\n subscribe: false,\r\n forceRefetch: true\r\n },\r\n _j[forceQueryFnSymbol] = function () { return ({\r\n data: value\r\n }); },\r\n _j)));\r\n }; };\r\n var executeEndpoint = function (_0, _1) { return __async(_this, [_0, _1], function (arg, _j) {\r\n var endpointDefinition, transformResponse, result, baseQueryApi_1, forceQueryFn, what, err, _k, _l, key, _m, error_1, catchedError, transformErrorResponse, _o, e_4;\r\n var _p, _q;\r\n var signal = _j.signal, abort = _j.abort, rejectWithValue = _j.rejectWithValue, fulfillWithValue = _j.fulfillWithValue, dispatch = _j.dispatch, getState = _j.getState, extra = _j.extra;\r\n return __generator(this, function (_r) {\r\n switch (_r.label) {\r\n case 0:\r\n endpointDefinition = endpointDefinitions[arg.endpointName];\r\n _r.label = 1;\r\n case 1:\r\n _r.trys.push([1, 8, , 13]);\r\n transformResponse = defaultTransformResponse;\r\n result = void 0;\r\n baseQueryApi_1 = {\r\n signal: signal,\r\n abort: abort,\r\n dispatch: dispatch,\r\n getState: getState,\r\n extra: extra,\r\n endpoint: arg.endpointName,\r\n type: arg.type,\r\n forced: arg.type === \"query\" ? isForcedQuery(arg, getState()) : void 0\r\n };\r\n forceQueryFn = arg.type === \"query\" ? arg[forceQueryFnSymbol] : void 0;\r\n if (!forceQueryFn) return [3 /*break*/, 2];\r\n result = forceQueryFn();\r\n return [3 /*break*/, 6];\r\n case 2:\r\n if (!endpointDefinition.query) return [3 /*break*/, 4];\r\n return [4 /*yield*/, baseQuery(endpointDefinition.query(arg.originalArgs), baseQueryApi_1, endpointDefinition.extraOptions)];\r\n case 3:\r\n result = _r.sent();\r\n if (endpointDefinition.transformResponse) {\r\n transformResponse = endpointDefinition.transformResponse;\r\n }\r\n return [3 /*break*/, 6];\r\n case 4: return [4 /*yield*/, endpointDefinition.queryFn(arg.originalArgs, baseQueryApi_1, endpointDefinition.extraOptions, function (arg2) { return baseQuery(arg2, baseQueryApi_1, endpointDefinition.extraOptions); })];\r\n case 5:\r\n result = _r.sent();\r\n _r.label = 6;\r\n case 6:\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n what = endpointDefinition.query ? \"`baseQuery`\" : \"`queryFn`\";\r\n err = void 0;\r\n if (!result) {\r\n err = what + \" did not return anything.\";\r\n }\r\n else if (typeof result !== \"object\") {\r\n err = what + \" did not return an object.\";\r\n }\r\n else if (result.error && result.data) {\r\n err = what + \" returned an object containing both `error` and `result`.\";\r\n }\r\n else if (result.error === void 0 && result.data === void 0) {\r\n err = what + \" returned an object containing neither a valid `error` and `result`. At least one of them should not be `undefined`\";\r\n }\r\n else {\r\n for (_k = 0, _l = Object.keys(result); _k < _l.length; _k++) {\r\n key = _l[_k];\r\n if (key !== \"error\" && key !== \"data\" && key !== \"meta\") {\r\n err = \"The object returned by \" + what + \" has the unknown property \" + key + \".\";\r\n break;\r\n }\r\n }\r\n }\r\n if (err) {\r\n console.error(\"Error encountered handling the endpoint \" + arg.endpointName + \".\\n \" + err + \"\\n It needs to return an object with either the shape `{ data: }` or `{ error: }` that may contain an optional `meta` property.\\n Object returned was:\", result);\r\n }\r\n }\r\n if (result.error)\r\n throw new HandledError(result.error, result.meta);\r\n _m = fulfillWithValue;\r\n return [4 /*yield*/, transformResponse(result.data, result.meta, arg.originalArgs)];\r\n case 7: return [2 /*return*/, _m.apply(void 0, [_r.sent(), (_p = {\r\n fulfilledTimeStamp: Date.now(),\r\n baseQueryMeta: result.meta\r\n },\r\n _p[SHOULD_AUTOBATCH] = true,\r\n _p)])];\r\n case 8:\r\n error_1 = _r.sent();\r\n catchedError = error_1;\r\n if (!(catchedError instanceof HandledError)) return [3 /*break*/, 12];\r\n transformErrorResponse = defaultTransformResponse;\r\n if (endpointDefinition.query && endpointDefinition.transformErrorResponse) {\r\n transformErrorResponse = endpointDefinition.transformErrorResponse;\r\n }\r\n _r.label = 9;\r\n case 9:\r\n _r.trys.push([9, 11, , 12]);\r\n _o = rejectWithValue;\r\n return [4 /*yield*/, transformErrorResponse(catchedError.value, catchedError.meta, arg.originalArgs)];\r\n case 10: return [2 /*return*/, _o.apply(void 0, [_r.sent(), (_q = { baseQueryMeta: catchedError.meta }, _q[SHOULD_AUTOBATCH] = true, _q)])];\r\n case 11:\r\n e_4 = _r.sent();\r\n catchedError = e_4;\r\n return [3 /*break*/, 12];\r\n case 12:\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\r\n console.error(\"An unhandled error occurred processing a request for the endpoint \\\"\" + arg.endpointName + \"\\\".\\nIn the case of an unhandled error, no tags will be \\\"provided\\\" or \\\"invalidated\\\".\", catchedError);\r\n }\r\n else {\r\n console.error(catchedError);\r\n }\r\n throw catchedError;\r\n case 13: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n function isForcedQuery(arg, state) {\r\n var _a, _b, _c, _d;\r\n var requestState = (_b = (_a = state[reducerPath]) == null ? void 0 : _a.queries) == null ? void 0 : _b[arg.queryCacheKey];\r\n var baseFetchOnMountOrArgChange = (_c = state[reducerPath]) == null ? void 0 : _c.config.refetchOnMountOrArgChange;\r\n var fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp;\r\n var refetchVal = (_d = arg.forceRefetch) != null ? _d : arg.subscribe && baseFetchOnMountOrArgChange;\r\n if (refetchVal) {\r\n return refetchVal === true || (Number(new Date()) - Number(fulfilledVal)) / 1e3 >= refetchVal;\r\n }\r\n return false;\r\n }\r\n var queryThunk = createAsyncThunk(reducerPath + \"/executeQuery\", executeEndpoint, {\r\n getPendingMeta: function () {\r\n var _j;\r\n return _j = { startedTimeStamp: Date.now() }, _j[SHOULD_AUTOBATCH] = true, _j;\r\n },\r\n condition: function (queryThunkArgs, _j) {\r\n var getState = _j.getState;\r\n var _a, _b, _c;\r\n var state = getState();\r\n var requestState = (_b = (_a = state[reducerPath]) == null ? void 0 : _a.queries) == null ? void 0 : _b[queryThunkArgs.queryCacheKey];\r\n var fulfilledVal = requestState == null ? void 0 : requestState.fulfilledTimeStamp;\r\n var currentArg = queryThunkArgs.originalArgs;\r\n var previousArg = requestState == null ? void 0 : requestState.originalArgs;\r\n var endpointDefinition = endpointDefinitions[queryThunkArgs.endpointName];\r\n if (isUpsertQuery(queryThunkArgs)) {\r\n return true;\r\n }\r\n if ((requestState == null ? void 0 : requestState.status) === \"pending\") {\r\n return false;\r\n }\r\n if (isForcedQuery(queryThunkArgs, state)) {\r\n return true;\r\n }\r\n if (isQueryDefinition(endpointDefinition) && ((_c = endpointDefinition == null ? void 0 : endpointDefinition.forceRefetch) == null ? void 0 : _c.call(endpointDefinition, {\r\n currentArg: currentArg,\r\n previousArg: previousArg,\r\n endpointState: requestState,\r\n state: state\r\n }))) {\r\n return true;\r\n }\r\n if (fulfilledVal) {\r\n return false;\r\n }\r\n return true;\r\n },\r\n dispatchConditionRejection: true\r\n });\r\n var mutationThunk = createAsyncThunk(reducerPath + \"/executeMutation\", executeEndpoint, {\r\n getPendingMeta: function () {\r\n var _j;\r\n return _j = { startedTimeStamp: Date.now() }, _j[SHOULD_AUTOBATCH] = true, _j;\r\n }\r\n });\r\n var hasTheForce = function (options) { return \"force\" in options; };\r\n var hasMaxAge = function (options) { return \"ifOlderThan\" in options; };\r\n var prefetch = function (endpointName, arg, options) { return function (dispatch, getState) {\r\n var force = hasTheForce(options) && options.force;\r\n var maxAge = hasMaxAge(options) && options.ifOlderThan;\r\n var queryAction = function (force2) {\r\n if (force2 === void 0) { force2 = true; }\r\n return api.endpoints[endpointName].initiate(arg, { forceRefetch: force2 });\r\n };\r\n var latestStateValue = api.endpoints[endpointName].select(arg)(getState());\r\n if (force) {\r\n dispatch(queryAction());\r\n }\r\n else if (maxAge) {\r\n var lastFulfilledTs = latestStateValue == null ? void 0 : latestStateValue.fulfilledTimeStamp;\r\n if (!lastFulfilledTs) {\r\n dispatch(queryAction());\r\n return;\r\n }\r\n var shouldRetrigger = (Number(new Date()) - Number(new Date(lastFulfilledTs))) / 1e3 >= maxAge;\r\n if (shouldRetrigger) {\r\n dispatch(queryAction());\r\n }\r\n }\r\n else {\r\n dispatch(queryAction(false));\r\n }\r\n }; };\r\n function matchesEndpoint(endpointName) {\r\n return function (action) {\r\n var _a, _b;\r\n return ((_b = (_a = action == null ? void 0 : action.meta) == null ? void 0 : _a.arg) == null ? void 0 : _b.endpointName) === endpointName;\r\n };\r\n }\r\n function buildMatchThunkActions(thunk, endpointName) {\r\n return {\r\n matchPending: isAllOf(isPending(thunk), matchesEndpoint(endpointName)),\r\n matchFulfilled: isAllOf(isFulfilled(thunk), matchesEndpoint(endpointName)),\r\n matchRejected: isAllOf(isRejected(thunk), matchesEndpoint(endpointName))\r\n };\r\n }\r\n return {\r\n queryThunk: queryThunk,\r\n mutationThunk: mutationThunk,\r\n prefetch: prefetch,\r\n updateQueryData: updateQueryData,\r\n upsertQueryData: upsertQueryData,\r\n patchQueryData: patchQueryData,\r\n buildMatchThunkActions: buildMatchThunkActions\r\n };\r\n}\r\nfunction calculateProvidedByThunk(action, type, endpointDefinitions, assertTagType) {\r\n return calculateProvidedBy(endpointDefinitions[action.meta.arg.endpointName][type], isFulfilled(action) ? action.payload : void 0, isRejectedWithValue(action) ? action.payload : void 0, action.meta.arg.originalArgs, \"baseQueryMeta\" in action.meta ? action.meta.baseQueryMeta : void 0, assertTagType);\r\n}\r\n// src/query/core/buildSlice.ts\r\nimport { isDraft } from \"immer\";\r\nimport { applyPatches, original } from \"immer\";\r\nfunction updateQuerySubstateIfExists(state, queryCacheKey, update) {\r\n var substate = state[queryCacheKey];\r\n if (substate) {\r\n update(substate);\r\n }\r\n}\r\nfunction getMutationCacheKey(id) {\r\n var _a;\r\n return (_a = \"arg\" in id ? id.arg.fixedCacheKey : id.fixedCacheKey) != null ? _a : id.requestId;\r\n}\r\nfunction updateMutationSubstateIfExists(state, id, update) {\r\n var substate = state[getMutationCacheKey(id)];\r\n if (substate) {\r\n update(substate);\r\n }\r\n}\r\nvar initialState = {};\r\nfunction buildSlice(_j) {\r\n var reducerPath = _j.reducerPath, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, _k = _j.context, definitions = _k.endpointDefinitions, apiUid = _k.apiUid, extractRehydrationInfo = _k.extractRehydrationInfo, hasRehydrationInfo = _k.hasRehydrationInfo, assertTagType = _j.assertTagType, config = _j.config;\r\n var resetApiState = createAction2(reducerPath + \"/resetApiState\");\r\n var querySlice = createSlice({\r\n name: reducerPath + \"/queries\",\r\n initialState: initialState,\r\n reducers: {\r\n removeQueryResult: {\r\n reducer: function (draft, _j) {\r\n var queryCacheKey = _j.payload.queryCacheKey;\r\n delete draft[queryCacheKey];\r\n },\r\n prepare: prepareAutoBatched()\r\n },\r\n queryResultPatched: {\r\n reducer: function (draft, _j) {\r\n var _k = _j.payload, queryCacheKey = _k.queryCacheKey, patches = _k.patches;\r\n updateQuerySubstateIfExists(draft, queryCacheKey, function (substate) {\r\n substate.data = applyPatches(substate.data, patches.concat());\r\n });\r\n },\r\n prepare: prepareAutoBatched()\r\n }\r\n },\r\n extraReducers: function (builder) {\r\n builder.addCase(queryThunk.pending, function (draft, _j) {\r\n var meta = _j.meta, arg = _j.meta.arg;\r\n var _a, _b;\r\n var upserting = isUpsertQuery(arg);\r\n if (arg.subscribe || upserting) {\r\n (_b = draft[_a = arg.queryCacheKey]) != null ? _b : draft[_a] = {\r\n status: QueryStatus.uninitialized,\r\n endpointName: arg.endpointName\r\n };\r\n }\r\n updateQuerySubstateIfExists(draft, arg.queryCacheKey, function (substate) {\r\n substate.status = QueryStatus.pending;\r\n substate.requestId = upserting && substate.requestId ? substate.requestId : meta.requestId;\r\n if (arg.originalArgs !== void 0) {\r\n substate.originalArgs = arg.originalArgs;\r\n }\r\n substate.startedTimeStamp = meta.startedTimeStamp;\r\n });\r\n }).addCase(queryThunk.fulfilled, function (draft, _j) {\r\n var meta = _j.meta, payload = _j.payload;\r\n updateQuerySubstateIfExists(draft, meta.arg.queryCacheKey, function (substate) {\r\n var _a;\r\n if (substate.requestId !== meta.requestId && !isUpsertQuery(meta.arg))\r\n return;\r\n var merge = definitions[meta.arg.endpointName].merge;\r\n substate.status = QueryStatus.fulfilled;\r\n if (merge) {\r\n if (substate.data !== void 0) {\r\n var fulfilledTimeStamp_1 = meta.fulfilledTimeStamp, arg_1 = meta.arg, baseQueryMeta_1 = meta.baseQueryMeta, requestId_1 = meta.requestId;\r\n var newData = createNextState(substate.data, function (draftSubstateData) {\r\n return merge(draftSubstateData, payload, {\r\n arg: arg_1.originalArgs,\r\n baseQueryMeta: baseQueryMeta_1,\r\n fulfilledTimeStamp: fulfilledTimeStamp_1,\r\n requestId: requestId_1\r\n });\r\n });\r\n substate.data = newData;\r\n }\r\n else {\r\n substate.data = payload;\r\n }\r\n }\r\n else {\r\n substate.data = ((_a = definitions[meta.arg.endpointName].structuralSharing) != null ? _a : true) ? copyWithStructuralSharing(isDraft(substate.data) ? original(substate.data) : substate.data, payload) : payload;\r\n }\r\n delete substate.error;\r\n substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;\r\n });\r\n }).addCase(queryThunk.rejected, function (draft, _j) {\r\n var _k = _j.meta, condition = _k.condition, arg = _k.arg, requestId = _k.requestId, error = _j.error, payload = _j.payload;\r\n updateQuerySubstateIfExists(draft, arg.queryCacheKey, function (substate) {\r\n if (condition) {\r\n }\r\n else {\r\n if (substate.requestId !== requestId)\r\n return;\r\n substate.status = QueryStatus.rejected;\r\n substate.error = payload != null ? payload : error;\r\n }\r\n });\r\n }).addMatcher(hasRehydrationInfo, function (draft, action) {\r\n var queries = extractRehydrationInfo(action).queries;\r\n for (var _j = 0, _k = Object.entries(queries); _j < _k.length; _j++) {\r\n var _l = _k[_j], key = _l[0], entry = _l[1];\r\n if ((entry == null ? void 0 : entry.status) === QueryStatus.fulfilled || (entry == null ? void 0 : entry.status) === QueryStatus.rejected) {\r\n draft[key] = entry;\r\n }\r\n }\r\n });\r\n }\r\n });\r\n var mutationSlice = createSlice({\r\n name: reducerPath + \"/mutations\",\r\n initialState: initialState,\r\n reducers: {\r\n removeMutationResult: {\r\n reducer: function (draft, _j) {\r\n var payload = _j.payload;\r\n var cacheKey = getMutationCacheKey(payload);\r\n if (cacheKey in draft) {\r\n delete draft[cacheKey];\r\n }\r\n },\r\n prepare: prepareAutoBatched()\r\n }\r\n },\r\n extraReducers: function (builder) {\r\n builder.addCase(mutationThunk.pending, function (draft, _j) {\r\n var meta = _j.meta, _k = _j.meta, requestId = _k.requestId, arg = _k.arg, startedTimeStamp = _k.startedTimeStamp;\r\n if (!arg.track)\r\n return;\r\n draft[getMutationCacheKey(meta)] = {\r\n requestId: requestId,\r\n status: QueryStatus.pending,\r\n endpointName: arg.endpointName,\r\n startedTimeStamp: startedTimeStamp\r\n };\r\n }).addCase(mutationThunk.fulfilled, function (draft, _j) {\r\n var payload = _j.payload, meta = _j.meta;\r\n if (!meta.arg.track)\r\n return;\r\n updateMutationSubstateIfExists(draft, meta, function (substate) {\r\n if (substate.requestId !== meta.requestId)\r\n return;\r\n substate.status = QueryStatus.fulfilled;\r\n substate.data = payload;\r\n substate.fulfilledTimeStamp = meta.fulfilledTimeStamp;\r\n });\r\n }).addCase(mutationThunk.rejected, function (draft, _j) {\r\n var payload = _j.payload, error = _j.error, meta = _j.meta;\r\n if (!meta.arg.track)\r\n return;\r\n updateMutationSubstateIfExists(draft, meta, function (substate) {\r\n if (substate.requestId !== meta.requestId)\r\n return;\r\n substate.status = QueryStatus.rejected;\r\n substate.error = payload != null ? payload : error;\r\n });\r\n }).addMatcher(hasRehydrationInfo, function (draft, action) {\r\n var mutations = extractRehydrationInfo(action).mutations;\r\n for (var _j = 0, _k = Object.entries(mutations); _j < _k.length; _j++) {\r\n var _l = _k[_j], key = _l[0], entry = _l[1];\r\n if (((entry == null ? void 0 : entry.status) === QueryStatus.fulfilled || (entry == null ? void 0 : entry.status) === QueryStatus.rejected) && key !== (entry == null ? void 0 : entry.requestId)) {\r\n draft[key] = entry;\r\n }\r\n }\r\n });\r\n }\r\n });\r\n var invalidationSlice = createSlice({\r\n name: reducerPath + \"/invalidation\",\r\n initialState: initialState,\r\n reducers: {\r\n updateProvidedBy: {\r\n reducer: function (draft, action) {\r\n var _a, _b, _c, _d;\r\n var _j = action.payload, queryCacheKey = _j.queryCacheKey, providedTags = _j.providedTags;\r\n for (var _k = 0, _l = Object.values(draft); _k < _l.length; _k++) {\r\n var tagTypeSubscriptions = _l[_k];\r\n for (var _m = 0, _o = Object.values(tagTypeSubscriptions); _m < _o.length; _m++) {\r\n var idSubscriptions = _o[_m];\r\n var foundAt = idSubscriptions.indexOf(queryCacheKey);\r\n if (foundAt !== -1) {\r\n idSubscriptions.splice(foundAt, 1);\r\n }\r\n }\r\n }\r\n for (var _p = 0, providedTags_1 = providedTags; _p < providedTags_1.length; _p++) {\r\n var _q = providedTags_1[_p], type = _q.type, id = _q.id;\r\n var subscribedQueries = (_d = (_b = (_a = draft[type]) != null ? _a : draft[type] = {})[_c = id || \"__internal_without_id\"]) != null ? _d : _b[_c] = [];\r\n var alreadySubscribed = subscribedQueries.includes(queryCacheKey);\r\n if (!alreadySubscribed) {\r\n subscribedQueries.push(queryCacheKey);\r\n }\r\n }\r\n },\r\n prepare: prepareAutoBatched()\r\n }\r\n },\r\n extraReducers: function (builder) {\r\n builder.addCase(querySlice.actions.removeQueryResult, function (draft, _j) {\r\n var queryCacheKey = _j.payload.queryCacheKey;\r\n for (var _k = 0, _l = Object.values(draft); _k < _l.length; _k++) {\r\n var tagTypeSubscriptions = _l[_k];\r\n for (var _m = 0, _o = Object.values(tagTypeSubscriptions); _m < _o.length; _m++) {\r\n var idSubscriptions = _o[_m];\r\n var foundAt = idSubscriptions.indexOf(queryCacheKey);\r\n if (foundAt !== -1) {\r\n idSubscriptions.splice(foundAt, 1);\r\n }\r\n }\r\n }\r\n }).addMatcher(hasRehydrationInfo, function (draft, action) {\r\n var _a, _b, _c, _d;\r\n var provided = extractRehydrationInfo(action).provided;\r\n for (var _j = 0, _k = Object.entries(provided); _j < _k.length; _j++) {\r\n var _l = _k[_j], type = _l[0], incomingTags = _l[1];\r\n for (var _m = 0, _o = Object.entries(incomingTags); _m < _o.length; _m++) {\r\n var _p = _o[_m], id = _p[0], cacheKeys = _p[1];\r\n var subscribedQueries = (_d = (_b = (_a = draft[type]) != null ? _a : draft[type] = {})[_c = id || \"__internal_without_id\"]) != null ? _d : _b[_c] = [];\r\n for (var _q = 0, cacheKeys_1 = cacheKeys; _q < cacheKeys_1.length; _q++) {\r\n var queryCacheKey = cacheKeys_1[_q];\r\n var alreadySubscribed = subscribedQueries.includes(queryCacheKey);\r\n if (!alreadySubscribed) {\r\n subscribedQueries.push(queryCacheKey);\r\n }\r\n }\r\n }\r\n }\r\n }).addMatcher(isAnyOf(isFulfilled2(queryThunk), isRejectedWithValue2(queryThunk)), function (draft, action) {\r\n var providedTags = calculateProvidedByThunk(action, \"providesTags\", definitions, assertTagType);\r\n var queryCacheKey = action.meta.arg.queryCacheKey;\r\n invalidationSlice.caseReducers.updateProvidedBy(draft, invalidationSlice.actions.updateProvidedBy({\r\n queryCacheKey: queryCacheKey,\r\n providedTags: providedTags\r\n }));\r\n });\r\n }\r\n });\r\n var subscriptionSlice = createSlice({\r\n name: reducerPath + \"/subscriptions\",\r\n initialState: initialState,\r\n reducers: {\r\n updateSubscriptionOptions: function (d, a) {\r\n },\r\n unsubscribeQueryResult: function (d, a) {\r\n },\r\n internal_probeSubscription: function (d, a) {\r\n }\r\n }\r\n });\r\n var internalSubscriptionsSlice = createSlice({\r\n name: reducerPath + \"/internalSubscriptions\",\r\n initialState: initialState,\r\n reducers: {\r\n subscriptionsUpdated: {\r\n reducer: function (state, action) {\r\n return applyPatches(state, action.payload);\r\n },\r\n prepare: prepareAutoBatched()\r\n }\r\n }\r\n });\r\n var configSlice = createSlice({\r\n name: reducerPath + \"/config\",\r\n initialState: __spreadValues({\r\n online: isOnline(),\r\n focused: isDocumentVisible(),\r\n middlewareRegistered: false\r\n }, config),\r\n reducers: {\r\n middlewareRegistered: function (state, _j) {\r\n var payload = _j.payload;\r\n state.middlewareRegistered = state.middlewareRegistered === \"conflict\" || apiUid !== payload ? \"conflict\" : true;\r\n }\r\n },\r\n extraReducers: function (builder) {\r\n builder.addCase(onOnline, function (state) {\r\n state.online = true;\r\n }).addCase(onOffline, function (state) {\r\n state.online = false;\r\n }).addCase(onFocus, function (state) {\r\n state.focused = true;\r\n }).addCase(onFocusLost, function (state) {\r\n state.focused = false;\r\n }).addMatcher(hasRehydrationInfo, function (draft) { return __spreadValues({}, draft); });\r\n }\r\n });\r\n var combinedReducer = combineReducers({\r\n queries: querySlice.reducer,\r\n mutations: mutationSlice.reducer,\r\n provided: invalidationSlice.reducer,\r\n subscriptions: internalSubscriptionsSlice.reducer,\r\n config: configSlice.reducer\r\n });\r\n var reducer = function (state, action) { return combinedReducer(resetApiState.match(action) ? void 0 : state, action); };\r\n var actions = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, configSlice.actions), querySlice.actions), subscriptionSlice.actions), internalSubscriptionsSlice.actions), mutationSlice.actions), invalidationSlice.actions), {\r\n unsubscribeMutationResult: mutationSlice.actions.removeMutationResult,\r\n resetApiState: resetApiState\r\n });\r\n return { reducer: reducer, actions: actions };\r\n}\r\n// src/query/core/buildSelectors.ts\r\nvar skipToken = /* @__PURE__ */ Symbol.for(\"RTKQ/skipToken\");\r\nvar skipSelector = skipToken;\r\nvar initialSubState = {\r\n status: QueryStatus.uninitialized\r\n};\r\nvar defaultQuerySubState = /* @__PURE__ */ createNextState2(initialSubState, function () {\r\n});\r\nvar defaultMutationSubState = /* @__PURE__ */ createNextState2(initialSubState, function () {\r\n});\r\nfunction buildSelectors(_j) {\r\n var serializeQueryArgs = _j.serializeQueryArgs, reducerPath = _j.reducerPath;\r\n var selectSkippedQuery = function (state) { return defaultQuerySubState; };\r\n var selectSkippedMutation = function (state) { return defaultMutationSubState; };\r\n return { buildQuerySelector: buildQuerySelector, buildMutationSelector: buildMutationSelector, selectInvalidatedBy: selectInvalidatedBy };\r\n function withRequestFlags(substate) {\r\n return __spreadValues(__spreadValues({}, substate), getRequestStatusFlags(substate.status));\r\n }\r\n function selectInternalState(rootState) {\r\n var state = rootState[reducerPath];\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (!state) {\r\n if (selectInternalState.triggered)\r\n return state;\r\n selectInternalState.triggered = true;\r\n console.error(\"Error: No data found at `state.\" + reducerPath + \"`. Did you forget to add the reducer to the store?\");\r\n }\r\n }\r\n return state;\r\n }\r\n function buildQuerySelector(endpointName, endpointDefinition) {\r\n return function (queryArgs) {\r\n var serializedArgs = serializeQueryArgs({\r\n queryArgs: queryArgs,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n });\r\n var selectQuerySubstate = function (state) {\r\n var _a, _b, _c;\r\n return (_c = (_b = (_a = selectInternalState(state)) == null ? void 0 : _a.queries) == null ? void 0 : _b[serializedArgs]) != null ? _c : defaultQuerySubState;\r\n };\r\n var finalSelectQuerySubState = queryArgs === skipToken ? selectSkippedQuery : selectQuerySubstate;\r\n return createSelector(finalSelectQuerySubState, withRequestFlags);\r\n };\r\n }\r\n function buildMutationSelector() {\r\n return function (id) {\r\n var _a;\r\n var mutationId;\r\n if (typeof id === \"object\") {\r\n mutationId = (_a = getMutationCacheKey(id)) != null ? _a : skipToken;\r\n }\r\n else {\r\n mutationId = id;\r\n }\r\n var selectMutationSubstate = function (state) {\r\n var _a2, _b, _c;\r\n return (_c = (_b = (_a2 = selectInternalState(state)) == null ? void 0 : _a2.mutations) == null ? void 0 : _b[mutationId]) != null ? _c : defaultMutationSubState;\r\n };\r\n var finalSelectMutationSubstate = mutationId === skipToken ? selectSkippedMutation : selectMutationSubstate;\r\n return createSelector(finalSelectMutationSubstate, withRequestFlags);\r\n };\r\n }\r\n function selectInvalidatedBy(state, tags) {\r\n var _a;\r\n var apiState = state[reducerPath];\r\n var toInvalidate = new Set();\r\n for (var _j = 0, _k = tags.map(expandTagDescription); _j < _k.length; _j++) {\r\n var tag = _k[_j];\r\n var provided = apiState.provided[tag.type];\r\n if (!provided) {\r\n continue;\r\n }\r\n var invalidateSubscriptions = (_a = tag.id !== void 0 ? provided[tag.id] : flatten(Object.values(provided))) != null ? _a : [];\r\n for (var _l = 0, invalidateSubscriptions_1 = invalidateSubscriptions; _l < invalidateSubscriptions_1.length; _l++) {\r\n var invalidate = invalidateSubscriptions_1[_l];\r\n toInvalidate.add(invalidate);\r\n }\r\n }\r\n return flatten(Array.from(toInvalidate.values()).map(function (queryCacheKey) {\r\n var querySubState = apiState.queries[queryCacheKey];\r\n return querySubState ? [\r\n {\r\n queryCacheKey: queryCacheKey,\r\n endpointName: querySubState.endpointName,\r\n originalArgs: querySubState.originalArgs\r\n }\r\n ] : [];\r\n }));\r\n }\r\n}\r\n// src/query/defaultSerializeQueryArgs.ts\r\nimport { isPlainObject as isPlainObject3 } from \"@reduxjs/toolkit\";\r\nvar cache = WeakMap ? new WeakMap() : void 0;\r\nvar defaultSerializeQueryArgs = function (_j) {\r\n var endpointName = _j.endpointName, queryArgs = _j.queryArgs;\r\n var serialized = \"\";\r\n var cached = cache == null ? void 0 : cache.get(queryArgs);\r\n if (typeof cached === \"string\") {\r\n serialized = cached;\r\n }\r\n else {\r\n var stringified = JSON.stringify(queryArgs, function (key, value) { return isPlainObject3(value) ? Object.keys(value).sort().reduce(function (acc, key2) {\r\n acc[key2] = value[key2];\r\n return acc;\r\n }, {}) : value; });\r\n if (isPlainObject3(queryArgs)) {\r\n cache == null ? void 0 : cache.set(queryArgs, stringified);\r\n }\r\n serialized = stringified;\r\n }\r\n return endpointName + \"(\" + serialized + \")\";\r\n};\r\n// src/query/createApi.ts\r\nimport { nanoid } from \"@reduxjs/toolkit\";\r\nimport { defaultMemoize } from \"reselect\";\r\nfunction buildCreateApi() {\r\n var modules = [];\r\n for (var _j = 0; _j < arguments.length; _j++) {\r\n modules[_j] = arguments[_j];\r\n }\r\n return function baseCreateApi(options) {\r\n var extractRehydrationInfo = defaultMemoize(function (action) {\r\n var _a, _b;\r\n return (_b = options.extractRehydrationInfo) == null ? void 0 : _b.call(options, action, {\r\n reducerPath: (_a = options.reducerPath) != null ? _a : \"api\"\r\n });\r\n });\r\n var optionsWithDefaults = __spreadProps(__spreadValues({\r\n reducerPath: \"api\",\r\n keepUnusedDataFor: 60,\r\n refetchOnMountOrArgChange: false,\r\n refetchOnFocus: false,\r\n refetchOnReconnect: false\r\n }, options), {\r\n extractRehydrationInfo: extractRehydrationInfo,\r\n serializeQueryArgs: function (queryArgsApi) {\r\n var finalSerializeQueryArgs = defaultSerializeQueryArgs;\r\n if (\"serializeQueryArgs\" in queryArgsApi.endpointDefinition) {\r\n var endpointSQA_1 = queryArgsApi.endpointDefinition.serializeQueryArgs;\r\n finalSerializeQueryArgs = function (queryArgsApi2) {\r\n var initialResult = endpointSQA_1(queryArgsApi2);\r\n if (typeof initialResult === \"string\") {\r\n return initialResult;\r\n }\r\n else {\r\n return defaultSerializeQueryArgs(__spreadProps(__spreadValues({}, queryArgsApi2), {\r\n queryArgs: initialResult\r\n }));\r\n }\r\n };\r\n }\r\n else if (options.serializeQueryArgs) {\r\n finalSerializeQueryArgs = options.serializeQueryArgs;\r\n }\r\n return finalSerializeQueryArgs(queryArgsApi);\r\n },\r\n tagTypes: __spreadArray([], options.tagTypes || [])\r\n });\r\n var context = {\r\n endpointDefinitions: {},\r\n batch: function (fn) {\r\n fn();\r\n },\r\n apiUid: nanoid(),\r\n extractRehydrationInfo: extractRehydrationInfo,\r\n hasRehydrationInfo: defaultMemoize(function (action) { return extractRehydrationInfo(action) != null; })\r\n };\r\n var api = {\r\n injectEndpoints: injectEndpoints,\r\n enhanceEndpoints: function (_j) {\r\n var addTagTypes = _j.addTagTypes, endpoints = _j.endpoints;\r\n if (addTagTypes) {\r\n for (var _k = 0, addTagTypes_1 = addTagTypes; _k < addTagTypes_1.length; _k++) {\r\n var eT = addTagTypes_1[_k];\r\n if (!optionsWithDefaults.tagTypes.includes(eT)) {\r\n ;\r\n optionsWithDefaults.tagTypes.push(eT);\r\n }\r\n }\r\n }\r\n if (endpoints) {\r\n for (var _l = 0, _m = Object.entries(endpoints); _l < _m.length; _l++) {\r\n var _o = _m[_l], endpointName = _o[0], partialDefinition = _o[1];\r\n if (typeof partialDefinition === \"function\") {\r\n partialDefinition(context.endpointDefinitions[endpointName]);\r\n }\r\n else {\r\n Object.assign(context.endpointDefinitions[endpointName] || {}, partialDefinition);\r\n }\r\n }\r\n }\r\n return api;\r\n }\r\n };\r\n var initializedModules = modules.map(function (m) { return m.init(api, optionsWithDefaults, context); });\r\n function injectEndpoints(inject) {\r\n var evaluatedEndpoints = inject.endpoints({\r\n query: function (x) { return __spreadProps(__spreadValues({}, x), { type: DefinitionType.query }); },\r\n mutation: function (x) { return __spreadProps(__spreadValues({}, x), { type: DefinitionType.mutation }); }\r\n });\r\n for (var _j = 0, _k = Object.entries(evaluatedEndpoints); _j < _k.length; _j++) {\r\n var _l = _k[_j], endpointName = _l[0], definition = _l[1];\r\n if (!inject.overrideExisting && endpointName in context.endpointDefinitions) {\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n console.error(\"called `injectEndpoints` to override already-existing endpointName \" + endpointName + \" without specifying `overrideExisting: true`\");\r\n }\r\n continue;\r\n }\r\n context.endpointDefinitions[endpointName] = definition;\r\n for (var _m = 0, initializedModules_1 = initializedModules; _m < initializedModules_1.length; _m++) {\r\n var m = initializedModules_1[_m];\r\n m.injectEndpoint(endpointName, definition);\r\n }\r\n }\r\n return api;\r\n }\r\n return api.injectEndpoints({ endpoints: options.endpoints });\r\n };\r\n}\r\n// src/query/fakeBaseQuery.ts\r\nfunction fakeBaseQuery() {\r\n return function () {\r\n throw new Error(\"When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.\");\r\n };\r\n}\r\n// src/query/core/buildMiddleware/index.ts\r\nimport { createAction as createAction3 } from \"@reduxjs/toolkit\";\r\n// src/query/core/buildMiddleware/cacheCollection.ts\r\nfunction isObjectEmpty(obj) {\r\n for (var k in obj) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nvar THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2147483647 / 1e3 - 1;\r\nvar buildCacheCollectionHandler = function (_j) {\r\n var reducerPath = _j.reducerPath, api = _j.api, context = _j.context, internalState = _j.internalState;\r\n var _k = api.internalActions, removeQueryResult = _k.removeQueryResult, unsubscribeQueryResult = _k.unsubscribeQueryResult;\r\n function anySubscriptionsRemainingForKey(queryCacheKey) {\r\n var subscriptions = internalState.currentSubscriptions[queryCacheKey];\r\n return !!subscriptions && !isObjectEmpty(subscriptions);\r\n }\r\n var currentRemovalTimeouts = {};\r\n var handler = function (action, mwApi, internalState2) {\r\n var _a;\r\n if (unsubscribeQueryResult.match(action)) {\r\n var state = mwApi.getState()[reducerPath];\r\n var queryCacheKey = action.payload.queryCacheKey;\r\n handleUnsubscribe(queryCacheKey, (_a = state.queries[queryCacheKey]) == null ? void 0 : _a.endpointName, mwApi, state.config);\r\n }\r\n if (api.util.resetApiState.match(action)) {\r\n for (var _j = 0, _k = Object.entries(currentRemovalTimeouts); _j < _k.length; _j++) {\r\n var _l = _k[_j], key = _l[0], timeout = _l[1];\r\n if (timeout)\r\n clearTimeout(timeout);\r\n delete currentRemovalTimeouts[key];\r\n }\r\n }\r\n if (context.hasRehydrationInfo(action)) {\r\n var state = mwApi.getState()[reducerPath];\r\n var queries = context.extractRehydrationInfo(action).queries;\r\n for (var _m = 0, _o = Object.entries(queries); _m < _o.length; _m++) {\r\n var _p = _o[_m], queryCacheKey = _p[0], queryState = _p[1];\r\n handleUnsubscribe(queryCacheKey, queryState == null ? void 0 : queryState.endpointName, mwApi, state.config);\r\n }\r\n }\r\n };\r\n function handleUnsubscribe(queryCacheKey, endpointName, api2, config) {\r\n var _a;\r\n var endpointDefinition = context.endpointDefinitions[endpointName];\r\n var keepUnusedDataFor = (_a = endpointDefinition == null ? void 0 : endpointDefinition.keepUnusedDataFor) != null ? _a : config.keepUnusedDataFor;\r\n if (keepUnusedDataFor === Infinity) {\r\n return;\r\n }\r\n var finalKeepUnusedDataFor = Math.max(0, Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS));\r\n if (!anySubscriptionsRemainingForKey(queryCacheKey)) {\r\n var currentTimeout = currentRemovalTimeouts[queryCacheKey];\r\n if (currentTimeout) {\r\n clearTimeout(currentTimeout);\r\n }\r\n currentRemovalTimeouts[queryCacheKey] = setTimeout(function () {\r\n if (!anySubscriptionsRemainingForKey(queryCacheKey)) {\r\n api2.dispatch(removeQueryResult({ queryCacheKey: queryCacheKey }));\r\n }\r\n delete currentRemovalTimeouts[queryCacheKey];\r\n }, finalKeepUnusedDataFor * 1e3);\r\n }\r\n }\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/invalidationByTags.ts\r\nimport { isAnyOf as isAnyOf2, isFulfilled as isFulfilled3, isRejectedWithValue as isRejectedWithValue3 } from \"@reduxjs/toolkit\";\r\nvar buildInvalidationByTagsHandler = function (_j) {\r\n var reducerPath = _j.reducerPath, context = _j.context, endpointDefinitions = _j.context.endpointDefinitions, mutationThunk = _j.mutationThunk, api = _j.api, assertTagType = _j.assertTagType, refetchQuery = _j.refetchQuery;\r\n var removeQueryResult = api.internalActions.removeQueryResult;\r\n var isThunkActionWithTags = isAnyOf2(isFulfilled3(mutationThunk), isRejectedWithValue3(mutationThunk));\r\n var handler = function (action, mwApi) {\r\n if (isThunkActionWithTags(action)) {\r\n invalidateTags(calculateProvidedByThunk(action, \"invalidatesTags\", endpointDefinitions, assertTagType), mwApi);\r\n }\r\n if (api.util.invalidateTags.match(action)) {\r\n invalidateTags(calculateProvidedBy(action.payload, void 0, void 0, void 0, void 0, assertTagType), mwApi);\r\n }\r\n };\r\n function invalidateTags(tags, mwApi) {\r\n var rootState = mwApi.getState();\r\n var state = rootState[reducerPath];\r\n var toInvalidate = api.util.selectInvalidatedBy(rootState, tags);\r\n context.batch(function () {\r\n var _a;\r\n var valuesArray = Array.from(toInvalidate.values());\r\n for (var _j = 0, valuesArray_1 = valuesArray; _j < valuesArray_1.length; _j++) {\r\n var queryCacheKey = valuesArray_1[_j].queryCacheKey;\r\n var querySubState = state.queries[queryCacheKey];\r\n var subscriptionSubState = (_a = state.subscriptions[queryCacheKey]) != null ? _a : {};\r\n if (querySubState) {\r\n if (Object.keys(subscriptionSubState).length === 0) {\r\n mwApi.dispatch(removeQueryResult({\r\n queryCacheKey: queryCacheKey\r\n }));\r\n }\r\n else if (querySubState.status !== QueryStatus.uninitialized) {\r\n mwApi.dispatch(refetchQuery(querySubState, queryCacheKey));\r\n }\r\n }\r\n }\r\n });\r\n }\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/polling.ts\r\nvar buildPollingHandler = function (_j) {\r\n var reducerPath = _j.reducerPath, queryThunk = _j.queryThunk, api = _j.api, refetchQuery = _j.refetchQuery, internalState = _j.internalState;\r\n var currentPolls = {};\r\n var handler = function (action, mwApi) {\r\n if (api.internalActions.updateSubscriptionOptions.match(action) || api.internalActions.unsubscribeQueryResult.match(action)) {\r\n updatePollingInterval(action.payload, mwApi);\r\n }\r\n if (queryThunk.pending.match(action) || queryThunk.rejected.match(action) && action.meta.condition) {\r\n updatePollingInterval(action.meta.arg, mwApi);\r\n }\r\n if (queryThunk.fulfilled.match(action) || queryThunk.rejected.match(action) && !action.meta.condition) {\r\n startNextPoll(action.meta.arg, mwApi);\r\n }\r\n if (api.util.resetApiState.match(action)) {\r\n clearPolls();\r\n }\r\n };\r\n function startNextPoll(_j, api2) {\r\n var queryCacheKey = _j.queryCacheKey;\r\n var state = api2.getState()[reducerPath];\r\n var querySubState = state.queries[queryCacheKey];\r\n var subscriptions = internalState.currentSubscriptions[queryCacheKey];\r\n if (!querySubState || querySubState.status === QueryStatus.uninitialized)\r\n return;\r\n var lowestPollingInterval = findLowestPollingInterval(subscriptions);\r\n if (!Number.isFinite(lowestPollingInterval))\r\n return;\r\n var currentPoll = currentPolls[queryCacheKey];\r\n if (currentPoll == null ? void 0 : currentPoll.timeout) {\r\n clearTimeout(currentPoll.timeout);\r\n currentPoll.timeout = void 0;\r\n }\r\n var nextPollTimestamp = Date.now() + lowestPollingInterval;\r\n var currentInterval = currentPolls[queryCacheKey] = {\r\n nextPollTimestamp: nextPollTimestamp,\r\n pollingInterval: lowestPollingInterval,\r\n timeout: setTimeout(function () {\r\n currentInterval.timeout = void 0;\r\n api2.dispatch(refetchQuery(querySubState, queryCacheKey));\r\n }, lowestPollingInterval)\r\n };\r\n }\r\n function updatePollingInterval(_j, api2) {\r\n var queryCacheKey = _j.queryCacheKey;\r\n var state = api2.getState()[reducerPath];\r\n var querySubState = state.queries[queryCacheKey];\r\n var subscriptions = internalState.currentSubscriptions[queryCacheKey];\r\n if (!querySubState || querySubState.status === QueryStatus.uninitialized) {\r\n return;\r\n }\r\n var lowestPollingInterval = findLowestPollingInterval(subscriptions);\r\n if (!Number.isFinite(lowestPollingInterval)) {\r\n cleanupPollForKey(queryCacheKey);\r\n return;\r\n }\r\n var currentPoll = currentPolls[queryCacheKey];\r\n var nextPollTimestamp = Date.now() + lowestPollingInterval;\r\n if (!currentPoll || nextPollTimestamp < currentPoll.nextPollTimestamp) {\r\n startNextPoll({ queryCacheKey: queryCacheKey }, api2);\r\n }\r\n }\r\n function cleanupPollForKey(key) {\r\n var existingPoll = currentPolls[key];\r\n if (existingPoll == null ? void 0 : existingPoll.timeout) {\r\n clearTimeout(existingPoll.timeout);\r\n }\r\n delete currentPolls[key];\r\n }\r\n function clearPolls() {\r\n for (var _j = 0, _k = Object.keys(currentPolls); _j < _k.length; _j++) {\r\n var key = _k[_j];\r\n cleanupPollForKey(key);\r\n }\r\n }\r\n function findLowestPollingInterval(subscribers) {\r\n if (subscribers === void 0) { subscribers = {}; }\r\n var lowestPollingInterval = Number.POSITIVE_INFINITY;\r\n for (var key in subscribers) {\r\n if (!!subscribers[key].pollingInterval) {\r\n lowestPollingInterval = Math.min(subscribers[key].pollingInterval, lowestPollingInterval);\r\n }\r\n }\r\n return lowestPollingInterval;\r\n }\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/windowEventHandling.ts\r\nvar buildWindowEventHandler = function (_j) {\r\n var reducerPath = _j.reducerPath, context = _j.context, api = _j.api, refetchQuery = _j.refetchQuery, internalState = _j.internalState;\r\n var removeQueryResult = api.internalActions.removeQueryResult;\r\n var handler = function (action, mwApi) {\r\n if (onFocus.match(action)) {\r\n refetchValidQueries(mwApi, \"refetchOnFocus\");\r\n }\r\n if (onOnline.match(action)) {\r\n refetchValidQueries(mwApi, \"refetchOnReconnect\");\r\n }\r\n };\r\n function refetchValidQueries(api2, type) {\r\n var state = api2.getState()[reducerPath];\r\n var queries = state.queries;\r\n var subscriptions = internalState.currentSubscriptions;\r\n context.batch(function () {\r\n for (var _j = 0, _k = Object.keys(subscriptions); _j < _k.length; _j++) {\r\n var queryCacheKey = _k[_j];\r\n var querySubState = queries[queryCacheKey];\r\n var subscriptionSubState = subscriptions[queryCacheKey];\r\n if (!subscriptionSubState || !querySubState)\r\n continue;\r\n var shouldRefetch = Object.values(subscriptionSubState).some(function (sub) { return sub[type] === true; }) || Object.values(subscriptionSubState).every(function (sub) { return sub[type] === void 0; }) && state.config[type];\r\n if (shouldRefetch) {\r\n if (Object.keys(subscriptionSubState).length === 0) {\r\n api2.dispatch(removeQueryResult({\r\n queryCacheKey: queryCacheKey\r\n }));\r\n }\r\n else if (querySubState.status !== QueryStatus.uninitialized) {\r\n api2.dispatch(refetchQuery(querySubState, queryCacheKey));\r\n }\r\n }\r\n }\r\n });\r\n }\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/cacheLifecycle.ts\r\nimport { isAsyncThunkAction, isFulfilled as isFulfilled4 } from \"@reduxjs/toolkit\";\r\nvar neverResolvedError = new Error(\"Promise never resolved before cacheEntryRemoved.\");\r\nvar buildCacheLifecycleHandler = function (_j) {\r\n var api = _j.api, reducerPath = _j.reducerPath, context = _j.context, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk, internalState = _j.internalState;\r\n var isQueryThunk = isAsyncThunkAction(queryThunk);\r\n var isMutationThunk = isAsyncThunkAction(mutationThunk);\r\n var isFulfilledThunk = isFulfilled4(queryThunk, mutationThunk);\r\n var lifecycleMap = {};\r\n var handler = function (action, mwApi, stateBefore) {\r\n var cacheKey = getCacheKey(action);\r\n if (queryThunk.pending.match(action)) {\r\n var oldState = stateBefore[reducerPath].queries[cacheKey];\r\n var state = mwApi.getState()[reducerPath].queries[cacheKey];\r\n if (!oldState && state) {\r\n handleNewKey(action.meta.arg.endpointName, action.meta.arg.originalArgs, cacheKey, mwApi, action.meta.requestId);\r\n }\r\n }\r\n else if (mutationThunk.pending.match(action)) {\r\n var state = mwApi.getState()[reducerPath].mutations[cacheKey];\r\n if (state) {\r\n handleNewKey(action.meta.arg.endpointName, action.meta.arg.originalArgs, cacheKey, mwApi, action.meta.requestId);\r\n }\r\n }\r\n else if (isFulfilledThunk(action)) {\r\n var lifecycle = lifecycleMap[cacheKey];\r\n if (lifecycle == null ? void 0 : lifecycle.valueResolved) {\r\n lifecycle.valueResolved({\r\n data: action.payload,\r\n meta: action.meta.baseQueryMeta\r\n });\r\n delete lifecycle.valueResolved;\r\n }\r\n }\r\n else if (api.internalActions.removeQueryResult.match(action) || api.internalActions.removeMutationResult.match(action)) {\r\n var lifecycle = lifecycleMap[cacheKey];\r\n if (lifecycle) {\r\n delete lifecycleMap[cacheKey];\r\n lifecycle.cacheEntryRemoved();\r\n }\r\n }\r\n else if (api.util.resetApiState.match(action)) {\r\n for (var _j = 0, _k = Object.entries(lifecycleMap); _j < _k.length; _j++) {\r\n var _l = _k[_j], cacheKey2 = _l[0], lifecycle = _l[1];\r\n delete lifecycleMap[cacheKey2];\r\n lifecycle.cacheEntryRemoved();\r\n }\r\n }\r\n };\r\n function getCacheKey(action) {\r\n if (isQueryThunk(action))\r\n return action.meta.arg.queryCacheKey;\r\n if (isMutationThunk(action))\r\n return action.meta.requestId;\r\n if (api.internalActions.removeQueryResult.match(action))\r\n return action.payload.queryCacheKey;\r\n if (api.internalActions.removeMutationResult.match(action))\r\n return getMutationCacheKey(action.payload);\r\n return \"\";\r\n }\r\n function handleNewKey(endpointName, originalArgs, queryCacheKey, mwApi, requestId) {\r\n var endpointDefinition = context.endpointDefinitions[endpointName];\r\n var onCacheEntryAdded = endpointDefinition == null ? void 0 : endpointDefinition.onCacheEntryAdded;\r\n if (!onCacheEntryAdded)\r\n return;\r\n var lifecycle = {};\r\n var cacheEntryRemoved = new Promise(function (resolve) {\r\n lifecycle.cacheEntryRemoved = resolve;\r\n });\r\n var cacheDataLoaded = Promise.race([\r\n new Promise(function (resolve) {\r\n lifecycle.valueResolved = resolve;\r\n }),\r\n cacheEntryRemoved.then(function () {\r\n throw neverResolvedError;\r\n })\r\n ]);\r\n cacheDataLoaded.catch(function () {\r\n });\r\n lifecycleMap[queryCacheKey] = lifecycle;\r\n var selector = api.endpoints[endpointName].select(endpointDefinition.type === DefinitionType.query ? originalArgs : queryCacheKey);\r\n var extra = mwApi.dispatch(function (_, __, extra2) { return extra2; });\r\n var lifecycleApi = __spreadProps(__spreadValues({}, mwApi), {\r\n getCacheEntry: function () { return selector(mwApi.getState()); },\r\n requestId: requestId,\r\n extra: extra,\r\n updateCachedData: endpointDefinition.type === DefinitionType.query ? function (updateRecipe) { return mwApi.dispatch(api.util.updateQueryData(endpointName, originalArgs, updateRecipe)); } : void 0,\r\n cacheDataLoaded: cacheDataLoaded,\r\n cacheEntryRemoved: cacheEntryRemoved\r\n });\r\n var runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi);\r\n Promise.resolve(runningHandler).catch(function (e) {\r\n if (e === neverResolvedError)\r\n return;\r\n throw e;\r\n });\r\n }\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/queryLifecycle.ts\r\nimport { isPending as isPending2, isRejected as isRejected2, isFulfilled as isFulfilled5 } from \"@reduxjs/toolkit\";\r\nvar buildQueryLifecycleHandler = function (_j) {\r\n var api = _j.api, context = _j.context, queryThunk = _j.queryThunk, mutationThunk = _j.mutationThunk;\r\n var isPendingThunk = isPending2(queryThunk, mutationThunk);\r\n var isRejectedThunk = isRejected2(queryThunk, mutationThunk);\r\n var isFullfilledThunk = isFulfilled5(queryThunk, mutationThunk);\r\n var lifecycleMap = {};\r\n var handler = function (action, mwApi) {\r\n var _a, _b, _c;\r\n if (isPendingThunk(action)) {\r\n var _j = action.meta, requestId = _j.requestId, _k = _j.arg, endpointName_1 = _k.endpointName, originalArgs_1 = _k.originalArgs;\r\n var endpointDefinition = context.endpointDefinitions[endpointName_1];\r\n var onQueryStarted = endpointDefinition == null ? void 0 : endpointDefinition.onQueryStarted;\r\n if (onQueryStarted) {\r\n var lifecycle_1 = {};\r\n var queryFulfilled = new Promise(function (resolve, reject) {\r\n lifecycle_1.resolve = resolve;\r\n lifecycle_1.reject = reject;\r\n });\r\n queryFulfilled.catch(function () {\r\n });\r\n lifecycleMap[requestId] = lifecycle_1;\r\n var selector_1 = api.endpoints[endpointName_1].select(endpointDefinition.type === DefinitionType.query ? originalArgs_1 : requestId);\r\n var extra = mwApi.dispatch(function (_, __, extra2) { return extra2; });\r\n var lifecycleApi = __spreadProps(__spreadValues({}, mwApi), {\r\n getCacheEntry: function () { return selector_1(mwApi.getState()); },\r\n requestId: requestId,\r\n extra: extra,\r\n updateCachedData: endpointDefinition.type === DefinitionType.query ? function (updateRecipe) { return mwApi.dispatch(api.util.updateQueryData(endpointName_1, originalArgs_1, updateRecipe)); } : void 0,\r\n queryFulfilled: queryFulfilled\r\n });\r\n onQueryStarted(originalArgs_1, lifecycleApi);\r\n }\r\n }\r\n else if (isFullfilledThunk(action)) {\r\n var _l = action.meta, requestId = _l.requestId, baseQueryMeta = _l.baseQueryMeta;\r\n (_a = lifecycleMap[requestId]) == null ? void 0 : _a.resolve({\r\n data: action.payload,\r\n meta: baseQueryMeta\r\n });\r\n delete lifecycleMap[requestId];\r\n }\r\n else if (isRejectedThunk(action)) {\r\n var _m = action.meta, requestId = _m.requestId, rejectedWithValue = _m.rejectedWithValue, baseQueryMeta = _m.baseQueryMeta;\r\n (_c = lifecycleMap[requestId]) == null ? void 0 : _c.reject({\r\n error: (_b = action.payload) != null ? _b : action.error,\r\n isUnhandledError: !rejectedWithValue,\r\n meta: baseQueryMeta\r\n });\r\n delete lifecycleMap[requestId];\r\n }\r\n };\r\n return handler;\r\n};\r\n// src/query/core/buildMiddleware/devMiddleware.ts\r\nvar buildDevCheckHandler = function (_j) {\r\n var api = _j.api, apiUid = _j.context.apiUid, reducerPath = _j.reducerPath;\r\n return function (action, mwApi) {\r\n var _a, _b;\r\n if (api.util.resetApiState.match(action)) {\r\n mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));\r\n }\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n if (api.internalActions.middlewareRegistered.match(action) && action.payload === apiUid && ((_b = (_a = mwApi.getState()[reducerPath]) == null ? void 0 : _a.config) == null ? void 0 : _b.middlewareRegistered) === \"conflict\") {\r\n console.warn(\"There is a mismatch between slice and middleware for the reducerPath \\\"\" + reducerPath + \"\\\".\\nYou can only have one api per reducer path, this will lead to crashes in various situations!\" + (reducerPath === \"api\" ? \"\\nIf you have multiple apis, you *have* to specify the reducerPath option when using createApi!\" : \"\"));\r\n }\r\n }\r\n };\r\n};\r\n// src/query/core/buildMiddleware/batchActions.ts\r\nimport { produceWithPatches as produceWithPatches2 } from \"immer\";\r\nvar promise;\r\nvar queueMicrotaskShim = typeof queueMicrotask === \"function\" ? queueMicrotask.bind(typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () {\r\n throw err;\r\n}, 0); }); };\r\nvar buildBatchedActionsHandler = function (_j) {\r\n var api = _j.api, queryThunk = _j.queryThunk, internalState = _j.internalState;\r\n var subscriptionsPrefix = api.reducerPath + \"/subscriptions\";\r\n var previousSubscriptions = null;\r\n var dispatchQueued = false;\r\n var _k = api.internalActions, updateSubscriptionOptions = _k.updateSubscriptionOptions, unsubscribeQueryResult = _k.unsubscribeQueryResult;\r\n var actuallyMutateSubscriptions = function (mutableState, action) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _i;\r\n if (updateSubscriptionOptions.match(action)) {\r\n var _j = action.payload, queryCacheKey = _j.queryCacheKey, requestId = _j.requestId, options = _j.options;\r\n if ((_a = mutableState == null ? void 0 : mutableState[queryCacheKey]) == null ? void 0 : _a[requestId]) {\r\n mutableState[queryCacheKey][requestId] = options;\r\n }\r\n return true;\r\n }\r\n if (unsubscribeQueryResult.match(action)) {\r\n var _k = action.payload, queryCacheKey = _k.queryCacheKey, requestId = _k.requestId;\r\n if (mutableState[queryCacheKey]) {\r\n delete mutableState[queryCacheKey][requestId];\r\n }\r\n return true;\r\n }\r\n if (api.internalActions.removeQueryResult.match(action)) {\r\n delete mutableState[action.payload.queryCacheKey];\r\n return true;\r\n }\r\n if (queryThunk.pending.match(action)) {\r\n var _l = action.meta, arg = _l.arg, requestId = _l.requestId;\r\n if (arg.subscribe) {\r\n var substate = (_c = mutableState[_b = arg.queryCacheKey]) != null ? _c : mutableState[_b] = {};\r\n substate[requestId] = (_e = (_d = arg.subscriptionOptions) != null ? _d : substate[requestId]) != null ? _e : {};\r\n return true;\r\n }\r\n }\r\n if (queryThunk.rejected.match(action)) {\r\n var _m = action.meta, condition = _m.condition, arg = _m.arg, requestId = _m.requestId;\r\n if (condition && arg.subscribe) {\r\n var substate = (_g = mutableState[_f = arg.queryCacheKey]) != null ? _g : mutableState[_f] = {};\r\n substate[requestId] = (_i = (_h = arg.subscriptionOptions) != null ? _h : substate[requestId]) != null ? _i : {};\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return function (action, mwApi) {\r\n var _a, _b;\r\n if (!previousSubscriptions) {\r\n previousSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions));\r\n }\r\n if (api.util.resetApiState.match(action)) {\r\n previousSubscriptions = internalState.currentSubscriptions = {};\r\n return [true, false];\r\n }\r\n if (api.internalActions.internal_probeSubscription.match(action)) {\r\n var _j = action.payload, queryCacheKey = _j.queryCacheKey, requestId = _j.requestId;\r\n var hasSubscription = !!((_a = internalState.currentSubscriptions[queryCacheKey]) == null ? void 0 : _a[requestId]);\r\n return [false, hasSubscription];\r\n }\r\n var didMutate = actuallyMutateSubscriptions(internalState.currentSubscriptions, action);\r\n if (didMutate) {\r\n if (!dispatchQueued) {\r\n queueMicrotaskShim(function () {\r\n var newSubscriptions = JSON.parse(JSON.stringify(internalState.currentSubscriptions));\r\n var _j = produceWithPatches2(previousSubscriptions, function () { return newSubscriptions; }), patches = _j[1];\r\n mwApi.next(api.internalActions.subscriptionsUpdated(patches));\r\n previousSubscriptions = newSubscriptions;\r\n dispatchQueued = false;\r\n });\r\n dispatchQueued = true;\r\n }\r\n var isSubscriptionSliceAction = !!((_b = action.type) == null ? void 0 : _b.startsWith(subscriptionsPrefix));\r\n var isAdditionalSubscriptionAction = queryThunk.rejected.match(action) && action.meta.condition && !!action.meta.arg.subscribe;\r\n var actionShouldContinue = !isSubscriptionSliceAction && !isAdditionalSubscriptionAction;\r\n return [actionShouldContinue, false];\r\n }\r\n return [true, false];\r\n };\r\n};\r\n// src/query/core/buildMiddleware/index.ts\r\nfunction buildMiddleware(input) {\r\n var reducerPath = input.reducerPath, queryThunk = input.queryThunk, api = input.api, context = input.context;\r\n var apiUid = context.apiUid;\r\n var actions = {\r\n invalidateTags: createAction3(reducerPath + \"/invalidateTags\")\r\n };\r\n var isThisApiSliceAction = function (action) {\r\n return !!action && typeof action.type === \"string\" && action.type.startsWith(reducerPath + \"/\");\r\n };\r\n var handlerBuilders = [\r\n buildDevCheckHandler,\r\n buildCacheCollectionHandler,\r\n buildInvalidationByTagsHandler,\r\n buildPollingHandler,\r\n buildCacheLifecycleHandler,\r\n buildQueryLifecycleHandler\r\n ];\r\n var middleware = function (mwApi) {\r\n var initialized2 = false;\r\n var internalState = {\r\n currentSubscriptions: {}\r\n };\r\n var builderArgs = __spreadProps(__spreadValues({}, input), {\r\n internalState: internalState,\r\n refetchQuery: refetchQuery\r\n });\r\n var handlers = handlerBuilders.map(function (build) { return build(builderArgs); });\r\n var batchedActionsHandler = buildBatchedActionsHandler(builderArgs);\r\n var windowEventsHandler = buildWindowEventHandler(builderArgs);\r\n return function (next) {\r\n return function (action) {\r\n if (!initialized2) {\r\n initialized2 = true;\r\n mwApi.dispatch(api.internalActions.middlewareRegistered(apiUid));\r\n }\r\n var mwApiWithNext = __spreadProps(__spreadValues({}, mwApi), { next: next });\r\n var stateBefore = mwApi.getState();\r\n var _j = batchedActionsHandler(action, mwApiWithNext, stateBefore), actionShouldContinue = _j[0], hasSubscription = _j[1];\r\n var res;\r\n if (actionShouldContinue) {\r\n res = next(action);\r\n }\r\n else {\r\n res = hasSubscription;\r\n }\r\n if (!!mwApi.getState()[reducerPath]) {\r\n windowEventsHandler(action, mwApiWithNext, stateBefore);\r\n if (isThisApiSliceAction(action) || context.hasRehydrationInfo(action)) {\r\n for (var _k = 0, handlers_1 = handlers; _k < handlers_1.length; _k++) {\r\n var handler = handlers_1[_k];\r\n handler(action, mwApiWithNext, stateBefore);\r\n }\r\n }\r\n }\r\n return res;\r\n };\r\n };\r\n };\r\n return { middleware: middleware, actions: actions };\r\n function refetchQuery(querySubState, queryCacheKey, override) {\r\n if (override === void 0) { override = {}; }\r\n return queryThunk(__spreadValues({\r\n type: \"query\",\r\n endpointName: querySubState.endpointName,\r\n originalArgs: querySubState.originalArgs,\r\n subscribe: false,\r\n forceRefetch: true,\r\n queryCacheKey: queryCacheKey\r\n }, override));\r\n }\r\n}\r\n// src/query/tsHelpers.ts\r\nfunction assertCast(v) {\r\n}\r\nfunction safeAssign(target) {\r\n var args = [];\r\n for (var _j = 1; _j < arguments.length; _j++) {\r\n args[_j - 1] = arguments[_j];\r\n }\r\n Object.assign.apply(Object, __spreadArray([target], args));\r\n}\r\n// src/query/core/module.ts\r\nimport { enablePatches } from \"immer\";\r\nvar coreModuleName = /* @__PURE__ */ Symbol();\r\nvar coreModule = function () { return ({\r\n name: coreModuleName,\r\n init: function (api, _j, context) {\r\n var baseQuery = _j.baseQuery, tagTypes = _j.tagTypes, reducerPath = _j.reducerPath, serializeQueryArgs = _j.serializeQueryArgs, keepUnusedDataFor = _j.keepUnusedDataFor, refetchOnMountOrArgChange = _j.refetchOnMountOrArgChange, refetchOnFocus = _j.refetchOnFocus, refetchOnReconnect = _j.refetchOnReconnect;\r\n enablePatches();\r\n assertCast(serializeQueryArgs);\r\n var assertTagType = function (tag) {\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\r\n if (!tagTypes.includes(tag.type)) {\r\n console.error(\"Tag type '\" + tag.type + \"' was used, but not specified in `tagTypes`!\");\r\n }\r\n }\r\n return tag;\r\n };\r\n Object.assign(api, {\r\n reducerPath: reducerPath,\r\n endpoints: {},\r\n internalActions: {\r\n onOnline: onOnline,\r\n onOffline: onOffline,\r\n onFocus: onFocus,\r\n onFocusLost: onFocusLost\r\n },\r\n util: {}\r\n });\r\n var _k = buildThunks({\r\n baseQuery: baseQuery,\r\n reducerPath: reducerPath,\r\n context: context,\r\n api: api,\r\n serializeQueryArgs: serializeQueryArgs,\r\n assertTagType: assertTagType\r\n }), queryThunk = _k.queryThunk, mutationThunk = _k.mutationThunk, patchQueryData = _k.patchQueryData, updateQueryData = _k.updateQueryData, upsertQueryData = _k.upsertQueryData, prefetch = _k.prefetch, buildMatchThunkActions = _k.buildMatchThunkActions;\r\n var _l = buildSlice({\r\n context: context,\r\n queryThunk: queryThunk,\r\n mutationThunk: mutationThunk,\r\n reducerPath: reducerPath,\r\n assertTagType: assertTagType,\r\n config: {\r\n refetchOnFocus: refetchOnFocus,\r\n refetchOnReconnect: refetchOnReconnect,\r\n refetchOnMountOrArgChange: refetchOnMountOrArgChange,\r\n keepUnusedDataFor: keepUnusedDataFor,\r\n reducerPath: reducerPath\r\n }\r\n }), reducer = _l.reducer, sliceActions = _l.actions;\r\n safeAssign(api.util, {\r\n patchQueryData: patchQueryData,\r\n updateQueryData: updateQueryData,\r\n upsertQueryData: upsertQueryData,\r\n prefetch: prefetch,\r\n resetApiState: sliceActions.resetApiState\r\n });\r\n safeAssign(api.internalActions, sliceActions);\r\n var _m = buildMiddleware({\r\n reducerPath: reducerPath,\r\n context: context,\r\n queryThunk: queryThunk,\r\n mutationThunk: mutationThunk,\r\n api: api,\r\n assertTagType: assertTagType\r\n }), middleware = _m.middleware, middlewareActions = _m.actions;\r\n safeAssign(api.util, middlewareActions);\r\n safeAssign(api, { reducer: reducer, middleware: middleware });\r\n var _o = buildSelectors({\r\n serializeQueryArgs: serializeQueryArgs,\r\n reducerPath: reducerPath\r\n }), buildQuerySelector = _o.buildQuerySelector, buildMutationSelector = _o.buildMutationSelector, selectInvalidatedBy = _o.selectInvalidatedBy;\r\n safeAssign(api.util, { selectInvalidatedBy: selectInvalidatedBy });\r\n var _p = buildInitiate({\r\n queryThunk: queryThunk,\r\n mutationThunk: mutationThunk,\r\n api: api,\r\n serializeQueryArgs: serializeQueryArgs,\r\n context: context\r\n }), buildInitiateQuery = _p.buildInitiateQuery, buildInitiateMutation = _p.buildInitiateMutation, getRunningMutationThunk = _p.getRunningMutationThunk, getRunningMutationsThunk = _p.getRunningMutationsThunk, getRunningQueriesThunk = _p.getRunningQueriesThunk, getRunningQueryThunk = _p.getRunningQueryThunk, getRunningOperationPromises = _p.getRunningOperationPromises, removalWarning = _p.removalWarning;\r\n safeAssign(api.util, {\r\n getRunningOperationPromises: getRunningOperationPromises,\r\n getRunningOperationPromise: removalWarning,\r\n getRunningMutationThunk: getRunningMutationThunk,\r\n getRunningMutationsThunk: getRunningMutationsThunk,\r\n getRunningQueryThunk: getRunningQueryThunk,\r\n getRunningQueriesThunk: getRunningQueriesThunk\r\n });\r\n return {\r\n name: coreModuleName,\r\n injectEndpoint: function (endpointName, definition) {\r\n var _a, _b;\r\n var anyApi = api;\r\n (_b = (_a = anyApi.endpoints)[endpointName]) != null ? _b : _a[endpointName] = {};\r\n if (isQueryDefinition(definition)) {\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n name: endpointName,\r\n select: buildQuerySelector(endpointName, definition),\r\n initiate: buildInitiateQuery(endpointName, definition)\r\n }, buildMatchThunkActions(queryThunk, endpointName));\r\n }\r\n else if (isMutationDefinition(definition)) {\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n name: endpointName,\r\n select: buildMutationSelector(),\r\n initiate: buildInitiateMutation(endpointName)\r\n }, buildMatchThunkActions(mutationThunk, endpointName));\r\n }\r\n }\r\n };\r\n }\r\n}); };\r\n// src/query/core/index.ts\r\nvar createApi = /* @__PURE__ */ buildCreateApi(coreModule());\r\nexport { QueryStatus, buildCreateApi, copyWithStructuralSharing, coreModule, coreModuleName, createApi, defaultSerializeQueryArgs, fakeBaseQuery, fetchBaseQuery, retry, setupListeners, skipSelector, skipToken };\r\n//# sourceMappingURL=rtk-query.esm.js.map","var __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a, b) {\r\n for (var prop in b || (b = {}))\r\n if (__hasOwnProp.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {\r\n var prop = _c[_i];\r\n if (__propIsEnum.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n }\r\n return a;\r\n};\r\nvar __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };\r\n// src/query/react/index.ts\r\nimport { coreModule, buildCreateApi } from \"@reduxjs/toolkit/query\";\r\n// src/query/react/buildHooks.ts\r\nimport { createSelector } from \"@reduxjs/toolkit\";\r\nimport { useCallback, useDebugValue, useEffect as useEffect3, useLayoutEffect, useMemo as useMemo2, useRef as useRef3, useState } from \"react\";\r\nimport { QueryStatus, skipToken } from \"@reduxjs/toolkit/query\";\r\nimport { shallowEqual as shallowEqual2 } from \"react-redux\";\r\n// src/query/react/useSerializedStableValue.ts\r\nimport { useEffect, useRef, useMemo } from \"react\";\r\nfunction useStableQueryArgs(queryArgs, serialize, endpointDefinition, endpointName) {\r\n var incoming = useMemo(function () { return ({\r\n queryArgs: queryArgs,\r\n serialized: typeof queryArgs == \"object\" ? serialize({ queryArgs: queryArgs, endpointDefinition: endpointDefinition, endpointName: endpointName }) : queryArgs\r\n }); }, [queryArgs, serialize, endpointDefinition, endpointName]);\r\n var cache2 = useRef(incoming);\r\n useEffect(function () {\r\n if (cache2.current.serialized !== incoming.serialized) {\r\n cache2.current = incoming;\r\n }\r\n }, [incoming]);\r\n return cache2.current.serialized === incoming.serialized ? cache2.current.queryArgs : queryArgs;\r\n}\r\n// src/query/react/constants.ts\r\nvar UNINITIALIZED_VALUE = Symbol();\r\n// src/query/react/useShallowStableValue.ts\r\nimport { useEffect as useEffect2, useRef as useRef2 } from \"react\";\r\nimport { shallowEqual } from \"react-redux\";\r\nfunction useShallowStableValue(value) {\r\n var cache2 = useRef2(value);\r\n useEffect2(function () {\r\n if (!shallowEqual(cache2.current, value)) {\r\n cache2.current = value;\r\n }\r\n }, [value]);\r\n return shallowEqual(cache2.current, value) ? cache2.current : value;\r\n}\r\n// src/query/defaultSerializeQueryArgs.ts\r\nimport { isPlainObject } from \"@reduxjs/toolkit\";\r\nvar cache = WeakMap ? new WeakMap() : void 0;\r\nvar defaultSerializeQueryArgs = function (_c) {\r\n var endpointName = _c.endpointName, queryArgs = _c.queryArgs;\r\n var serialized = \"\";\r\n var cached = cache == null ? void 0 : cache.get(queryArgs);\r\n if (typeof cached === \"string\") {\r\n serialized = cached;\r\n }\r\n else {\r\n var stringified = JSON.stringify(queryArgs, function (key, value) { return isPlainObject(value) ? Object.keys(value).sort().reduce(function (acc, key2) {\r\n acc[key2] = value[key2];\r\n return acc;\r\n }, {}) : value; });\r\n if (isPlainObject(queryArgs)) {\r\n cache == null ? void 0 : cache.set(queryArgs, stringified);\r\n }\r\n serialized = stringified;\r\n }\r\n return endpointName + \"(\" + serialized + \")\";\r\n};\r\n// src/query/react/buildHooks.ts\r\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" && !!window.document && !!window.document.createElement ? useLayoutEffect : useEffect3;\r\nvar defaultMutationStateSelector = function (x) { return x; };\r\nvar noPendingQueryStateSelector = function (selected) {\r\n if (selected.isUninitialized) {\r\n return __spreadProps(__spreadValues({}, selected), {\r\n isUninitialized: false,\r\n isFetching: true,\r\n isLoading: selected.data !== void 0 ? false : true,\r\n status: QueryStatus.pending\r\n });\r\n }\r\n return selected;\r\n};\r\nfunction buildHooks(_c) {\r\n var api = _c.api, _d = _c.moduleOptions, batch = _d.batch, useDispatch = _d.useDispatch, useSelector = _d.useSelector, useStore = _d.useStore, unstable__sideEffectsInRender = _d.unstable__sideEffectsInRender, serializeQueryArgs = _c.serializeQueryArgs, context = _c.context;\r\n var usePossiblyImmediateEffect = unstable__sideEffectsInRender ? function (cb) { return cb(); } : useEffect3;\r\n return { buildQueryHooks: buildQueryHooks, buildMutationHook: buildMutationHook, usePrefetch: usePrefetch };\r\n function queryStatePreSelector(currentState, lastResult, queryArgs) {\r\n if ((lastResult == null ? void 0 : lastResult.endpointName) && currentState.isUninitialized) {\r\n var endpointName = lastResult.endpointName;\r\n var endpointDefinition = context.endpointDefinitions[endpointName];\r\n if (serializeQueryArgs({\r\n queryArgs: lastResult.originalArgs,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n }) === serializeQueryArgs({\r\n queryArgs: queryArgs,\r\n endpointDefinition: endpointDefinition,\r\n endpointName: endpointName\r\n }))\r\n lastResult = void 0;\r\n }\r\n var data = currentState.isSuccess ? currentState.data : lastResult == null ? void 0 : lastResult.data;\r\n if (data === void 0)\r\n data = currentState.data;\r\n var hasData = data !== void 0;\r\n var isFetching = currentState.isLoading;\r\n var isLoading = !hasData && isFetching;\r\n var isSuccess = currentState.isSuccess || isFetching && hasData;\r\n return __spreadProps(__spreadValues({}, currentState), {\r\n data: data,\r\n currentData: currentState.data,\r\n isFetching: isFetching,\r\n isLoading: isLoading,\r\n isSuccess: isSuccess\r\n });\r\n }\r\n function usePrefetch(endpointName, defaultOptions) {\r\n var dispatch = useDispatch();\r\n var stableDefaultOptions = useShallowStableValue(defaultOptions);\r\n return useCallback(function (arg, options) { return dispatch(api.util.prefetch(endpointName, arg, __spreadValues(__spreadValues({}, stableDefaultOptions), options))); }, [endpointName, dispatch, stableDefaultOptions]);\r\n }\r\n function buildQueryHooks(name) {\r\n var useQuerySubscription = function (arg, _c) {\r\n var _d = _c === void 0 ? {} : _c, refetchOnReconnect = _d.refetchOnReconnect, refetchOnFocus = _d.refetchOnFocus, refetchOnMountOrArgChange = _d.refetchOnMountOrArgChange, _e = _d.skip, skip = _e === void 0 ? false : _e, _f = _d.pollingInterval, pollingInterval = _f === void 0 ? 0 : _f;\r\n var initiate = api.endpoints[name].initiate;\r\n var dispatch = useDispatch();\r\n var stableArg = useStableQueryArgs(skip ? skipToken : arg, defaultSerializeQueryArgs, context.endpointDefinitions[name], name);\r\n var stableSubscriptionOptions = useShallowStableValue({\r\n refetchOnReconnect: refetchOnReconnect,\r\n refetchOnFocus: refetchOnFocus,\r\n pollingInterval: pollingInterval\r\n });\r\n var lastRenderHadSubscription = useRef3(false);\r\n var promiseRef = useRef3();\r\n var _g = promiseRef.current || {}, queryCacheKey = _g.queryCacheKey, requestId = _g.requestId;\r\n var currentRenderHasSubscription = false;\r\n if (queryCacheKey && requestId) {\r\n var returnedValue = dispatch(api.internalActions.internal_probeSubscription({\r\n queryCacheKey: queryCacheKey,\r\n requestId: requestId\r\n }));\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (typeof returnedValue !== \"boolean\") {\r\n throw new Error(\"Warning: Middleware for RTK-Query API at reducerPath \\\"\" + api.reducerPath + \"\\\" has not been added to the store.\\n You must add the middleware for RTK-Query to function correctly!\");\r\n }\r\n }\r\n currentRenderHasSubscription = !!returnedValue;\r\n }\r\n var subscriptionRemoved = !currentRenderHasSubscription && lastRenderHadSubscription.current;\r\n usePossiblyImmediateEffect(function () {\r\n lastRenderHadSubscription.current = currentRenderHasSubscription;\r\n });\r\n usePossiblyImmediateEffect(function () {\r\n if (subscriptionRemoved) {\r\n promiseRef.current = void 0;\r\n }\r\n }, [subscriptionRemoved]);\r\n usePossiblyImmediateEffect(function () {\r\n var _a;\r\n var lastPromise = promiseRef.current;\r\n if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"removeMeOnCompilation\") {\r\n console.log(subscriptionRemoved);\r\n }\r\n if (stableArg === skipToken) {\r\n lastPromise == null ? void 0 : lastPromise.unsubscribe();\r\n promiseRef.current = void 0;\r\n return;\r\n }\r\n var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;\r\n if (!lastPromise || lastPromise.arg !== stableArg) {\r\n lastPromise == null ? void 0 : lastPromise.unsubscribe();\r\n var promise = dispatch(initiate(stableArg, {\r\n subscriptionOptions: stableSubscriptionOptions,\r\n forceRefetch: refetchOnMountOrArgChange\r\n }));\r\n promiseRef.current = promise;\r\n }\r\n else if (stableSubscriptionOptions !== lastSubscriptionOptions) {\r\n lastPromise.updateSubscriptionOptions(stableSubscriptionOptions);\r\n }\r\n }, [\r\n dispatch,\r\n initiate,\r\n refetchOnMountOrArgChange,\r\n stableArg,\r\n stableSubscriptionOptions,\r\n subscriptionRemoved\r\n ]);\r\n useEffect3(function () {\r\n return function () {\r\n var _a;\r\n (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe();\r\n promiseRef.current = void 0;\r\n };\r\n }, []);\r\n return useMemo2(function () { return ({\r\n refetch: function () {\r\n var _a;\r\n if (!promiseRef.current)\r\n throw new Error(\"Cannot refetch a query that has not been started yet.\");\r\n return (_a = promiseRef.current) == null ? void 0 : _a.refetch();\r\n }\r\n }); }, []);\r\n };\r\n var useLazyQuerySubscription = function (_c) {\r\n var _d = _c === void 0 ? {} : _c, refetchOnReconnect = _d.refetchOnReconnect, refetchOnFocus = _d.refetchOnFocus, _e = _d.pollingInterval, pollingInterval = _e === void 0 ? 0 : _e;\r\n var initiate = api.endpoints[name].initiate;\r\n var dispatch = useDispatch();\r\n var _f = useState(UNINITIALIZED_VALUE), arg = _f[0], setArg = _f[1];\r\n var promiseRef = useRef3();\r\n var stableSubscriptionOptions = useShallowStableValue({\r\n refetchOnReconnect: refetchOnReconnect,\r\n refetchOnFocus: refetchOnFocus,\r\n pollingInterval: pollingInterval\r\n });\r\n usePossiblyImmediateEffect(function () {\r\n var _a, _b;\r\n var lastSubscriptionOptions = (_a = promiseRef.current) == null ? void 0 : _a.subscriptionOptions;\r\n if (stableSubscriptionOptions !== lastSubscriptionOptions) {\r\n (_b = promiseRef.current) == null ? void 0 : _b.updateSubscriptionOptions(stableSubscriptionOptions);\r\n }\r\n }, [stableSubscriptionOptions]);\r\n var subscriptionOptionsRef = useRef3(stableSubscriptionOptions);\r\n usePossiblyImmediateEffect(function () {\r\n subscriptionOptionsRef.current = stableSubscriptionOptions;\r\n }, [stableSubscriptionOptions]);\r\n var trigger = useCallback(function (arg2, preferCacheValue) {\r\n if (preferCacheValue === void 0) { preferCacheValue = false; }\r\n var promise;\r\n batch(function () {\r\n var _a;\r\n (_a = promiseRef.current) == null ? void 0 : _a.unsubscribe();\r\n promiseRef.current = promise = dispatch(initiate(arg2, {\r\n subscriptionOptions: subscriptionOptionsRef.current,\r\n forceRefetch: !preferCacheValue\r\n }));\r\n setArg(arg2);\r\n });\r\n return promise;\r\n }, [dispatch, initiate]);\r\n useEffect3(function () {\r\n return function () {\r\n var _a;\r\n (_a = promiseRef == null ? void 0 : promiseRef.current) == null ? void 0 : _a.unsubscribe();\r\n };\r\n }, []);\r\n useEffect3(function () {\r\n if (arg !== UNINITIALIZED_VALUE && !promiseRef.current) {\r\n trigger(arg, true);\r\n }\r\n }, [arg, trigger]);\r\n return useMemo2(function () { return [trigger, arg]; }, [trigger, arg]);\r\n };\r\n var useQueryState = function (arg, _c) {\r\n var _d = _c === void 0 ? {} : _c, _e = _d.skip, skip = _e === void 0 ? false : _e, selectFromResult = _d.selectFromResult;\r\n var select = api.endpoints[name].select;\r\n var stableArg = useStableQueryArgs(skip ? skipToken : arg, serializeQueryArgs, context.endpointDefinitions[name], name);\r\n var lastValue = useRef3();\r\n var selectDefaultResult = useMemo2(function () { return createSelector([\r\n select(stableArg),\r\n function (_, lastResult) { return lastResult; },\r\n function (_) { return stableArg; }\r\n ], queryStatePreSelector); }, [select, stableArg]);\r\n var querySelector = useMemo2(function () { return selectFromResult ? createSelector([selectDefaultResult], selectFromResult) : selectDefaultResult; }, [selectDefaultResult, selectFromResult]);\r\n var currentState = useSelector(function (state) { return querySelector(state, lastValue.current); }, shallowEqual2);\r\n var store = useStore();\r\n var newLastValue = selectDefaultResult(store.getState(), lastValue.current);\r\n useIsomorphicLayoutEffect(function () {\r\n lastValue.current = newLastValue;\r\n }, [newLastValue]);\r\n return currentState;\r\n };\r\n return {\r\n useQueryState: useQueryState,\r\n useQuerySubscription: useQuerySubscription,\r\n useLazyQuerySubscription: useLazyQuerySubscription,\r\n useLazyQuery: function (options) {\r\n var _c = useLazyQuerySubscription(options), trigger = _c[0], arg = _c[1];\r\n var queryStateResults = useQueryState(arg, __spreadProps(__spreadValues({}, options), {\r\n skip: arg === UNINITIALIZED_VALUE\r\n }));\r\n var info = useMemo2(function () { return ({ lastArg: arg }); }, [arg]);\r\n return useMemo2(function () { return [trigger, queryStateResults, info]; }, [trigger, queryStateResults, info]);\r\n },\r\n useQuery: function (arg, options) {\r\n var querySubscriptionResults = useQuerySubscription(arg, options);\r\n var queryStateResults = useQueryState(arg, __spreadValues({\r\n selectFromResult: arg === skipToken || (options == null ? void 0 : options.skip) ? void 0 : noPendingQueryStateSelector\r\n }, options));\r\n var data = queryStateResults.data, status = queryStateResults.status, isLoading = queryStateResults.isLoading, isSuccess = queryStateResults.isSuccess, isError = queryStateResults.isError, error = queryStateResults.error;\r\n useDebugValue({ data: data, status: status, isLoading: isLoading, isSuccess: isSuccess, isError: isError, error: error });\r\n return useMemo2(function () { return __spreadValues(__spreadValues({}, queryStateResults), querySubscriptionResults); }, [queryStateResults, querySubscriptionResults]);\r\n }\r\n };\r\n }\r\n function buildMutationHook(name) {\r\n return function (_c) {\r\n var _d = _c === void 0 ? {} : _c, _e = _d.selectFromResult, selectFromResult = _e === void 0 ? defaultMutationStateSelector : _e, fixedCacheKey = _d.fixedCacheKey;\r\n var _f = api.endpoints[name], select = _f.select, initiate = _f.initiate;\r\n var dispatch = useDispatch();\r\n var _g = useState(), promise = _g[0], setPromise = _g[1];\r\n useEffect3(function () { return function () {\r\n if (!(promise == null ? void 0 : promise.arg.fixedCacheKey)) {\r\n promise == null ? void 0 : promise.reset();\r\n }\r\n }; }, [promise]);\r\n var triggerMutation = useCallback(function (arg) {\r\n var promise2 = dispatch(initiate(arg, { fixedCacheKey: fixedCacheKey }));\r\n setPromise(promise2);\r\n return promise2;\r\n }, [dispatch, initiate, fixedCacheKey]);\r\n var requestId = (promise || {}).requestId;\r\n var mutationSelector = useMemo2(function () { return createSelector([select({ fixedCacheKey: fixedCacheKey, requestId: promise == null ? void 0 : promise.requestId })], selectFromResult); }, [select, promise, selectFromResult, fixedCacheKey]);\r\n var currentState = useSelector(mutationSelector, shallowEqual2);\r\n var originalArgs = fixedCacheKey == null ? promise == null ? void 0 : promise.arg.originalArgs : void 0;\r\n var reset = useCallback(function () {\r\n batch(function () {\r\n if (promise) {\r\n setPromise(void 0);\r\n }\r\n if (fixedCacheKey) {\r\n dispatch(api.internalActions.removeMutationResult({\r\n requestId: requestId,\r\n fixedCacheKey: fixedCacheKey\r\n }));\r\n }\r\n });\r\n }, [dispatch, fixedCacheKey, promise, requestId]);\r\n var endpointName = currentState.endpointName, data = currentState.data, status = currentState.status, isLoading = currentState.isLoading, isSuccess = currentState.isSuccess, isError = currentState.isError, error = currentState.error;\r\n useDebugValue({\r\n endpointName: endpointName,\r\n data: data,\r\n status: status,\r\n isLoading: isLoading,\r\n isSuccess: isSuccess,\r\n isError: isError,\r\n error: error\r\n });\r\n var finalState = useMemo2(function () { return __spreadProps(__spreadValues({}, currentState), { originalArgs: originalArgs, reset: reset }); }, [currentState, originalArgs, reset]);\r\n return useMemo2(function () { return [triggerMutation, finalState]; }, [triggerMutation, finalState]);\r\n };\r\n }\r\n}\r\n// src/query/endpointDefinitions.ts\r\nvar DefinitionType;\r\n(function (DefinitionType2) {\r\n DefinitionType2[\"query\"] = \"query\";\r\n DefinitionType2[\"mutation\"] = \"mutation\";\r\n})(DefinitionType || (DefinitionType = {}));\r\nfunction isQueryDefinition(e) {\r\n return e.type === DefinitionType.query;\r\n}\r\nfunction isMutationDefinition(e) {\r\n return e.type === DefinitionType.mutation;\r\n}\r\n// src/query/utils/capitalize.ts\r\nfunction capitalize(str) {\r\n return str.replace(str[0], str[0].toUpperCase());\r\n}\r\n// src/query/tsHelpers.ts\r\nfunction safeAssign(target) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n Object.assign.apply(Object, __spreadArray([target], args));\r\n}\r\n// src/query/react/module.ts\r\nimport { useDispatch as rrUseDispatch, useSelector as rrUseSelector, useStore as rrUseStore, batch as rrBatch } from \"react-redux\";\r\nvar reactHooksModuleName = /* @__PURE__ */ Symbol();\r\nvar reactHooksModule = function (_c) {\r\n var _d = _c === void 0 ? {} : _c, _e = _d.batch, batch = _e === void 0 ? rrBatch : _e, _f = _d.useDispatch, useDispatch = _f === void 0 ? rrUseDispatch : _f, _g = _d.useSelector, useSelector = _g === void 0 ? rrUseSelector : _g, _h = _d.useStore, useStore = _h === void 0 ? rrUseStore : _h, _j = _d.unstable__sideEffectsInRender, unstable__sideEffectsInRender = _j === void 0 ? false : _j;\r\n return ({\r\n name: reactHooksModuleName,\r\n init: function (api, _c, context) {\r\n var serializeQueryArgs = _c.serializeQueryArgs;\r\n var anyApi = api;\r\n var _d = buildHooks({\r\n api: api,\r\n moduleOptions: {\r\n batch: batch,\r\n useDispatch: useDispatch,\r\n useSelector: useSelector,\r\n useStore: useStore,\r\n unstable__sideEffectsInRender: unstable__sideEffectsInRender\r\n },\r\n serializeQueryArgs: serializeQueryArgs,\r\n context: context\r\n }), buildQueryHooks = _d.buildQueryHooks, buildMutationHook = _d.buildMutationHook, usePrefetch = _d.usePrefetch;\r\n safeAssign(anyApi, { usePrefetch: usePrefetch });\r\n safeAssign(context, { batch: batch });\r\n return {\r\n injectEndpoint: function (endpointName, definition) {\r\n if (isQueryDefinition(definition)) {\r\n var _c = buildQueryHooks(endpointName), useQuery = _c.useQuery, useLazyQuery = _c.useLazyQuery, useLazyQuerySubscription = _c.useLazyQuerySubscription, useQueryState = _c.useQueryState, useQuerySubscription = _c.useQuerySubscription;\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n useQuery: useQuery,\r\n useLazyQuery: useLazyQuery,\r\n useLazyQuerySubscription: useLazyQuerySubscription,\r\n useQueryState: useQueryState,\r\n useQuerySubscription: useQuerySubscription\r\n });\r\n api[\"use\" + capitalize(endpointName) + \"Query\"] = useQuery;\r\n api[\"useLazy\" + capitalize(endpointName) + \"Query\"] = useLazyQuery;\r\n }\r\n else if (isMutationDefinition(definition)) {\r\n var useMutation = buildMutationHook(endpointName);\r\n safeAssign(anyApi.endpoints[endpointName], {\r\n useMutation: useMutation\r\n });\r\n api[\"use\" + capitalize(endpointName) + \"Mutation\"] = useMutation;\r\n }\r\n }\r\n };\r\n }\r\n });\r\n};\r\n// src/query/react/index.ts\r\nexport * from \"@reduxjs/toolkit/query\";\r\n// src/query/react/ApiProvider.tsx\r\nimport { configureStore } from \"@reduxjs/toolkit\";\r\nimport { useEffect as useEffect4 } from \"react\";\r\nimport React from \"react\";\r\nimport { Provider } from \"react-redux\";\r\nimport { setupListeners } from \"@reduxjs/toolkit/query\";\r\nfunction ApiProvider(props) {\r\n var store = React.useState(function () {\r\n var _c;\r\n return configureStore({\r\n reducer: (_c = {},\r\n _c[props.api.reducerPath] = props.api.reducer,\r\n _c),\r\n middleware: function (gDM) { return gDM().concat(props.api.middleware); }\r\n });\r\n })[0];\r\n useEffect4(function () { return props.setupListeners === false ? void 0 : setupListeners(store.dispatch, props.setupListeners); }, [props.setupListeners, store.dispatch]);\r\n return /* @__PURE__ */ React.createElement(Provider, {\r\n store: store,\r\n context: props.context\r\n }, props.children);\r\n}\r\n// src/query/react/index.ts\r\nvar createApi = /* @__PURE__ */ buildCreateApi(coreModule(), reactHooksModule());\r\nexport { ApiProvider, createApi, reactHooksModule, reactHooksModuleName };\r\n//# sourceMappingURL=rtk-query-react.esm.js.map"],"names":["__extends","extendStatics","d","b","p","__","__generator","thisArg","body","_","t","f","y","g","verb","n","v","step","op","e","__spreadArray","to","from","i","il","j","__defProp","__defProps","__getOwnPropDescs","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","prop","_i","_c","__spreadProps","__async","__this","__arguments","generator","resolve","reject","fulfilled","rejected","x","composeWithDevTools","compose","isPlainObject","proto","baseProto","hasMatchFunction","createAction","type","prepareAction","actionCreator","args","prepared","action","MiddlewareArray","_super","_this","arr","EnhancerArray","freezeDraftable","val","isDraftable","createNextState","isBoolean","curryGetDefaultMiddleware","options","getDefaultMiddleware","thunk","middlewareArray","thunkMiddleware","configureStore","curriedGetDefaultMiddleware","_d","reducer","_e","middleware","_f","devTools","_g","preloadedState","_h","enhancers","rootReducer","combineReducers","finalMiddleware","middlewareEnhancer","applyMiddleware","finalCompose","compose2","defaultEnhancers","storeEnhancers","composedEnhancer","createStore","executeReducerBuilderCallback","builderCallback","actionsMap","actionMatchers","defaultCaseReducer","builder","typeOrActionCreator","matcher","isStateFunction","createReducer","initialState","mapOrBuilderCallback","finalActionMatchers","finalDefaultCaseReducer","getInitialState","frozenInitialState_1","state","caseReducers","reducer2","cr","previousState","caseReducer","isDraft2","draft","result","isDraftable2","createNextState2","getType2","slice","actionKey","createSlice","name","reducers","reducerNames","sliceCaseReducersByName","sliceCaseReducersByType","actionCreators","reducerName","maybeReducerWithPrepare","prepareCallback","buildReducer","extraReducers","finalCaseReducers","actionMatchers_1","m","_reducer","urlAlphabet","nanoid","size","id","commonProperties","RejectWithValue","payload","meta","FulfillWithMeta","miniSerializeError","simpleError","commonProperties_1","property","createAsyncThunk","createAsyncThunk2","typePrefix","payloadCreator","requestId","arg","pending","error","AC","class_1","dispatch","getState","extra","abortController","abortReason","abort","reason","promise2","_a","_b","finalAction","conditionResult","abortedPromise","err_1","skipDispatch","isThenable","unwrapResult","matches","isAnyOf","matchers","isAllOf","hasExpectedRequestMetadata","validStatus","hasValidRequestId","hasValidRequestStatus","isAsyncThunkArray","isPending","asyncThunks","asyncThunk","combinedMatcher","isRejected","isRejectedWithValue","hasFlag","isFulfilled","isAsyncThunkAction","asyncThunks_1","alm","SHOULD_AUTOBATCH","prepareAutoBatched","promise","enableES5","_j","_k","__objRest","source","exclude","target","QueryStatus","QueryStatus2","getRequestStatusFlags","status","isAbsoluteUrl","url","withoutTrailingSlash","withoutLeadingSlash","joinUrls","base","delimiter","flatten","isOnline","isDocumentVisible","_iPO","copyWithStructuralSharing","oldObj","newObj","newKeys","oldKeys","isSameObject","mergeObj","newKeys_1","defaultFetchFn","defaultValidateStatus","response","defaultIsJsonContentType","headers","stripUndefined","isPlainObject2","copy","_l","k","fetchBaseQuery","baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","_m","jsonContentType","jsonReplacer","defaultTimeout","globalResponseHandler","globalValidateStatus","baseFetchOptions","api","signal","endpoint","forced","_a2","params","responseHandler","validateStatus","_o","timeout","rest","config","_p","isJsonifiable","divider","query","request","requestClone","timedOut","timeoutId","e_1","responseClone","resultData","responseText","handleResponseError_1","e_2","_q","handleResponse","r","text","HandledError","onFocus","onFocusLost","onOnline","onOffline","DefinitionType","DefinitionType2","isQueryDefinition","isMutationDefinition","calculateProvidedBy","description","queryArg","assertTagTypes","isFunction","expandTagDescription","isNotNullish","forceQueryFnSymbol","isUpsertQuery","buildInitiate","serializeQueryArgs","queryThunk","mutationThunk","context","runningQueries","runningMutations","unsubscribeQueryResult","removeMutationResult","updateSubscriptionOptions","buildInitiateQuery","buildInitiateMutation","getRunningQueryThunk","getRunningMutationThunk","getRunningQueriesThunk","getRunningMutationsThunk","getRunningOperationPromises","removalWarning","extract","queriesForStore","endpointName","queryArgs","endpointDefinition","queryCacheKey","_endpointName","fixedCacheKeyOrRequestId","queryAction","subscribe","forceRefetch","subscriptionOptions","forceQueryFn","selector","thunkResult","stateAfter","skippedSynchronously","runningQuery","selectFromState","statePromise","running_1","track","fixedCacheKey","unwrap","returnValuePromise","data","reset","ret","running","defaultTransformResponse","baseQueryReturnValue","buildThunks","reducerPath","baseQuery","endpointDefinitions","assertTagType","patchQueryData","patches","updateProvided","newValue","providedTags","updateQueryData","updateRecipe","currentState","produceWithPatches","inversePatches","upsertQueryData","executeEndpoint","_0","_1","transformResponse","baseQueryApi_1","error_1","catchedError","transformErrorResponse","e_4","rejectWithValue","fulfillWithValue","_r","isForcedQuery","arg2","requestState","baseFetchOnMountOrArgChange","fulfilledVal","refetchVal","queryThunkArgs","currentArg","previousArg","hasTheForce","hasMaxAge","prefetch","force","maxAge","force2","latestStateValue","lastFulfilledTs","shouldRetrigger","matchesEndpoint","buildMatchThunkActions","calculateProvidedByThunk","updateQuerySubstateIfExists","update","substate","getMutationCacheKey","updateMutationSubstateIfExists","buildSlice","definitions","apiUid","extractRehydrationInfo","hasRehydrationInfo","resetApiState","createAction2","querySlice","applyPatches","upserting","merge","fulfilledTimeStamp_1","arg_1","baseQueryMeta_1","requestId_1","newData","draftSubstateData","isDraft","original","condition","queries","entry","mutationSlice","cacheKey","startedTimeStamp","mutations","invalidationSlice","tagTypeSubscriptions","idSubscriptions","foundAt","providedTags_1","subscribedQueries","alreadySubscribed","provided","incomingTags","cacheKeys","cacheKeys_1","isFulfilled2","isRejectedWithValue2","subscriptionSlice","internalSubscriptionsSlice","configSlice","combinedReducer","actions","skipToken","initialSubState","defaultQuerySubState","defaultMutationSubState","buildSelectors","selectSkippedQuery","selectSkippedMutation","buildQuerySelector","buildMutationSelector","selectInvalidatedBy","withRequestFlags","selectInternalState","rootState","serializedArgs","selectQuerySubstate","finalSelectQuerySubState","createSelector","mutationId","selectMutationSubstate","finalSelectMutationSubstate","tags","apiState","toInvalidate","tag","invalidateSubscriptions","invalidateSubscriptions_1","invalidate","querySubState","cache","defaultSerializeQueryArgs","serialized","cached","stringified","isPlainObject3","acc","key2","buildCreateApi","modules","defaultMemoize","optionsWithDefaults","queryArgsApi","finalSerializeQueryArgs","endpointSQA_1","queryArgsApi2","initialResult","fn","injectEndpoints","addTagTypes","endpoints","addTagTypes_1","eT","partialDefinition","initializedModules","inject","evaluatedEndpoints","definition","initializedModules_1","isObjectEmpty","THIRTY_TWO_BIT_MAX_TIMER_SECONDS","buildCacheCollectionHandler","internalState","removeQueryResult","anySubscriptionsRemainingForKey","subscriptions","currentRemovalTimeouts","handler","mwApi","internalState2","handleUnsubscribe","queryState","api2","keepUnusedDataFor","finalKeepUnusedDataFor","currentTimeout","buildInvalidationByTagsHandler","refetchQuery","isThunkActionWithTags","isAnyOf2","isFulfilled3","isRejectedWithValue3","invalidateTags","valuesArray","valuesArray_1","subscriptionSubState","buildPollingHandler","currentPolls","updatePollingInterval","startNextPoll","clearPolls","lowestPollingInterval","findLowestPollingInterval","currentPoll","nextPollTimestamp","currentInterval","cleanupPollForKey","existingPoll","subscribers","buildWindowEventHandler","refetchValidQueries","shouldRefetch","sub","neverResolvedError","buildCacheLifecycleHandler","isQueryThunk","isMutationThunk","isFulfilledThunk","isFulfilled4","lifecycleMap","stateBefore","getCacheKey","oldState","handleNewKey","lifecycle","cacheKey2","originalArgs","onCacheEntryAdded","cacheEntryRemoved","cacheDataLoaded","extra2","lifecycleApi","runningHandler","buildQueryLifecycleHandler","isPendingThunk","isPending2","isRejectedThunk","isRejected2","isFullfilledThunk","isFulfilled5","endpointName_1","originalArgs_1","onQueryStarted","lifecycle_1","queryFulfilled","selector_1","baseQueryMeta","rejectedWithValue","buildDevCheckHandler","queueMicrotaskShim","cb","err","buildBatchedActionsHandler","subscriptionsPrefix","previousSubscriptions","dispatchQueued","actuallyMutateSubscriptions","mutableState","hasSubscription","didMutate","newSubscriptions","produceWithPatches2","isSubscriptionSliceAction","isAdditionalSubscriptionAction","actionShouldContinue","buildMiddleware","input","createAction3","isThisApiSliceAction","handlerBuilders","initialized2","builderArgs","handlers","build","batchedActionsHandler","windowEventsHandler","next","mwApiWithNext","res","handlers_1","override","safeAssign","coreModuleName","coreModule","refetchOnMountOrArgChange","refetchOnFocus","refetchOnReconnect","enablePatches","sliceActions","middlewareActions","anyApi","useStableQueryArgs","serialize","incoming","useMemo","cache2","useRef","useEffect","UNINITIALIZED_VALUE","useShallowStableValue","useRef2","useEffect2","shallowEqual","useIsomorphicLayoutEffect","useLayoutEffect","useEffect3","defaultMutationStateSelector","noPendingQueryStateSelector","selected","buildHooks","batch","useDispatch","useSelector","useStore","unstable__sideEffectsInRender","usePossiblyImmediateEffect","buildQueryHooks","buildMutationHook","usePrefetch","queryStatePreSelector","lastResult","hasData","isFetching","isLoading","isSuccess","defaultOptions","stableDefaultOptions","useCallback","useQuerySubscription","skip","pollingInterval","initiate","stableArg","stableSubscriptionOptions","lastRenderHadSubscription","useRef3","promiseRef","currentRenderHasSubscription","returnedValue","subscriptionRemoved","lastPromise","lastSubscriptionOptions","useMemo2","useLazyQuerySubscription","useState","setArg","subscriptionOptionsRef","trigger","preferCacheValue","useQueryState","selectFromResult","select","lastValue","selectDefaultResult","querySelector","shallowEqual2","store","newLastValue","queryStateResults","info","querySubscriptionResults","isError","useDebugValue","setPromise","triggerMutation","mutationSelector","finalState","capitalize","str","reactHooksModuleName","reactHooksModule","r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