@ahoo-wang/fetcher-react 3.6.1 → 3.6.2
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/core/useQuery.d.ts +3 -5
- package/dist/core/useQuery.d.ts.map +1 -1
- package/dist/core/useQueryState.d.ts +30 -8
- package/dist/core/useQueryState.d.ts.map +1 -1
- package/dist/fetcher/useFetcherQuery.d.ts +3 -5
- package/dist/fetcher/useFetcherQuery.d.ts.map +1 -1
- package/dist/index.es.js +422 -422
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,331 +1,331 @@
|
|
|
1
1
|
var B = Object.defineProperty;
|
|
2
2
|
var s = (r, e) => B(r, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { c as
|
|
4
|
-
import { useRef as
|
|
3
|
+
import { c as _ } from "react/compiler-runtime";
|
|
4
|
+
import { useRef as $, useEffect as I, useState as A, useCallback as w, useMemo as M, useReducer as H, useSyncExternalStore as X, createContext as Z, useContext as ee } from "react";
|
|
5
5
|
import { jsx as N, Fragment as te } from "react/jsx-runtime";
|
|
6
6
|
import { nameGenerator as re } from "@ahoo-wang/fetcher-eventbus";
|
|
7
7
|
import { produce as ne } from "immer";
|
|
8
8
|
import { fetcherRegistrar as ce, getFetcher as se, JsonResultExtractor as ue } from "@ahoo-wang/fetcher";
|
|
9
9
|
import { JsonEventStreamResultExtractor as oe } from "@ahoo-wang/fetcher-eventstream";
|
|
10
|
-
function
|
|
11
|
-
const e =
|
|
10
|
+
function q(r) {
|
|
11
|
+
const e = $(r);
|
|
12
12
|
return e.current = r, e;
|
|
13
13
|
}
|
|
14
|
-
s(
|
|
15
|
-
function
|
|
16
|
-
const t =
|
|
14
|
+
s(q, "useLatest");
|
|
15
|
+
function D(r, e) {
|
|
16
|
+
const t = _(19);
|
|
17
17
|
if (e.leading === !1 && e.trailing === !1)
|
|
18
18
|
throw new Error("useDebouncedCallback: at least one of leading or trailing must be true");
|
|
19
|
-
const n =
|
|
20
|
-
let
|
|
21
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
19
|
+
const n = $(void 0), a = $(null), u = $(null), c = q(r), o = q(e);
|
|
20
|
+
let l;
|
|
21
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ s(() => {
|
|
22
22
|
n.current !== void 0 && (clearTimeout(n.current), n.current = void 0);
|
|
23
|
-
}, "t0"), t[0] =
|
|
24
|
-
const y =
|
|
23
|
+
}, "t0"), t[0] = l) : l = t[0];
|
|
24
|
+
const y = l;
|
|
25
25
|
let f;
|
|
26
|
-
t[1] !==
|
|
27
|
-
const
|
|
26
|
+
t[1] !== o ? (f = /* @__PURE__ */ s((F) => u.current ? F - u.current >= o.current.delay : !0, "t1"), t[1] = o, t[2] = f) : f = t[2];
|
|
27
|
+
const i = f;
|
|
28
28
|
let d;
|
|
29
|
-
t[3] !== c ? (d = /* @__PURE__ */ s((F,
|
|
30
|
-
|
|
29
|
+
t[3] !== c ? (d = /* @__PURE__ */ s((F, C) => {
|
|
30
|
+
u.current = F, c.current(...C);
|
|
31
31
|
}, "t2"), t[3] = c, t[4] = d) : d = t[4];
|
|
32
32
|
const m = d;
|
|
33
33
|
let b;
|
|
34
|
-
t[5] !== m || t[6] !==
|
|
34
|
+
t[5] !== m || t[6] !== o ? (b = /* @__PURE__ */ s(() => {
|
|
35
35
|
n.current = setTimeout(() => {
|
|
36
|
-
if (
|
|
36
|
+
if (a.current) {
|
|
37
37
|
const F = Date.now();
|
|
38
|
-
m(F,
|
|
38
|
+
m(F, a.current);
|
|
39
39
|
}
|
|
40
40
|
n.current = void 0;
|
|
41
|
-
},
|
|
42
|
-
}, "t3"), t[5] = m, t[6] =
|
|
43
|
-
const
|
|
41
|
+
}, o.current.delay);
|
|
42
|
+
}, "t3"), t[5] = m, t[6] = o, t[7] = b) : b = t[7];
|
|
43
|
+
const h = b;
|
|
44
44
|
let g;
|
|
45
|
-
t[8] !== m || t[9] !==
|
|
46
|
-
const
|
|
45
|
+
t[8] !== m || t[9] !== o || t[10] !== h || t[11] !== i ? (g = /* @__PURE__ */ s((...F) => {
|
|
46
|
+
const C = F;
|
|
47
47
|
y();
|
|
48
48
|
const {
|
|
49
49
|
leading: U,
|
|
50
50
|
trailing: k
|
|
51
|
-
} =
|
|
52
|
-
if (
|
|
53
|
-
|
|
51
|
+
} = o.current, z = U === void 0 ? !1 : U, G = k === void 0 ? !0 : k;
|
|
52
|
+
if (a.current = C, G && !z) {
|
|
53
|
+
h();
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
const K = Date.now();
|
|
57
|
-
if (z &&
|
|
58
|
-
m(K,
|
|
57
|
+
if (z && i(K)) {
|
|
58
|
+
m(K, C);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
-
G &&
|
|
62
|
-
}, "t4"), t[8] = m, t[9] =
|
|
63
|
-
const
|
|
61
|
+
G && h();
|
|
62
|
+
}, "t4"), t[8] = m, t[9] = o, t[10] = h, t[11] = i, t[12] = g) : g = t[12];
|
|
63
|
+
const x = g;
|
|
64
64
|
let E;
|
|
65
65
|
t[13] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ s(() => {
|
|
66
|
-
y(),
|
|
66
|
+
y(), a.current = null;
|
|
67
67
|
}, "t5"), t[13] = E) : E = t[13];
|
|
68
68
|
const v = E;
|
|
69
|
-
let
|
|
70
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
71
|
-
const
|
|
72
|
-
let R,
|
|
69
|
+
let Q;
|
|
70
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ s(() => n.current !== void 0, "t6"), t[14] = Q) : Q = t[14];
|
|
71
|
+
const S = Q;
|
|
72
|
+
let R, O;
|
|
73
73
|
t[15] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ s(() => () => {
|
|
74
74
|
v();
|
|
75
|
-
}, "t7"),
|
|
75
|
+
}, "t7"), O = [v], t[15] = R, t[16] = O) : (R = t[15], O = t[16]), I(R, O);
|
|
76
76
|
let L;
|
|
77
|
-
return t[17] !==
|
|
78
|
-
run:
|
|
77
|
+
return t[17] !== x ? (L = {
|
|
78
|
+
run: x,
|
|
79
79
|
cancel: v,
|
|
80
|
-
isPending:
|
|
81
|
-
}, t[17] =
|
|
80
|
+
isPending: S
|
|
81
|
+
}, t[17] = x, t[18] = L) : L = t[18], L;
|
|
82
82
|
}
|
|
83
|
-
s(
|
|
83
|
+
s(D, "useDebouncedCallback");
|
|
84
84
|
function W() {
|
|
85
|
-
const r =
|
|
85
|
+
const r = _(3), e = $(!1);
|
|
86
86
|
let t;
|
|
87
87
|
r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current, "t0"), r[0] = t) : t = r[0];
|
|
88
88
|
const n = t;
|
|
89
|
-
let
|
|
90
|
-
return r[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
89
|
+
let a, u;
|
|
90
|
+
return r[1] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ s(() => (e.current = !0, () => {
|
|
91
91
|
e.current = !1;
|
|
92
|
-
}), "t1"),
|
|
92
|
+
}), "t1"), u = [], r[1] = a, r[2] = u) : (a = r[1], u = r[2]), I(a, u), n;
|
|
93
93
|
}
|
|
94
94
|
s(W, "useMounted");
|
|
95
95
|
var le = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(le || {});
|
|
96
96
|
function ie(r) {
|
|
97
|
-
const [e, t] =
|
|
97
|
+
const [e, t] = A(
|
|
98
98
|
r?.initialStatus ?? "idle"
|
|
99
99
|
/* IDLE */
|
|
100
|
-
), [n,
|
|
101
|
-
|
|
100
|
+
), [n, a] = A(void 0), [u, c] = A(void 0), o = W(), l = q(r), y = w(() => {
|
|
101
|
+
o() && (t(
|
|
102
102
|
"loading"
|
|
103
103
|
/* LOADING */
|
|
104
104
|
), c(void 0));
|
|
105
|
-
}, [
|
|
106
|
-
if (
|
|
107
|
-
|
|
105
|
+
}, [o]), f = w(async (m) => {
|
|
106
|
+
if (o()) {
|
|
107
|
+
a(m), t(
|
|
108
108
|
"success"
|
|
109
109
|
/* SUCCESS */
|
|
110
110
|
), c(void 0);
|
|
111
111
|
try {
|
|
112
|
-
await
|
|
112
|
+
await l.current?.onSuccess?.(m);
|
|
113
113
|
} catch (b) {
|
|
114
114
|
console.warn("PromiseState onSuccess callback error:", b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
}, [
|
|
118
|
-
if (
|
|
117
|
+
}, [o, l]), i = w(async (m) => {
|
|
118
|
+
if (o()) {
|
|
119
119
|
c(m), t(
|
|
120
120
|
"error"
|
|
121
121
|
/* ERROR */
|
|
122
|
-
),
|
|
122
|
+
), a(void 0);
|
|
123
123
|
try {
|
|
124
|
-
await
|
|
124
|
+
await l.current?.onError?.(m);
|
|
125
125
|
} catch (b) {
|
|
126
126
|
console.warn("PromiseState onError callback error:", b);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
}, [
|
|
130
|
-
|
|
129
|
+
}, [o, l]), d = w(() => {
|
|
130
|
+
o() && (t(
|
|
131
131
|
"idle"
|
|
132
132
|
/* IDLE */
|
|
133
|
-
), c(void 0),
|
|
134
|
-
}, [
|
|
135
|
-
return
|
|
133
|
+
), c(void 0), a(void 0));
|
|
134
|
+
}, [o]);
|
|
135
|
+
return M(() => ({
|
|
136
136
|
status: e,
|
|
137
137
|
loading: e === "loading",
|
|
138
138
|
result: n,
|
|
139
|
-
error:
|
|
139
|
+
error: u,
|
|
140
140
|
setLoading: y,
|
|
141
141
|
setSuccess: f,
|
|
142
|
-
setError:
|
|
142
|
+
setError: i,
|
|
143
143
|
setIdle: d
|
|
144
|
-
}), [e, n,
|
|
144
|
+
}), [e, n, u, y, f, i, d]);
|
|
145
145
|
}
|
|
146
146
|
s(ie, "usePromiseState");
|
|
147
147
|
function ae() {
|
|
148
|
-
const r =
|
|
148
|
+
const r = _(6), e = $(0);
|
|
149
149
|
let t;
|
|
150
150
|
r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
|
|
151
151
|
const n = t;
|
|
152
|
-
let
|
|
153
|
-
r[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
154
|
-
const
|
|
152
|
+
let a;
|
|
153
|
+
r[1] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ s(() => e.current, "t1"), r[1] = a) : a = r[1];
|
|
154
|
+
const u = a;
|
|
155
155
|
let c;
|
|
156
156
|
r[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ s((m) => m === e.current, "t2"), r[2] = c) : c = r[2];
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
r[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
157
|
+
const o = c;
|
|
158
|
+
let l;
|
|
159
|
+
r[3] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ s(() => {
|
|
160
160
|
e.current = e.current + 1;
|
|
161
|
-
}, "t3"), r[3] =
|
|
162
|
-
const y =
|
|
161
|
+
}, "t3"), r[3] = l) : l = r[3];
|
|
162
|
+
const y = l;
|
|
163
163
|
let f;
|
|
164
164
|
r[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ s(() => {
|
|
165
165
|
e.current = 0;
|
|
166
166
|
}, "t4"), r[4] = f) : f = r[4];
|
|
167
|
-
const
|
|
167
|
+
const i = f;
|
|
168
168
|
let d;
|
|
169
169
|
return r[5] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
170
170
|
generate: n,
|
|
171
|
-
current:
|
|
172
|
-
isLatest:
|
|
171
|
+
current: u,
|
|
172
|
+
isLatest: o,
|
|
173
173
|
invalidate: y,
|
|
174
|
-
reset:
|
|
174
|
+
reset: i
|
|
175
175
|
}, r[5] = d) : d = r[5], d;
|
|
176
176
|
}
|
|
177
177
|
s(ae, "useRequestId");
|
|
178
|
-
function
|
|
178
|
+
function T(r) {
|
|
179
179
|
const {
|
|
180
180
|
loading: e,
|
|
181
181
|
result: t,
|
|
182
182
|
error: n,
|
|
183
|
-
status:
|
|
184
|
-
setLoading:
|
|
183
|
+
status: a,
|
|
184
|
+
setLoading: u,
|
|
185
185
|
setSuccess: c,
|
|
186
|
-
setError:
|
|
187
|
-
setIdle:
|
|
188
|
-
} = ie(r), y = W(), f = ae(),
|
|
186
|
+
setError: o,
|
|
187
|
+
setIdle: l
|
|
188
|
+
} = ie(r), y = W(), f = ae(), i = $(void 0), d = r?.propagateError, m = q(r?.onAbort), b = w(async () => {
|
|
189
189
|
try {
|
|
190
190
|
await m.current?.();
|
|
191
191
|
} catch (E) {
|
|
192
192
|
console.warn("useExecutePromise onAbort callback error:", E);
|
|
193
193
|
}
|
|
194
|
-
}, [m]),
|
|
195
|
-
|
|
194
|
+
}, [m]), h = w(async (E) => {
|
|
195
|
+
i.current && (i.current.abort(), await b());
|
|
196
196
|
const v = new AbortController();
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
|
|
197
|
+
i.current = v;
|
|
198
|
+
const Q = f.generate();
|
|
199
|
+
u();
|
|
200
200
|
try {
|
|
201
|
-
const
|
|
202
|
-
y() && f.isLatest(
|
|
203
|
-
} catch (
|
|
204
|
-
if (
|
|
205
|
-
y() &&
|
|
201
|
+
const S = await E(v);
|
|
202
|
+
y() && f.isLatest(Q) && await c(S);
|
|
203
|
+
} catch (S) {
|
|
204
|
+
if (S instanceof Error && S.name === "AbortError") {
|
|
205
|
+
y() && l();
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
if (y() && f.isLatest(
|
|
209
|
-
throw
|
|
208
|
+
if (y() && f.isLatest(Q) && await o(S), d)
|
|
209
|
+
throw S;
|
|
210
210
|
} finally {
|
|
211
|
-
|
|
211
|
+
i.current === v && (i.current = void 0);
|
|
212
212
|
}
|
|
213
|
-
}, [
|
|
214
|
-
y() &&
|
|
215
|
-
}, [
|
|
216
|
-
g(),
|
|
213
|
+
}, [u, c, o, l, y, f, d, b]), g = w(() => {
|
|
214
|
+
y() && l();
|
|
215
|
+
}, [l, y]), x = w(async () => {
|
|
216
|
+
g(), i.current && (i.current.abort(), i.current = void 0, await b());
|
|
217
217
|
}, [g, b]);
|
|
218
218
|
return I(() => () => {
|
|
219
|
-
|
|
220
|
-
}, [
|
|
219
|
+
x();
|
|
220
|
+
}, [x]), M(() => ({
|
|
221
221
|
loading: e,
|
|
222
222
|
result: t,
|
|
223
223
|
error: n,
|
|
224
|
-
status:
|
|
225
|
-
execute:
|
|
224
|
+
status: a,
|
|
225
|
+
execute: h,
|
|
226
226
|
reset: g,
|
|
227
|
-
abort:
|
|
228
|
-
}), [e, t, n,
|
|
227
|
+
abort: x
|
|
228
|
+
}), [e, t, n, a, h, g, x]);
|
|
229
229
|
}
|
|
230
|
-
s(
|
|
231
|
-
function
|
|
232
|
-
const e =
|
|
230
|
+
s(T, "useExecutePromise");
|
|
231
|
+
function _e(r) {
|
|
232
|
+
const e = _(10), {
|
|
233
233
|
loading: t,
|
|
234
234
|
result: n,
|
|
235
|
-
error:
|
|
236
|
-
execute:
|
|
235
|
+
error: a,
|
|
236
|
+
execute: u,
|
|
237
237
|
reset: c,
|
|
238
|
-
abort:
|
|
239
|
-
status:
|
|
240
|
-
} =
|
|
238
|
+
abort: o,
|
|
239
|
+
status: l
|
|
240
|
+
} = T(r), {
|
|
241
241
|
run: y,
|
|
242
242
|
cancel: f,
|
|
243
|
-
isPending:
|
|
244
|
-
} =
|
|
243
|
+
isPending: i
|
|
244
|
+
} = D(u, r.debounce);
|
|
245
245
|
let d;
|
|
246
|
-
return e[0] !==
|
|
246
|
+
return e[0] !== o || e[1] !== f || e[2] !== a || e[3] !== i || e[4] !== t || e[5] !== c || e[6] !== n || e[7] !== y || e[8] !== l ? (d = {
|
|
247
247
|
loading: t,
|
|
248
248
|
result: n,
|
|
249
|
-
error:
|
|
250
|
-
status:
|
|
249
|
+
error: a,
|
|
250
|
+
status: l,
|
|
251
251
|
reset: c,
|
|
252
|
-
abort:
|
|
252
|
+
abort: o,
|
|
253
253
|
run: y,
|
|
254
254
|
cancel: f,
|
|
255
|
-
isPending:
|
|
256
|
-
}, e[0] =
|
|
255
|
+
isPending: i
|
|
256
|
+
}, e[0] = o, e[1] = f, e[2] = a, e[3] = i, e[4] = t, e[5] = c, e[6] = n, e[7] = y, e[8] = l, e[9] = d) : d = e[9], d;
|
|
257
257
|
}
|
|
258
|
-
s(
|
|
259
|
-
function
|
|
260
|
-
const e =
|
|
258
|
+
s(_e, "useDebouncedExecutePromise");
|
|
259
|
+
function Re(r) {
|
|
260
|
+
const e = _(22), t = r.autoExecute;
|
|
261
261
|
let n;
|
|
262
262
|
e[0] !== r ? (n = {
|
|
263
263
|
...r,
|
|
264
264
|
autoExecute: !1
|
|
265
265
|
}, e[0] = r, e[1] = n) : n = e[1];
|
|
266
|
-
const
|
|
267
|
-
loading:
|
|
266
|
+
const a = n, {
|
|
267
|
+
loading: u,
|
|
268
268
|
result: c,
|
|
269
|
-
error:
|
|
270
|
-
status:
|
|
269
|
+
error: o,
|
|
270
|
+
status: l,
|
|
271
271
|
execute: y,
|
|
272
272
|
reset: f,
|
|
273
|
-
abort:
|
|
273
|
+
abort: i,
|
|
274
274
|
getQuery: d,
|
|
275
275
|
setQuery: m
|
|
276
|
-
} =
|
|
276
|
+
} = p(a), {
|
|
277
277
|
run: b,
|
|
278
|
-
cancel:
|
|
278
|
+
cancel: h,
|
|
279
279
|
isPending: g
|
|
280
|
-
} =
|
|
281
|
-
let
|
|
282
|
-
e[2] !== t || e[3] !== b || e[4] !== m ? (
|
|
280
|
+
} = D(y, r.debounce);
|
|
281
|
+
let x;
|
|
282
|
+
e[2] !== t || e[3] !== b || e[4] !== m ? (x = /* @__PURE__ */ s((R) => {
|
|
283
283
|
m(R), t && b();
|
|
284
|
-
}, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] =
|
|
285
|
-
const E =
|
|
286
|
-
let v,
|
|
284
|
+
}, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = x) : x = e[5];
|
|
285
|
+
const E = x;
|
|
286
|
+
let v, Q;
|
|
287
287
|
e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
|
|
288
288
|
t && b();
|
|
289
|
-
}, "t2"),
|
|
290
|
-
let
|
|
291
|
-
return e[10] !==
|
|
292
|
-
loading:
|
|
289
|
+
}, "t2"), Q = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = Q) : (v = e[8], Q = e[9]), I(v, Q);
|
|
290
|
+
let S;
|
|
291
|
+
return e[10] !== i || e[11] !== h || e[12] !== o || e[13] !== d || e[14] !== g || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== l ? (S = {
|
|
292
|
+
loading: u,
|
|
293
293
|
result: c,
|
|
294
|
-
error:
|
|
295
|
-
status:
|
|
294
|
+
error: o,
|
|
295
|
+
status: l,
|
|
296
296
|
reset: f,
|
|
297
|
-
abort:
|
|
297
|
+
abort: i,
|
|
298
298
|
getQuery: d,
|
|
299
299
|
setQuery: E,
|
|
300
300
|
run: b,
|
|
301
|
-
cancel:
|
|
301
|
+
cancel: h,
|
|
302
302
|
isPending: g
|
|
303
|
-
}, e[10] =
|
|
303
|
+
}, e[10] = i, e[11] = h, e[12] = o, e[13] = d, e[14] = g, e[15] = u, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = l, e[21] = S) : S = e[21], S;
|
|
304
304
|
}
|
|
305
|
-
s(
|
|
306
|
-
function
|
|
307
|
-
const r =
|
|
308
|
-
d ? r.current.set(
|
|
305
|
+
s(Re, "useDebouncedQuery");
|
|
306
|
+
function Fe() {
|
|
307
|
+
const r = $(/* @__PURE__ */ new Map()), e = w((i) => r.current.get(i), []), t = w((i, d) => r.current.set(i, d), []), n = w((i) => r.current.has(i), []), a = w((i) => r.current.delete(i), []), u = w(() => r.current.clear(), []), c = w(() => r.current.keys(), []), o = w(() => r.current.values(), []), l = w(() => r.current.entries(), []), y = w(() => r.current[Symbol.iterator](), []), f = w((i) => (d) => {
|
|
308
|
+
d ? r.current.set(i, d) : r.current.delete(i);
|
|
309
309
|
}, []);
|
|
310
310
|
return I(() => () => {
|
|
311
311
|
r.current.clear();
|
|
312
|
-
}, []),
|
|
312
|
+
}, []), M(() => ({
|
|
313
313
|
register: f,
|
|
314
314
|
get: e,
|
|
315
315
|
set: t,
|
|
316
316
|
has: n,
|
|
317
|
-
delete:
|
|
318
|
-
clear:
|
|
317
|
+
delete: a,
|
|
318
|
+
clear: u,
|
|
319
319
|
keys: c,
|
|
320
|
-
values:
|
|
321
|
-
entries:
|
|
320
|
+
values: o,
|
|
321
|
+
entries: l,
|
|
322
322
|
get size() {
|
|
323
323
|
return r.current.size;
|
|
324
324
|
},
|
|
325
325
|
[Symbol.iterator]: y
|
|
326
|
-
}), [f, e, t, n,
|
|
326
|
+
}), [f, e, t, n, a, u, c, o, l, y]);
|
|
327
327
|
}
|
|
328
|
-
s(
|
|
328
|
+
s(Fe, "useRefs");
|
|
329
329
|
function Ce() {
|
|
330
330
|
const [, r] = H(fe, 0);
|
|
331
331
|
return r;
|
|
@@ -335,477 +335,477 @@ function fe(r) {
|
|
|
335
335
|
return r + 1;
|
|
336
336
|
}
|
|
337
337
|
s(fe, "_temp");
|
|
338
|
-
const de = [];
|
|
339
338
|
function j(r) {
|
|
340
|
-
const e =
|
|
339
|
+
const e = _(12), {
|
|
341
340
|
initialQuery: t,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
} = r, c =
|
|
341
|
+
query: n,
|
|
342
|
+
autoExecute: a,
|
|
343
|
+
execute: u
|
|
344
|
+
} = r, c = a === void 0 ? !0 : a, o = n ?? t;
|
|
345
|
+
if (o === void 0)
|
|
346
|
+
throw new Error("Either initialQuery or query must be provided.");
|
|
347
|
+
const l = $(o);
|
|
346
348
|
let y;
|
|
347
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(() =>
|
|
349
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(() => l.current, "t1"), e[0] = y) : y = e[0];
|
|
348
350
|
const f = y;
|
|
349
|
-
let
|
|
350
|
-
e[1] !== c || e[2] !==
|
|
351
|
-
c &&
|
|
352
|
-
}, "
|
|
353
|
-
const d =
|
|
351
|
+
let i;
|
|
352
|
+
e[1] !== c || e[2] !== u ? (i = /* @__PURE__ */ s(() => {
|
|
353
|
+
c && u(f());
|
|
354
|
+
}, "t2"), e[1] = c, e[2] = u, e[3] = i) : i = e[3];
|
|
355
|
+
const d = i;
|
|
354
356
|
let m;
|
|
355
357
|
e[4] !== d ? (m = /* @__PURE__ */ s((E) => {
|
|
356
|
-
|
|
357
|
-
}, "
|
|
358
|
+
l.current = E, d();
|
|
359
|
+
}, "t3"), e[4] = d, e[5] = m) : m = e[5];
|
|
358
360
|
const b = m;
|
|
361
|
+
let h, g;
|
|
362
|
+
e[6] !== d || e[7] !== n ? (h = /* @__PURE__ */ s(() => {
|
|
363
|
+
n && (l.current = n), d();
|
|
364
|
+
}, "t4"), g = [d, n], e[6] = d, e[7] = n, e[8] = h, e[9] = g) : (h = e[8], g = e[9]), I(h, g);
|
|
359
365
|
let x;
|
|
360
|
-
e[
|
|
361
|
-
d();
|
|
362
|
-
}, "t5"), e[6] = d, e[7] = x) : x = e[7];
|
|
363
|
-
let g;
|
|
364
|
-
e[8] !== u || e[9] !== d ? (g = [d, ...u], e[8] = u, e[9] = d, e[10] = g) : g = e[10], I(x, g);
|
|
365
|
-
let h;
|
|
366
|
-
return e[11] !== b ? (h = {
|
|
366
|
+
return e[10] !== b ? (x = {
|
|
367
367
|
getQuery: f,
|
|
368
368
|
setQuery: b
|
|
369
|
-
}, e[
|
|
369
|
+
}, e[10] = b, e[11] = x) : x = e[11], x;
|
|
370
370
|
}
|
|
371
371
|
s(j, "useQueryState");
|
|
372
|
-
function
|
|
373
|
-
const e =
|
|
372
|
+
function p(r) {
|
|
373
|
+
const e = _(21), t = q(r), {
|
|
374
374
|
loading: n,
|
|
375
|
-
result:
|
|
376
|
-
error:
|
|
375
|
+
result: a,
|
|
376
|
+
error: u,
|
|
377
377
|
status: c,
|
|
378
|
-
execute:
|
|
379
|
-
reset:
|
|
378
|
+
execute: o,
|
|
379
|
+
reset: l,
|
|
380
380
|
abort: y
|
|
381
|
-
} =
|
|
381
|
+
} = T(r);
|
|
382
382
|
let f;
|
|
383
|
-
e[0] !== t || e[1] !==
|
|
384
|
-
const
|
|
383
|
+
e[0] !== t || e[1] !== o ? (f = /* @__PURE__ */ s((E) => o(/* @__PURE__ */ s(async (Q) => t.current.execute(E, t.current.attributes, Q), "queryExecutor")), "t0"), e[0] = t, e[1] = o, e[2] = f) : f = e[2];
|
|
384
|
+
const i = f;
|
|
385
385
|
let d;
|
|
386
|
-
e[3] !==
|
|
386
|
+
e[3] !== i || e[4] !== r.autoExecute || e[5] !== r.initialQuery || e[6] !== r.query ? (d = {
|
|
387
387
|
initialQuery: r.initialQuery,
|
|
388
|
+
query: r.query,
|
|
388
389
|
autoExecute: r.autoExecute,
|
|
389
|
-
execute:
|
|
390
|
-
|
|
391
|
-
}, e[3] = a, e[4] = r.autoExecute, e[5] = r.deps, e[6] = r.initialQuery, e[7] = d) : d = e[7];
|
|
390
|
+
execute: i
|
|
391
|
+
}, e[3] = i, e[4] = r.autoExecute, e[5] = r.initialQuery, e[6] = r.query, e[7] = d) : d = e[7];
|
|
392
392
|
const {
|
|
393
393
|
getQuery: m,
|
|
394
394
|
setQuery: b
|
|
395
395
|
} = j(d);
|
|
396
|
-
let x;
|
|
397
|
-
e[8] !== a || e[9] !== m ? (x = /* @__PURE__ */ s(() => a(m()), "t2"), e[8] = a, e[9] = m, e[10] = x) : x = e[10];
|
|
398
|
-
const g = x;
|
|
399
396
|
let h;
|
|
400
|
-
|
|
397
|
+
e[8] !== i || e[9] !== m ? (h = /* @__PURE__ */ s(() => i(m()), "t2"), e[8] = i, e[9] = m, e[10] = h) : h = e[10];
|
|
398
|
+
const g = h;
|
|
399
|
+
let x;
|
|
400
|
+
return e[11] !== y || e[12] !== u || e[13] !== g || e[14] !== m || e[15] !== n || e[16] !== l || e[17] !== a || e[18] !== b || e[19] !== c ? (x = {
|
|
401
401
|
loading: n,
|
|
402
|
-
result:
|
|
403
|
-
error:
|
|
402
|
+
result: a,
|
|
403
|
+
error: u,
|
|
404
404
|
status: c,
|
|
405
405
|
execute: g,
|
|
406
|
-
reset:
|
|
406
|
+
reset: l,
|
|
407
407
|
abort: y,
|
|
408
408
|
getQuery: m,
|
|
409
409
|
setQuery: b
|
|
410
|
-
}, e[11] = y, e[12] =
|
|
410
|
+
}, e[11] = y, e[12] = u, e[13] = g, e[14] = m, e[15] = n, e[16] = l, e[17] = a, e[18] = b, e[19] = c, e[20] = x) : x = e[20], x;
|
|
411
411
|
}
|
|
412
|
-
s(
|
|
412
|
+
s(p, "useQuery");
|
|
413
413
|
function J(r, e) {
|
|
414
|
-
const t =
|
|
414
|
+
const t = _(13);
|
|
415
415
|
let n;
|
|
416
416
|
t[0] !== r ? (n = /* @__PURE__ */ s((m) => r.addListener({
|
|
417
417
|
name: re.generate("useKeyStorage"),
|
|
418
418
|
handle: m
|
|
419
419
|
}), "t0"), t[0] = r, t[1] = n) : n = t[1];
|
|
420
|
-
const
|
|
421
|
-
let
|
|
422
|
-
t[2] !== e || t[3] !== r ? (
|
|
420
|
+
const a = n;
|
|
421
|
+
let u;
|
|
422
|
+
t[2] !== e || t[3] !== r ? (u = /* @__PURE__ */ s(() => {
|
|
423
423
|
const m = r.get();
|
|
424
424
|
return m !== null ? m : e ?? null;
|
|
425
|
-
}, "t1"), t[2] = e, t[3] = r, t[4] =
|
|
426
|
-
const c =
|
|
427
|
-
let
|
|
428
|
-
t[5] !== r ? (
|
|
429
|
-
const y =
|
|
425
|
+
}, "t1"), t[2] = e, t[3] = r, t[4] = u) : u = t[4];
|
|
426
|
+
const c = u, o = X(a, c, c);
|
|
427
|
+
let l;
|
|
428
|
+
t[5] !== r ? (l = /* @__PURE__ */ s((m) => r.set(m), "t2"), t[5] = r, t[6] = l) : l = t[6];
|
|
429
|
+
const y = l;
|
|
430
430
|
let f;
|
|
431
431
|
t[7] !== r ? (f = /* @__PURE__ */ s(() => r.remove(), "t3"), t[7] = r, t[8] = f) : f = t[8];
|
|
432
|
-
const
|
|
432
|
+
const i = f;
|
|
433
433
|
let d;
|
|
434
|
-
return t[9] !==
|
|
434
|
+
return t[9] !== i || t[10] !== y || t[11] !== o ? (d = [o, y, i], t[9] = i, t[10] = y, t[11] = o, t[12] = d) : d = t[12], d;
|
|
435
435
|
}
|
|
436
436
|
s(J, "useKeyStorage");
|
|
437
437
|
function Oe(r, e) {
|
|
438
|
-
const t =
|
|
438
|
+
const t = _(8), [n, a, u] = J(r, e);
|
|
439
439
|
let c;
|
|
440
|
-
t[0] !==
|
|
440
|
+
t[0] !== u || t[1] !== a || t[2] !== n ? (c = /* @__PURE__ */ s((y) => {
|
|
441
441
|
const f = ne(n, y);
|
|
442
442
|
if (f === null) {
|
|
443
|
-
|
|
443
|
+
u();
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
|
-
return
|
|
447
|
-
}, "t0"), t[0] =
|
|
448
|
-
const
|
|
449
|
-
let
|
|
450
|
-
return t[4] !==
|
|
446
|
+
return a(f);
|
|
447
|
+
}, "t0"), t[0] = u, t[1] = a, t[2] = n, t[3] = c) : c = t[3];
|
|
448
|
+
const o = c;
|
|
449
|
+
let l;
|
|
450
|
+
return t[4] !== u || t[5] !== o || t[6] !== n ? (l = [n, o, u], t[4] = u, t[5] = o, t[6] = n, t[7] = l) : l = t[7], l;
|
|
451
451
|
}
|
|
452
452
|
s(Oe, "useImmerKeyStorage");
|
|
453
|
-
const
|
|
453
|
+
const de = {
|
|
454
454
|
jti: "",
|
|
455
455
|
sub: "anonymous",
|
|
456
456
|
iat: 0,
|
|
457
457
|
exp: 0
|
|
458
458
|
};
|
|
459
|
-
function
|
|
460
|
-
const t =
|
|
459
|
+
function me(r, e) {
|
|
460
|
+
const t = _(13);
|
|
461
461
|
let n;
|
|
462
462
|
t[0] !== e ? (n = e === void 0 ? {} : e, t[0] = e, t[1] = n) : n = t[1];
|
|
463
|
-
const
|
|
464
|
-
let
|
|
465
|
-
t[2] !==
|
|
466
|
-
const g = typeof
|
|
467
|
-
r.signIn(g),
|
|
468
|
-
}, "t2"), t[2] =
|
|
469
|
-
const y =
|
|
463
|
+
const a = n, [u, , c] = J(r), o = q(a);
|
|
464
|
+
let l;
|
|
465
|
+
t[2] !== o || t[3] !== r ? (l = /* @__PURE__ */ s(async (h) => {
|
|
466
|
+
const g = typeof h == "function" ? await h() : h;
|
|
467
|
+
r.signIn(g), o.current.onSignIn?.();
|
|
468
|
+
}, "t2"), t[2] = o, t[3] = r, t[4] = l) : l = t[4];
|
|
469
|
+
const y = l;
|
|
470
470
|
let f;
|
|
471
|
-
t[5] !==
|
|
472
|
-
c(),
|
|
473
|
-
}, "t3"), t[5] =
|
|
474
|
-
const
|
|
471
|
+
t[5] !== o || t[6] !== c ? (f = /* @__PURE__ */ s(() => {
|
|
472
|
+
c(), o.current.onSignOut?.();
|
|
473
|
+
}, "t3"), t[5] = o, t[6] = c, t[7] = f) : f = t[7];
|
|
474
|
+
const i = f, d = u?.access?.payload ?? de, m = u?.authenticated ?? !1;
|
|
475
475
|
let b;
|
|
476
|
-
return t[8] !== y || t[9] !==
|
|
476
|
+
return t[8] !== y || t[9] !== i || t[10] !== d || t[11] !== m ? (b = {
|
|
477
477
|
currentUser: d,
|
|
478
478
|
authenticated: m,
|
|
479
479
|
signIn: y,
|
|
480
|
-
signOut:
|
|
481
|
-
}, t[8] = y, t[9] =
|
|
480
|
+
signOut: i
|
|
481
|
+
}, t[8] = y, t[9] = i, t[10] = d, t[11] = m, t[12] = b) : b = t[12], b;
|
|
482
482
|
}
|
|
483
|
-
s(
|
|
483
|
+
s(me, "useSecurity");
|
|
484
484
|
const V = Z(void 0);
|
|
485
485
|
function $e(r) {
|
|
486
|
-
const e =
|
|
487
|
-
let t, n,
|
|
486
|
+
const e = _(7);
|
|
487
|
+
let t, n, a;
|
|
488
488
|
e[0] !== r ? ({
|
|
489
489
|
tokenStorage: n,
|
|
490
490
|
children: t,
|
|
491
|
-
...
|
|
492
|
-
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] =
|
|
493
|
-
const
|
|
491
|
+
...a
|
|
492
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = a) : (t = e[1], n = e[2], a = e[3]);
|
|
493
|
+
const u = me(n, a);
|
|
494
494
|
let c;
|
|
495
|
-
return e[4] !== t || e[5] !==
|
|
495
|
+
return e[4] !== t || e[5] !== u ? (c = /* @__PURE__ */ N(V.Provider, { value: u, children: t }), e[4] = t, e[5] = u, e[6] = c) : c = e[6], c;
|
|
496
496
|
}
|
|
497
497
|
s($e, "SecurityProvider");
|
|
498
|
-
function
|
|
498
|
+
function ye() {
|
|
499
499
|
const r = ee(V);
|
|
500
500
|
if (!r)
|
|
501
501
|
throw new Error("useSecurityContext must be used within a SecurityProvider");
|
|
502
502
|
return r;
|
|
503
503
|
}
|
|
504
|
-
s(
|
|
505
|
-
function
|
|
506
|
-
const e =
|
|
504
|
+
s(ye, "useSecurityContext");
|
|
505
|
+
function qe(r) {
|
|
506
|
+
const e = _(2), {
|
|
507
507
|
children: t,
|
|
508
508
|
fallback: n,
|
|
509
|
-
onUnauthorized:
|
|
509
|
+
onUnauthorized: a
|
|
510
510
|
} = r, {
|
|
511
|
-
authenticated:
|
|
512
|
-
} =
|
|
513
|
-
if (
|
|
511
|
+
authenticated: u
|
|
512
|
+
} = ye();
|
|
513
|
+
if (u) {
|
|
514
514
|
let c;
|
|
515
515
|
return e[0] !== t ? (c = /* @__PURE__ */ N(te, { children: t }), e[0] = t, e[1] = c) : c = e[1], c;
|
|
516
516
|
}
|
|
517
|
-
return
|
|
517
|
+
return a && a(), n;
|
|
518
518
|
}
|
|
519
|
-
s(
|
|
519
|
+
s(qe, "RouteGuard");
|
|
520
520
|
function Y(r) {
|
|
521
|
-
const e =
|
|
521
|
+
const e = _(21);
|
|
522
522
|
let t;
|
|
523
523
|
e[0] !== r ? (t = r || {}, e[0] = r, e[1] = t) : t = e[1];
|
|
524
524
|
const {
|
|
525
525
|
fetcher: n
|
|
526
|
-
} = t,
|
|
527
|
-
loading:
|
|
526
|
+
} = t, a = n === void 0 ? ce.default : n, {
|
|
527
|
+
loading: u,
|
|
528
528
|
result: c,
|
|
529
|
-
error:
|
|
530
|
-
status:
|
|
529
|
+
error: o,
|
|
530
|
+
status: l,
|
|
531
531
|
execute: y,
|
|
532
532
|
reset: f,
|
|
533
|
-
abort:
|
|
534
|
-
} =
|
|
535
|
-
let x;
|
|
536
|
-
e[2] !== o ? (x = se(o), e[2] = o, e[3] = x) : x = e[3];
|
|
537
|
-
const g = x;
|
|
533
|
+
abort: i
|
|
534
|
+
} = T(r), [d, m] = A(void 0), b = q(r);
|
|
538
535
|
let h;
|
|
539
|
-
e[
|
|
536
|
+
e[2] !== a ? (h = se(a), e[2] = a, e[3] = h) : h = e[3];
|
|
537
|
+
const g = h;
|
|
538
|
+
let x;
|
|
539
|
+
e[4] !== g || e[5] !== b || e[6] !== y ? (x = /* @__PURE__ */ s(async (L) => {
|
|
540
540
|
try {
|
|
541
541
|
await y(async (F) => {
|
|
542
542
|
L.abortController = F;
|
|
543
|
-
const
|
|
544
|
-
return m(
|
|
543
|
+
const C = await g.exchange(L, b.current);
|
|
544
|
+
return m(C), await C.extractResult();
|
|
545
545
|
});
|
|
546
546
|
} catch (F) {
|
|
547
|
-
const
|
|
548
|
-
throw m(void 0),
|
|
547
|
+
const C = F;
|
|
548
|
+
throw m(void 0), C;
|
|
549
549
|
}
|
|
550
|
-
}, "t3"), e[4] = g, e[5] = b, e[6] = y, e[7] =
|
|
551
|
-
const E =
|
|
550
|
+
}, "t3"), e[4] = g, e[5] = b, e[6] = y, e[7] = x) : x = e[7];
|
|
551
|
+
const E = x;
|
|
552
552
|
let v;
|
|
553
553
|
e[8] !== f ? (v = /* @__PURE__ */ s(() => {
|
|
554
554
|
f(), m(void 0);
|
|
555
555
|
}, "t4"), e[8] = f, e[9] = v) : v = e[9];
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
e[10] !==
|
|
559
|
-
|
|
560
|
-
}, "t5"), e[10] =
|
|
561
|
-
const R =
|
|
562
|
-
let
|
|
563
|
-
return e[12] !== R || e[13] !==
|
|
564
|
-
loading:
|
|
556
|
+
const Q = v;
|
|
557
|
+
let S;
|
|
558
|
+
e[10] !== i ? (S = /* @__PURE__ */ s(() => {
|
|
559
|
+
i(), m(void 0);
|
|
560
|
+
}, "t5"), e[10] = i, e[11] = S) : S = e[11];
|
|
561
|
+
const R = S;
|
|
562
|
+
let O;
|
|
563
|
+
return e[12] !== R || e[13] !== o || e[14] !== d || e[15] !== E || e[16] !== u || e[17] !== Q || e[18] !== c || e[19] !== l ? (O = {
|
|
564
|
+
loading: u,
|
|
565
565
|
result: c,
|
|
566
|
-
error:
|
|
567
|
-
status:
|
|
566
|
+
error: o,
|
|
567
|
+
status: l,
|
|
568
568
|
exchange: d,
|
|
569
569
|
execute: E,
|
|
570
|
-
reset:
|
|
570
|
+
reset: Q,
|
|
571
571
|
abort: R
|
|
572
|
-
}, e[12] = R, e[13] =
|
|
572
|
+
}, e[12] = R, e[13] = o, e[14] = d, e[15] = E, e[16] = u, e[17] = Q, e[18] = c, e[19] = l, e[20] = O) : O = e[20], O;
|
|
573
573
|
}
|
|
574
574
|
s(Y, "useFetcher");
|
|
575
|
-
function
|
|
576
|
-
const e =
|
|
575
|
+
function Ie(r) {
|
|
576
|
+
const e = _(11), {
|
|
577
577
|
loading: t,
|
|
578
578
|
result: n,
|
|
579
|
-
error:
|
|
580
|
-
status:
|
|
579
|
+
error: a,
|
|
580
|
+
status: u,
|
|
581
581
|
exchange: c,
|
|
582
|
-
execute:
|
|
583
|
-
reset:
|
|
582
|
+
execute: o,
|
|
583
|
+
reset: l,
|
|
584
584
|
abort: y
|
|
585
585
|
} = Y(r), {
|
|
586
586
|
run: f,
|
|
587
|
-
cancel:
|
|
587
|
+
cancel: i,
|
|
588
588
|
isPending: d
|
|
589
|
-
} =
|
|
589
|
+
} = D(o, r.debounce);
|
|
590
590
|
let m;
|
|
591
|
-
return e[0] !== y || e[1] !==
|
|
591
|
+
return e[0] !== y || e[1] !== i || e[2] !== a || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== l || e[7] !== n || e[8] !== f || e[9] !== u ? (m = {
|
|
592
592
|
loading: t,
|
|
593
593
|
result: n,
|
|
594
|
-
error:
|
|
595
|
-
status:
|
|
594
|
+
error: a,
|
|
595
|
+
status: u,
|
|
596
596
|
exchange: c,
|
|
597
|
-
reset:
|
|
597
|
+
reset: l,
|
|
598
598
|
abort: y,
|
|
599
599
|
run: f,
|
|
600
|
-
cancel:
|
|
600
|
+
cancel: i,
|
|
601
601
|
isPending: d
|
|
602
|
-
}, e[0] = y, e[1] =
|
|
602
|
+
}, e[0] = y, e[1] = i, e[2] = a, e[3] = c, e[4] = d, e[5] = t, e[6] = l, e[7] = n, e[8] = f, e[9] = u, e[10] = m) : m = e[10], m;
|
|
603
603
|
}
|
|
604
|
-
s(
|
|
605
|
-
function
|
|
606
|
-
const e =
|
|
604
|
+
s(Ie, "useDebouncedFetcher");
|
|
605
|
+
function Le(r) {
|
|
606
|
+
const e = _(22), t = r.autoExecute;
|
|
607
607
|
let n;
|
|
608
608
|
e[0] !== r ? (n = {
|
|
609
609
|
...r,
|
|
610
610
|
autoExecute: !1
|
|
611
611
|
}, e[0] = r, e[1] = n) : n = e[1];
|
|
612
|
-
const
|
|
613
|
-
loading:
|
|
612
|
+
const a = n, {
|
|
613
|
+
loading: u,
|
|
614
614
|
result: c,
|
|
615
|
-
error:
|
|
616
|
-
status:
|
|
615
|
+
error: o,
|
|
616
|
+
status: l,
|
|
617
617
|
execute: y,
|
|
618
618
|
reset: f,
|
|
619
|
-
abort:
|
|
619
|
+
abort: i,
|
|
620
620
|
getQuery: d,
|
|
621
621
|
setQuery: m
|
|
622
|
-
} =
|
|
622
|
+
} = P(a), {
|
|
623
623
|
run: b,
|
|
624
|
-
cancel:
|
|
624
|
+
cancel: h,
|
|
625
625
|
isPending: g
|
|
626
|
-
} =
|
|
627
|
-
let
|
|
628
|
-
e[2] !== t || e[3] !== b || e[4] !== m ? (
|
|
626
|
+
} = D(y, r.debounce);
|
|
627
|
+
let x;
|
|
628
|
+
e[2] !== t || e[3] !== b || e[4] !== m ? (x = /* @__PURE__ */ s((R) => {
|
|
629
629
|
m(R), t && b();
|
|
630
|
-
}, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] =
|
|
631
|
-
const E =
|
|
632
|
-
let v,
|
|
630
|
+
}, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = x) : x = e[5];
|
|
631
|
+
const E = x;
|
|
632
|
+
let v, Q;
|
|
633
633
|
e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
|
|
634
634
|
t && b();
|
|
635
|
-
}, "t2"),
|
|
636
|
-
let
|
|
637
|
-
return e[10] !==
|
|
638
|
-
loading:
|
|
635
|
+
}, "t2"), Q = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = Q) : (v = e[8], Q = e[9]), I(v, Q);
|
|
636
|
+
let S;
|
|
637
|
+
return e[10] !== i || e[11] !== h || e[12] !== o || e[13] !== d || e[14] !== g || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== l ? (S = {
|
|
638
|
+
loading: u,
|
|
639
639
|
result: c,
|
|
640
|
-
error:
|
|
641
|
-
status:
|
|
640
|
+
error: o,
|
|
641
|
+
status: l,
|
|
642
642
|
reset: f,
|
|
643
|
-
abort:
|
|
643
|
+
abort: i,
|
|
644
644
|
getQuery: d,
|
|
645
645
|
setQuery: E,
|
|
646
646
|
run: b,
|
|
647
|
-
cancel:
|
|
647
|
+
cancel: h,
|
|
648
648
|
isPending: g
|
|
649
|
-
}, e[10] =
|
|
649
|
+
}, e[10] = i, e[11] = h, e[12] = o, e[13] = d, e[14] = g, e[15] = u, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = l, e[21] = S) : S = e[21], S;
|
|
650
650
|
}
|
|
651
|
-
s(
|
|
652
|
-
function
|
|
653
|
-
const e =
|
|
651
|
+
s(Le, "useDebouncedFetcherQuery");
|
|
652
|
+
function P(r) {
|
|
653
|
+
const e = _(23);
|
|
654
654
|
let t;
|
|
655
655
|
e[0] !== r ? (t = {
|
|
656
656
|
resultExtractor: ue,
|
|
657
657
|
...r
|
|
658
658
|
}, e[0] = r, e[1] = t) : t = e[1];
|
|
659
|
-
const n = t,
|
|
660
|
-
loading:
|
|
659
|
+
const n = t, a = q(n), {
|
|
660
|
+
loading: u,
|
|
661
661
|
result: c,
|
|
662
|
-
error:
|
|
663
|
-
status:
|
|
662
|
+
error: o,
|
|
663
|
+
status: l,
|
|
664
664
|
execute: y,
|
|
665
665
|
reset: f,
|
|
666
|
-
abort:
|
|
666
|
+
abort: i
|
|
667
667
|
} = Y(n);
|
|
668
668
|
let d;
|
|
669
|
-
e[2] !== y || e[3] !==
|
|
670
|
-
const
|
|
671
|
-
url:
|
|
669
|
+
e[2] !== y || e[3] !== a ? (d = /* @__PURE__ */ s((Q) => {
|
|
670
|
+
const S = {
|
|
671
|
+
url: a.current.url,
|
|
672
672
|
method: "POST",
|
|
673
|
-
body:
|
|
673
|
+
body: Q
|
|
674
674
|
};
|
|
675
|
-
return y(
|
|
676
|
-
}, "t1"), e[2] = y, e[3] =
|
|
675
|
+
return y(S);
|
|
676
|
+
}, "t1"), e[2] = y, e[3] = a, e[4] = d) : d = e[4];
|
|
677
677
|
const m = d;
|
|
678
678
|
let b;
|
|
679
|
-
e[5] !== m || e[6] !== n.autoExecute || e[7] !== n.
|
|
679
|
+
e[5] !== m || e[6] !== n.autoExecute || e[7] !== n.initialQuery || e[8] !== n.query ? (b = {
|
|
680
680
|
initialQuery: n.initialQuery,
|
|
681
|
+
query: n.query,
|
|
681
682
|
autoExecute: n.autoExecute,
|
|
682
|
-
execute: m
|
|
683
|
-
|
|
684
|
-
}, e[5] = m, e[6] = n.autoExecute, e[7] = n.deps, e[8] = n.initialQuery, e[9] = b) : b = e[9];
|
|
683
|
+
execute: m
|
|
684
|
+
}, e[5] = m, e[6] = n.autoExecute, e[7] = n.initialQuery, e[8] = n.query, e[9] = b) : b = e[9];
|
|
685
685
|
const {
|
|
686
|
-
getQuery:
|
|
686
|
+
getQuery: h,
|
|
687
687
|
setQuery: g
|
|
688
688
|
} = j(b);
|
|
689
|
-
let
|
|
690
|
-
e[10] !== m || e[11] !==
|
|
691
|
-
const E =
|
|
689
|
+
let x;
|
|
690
|
+
e[10] !== m || e[11] !== h ? (x = /* @__PURE__ */ s(() => m(h()), "t3"), e[10] = m, e[11] = h, e[12] = x) : x = e[12];
|
|
691
|
+
const E = x;
|
|
692
692
|
let v;
|
|
693
|
-
return e[13] !==
|
|
694
|
-
loading:
|
|
693
|
+
return e[13] !== i || e[14] !== o || e[15] !== E || e[16] !== h || e[17] !== u || e[18] !== f || e[19] !== c || e[20] !== g || e[21] !== l ? (v = {
|
|
694
|
+
loading: u,
|
|
695
695
|
result: c,
|
|
696
|
-
error:
|
|
697
|
-
status:
|
|
696
|
+
error: o,
|
|
697
|
+
status: l,
|
|
698
698
|
execute: E,
|
|
699
699
|
reset: f,
|
|
700
|
-
abort:
|
|
701
|
-
getQuery:
|
|
700
|
+
abort: i,
|
|
701
|
+
getQuery: h,
|
|
702
702
|
setQuery: g
|
|
703
|
-
}, e[13] =
|
|
703
|
+
}, e[13] = i, e[14] = o, e[15] = E, e[16] = h, e[17] = u, e[18] = f, e[19] = c, e[20] = g, e[21] = l, e[22] = v) : v = e[22], v;
|
|
704
704
|
}
|
|
705
|
-
s(
|
|
706
|
-
function
|
|
707
|
-
return
|
|
705
|
+
s(P, "useFetcherQuery");
|
|
706
|
+
function pe(r) {
|
|
707
|
+
return P(r);
|
|
708
708
|
}
|
|
709
|
-
s(
|
|
710
|
-
function
|
|
711
|
-
return
|
|
709
|
+
s(pe, "useFetcherCountQuery");
|
|
710
|
+
function Pe(r) {
|
|
711
|
+
return P(r);
|
|
712
712
|
}
|
|
713
|
-
s(
|
|
714
|
-
function
|
|
715
|
-
const e =
|
|
713
|
+
s(Pe, "useFetcherListQuery");
|
|
714
|
+
function Ae(r) {
|
|
715
|
+
const e = _(2);
|
|
716
716
|
let t;
|
|
717
717
|
return e[0] !== r ? (t = {
|
|
718
718
|
...r,
|
|
719
719
|
resultExtractor: oe
|
|
720
|
-
}, e[0] = r, e[1] = t) : t = e[1],
|
|
720
|
+
}, e[0] = r, e[1] = t) : t = e[1], P(t);
|
|
721
721
|
}
|
|
722
|
-
s(
|
|
723
|
-
function
|
|
724
|
-
return
|
|
722
|
+
s(Ae, "useFetcherListStreamQuery");
|
|
723
|
+
function De(r) {
|
|
724
|
+
return P(r);
|
|
725
725
|
}
|
|
726
|
-
s(
|
|
727
|
-
function
|
|
728
|
-
return
|
|
726
|
+
s(De, "useFetcherPagedQuery");
|
|
727
|
+
function Me(r) {
|
|
728
|
+
return P(r);
|
|
729
729
|
}
|
|
730
|
-
s(
|
|
730
|
+
s(Me, "useFetcherSingleQuery");
|
|
731
|
+
function Te(r) {
|
|
732
|
+
return p(r);
|
|
733
|
+
}
|
|
734
|
+
s(Te, "useCountQuery");
|
|
731
735
|
function Ue(r) {
|
|
732
|
-
return
|
|
736
|
+
return p(r);
|
|
733
737
|
}
|
|
734
|
-
s(Ue, "
|
|
738
|
+
s(Ue, "useListQuery");
|
|
735
739
|
function ke(r) {
|
|
736
|
-
return
|
|
740
|
+
return p(r);
|
|
737
741
|
}
|
|
738
|
-
s(ke, "
|
|
742
|
+
s(ke, "useListStreamQuery");
|
|
739
743
|
function ze(r) {
|
|
740
|
-
return
|
|
744
|
+
return p(r);
|
|
741
745
|
}
|
|
742
|
-
s(ze, "
|
|
746
|
+
s(ze, "usePagedQuery");
|
|
743
747
|
function Ge(r) {
|
|
744
|
-
return
|
|
748
|
+
return p(r);
|
|
745
749
|
}
|
|
746
|
-
s(Ge, "
|
|
750
|
+
s(Ge, "useSingleQuery");
|
|
747
751
|
function Ke(r) {
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
s(Ke, "useSingleQuery");
|
|
751
|
-
function Ne(r) {
|
|
752
|
-
const e = w(13), {
|
|
752
|
+
const e = _(13), {
|
|
753
753
|
bus: t,
|
|
754
754
|
handler: n
|
|
755
755
|
} = r;
|
|
756
|
-
let
|
|
757
|
-
e[0] !== t || e[1] !== n ? (
|
|
758
|
-
const
|
|
756
|
+
let a;
|
|
757
|
+
e[0] !== t || e[1] !== n ? (a = /* @__PURE__ */ s(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = a) : a = e[2];
|
|
758
|
+
const u = a;
|
|
759
759
|
let c;
|
|
760
760
|
e[3] !== t || e[4] !== n.name ? (c = /* @__PURE__ */ s(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = c) : c = e[5];
|
|
761
|
-
const
|
|
762
|
-
let
|
|
763
|
-
e[6] !== t || e[7] !== n ? (
|
|
761
|
+
const o = c;
|
|
762
|
+
let l, y;
|
|
763
|
+
e[6] !== t || e[7] !== n ? (l = /* @__PURE__ */ s(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
|
|
764
764
|
t.off(n.name);
|
|
765
|
-
}), "t2"), y = [t, n], e[6] = t, e[7] = n, e[8] =
|
|
765
|
+
}), "t2"), y = [t, n], e[6] = t, e[7] = n, e[8] = l, e[9] = y) : (l = e[8], y = e[9]), I(l, y);
|
|
766
766
|
let f;
|
|
767
|
-
return e[10] !==
|
|
768
|
-
subscribe:
|
|
769
|
-
unsubscribe:
|
|
770
|
-
}, e[10] =
|
|
767
|
+
return e[10] !== u || e[11] !== o ? (f = {
|
|
768
|
+
subscribe: u,
|
|
769
|
+
unsubscribe: o
|
|
770
|
+
}, e[10] = u, e[11] = o, e[12] = f) : f = e[12], f;
|
|
771
771
|
}
|
|
772
|
-
s(
|
|
772
|
+
s(Ke, "useEventSubscription");
|
|
773
773
|
export {
|
|
774
|
-
|
|
774
|
+
de as ANONYMOUS_USER,
|
|
775
775
|
le as PromiseStatus,
|
|
776
|
-
|
|
776
|
+
qe as RouteGuard,
|
|
777
777
|
V as SecurityContext,
|
|
778
778
|
$e as SecurityProvider,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
779
|
+
Te as useCountQuery,
|
|
780
|
+
D as useDebouncedCallback,
|
|
781
|
+
_e as useDebouncedExecutePromise,
|
|
782
|
+
Ie as useDebouncedFetcher,
|
|
783
|
+
Le as useDebouncedFetcherQuery,
|
|
784
|
+
Re as useDebouncedQuery,
|
|
785
|
+
Ke as useEventSubscription,
|
|
786
|
+
T as useExecutePromise,
|
|
787
787
|
Y as useFetcher,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
788
|
+
pe as useFetcherCountQuery,
|
|
789
|
+
Pe as useFetcherListQuery,
|
|
790
|
+
Ae as useFetcherListStreamQuery,
|
|
791
|
+
De as useFetcherPagedQuery,
|
|
792
|
+
P as useFetcherQuery,
|
|
793
|
+
Me as useFetcherSingleQuery,
|
|
794
794
|
Ce as useForceUpdate,
|
|
795
795
|
Oe as useImmerKeyStorage,
|
|
796
796
|
J as useKeyStorage,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
q as useLatest,
|
|
798
|
+
Ue as useListQuery,
|
|
799
|
+
ke as useListStreamQuery,
|
|
800
800
|
W as useMounted,
|
|
801
|
-
|
|
801
|
+
ze as usePagedQuery,
|
|
802
802
|
ie as usePromiseState,
|
|
803
|
-
|
|
803
|
+
p as useQuery,
|
|
804
804
|
j as useQueryState,
|
|
805
|
-
|
|
805
|
+
Fe as useRefs,
|
|
806
806
|
ae as useRequestId,
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
807
|
+
me as useSecurity,
|
|
808
|
+
ye as useSecurityContext,
|
|
809
|
+
Ge as useSingleQuery
|
|
810
810
|
};
|
|
811
811
|
//# sourceMappingURL=index.es.js.map
|