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