codeforlife 2.11.4 → 2.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/Countdown-CL7dyZrl.cjs +2 -0
  2. package/dist/{Countdown-BtUbr1J_.cjs.map → Countdown-CL7dyZrl.cjs.map} +1 -1
  3. package/dist/Countdown-snRYiLrs.js +28 -0
  4. package/dist/{Countdown-DhjAmB0u.js.map → Countdown-snRYiLrs.js.map} +1 -1
  5. package/dist/Image-B_6DmnVe.cjs +2 -0
  6. package/dist/{Image-CgRVUblT.cjs.map → Image-B_6DmnVe.cjs.map} +1 -1
  7. package/dist/{Image-DTOu0h-V.js → Image-mkNhOo5p.js} +3 -3
  8. package/dist/{Image-DTOu0h-V.js.map → Image-mkNhOo5p.js.map} +1 -1
  9. package/dist/LinkButton-BQMG96aQ.cjs +2 -0
  10. package/dist/{LinkButton-Kw2brLTK.cjs.map → LinkButton-BQMG96aQ.cjs.map} +1 -1
  11. package/dist/LinkButton-CRDs950E.js +12 -0
  12. package/dist/{LinkButton-sQ5jgHnX.js.map → LinkButton-CRDs950E.js.map} +1 -1
  13. package/dist/Navigate-Ch0ljYa-.cjs +2 -0
  14. package/dist/{Navigate-CrMwdIBB.cjs.map → Navigate-Ch0ljYa-.cjs.map} +1 -1
  15. package/dist/Navigate-Zt9DRJve.js +25 -0
  16. package/dist/{Navigate-ClPcw87e.js.map → Navigate-Zt9DRJve.js.map} +1 -1
  17. package/dist/api/endpoints/index.cjs.js +1 -1
  18. package/dist/api/endpoints/index.cjs.js.map +1 -1
  19. package/dist/api/endpoints/index.es.js +29 -28
  20. package/dist/api/endpoints/index.es.js.map +1 -1
  21. package/dist/api/index.cjs.js +1 -3
  22. package/dist/api/index.cjs.js.map +1 -1
  23. package/dist/api/index.es.js +33 -515
  24. package/dist/api/index.es.js.map +1 -1
  25. package/dist/api-DIgp_6Vr.cjs +2 -0
  26. package/dist/{api-9cnyvZj7.cjs.map → api-DIgp_6Vr.cjs.map} +1 -1
  27. package/dist/api-G8CV5bUa.cjs +2 -0
  28. package/dist/{api-CAH3GT1O.cjs.map → api-G8CV5bUa.cjs.map} +1 -1
  29. package/dist/{api-BFYu8ZvQ.js → api-uh8UKwsU.js} +25 -25
  30. package/dist/{api-BFYu8ZvQ.js.map → api-uh8UKwsU.js.map} +1 -1
  31. package/dist/auth-B6anBtxF.js +238 -0
  32. package/dist/{auth-Bb8WkZGN.js.map → auth-B6anBtxF.js.map} +1 -1
  33. package/dist/auth-C2OUeLmQ.cjs +2 -0
  34. package/dist/{auth-BwpsrTko.cjs.map → auth-C2OUeLmQ.cjs.map} +1 -1
  35. package/dist/components/form/index.cjs.js +1 -1
  36. package/dist/components/form/index.es.js +1 -1
  37. package/dist/components/index.cjs.js +1 -1
  38. package/dist/components/index.cjs.js.map +1 -1
  39. package/dist/components/index.es.js +118 -118
  40. package/dist/components/index.es.js.map +1 -1
  41. package/dist/components/page/index.cjs.js +1 -1
  42. package/dist/components/page/index.es.js +1 -1
  43. package/dist/components/router/index.cjs.js +1 -1
  44. package/dist/components/router/index.es.js +2 -2
  45. package/dist/components/table/index.cjs.js +1 -1
  46. package/dist/components/table/index.es.js +1 -1
  47. package/dist/features/index.cjs.js +1 -1
  48. package/dist/features/index.cjs.js.map +1 -1
  49. package/dist/features/index.es.js +24 -22
  50. package/dist/features/index.es.js.map +1 -1
  51. package/dist/general-BPbbmkeX.cjs +2 -0
  52. package/dist/{general-Bo6JGvKB.cjs.map → general-BPbbmkeX.cjs.map} +1 -1
  53. package/dist/hooks/index.cjs.js +1 -1
  54. package/dist/hooks/index.es.js +1 -1
  55. package/dist/index-B3QkMBQe.cjs +2 -0
  56. package/dist/{index-5C9hpxRF.cjs.map → index-B3QkMBQe.cjs.map} +1 -1
  57. package/dist/index-BIL7PoEV.js +622 -0
  58. package/dist/index-BIL7PoEV.js.map +1 -0
  59. package/dist/index-C08WO83n.js +237 -0
  60. package/dist/{index-hdS8RgRc.js.map → index-C08WO83n.js.map} +1 -1
  61. package/dist/{index-CHboZsxD.js → index-CDxf6gMv.js} +92 -92
  62. package/dist/{index-CHboZsxD.js.map → index-CDxf6gMv.js.map} +1 -1
  63. package/dist/index-D2B9uIE4.cjs +2 -0
  64. package/dist/{index-B89FjK7v.cjs.map → index-D2B9uIE4.cjs.map} +1 -1
  65. package/dist/index-Dadidnct.cjs +2 -0
  66. package/dist/index-Dadidnct.cjs.map +1 -0
  67. package/dist/index-IXGAdLKG.js +30 -0
  68. package/dist/{index-B3e_XaVG.js.map → index-IXGAdLKG.js.map} +1 -1
  69. package/dist/index-JY2Et3RQ.cjs +2 -0
  70. package/dist/{index-CwC9mpb3.cjs.map → index-JY2Et3RQ.cjs.map} +1 -1
  71. package/dist/{schemas-BMQZbhti.js → schemas-UIk-meAN.js} +2 -2
  72. package/dist/{schemas-BMQZbhti.js.map → schemas-UIk-meAN.js.map} +1 -1
  73. package/dist/schemas-hIW9-H6-.cjs +2 -0
  74. package/dist/{schemas-DXX4rh8i.cjs.map → schemas-hIW9-H6-.cjs.map} +1 -1
  75. package/dist/server/App.cjs.js +1 -1
  76. package/dist/server/App.cjs.js.map +1 -1
  77. package/dist/server/App.es.js +11 -11
  78. package/dist/server/App.es.js.map +1 -1
  79. package/dist/server/entry.cjs.js +1 -208
  80. package/dist/server/entry.cjs.js.map +1 -1
  81. package/dist/server/entry.d.ts +1 -1
  82. package/dist/server/entry.es.js +32 -21871
  83. package/dist/server/entry.es.js.map +1 -1
  84. package/dist/{session-D312kYKk.js → session-COyN01K0.js} +11 -10
  85. package/dist/{session-D312kYKk.js.map → session-COyN01K0.js.map} +1 -1
  86. package/dist/session-eOp0H-EC.cjs +2 -0
  87. package/dist/{session-CacrgFSv.cjs.map → session-eOp0H-EC.cjs.map} +1 -1
  88. package/dist/theme/components/index.cjs.js +1 -1
  89. package/dist/theme/components/index.es.js +1 -1
  90. package/dist/theme/index.cjs.js +1 -1
  91. package/dist/theme/index.cjs.js.map +1 -1
  92. package/dist/theme/index.es.js +49 -49
  93. package/dist/theme/index.es.js.map +1 -1
  94. package/dist/{urls-CGZI0f1w.cjs → urls-2gheISSO.cjs} +2 -2
  95. package/dist/{urls-CGZI0f1w.cjs.map → urls-2gheISSO.cjs.map} +1 -1
  96. package/dist/{urls-DP4a8kxP.js → urls-BG788CnL.js} +2 -2
  97. package/dist/{urls-DP4a8kxP.js.map → urls-BG788CnL.js.map} +1 -1
  98. package/dist/utils/api.cjs.js +1 -1
  99. package/dist/utils/api.es.js +2 -2
  100. package/dist/utils/router.cjs.js +1 -1
  101. package/dist/utils/router.cjs.js.map +1 -1
  102. package/dist/utils/router.es.js +2 -2
  103. package/dist/utils/store.cjs.js +1 -1
  104. package/dist/utils/store.cjs.js.map +1 -1
  105. package/dist/utils/store.es.js +6 -6
  106. package/dist/utils/test.cjs.js +1 -1
  107. package/dist/utils/test.cjs.js.map +1 -1
  108. package/dist/utils/test.es.js +9 -9
  109. package/dist/utils/test.es.js.map +1 -1
  110. package/dist/utils/theme.cjs.js +1 -1
  111. package/dist/utils/theme.es.js +2 -2
  112. package/package.json +1 -1
  113. package/dist/Countdown-BtUbr1J_.cjs +0 -2
  114. package/dist/Countdown-DhjAmB0u.js +0 -28
  115. package/dist/Image-CgRVUblT.cjs +0 -2
  116. package/dist/LinkButton-Kw2brLTK.cjs +0 -2
  117. package/dist/LinkButton-sQ5jgHnX.js +0 -12
  118. package/dist/Navigate-ClPcw87e.js +0 -25
  119. package/dist/Navigate-CrMwdIBB.cjs +0 -2
  120. package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -2
  121. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +0 -1
  122. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
  123. package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
  124. package/dist/api-9cnyvZj7.cjs +0 -2
  125. package/dist/api-CAH3GT1O.cjs +0 -2
  126. package/dist/auth-Bb8WkZGN.js +0 -237
  127. package/dist/auth-BwpsrTko.cjs +0 -2
  128. package/dist/client-BK9NlSVR.js +0 -25208
  129. package/dist/client-BK9NlSVR.js.map +0 -1
  130. package/dist/client-CmAMc2Wj.cjs +0 -251
  131. package/dist/client-CmAMc2Wj.cjs.map +0 -1
  132. package/dist/en-gb-B_rK7Jx1.js +0 -20
  133. package/dist/en-gb-B_rK7Jx1.js.map +0 -1
  134. package/dist/en-gb-CpyEkKq3.cjs +0 -2
  135. package/dist/en-gb-CpyEkKq3.cjs.map +0 -1
  136. package/dist/general-Bo6JGvKB.cjs +0 -2
  137. package/dist/index-5C9hpxRF.cjs +0 -2
  138. package/dist/index-B3e_XaVG.js +0 -30
  139. package/dist/index-B89FjK7v.cjs +0 -2
  140. package/dist/index-BRHFlEjS.js +0 -1187
  141. package/dist/index-BRHFlEjS.js.map +0 -1
  142. package/dist/index-CwC9mpb3.cjs +0 -2
  143. package/dist/index-DuArGzQE.cjs +0 -5
  144. package/dist/index-DuArGzQE.cjs.map +0 -1
  145. package/dist/index-hdS8RgRc.js +0 -237
  146. package/dist/jsx-runtime-B2pbW5Fp.cjs +0 -23
  147. package/dist/jsx-runtime-B2pbW5Fp.cjs.map +0 -1
  148. package/dist/jsx-runtime-lzYHhGH3.js +0 -285
  149. package/dist/jsx-runtime-lzYHhGH3.js.map +0 -1
  150. package/dist/rtk-query.modern-CjetfYPg.js +0 -3038
  151. package/dist/rtk-query.modern-CjetfYPg.js.map +0 -1
  152. package/dist/rtk-query.modern-PBCErCqb.cjs +0 -15
  153. package/dist/rtk-query.modern-PBCErCqb.cjs.map +0 -1
  154. package/dist/schemas-DXX4rh8i.cjs +0 -2
  155. package/dist/session-CacrgFSv.cjs +0 -2
