@ahoo-wang/fetcher-react 3.9.3 → 3.9.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.
package/dist/index.es.js CHANGED
@@ -1,78 +1,101 @@
1
- var Z = Object.defineProperty;
2
- var u = (r, e) => Z(r, "name", { value: e, configurable: !0 });
1
+ var te = Object.defineProperty;
2
+ var o = (r, e) => te(r, "name", { value: e, configurable: !0 });
3
3
  import { c as S } from "react/compiler-runtime";
4
- import { useRef as q, useEffect as C, useState as M, useCallback as Q, useMemo as U, useReducer as ee, useSyncExternalStore as te, createContext as re, useContext as ne } from "react";
5
- import { jsx as I, Fragment as z } from "react/jsx-runtime";
6
- import { nameGenerator as ce } from "@ahoo-wang/fetcher-eventbus";
7
- import { produce as se } from "immer";
8
- import { fetcherRegistrar as ue, getFetcher as oe, JsonResultExtractor as le } from "@ahoo-wang/fetcher";
9
- import { JsonEventStreamResultExtractor as ie } from "@ahoo-wang/fetcher-eventstream";
10
- function L(r) {
11
- const e = q(r);
4
+ import { useRef as L, useEffect as q, useState as P, useCallback as Q, useMemo as U, useReducer as re, useSyncExternalStore as ne, createContext as ce, useContext as se } from "react";
5
+ import { jsx as A, Fragment as k } from "react/jsx-runtime";
6
+ import { nameGenerator as oe } from "@ahoo-wang/fetcher-eventbus";
7
+ import { produce as ue } from "immer";
8
+ import { fetcherRegistrar as le, getFetcher as ie, JsonResultExtractor as ae } from "@ahoo-wang/fetcher";
9
+ import { JsonEventStreamResultExtractor as fe } from "@ahoo-wang/fetcher-eventstream";
10
+ function K(r) {
11
+ if (!r || r.length === 0)
12
+ throw new Error("Method name cannot be empty");
13
+ return `use${r.charAt(0).toUpperCase() + r.slice(1)}`;
14
+ }
15
+ o(K, "methodNameToHookName");
16
+ function V(r) {
17
+ const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ o((u) => {
18
+ Object.getOwnPropertyNames(u).forEach((c) => {
19
+ if (!t.has(c) && c !== "constructor") {
20
+ t.add(c);
21
+ const i = u[c];
22
+ typeof i == "function" && e.set(c, i.bind(r));
23
+ }
24
+ });
25
+ }, "processObject");
26
+ n(r);
27
+ let s = Object.getPrototypeOf(r);
28
+ for (; s && s !== Object.prototype; )
29
+ n(s), s = Object.getPrototypeOf(s);
30
+ return e;
31
+ }
32
+ o(V, "collectMethods");
33
+ function O(r) {
34
+ const e = L(r);
12
35
  return e.current = r, e;
13
36
  }
14
- u(L, "useLatest");
15
- function k(r, e) {
37
+ o(O, "useLatest");
38
+ function D(r, e) {
16
39
  const t = S(19);
17
40
  if (e.leading === !1 && e.trailing === !1)
18
41
  throw new Error("useDebouncedCallback: at least one of leading or trailing must be true");
19
- const n = q(void 0), s = q(null), o = q(null), c = L(r), i = L(e);
42
+ const n = L(void 0), s = L(null), u = L(null), c = O(r), i = O(e);
20
43
  let l;
21
- t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ u(() => {
44
+ t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ o(() => {
22
45
  n.current !== void 0 && (clearTimeout(n.current), n.current = void 0);
23
46
  }, "t0"), t[0] = l) : l = t[0];
24
47
  const m = l;
25
48
  let f;
26
- t[1] !== i ? (f = /* @__PURE__ */ u((p) => o.current ? p - o.current >= i.current.delay : !0, "t1"), t[1] = i, t[2] = f) : f = t[2];
49
+ t[1] !== i ? (f = /* @__PURE__ */ o((R) => u.current ? R - u.current >= i.current.delay : !0, "t1"), t[1] = i, t[2] = f) : f = t[2];
27
50
  const a = f;
28
51
  let d;
29
- t[3] !== c ? (d = /* @__PURE__ */ u((p, _) => {
30
- o.current = p, c.current(..._);
52
+ t[3] !== c ? (d = /* @__PURE__ */ o((R, _) => {
53
+ u.current = R, c.current(..._);
31
54
  }, "t2"), t[3] = c, t[4] = d) : d = t[4];
32
55
  const h = d;
33
56
  let y;
34
- t[5] !== h || t[6] !== i ? (y = /* @__PURE__ */ u(() => {
57
+ t[5] !== h || t[6] !== i ? (y = /* @__PURE__ */ o(() => {
35
58
  n.current = setTimeout(() => {
36
59
  if (s.current) {
37
- const p = Date.now();
38
- h(p, s.current);
60
+ const R = Date.now();
61
+ h(R, s.current);
39
62
  }
40
63
  n.current = void 0;
41
64
  }, i.current.delay);
42
65
  }, "t3"), t[5] = h, t[6] = i, t[7] = y) : y = t[7];
43
- const b = y;
44
- let E;
45
- t[8] !== h || t[9] !== i || t[10] !== b || t[11] !== a ? (E = /* @__PURE__ */ u((...p) => {
46
- const _ = p;
66
+ const E = y;
67
+ let x;
68
+ t[8] !== h || t[9] !== i || t[10] !== E || t[11] !== a ? (x = /* @__PURE__ */ o((...R) => {
69
+ const _ = R;
47
70
  m();
48
71
  const {
49
72
  leading: N,
50
73
  trailing: j
51
- } = i.current, G = N === void 0 ? !1 : N, K = j === void 0 ? !0 : j;
52
- if (s.current = _, K && !G) {
53
- b();
74
+ } = i.current, H = N === void 0 ? !1 : N, B = j === void 0 ? !0 : j;
75
+ if (s.current = _, B && !H) {
76
+ E();
54
77
  return;
55
78
  }
56
- const V = Date.now();
57
- if (G && a(V)) {
58
- h(V, _);
79
+ const G = Date.now();
80
+ if (H && a(G)) {
81
+ h(G, _);
59
82
  return;
60
83
  }
61
- K && b();
62
- }, "t4"), t[8] = h, t[9] = i, t[10] = b, t[11] = a, t[12] = E) : E = t[12];
63
- const g = E;
64
- let x;
65
- t[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ u(() => {
84
+ B && E();
85
+ }, "t4"), t[8] = h, t[9] = i, t[10] = E, t[11] = a, t[12] = x) : x = t[12];
86
+ const g = x;
87
+ let b;
88
+ t[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(() => {
66
89
  m(), s.current = null;
67
- }, "t5"), t[13] = x) : x = t[13];
68
- const F = x;
90
+ }, "t5"), t[13] = b) : b = t[13];
91
+ const F = b;
69
92
  let w;
70
- t[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ u(() => n.current !== void 0, "t6"), t[14] = w) : w = t[14];
93
+ t[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ o(() => n.current !== void 0, "t6"), t[14] = w) : w = t[14];
71
94
  const v = w;
72
- let R, O;
73
- t[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ u(() => () => {
95
+ let p, C;
96
+ t[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ o(() => () => {
74
97
  F();
75
- }, "t7"), O = [F], t[15] = R, t[16] = O) : (R = t[15], O = t[16]), C(R, O);
98
+ }, "t7"), C = [F], t[15] = p, t[16] = C) : (p = t[15], C = t[16]), q(p, C);
76
99
  let $;
77
100
  return t[17] !== g ? ($ = {
78
101
  run: g,
@@ -80,24 +103,24 @@ function k(r, e) {
80
103
  isPending: v
81
104
  }, t[17] = g, t[18] = $) : $ = t[18], $;
82
105
  }
83
- u(k, "useDebouncedCallback");
106
+ o(D, "useDebouncedCallback");
84
107
  function W() {
85
- const r = S(3), e = q(!1);
108
+ const r = S(3), e = L(!1);
86
109
  let t;
87
- r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u(() => e.current, "t0"), r[0] = t) : t = r[0];
110
+ r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(() => e.current, "t0"), r[0] = t) : t = r[0];
88
111
  const n = t;
89
- let s, o;
90
- return r[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ u(() => (e.current = !0, () => {
112
+ let s, u;
113
+ return r[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ o(() => (e.current = !0, () => {
91
114
  e.current = !1;
92
- }), "t1"), o = [], r[1] = s, r[2] = o) : (s = r[1], o = r[2]), C(s, o), n;
115
+ }), "t1"), u = [], r[1] = s, r[2] = u) : (s = r[1], u = r[2]), q(s, u), n;
93
116
  }
94
- u(W, "useMounted");
95
- var ae = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(ae || {});
96
- function fe(r) {
97
- const [e, t] = M(
117
+ o(W, "useMounted");
118
+ var de = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(de || {});
119
+ function me(r) {
120
+ const [e, t] = P(
98
121
  r?.initialStatus ?? "idle"
99
122
  /* IDLE */
100
- ), [n, s] = M(void 0), [o, c] = M(void 0), i = W(), l = L(r), m = Q(() => {
123
+ ), [n, s] = P(void 0), [u, c] = P(void 0), i = W(), l = O(r), m = Q(() => {
101
124
  i() && (t(
102
125
  "loading"
103
126
  /* LOADING */
@@ -136,69 +159,69 @@ function fe(r) {
136
159
  status: e,
137
160
  loading: e === "loading",
138
161
  result: n,
139
- error: o,
162
+ error: u,
140
163
  setLoading: m,
141
164
  setSuccess: f,
142
165
  setError: a,
143
166
  setIdle: d
144
- }), [e, n, o, m, f, a, d]);
167
+ }), [e, n, u, m, f, a, d]);
145
168
  }
146
- u(fe, "usePromiseState");
147
- function de() {
148
- const r = S(6), e = q(0);
169
+ o(me, "usePromiseState");
170
+ function he() {
171
+ const r = S(6), e = L(0);
149
172
  let t;
150
- r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
173
+ r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
151
174
  const n = t;
152
175
  let s;
153
- r[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ u(() => e.current, "t1"), r[1] = s) : s = r[1];
154
- const o = s;
176
+ r[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ o(() => e.current, "t1"), r[1] = s) : s = r[1];
177
+ const u = s;
155
178
  let c;
156
- r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ u((h) => h === e.current, "t2"), r[2] = c) : c = r[2];
179
+ r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ o((h) => h === e.current, "t2"), r[2] = c) : c = r[2];
157
180
  const i = c;
158
181
  let l;
159
- r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ u(() => {
182
+ r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ o(() => {
160
183
  e.current = e.current + 1;
161
184
  }, "t3"), r[3] = l) : l = r[3];
162
185
  const m = l;
163
186
  let f;
164
- r[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ u(() => {
187
+ r[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ o(() => {
165
188
  e.current = 0;
166
189
  }, "t4"), r[4] = f) : f = r[4];
167
190
  const a = f;
168
191
  let d;
169
192
  return r[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
170
193
  generate: n,
171
- current: o,
194
+ current: u,
172
195
  isLatest: i,
173
196
  invalidate: m,
174
197
  reset: a
175
198
  }, r[5] = d) : d = r[5], d;
176
199
  }
177
- u(de, "useRequestId");
200
+ o(he, "useRequestId");
178
201
  function T(r) {
179
202
  const {
180
203
  loading: e,
181
204
  result: t,
182
205
  error: n,
183
206
  status: s,
184
- setLoading: o,
207
+ setLoading: u,
185
208
  setSuccess: c,
186
209
  setError: i,
187
210
  setIdle: l
188
- } = fe(r), m = W(), f = de(), a = q(void 0), d = r?.propagateError, h = L(r?.onAbort), y = Q(async () => {
211
+ } = me(r), m = W(), f = he(), a = L(void 0), d = r?.propagateError, h = O(r?.onAbort), y = Q(async () => {
189
212
  try {
190
213
  await h.current?.();
191
- } catch (x) {
192
- console.warn("useExecutePromise onAbort callback error:", x);
214
+ } catch (b) {
215
+ console.warn("useExecutePromise onAbort callback error:", b);
193
216
  }
194
- }, [h]), b = Q(async (x) => {
217
+ }, [h]), E = Q(async (b) => {
195
218
  a.current && (a.current.abort(), await y());
196
219
  const F = new AbortController();
197
220
  a.current = F;
198
221
  const w = f.generate();
199
- o();
222
+ u();
200
223
  try {
201
- const v = await x(F);
224
+ const v = await b(F);
202
225
  m() && f.isLatest(w) && await c(v);
203
226
  } catch (v) {
204
227
  if (v instanceof Error && v.name === "AbortError") {
@@ -210,30 +233,30 @@ function T(r) {
210
233
  } finally {
211
234
  a.current === F && (a.current = void 0);
212
235
  }
213
- }, [o, c, i, l, m, f, d, y]), E = Q(() => {
236
+ }, [u, c, i, l, m, f, d, y]), x = Q(() => {
214
237
  m() && l();
215
238
  }, [l, m]), g = Q(async () => {
216
- E(), a.current && (a.current.abort(), a.current = void 0, await y());
217
- }, [E, y]);
218
- return C(() => () => {
239
+ x(), a.current && (a.current.abort(), a.current = void 0, await y());
240
+ }, [x, y]);
241
+ return q(() => () => {
219
242
  g();
220
243
  }, [g]), U(() => ({
221
244
  loading: e,
222
245
  result: t,
223
246
  error: n,
224
247
  status: s,
225
- execute: b,
226
- reset: E,
248
+ execute: E,
249
+ reset: x,
227
250
  abort: g
228
- }), [e, t, n, s, b, E, g]);
251
+ }), [e, t, n, s, E, x, g]);
229
252
  }
230
- u(T, "useExecutePromise");
231
- function Ae(r) {
253
+ o(T, "useExecutePromise");
254
+ function Pe(r) {
232
255
  const e = S(10), {
233
256
  loading: t,
234
257
  result: n,
235
258
  error: s,
236
- execute: o,
259
+ execute: u,
237
260
  reset: c,
238
261
  abort: i,
239
262
  status: l
@@ -241,7 +264,7 @@ function Ae(r) {
241
264
  run: m,
242
265
  cancel: f,
243
266
  isPending: a
244
- } = k(o, r.debounce);
267
+ } = D(u, r.debounce);
245
268
  let d;
246
269
  return e[0] !== i || e[1] !== f || e[2] !== s || e[3] !== a || e[4] !== t || e[5] !== c || e[6] !== n || e[7] !== m || e[8] !== l ? (d = {
247
270
  loading: t,
@@ -255,8 +278,8 @@ function Ae(r) {
255
278
  isPending: a
256
279
  }, e[0] = i, e[1] = f, e[2] = s, e[3] = a, e[4] = t, e[5] = c, e[6] = n, e[7] = m, e[8] = l, e[9] = d) : d = e[9], d;
257
280
  }
258
- u(Ae, "useDebouncedExecutePromise");
259
- function Pe(r) {
281
+ o(Pe, "useDebouncedExecutePromise");
282
+ function ke(r) {
260
283
  const e = S(22), t = r.autoExecute;
261
284
  let n;
262
285
  e[0] !== r ? (n = {
@@ -264,7 +287,7 @@ function Pe(r) {
264
287
  autoExecute: !1
265
288
  }, e[0] = r, e[1] = n) : n = e[1];
266
289
  const s = n, {
267
- loading: o,
290
+ loading: u,
268
291
  result: c,
269
292
  error: i,
270
293
  status: l,
@@ -273,41 +296,41 @@ function Pe(r) {
273
296
  abort: a,
274
297
  getQuery: d,
275
298
  setQuery: h
276
- } = A(s), {
299
+ } = I(s), {
277
300
  run: y,
278
- cancel: b,
279
- isPending: E
280
- } = k(m, r.debounce);
301
+ cancel: E,
302
+ isPending: x
303
+ } = D(m, r.debounce);
281
304
  let g;
282
- e[2] !== t || e[3] !== y || e[4] !== h ? (g = /* @__PURE__ */ u((R) => {
283
- h(R), t && y();
305
+ e[2] !== t || e[3] !== y || e[4] !== h ? (g = /* @__PURE__ */ o((p) => {
306
+ h(p), t && y();
284
307
  }, "t1"), e[2] = t, e[3] = y, e[4] = h, e[5] = g) : g = e[5];
285
- const x = g;
308
+ const b = g;
286
309
  let F, w;
287
- e[6] !== t || e[7] !== y ? (F = /* @__PURE__ */ u(() => {
310
+ e[6] !== t || e[7] !== y ? (F = /* @__PURE__ */ o(() => {
288
311
  t && y();
289
- }, "t2"), w = [y, t], e[6] = t, e[7] = y, e[8] = F, e[9] = w) : (F = e[8], w = e[9]), C(F, w);
312
+ }, "t2"), w = [y, t], e[6] = t, e[7] = y, e[8] = F, e[9] = w) : (F = e[8], w = e[9]), q(F, w);
290
313
  let v;
291
- return e[10] !== a || e[11] !== b || e[12] !== i || e[13] !== d || e[14] !== E || e[15] !== o || e[16] !== f || e[17] !== c || e[18] !== y || e[19] !== x || e[20] !== l ? (v = {
292
- loading: o,
314
+ return e[10] !== a || e[11] !== E || e[12] !== i || e[13] !== d || e[14] !== x || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== y || e[19] !== b || e[20] !== l ? (v = {
315
+ loading: u,
293
316
  result: c,
294
317
  error: i,
295
318
  status: l,
296
319
  reset: f,
297
320
  abort: a,
298
321
  getQuery: d,
299
- setQuery: x,
322
+ setQuery: b,
300
323
  run: y,
301
- cancel: b,
302
- isPending: E
303
- }, e[10] = a, e[11] = b, e[12] = i, e[13] = d, e[14] = E, e[15] = o, e[16] = f, e[17] = c, e[18] = y, e[19] = x, e[20] = l, e[21] = v) : v = e[21], v;
324
+ cancel: E,
325
+ isPending: x
326
+ }, e[10] = a, e[11] = E, e[12] = i, e[13] = d, e[14] = x, e[15] = u, e[16] = f, e[17] = c, e[18] = y, e[19] = b, e[20] = l, e[21] = v) : v = e[21], v;
304
327
  }
305
- u(Pe, "useDebouncedQuery");
306
- function me() {
328
+ o(ke, "useDebouncedQuery");
329
+ function ye() {
307
330
  return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
308
331
  }
309
- u(me, "getFullscreenElement");
310
- async function he(r) {
332
+ o(ye, "getFullscreenElement");
333
+ async function Ee(r) {
311
334
  try {
312
335
  if (r.requestFullscreen)
313
336
  await r.requestFullscreen();
@@ -323,8 +346,8 @@ async function he(r) {
323
346
  throw console.error("Failed to enter fullscreen:", e), e;
324
347
  }
325
348
  }
326
- u(he, "enterFullscreen");
327
- async function ye() {
349
+ o(Ee, "enterFullscreen");
350
+ async function ge() {
328
351
  try {
329
352
  if (document.exitFullscreen)
330
353
  await document.exitFullscreen();
@@ -340,62 +363,62 @@ async function ye() {
340
363
  throw console.error("Failed to exit fullscreen:", r), r;
341
364
  }
342
365
  }
343
- u(ye, "exitFullscreen");
344
- function be(r) {
366
+ o(ge, "exitFullscreen");
367
+ function xe(r) {
345
368
  document.addEventListener("fullscreenchange", r), document.addEventListener("webkitfullscreenchange", r), document.addEventListener("mozfullscreenchange", r), document.addEventListener("MSFullscreenChange", r);
346
369
  }
347
- u(be, "addFullscreenChangeListener");
348
- function ge(r) {
370
+ o(xe, "addFullscreenChangeListener");
371
+ function be(r) {
349
372
  document.removeEventListener("fullscreenchange", r), document.removeEventListener("webkitfullscreenchange", r), document.removeEventListener("mozfullscreenchange", r), document.removeEventListener("MSFullscreenChange", r);
350
373
  }
351
- u(ge, "removeFullscreenChangeListener");
352
- function Me(r) {
374
+ o(be, "removeFullscreenChangeListener");
375
+ function ze(r) {
353
376
  const e = S(18);
354
377
  let t;
355
378
  e[0] !== r ? (t = r === void 0 ? {} : r, e[0] = r, e[1] = t) : t = e[1];
356
379
  const n = t, {
357
380
  target: s,
358
- onChange: o
359
- } = n, [c, i] = M(!1);
381
+ onChange: u
382
+ } = n, [c, i] = P(!1);
360
383
  let l;
361
- e[2] !== c || e[3] !== o || e[4] !== s ? (l = /* @__PURE__ */ u(() => {
362
- const F = me() === (s?.current || document.documentElement);
363
- F !== c && (i(F), o?.(F));
364
- }, "t2"), e[2] = c, e[3] = o, e[4] = s, e[5] = l) : l = e[5];
384
+ e[2] !== c || e[3] !== u || e[4] !== s ? (l = /* @__PURE__ */ o(() => {
385
+ const F = ye() === (s?.current || document.documentElement);
386
+ F !== c && (i(F), u?.(F));
387
+ }, "t2"), e[2] = c, e[3] = u, e[4] = s, e[5] = l) : l = e[5];
365
388
  const m = l;
366
389
  let f, a;
367
- e[6] !== m ? (f = /* @__PURE__ */ u(() => (be(m), () => {
368
- ge(m);
369
- }), "t3"), a = [m], e[6] = m, e[7] = f, e[8] = a) : (f = e[7], a = e[8]), C(f, a);
390
+ e[6] !== m ? (f = /* @__PURE__ */ o(() => (xe(m), () => {
391
+ be(m);
392
+ }), "t3"), a = [m], e[6] = m, e[7] = f, e[8] = a) : (f = e[7], a = e[8]), q(f, a);
370
393
  let d;
371
- e[9] !== s ? (d = /* @__PURE__ */ u(async () => {
372
- const x = s?.current || document.documentElement;
373
- await he(x);
394
+ e[9] !== s ? (d = /* @__PURE__ */ o(async () => {
395
+ const b = s?.current || document.documentElement;
396
+ await Ee(b);
374
397
  }, "t5"), e[9] = s, e[10] = d) : d = e[10];
375
- const h = d, y = Ee;
376
- let b;
377
- e[11] !== h || e[12] !== c ? (b = /* @__PURE__ */ u(async () => {
398
+ const h = d, y = Fe;
399
+ let E;
400
+ e[11] !== h || e[12] !== c ? (E = /* @__PURE__ */ o(async () => {
378
401
  c ? await y() : await h();
379
- }, "t6"), e[11] = h, e[12] = c, e[13] = b) : b = e[13];
380
- const E = b;
402
+ }, "t6"), e[11] = h, e[12] = c, e[13] = E) : E = e[13];
403
+ const x = E;
381
404
  let g;
382
- return e[14] !== h || e[15] !== c || e[16] !== E ? (g = {
405
+ return e[14] !== h || e[15] !== c || e[16] !== x ? (g = {
383
406
  isFullscreen: c,
384
- toggle: E,
407
+ toggle: x,
385
408
  enter: h,
386
409
  exit: y
387
- }, e[14] = h, e[15] = c, e[16] = E, e[17] = g) : g = e[17], g;
410
+ }, e[14] = h, e[15] = c, e[16] = x, e[17] = g) : g = e[17], g;
388
411
  }
389
- u(Me, "useFullscreen");
390
- async function Ee() {
391
- await ye();
412
+ o(ze, "useFullscreen");
413
+ async function Fe() {
414
+ await ge();
392
415
  }
393
- u(Ee, "_temp$1");
394
- function ze() {
395
- const r = q(/* @__PURE__ */ new Map()), e = Q((a) => r.current.get(a), []), t = Q((a, d) => r.current.set(a, d), []), n = Q((a) => r.current.has(a), []), s = Q((a) => r.current.delete(a), []), o = Q(() => r.current.clear(), []), c = Q(() => r.current.keys(), []), i = Q(() => r.current.values(), []), l = Q(() => r.current.entries(), []), m = Q(() => r.current[Symbol.iterator](), []), f = Q((a) => (d) => {
416
+ o(Fe, "_temp$1");
417
+ function De() {
418
+ const r = L(/* @__PURE__ */ new Map()), e = Q((a) => r.current.get(a), []), t = Q((a, d) => r.current.set(a, d), []), n = Q((a) => r.current.has(a), []), s = Q((a) => r.current.delete(a), []), u = Q(() => r.current.clear(), []), c = Q(() => r.current.keys(), []), i = Q(() => r.current.values(), []), l = Q(() => r.current.entries(), []), m = Q(() => r.current[Symbol.iterator](), []), f = Q((a) => (d) => {
396
419
  d ? r.current.set(a, d) : r.current.delete(a);
397
420
  }, []);
398
- return C(() => () => {
421
+ return q(() => () => {
399
422
  r.current.clear();
400
423
  }, []), U(() => ({
401
424
  register: f,
@@ -403,7 +426,7 @@ function ze() {
403
426
  set: t,
404
427
  has: n,
405
428
  delete: s,
406
- clear: o,
429
+ clear: u,
407
430
  keys: c,
408
431
  values: i,
409
432
  entries: l,
@@ -411,66 +434,66 @@ function ze() {
411
434
  return r.current.size;
412
435
  },
413
436
  [Symbol.iterator]: m
414
- }), [f, e, t, n, s, o, c, i, l, m]);
437
+ }), [f, e, t, n, s, u, c, i, l, m]);
415
438
  }
416
- u(ze, "useRefs");
417
- function De() {
418
- const [, r] = ee(xe, 0);
439
+ o(De, "useRefs");
440
+ function Te() {
441
+ const [, r] = re(we, 0);
419
442
  return r;
420
443
  }
421
- u(De, "useForceUpdate");
422
- function xe(r) {
444
+ o(Te, "useForceUpdate");
445
+ function we(r) {
423
446
  return r + 1;
424
447
  }
425
- u(xe, "_temp");
426
- function B(r) {
448
+ o(we, "_temp");
449
+ function J(r) {
427
450
  const e = S(12), {
428
451
  initialQuery: t,
429
452
  query: n,
430
453
  autoExecute: s,
431
- execute: o
432
- } = r, c = s === void 0 ? !0 : s, l = q(n ?? t);
454
+ execute: u
455
+ } = r, c = s === void 0 ? !0 : s, l = L(n ?? t);
433
456
  let m;
434
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ u(() => l.current, "t1"), e[0] = m) : m = e[0];
457
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ o(() => l.current, "t1"), e[0] = m) : m = e[0];
435
458
  const f = m;
436
459
  let a;
437
- e[1] !== c || e[2] !== o ? (a = /* @__PURE__ */ u(() => {
438
- const x = f();
439
- c && D(x) && o(x);
440
- }, "t2"), e[1] = c, e[2] = o, e[3] = a) : a = e[3];
460
+ e[1] !== c || e[2] !== u ? (a = /* @__PURE__ */ o(() => {
461
+ const b = f();
462
+ c && z(b) && u(b);
463
+ }, "t2"), e[1] = c, e[2] = u, e[3] = a) : a = e[3];
441
464
  const d = a;
442
465
  let h;
443
- e[4] !== d ? (h = /* @__PURE__ */ u((x) => {
444
- l.current = x, d();
466
+ e[4] !== d ? (h = /* @__PURE__ */ o((b) => {
467
+ l.current = b, d();
445
468
  }, "t3"), e[4] = d, e[5] = h) : h = e[5];
446
469
  const y = h;
447
- let b, E;
448
- e[6] !== d || e[7] !== n ? (b = /* @__PURE__ */ u(() => {
449
- D(n) && (l.current = n), d();
450
- }, "t4"), E = [d, n], e[6] = d, e[7] = n, e[8] = b, e[9] = E) : (b = e[8], E = e[9]), C(b, E);
470
+ let E, x;
471
+ e[6] !== d || e[7] !== n ? (E = /* @__PURE__ */ o(() => {
472
+ z(n) && (l.current = n), d();
473
+ }, "t4"), x = [d, n], e[6] = d, e[7] = n, e[8] = E, e[9] = x) : (E = e[8], x = e[9]), q(E, x);
451
474
  let g;
452
475
  return e[10] !== y ? (g = {
453
476
  getQuery: f,
454
477
  setQuery: y
455
478
  }, e[10] = y, e[11] = g) : g = e[11], g;
456
479
  }
457
- u(B, "useQueryState");
458
- function D(r) {
480
+ o(J, "useQueryState");
481
+ function z(r) {
459
482
  return r !== void 0;
460
483
  }
461
- u(D, "isValidateQuery");
462
- function A(r) {
463
- const e = S(21), t = L(r), {
484
+ o(z, "isValidateQuery");
485
+ function I(r) {
486
+ const e = S(21), t = O(r), {
464
487
  loading: n,
465
488
  result: s,
466
- error: o,
489
+ error: u,
467
490
  status: c,
468
491
  execute: i,
469
492
  reset: l,
470
493
  abort: m
471
494
  } = T(r);
472
495
  let f;
473
- e[0] !== t || e[1] !== i ? (f = /* @__PURE__ */ u((x) => i(/* @__PURE__ */ u(async (w) => t.current.execute(x, t.current.attributes, w), "queryExecutor")), "t0"), e[0] = t, e[1] = i, e[2] = f) : f = e[2];
496
+ e[0] !== t || e[1] !== i ? (f = /* @__PURE__ */ o((b) => i(/* @__PURE__ */ o(async (w) => t.current.execute(b, t.current.attributes, w), "queryExecutor")), "t0"), e[0] = t, e[1] = i, e[2] = f) : f = e[2];
474
497
  const a = f;
475
498
  let d;
476
499
  e[3] !== a || e[4] !== r.autoExecute || e[5] !== r.initialQuery || e[6] !== r.query ? (d = {
@@ -482,144 +505,147 @@ function A(r) {
482
505
  const {
483
506
  getQuery: h,
484
507
  setQuery: y
485
- } = B(d);
486
- let b;
487
- e[8] !== a || e[9] !== h ? (b = /* @__PURE__ */ u(async () => {
488
- const x = h();
489
- if (D(x))
490
- return await a(x);
491
- }, "t2"), e[8] = a, e[9] = h, e[10] = b) : b = e[10];
492
- const E = b;
508
+ } = J(d);
509
+ let E;
510
+ e[8] !== a || e[9] !== h ? (E = /* @__PURE__ */ o(async () => {
511
+ const b = h();
512
+ if (z(b))
513
+ return await a(b);
514
+ }, "t2"), e[8] = a, e[9] = h, e[10] = E) : E = e[10];
515
+ const x = E;
493
516
  let g;
494
- return e[11] !== m || e[12] !== o || e[13] !== E || e[14] !== h || e[15] !== n || e[16] !== l || e[17] !== s || e[18] !== y || e[19] !== c ? (g = {
517
+ return e[11] !== m || e[12] !== u || e[13] !== x || e[14] !== h || e[15] !== n || e[16] !== l || e[17] !== s || e[18] !== y || e[19] !== c ? (g = {
495
518
  loading: n,
496
519
  result: s,
497
- error: o,
520
+ error: u,
498
521
  status: c,
499
- execute: E,
522
+ execute: x,
500
523
  reset: l,
501
524
  abort: m,
502
525
  getQuery: h,
503
526
  setQuery: y
504
- }, e[11] = m, e[12] = o, e[13] = E, e[14] = h, e[15] = n, e[16] = l, e[17] = s, e[18] = y, e[19] = c, e[20] = g) : g = e[20], g;
527
+ }, e[11] = m, e[12] = u, e[13] = x, e[14] = h, e[15] = n, e[16] = l, e[17] = s, e[18] = y, e[19] = c, e[20] = g) : g = e[20], g;
505
528
  }
506
- u(A, "useQuery");
507
- function Fe(r, e) {
529
+ o(I, "useQuery");
530
+ function ve(r, e) {
508
531
  const t = S(10), n = T(e);
509
- let s, o;
532
+ let s, u;
510
533
  t[0] !== n ? ({
511
534
  execute: s,
512
- ...o
513
- } = n, t[0] = n, t[1] = s, t[2] = o) : (s = t[1], o = t[2]);
514
- const c = L(e?.onBeforeExecute);
535
+ ...u
536
+ } = n, t[0] = n, t[1] = s, t[2] = u) : (s = t[1], u = t[2]);
537
+ const c = O(e?.onBeforeExecute);
515
538
  let i;
516
- t[3] !== r || t[4] !== c || t[5] !== s ? (i = /* @__PURE__ */ u((...f) => {
539
+ t[3] !== r || t[4] !== c || t[5] !== s ? (i = /* @__PURE__ */ o((...f) => {
517
540
  const a = f;
518
541
  return s((d) => (c.current && c.current(d, a), r(...a)));
519
542
  }, "t1"), t[3] = r, t[4] = c, t[5] = s, t[6] = i) : i = t[6];
520
543
  const l = i;
521
544
  let m;
522
- return t[7] !== l || t[8] !== o ? (m = {
523
- ...o,
545
+ return t[7] !== l || t[8] !== u ? (m = {
546
+ ...u,
524
547
  execute: l
525
- }, t[7] = l, t[8] = o, t[9] = m) : m = t[9], m;
548
+ }, t[7] = l, t[8] = u, t[9] = m) : m = t[9], m;
526
549
  }
527
- u(Fe, "useApiMethodExecute");
528
- function we(r) {
529
- return /* @__PURE__ */ u(function(t) {
530
- return Fe(r, t);
550
+ o(ve, "useApiMethodExecute");
551
+ function Se(r) {
552
+ return /* @__PURE__ */ o(function(t) {
553
+ return ve(r, t);
531
554
  }, "useApiMethod");
532
555
  }
533
- u(we, "createHookForMethod");
534
- function ve(r) {
535
- const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ u((o) => {
536
- Object.getOwnPropertyNames(o).forEach((c) => {
537
- if (!t.has(c) && c !== "constructor") {
538
- t.add(c);
539
- const i = o[c];
540
- typeof i == "function" && e.set(c, i.bind(r));
541
- }
542
- });
543
- }, "processObject");
544
- n(r);
545
- let s = Object.getPrototypeOf(r);
546
- for (; s && s !== Object.prototype; )
547
- n(s), s = Object.getPrototypeOf(s);
548
- return e;
556
+ o(Se, "createHookForMethod");
557
+ function Ue(r) {
558
+ const {
559
+ api: e
560
+ } = r, t = {};
561
+ return V(e).forEach((s, u) => {
562
+ const c = K(u);
563
+ t[c] = Se(s);
564
+ }), t;
549
565
  }
550
- u(ve, "collectMethods");
551
- function ke(r) {
566
+ o(Ue, "createExecuteApiHooks");
567
+ function Qe(r) {
568
+ return /* @__PURE__ */ o(function(t) {
569
+ const n = O(t?.onBeforeExecute), s = Q(async (c, i, l) => (n.current && n.current(l, c), r(c, i, l)), [n]), u = {
570
+ ...t,
571
+ execute: s
572
+ };
573
+ return I(u);
574
+ }, "useApiMethodQuery");
575
+ }
576
+ o(Qe, "createQueryHookForMethod");
577
+ function Ne(r) {
552
578
  const {
553
579
  api: e
554
580
  } = r, t = {};
555
- return ve(e).forEach((s, o) => {
556
- const c = `use${o.charAt(0).toUpperCase() + o.slice(1)}`;
557
- t[c] = we(s);
581
+ return V(e).forEach((s, u) => {
582
+ const c = K(u);
583
+ t[c] = Qe(s);
558
584
  }), t;
559
585
  }
560
- u(ke, "createExecuteApiHooks");
561
- function H(r, e) {
586
+ o(Ne, "createQueryApiHooks");
587
+ function Y(r, e) {
562
588
  const t = S(13);
563
589
  let n;
564
- t[0] !== r ? (n = /* @__PURE__ */ u((h) => r.addListener({
565
- name: ce.generate("useKeyStorage"),
590
+ t[0] !== r ? (n = /* @__PURE__ */ o((h) => r.addListener({
591
+ name: oe.generate("useKeyStorage"),
566
592
  handle: h
567
593
  }), "t0"), t[0] = r, t[1] = n) : n = t[1];
568
594
  const s = n;
569
- let o;
570
- t[2] !== e || t[3] !== r ? (o = /* @__PURE__ */ u(() => {
595
+ let u;
596
+ t[2] !== e || t[3] !== r ? (u = /* @__PURE__ */ o(() => {
571
597
  const h = r.get();
572
598
  return h !== null ? h : e ?? null;
573
- }, "t1"), t[2] = e, t[3] = r, t[4] = o) : o = t[4];
574
- const c = o, i = te(s, c, c);
599
+ }, "t1"), t[2] = e, t[3] = r, t[4] = u) : u = t[4];
600
+ const c = u, i = ne(s, c, c);
575
601
  let l;
576
- t[5] !== r ? (l = /* @__PURE__ */ u((h) => r.set(h), "t2"), t[5] = r, t[6] = l) : l = t[6];
602
+ t[5] !== r ? (l = /* @__PURE__ */ o((h) => r.set(h), "t2"), t[5] = r, t[6] = l) : l = t[6];
577
603
  const m = l;
578
604
  let f;
579
- t[7] !== r ? (f = /* @__PURE__ */ u(() => r.remove(), "t3"), t[7] = r, t[8] = f) : f = t[8];
605
+ t[7] !== r ? (f = /* @__PURE__ */ o(() => r.remove(), "t3"), t[7] = r, t[8] = f) : f = t[8];
580
606
  const a = f;
581
607
  let d;
582
608
  return t[9] !== a || t[10] !== m || t[11] !== i ? (d = [i, m, a], t[9] = a, t[10] = m, t[11] = i, t[12] = d) : d = t[12], d;
583
609
  }
584
- u(H, "useKeyStorage");
585
- function Te(r, e) {
586
- const t = S(8), [n, s, o] = H(r, e);
610
+ o(Y, "useKeyStorage");
611
+ function je(r, e) {
612
+ const t = S(8), [n, s, u] = Y(r, e);
587
613
  let c;
588
- t[0] !== o || t[1] !== s || t[2] !== n ? (c = /* @__PURE__ */ u((m) => {
589
- const f = se(n, m);
614
+ t[0] !== u || t[1] !== s || t[2] !== n ? (c = /* @__PURE__ */ o((m) => {
615
+ const f = ue(n, m);
590
616
  if (f === null) {
591
- o();
617
+ u();
592
618
  return;
593
619
  }
594
620
  return s(f);
595
- }, "t0"), t[0] = o, t[1] = s, t[2] = n, t[3] = c) : c = t[3];
621
+ }, "t0"), t[0] = u, t[1] = s, t[2] = n, t[3] = c) : c = t[3];
596
622
  const i = c;
597
623
  let l;
598
- return t[4] !== o || t[5] !== i || t[6] !== n ? (l = [n, i, o], t[4] = o, t[5] = i, t[6] = n, t[7] = l) : l = t[7], l;
624
+ return t[4] !== u || t[5] !== i || t[6] !== n ? (l = [n, i, u], t[4] = u, t[5] = i, t[6] = n, t[7] = l) : l = t[7], l;
599
625
  }
600
- u(Te, "useImmerKeyStorage");
601
- const Se = {
626
+ o(je, "useImmerKeyStorage");
627
+ const pe = {
602
628
  jti: "",
603
629
  sub: "anonymous",
604
630
  iat: 0,
605
631
  exp: 0
606
632
  };
607
- function Qe(r, e) {
633
+ function Re(r, e) {
608
634
  const t = S(13);
609
635
  let n;
610
636
  t[0] !== e ? (n = e === void 0 ? {} : e, t[0] = e, t[1] = n) : n = t[1];
611
- const s = n, [o, , c] = H(r), i = L(s);
637
+ const s = n, [u, , c] = Y(r), i = O(s);
612
638
  let l;
613
- t[2] !== i || t[3] !== r ? (l = /* @__PURE__ */ u(async (b) => {
614
- const E = typeof b == "function" ? await b() : b;
615
- r.signIn(E), i.current.onSignIn?.();
639
+ t[2] !== i || t[3] !== r ? (l = /* @__PURE__ */ o(async (E) => {
640
+ const x = typeof E == "function" ? await E() : E;
641
+ r.signIn(x), i.current.onSignIn?.();
616
642
  }, "t2"), t[2] = i, t[3] = r, t[4] = l) : l = t[4];
617
643
  const m = l;
618
644
  let f;
619
- t[5] !== i || t[6] !== c ? (f = /* @__PURE__ */ u(() => {
645
+ t[5] !== i || t[6] !== c ? (f = /* @__PURE__ */ o(() => {
620
646
  c(), i.current.onSignOut?.();
621
647
  }, "t3"), t[5] = i, t[6] = c, t[7] = f) : f = t[7];
622
- const a = f, d = o?.access?.payload ?? Se, h = o?.authenticated ?? !1;
648
+ const a = f, d = u?.access?.payload ?? pe, h = u?.authenticated ?? !1;
623
649
  let y;
624
650
  return t[8] !== m || t[9] !== a || t[10] !== d || t[11] !== h ? (y = {
625
651
  currentUser: d,
@@ -628,9 +654,9 @@ function Qe(r, e) {
628
654
  signOut: a
629
655
  }, t[8] = m, t[9] = a, t[10] = d, t[11] = h, t[12] = y) : y = t[12], y;
630
656
  }
631
- u(Qe, "useSecurity");
632
- const J = re(void 0);
633
- function Ue(r) {
657
+ o(Re, "useSecurity");
658
+ const X = ce(void 0);
659
+ function He(r) {
634
660
  const e = S(7);
635
661
  let t, n, s;
636
662
  e[0] !== r ? ({
@@ -638,156 +664,156 @@ function Ue(r) {
638
664
  children: t,
639
665
  ...s
640
666
  } = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s) : (t = e[1], n = e[2], s = e[3]);
641
- const o = Qe(n, s);
667
+ const u = Re(n, s);
642
668
  let c;
643
- return e[4] !== t || e[5] !== o ? (c = /* @__PURE__ */ I(J.Provider, { value: o, children: t }), e[4] = t, e[5] = o, e[6] = c) : c = e[6], c;
669
+ return e[4] !== t || e[5] !== u ? (c = /* @__PURE__ */ A(X.Provider, { value: u, children: t }), e[4] = t, e[5] = u, e[6] = c) : c = e[6], c;
644
670
  }
645
- u(Ue, "SecurityProvider");
646
- function Y() {
647
- const r = ne(J);
671
+ o(He, "SecurityProvider");
672
+ function Z() {
673
+ const r = se(X);
648
674
  if (!r)
649
675
  throw new Error("useSecurityContext must be used within a SecurityProvider");
650
676
  return r;
651
677
  }
652
- u(Y, "useSecurityContext");
653
- function Ne(r) {
678
+ o(Z, "useSecurityContext");
679
+ function Be(r) {
654
680
  const e = S(2), {
655
681
  children: t,
656
682
  fallback: n,
657
683
  onUnauthorized: s
658
684
  } = r, {
659
- authenticated: o
660
- } = Y();
661
- if (o) {
685
+ authenticated: u
686
+ } = Z();
687
+ if (u) {
662
688
  let c;
663
- return e[0] !== t ? (c = /* @__PURE__ */ I(z, { children: t }), e[0] = t, e[1] = c) : c = e[1], c;
689
+ return e[0] !== t ? (c = /* @__PURE__ */ A(k, { children: t }), e[0] = t, e[1] = c) : c = e[1], c;
664
690
  }
665
691
  return s && s(), n;
666
692
  }
667
- u(Ne, "RouteGuard");
668
- function je(r) {
693
+ o(Be, "RouteGuard");
694
+ function Ge(r) {
669
695
  const e = S(14), {
670
696
  children: t,
671
697
  fallback: n,
672
698
  refreshing: s,
673
- tokenManager: o
699
+ tokenManager: u
674
700
  } = r, {
675
701
  authenticated: c
676
- } = Y(), i = o.isRefreshNeeded && o.isRefreshable;
702
+ } = Z(), i = u.isRefreshNeeded && u.isRefreshable;
677
703
  let l;
678
- e[0] !== i || e[1] !== o ? (l = /* @__PURE__ */ u(async () => {
704
+ e[0] !== i || e[1] !== u ? (l = /* @__PURE__ */ o(async () => {
679
705
  if (i)
680
706
  try {
681
- await o.refresh();
682
- } catch (b) {
683
- console.error(b);
707
+ await u.refresh();
708
+ } catch (E) {
709
+ console.error(E);
684
710
  }
685
- }, "t1"), e[0] = i, e[1] = o, e[2] = l) : l = e[2];
711
+ }, "t1"), e[0] = i, e[1] = u, e[2] = l) : l = e[2];
686
712
  const m = l;
687
713
  let f, a;
688
- if (e[3] !== m ? (f = /* @__PURE__ */ u(() => {
714
+ if (e[3] !== m ? (f = /* @__PURE__ */ o(() => {
689
715
  m();
690
- }, "t2"), a = [m], e[3] = m, e[4] = f, e[5] = a) : (f = e[4], a = e[5]), C(f, a), c) {
691
- let b;
692
- return e[6] !== t ? (b = /* @__PURE__ */ I(z, { children: t }), e[6] = t, e[7] = b) : b = e[7], b;
716
+ }, "t2"), a = [m], e[3] = m, e[4] = f, e[5] = a) : (f = e[4], a = e[5]), q(f, a), c) {
717
+ let E;
718
+ return e[6] !== t ? (E = /* @__PURE__ */ A(k, { children: t }), e[6] = t, e[7] = E) : E = e[7], E;
693
719
  }
694
720
  if (!i) {
695
- let b;
696
- return e[8] !== n ? (b = /* @__PURE__ */ I(z, { children: n }), e[8] = n, e[9] = b) : b = e[9], b;
721
+ let E;
722
+ return e[8] !== n ? (E = /* @__PURE__ */ A(k, { children: n }), e[8] = n, e[9] = E) : E = e[9], E;
697
723
  }
698
724
  let d;
699
- e[10] !== s ? (d = s ?? /* @__PURE__ */ I("p", { children: "Refreshing..." }), e[10] = s, e[11] = d) : d = e[11];
725
+ e[10] !== s ? (d = s ?? /* @__PURE__ */ A("p", { children: "Refreshing..." }), e[10] = s, e[11] = d) : d = e[11];
700
726
  const h = d;
701
727
  let y;
702
- return e[12] !== h ? (y = /* @__PURE__ */ I(z, { children: h }), e[12] = h, e[13] = y) : y = e[13], y;
728
+ return e[12] !== h ? (y = /* @__PURE__ */ A(k, { children: h }), e[12] = h, e[13] = y) : y = e[13], y;
703
729
  }
704
- u(je, "RefreshableRouteGuard");
705
- function X(r) {
730
+ o(Ge, "RefreshableRouteGuard");
731
+ function ee(r) {
706
732
  const e = S(21);
707
733
  let t;
708
734
  e[0] !== r ? (t = r || {}, e[0] = r, e[1] = t) : t = e[1];
709
735
  const {
710
736
  fetcher: n
711
- } = t, s = n === void 0 ? ue.default : n, {
712
- loading: o,
737
+ } = t, s = n === void 0 ? le.default : n, {
738
+ loading: u,
713
739
  result: c,
714
740
  error: i,
715
741
  status: l,
716
742
  execute: m,
717
743
  reset: f,
718
744
  abort: a
719
- } = T(r), [d, h] = M(void 0), y = L(r);
720
- let b;
721
- e[2] !== s ? (b = oe(s), e[2] = s, e[3] = b) : b = e[3];
722
- const E = b;
745
+ } = T(r), [d, h] = P(void 0), y = O(r);
746
+ let E;
747
+ e[2] !== s ? (E = ie(s), e[2] = s, e[3] = E) : E = e[3];
748
+ const x = E;
723
749
  let g;
724
- e[4] !== E || e[5] !== y || e[6] !== m ? (g = /* @__PURE__ */ u(async ($) => {
750
+ e[4] !== x || e[5] !== y || e[6] !== m ? (g = /* @__PURE__ */ o(async ($) => {
725
751
  try {
726
- await m(async (p) => {
727
- $.abortController = p;
728
- const _ = await E.exchange($, y.current);
752
+ await m(async (R) => {
753
+ $.abortController = R;
754
+ const _ = await x.exchange($, y.current);
729
755
  return h(_), await _.extractResult();
730
756
  });
731
- } catch (p) {
732
- const _ = p;
757
+ } catch (R) {
758
+ const _ = R;
733
759
  throw h(void 0), _;
734
760
  }
735
- }, "t3"), e[4] = E, e[5] = y, e[6] = m, e[7] = g) : g = e[7];
736
- const x = g;
761
+ }, "t3"), e[4] = x, e[5] = y, e[6] = m, e[7] = g) : g = e[7];
762
+ const b = g;
737
763
  let F;
738
- e[8] !== f ? (F = /* @__PURE__ */ u(() => {
764
+ e[8] !== f ? (F = /* @__PURE__ */ o(() => {
739
765
  f(), h(void 0);
740
766
  }, "t4"), e[8] = f, e[9] = F) : F = e[9];
741
767
  const w = F;
742
768
  let v;
743
- e[10] !== a ? (v = /* @__PURE__ */ u(() => {
769
+ e[10] !== a ? (v = /* @__PURE__ */ o(() => {
744
770
  a(), h(void 0);
745
771
  }, "t5"), e[10] = a, e[11] = v) : v = e[11];
746
- const R = v;
747
- let O;
748
- return e[12] !== R || e[13] !== i || e[14] !== d || e[15] !== x || e[16] !== o || e[17] !== w || e[18] !== c || e[19] !== l ? (O = {
749
- loading: o,
772
+ const p = v;
773
+ let C;
774
+ return e[12] !== p || e[13] !== i || e[14] !== d || e[15] !== b || e[16] !== u || e[17] !== w || e[18] !== c || e[19] !== l ? (C = {
775
+ loading: u,
750
776
  result: c,
751
777
  error: i,
752
778
  status: l,
753
779
  exchange: d,
754
- execute: x,
780
+ execute: b,
755
781
  reset: w,
756
- abort: R
757
- }, e[12] = R, e[13] = i, e[14] = d, e[15] = x, e[16] = o, e[17] = w, e[18] = c, e[19] = l, e[20] = O) : O = e[20], O;
782
+ abort: p
783
+ }, e[12] = p, e[13] = i, e[14] = d, e[15] = b, e[16] = u, e[17] = w, e[18] = c, e[19] = l, e[20] = C) : C = e[20], C;
758
784
  }
759
- u(X, "useFetcher");
760
- function Ge(r) {
785
+ o(ee, "useFetcher");
786
+ function Ke(r) {
761
787
  const e = S(11), {
762
788
  loading: t,
763
789
  result: n,
764
790
  error: s,
765
- status: o,
791
+ status: u,
766
792
  exchange: c,
767
793
  execute: i,
768
794
  reset: l,
769
795
  abort: m
770
- } = X(r), {
796
+ } = ee(r), {
771
797
  run: f,
772
798
  cancel: a,
773
799
  isPending: d
774
- } = k(i, r.debounce);
800
+ } = D(i, r.debounce);
775
801
  let h;
776
- return e[0] !== m || e[1] !== a || e[2] !== s || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== l || e[7] !== n || e[8] !== f || e[9] !== o ? (h = {
802
+ return e[0] !== m || e[1] !== a || e[2] !== s || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== l || e[7] !== n || e[8] !== f || e[9] !== u ? (h = {
777
803
  loading: t,
778
804
  result: n,
779
805
  error: s,
780
- status: o,
806
+ status: u,
781
807
  exchange: c,
782
808
  reset: l,
783
809
  abort: m,
784
810
  run: f,
785
811
  cancel: a,
786
812
  isPending: d
787
- }, e[0] = m, e[1] = a, e[2] = s, e[3] = c, e[4] = d, e[5] = t, e[6] = l, e[7] = n, e[8] = f, e[9] = o, e[10] = h) : h = e[10], h;
813
+ }, e[0] = m, e[1] = a, e[2] = s, e[3] = c, e[4] = d, e[5] = t, e[6] = l, e[7] = n, e[8] = f, e[9] = u, e[10] = h) : h = e[10], h;
788
814
  }
789
- u(Ge, "useDebouncedFetcher");
790
- function Ke(r) {
815
+ o(Ke, "useDebouncedFetcher");
816
+ function Ve(r) {
791
817
  const e = S(22), t = r.autoExecute;
792
818
  let n;
793
819
  e[0] !== r ? (n = {
@@ -795,7 +821,7 @@ function Ke(r) {
795
821
  autoExecute: !1
796
822
  }, e[0] = r, e[1] = n) : n = e[1];
797
823
  const s = n, {
798
- loading: o,
824
+ loading: u,
799
825
  result: c,
800
826
  error: i,
801
827
  status: l,
@@ -804,54 +830,54 @@ function Ke(r) {
804
830
  abort: a,
805
831
  getQuery: d,
806
832
  setQuery: h
807
- } = P(s), {
833
+ } = M(s), {
808
834
  run: y,
809
- cancel: b,
810
- isPending: E
811
- } = k(m, r.debounce);
835
+ cancel: E,
836
+ isPending: x
837
+ } = D(m, r.debounce);
812
838
  let g;
813
- e[2] !== t || e[3] !== y || e[4] !== h ? (g = /* @__PURE__ */ u((R) => {
814
- h(R), t && y();
839
+ e[2] !== t || e[3] !== y || e[4] !== h ? (g = /* @__PURE__ */ o((p) => {
840
+ h(p), t && y();
815
841
  }, "t1"), e[2] = t, e[3] = y, e[4] = h, e[5] = g) : g = e[5];
816
- const x = g;
842
+ const b = g;
817
843
  let F, w;
818
- e[6] !== t || e[7] !== y ? (F = /* @__PURE__ */ u(() => {
844
+ e[6] !== t || e[7] !== y ? (F = /* @__PURE__ */ o(() => {
819
845
  t && y();
820
- }, "t2"), w = [y, t], e[6] = t, e[7] = y, e[8] = F, e[9] = w) : (F = e[8], w = e[9]), C(F, w);
846
+ }, "t2"), w = [y, t], e[6] = t, e[7] = y, e[8] = F, e[9] = w) : (F = e[8], w = e[9]), q(F, w);
821
847
  let v;
822
- return e[10] !== a || e[11] !== b || e[12] !== i || e[13] !== d || e[14] !== E || e[15] !== o || e[16] !== f || e[17] !== c || e[18] !== y || e[19] !== x || e[20] !== l ? (v = {
823
- loading: o,
848
+ return e[10] !== a || e[11] !== E || e[12] !== i || e[13] !== d || e[14] !== x || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== y || e[19] !== b || e[20] !== l ? (v = {
849
+ loading: u,
824
850
  result: c,
825
851
  error: i,
826
852
  status: l,
827
853
  reset: f,
828
854
  abort: a,
829
855
  getQuery: d,
830
- setQuery: x,
856
+ setQuery: b,
831
857
  run: y,
832
- cancel: b,
833
- isPending: E
834
- }, e[10] = a, e[11] = b, e[12] = i, e[13] = d, e[14] = E, e[15] = o, e[16] = f, e[17] = c, e[18] = y, e[19] = x, e[20] = l, e[21] = v) : v = e[21], v;
858
+ cancel: E,
859
+ isPending: x
860
+ }, e[10] = a, e[11] = E, e[12] = i, e[13] = d, e[14] = x, e[15] = u, e[16] = f, e[17] = c, e[18] = y, e[19] = b, e[20] = l, e[21] = v) : v = e[21], v;
835
861
  }
836
- u(Ke, "useDebouncedFetcherQuery");
837
- function P(r) {
862
+ o(Ve, "useDebouncedFetcherQuery");
863
+ function M(r) {
838
864
  const e = S(23);
839
865
  let t;
840
866
  e[0] !== r ? (t = {
841
- resultExtractor: le,
867
+ resultExtractor: ae,
842
868
  ...r
843
869
  }, e[0] = r, e[1] = t) : t = e[1];
844
- const n = t, s = L(n), {
845
- loading: o,
870
+ const n = t, s = O(n), {
871
+ loading: u,
846
872
  result: c,
847
873
  error: i,
848
874
  status: l,
849
875
  execute: m,
850
876
  reset: f,
851
877
  abort: a
852
- } = X(n);
878
+ } = ee(n);
853
879
  let d;
854
- e[2] !== m || e[3] !== s ? (d = /* @__PURE__ */ u((w) => {
880
+ e[2] !== m || e[3] !== s ? (d = /* @__PURE__ */ o((w) => {
855
881
  const v = {
856
882
  url: s.current.url,
857
883
  method: "POST",
@@ -868,142 +894,145 @@ function P(r) {
868
894
  execute: h
869
895
  }, e[5] = h, e[6] = n.autoExecute, e[7] = n.initialQuery, e[8] = n.query, e[9] = y) : y = e[9];
870
896
  const {
871
- getQuery: b,
872
- setQuery: E
873
- } = B(y);
897
+ getQuery: E,
898
+ setQuery: x
899
+ } = J(y);
874
900
  let g;
875
- e[10] !== h || e[11] !== b ? (g = /* @__PURE__ */ u(async () => {
876
- const w = b();
877
- if (D(w))
901
+ e[10] !== h || e[11] !== E ? (g = /* @__PURE__ */ o(async () => {
902
+ const w = E();
903
+ if (z(w))
878
904
  return await h(w);
879
- }, "t3"), e[10] = h, e[11] = b, e[12] = g) : g = e[12];
880
- const x = g;
905
+ }, "t3"), e[10] = h, e[11] = E, e[12] = g) : g = e[12];
906
+ const b = g;
881
907
  let F;
882
- return e[13] !== a || e[14] !== i || e[15] !== x || e[16] !== b || e[17] !== o || e[18] !== f || e[19] !== c || e[20] !== E || e[21] !== l ? (F = {
883
- loading: o,
908
+ return e[13] !== a || e[14] !== i || e[15] !== b || e[16] !== E || e[17] !== u || e[18] !== f || e[19] !== c || e[20] !== x || e[21] !== l ? (F = {
909
+ loading: u,
884
910
  result: c,
885
911
  error: i,
886
912
  status: l,
887
- execute: x,
913
+ execute: b,
888
914
  reset: f,
889
915
  abort: a,
890
- getQuery: b,
891
- setQuery: E
892
- }, e[13] = a, e[14] = i, e[15] = x, e[16] = b, e[17] = o, e[18] = f, e[19] = c, e[20] = E, e[21] = l, e[22] = F) : F = e[22], F;
916
+ getQuery: E,
917
+ setQuery: x
918
+ }, e[13] = a, e[14] = i, e[15] = b, e[16] = E, e[17] = u, e[18] = f, e[19] = c, e[20] = x, e[21] = l, e[22] = F) : F = e[22], F;
893
919
  }
894
- u(P, "useFetcherQuery");
895
- function Ve(r) {
896
- return P(r);
897
- }
898
- u(Ve, "useFetcherCountQuery");
920
+ o(M, "useFetcherQuery");
899
921
  function We(r) {
900
- return P(r);
922
+ return M(r);
901
923
  }
902
- u(We, "useFetcherListQuery");
903
- function Be(r) {
924
+ o(We, "useFetcherCountQuery");
925
+ function Je(r) {
926
+ return M(r);
927
+ }
928
+ o(Je, "useFetcherListQuery");
929
+ function Ye(r) {
904
930
  const e = S(2);
905
931
  let t;
906
932
  return e[0] !== r ? (t = {
907
933
  ...r,
908
- resultExtractor: ie
909
- }, e[0] = r, e[1] = t) : t = e[1], P(t);
910
- }
911
- u(Be, "useFetcherListStreamQuery");
912
- function He(r) {
913
- return P(r);
914
- }
915
- u(He, "useFetcherPagedQuery");
916
- function Je(r) {
917
- return P(r);
934
+ resultExtractor: fe
935
+ }, e[0] = r, e[1] = t) : t = e[1], M(t);
918
936
  }
919
- u(Je, "useFetcherSingleQuery");
920
- function Ye(r) {
921
- return A(r);
922
- }
923
- u(Ye, "useCountQuery");
937
+ o(Ye, "useFetcherListStreamQuery");
924
938
  function Xe(r) {
925
- return A(r);
939
+ return M(r);
926
940
  }
927
- u(Xe, "useListQuery");
941
+ o(Xe, "useFetcherPagedQuery");
928
942
  function Ze(r) {
929
- return A(r);
943
+ return M(r);
930
944
  }
931
- u(Ze, "useListStreamQuery");
945
+ o(Ze, "useFetcherSingleQuery");
932
946
  function et(r) {
933
- return A(r);
947
+ return I(r);
934
948
  }
935
- u(et, "usePagedQuery");
949
+ o(et, "useCountQuery");
936
950
  function tt(r) {
937
- return A(r);
951
+ return I(r);
938
952
  }
939
- u(tt, "useSingleQuery");
953
+ o(tt, "useListQuery");
940
954
  function rt(r) {
955
+ return I(r);
956
+ }
957
+ o(rt, "useListStreamQuery");
958
+ function nt(r) {
959
+ return I(r);
960
+ }
961
+ o(nt, "usePagedQuery");
962
+ function ct(r) {
963
+ return I(r);
964
+ }
965
+ o(ct, "useSingleQuery");
966
+ function st(r) {
941
967
  const e = S(13), {
942
968
  bus: t,
943
969
  handler: n
944
970
  } = r;
945
971
  let s;
946
- e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ u(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = s) : s = e[2];
947
- const o = s;
972
+ e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ o(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = s) : s = e[2];
973
+ const u = s;
948
974
  let c;
949
- e[3] !== t || e[4] !== n.name ? (c = /* @__PURE__ */ u(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = c) : c = e[5];
975
+ e[3] !== t || e[4] !== n.name ? (c = /* @__PURE__ */ o(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = c) : c = e[5];
950
976
  const i = c;
951
977
  let l, m;
952
- e[6] !== t || e[7] !== n ? (l = /* @__PURE__ */ u(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
978
+ e[6] !== t || e[7] !== n ? (l = /* @__PURE__ */ o(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
953
979
  t.off(n.name);
954
- }), "t2"), m = [t, n], e[6] = t, e[7] = n, e[8] = l, e[9] = m) : (l = e[8], m = e[9]), C(l, m);
980
+ }), "t2"), m = [t, n], e[6] = t, e[7] = n, e[8] = l, e[9] = m) : (l = e[8], m = e[9]), q(l, m);
955
981
  let f;
956
- return e[10] !== o || e[11] !== i ? (f = {
957
- subscribe: o,
982
+ return e[10] !== u || e[11] !== i ? (f = {
983
+ subscribe: u,
958
984
  unsubscribe: i
959
- }, e[10] = o, e[11] = i, e[12] = f) : f = e[12], f;
985
+ }, e[10] = u, e[11] = i, e[12] = f) : f = e[12], f;
960
986
  }
961
- u(rt, "useEventSubscription");
987
+ o(st, "useEventSubscription");
962
988
  export {
963
- Se as ANONYMOUS_USER,
964
- ae as PromiseStatus,
965
- je as RefreshableRouteGuard,
966
- Ne as RouteGuard,
967
- J as SecurityContext,
968
- Ue as SecurityProvider,
969
- be as addFullscreenChangeListener,
970
- ke as createExecuteApiHooks,
971
- he as enterFullscreen,
972
- ye as exitFullscreen,
973
- me as getFullscreenElement,
974
- D as isValidateQuery,
975
- ge as removeFullscreenChangeListener,
976
- Ye as useCountQuery,
977
- k as useDebouncedCallback,
978
- Ae as useDebouncedExecutePromise,
979
- Ge as useDebouncedFetcher,
980
- Ke as useDebouncedFetcherQuery,
981
- Pe as useDebouncedQuery,
982
- rt as useEventSubscription,
989
+ pe as ANONYMOUS_USER,
990
+ de as PromiseStatus,
991
+ Ge as RefreshableRouteGuard,
992
+ Be as RouteGuard,
993
+ X as SecurityContext,
994
+ He as SecurityProvider,
995
+ xe as addFullscreenChangeListener,
996
+ V as collectMethods,
997
+ Ue as createExecuteApiHooks,
998
+ Ne as createQueryApiHooks,
999
+ Ee as enterFullscreen,
1000
+ ge as exitFullscreen,
1001
+ ye as getFullscreenElement,
1002
+ z as isValidateQuery,
1003
+ K as methodNameToHookName,
1004
+ be as removeFullscreenChangeListener,
1005
+ et as useCountQuery,
1006
+ D as useDebouncedCallback,
1007
+ Pe as useDebouncedExecutePromise,
1008
+ Ke as useDebouncedFetcher,
1009
+ Ve as useDebouncedFetcherQuery,
1010
+ ke as useDebouncedQuery,
1011
+ st as useEventSubscription,
983
1012
  T as useExecutePromise,
984
- X as useFetcher,
985
- Ve as useFetcherCountQuery,
986
- We as useFetcherListQuery,
987
- Be as useFetcherListStreamQuery,
988
- He as useFetcherPagedQuery,
989
- P as useFetcherQuery,
990
- Je as useFetcherSingleQuery,
991
- De as useForceUpdate,
992
- Me as useFullscreen,
993
- Te as useImmerKeyStorage,
994
- H as useKeyStorage,
995
- L as useLatest,
996
- Xe as useListQuery,
997
- Ze as useListStreamQuery,
1013
+ ee as useFetcher,
1014
+ We as useFetcherCountQuery,
1015
+ Je as useFetcherListQuery,
1016
+ Ye as useFetcherListStreamQuery,
1017
+ Xe as useFetcherPagedQuery,
1018
+ M as useFetcherQuery,
1019
+ Ze as useFetcherSingleQuery,
1020
+ Te as useForceUpdate,
1021
+ ze as useFullscreen,
1022
+ je as useImmerKeyStorage,
1023
+ Y as useKeyStorage,
1024
+ O as useLatest,
1025
+ tt as useListQuery,
1026
+ rt as useListStreamQuery,
998
1027
  W as useMounted,
999
- et as usePagedQuery,
1000
- fe as usePromiseState,
1001
- A as useQuery,
1002
- B as useQueryState,
1003
- ze as useRefs,
1004
- de as useRequestId,
1005
- Qe as useSecurity,
1006
- Y as useSecurityContext,
1007
- tt as useSingleQuery
1028
+ nt as usePagedQuery,
1029
+ me as usePromiseState,
1030
+ I as useQuery,
1031
+ J as useQueryState,
1032
+ De as useRefs,
1033
+ he as useRequestId,
1034
+ Re as useSecurity,
1035
+ Z as useSecurityContext,
1036
+ ct as useSingleQuery
1008
1037
  };
1009
1038
  //# sourceMappingURL=index.es.js.map