@@ -1,3038 +0,0 @@
1
- import { isPlainObject as be, nanoid as Ut, formatProdErrorMessage as Qe, createAction as ye, createSelector as sn, createNextState as ct, createAsyncThunk as vt, createSlice as pe, prepareAutoBatched as me, isAnyOf as qe, isFulfilled as oe, isRejectedWithValue as ut, combineReducers as on, SHOULD_AUTOBATCH as Kt, isAllOf as Ve, isRejected as lt, isPending as Vt, isAction as an, isAsyncThunkAction as bt } from "@reduxjs/toolkit";
2
- var ft = Symbol.for("immer-nothing"), ve = Symbol.for("immer-draftable"), H = Symbol.for("immer-state"), Wt = process.env.NODE_ENV !== "production" ? [
3
- // All error codes, starting by 0:
4
- function(e) {
5
- return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
6
- },
7
- function(e) {
8
- return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`;
9
- },
10
- "This object has been frozen and should not be mutated",
11
- function(e) {
12
- return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + e;
13
- },
14
- "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
15
- "Immer forbids circular references",
16
- "The first or second argument to `produce` must be a function",
17
- "The third argument to `produce` must be a function or undefined",
18
- "First argument to `createDraft` must be a plain object, an array, or an immerable object",
19
- "First argument to `finishDraft` must be a draft returned by `createDraft`",
20
- function(e) {
21
- return `'current' expects a draft, got: ${e}`;
22
- },
23
- "Object.defineProperty() cannot be used on an Immer draft",
24
- "Object.setPrototypeOf() cannot be used on an Immer draft",
25
- "Immer only supports deleting array indices",
26
- "Immer only supports setting array indices and the 'length' property",
27
- function(e) {
28
- return `'original' expects a draft, got: ${e}`;
29
- }
30
- // Note: if more errors are added, the errorOffset in Patches.ts should be increased
31
- // See Patches.ts for additional errors
32
- ] : [];
33
- function W(e, ...t) {
34
- if (process.env.NODE_ENV !== "production") {
35
- const n = Wt[e], r = typeof n == "function" ? n.apply(null, t) : n;
36
- throw new Error(`[Immer] ${r}`);
37
- }
38
- throw new Error(
39
- `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
40
- );
41
- }
42
- var ae = Object.getPrototypeOf;
43
- function Z(e) {
44
- return !!e && !!e[H];
45
- }
46
- function ee(e) {
47
- return e ? Lt(e) || Array.isArray(e) || !!e[ve] || !!e.constructor?.[ve] || he(e) || Oe(e) : !1;
48
- }
49
- var cn = Object.prototype.constructor.toString();
50
- function Lt(e) {
51
- if (!e || typeof e != "object")
52
- return !1;
53
- const t = ae(e);
54
- if (t === null)
55
- return !0;
56
- const n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
57
- return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === cn;
58
- }
59
- function un(e) {
60
- return Z(e) || W(15, e), e[H].base_;
61
- }
62
- function Se(e, t) {
63
- ce(e) === 0 ? Reflect.ownKeys(e).forEach((n) => {
64
- t(n, e[n], e);
65
- }) : e.forEach((n, r) => t(r, n, e));
66
- }
67
- function ce(e) {
68
- const t = e[H];
69
- return t ? t.type_ : Array.isArray(e) ? 1 : he(e) ? 2 : Oe(e) ? 3 : 0;
70
- }
71
- function _e(e, t) {
72
- return ce(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
73
- }
74
- function We(e, t) {
75
- return ce(e) === 2 ? e.get(t) : e[t];
76
- }
77
- function Bt(e, t, n) {
78
- const r = ce(e);
79
- r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
80
- }
81
- function ln(e, t) {
82
- return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
83
- }
84
- function he(e) {
85
- return e instanceof Map;
86
- }
87
- function Oe(e) {
88
- return e instanceof Set;
89
- }
90
- function se(e) {
91
- return e.copy_ || e.base_;
92
- }
93
- function Ge(e, t) {
94
- if (he(e))
95
- return new Map(e);
96
- if (Oe(e))
97
- return new Set(e);
98
- if (Array.isArray(e))
99
- return Array.prototype.slice.call(e);
100
- const n = Lt(e);
101
- if (t === !0 || t === "class_only" && !n) {
102
- const r = Object.getOwnPropertyDescriptors(e);
103
- delete r[H];
104
- let s = Reflect.ownKeys(r);
105
- for (let d = 0; d < s.length; d++) {
106
- const p = s[d], g = r[p];
107
- g.writable === !1 && (g.writable = !0, g.configurable = !0), (g.get || g.set) && (r[p] = {
108
- configurable: !0,
109
- writable: !0,
110
- // could live with !!desc.set as well here...
111
- enumerable: g.enumerable,
112
- value: e[p]
113
- });
114
- }
115
- return Object.create(ae(e), r);
116
- } else {
117
- const r = ae(e);
118
- if (r !== null && n)
119
- return { ...e };
120
- const s = Object.create(r);
121
- return Object.assign(s, e);
122
- }
123
- }
124
- function dt(e, t = !1) {
125
- return xe(e) || Z(e) || !ee(e) || (ce(e) > 1 && Object.defineProperties(e, {
126
- set: { value: De },
127
- add: { value: De },
128
- clear: { value: De },
129
- delete: { value: De }
130
- }), Object.freeze(e), t && Object.values(e).forEach((n) => dt(n, !0))), e;
131
- }
132
- function De() {
133
- W(2);
134
- }
135
- function xe(e) {
136
- return Object.isFrozen(e);
137
- }
138
- var Xe = {};
139
- function ue(e) {
140
- const t = Xe[e];
141
- return t || W(0, e), t;
142
- }
143
- function fn(e, t) {
144
- Xe[e] || (Xe[e] = t);
145
- }
146
- var we;
147
- function Ht() {
148
- return we;
149
- }
150
- function dn(e, t) {
151
- return {
152
- drafts_: [],
153
- parent_: e,
154
- immer_: t,
155
- // Whenever the modified draft contains a draft from another scope, we
156
- // need to prevent auto-freezing so the unowned draft can be finalized.
157
- canAutoFreeze_: !0,
158
- unfinalizedDrafts_: 0
159
- };
160
- }
161
- function St(e, t) {
162
- t && (ue("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
163
- }
164
- function Ze(e) {
165
- et(e), e.drafts_.forEach(pn), e.drafts_ = null;
166
- }
167
- function et(e) {
168
- e === we && (we = e.parent_);
169
- }
170
- function _t(e) {
171
- return we = dn(we, e);
172
- }
173
- function pn(e) {
174
- const t = e[H];
175
- t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
176
- }
177
- function wt(e, t) {
178
- t.unfinalizedDrafts_ = t.drafts_.length;
179
- const n = t.drafts_[0];
180
- return e !== void 0 && e !== n ? (n[H].modified_ && (Ze(t), W(4)), ee(e) && (e = Me(t, e), t.parent_ || ke(t, e)), t.patches_ && ue("Patches").generateReplacementPatches_(
181
- n[H].base_,
182
- e,
183
- t.patches_,
184
- t.inversePatches_
185
- )) : e = Me(t, n, []), Ze(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== ft ? e : void 0;
186
- }
187
- function Me(e, t, n) {
188
- if (xe(t))
189
- return t;
190
- const r = t[H];
191
- if (!r)
192
- return Se(
193
- t,
194
- (s, d) => Rt(e, r, t, s, d, n)
195
- ), t;
196
- if (r.scope_ !== e)
197
- return t;
198
- if (!r.modified_)
199
- return ke(e, r.base_, !0), r.base_;
200
- if (!r.finalized_) {
201
- r.finalized_ = !0, r.scope_.unfinalizedDrafts_--;
202
- const s = r.copy_;
203
- let d = s, p = !1;
204
- r.type_ === 3 && (d = new Set(s), s.clear(), p = !0), Se(
205
- d,
206
- (g, T) => Rt(e, r, s, g, T, n, p)
207
- ), ke(e, s, !1), n && e.patches_ && ue("Patches").generatePatches_(
208
- r,
209
- n,
210
- e.patches_,
211
- e.inversePatches_
212
- );
213
- }
214
- return r.copy_;
215
- }
216
- function Rt(e, t, n, r, s, d, p) {
217
- if (process.env.NODE_ENV !== "production" && s === n && W(5), Z(s)) {
218
- const g = d && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
219
- !_e(t.assigned_, r) ? d.concat(r) : void 0, T = Me(e, s, g);
220
- if (Bt(n, r, T), Z(T))
221
- e.canAutoFreeze_ = !1;
222
- else
223
- return;
224
- } else p && n.add(s);
225
- if (ee(s) && !xe(s)) {
226
- if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
227
- return;
228
- Me(e, s), (!t || !t.scope_.parent_) && typeof r != "symbol" && (he(n) ? n.has(r) : Object.prototype.propertyIsEnumerable.call(n, r)) && ke(e, s);
229
- }
230
- }
231
- function ke(e, t, n = !1) {
232
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && dt(t, n);
233
- }
234
- function yn(e, t) {
235
- const n = Array.isArray(e), r = {
236
- type_: n ? 1 : 0,
237
- // Track which produce call this is associated with.
238
- scope_: t ? t.scope_ : Ht(),
239
- // True for both shallow and deep changes.
240
- modified_: !1,
241
- // Used during finalization.
242
- finalized_: !1,
243
- // Track which properties have been assigned (true) or deleted (false).
244
- assigned_: {},
245
- // The parent draft state.
246
- parent_: t,
247
- // The base state.
248
- base_: e,
249
- // The base proxy.
250
- draft_: null,
251
- // set below
252
- // The base copy with any updated values.
253
- copy_: null,
254
- // Called by the `produce` function.
255
- revoke_: null,
256
- isManual_: !1
257
- };
258
- let s = r, d = pt;
259
- n && (s = [r], d = Re);
260
- const { revoke: p, proxy: g } = Proxy.revocable(s, d);
261
- return r.draft_ = g, r.revoke_ = p, g;
262
- }
263
- var pt = {
264
- get(e, t) {
265
- if (t === H)
266
- return e;
267
- const n = se(e);
268
- if (!_e(n, t))
269
- return hn(e, n, t);
270
- const r = n[t];
271
- return e.finalized_ || !ee(r) ? r : r === Le(e.base_, t) ? (Be(e), e.copy_[t] = nt(r, e)) : r;
272
- },
273
- has(e, t) {
274
- return t in se(e);
275
- },
276
- ownKeys(e) {
277
- return Reflect.ownKeys(se(e));
278
- },
279
- set(e, t, n) {
280
- const r = Jt(se(e), t);
281
- if (r?.set)
282
- return r.set.call(e.draft_, n), !0;
283
- if (!e.modified_) {
284
- const s = Le(se(e), t), d = s?.[H];
285
- if (d && d.base_ === n)
286
- return e.copy_[t] = n, e.assigned_[t] = !1, !0;
287
- if (ln(n, s) && (n !== void 0 || _e(e.base_, t)))
288
- return !0;
289
- Be(e), tt(e);
290
- }
291
- return e.copy_[t] === n && // special case: handle new props with value 'undefined'
292
- (n !== void 0 || t in e.copy_) || // special case: NaN
293
- Number.isNaN(n) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = n, e.assigned_[t] = !0), !0;
294
- },
295
- deleteProperty(e, t) {
296
- return Le(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, Be(e), tt(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
297
- },
298
- // Note: We never coerce `desc.value` into an Immer draft, because we can't make
299
- // the same guarantee in ES5 mode.
300
- getOwnPropertyDescriptor(e, t) {
301
- const n = se(e), r = Reflect.getOwnPropertyDescriptor(n, t);
302
- return r && {
303
- writable: !0,
304
- configurable: e.type_ !== 1 || t !== "length",
305
- enumerable: r.enumerable,
306
- value: n[t]
307
- };
308
- },
309
- defineProperty() {
310
- W(11);
311
- },
312
- getPrototypeOf(e) {
313
- return ae(e.base_);
314
- },
315
- setPrototypeOf() {
316
- W(12);
317
- }
318
- }, Re = {};
319
- Se(pt, (e, t) => {
320
- Re[e] = function() {
321
- return arguments[0] = arguments[0][0], t.apply(this, arguments);
322
- };
323
- });
324
- Re.deleteProperty = function(e, t) {
325
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && W(13), Re.set.call(this, e, t, void 0);
326
- };
327
- Re.set = function(e, t, n) {
328
- return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && W(14), pt.set.call(this, e[0], t, n, e[0]);
329
- };
330
- function Le(e, t) {
331
- const n = e[H];
332
- return (n ? se(n) : e)[t];
333
- }
334
- function hn(e, t, n) {
335
- const r = Jt(t, n);
336
- return r ? "value" in r ? r.value : (
337
- // This is a very special case, if the prop is a getter defined by the
338
- // prototype, we should invoke it with the draft as context!
339
- r.get?.call(e.draft_)
340
- ) : void 0;
341
- }
342
- function Jt(e, t) {
343
- if (!(t in e))
344
- return;
345
- let n = ae(e);
346
- for (; n; ) {
347
- const r = Object.getOwnPropertyDescriptor(n, t);
348
- if (r)
349
- return r;
350
- n = ae(n);
351
- }
352
- }
353
- function tt(e) {
354
- e.modified_ || (e.modified_ = !0, e.parent_ && tt(e.parent_));
355
- }
356
- function Be(e) {
357
- e.copy_ || (e.copy_ = Ge(
358
- e.base_,
359
- e.scope_.immer_.useStrictShallowCopy_
360
- ));
361
- }
362
- var mn = class {
363
- constructor(e) {
364
- this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, n, r) => {
365
- if (typeof t == "function" && typeof n != "function") {
366
- const d = n;
367
- n = t;
368
- const p = this;
369
- return function(T = d, ...I) {
370
- return p.produce(T, (D) => n.call(this, D, ...I));
371
- };
372
- }
373
- typeof n != "function" && W(6), r !== void 0 && typeof r != "function" && W(7);
374
- let s;
375
- if (ee(t)) {
376
- const d = _t(this), p = nt(t, void 0);
377
- let g = !0;
378
- try {
379
- s = n(p), g = !1;
380
- } finally {
381
- g ? Ze(d) : et(d);
382
- }
383
- return St(d, r), wt(s, d);
384
- } else if (!t || typeof t != "object") {
385
- if (s = n(t), s === void 0 && (s = t), s === ft && (s = void 0), this.autoFreeze_ && dt(s, !0), r) {
386
- const d = [], p = [];
387
- ue("Patches").generateReplacementPatches_(t, s, d, p), r(d, p);
388
- }
389
- return s;
390
- } else
391
- W(1, t);
392
- }, this.produceWithPatches = (t, n) => {
393
- if (typeof t == "function")
394
- return (p, ...g) => this.produceWithPatches(p, (T) => t(T, ...g));
395
- let r, s;
396
- return [this.produce(t, n, (p, g) => {
397
- r = p, s = g;
398
- }), r, s];
399
- }, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
400
- }
401
- createDraft(e) {
402
- ee(e) || W(8), Z(e) && (e = gn(e));
403
- const t = _t(this), n = nt(e, void 0);
404
- return n[H].isManual_ = !0, et(t), n;
405
- }
406
- finishDraft(e, t) {
407
- const n = e && e[H];
408
- (!n || !n.isManual_) && W(9);
409
- const { scope_: r } = n;
410
- return St(r, t), wt(void 0, r);
411
- }
412
- /**
413
- * Pass true to automatically freeze all copies created by Immer.
414
- *
415
- * By default, auto-freezing is enabled.
416
- */
417
- setAutoFreeze(e) {
418
- this.autoFreeze_ = e;
419
- }
420
- /**
421
- * Pass true to enable strict shallow copy.
422
- *
423
- * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
424
- */
425
- setUseStrictShallowCopy(e) {
426
- this.useStrictShallowCopy_ = e;
427
- }
428
- applyPatches(e, t) {
429
- let n;
430
- for (n = t.length - 1; n >= 0; n--) {
431
- const s = t[n];
432
- if (s.path.length === 0 && s.op === "replace") {
433
- e = s.value;
434
- break;
435
- }
436
- }
437
- n > -1 && (t = t.slice(n + 1));
438
- const r = ue("Patches").applyPatches_;
439
- return Z(e) ? r(e, t) : this.produce(
440
- e,
441
- (s) => r(s, t)
442
- );
443
- }
444
- };
445
- function nt(e, t) {
446
- const n = he(e) ? ue("MapSet").proxyMap_(e, t) : Oe(e) ? ue("MapSet").proxySet_(e, t) : yn(e, t);
447
- return (t ? t.scope_ : Ht()).drafts_.push(n), n;
448
- }
449
- function gn(e) {
450
- return Z(e) || W(10, e), Yt(e);
451
- }
452
- function Yt(e) {
453
- if (!ee(e) || xe(e))
454
- return e;
455
- const t = e[H];
456
- let n;
457
- if (t) {
458
- if (!t.modified_)
459
- return t.base_;
460
- t.finalized_ = !0, n = Ge(e, t.scope_.immer_.useStrictShallowCopy_);
461
- } else
462
- n = Ge(e, !0);
463
- return Se(n, (r, s) => {
464
- Bt(n, r, Yt(s));
465
- }), t && (t.finalized_ = !1), n;
466
- }
467
- function vn() {
468
- process.env.NODE_ENV !== "production" && Wt.push(
469
- 'Sets cannot have "replace" patches.',
470
- function(f) {
471
- return "Unsupported patch operation: " + f;
472
- },
473
- function(f) {
474
- return "Cannot apply patch, path doesn't resolve: " + f;
475
- },
476
- "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
477
- );
478
- const t = "replace", n = "add", r = "remove";
479
- function s(f, w, A, b) {
480
- switch (f.type_) {
481
- case 0:
482
- case 2:
483
- return p(
484
- f,
485
- w,
486
- A,
487
- b
488
- );
489
- case 1:
490
- return d(f, w, A, b);
491
- case 3:
492
- return g(
493
- f,
494
- w,
495
- A,
496
- b
497
- );
498
- }
499
- }
500
- function d(f, w, A, b) {
501
- let { base_: u, assigned_: c } = f, v = f.copy_;
502
- v.length < u.length && ([u, v] = [v, u], [A, b] = [b, A]);
503
- for (let i = 0; i < u.length; i++)
504
- if (c[i] && v[i] !== u[i]) {
505
- const a = w.concat([i]);
506
- A.push({
507
- op: t,
508
- path: a,
509
- // Need to maybe clone it, as it can in fact be the original value
510
- // due to the base/copy inversion at the start of this function
511
- value: R(v[i])
512
- }), b.push({
513
- op: t,
514
- path: a,
515
- value: R(u[i])
516
- });
517
- }
518
- for (let i = u.length; i < v.length; i++) {
519
- const a = w.concat([i]);
520
- A.push({
521
- op: n,
522
- path: a,
523
- // Need to maybe clone it, as it can in fact be the original value
524
- // due to the base/copy inversion at the start of this function
525
- value: R(v[i])
526
- });
527
- }
528
- for (let i = v.length - 1; u.length <= i; --i) {
529
- const a = w.concat([i]);
530
- b.push({
531
- op: r,
532
- path: a
533
- });
534
- }
535
- }
536
- function p(f, w, A, b) {
537
- const { base_: u, copy_: c } = f;
538
- Se(f.assigned_, (v, i) => {
539
- const a = We(u, v), m = We(c, v), E = i ? _e(u, v) ? t : n : r;
540
- if (a === m && E === t)
541
- return;
542
- const P = w.concat(v);
543
- A.push(E === r ? { op: E, path: P } : { op: E, path: P, value: m }), b.push(
544
- E === n ? { op: r, path: P } : E === r ? { op: n, path: P, value: R(a) } : { op: t, path: P, value: R(a) }
545
- );
546
- });
547
- }
548
- function g(f, w, A, b) {
549
- let { base_: u, copy_: c } = f, v = 0;
550
- u.forEach((i) => {
551
- if (!c.has(i)) {
552
- const a = w.concat([v]);
553
- A.push({
554
- op: r,
555
- path: a,
556
- value: i
557
- }), b.unshift({
558
- op: n,
559
- path: a,
560
- value: i
561
- });
562
- }
563
- v++;
564
- }), v = 0, c.forEach((i) => {
565
- if (!u.has(i)) {
566
- const a = w.concat([v]);
567
- A.push({
568
- op: n,
569
- path: a,
570
- value: i
571
- }), b.unshift({
572
- op: r,
573
- path: a,
574
- value: i
575
- });
576
- }
577
- v++;
578
- });
579
- }
580
- function T(f, w, A, b) {
581
- A.push({
582
- op: t,
583
- path: [],
584
- value: w === ft ? void 0 : w
585
- }), b.push({
586
- op: t,
587
- path: [],
588
- value: f
589
- });
590
- }
591
- function I(f, w) {
592
- return w.forEach((A) => {
593
- const { path: b, op: u } = A;
594
- let c = f;
595
- for (let m = 0; m < b.length - 1; m++) {
596
- const E = ce(c);
597
- let P = b[m];
598
- typeof P != "string" && typeof P != "number" && (P = "" + P), (E === 0 || E === 1) && (P === "__proto__" || P === "constructor") && W(19), typeof c == "function" && P === "prototype" && W(19), c = We(c, P), typeof c != "object" && W(18, b.join("/"));
599
- }
600
- const v = ce(c), i = D(A.value), a = b[b.length - 1];
601
- switch (u) {
602
- case t:
603
- switch (v) {
604
- case 2:
605
- return c.set(a, i);
606
- case 3:
607
- W(16);
608
- default:
609
- return c[a] = i;
610
- }
611
- case n:
612
- switch (v) {
613
- case 1:
614
- return a === "-" ? c.push(i) : c.splice(a, 0, i);
615
- case 2:
616
- return c.set(a, i);
617
- case 3:
618
- return c.add(i);
619
- default:
620
- return c[a] = i;
621
- }
622
- case r:
623
- switch (v) {
624
- case 1:
625
- return c.splice(a, 1);
626
- case 2:
627
- return c.delete(a);
628
- case 3:
629
- return c.delete(A.value);
630
- default:
631
- return delete c[a];
632
- }
633
- default:
634
- W(17, u);
635
- }
636
- }), f;
637
- }
638
- function D(f) {
639
- if (!ee(f))
640
- return f;
641
- if (Array.isArray(f))
642
- return f.map(D);
643
- if (he(f))
644
- return new Map(
645
- Array.from(f.entries()).map(([A, b]) => [A, D(b)])
646
- );
647
- if (Oe(f))
648
- return new Set(Array.from(f).map(D));
649
- const w = Object.create(ae(f));
650
- for (const A in f)
651
- w[A] = D(f[A]);
652
- return _e(f, ve) && (w[ve] = f[ve]), w;
653
- }
654
- function R(f) {
655
- return Z(f) ? D(f) : f;
656
- }
657
- fn("Patches", {
658
- applyPatches_: I,
659
- generatePatches_: s,
660
- generateReplacementPatches_: T
661
- });
662
- }
663
- var Ee = new mn();
664
- Ee.produce;
665
- var Gt = /* @__PURE__ */ Ee.produceWithPatches.bind(
666
- Ee
667
- ), Et = /* @__PURE__ */ Ee.applyPatches.bind(Ee), bn = class extends Error {
668
- /**
669
- * The schema issues.
670
- */
671
- issues;
672
- /**
673
- * Creates a schema error with useful information.
674
- *
675
- * @param issues The schema issues.
676
- */
677
- constructor(e) {
678
- super(e[0].message), this.name = "SchemaError", this.issues = e;
679
- }
680
- }, Sn = (e, t, n) => {
681
- if (t.length === 1 && t[0] === n) {
682
- let r = !1;
683
- try {
684
- const s = {};
685
- e(s) === s && (r = !0);
686
- } catch {
687
- }
688
- if (r) {
689
- let s;
690
- try {
691
- throw new Error();
692
- } catch (d) {
693
- ({ stack: s } = d);
694
- }
695
- console.warn(
696
- `The result function returned its own inputs without modification. e.g
697
- \`createSelector([state => state.todos], todos => todos)\`
698
- This could lead to inefficient memoization and unnecessary re-renders.
699
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,
700
- { stack: s }
701
- );
702
- }
703
- }
704
- }, _n = (e, t, n) => {
705
- const { memoize: r, memoizeOptions: s } = t, { inputSelectorResults: d, inputSelectorResultsCopy: p } = e, g = r(() => ({}), ...s);
706
- if (!(g.apply(null, d) === g.apply(null, p))) {
707
- let I;
708
- try {
709
- throw new Error();
710
- } catch (D) {
711
- ({ stack: I } = D);
712
- }
713
- console.warn(
714
- `An input selector returned a different result when passed same arguments.
715
- This means your output selector will likely run more frequently than intended.
716
- Avoid returning a new reference inside your input selector, e.g.
717
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,
718
- {
719
- arguments: n,
720
- firstInputs: d,
721
- secondInputs: p,
722
- stack: I
723
- }
724
- );
725
- }
726
- }, wn = {
727
- inputStabilityCheck: "once",
728
- identityFunctionCheck: "once"
729
- };
730
- function Rn(e, t = `expected a function, instead received ${typeof e}`) {
731
- if (typeof e != "function")
732
- throw new TypeError(t);
733
- }
734
- function En(e, t = `expected an object, instead received ${typeof e}`) {
735
- if (typeof e != "object")
736
- throw new TypeError(t);
737
- }
738
- function Pn(e, t = "expected all items to be functions, instead received the following types: ") {
739
- if (!e.every((n) => typeof n == "function")) {
740
- const n = e.map(
741
- (r) => typeof r == "function" ? `function ${r.name || "unnamed"}()` : typeof r
742
- ).join(", ");
743
- throw new TypeError(`${t}[${n}]`);
744
- }
745
- }
746
- var Pt = (e) => Array.isArray(e) ? e : [e];
747
- function An(e) {
748
- const t = Array.isArray(e[0]) ? e[0] : e;
749
- return Pn(
750
- t,
751
- "createSelector expects all input-selectors to be functions, but received the following types: "
752
- ), t;
753
- }
754
- function At(e, t) {
755
- const n = [], { length: r } = e;
756
- for (let s = 0; s < r; s++)
757
- n.push(e[s].apply(null, t));
758
- return n;
759
- }
760
- var On = (e, t) => {
761
- const { identityFunctionCheck: n, inputStabilityCheck: r } = {
762
- ...wn,
763
- ...t
764
- };
765
- return {
766
- identityFunctionCheck: {
767
- shouldRun: n === "always" || n === "once" && e,
768
- run: Sn
769
- },
770
- inputStabilityCheck: {
771
- shouldRun: r === "always" || r === "once" && e,
772
- run: _n
773
- }
774
- };
775
- }, In = class {
776
- constructor(e) {
777
- this.value = e;
778
- }
779
- deref() {
780
- return this.value;
781
- }
782
- }, Dn = typeof WeakRef < "u" ? WeakRef : In, Tn = 0, Ot = 1;
783
- function Te() {
784
- return {
785
- s: Tn,
786
- v: void 0,
787
- o: null,
788
- p: null
789
- };
790
- }
791
- function Fe(e, t = {}) {
792
- let n = Te();
793
- const { resultEqualityCheck: r } = t;
794
- let s, d = 0;
795
- function p() {
796
- let g = n;
797
- const { length: T } = arguments;
798
- for (let R = 0, f = T; R < f; R++) {
799
- const w = arguments[R];
800
- if (typeof w == "function" || typeof w == "object" && w !== null) {
801
- let A = g.o;
802
- A === null && (g.o = A = /* @__PURE__ */ new WeakMap());
803
- const b = A.get(w);
804
- b === void 0 ? (g = Te(), A.set(w, g)) : g = b;
805
- } else {
806
- let A = g.p;
807
- A === null && (g.p = A = /* @__PURE__ */ new Map());
808
- const b = A.get(w);
809
- b === void 0 ? (g = Te(), A.set(w, g)) : g = b;
810
- }
811
- }
812
- const I = g;
813
- let D;
814
- if (g.s === Ot)
815
- D = g.v;
816
- else if (D = e.apply(null, arguments), d++, r) {
817
- const R = s?.deref?.() ?? s;
818
- R != null && r(R, D) && (D = R, d !== 0 && d--), s = typeof D == "object" && D !== null || typeof D == "function" ? new Dn(D) : D;
819
- }
820
- return I.s = Ot, I.v = D, D;
821
- }
822
- return p.clearCache = () => {
823
- n = Te(), p.resetResultsCount();
824
- }, p.resultsCount = () => d, p.resetResultsCount = () => {
825
- d = 0;
826
- }, p;
827
- }
828
- function Nn(e, ...t) {
829
- const n = typeof e == "function" ? {
830
- memoize: e,
831
- memoizeOptions: t
832
- } : e, r = (...s) => {
833
- let d = 0, p = 0, g, T = {}, I = s.pop();
834
- typeof I == "object" && (T = I, I = s.pop()), Rn(
835
- I,
836
- `createSelector expects an output function after the inputs, but received: [${typeof I}]`
837
- );
838
- const D = {
839
- ...n,
840
- ...T
841
- }, {
842
- memoize: R,
843
- memoizeOptions: f = [],
844
- argsMemoize: w = Fe,
845
- argsMemoizeOptions: A = [],
846
- devModeChecks: b = {}
847
- } = D, u = Pt(f), c = Pt(A), v = An(s), i = R(function() {
848
- return d++, I.apply(
849
- null,
850
- arguments
851
- );
852
- }, ...u);
853
- let a = !0;
854
- const m = w(function() {
855
- p++;
856
- const P = At(
857
- v,
858
- arguments
859
- );
860
- if (g = i.apply(null, P), process.env.NODE_ENV !== "production") {
861
- const { identityFunctionCheck: O, inputStabilityCheck: S } = On(a, b);
862
- if (O.shouldRun && O.run(
863
- I,
864
- P,
865
- g
866
- ), S.shouldRun) {
867
- const y = At(
868
- v,
869
- arguments
870
- );
871
- S.run(
872
- { inputSelectorResults: P, inputSelectorResultsCopy: y },
873
- { memoize: R, memoizeOptions: u },
874
- arguments
875
- );
876
- }
877
- a && (a = !1);
878
- }
879
- return g;
880
- }, ...c);
881
- return Object.assign(m, {
882
- resultFunc: I,
883
- memoizedResultFunc: i,
884
- dependencies: v,
885
- dependencyRecomputations: () => p,
886
- resetDependencyRecomputations: () => {
887
- p = 0;
888
- },
889
- lastResult: () => g,
890
- recomputations: () => d,
891
- resetRecomputations: () => {
892
- d = 0;
893
- },
894
- memoize: R,
895
- argsMemoize: w
896
- });
897
- };
898
- return Object.assign(r, {
899
- withTypes: () => r
900
- }), r;
901
- }
902
- var Cn = /* @__PURE__ */ Nn(Fe), Qn = Object.assign(
903
- (e, t = Cn) => {
904
- En(
905
- e,
906
- `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`
907
- );
908
- const n = Object.keys(e), r = n.map(
909
- (d) => e[d]
910
- );
911
- return t(
912
- r,
913
- (...d) => d.reduce((p, g, T) => (p[n[T]] = g, p), {})
914
- );
915
- },
916
- { withTypes: () => Qn }
917
- ), qn = /* @__PURE__ */ ((e) => (e.uninitialized = "uninitialized", e.pending = "pending", e.fulfilled = "fulfilled", e.rejected = "rejected", e))(qn || {});
918
- function It(e) {
919
- return {
920
- status: e,
921
- isUninitialized: e === "uninitialized",
922
- isLoading: e === "pending",
923
- isSuccess: e === "fulfilled",
924
- isError: e === "rejected"
925
- /* rejected */
926
- };
927
- }
928
- var Dt = be;
929
- function Xt(e, t) {
930
- if (e === t || !(Dt(e) && Dt(t) || Array.isArray(e) && Array.isArray(t)))
931
- return t;
932
- const n = Object.keys(t), r = Object.keys(e);
933
- let s = n.length === r.length;
934
- const d = Array.isArray(t) ? [] : {};
935
- for (const p of n)
936
- d[p] = Xt(e[p], t[p]), s && (s = e[p] === d[p]);
937
- return s ? e : d;
938
- }
939
- function He(e) {
940
- let t = 0;
941
- for (const n in e)
942
- t++;
943
- return t;
944
- }
945
- var Tt = (e) => [].concat(...e);
946
- function Mn(e) {
947
- return new RegExp("(^|:)//").test(e);
948
- }
949
- function kn() {
950
- return typeof document > "u" ? !0 : document.visibilityState !== "hidden";
951
- }
952
- function je(e) {
953
- return e != null;
954
- }
955
- function Fn() {
956
- return typeof navigator > "u" || navigator.onLine === void 0 ? !0 : navigator.onLine;
957
- }
958
- var jn = (e) => e.replace(/\/$/, ""), zn = (e) => e.replace(/^\//, "");
959
- function xn(e, t) {
960
- if (!e)
961
- return t;
962
- if (!t)
963
- return e;
964
- if (Mn(t))
965
- return t;
966
- const n = e.endsWith("/") || !t.startsWith("?") ? "/" : "";
967
- return e = jn(e), t = zn(t), `${e}${n}${t}`;
968
- }
969
- function $n(e, t, n) {
970
- return e.has(t) ? e.get(t) : e.set(t, n).get(t);
971
- }
972
- function rt(e, t, n) {
973
- return e.has(t) ? e.get(t) : e.set(t, n(t)).get(t);
974
- }
975
- var it = () => /* @__PURE__ */ new Map(), Nt = (...e) => fetch(...e), Un = (e) => e.status >= 200 && e.status <= 299, Kn = (e) => (
976
- /*applicat*/
977
- /ion\/(vnd\.api\+)?json/.test(e.get("content-type") || "")
978
- );
979
- function Ct(e) {
980
- if (!be(e))
981
- return e;
982
- const t = {
983
- ...e
984
- };
985
- for (const [n, r] of Object.entries(t))
986
- r === void 0 && delete t[n];
987
- return t;
988
- }
989
- function lr({
990
- baseUrl: e,
991
- prepareHeaders: t = (R) => R,
992
- fetchFn: n = Nt,
993
- paramsSerializer: r,
994
- isJsonContentType: s = Kn,
995
- jsonContentType: d = "application/json",
996
- jsonReplacer: p,
997
- timeout: g,
998
- responseHandler: T,
999
- validateStatus: I,
1000
- ...D
1001
- } = {}) {
1002
- return typeof fetch > "u" && n === Nt && console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."), async (f, w, A) => {
1003
- const {
1004
- getState: b,
1005
- extra: u,
1006
- endpoint: c,
1007
- forced: v,
1008
- type: i
1009
- } = w;
1010
- let a, {
1011
- url: m,
1012
- headers: E = new Headers(D.headers),
1013
- params: P = void 0,
1014
- responseHandler: O = T ?? "json",
1015
- validateStatus: S = I ?? Un,
1016
- timeout: y = g,
1017
- ...o
1018
- } = typeof f == "string" ? {
1019
- url: f
1020
- } : f, l, h = w.signal;
1021
- y && (l = new AbortController(), w.signal.addEventListener("abort", l.abort), h = l.signal);
1022
- let _ = {
1023
- ...D,
1024
- signal: h,
1025
- ...o
1026
- };
1027
- E = new Headers(Ct(E)), _.headers = await t(E, {
1028
- getState: b,
1029
- arg: f,
1030
- extra: u,
1031
- endpoint: c,
1032
- forced: v,
1033
- type: i,
1034
- extraOptions: A
1035
- }) || E;
1036
- const N = (j) => typeof j == "object" && (be(j) || Array.isArray(j) || typeof j.toJSON == "function");
1037
- if (!_.headers.has("content-type") && N(_.body) && _.headers.set("content-type", d), N(_.body) && s(_.headers) && (_.body = JSON.stringify(_.body, p)), P) {
1038
- const j = ~m.indexOf("?") ? "&" : "?", x = r ? r(P) : new URLSearchParams(Ct(P));
1039
- m += j + x;
1040
- }
1041
- m = xn(e, m);
1042
- const q = new Request(m, _);
1043
- a = {
1044
- request: new Request(m, _)
1045
- };
1046
- let Q, C = !1, F = l && setTimeout(() => {
1047
- C = !0, l.abort();
1048
- }, y);
1049
- try {
1050
- Q = await n(q);
1051
- } catch (j) {
1052
- return {
1053
- error: {
1054
- status: C ? "TIMEOUT_ERROR" : "FETCH_ERROR",
1055
- error: String(j)
1056
- },
1057
- meta: a
1058
- };
1059
- } finally {
1060
- F && clearTimeout(F), l?.signal.removeEventListener("abort", l.abort);
1061
- }
1062
- const K = Q.clone();
1063
- a.response = K;
1064
- let L, $ = "";
1065
- try {
1066
- let j;
1067
- if (await Promise.all([
1068
- R(Q, O).then((x) => L = x, (x) => j = x),
1069
- // see https://github.com/node-fetch/node-fetch/issues/665#issuecomment-538995182
1070
- // we *have* to "use up" both streams at the same time or they will stop running in node-fetch scenarios
1071
- K.text().then((x) => $ = x, () => {
1072
- })
1073
- ]), j) throw j;
1074
- } catch (j) {
1075
- return {
1076
- error: {
1077
- status: "PARSING_ERROR",
1078
- originalStatus: Q.status,
1079
- data: $,
1080
- error: String(j)
1081
- },
1082
- meta: a
1083
- };
1084
- }
1085
- return S(Q, L) ? {
1086
- data: L,
1087
- meta: a
1088
- } : {
1089
- error: {
1090
- status: Q.status,
1091
- data: L
1092
- },
1093
- meta: a
1094
- };
1095
- };
1096
- async function R(f, w) {
1097
- if (typeof w == "function")
1098
- return w(f);
1099
- if (w === "content-type" && (w = s(f.headers) ? "json" : "text"), w === "json") {
1100
- const A = await f.text();
1101
- return A.length ? JSON.parse(A) : null;
1102
- }
1103
- return f.text();
1104
- }
1105
- }
1106
- var Qt = class {
1107
- constructor(e, t = void 0) {
1108
- this.value = e, this.meta = t;
1109
- }
1110
- }, $e = /* @__PURE__ */ ye("__rtkq/focused"), yt = /* @__PURE__ */ ye("__rtkq/unfocused"), Ue = /* @__PURE__ */ ye("__rtkq/online"), ht = /* @__PURE__ */ ye("__rtkq/offline"), Je = !1;
1111
- function fr(e, t) {
1112
- function n() {
1113
- const r = () => e($e()), s = () => e(yt()), d = () => e(Ue()), p = () => e(ht()), g = () => {
1114
- window.document.visibilityState === "visible" ? r() : s();
1115
- };
1116
- return Je || typeof window < "u" && window.addEventListener && (window.addEventListener("visibilitychange", g, !1), window.addEventListener("focus", r, !1), window.addEventListener("online", d, !1), window.addEventListener("offline", p, !1), Je = !0), () => {
1117
- window.removeEventListener("focus", r), window.removeEventListener("visibilitychange", g), window.removeEventListener("online", d), window.removeEventListener("offline", p), Je = !1;
1118
- };
1119
- }
1120
- return n();
1121
- }
1122
- function Ke(e) {
1123
- return e.type === "query";
1124
- }
1125
- function Vn(e) {
1126
- return e.type === "mutation";
1127
- }
1128
- function Ie(e) {
1129
- return e.type === "infinitequery";
1130
- }
1131
- function ze(e) {
1132
- return Ke(e) || Ie(e);
1133
- }
1134
- function mt(e, t, n, r, s, d) {
1135
- return Wn(e) ? e(t, n, r, s).filter(je).map(st).map(d) : Array.isArray(e) ? e.map(st).map(d) : [];
1136
- }
1137
- function Wn(e) {
1138
- return typeof e == "function";
1139
- }
1140
- function st(e) {
1141
- return typeof e == "string" ? {
1142
- type: e
1143
- } : e;
1144
- }
1145
- function Ln(e, t) {
1146
- return e.catch(t);
1147
- }
1148
- var Pe = Symbol("forceQueryFn"), ot = (e) => typeof e[Pe] == "function";
1149
- function Bn({
1150
- serializeQueryArgs: e,
1151
- queryThunk: t,
1152
- infiniteQueryThunk: n,
1153
- mutationThunk: r,
1154
- api: s,
1155
- context: d,
1156
- internalState: p
1157
- }) {
1158
- const {
1159
- runningQueries: g,
1160
- runningMutations: T
1161
- } = p, {
1162
- unsubscribeQueryResult: I,
1163
- removeMutationResult: D,
1164
- updateSubscriptionOptions: R
1165
- } = s.internalActions;
1166
- return {
1167
- buildInitiateQuery: v,
1168
- buildInitiateInfiniteQuery: i,
1169
- buildInitiateMutation: a,
1170
- getRunningQueryThunk: f,
1171
- getRunningMutationThunk: w,
1172
- getRunningQueriesThunk: A,
1173
- getRunningMutationsThunk: b
1174
- };
1175
- function f(m, E) {
1176
- return (P) => {
1177
- const O = d.endpointDefinitions[m], S = e({
1178
- queryArgs: E,
1179
- endpointDefinition: O,
1180
- endpointName: m
1181
- });
1182
- return g.get(P)?.[S];
1183
- };
1184
- }
1185
- function w(m, E) {
1186
- return (P) => T.get(P)?.[E];
1187
- }
1188
- function A() {
1189
- return (m) => Object.values(g.get(m) || {}).filter(je);
1190
- }
1191
- function b() {
1192
- return (m) => Object.values(T.get(m) || {}).filter(je);
1193
- }
1194
- function u(m) {
1195
- if (process.env.NODE_ENV !== "production") {
1196
- if (u.triggered) return;
1197
- const E = m(s.internalActions.internal_getRTKQSubscriptions());
1198
- if (u.triggered = !0, typeof E != "object" || typeof E?.type == "string")
1199
- throw new Error(process.env.NODE_ENV === "production" ? Qe(34) : `Warning: Middleware for RTK-Query API at reducerPath "${s.reducerPath}" has not been added to the store.
1200
- You must add the middleware for RTK-Query to function correctly!`);
1201
- }
1202
- }
1203
- function c(m, E) {
1204
- const P = (O, {
1205
- subscribe: S = !0,
1206
- forceRefetch: y,
1207
- subscriptionOptions: o,
1208
- [Pe]: l,
1209
- ...h
1210
- } = {}) => (_, N) => {
1211
- const q = e({
1212
- queryArgs: O,
1213
- endpointDefinition: E,
1214
- endpointName: m
1215
- });
1216
- let z;
1217
- const Q = {
1218
- ...h,
1219
- type: "query",
1220
- subscribe: S,
1221
- forceRefetch: y,
1222
- subscriptionOptions: o,
1223
- endpointName: m,
1224
- originalArgs: O,
1225
- queryCacheKey: q,
1226
- [Pe]: l
1227
- };
1228
- if (Ke(E))
1229
- z = t(Q);
1230
- else {
1231
- const {
1232
- direction: k,
1233
- initialPageParam: M
1234
- } = h;
1235
- z = n({
1236
- ...Q,
1237
- // Supply these even if undefined. This helps with a field existence
1238
- // check over in `buildSlice.ts`
1239
- direction: k,
1240
- initialPageParam: M
1241
- });
1242
- }
1243
- const C = s.endpoints[m].select(O), F = _(z), K = C(N());
1244
- u(_);
1245
- const {
1246
- requestId: L,
1247
- abort: $
1248
- } = F, j = K.requestId !== L, x = g.get(_)?.[q], U = () => C(N()), V = Object.assign(l ? (
1249
- // a query has been forced (upsertQueryData)
1250
- // -> we want to resolve it once data has been written with the data that will be written
1251
- F.then(U)
1252
- ) : j && !x ? (
1253
- // a query has been skipped due to a condition and we do not have any currently running query
1254
- // -> we want to resolve it immediately with the current data
1255
- Promise.resolve(K)
1256
- ) : (
1257
- // query just started or one is already in flight
1258
- // -> wait for the running query, then resolve with data from after that
1259
- Promise.all([x, F]).then(U)
1260
- ), {
1261
- arg: O,
1262
- requestId: L,
1263
- subscriptionOptions: o,
1264
- queryCacheKey: q,
1265
- abort: $,
1266
- async unwrap() {
1267
- const k = await V;
1268
- if (k.isError)
1269
- throw k.error;
1270
- return k.data;
1271
- },
1272
- refetch: () => _(P(O, {
1273
- subscribe: !1,
1274
- forceRefetch: !0
1275
- })),
1276
- unsubscribe() {
1277
- S && _(I({
1278
- queryCacheKey: q,
1279
- requestId: L
1280
- }));
1281
- },
1282
- updateSubscriptionOptions(k) {
1283
- V.subscriptionOptions = k, _(R({
1284
- endpointName: m,
1285
- requestId: L,
1286
- queryCacheKey: q,
1287
- options: k
1288
- }));
1289
- }
1290
- });
1291
- if (!x && !j && !l) {
1292
- const k = $n(g, _, {});
1293
- k[q] = V, V.then(() => {
1294
- delete k[q], He(k) || g.delete(_);
1295
- });
1296
- }
1297
- return V;
1298
- };
1299
- return P;
1300
- }
1301
- function v(m, E) {
1302
- return c(m, E);
1303
- }
1304
- function i(m, E) {
1305
- return c(m, E);
1306
- }
1307
- function a(m) {
1308
- return (E, {
1309
- track: P = !0,
1310
- fixedCacheKey: O
1311
- } = {}) => (S, y) => {
1312
- const o = r({
1313
- type: "mutation",
1314
- endpointName: m,
1315
- originalArgs: E,
1316
- track: P,
1317
- fixedCacheKey: O
1318
- }), l = S(o);
1319
- u(S);
1320
- const {
1321
- requestId: h,
1322
- abort: _,
1323
- unwrap: N
1324
- } = l, q = Ln(l.unwrap().then((F) => ({
1325
- data: F
1326
- })), (F) => ({
1327
- error: F
1328
- })), z = () => {
1329
- S(D({
1330
- requestId: h,
1331
- fixedCacheKey: O
1332
- }));
1333
- }, Q = Object.assign(q, {
1334
- arg: l.arg,
1335
- requestId: h,
1336
- abort: _,
1337
- unwrap: N,
1338
- reset: z
1339
- }), C = T.get(S) || {};
1340
- return T.set(S, C), C[h] = Q, Q.then(() => {
1341
- delete C[h], He(C) || T.delete(S);
1342
- }), O && (C[O] = Q, Q.then(() => {
1343
- C[O] === Q && (delete C[O], He(C) || T.delete(S));
1344
- })), Q;
1345
- };
1346
- }
1347
- }
1348
- var Zt = class extends bn {
1349
- constructor(e, t, n, r) {
1350
- super(e), this.value = t, this.schemaName = n, this._bqMeta = r;
1351
- }
1352
- }, re = (e, t) => Array.isArray(e) ? e.includes(t) : !!e;
1353
- async function ie(e, t, n, r) {
1354
- const s = await e["~standard"].validate(t);
1355
- if (s.issues)
1356
- throw new Zt(s.issues, t, n, r);
1357
- return s.value;
1358
- }
1359
- function qt(e) {
1360
- return e;
1361
- }
1362
- var ge = (e = {}) => ({
1363
- ...e,
1364
- [Kt]: !0
1365
- });
1366
- function Hn({
1367
- reducerPath: e,
1368
- baseQuery: t,
1369
- context: {
1370
- endpointDefinitions: n
1371
- },
1372
- serializeQueryArgs: r,
1373
- api: s,
1374
- assertTagType: d,
1375
- selectors: p,
1376
- onSchemaFailure: g,
1377
- catchSchemaFailure: T,
1378
- skipSchemaValidation: I
1379
- }) {
1380
- const D = (o, l, h, _) => (N, q) => {
1381
- const z = n[o], Q = r({
1382
- queryArgs: l,
1383
- endpointDefinition: z,
1384
- endpointName: o
1385
- });
1386
- if (N(s.internalActions.queryResultPatched({
1387
- queryCacheKey: Q,
1388
- patches: h
1389
- })), !_)
1390
- return;
1391
- const C = s.endpoints[o].select(l)(
1392
- // Work around TS 4.1 mismatch
1393
- q()
1394
- ), F = mt(z.providesTags, C.data, void 0, l, {}, d);
1395
- N(s.internalActions.updateProvidedBy([{
1396
- queryCacheKey: Q,
1397
- providedTags: F
1398
- }]));
1399
- };
1400
- function R(o, l, h = 0) {
1401
- const _ = [l, ...o];
1402
- return h && _.length > h ? _.slice(0, -1) : _;
1403
- }
1404
- function f(o, l, h = 0) {
1405
- const _ = [...o, l];
1406
- return h && _.length > h ? _.slice(1) : _;
1407
- }
1408
- const w = (o, l, h, _ = !0) => (N, q) => {
1409
- const Q = s.endpoints[o].select(l)(
1410
- // Work around TS 4.1 mismatch
1411
- q()
1412
- ), C = {
1413
- patches: [],
1414
- inversePatches: [],
1415
- undo: () => N(s.util.patchQueryData(o, l, C.inversePatches, _))
1416
- };
1417
- if (Q.status === "uninitialized")
1418
- return C;
1419
- let F;
1420
- if ("data" in Q)
1421
- if (ee(Q.data)) {
1422
- const [K, L, $] = Gt(Q.data, h);
1423
- C.patches.push(...L), C.inversePatches.push(...$), F = K;
1424
- } else
1425
- F = h(Q.data), C.patches.push({
1426
- op: "replace",
1427
- path: [],
1428
- value: F
1429
- }), C.inversePatches.push({
1430
- op: "replace",
1431
- path: [],
1432
- value: Q.data
1433
- });
1434
- return C.patches.length === 0 || N(s.util.patchQueryData(o, l, C.patches, _)), C;
1435
- }, A = (o, l, h) => (_) => _(s.endpoints[o].initiate(l, {
1436
- subscribe: !1,
1437
- forceRefetch: !0,
1438
- [Pe]: () => ({
1439
- data: h
1440
- })
1441
- })), b = (o, l) => o.query && o[l] ? o[l] : qt, u = async (o, {
1442
- signal: l,
1443
- abort: h,
1444
- rejectWithValue: _,
1445
- fulfillWithValue: N,
1446
- dispatch: q,
1447
- getState: z,
1448
- extra: Q
1449
- }) => {
1450
- const C = n[o.endpointName], {
1451
- metaSchema: F,
1452
- skipSchemaValidation: K = I
1453
- } = C;
1454
- try {
1455
- let L = qt;
1456
- const $ = {
1457
- signal: l,
1458
- abort: h,
1459
- dispatch: q,
1460
- getState: z,
1461
- extra: Q,
1462
- endpoint: o.endpointName,
1463
- type: o.type,
1464
- forced: o.type === "query" ? c(o, z()) : void 0,
1465
- queryCacheKey: o.type === "query" ? o.queryCacheKey : void 0
1466
- }, j = o.type === "query" ? o[Pe] : void 0;
1467
- let x;
1468
- const U = async (k, M, B, le) => {
1469
- if (M == null && k.pages.length)
1470
- return Promise.resolve({
1471
- data: k
1472
- });
1473
- const te = {
1474
- queryArg: o.originalArgs,
1475
- pageParam: M
1476
- }, fe = await V(te), G = le ? R : f;
1477
- return {
1478
- data: {
1479
- pages: G(k.pages, fe.data, B),
1480
- pageParams: G(k.pageParams, M, B)
1481
- },
1482
- meta: fe.meta
1483
- };
1484
- };
1485
- async function V(k) {
1486
- let M;
1487
- const {
1488
- extraOptions: B,
1489
- argSchema: le,
1490
- rawResponseSchema: te,
1491
- responseSchema: fe
1492
- } = C;
1493
- if (le && !re(K, "arg") && (k = await ie(
1494
- le,
1495
- k,
1496
- "argSchema",
1497
- {}
1498
- // we don't have a meta yet, so we can't pass it
1499
- )), j ? M = j() : C.query ? (L = b(C, "transformResponse"), M = await t(C.query(k), $, B)) : M = await C.queryFn(k, $, B, (J) => t(J, $, B)), typeof process < "u" && process.env.NODE_ENV === "development") {
1500
- const J = C.query ? "`baseQuery`" : "`queryFn`";
1501
- let Y;
1502
- if (!M)
1503
- Y = `${J} did not return anything.`;
1504
- else if (typeof M != "object")
1505
- Y = `${J} did not return an object.`;
1506
- else if (M.error && M.data)
1507
- Y = `${J} returned an object containing both \`error\` and \`result\`.`;
1508
- else if (M.error === void 0 && M.data === void 0)
1509
- Y = `${J} returned an object containing neither a valid \`error\` and \`result\`. At least one of them should not be \`undefined\``;
1510
- else
1511
- for (const de of Object.keys(M))
1512
- if (de !== "error" && de !== "data" && de !== "meta") {
1513
- Y = `The object returned by ${J} has the unknown property ${de}.`;
1514
- break;
1515
- }
1516
- Y && console.error(`Error encountered handling the endpoint ${o.endpointName}.
1517
- ${Y}
1518
- It needs to return an object with either the shape \`{ data: <value> }\` or \`{ error: <value> }\` that may contain an optional \`meta\` property.
1519
- Object returned was:`, M);
1520
- }
1521
- if (M.error) throw new Qt(M.error, M.meta);
1522
- let {
1523
- data: G
1524
- } = M;
1525
- te && !re(K, "rawResponse") && (G = await ie(te, M.data, "rawResponseSchema", M.meta));
1526
- let ne = await L(G, M.meta, k);
1527
- return fe && !re(K, "response") && (ne = await ie(fe, ne, "responseSchema", M.meta)), {
1528
- ...M,
1529
- data: ne
1530
- };
1531
- }
1532
- if (o.type === "query" && "infiniteQueryOptions" in C) {
1533
- const {
1534
- infiniteQueryOptions: k
1535
- } = C, {
1536
- maxPages: M = 1 / 0
1537
- } = k;
1538
- let B;
1539
- const le = {
1540
- pages: [],
1541
- pageParams: []
1542
- }, te = p.selectQueryEntry(z(), o.queryCacheKey)?.data, G = /* arg.forceRefetch */ c(o, z()) && !o.direction || !te ? le : te;
1543
- if ("direction" in o && o.direction && G.pages.length) {
1544
- const ne = o.direction === "backward", Y = (ne ? en : at)(k, G, o.originalArgs);
1545
- B = await U(G, Y, M, ne);
1546
- } else {
1547
- const {
1548
- initialPageParam: ne = k.initialPageParam
1549
- } = o, J = te?.pageParams ?? [], Y = J[0] ?? ne, de = J.length;
1550
- B = await U(G, Y, M), j && (B = {
1551
- data: B.data.pages[0]
1552
- });
1553
- for (let gt = 1; gt < de; gt++) {
1554
- const rn = at(k, B.data, o.originalArgs);
1555
- B = await U(B.data, rn, M);
1556
- }
1557
- }
1558
- x = B;
1559
- } else
1560
- x = await V(o.originalArgs);
1561
- return F && !re(K, "meta") && x.meta && (x.meta = await ie(F, x.meta, "metaSchema", x.meta)), N(x.data, ge({
1562
- fulfilledTimeStamp: Date.now(),
1563
- baseQueryMeta: x.meta
1564
- }));
1565
- } catch (L) {
1566
- let $ = L;
1567
- if ($ instanceof Qt) {
1568
- let j = b(C, "transformErrorResponse");
1569
- const {
1570
- rawErrorResponseSchema: x,
1571
- errorResponseSchema: U
1572
- } = C;
1573
- let {
1574
- value: V,
1575
- meta: k
1576
- } = $;
1577
- try {
1578
- x && !re(K, "rawErrorResponse") && (V = await ie(x, V, "rawErrorResponseSchema", k)), F && !re(K, "meta") && (k = await ie(F, k, "metaSchema", k));
1579
- let M = await j(V, k, o.originalArgs);
1580
- return U && !re(K, "errorResponse") && (M = await ie(U, M, "errorResponseSchema", k)), _(M, ge({
1581
- baseQueryMeta: k
1582
- }));
1583
- } catch (M) {
1584
- $ = M;
1585
- }
1586
- }
1587
- try {
1588
- if ($ instanceof Zt) {
1589
- const j = {
1590
- endpoint: o.endpointName,
1591
- arg: o.originalArgs,
1592
- type: o.type,
1593
- queryCacheKey: o.type === "query" ? o.queryCacheKey : void 0
1594
- };
1595
- C.onSchemaFailure?.($, j), g?.($, j);
1596
- const {
1597
- catchSchemaFailure: x = T
1598
- } = C;
1599
- if (x)
1600
- return _(x($, j), ge({
1601
- baseQueryMeta: $._bqMeta
1602
- }));
1603
- }
1604
- } catch (j) {
1605
- $ = j;
1606
- }
1607
- throw typeof process < "u" && process.env.NODE_ENV !== "production" ? console.error(`An unhandled error occurred processing a request for the endpoint "${o.endpointName}".
1608
- In the case of an unhandled error, no tags will be "provided" or "invalidated".`, $) : console.error($), $;
1609
- }
1610
- };
1611
- function c(o, l) {
1612
- const h = p.selectQueryEntry(l, o.queryCacheKey), _ = p.selectConfig(l).refetchOnMountOrArgChange, N = h?.fulfilledTimeStamp, q = o.forceRefetch ?? (o.subscribe && _);
1613
- return q ? q === !0 || (Number(/* @__PURE__ */ new Date()) - Number(N)) / 1e3 >= q : !1;
1614
- }
1615
- const v = () => vt(`${e}/executeQuery`, u, {
1616
- getPendingMeta({
1617
- arg: l
1618
- }) {
1619
- const h = n[l.endpointName];
1620
- return ge({
1621
- startedTimeStamp: Date.now(),
1622
- ...Ie(h) ? {
1623
- direction: l.direction
1624
- } : {}
1625
- });
1626
- },
1627
- condition(l, {
1628
- getState: h
1629
- }) {
1630
- const _ = h(), N = p.selectQueryEntry(_, l.queryCacheKey), q = N?.fulfilledTimeStamp, z = l.originalArgs, Q = N?.originalArgs, C = n[l.endpointName], F = l.direction;
1631
- return ot(l) ? !0 : N?.status === "pending" ? !1 : c(l, _) || Ke(C) && C?.forceRefetch?.({
1632
- currentArg: z,
1633
- previousArg: Q,
1634
- endpointState: N,
1635
- state: _
1636
- }) ? !0 : !(q && !F);
1637
- },
1638
- dispatchConditionRejection: !0
1639
- }), i = v(), a = v(), m = vt(`${e}/executeMutation`, u, {
1640
- getPendingMeta() {
1641
- return ge({
1642
- startedTimeStamp: Date.now()
1643
- });
1644
- }
1645
- }), E = (o) => "force" in o, P = (o) => "ifOlderThan" in o, O = (o, l, h) => (_, N) => {
1646
- const q = E(h) && h.force, z = P(h) && h.ifOlderThan, Q = (F = !0) => {
1647
- const K = {
1648
- forceRefetch: F,
1649
- isPrefetch: !0
1650
- };
1651
- return s.endpoints[o].initiate(l, K);
1652
- }, C = s.endpoints[o].select(l)(N());
1653
- if (q)
1654
- _(Q());
1655
- else if (z) {
1656
- const F = C?.fulfilledTimeStamp;
1657
- if (!F) {
1658
- _(Q());
1659
- return;
1660
- }
1661
- (Number(/* @__PURE__ */ new Date()) - Number(new Date(F))) / 1e3 >= z && _(Q());
1662
- } else
1663
- _(Q(!1));
1664
- };
1665
- function S(o) {
1666
- return (l) => l?.meta?.arg?.endpointName === o;
1667
- }
1668
- function y(o, l) {
1669
- return {
1670
- matchPending: Ve(Vt(o), S(l)),
1671
- matchFulfilled: Ve(oe(o), S(l)),
1672
- matchRejected: Ve(lt(o), S(l))
1673
- };
1674
- }
1675
- return {
1676
- queryThunk: i,
1677
- mutationThunk: m,
1678
- infiniteQueryThunk: a,
1679
- prefetch: O,
1680
- updateQueryData: w,
1681
- upsertQueryData: A,
1682
- patchQueryData: D,
1683
- buildMatchThunkActions: y
1684
- };
1685
- }
1686
- function at(e, {
1687
- pages: t,
1688
- pageParams: n
1689
- }, r) {
1690
- const s = t.length - 1;
1691
- return e.getNextPageParam(t[s], t, n[s], n, r);
1692
- }
1693
- function en(e, {
1694
- pages: t,
1695
- pageParams: n
1696
- }, r) {
1697
- return e.getPreviousPageParam?.(t[0], t, n[0], n, r);
1698
- }
1699
- function tn(e, t, n, r) {
1700
- return mt(n[e.meta.arg.endpointName][t], oe(e) ? e.payload : void 0, ut(e) ? e.payload : void 0, e.meta.arg.originalArgs, "baseQueryMeta" in e.meta ? e.meta.baseQueryMeta : void 0, r);
1701
- }
1702
- function Ne(e, t, n) {
1703
- const r = e[t];
1704
- r && n(r);
1705
- }
1706
- function Ae(e) {
1707
- return ("arg" in e ? e.arg.fixedCacheKey : e.fixedCacheKey) ?? e.requestId;
1708
- }
1709
- function Mt(e, t, n) {
1710
- const r = e[Ae(t)];
1711
- r && n(r);
1712
- }
1713
- var Ce = {};
1714
- function Jn({
1715
- reducerPath: e,
1716
- queryThunk: t,
1717
- mutationThunk: n,
1718
- serializeQueryArgs: r,
1719
- context: {
1720
- endpointDefinitions: s,
1721
- apiUid: d,
1722
- extractRehydrationInfo: p,
1723
- hasRehydrationInfo: g
1724
- },
1725
- assertTagType: T,
1726
- config: I
1727
- }) {
1728
- const D = ye(`${e}/resetApiState`);
1729
- function R(S, y, o, l) {
1730
- S[y.queryCacheKey] ??= {
1731
- status: "uninitialized",
1732
- endpointName: y.endpointName
1733
- }, Ne(S, y.queryCacheKey, (h) => {
1734
- h.status = "pending", h.requestId = o && h.requestId ? (
1735
- // for `upsertQuery` **updates**, keep the current `requestId`
1736
- h.requestId
1737
- ) : (
1738
- // for normal queries or `upsertQuery` **inserts** always update the `requestId`
1739
- l.requestId
1740
- ), y.originalArgs !== void 0 && (h.originalArgs = y.originalArgs), h.startedTimeStamp = l.startedTimeStamp;
1741
- const _ = s[l.arg.endpointName];
1742
- Ie(_) && "direction" in y && (h.direction = y.direction);
1743
- });
1744
- }
1745
- function f(S, y, o, l) {
1746
- Ne(S, y.arg.queryCacheKey, (h) => {
1747
- if (h.requestId !== y.requestId && !l) return;
1748
- const {
1749
- merge: _
1750
- } = s[y.arg.endpointName];
1751
- if (h.status = "fulfilled", _)
1752
- if (h.data !== void 0) {
1753
- const {
1754
- fulfilledTimeStamp: N,
1755
- arg: q,
1756
- baseQueryMeta: z,
1757
- requestId: Q
1758
- } = y;
1759
- let C = ct(h.data, (F) => _(F, o, {
1760
- arg: q.originalArgs,
1761
- baseQueryMeta: z,
1762
- fulfilledTimeStamp: N,
1763
- requestId: Q
1764
- }));
1765
- h.data = C;
1766
- } else
1767
- h.data = o;
1768
- else
1769
- h.data = s[y.arg.endpointName].structuralSharing ?? !0 ? Xt(Z(h.data) ? un(h.data) : h.data, o) : o;
1770
- delete h.error, h.fulfilledTimeStamp = y.fulfilledTimeStamp;
1771
- });
1772
- }
1773
- const w = pe({
1774
- name: `${e}/queries`,
1775
- initialState: Ce,
1776
- reducers: {
1777
- removeQueryResult: {
1778
- reducer(S, {
1779
- payload: {
1780
- queryCacheKey: y
1781
- }
1782
- }) {
1783
- delete S[y];
1784
- },
1785
- prepare: me()
1786
- },
1787
- cacheEntriesUpserted: {
1788
- reducer(S, y) {
1789
- for (const o of y.payload) {
1790
- const {
1791
- queryDescription: l,
1792
- value: h
1793
- } = o;
1794
- R(S, l, !0, {
1795
- arg: l,
1796
- requestId: y.meta.requestId,
1797
- startedTimeStamp: y.meta.timestamp
1798
- }), f(
1799
- S,
1800
- {
1801
- arg: l,
1802
- requestId: y.meta.requestId,
1803
- fulfilledTimeStamp: y.meta.timestamp,
1804
- baseQueryMeta: {}
1805
- },
1806
- h,
1807
- // We know we're upserting here
1808
- !0
1809
- );
1810
- }
1811
- },
1812
- prepare: (S) => ({
1813
- payload: S.map((l) => {
1814
- const {
1815
- endpointName: h,
1816
- arg: _,
1817
- value: N
1818
- } = l, q = s[h];
1819
- return {
1820
- queryDescription: {
1821
- type: "query",
1822
- endpointName: h,
1823
- originalArgs: l.arg,
1824
- queryCacheKey: r({
1825
- queryArgs: _,
1826
- endpointDefinition: q,
1827
- endpointName: h
1828
- })
1829
- },
1830
- value: N
1831
- };
1832
- }),
1833
- meta: {
1834
- [Kt]: !0,
1835
- requestId: Ut(),
1836
- timestamp: Date.now()
1837
- }
1838
- })
1839
- },
1840
- queryResultPatched: {
1841
- reducer(S, {
1842
- payload: {
1843
- queryCacheKey: y,
1844
- patches: o
1845
- }
1846
- }) {
1847
- Ne(S, y, (l) => {
1848
- l.data = Et(l.data, o.concat());
1849
- });
1850
- },
1851
- prepare: me()
1852
- }
1853
- },
1854
- extraReducers(S) {
1855
- S.addCase(t.pending, (y, {
1856
- meta: o,
1857
- meta: {
1858
- arg: l
1859
- }
1860
- }) => {
1861
- const h = ot(l);
1862
- R(y, l, h, o);
1863
- }).addCase(t.fulfilled, (y, {
1864
- meta: o,
1865
- payload: l
1866
- }) => {
1867
- const h = ot(o.arg);
1868
- f(y, o, l, h);
1869
- }).addCase(t.rejected, (y, {
1870
- meta: {
1871
- condition: o,
1872
- arg: l,
1873
- requestId: h
1874
- },
1875
- error: _,
1876
- payload: N
1877
- }) => {
1878
- Ne(y, l.queryCacheKey, (q) => {
1879
- if (!o) {
1880
- if (q.requestId !== h) return;
1881
- q.status = "rejected", q.error = N ?? _;
1882
- }
1883
- });
1884
- }).addMatcher(g, (y, o) => {
1885
- const {
1886
- queries: l
1887
- } = p(o);
1888
- for (const [h, _] of Object.entries(l))
1889
- // do not rehydrate entries that were currently in flight.
1890
- (_?.status === "fulfilled" || _?.status === "rejected") && (y[h] = _);
1891
- });
1892
- }
1893
- }), A = pe({
1894
- name: `${e}/mutations`,
1895
- initialState: Ce,
1896
- reducers: {
1897
- removeMutationResult: {
1898
- reducer(S, {
1899
- payload: y
1900
- }) {
1901
- const o = Ae(y);
1902
- o in S && delete S[o];
1903
- },
1904
- prepare: me()
1905
- }
1906
- },
1907
- extraReducers(S) {
1908
- S.addCase(n.pending, (y, {
1909
- meta: o,
1910
- meta: {
1911
- requestId: l,
1912
- arg: h,
1913
- startedTimeStamp: _
1914
- }
1915
- }) => {
1916
- h.track && (y[Ae(o)] = {
1917
- requestId: l,
1918
- status: "pending",
1919
- endpointName: h.endpointName,
1920
- startedTimeStamp: _
1921
- });
1922
- }).addCase(n.fulfilled, (y, {
1923
- payload: o,
1924
- meta: l
1925
- }) => {
1926
- l.arg.track && Mt(y, l, (h) => {
1927
- h.requestId === l.requestId && (h.status = "fulfilled", h.data = o, h.fulfilledTimeStamp = l.fulfilledTimeStamp);
1928
- });
1929
- }).addCase(n.rejected, (y, {
1930
- payload: o,
1931
- error: l,
1932
- meta: h
1933
- }) => {
1934
- h.arg.track && Mt(y, h, (_) => {
1935
- _.requestId === h.requestId && (_.status = "rejected", _.error = o ?? l);
1936
- });
1937
- }).addMatcher(g, (y, o) => {
1938
- const {
1939
- mutations: l
1940
- } = p(o);
1941
- for (const [h, _] of Object.entries(l))
1942
- // do not rehydrate entries that were currently in flight.
1943
- (_?.status === "fulfilled" || _?.status === "rejected") && // only rehydrate endpoints that were persisted using a `fixedCacheKey`
1944
- h !== _?.requestId && (y[h] = _);
1945
- });
1946
- }
1947
- }), b = {
1948
- tags: {},
1949
- keys: {}
1950
- }, u = pe({
1951
- name: `${e}/invalidation`,
1952
- initialState: b,
1953
- reducers: {
1954
- updateProvidedBy: {
1955
- reducer(S, y) {
1956
- for (const {
1957
- queryCacheKey: o,
1958
- providedTags: l
1959
- } of y.payload) {
1960
- c(S, o);
1961
- for (const {
1962
- type: h,
1963
- id: _
1964
- } of l) {
1965
- const N = (S.tags[h] ??= {})[_ || "__internal_without_id"] ??= [];
1966
- N.includes(o) || N.push(o);
1967
- }
1968
- S.keys[o] = l;
1969
- }
1970
- },
1971
- prepare: me()
1972
- }
1973
- },
1974
- extraReducers(S) {
1975
- S.addCase(w.actions.removeQueryResult, (y, {
1976
- payload: {
1977
- queryCacheKey: o
1978
- }
1979
- }) => {
1980
- c(y, o);
1981
- }).addMatcher(g, (y, o) => {
1982
- const {
1983
- provided: l
1984
- } = p(o);
1985
- for (const [h, _] of Object.entries(l.tags ?? {}))
1986
- for (const [N, q] of Object.entries(_)) {
1987
- const z = (y.tags[h] ??= {})[N || "__internal_without_id"] ??= [];
1988
- for (const Q of q)
1989
- z.includes(Q) || z.push(Q), y.keys[Q] = l.keys[Q];
1990
- }
1991
- }).addMatcher(qe(oe(t), ut(t)), (y, o) => {
1992
- v(y, [o]);
1993
- }).addMatcher(w.actions.cacheEntriesUpserted.match, (y, o) => {
1994
- const l = o.payload.map(({
1995
- queryDescription: h,
1996
- value: _
1997
- }) => ({
1998
- type: "UNKNOWN",
1999
- payload: _,
2000
- meta: {
2001
- requestStatus: "fulfilled",
2002
- requestId: "UNKNOWN",
2003
- arg: h
2004
- }
2005
- }));
2006
- v(y, l);
2007
- });
2008
- }
2009
- });
2010
- function c(S, y) {
2011
- const o = S.keys[y] ?? [];
2012
- for (const l of o) {
2013
- const h = l.type, _ = l.id ?? "__internal_without_id", N = S.tags[h]?.[_];
2014
- N && (S.tags[h][_] = N.filter((q) => q !== y));
2015
- }
2016
- delete S.keys[y];
2017
- }
2018
- function v(S, y) {
2019
- const o = y.map((l) => {
2020
- const h = tn(l, "providesTags", s, T), {
2021
- queryCacheKey: _
2022
- } = l.meta.arg;
2023
- return {
2024
- queryCacheKey: _,
2025
- providedTags: h
2026
- };
2027
- });
2028
- u.caseReducers.updateProvidedBy(S, u.actions.updateProvidedBy(o));
2029
- }
2030
- const i = pe({
2031
- name: `${e}/subscriptions`,
2032
- initialState: Ce,
2033
- reducers: {
2034
- updateSubscriptionOptions(S, y) {
2035
- },
2036
- unsubscribeQueryResult(S, y) {
2037
- },
2038
- internal_getRTKQSubscriptions() {
2039
- }
2040
- }
2041
- }), a = pe({
2042
- name: `${e}/internalSubscriptions`,
2043
- initialState: Ce,
2044
- reducers: {
2045
- subscriptionsUpdated: {
2046
- reducer(S, y) {
2047
- return Et(S, y.payload);
2048
- },
2049
- prepare: me()
2050
- }
2051
- }
2052
- }), m = pe({
2053
- name: `${e}/config`,
2054
- initialState: {
2055
- online: Fn(),
2056
- focused: kn(),
2057
- middlewareRegistered: !1,
2058
- ...I
2059
- },
2060
- reducers: {
2061
- middlewareRegistered(S, {
2062
- payload: y
2063
- }) {
2064
- S.middlewareRegistered = S.middlewareRegistered === "conflict" || d !== y ? "conflict" : !0;
2065
- }
2066
- },
2067
- extraReducers: (S) => {
2068
- S.addCase(Ue, (y) => {
2069
- y.online = !0;
2070
- }).addCase(ht, (y) => {
2071
- y.online = !1;
2072
- }).addCase($e, (y) => {
2073
- y.focused = !0;
2074
- }).addCase(yt, (y) => {
2075
- y.focused = !1;
2076
- }).addMatcher(g, (y) => ({
2077
- ...y
2078
- }));
2079
- }
2080
- }), E = on({
2081
- queries: w.reducer,
2082
- mutations: A.reducer,
2083
- provided: u.reducer,
2084
- subscriptions: a.reducer,
2085
- config: m.reducer
2086
- }), P = (S, y) => E(D.match(y) ? void 0 : S, y), O = {
2087
- ...m.actions,
2088
- ...w.actions,
2089
- ...i.actions,
2090
- ...a.actions,
2091
- ...A.actions,
2092
- ...u.actions,
2093
- resetApiState: D
2094
- };
2095
- return {
2096
- reducer: P,
2097
- actions: O
2098
- };
2099
- }
2100
- var Ye = /* @__PURE__ */ Symbol.for("RTKQ/skipToken"), nn = {
2101
- status: "uninitialized"
2102
- /* uninitialized */
2103
- }, kt = /* @__PURE__ */ ct(nn, () => {
2104
- }), Ft = /* @__PURE__ */ ct(nn, () => {
2105
- });
2106
- function Yn({
2107
- serializeQueryArgs: e,
2108
- reducerPath: t,
2109
- createSelector: n
2110
- }) {
2111
- const r = (i) => kt, s = (i) => Ft;
2112
- return {
2113
- buildQuerySelector: f,
2114
- buildInfiniteQuerySelector: w,
2115
- buildMutationSelector: A,
2116
- selectInvalidatedBy: b,
2117
- selectCachedArgsForQuery: u,
2118
- selectApiState: p,
2119
- selectQueries: g,
2120
- selectMutations: I,
2121
- selectQueryEntry: T,
2122
- selectConfig: D
2123
- };
2124
- function d(i) {
2125
- return {
2126
- ...i,
2127
- ...It(i.status)
2128
- };
2129
- }
2130
- function p(i) {
2131
- const a = i[t];
2132
- if (process.env.NODE_ENV !== "production" && !a) {
2133
- if (p.triggered) return a;
2134
- p.triggered = !0, console.error(`Error: No data found at \`state.${t}\`. Did you forget to add the reducer to the store?`);
2135
- }
2136
- return a;
2137
- }
2138
- function g(i) {
2139
- return p(i)?.queries;
2140
- }
2141
- function T(i, a) {
2142
- return g(i)?.[a];
2143
- }
2144
- function I(i) {
2145
- return p(i)?.mutations;
2146
- }
2147
- function D(i) {
2148
- return p(i)?.config;
2149
- }
2150
- function R(i, a, m) {
2151
- return (E) => {
2152
- if (E === Ye)
2153
- return n(r, m);
2154
- const P = e({
2155
- queryArgs: E,
2156
- endpointDefinition: a,
2157
- endpointName: i
2158
- });
2159
- return n((S) => T(S, P) ?? kt, m);
2160
- };
2161
- }
2162
- function f(i, a) {
2163
- return R(i, a, d);
2164
- }
2165
- function w(i, a) {
2166
- const {
2167
- infiniteQueryOptions: m
2168
- } = a;
2169
- function E(P) {
2170
- const O = {
2171
- ...P,
2172
- ...It(P.status)
2173
- }, {
2174
- isLoading: S,
2175
- isError: y,
2176
- direction: o
2177
- } = O, l = o === "forward", h = o === "backward";
2178
- return {
2179
- ...O,
2180
- hasNextPage: c(m, O.data, O.originalArgs),
2181
- hasPreviousPage: v(m, O.data, O.originalArgs),
2182
- isFetchingNextPage: S && l,
2183
- isFetchingPreviousPage: S && h,
2184
- isFetchNextPageError: y && l,
2185
- isFetchPreviousPageError: y && h
2186
- };
2187
- }
2188
- return R(i, a, E);
2189
- }
2190
- function A() {
2191
- return (i) => {
2192
- let a;
2193
- return typeof i == "object" ? a = Ae(i) ?? Ye : a = i, n(a === Ye ? s : (P) => p(P)?.mutations?.[a] ?? Ft, d);
2194
- };
2195
- }
2196
- function b(i, a) {
2197
- const m = i[t], E = /* @__PURE__ */ new Set();
2198
- for (const P of a.filter(je).map(st)) {
2199
- const O = m.provided.tags[P.type];
2200
- if (!O)
2201
- continue;
2202
- let S = (P.id !== void 0 ? (
2203
- // id given: invalidate all queries that provide this type & id
2204
- O[P.id]
2205
- ) : (
2206
- // no id: invalidate all queries that provide this type
2207
- Tt(Object.values(O))
2208
- )) ?? [];
2209
- for (const y of S)
2210
- E.add(y);
2211
- }
2212
- return Tt(Array.from(E.values()).map((P) => {
2213
- const O = m.queries[P];
2214
- return O ? [{
2215
- queryCacheKey: P,
2216
- endpointName: O.endpointName,
2217
- originalArgs: O.originalArgs
2218
- }] : [];
2219
- }));
2220
- }
2221
- function u(i, a) {
2222
- return Object.values(g(i)).filter(
2223
- (m) => m?.endpointName === a && m.status !== "uninitialized"
2224
- /* uninitialized */
2225
- ).map((m) => m.originalArgs);
2226
- }
2227
- function c(i, a, m) {
2228
- return a ? at(i, a, m) != null : !1;
2229
- }
2230
- function v(i, a, m) {
2231
- return !a || !i.getPreviousPageParam ? !1 : en(i, a, m) != null;
2232
- }
2233
- }
2234
- var jt = WeakMap ? /* @__PURE__ */ new WeakMap() : void 0, zt = ({
2235
- endpointName: e,
2236
- queryArgs: t
2237
- }) => {
2238
- let n = "";
2239
- const r = jt?.get(t);
2240
- if (typeof r == "string")
2241
- n = r;
2242
- else {
2243
- const s = JSON.stringify(t, (d, p) => (p = typeof p == "bigint" ? {
2244
- $bigint: p.toString()
2245
- } : p, p = be(p) ? Object.keys(p).sort().reduce((g, T) => (g[T] = p[T], g), {}) : p, p));
2246
- be(t) && jt?.set(t, s), n = s;
2247
- }
2248
- return `${e}(${n})`;
2249
- };
2250
- function Gn(...e) {
2251
- return function(n) {
2252
- const r = Fe((I) => n.extractRehydrationInfo?.(I, {
2253
- reducerPath: n.reducerPath ?? "api"
2254
- })), s = {
2255
- reducerPath: "api",
2256
- keepUnusedDataFor: 60,
2257
- refetchOnMountOrArgChange: !1,
2258
- refetchOnFocus: !1,
2259
- refetchOnReconnect: !1,
2260
- invalidationBehavior: "delayed",
2261
- ...n,
2262
- extractRehydrationInfo: r,
2263
- serializeQueryArgs(I) {
2264
- let D = zt;
2265
- if ("serializeQueryArgs" in I.endpointDefinition) {
2266
- const R = I.endpointDefinition.serializeQueryArgs;
2267
- D = (f) => {
2268
- const w = R(f);
2269
- return typeof w == "string" ? w : zt({
2270
- ...f,
2271
- queryArgs: w
2272
- });
2273
- };
2274
- } else n.serializeQueryArgs && (D = n.serializeQueryArgs);
2275
- return D(I);
2276
- },
2277
- tagTypes: [...n.tagTypes || []]
2278
- }, d = {
2279
- endpointDefinitions: {},
2280
- batch(I) {
2281
- I();
2282
- },
2283
- apiUid: Ut(),
2284
- extractRehydrationInfo: r,
2285
- hasRehydrationInfo: Fe((I) => r(I) != null)
2286
- }, p = {
2287
- injectEndpoints: T,
2288
- enhanceEndpoints({
2289
- addTagTypes: I,
2290
- endpoints: D
2291
- }) {
2292
- if (I)
2293
- for (const R of I)
2294
- s.tagTypes.includes(R) || s.tagTypes.push(R);
2295
- if (D)
2296
- for (const [R, f] of Object.entries(D))
2297
- typeof f == "function" ? f(d.endpointDefinitions[R]) : Object.assign(d.endpointDefinitions[R] || {}, f);
2298
- return p;
2299
- }
2300
- }, g = e.map((I) => I.init(p, s, d));
2301
- function T(I) {
2302
- const D = I.endpoints({
2303
- query: (R) => ({
2304
- ...R,
2305
- type: "query"
2306
- /* query */
2307
- }),
2308
- mutation: (R) => ({
2309
- ...R,
2310
- type: "mutation"
2311
- /* mutation */
2312
- }),
2313
- infiniteQuery: (R) => ({
2314
- ...R,
2315
- type: "infinitequery"
2316
- /* infinitequery */
2317
- })
2318
- });
2319
- for (const [R, f] of Object.entries(D)) {
2320
- if (I.overrideExisting !== !0 && R in d.endpointDefinitions) {
2321
- if (I.overrideExisting === "throw")
2322
- throw new Error(process.env.NODE_ENV === "production" ? Qe(39) : `called \`injectEndpoints\` to override already-existing endpointName ${R} without specifying \`overrideExisting: true\``);
2323
- typeof process < "u" && process.env.NODE_ENV === "development" && console.error(`called \`injectEndpoints\` to override already-existing endpointName ${R} without specifying \`overrideExisting: true\``);
2324
- continue;
2325
- }
2326
- if (typeof process < "u" && process.env.NODE_ENV === "development" && Ie(f)) {
2327
- const {
2328
- infiniteQueryOptions: w
2329
- } = f, {
2330
- maxPages: A,
2331
- getPreviousPageParam: b
2332
- } = w;
2333
- if (typeof A == "number") {
2334
- if (A < 1)
2335
- throw new Error(process.env.NODE_ENV === "production" ? Qe(40) : `maxPages for endpoint '${R}' must be a number greater than 0`);
2336
- if (typeof b != "function")
2337
- throw new Error(process.env.NODE_ENV === "production" ? Qe(41) : `getPreviousPageParam for endpoint '${R}' must be a function if maxPages is used`);
2338
- }
2339
- }
2340
- d.endpointDefinitions[R] = f;
2341
- for (const w of g)
2342
- w.injectEndpoint(R, f);
2343
- }
2344
- return p;
2345
- }
2346
- return p.injectEndpoints({
2347
- endpoints: n.endpoints
2348
- });
2349
- };
2350
- }
2351
- function X(e, ...t) {
2352
- return Object.assign(e, ...t);
2353
- }
2354
- var Xn = ({
2355
- api: e,
2356
- queryThunk: t,
2357
- internalState: n,
2358
- mwApi: r
2359
- }) => {
2360
- const s = `${e.reducerPath}/subscriptions`;
2361
- let d = null, p = null;
2362
- const {
2363
- updateSubscriptionOptions: g,
2364
- unsubscribeQueryResult: T
2365
- } = e.internalActions, I = (b, u) => {
2366
- if (g.match(u)) {
2367
- const {
2368
- queryCacheKey: v,
2369
- requestId: i,
2370
- options: a
2371
- } = u.payload, m = b.get(v);
2372
- return m?.has(i) && m.set(i, a), !0;
2373
- }
2374
- if (T.match(u)) {
2375
- const {
2376
- queryCacheKey: v,
2377
- requestId: i
2378
- } = u.payload, a = b.get(v);
2379
- return a && a.delete(i), !0;
2380
- }
2381
- if (e.internalActions.removeQueryResult.match(u))
2382
- return b.delete(u.payload.queryCacheKey), !0;
2383
- if (t.pending.match(u)) {
2384
- const {
2385
- meta: {
2386
- arg: v,
2387
- requestId: i
2388
- }
2389
- } = u, a = rt(b, v.queryCacheKey, it);
2390
- return v.subscribe && a.set(i, v.subscriptionOptions ?? a.get(i) ?? {}), !0;
2391
- }
2392
- let c = !1;
2393
- if (t.rejected.match(u)) {
2394
- const {
2395
- meta: {
2396
- condition: v,
2397
- arg: i,
2398
- requestId: a
2399
- }
2400
- } = u;
2401
- if (v && i.subscribe) {
2402
- const m = rt(b, i.queryCacheKey, it);
2403
- m.set(a, i.subscriptionOptions ?? m.get(a) ?? {}), c = !0;
2404
- }
2405
- }
2406
- return c;
2407
- }, D = () => n.currentSubscriptions, w = {
2408
- getSubscriptions: D,
2409
- getSubscriptionCount: (b) => D().get(b)?.size ?? 0,
2410
- isRequestSubscribed: (b, u) => !!D()?.get(b)?.get(u)
2411
- };
2412
- function A(b) {
2413
- return JSON.parse(JSON.stringify(Object.fromEntries([...b].map(([u, c]) => [u, Object.fromEntries(c)]))));
2414
- }
2415
- return (b, u) => {
2416
- if (d || (d = A(n.currentSubscriptions)), e.util.resetApiState.match(b))
2417
- return d = {}, n.currentSubscriptions.clear(), p = null, [!0, !1];
2418
- if (e.internalActions.internal_getRTKQSubscriptions.match(b))
2419
- return [!1, w];
2420
- const c = I(n.currentSubscriptions, b);
2421
- let v = !0;
2422
- if (process.env.NODE_ENV === "test" && typeof b.type == "string" && b.type === `${e.reducerPath}/getPolling`)
2423
- return [!1, n.currentPolls];
2424
- if (c) {
2425
- p || (p = setTimeout(() => {
2426
- const m = A(n.currentSubscriptions), [, E] = Gt(d, () => m);
2427
- u.next(e.internalActions.subscriptionsUpdated(E)), d = m, p = null;
2428
- }, 500));
2429
- const i = typeof b.type == "string" && !!b.type.startsWith(s), a = t.rejected.match(b) && b.meta.condition && !!b.meta.arg.subscribe;
2430
- v = !i && !a;
2431
- }
2432
- return [v, !1];
2433
- };
2434
- }, Zn = 2147483647 / 1e3 - 1, er = ({
2435
- reducerPath: e,
2436
- api: t,
2437
- queryThunk: n,
2438
- context: r,
2439
- internalState: s,
2440
- selectors: {
2441
- selectQueryEntry: d,
2442
- selectConfig: p
2443
- },
2444
- getRunningQueryThunk: g,
2445
- mwApi: T
2446
- }) => {
2447
- const {
2448
- removeQueryResult: I,
2449
- unsubscribeQueryResult: D,
2450
- cacheEntriesUpserted: R
2451
- } = t.internalActions, f = s.runningQueries.get(T.dispatch), w = qe(D.match, n.fulfilled, n.rejected, R.match);
2452
- function A(i) {
2453
- const a = s.currentSubscriptions.get(i);
2454
- if (!a)
2455
- return !1;
2456
- const m = a.size > 0, E = f?.[i] !== void 0;
2457
- return m || E;
2458
- }
2459
- const b = {}, u = (i, a, m) => {
2460
- const E = a.getState(), P = p(E);
2461
- if (w(i)) {
2462
- let O;
2463
- if (R.match(i))
2464
- O = i.payload.map((S) => S.queryDescription.queryCacheKey);
2465
- else {
2466
- const {
2467
- queryCacheKey: S
2468
- } = D.match(i) ? i.payload : i.meta.arg;
2469
- O = [S];
2470
- }
2471
- c(O, a, P);
2472
- }
2473
- if (t.util.resetApiState.match(i))
2474
- for (const [O, S] of Object.entries(b))
2475
- S && clearTimeout(S), delete b[O];
2476
- if (r.hasRehydrationInfo(i)) {
2477
- const {
2478
- queries: O
2479
- } = r.extractRehydrationInfo(i);
2480
- c(Object.keys(O), a, P);
2481
- }
2482
- };
2483
- function c(i, a, m) {
2484
- const E = a.getState();
2485
- for (const P of i) {
2486
- const O = d(E, P);
2487
- O?.endpointName && v(P, O.endpointName, a, m);
2488
- }
2489
- }
2490
- function v(i, a, m, E) {
2491
- const O = r.endpointDefinitions[a]?.keepUnusedDataFor ?? E.keepUnusedDataFor;
2492
- if (O === 1 / 0)
2493
- return;
2494
- const S = Math.max(0, Math.min(O, Zn));
2495
- if (!A(i)) {
2496
- const y = b[i];
2497
- y && clearTimeout(y), b[i] = setTimeout(() => {
2498
- if (!A(i)) {
2499
- const o = d(m.getState(), i);
2500
- o?.endpointName && m.dispatch(g(o.endpointName, o.originalArgs))?.abort(), m.dispatch(I({
2501
- queryCacheKey: i
2502
- }));
2503
- }
2504
- delete b[i];
2505
- }, S * 1e3);
2506
- }
2507
- }
2508
- return u;
2509
- }, xt = new Error("Promise never resolved before cacheEntryRemoved."), tr = ({
2510
- api: e,
2511
- reducerPath: t,
2512
- context: n,
2513
- queryThunk: r,
2514
- mutationThunk: s,
2515
- internalState: d,
2516
- selectors: {
2517
- selectQueryEntry: p,
2518
- selectApiState: g
2519
- }
2520
- }) => {
2521
- const T = bt(r), I = bt(s), D = oe(r, s), R = {};
2522
- function f(c, v, i) {
2523
- const a = R[c];
2524
- a?.valueResolved && (a.valueResolved({
2525
- data: v,
2526
- meta: i
2527
- }), delete a.valueResolved);
2528
- }
2529
- function w(c) {
2530
- const v = R[c];
2531
- v && (delete R[c], v.cacheEntryRemoved());
2532
- }
2533
- const A = (c, v, i) => {
2534
- const a = b(c);
2535
- function m(E, P, O, S) {
2536
- const y = p(i, P), o = p(v.getState(), P);
2537
- !y && o && u(E, S, P, v, O);
2538
- }
2539
- if (r.pending.match(c))
2540
- m(c.meta.arg.endpointName, a, c.meta.requestId, c.meta.arg.originalArgs);
2541
- else if (e.internalActions.cacheEntriesUpserted.match(c))
2542
- for (const {
2543
- queryDescription: E,
2544
- value: P
2545
- } of c.payload) {
2546
- const {
2547
- endpointName: O,
2548
- originalArgs: S,
2549
- queryCacheKey: y
2550
- } = E;
2551
- m(O, y, c.meta.requestId, S), f(y, P, {});
2552
- }
2553
- else if (s.pending.match(c))
2554
- v.getState()[t].mutations[a] && u(c.meta.arg.endpointName, c.meta.arg.originalArgs, a, v, c.meta.requestId);
2555
- else if (D(c))
2556
- f(a, c.payload, c.meta.baseQueryMeta);
2557
- else if (e.internalActions.removeQueryResult.match(c) || e.internalActions.removeMutationResult.match(c))
2558
- w(a);
2559
- else if (e.util.resetApiState.match(c))
2560
- for (const E of Object.keys(R))
2561
- w(E);
2562
- };
2563
- function b(c) {
2564
- return T(c) ? c.meta.arg.queryCacheKey : I(c) ? c.meta.arg.fixedCacheKey ?? c.meta.requestId : e.internalActions.removeQueryResult.match(c) ? c.payload.queryCacheKey : e.internalActions.removeMutationResult.match(c) ? Ae(c.payload) : "";
2565
- }
2566
- function u(c, v, i, a, m) {
2567
- const E = n.endpointDefinitions[c], P = E?.onCacheEntryAdded;
2568
- if (!P) return;
2569
- const O = {}, S = new Promise((N) => {
2570
- O.cacheEntryRemoved = N;
2571
- }), y = Promise.race([new Promise((N) => {
2572
- O.valueResolved = N;
2573
- }), S.then(() => {
2574
- throw xt;
2575
- })]);
2576
- y.catch(() => {
2577
- }), R[i] = O;
2578
- const o = e.endpoints[c].select(ze(E) ? v : i), l = a.dispatch((N, q, z) => z), h = {
2579
- ...a,
2580
- getCacheEntry: () => o(a.getState()),
2581
- requestId: m,
2582
- extra: l,
2583
- updateCachedData: ze(E) ? (N) => a.dispatch(e.util.updateQueryData(c, v, N)) : void 0,
2584
- cacheDataLoaded: y,
2585
- cacheEntryRemoved: S
2586
- }, _ = P(v, h);
2587
- Promise.resolve(_).catch((N) => {
2588
- if (N !== xt)
2589
- throw N;
2590
- });
2591
- }
2592
- return A;
2593
- }, nr = ({
2594
- api: e,
2595
- context: {
2596
- apiUid: t
2597
- },
2598
- reducerPath: n
2599
- }) => (r, s) => {
2600
- e.util.resetApiState.match(r) && s.dispatch(e.internalActions.middlewareRegistered(t)), typeof process < "u" && process.env.NODE_ENV === "development" && e.internalActions.middlewareRegistered.match(r) && r.payload === t && s.getState()[n]?.config?.middlewareRegistered === "conflict" && console.warn(`There is a mismatch between slice and middleware for the reducerPath "${n}".
2601
- You can only have one api per reducer path, this will lead to crashes in various situations!${n === "api" ? `
2602
- If you have multiple apis, you *have* to specify the reducerPath option when using createApi!` : ""}`);
2603
- }, rr = ({
2604
- reducerPath: e,
2605
- context: t,
2606
- context: {
2607
- endpointDefinitions: n
2608
- },
2609
- mutationThunk: r,
2610
- queryThunk: s,
2611
- api: d,
2612
- assertTagType: p,
2613
- refetchQuery: g,
2614
- internalState: T
2615
- }) => {
2616
- const {
2617
- removeQueryResult: I
2618
- } = d.internalActions, D = qe(oe(r), ut(r)), R = qe(oe(r, s), lt(r, s));
2619
- let f = [];
2620
- const w = (u, c) => {
2621
- D(u) ? b(tn(u, "invalidatesTags", n, p), c) : R(u) ? b([], c) : d.util.invalidateTags.match(u) && b(mt(u.payload, void 0, void 0, void 0, void 0, p), c);
2622
- };
2623
- function A(u) {
2624
- const {
2625
- queries: c,
2626
- mutations: v
2627
- } = u;
2628
- for (const i of [c, v])
2629
- for (const a in i)
2630
- if (i[a]?.status === "pending") return !0;
2631
- return !1;
2632
- }
2633
- function b(u, c) {
2634
- const v = c.getState(), i = v[e];
2635
- if (f.push(...u), i.config.invalidationBehavior === "delayed" && A(i))
2636
- return;
2637
- const a = f;
2638
- if (f = [], a.length === 0) return;
2639
- const m = d.util.selectInvalidatedBy(v, a);
2640
- t.batch(() => {
2641
- const E = Array.from(m.values());
2642
- for (const {
2643
- queryCacheKey: P
2644
- } of E) {
2645
- const O = i.queries[P], S = rt(T.currentSubscriptions, P, it);
2646
- O && (S.size === 0 ? c.dispatch(I({
2647
- queryCacheKey: P
2648
- })) : O.status !== "uninitialized" && c.dispatch(g(O)));
2649
- }
2650
- });
2651
- }
2652
- return w;
2653
- }, ir = ({
2654
- reducerPath: e,
2655
- queryThunk: t,
2656
- api: n,
2657
- refetchQuery: r,
2658
- internalState: s
2659
- }) => {
2660
- const {
2661
- currentPolls: d,
2662
- currentSubscriptions: p
2663
- } = s, g = /* @__PURE__ */ new Set();
2664
- let T = null;
2665
- const I = (u, c) => {
2666
- (n.internalActions.updateSubscriptionOptions.match(u) || n.internalActions.unsubscribeQueryResult.match(u)) && D(u.payload.queryCacheKey, c), (t.pending.match(u) || t.rejected.match(u) && u.meta.condition) && D(u.meta.arg.queryCacheKey, c), (t.fulfilled.match(u) || t.rejected.match(u) && !u.meta.condition) && R(u.meta.arg, c), n.util.resetApiState.match(u) && (A(), T && (clearTimeout(T), T = null), g.clear());
2667
- };
2668
- function D(u, c) {
2669
- g.add(u), T || (T = setTimeout(() => {
2670
- for (const v of g)
2671
- f({
2672
- queryCacheKey: v
2673
- }, c);
2674
- g.clear(), T = null;
2675
- }, 0));
2676
- }
2677
- function R({
2678
- queryCacheKey: u
2679
- }, c) {
2680
- const v = c.getState()[e], i = v.queries[u], a = p.get(u);
2681
- if (!i || i.status === "uninitialized") return;
2682
- const {
2683
- lowestPollingInterval: m,
2684
- skipPollingIfUnfocused: E
2685
- } = b(a);
2686
- if (!Number.isFinite(m)) return;
2687
- const P = d.get(u);
2688
- P?.timeout && (clearTimeout(P.timeout), P.timeout = void 0);
2689
- const O = Date.now() + m;
2690
- d.set(u, {
2691
- nextPollTimestamp: O,
2692
- pollingInterval: m,
2693
- timeout: setTimeout(() => {
2694
- (v.config.focused || !E) && c.dispatch(r(i)), R({
2695
- queryCacheKey: u
2696
- }, c);
2697
- }, m)
2698
- });
2699
- }
2700
- function f({
2701
- queryCacheKey: u
2702
- }, c) {
2703
- const i = c.getState()[e].queries[u], a = p.get(u);
2704
- if (!i || i.status === "uninitialized")
2705
- return;
2706
- const {
2707
- lowestPollingInterval: m
2708
- } = b(a);
2709
- if (process.env.NODE_ENV === "test") {
2710
- const O = d.pollUpdateCounters ??= {};
2711
- O[u] ??= 0, O[u]++;
2712
- }
2713
- if (!Number.isFinite(m)) {
2714
- w(u);
2715
- return;
2716
- }
2717
- const E = d.get(u), P = Date.now() + m;
2718
- (!E || P < E.nextPollTimestamp) && R({
2719
- queryCacheKey: u
2720
- }, c);
2721
- }
2722
- function w(u) {
2723
- const c = d.get(u);
2724
- c?.timeout && clearTimeout(c.timeout), d.delete(u);
2725
- }
2726
- function A() {
2727
- for (const u of d.keys())
2728
- w(u);
2729
- }
2730
- function b(u = /* @__PURE__ */ new Map()) {
2731
- let c = !1, v = Number.POSITIVE_INFINITY;
2732
- for (const i of u.values())
2733
- i.pollingInterval && (v = Math.min(i.pollingInterval, v), c = i.skipPollingIfUnfocused || c);
2734
- return {
2735
- lowestPollingInterval: v,
2736
- skipPollingIfUnfocused: c
2737
- };
2738
- }
2739
- return I;
2740
- }, sr = ({
2741
- api: e,
2742
- context: t,
2743
- queryThunk: n,
2744
- mutationThunk: r
2745
- }) => {
2746
- const s = Vt(n, r), d = lt(n, r), p = oe(n, r), g = {};
2747
- return (I, D) => {
2748
- if (s(I)) {
2749
- const {
2750
- requestId: R,
2751
- arg: {
2752
- endpointName: f,
2753
- originalArgs: w
2754
- }
2755
- } = I.meta, A = t.endpointDefinitions[f], b = A?.onQueryStarted;
2756
- if (b) {
2757
- const u = {}, c = new Promise((m, E) => {
2758
- u.resolve = m, u.reject = E;
2759
- });
2760
- c.catch(() => {
2761
- }), g[R] = u;
2762
- const v = e.endpoints[f].select(ze(A) ? w : R), i = D.dispatch((m, E, P) => P), a = {
2763
- ...D,
2764
- getCacheEntry: () => v(D.getState()),
2765
- requestId: R,
2766
- extra: i,
2767
- updateCachedData: ze(A) ? (m) => D.dispatch(e.util.updateQueryData(f, w, m)) : void 0,
2768
- queryFulfilled: c
2769
- };
2770
- b(w, a);
2771
- }
2772
- } else if (p(I)) {
2773
- const {
2774
- requestId: R,
2775
- baseQueryMeta: f
2776
- } = I.meta;
2777
- g[R]?.resolve({
2778
- data: I.payload,
2779
- meta: f
2780
- }), delete g[R];
2781
- } else if (d(I)) {
2782
- const {
2783
- requestId: R,
2784
- rejectedWithValue: f,
2785
- baseQueryMeta: w
2786
- } = I.meta;
2787
- g[R]?.reject({
2788
- error: I.payload ?? I.error,
2789
- isUnhandledError: !f,
2790
- meta: w
2791
- }), delete g[R];
2792
- }
2793
- };
2794
- }, or = ({
2795
- reducerPath: e,
2796
- context: t,
2797
- api: n,
2798
- refetchQuery: r,
2799
- internalState: s
2800
- }) => {
2801
- const {
2802
- removeQueryResult: d
2803
- } = n.internalActions, p = (T, I) => {
2804
- $e.match(T) && g(I, "refetchOnFocus"), Ue.match(T) && g(I, "refetchOnReconnect");
2805
- };
2806
- function g(T, I) {
2807
- const D = T.getState()[e], R = D.queries, f = s.currentSubscriptions;
2808
- t.batch(() => {
2809
- for (const w of f.keys()) {
2810
- const A = R[w], b = f.get(w);
2811
- if (!b || !A) continue;
2812
- const u = [...b.values()];
2813
- (u.some((v) => v[I] === !0) || u.every((v) => v[I] === void 0) && D.config[I]) && (b.size === 0 ? T.dispatch(d({
2814
- queryCacheKey: w
2815
- })) : A.status !== "uninitialized" && T.dispatch(r(A)));
2816
- }
2817
- });
2818
- }
2819
- return p;
2820
- };
2821
- function ar(e) {
2822
- const {
2823
- reducerPath: t,
2824
- queryThunk: n,
2825
- api: r,
2826
- context: s,
2827
- internalState: d
2828
- } = e, {
2829
- apiUid: p
2830
- } = s, g = {
2831
- invalidateTags: ye(`${t}/invalidateTags`)
2832
- }, T = (f) => f.type.startsWith(`${t}/`), I = [nr, er, rr, ir, tr, sr];
2833
- return {
2834
- middleware: (f) => {
2835
- let w = !1;
2836
- const A = {
2837
- ...e,
2838
- internalState: d,
2839
- refetchQuery: R,
2840
- isThisApiSliceAction: T,
2841
- mwApi: f
2842
- }, b = I.map((v) => v(A)), u = Xn(A), c = or(A);
2843
- return (v) => (i) => {
2844
- if (!an(i))
2845
- return v(i);
2846
- w || (w = !0, f.dispatch(r.internalActions.middlewareRegistered(p)));
2847
- const a = {
2848
- ...f,
2849
- next: v
2850
- }, m = f.getState(), [E, P] = u(i, a, m);
2851
- let O;
2852
- if (E ? O = v(i) : O = P, f.getState()[t] && (c(i, a, m), T(i) || s.hasRehydrationInfo(i)))
2853
- for (const S of b)
2854
- S(i, a, m);
2855
- return O;
2856
- };
2857
- },
2858
- actions: g
2859
- };
2860
- function R(f) {
2861
- return e.api.endpoints[f.endpointName].initiate(f.originalArgs, {
2862
- subscribe: !1,
2863
- forceRefetch: !0
2864
- });
2865
- }
2866
- }
2867
- var $t = /* @__PURE__ */ Symbol(), cr = ({
2868
- createSelector: e = sn
2869
- } = {}) => ({
2870
- name: $t,
2871
- init(t, {
2872
- baseQuery: n,
2873
- tagTypes: r,
2874
- reducerPath: s,
2875
- serializeQueryArgs: d,
2876
- keepUnusedDataFor: p,
2877
- refetchOnMountOrArgChange: g,
2878
- refetchOnFocus: T,
2879
- refetchOnReconnect: I,
2880
- invalidationBehavior: D,
2881
- onSchemaFailure: R,
2882
- catchSchemaFailure: f,
2883
- skipSchemaValidation: w
2884
- }, A) {
2885
- vn();
2886
- const b = (U) => (typeof process < "u" && process.env.NODE_ENV === "development" && (r.includes(U.type) || console.error(`Tag type '${U.type}' was used, but not specified in \`tagTypes\`!`)), U);
2887
- Object.assign(t, {
2888
- reducerPath: s,
2889
- endpoints: {},
2890
- internalActions: {
2891
- onOnline: Ue,
2892
- onOffline: ht,
2893
- onFocus: $e,
2894
- onFocusLost: yt
2895
- },
2896
- util: {}
2897
- });
2898
- const u = Yn({
2899
- serializeQueryArgs: d,
2900
- reducerPath: s,
2901
- createSelector: e
2902
- }), {
2903
- selectInvalidatedBy: c,
2904
- selectCachedArgsForQuery: v,
2905
- buildQuerySelector: i,
2906
- buildInfiniteQuerySelector: a,
2907
- buildMutationSelector: m
2908
- } = u;
2909
- X(t.util, {
2910
- selectInvalidatedBy: c,
2911
- selectCachedArgsForQuery: v
2912
- });
2913
- const {
2914
- queryThunk: E,
2915
- infiniteQueryThunk: P,
2916
- mutationThunk: O,
2917
- patchQueryData: S,
2918
- updateQueryData: y,
2919
- upsertQueryData: o,
2920
- prefetch: l,
2921
- buildMatchThunkActions: h
2922
- } = Hn({
2923
- baseQuery: n,
2924
- reducerPath: s,
2925
- context: A,
2926
- api: t,
2927
- serializeQueryArgs: d,
2928
- assertTagType: b,
2929
- selectors: u,
2930
- onSchemaFailure: R,
2931
- catchSchemaFailure: f,
2932
- skipSchemaValidation: w
2933
- }), {
2934
- reducer: _,
2935
- actions: N
2936
- } = Jn({
2937
- context: A,
2938
- queryThunk: E,
2939
- mutationThunk: O,
2940
- serializeQueryArgs: d,
2941
- reducerPath: s,
2942
- assertTagType: b,
2943
- config: {
2944
- refetchOnFocus: T,
2945
- refetchOnReconnect: I,
2946
- refetchOnMountOrArgChange: g,
2947
- keepUnusedDataFor: p,
2948
- reducerPath: s,
2949
- invalidationBehavior: D
2950
- }
2951
- });
2952
- X(t.util, {
2953
- patchQueryData: S,
2954
- updateQueryData: y,
2955
- upsertQueryData: o,
2956
- prefetch: l,
2957
- resetApiState: N.resetApiState,
2958
- upsertQueryEntries: N.cacheEntriesUpserted
2959
- }), X(t.internalActions, N);
2960
- const q = {
2961
- currentSubscriptions: /* @__PURE__ */ new Map(),
2962
- currentPolls: /* @__PURE__ */ new Map(),
2963
- runningQueries: /* @__PURE__ */ new Map(),
2964
- runningMutations: /* @__PURE__ */ new Map()
2965
- }, {
2966
- buildInitiateQuery: z,
2967
- buildInitiateInfiniteQuery: Q,
2968
- buildInitiateMutation: C,
2969
- getRunningMutationThunk: F,
2970
- getRunningMutationsThunk: K,
2971
- getRunningQueriesThunk: L,
2972
- getRunningQueryThunk: $
2973
- } = Bn({
2974
- queryThunk: E,
2975
- mutationThunk: O,
2976
- infiniteQueryThunk: P,
2977
- api: t,
2978
- serializeQueryArgs: d,
2979
- context: A,
2980
- internalState: q
2981
- });
2982
- X(t.util, {
2983
- getRunningMutationThunk: F,
2984
- getRunningMutationsThunk: K,
2985
- getRunningQueryThunk: $,
2986
- getRunningQueriesThunk: L
2987
- });
2988
- const {
2989
- middleware: j,
2990
- actions: x
2991
- } = ar({
2992
- reducerPath: s,
2993
- context: A,
2994
- queryThunk: E,
2995
- mutationThunk: O,
2996
- infiniteQueryThunk: P,
2997
- api: t,
2998
- assertTagType: b,
2999
- selectors: u,
3000
- getRunningQueryThunk: $,
3001
- internalState: q
3002
- });
3003
- return X(t.util, x), X(t, {
3004
- reducer: _,
3005
- middleware: j
3006
- }), {
3007
- name: $t,
3008
- injectEndpoint(U, V) {
3009
- const k = t, M = k.endpoints[U] ??= {};
3010
- Ke(V) && X(M, {
3011
- name: U,
3012
- select: i(U, V),
3013
- initiate: z(U, V)
3014
- }, h(E, U)), Vn(V) && X(M, {
3015
- name: U,
3016
- select: m(),
3017
- initiate: C(U)
3018
- }, h(O, U)), Ie(V) && X(M, {
3019
- name: U,
3020
- select: a(U, V),
3021
- initiate: Q(U, V)
3022
- }, h(E, U));
3023
- }
3024
- };
3025
- }
3026
- });
3027
- cr();
3028
- export {
3029
- qn as Q,
3030
- Cn as a,
3031
- Gn as b,
3032
- cr as c,
3033
- Ye as d,
3034
- Xt as e,
3035
- lr as f,
3036
- fr as s
3037
- };
3038
- //# sourceMappingURL=rtk-query.modern-CjetfYPg.js.map