@prose-reader/react-reader 1.186.0 → 1.188.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/ReactReader.d.ts +5 -0
  2. package/dist/annotations/AnnotationsDialog.d.ts +5 -0
  3. package/dist/annotations/AnnotationsDialogContent.d.ts +3 -0
  4. package/dist/bookmarks/BookmarksDialog.d.ts +5 -0
  5. package/dist/bookmarks/BookmarksDialogContent.d.ts +3 -0
  6. package/dist/context/useReader.d.ts +8 -0
  7. package/dist/index.js +791 -503
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.umd.cjs +1 -1
  10. package/dist/index.umd.cjs.map +1 -1
  11. package/dist/{src/navigation/QuickMenu → quickmenu}/BottomBar.d.ts +2 -3
  12. package/dist/quickmenu/QuickMenu.d.ts +3 -0
  13. package/dist/quickmenu/Scrubber.d.ts +3 -0
  14. package/dist/quickmenu/TopBar.d.ts +4 -0
  15. package/dist/search/SearchDialog.d.ts +5 -0
  16. package/dist/search/SearchDialogContent.d.ts +4 -0
  17. package/dist/search/SearchListItem.d.ts +9 -0
  18. package/dist/theme/config.d.ts +1 -0
  19. package/package.json +17 -2
  20. package/dist/src/ReactReader.d.ts +0 -6
  21. package/dist/src/context/useReader.d.ts +0 -2
  22. package/dist/src/navigation/QuickMenu/QuickMenu.d.ts +0 -6
  23. package/dist/src/navigation/QuickMenu/Scrubber.d.ts +0 -1
  24. package/dist/src/navigation/QuickMenu/TopBar.d.ts +0 -5
  25. /package/dist/{src/common → common}/useFullscreen.d.ts +0 -0
  26. /package/dist/{src/components → components}/ui/accordion.d.ts +0 -0
  27. /package/dist/{src/components → components}/ui/avatar.d.ts +0 -0
  28. /package/dist/{src/components → components}/ui/checkbox.d.ts +0 -0
  29. /package/dist/{src/components → components}/ui/close-button.d.ts +0 -0
  30. /package/dist/{src/components → components}/ui/color-mode.d.ts +0 -0
  31. /package/dist/{src/components → components}/ui/dialog.d.ts +0 -0
  32. /package/dist/{src/components → components}/ui/drawer.d.ts +0 -0
  33. /package/dist/{src/components → components}/ui/field.d.ts +0 -0
  34. /package/dist/{src/components → components}/ui/input-group.d.ts +0 -0
  35. /package/dist/{src/components → components}/ui/popover.d.ts +0 -0
  36. /package/dist/{src/components → components}/ui/progress.d.ts +0 -0
  37. /package/dist/{src/components → components}/ui/provider.d.ts +0 -0
  38. /package/dist/{src/components → components}/ui/radio.d.ts +0 -0
  39. /package/dist/{src/components → components}/ui/slider.d.ts +0 -0
  40. /package/dist/{src/components → components}/ui/toggle-tip.d.ts +0 -0
  41. /package/dist/{src/components → components}/ui/tooltip.d.ts +0 -0
  42. /package/dist/{src/context → context}/ReactReaderProvider.d.ts +0 -0
  43. /package/dist/{src/context → context}/context.d.ts +0 -0
  44. /package/dist/{src/navigation/help → help}/HelpDialog.d.ts +0 -0
  45. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  46. /package/dist/{src/navigation → navigation}/FloatingProgress.d.ts +0 -0
  47. /package/dist/{src/navigation → navigation}/FloatingTime.d.ts +0 -0
  48. /package/dist/{src/navigation → navigation}/useNavigationContext.d.ts +0 -0
  49. /package/dist/{src/pagination → pagination}/usePagination.d.ts +0 -0
  50. /package/dist/{src/navigation/QuickMenu → quickmenu}/PaginationInfoSection.d.ts +0 -0
  51. /package/dist/{src/navigation/QuickMenu → quickmenu}/QuickBar.d.ts +0 -0
  52. /package/dist/{src/navigation/QuickMenu → quickmenu}/ThemedSlider.d.ts +0 -0
  53. /package/dist/{src/navigation/QuickMenu → quickmenu}/TimeIndicator.d.ts +0 -0
  54. /package/dist/{src/navigation/QuickMenu → quickmenu}/useQuickMenu.d.ts +0 -0
  55. /package/dist/{src/settings → settings}/useSettings.d.ts +0 -0
  56. /package/dist/{src/navigation/toc → toc}/TableOfContentsDialog.d.ts +0 -0
  57. /package/dist/{src/navigation/toc → toc}/TableOfContentsDialogContent.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,131 +1,337 @@
1
- import { jsx as t, jsxs as a, Fragment as E } from "react/jsx-runtime";
2
- import * as C from "react";
3
- import ie, { createContext as le, memo as b, useMemo as se, useEffect as B, useContext as _, useState as R, useCallback as q } from "react";
4
- import { signal as ce, useSignal as U, useLiveRef as ae, useSubscribe as Y, useObserve as v, useSignalValue as de } from "reactjrx";
5
- import { tap as ue, NEVER as he, combineLatest as ge, map as me } from "rxjs";
6
- import { Box as z, Text as m, Popover as I, Portal as Q, IconButton as p, Progress as O, Stack as y, HStack as x, Presence as L, chakra as fe, Collapsible as M, Dialog as g, Heading as j, Kbd as N, Button as G, List as w, Link as pe } from "@chakra-ui/react";
7
- import { LuChevronDown as be, LuCircleHelp as xe, LuTableOfContents as Ce, LuX as Ie, LuArrowBigRight as ve, LuArrowBigLeft as Pe, LuCircleCheck as V } from "react-icons/lu";
8
- import { RxDoubleArrowUp as Se, RxDoubleArrowLeft as Te, RxDoubleArrowDown as ke, RxDoubleArrowRight as we } from "react-icons/rx";
9
- import { HiOutlineInformationCircle as Re } from "react-icons/hi";
10
- import Oe from "rc-slider";
1
+ import { jsx as e, jsxs as a, Fragment as X } from "react/jsx-runtime";
2
+ import * as D from "react";
3
+ import fe, { createContext as me, memo as f, useMemo as be, useEffect as Y, useContext as ie, useState as w, useCallback as B } from "react";
4
+ import { signal as xe, useSignal as le, useLiveRef as Ce, useSubscribe as se, useObserve as P, useSignalValue as ve } from "reactjrx";
5
+ import { tap as Ie, switchMap as ae, NEVER as Se, combineLatest as ke, map as ce, startWith as Pe } from "rxjs";
6
+ import { IconButton as C, Portal as de, Dialog as b, List as I, Link as q, Stack as k, Text as g, Button as z, Heading as Q, HStack as O, Kbd as oe, Box as M, Popover as A, Progress as L, Presence as G, chakra as Te, Collapsible as U, Input as we } from "@chakra-ui/react";
7
+ import { LuX as ye, LuNotebookPen as K, LuArrowBigRight as Re, LuArrowBigLeft as Oe, LuChevronDown as De, LuCircleHelp as Ae, LuTableOfContents as ze, LuSearch as Ee, LuCircleCheck as re } from "react-icons/lu";
8
+ import { BsBookmarks as Be } from "react-icons/bs";
9
+ import { RxDoubleArrowUp as Me, RxDoubleArrowLeft as Le, RxDoubleArrowDown as _e, RxDoubleArrowRight as $e } from "react-icons/rx";
10
+ import { HiOutlineInformationCircle as Ne } from "react-icons/hi";
11
+ import Fe from "rc-slider";
11
12
  import "rc-slider/assets/index.css";
12
- import { IoIosArrowBack as ye, IoMdMore as De } from "react-icons/io";
13
- import { MdFullscreenExit as Ae, MdFullscreen as Be } from "react-icons/md";
14
- const F = le({
13
+ import { IoIosArrowBack as He, IoMdMore as je } from "react-icons/io";
14
+ import { MdFullscreenExit as Ve, MdFullscreen as We } from "react-icons/md";
15
+ const J = me({
15
16
  reader: void 0,
16
- quickMenuSignal: ce({ default: !1 })
17
- }), ft = b(
17
+ quickMenuSignal: xe({ default: !1 })
18
+ }), Ln = f(
18
19
  ({
19
- children: e,
20
- reader: n,
21
- quickMenuOpen: r,
22
- onQuickMenuOpenChange: i
20
+ children: n,
21
+ reader: t,
22
+ quickMenuOpen: o,
23
+ onQuickMenuOpenChange: r
23
24
  }) => {
24
- const [, o] = U({
25
- default: r
26
- }), l = ae(i), c = se(
25
+ const [, l] = le({
26
+ default: o
27
+ }), i = Ce(r), c = be(
27
28
  () => ({
28
- quickMenuSignal: o,
29
- reader: n
29
+ quickMenuSignal: l,
30
+ reader: t
30
31
  }),
31
- [o, n]
32
+ [l, t]
32
33
  );
33
- return B(() => {
34
- o.setValue(r);
35
- }, [r, o]), Y(
36
- () => o.subject.pipe(ue(l.current)),
37
- [o, l]
38
- ), /* @__PURE__ */ t(F.Provider, { value: c, children: e });
34
+ return Y(() => {
35
+ l.setValue(o);
36
+ }, [o, l]), se(
37
+ () => l.subject.pipe(Ie(i.current)),
38
+ [l, i]
39
+ ), /* @__PURE__ */ e(J.Provider, { value: c, children: n });
39
40
  }
40
- ), D = () => {
41
- const { reader: e } = _(F);
42
- return e;
43
- }, P = () => {
44
- const e = D();
45
- return v(
46
- () => e ? ge([e.pagination.state$, e.context.state$]).pipe(
47
- me(([n, r]) => {
48
- var o;
49
- const i = (o = r.manifest) == null ? void 0 : o.spineItems.every(
50
- (l) => {
41
+ ), Ye = D.forwardRef(function(t, o) {
42
+ return /* @__PURE__ */ e(C, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(ye, {}) });
43
+ }), _ = D.forwardRef(function(t, o) {
44
+ const {
45
+ children: r,
46
+ portalled: l = !0,
47
+ portalRef: i,
48
+ backdrop: c = !0,
49
+ ...d
50
+ } = t;
51
+ return /* @__PURE__ */ a(de, { disabled: !l, container: i, children: [
52
+ c && /* @__PURE__ */ e(b.Backdrop, {}),
53
+ /* @__PURE__ */ e(b.Positioner, { children: /* @__PURE__ */ e(b.Content, { ref: o, ...d, asChild: !1, children: r }) })
54
+ ] });
55
+ }), $ = D.forwardRef(function(t, o) {
56
+ return /* @__PURE__ */ e(
57
+ b.CloseTrigger,
58
+ {
59
+ position: "absolute",
60
+ top: "2",
61
+ insetEnd: "2",
62
+ ...t,
63
+ asChild: !0,
64
+ children: /* @__PURE__ */ e(Ye, { size: "sm", ref: o, children: t.children })
65
+ }
66
+ );
67
+ }), N = b.Root, F = b.Footer, H = b.Header, j = b.Body;
68
+ b.Backdrop;
69
+ const V = b.Title;
70
+ b.Description;
71
+ b.Trigger;
72
+ const W = b.ActionTrigger, R = () => {
73
+ const { reader: n } = ie(J);
74
+ return n;
75
+ }, he = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, ue = (n) => !!n && "__PROSE_READER_ENHANCER_BOOKMARKS" in n, ge = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, qe = f(
76
+ ({ onNavigate: n }) => {
77
+ const t = R(), o = ge(t) ? t : void 0, r = P(
78
+ () => o == null ? void 0 : o.annotations.highlights$.pipe(
79
+ ae(
80
+ (i) => o.pagination.locate(i)
81
+ )
82
+ ),
83
+ [o]
84
+ ), l = (i, c) => {
85
+ var d;
86
+ return /* @__PURE__ */ e(I.Item, { children: /* @__PURE__ */ a(
87
+ q,
88
+ {
89
+ href: "#",
90
+ onClick: () => {
91
+ n(), t == null || t.navigation.goToCfi(i.cfi ?? "");
92
+ },
93
+ children: [
94
+ (i.contents ?? [])[0] ? /* @__PURE__ */ e(I.Indicator, { asChild: !0, children: /* @__PURE__ */ e(K, {}) }) : /* @__PURE__ */ e(I.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(K, {}) }),
95
+ /* @__PURE__ */ a(k, { gap: 0, children: [
96
+ /* @__PURE__ */ e(g, { lineClamp: 2, fontSize: "md", children: i.selectionAsText ? i.selectionAsText ?? "" : /* @__PURE__ */ e("i", { children: /* @__PURE__ */ e("b", { children: "unknown (not loaded)" }) }) }),
97
+ /* @__PURE__ */ e(
98
+ g,
99
+ {
100
+ fontStyle: "italic",
101
+ fontWeight: "bold",
102
+ fontSize: "sm",
103
+ children: `Book page: ${((d = i.meta) == null ? void 0 : d.absolutePageIndex) !== void 0 ? i.meta.absolutePageIndex + 1 : "unknown (not loaded)"}`
104
+ }
105
+ )
106
+ ] })
107
+ ]
108
+ }
109
+ ) }, c);
110
+ };
111
+ return /* @__PURE__ */ e(I.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: r == null ? void 0 : r.map(
112
+ (i, c) => l(i, c)
113
+ ) });
114
+ }
115
+ ), Ue = f(
116
+ ({
117
+ open: n,
118
+ setOpen: t,
119
+ onNavigate: o
120
+ }) => /* @__PURE__ */ e(
121
+ N,
122
+ {
123
+ lazyMount: !0,
124
+ placement: "center",
125
+ open: n,
126
+ onOpenChange: (r) => t(r.open),
127
+ size: { mdDown: "full", md: "lg" },
128
+ scrollBehavior: "inside",
129
+ children: /* @__PURE__ */ a(_, { height: "100%", children: [
130
+ /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { children: "Annotations" }) }),
131
+ /* @__PURE__ */ e(j, { flex: 1, children: /* @__PURE__ */ e(qe, { onNavigate: o }) }),
132
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(z, { variant: "outline", children: "Cancel" }) }) }),
133
+ /* @__PURE__ */ e($, {})
134
+ ] })
135
+ }
136
+ )
137
+ ), Qe = f(
138
+ ({ onNavigate: n }) => {
139
+ const t = R(), o = ue(t) ? t : void 0, r = P(
140
+ () => o == null ? void 0 : o.bookmarks.bookmarks$.pipe(
141
+ ae((i) => o.pagination.locate(i))
142
+ ),
143
+ [o]
144
+ ), l = (i, c) => {
145
+ var d, u, s, p, h;
146
+ return /* @__PURE__ */ a(I.Item, { justifyContent: "space-between", alignItems: "center", children: [
147
+ /* @__PURE__ */ e(
148
+ q,
149
+ {
150
+ href: "#",
151
+ onClick: () => {
152
+ n(), t == null || t.navigation.goToCfi(i.cfi ?? "");
153
+ },
154
+ children: /* @__PURE__ */ a(k, { gap: 0, children: [
155
+ /* @__PURE__ */ e(g, { fontSize: "md", children: `Book page: ${((d = i.meta) == null ? void 0 : d.absolutePageIndex) !== void 0 ? i.meta.absolutePageIndex + 1 : "unknown"}` }),
156
+ /* @__PURE__ */ e(
157
+ g,
158
+ {
159
+ fontStyle: "italic",
160
+ fontWeight: "bold",
161
+ fontSize: "sm",
162
+ truncate: !0,
163
+ lineClamp: 2,
164
+ children: (s = (u = i.meta) == null ? void 0 : u.startNode) != null && s.textContent ? (h = (p = i.meta) == null ? void 0 : p.startNode) == null ? void 0 : h.textContent : "..."
165
+ }
166
+ )
167
+ ] })
168
+ }
169
+ ),
170
+ /* @__PURE__ */ e(
171
+ z,
172
+ {
173
+ colorPalette: "red",
174
+ variant: "solid",
175
+ size: "xs",
176
+ onClick: () => {
177
+ o == null || o.bookmarks.delete(i.id);
178
+ },
179
+ children: "Delete"
180
+ }
181
+ )
182
+ ] }, c);
183
+ };
184
+ return /* @__PURE__ */ e(I.Root, { overflowY: "auto", gap: 3, variant: "plain", overflow: "auto", children: r == null ? void 0 : r.map(
185
+ (i, c) => l(i, c)
186
+ ) });
187
+ }
188
+ ), Ge = f(
189
+ ({
190
+ open: n,
191
+ setOpen: t,
192
+ onNavigate: o
193
+ }) => /* @__PURE__ */ e(
194
+ N,
195
+ {
196
+ lazyMount: !0,
197
+ placement: "center",
198
+ open: n,
199
+ onOpenChange: (r) => t(r.open),
200
+ size: { mdDown: "full", md: "lg" },
201
+ scrollBehavior: "inside",
202
+ children: /* @__PURE__ */ a(_, { height: "100%", children: [
203
+ /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { children: "Bookmarks" }) }),
204
+ /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(Qe, { onNavigate: o }) }),
205
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(z, { variant: "outline", children: "Cancel" }) }) }),
206
+ /* @__PURE__ */ e($, {})
207
+ ] })
208
+ }
209
+ )
210
+ ), Ke = "@prose-reader/react-reader", Xe = "1.187.0", Je = f(
211
+ ({
212
+ open: n,
213
+ setOpen: t
214
+ }) => /* @__PURE__ */ e(
215
+ N,
216
+ {
217
+ lazyMount: !0,
218
+ placement: "center",
219
+ open: n,
220
+ onOpenChange: (o) => t(o.open),
221
+ size: { mdDown: "full", md: "lg" },
222
+ scrollBehavior: "inside",
223
+ children: /* @__PURE__ */ a(_, { children: [
224
+ /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { children: "Help" }) }),
225
+ /* @__PURE__ */ a(j, { overflowY: "auto", flex: 1, children: [
226
+ /* @__PURE__ */ e(Q, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
227
+ /* @__PURE__ */ a(O, { mb: 1, children: [
228
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(Re, {}) }),
229
+ " ",
230
+ /* @__PURE__ */ e(g, { children: "Navigate to right page" })
231
+ ] }),
232
+ /* @__PURE__ */ a(O, { mb: 1, children: [
233
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(Oe, {}) }),
234
+ " ",
235
+ /* @__PURE__ */ e(g, { children: "Navigate to left page" })
236
+ ] }),
237
+ /* @__PURE__ */ e(Q, { mb: 2, mt: 4, as: "h3", size: "lg", children: "About" }),
238
+ /* @__PURE__ */ a(g, { children: [
239
+ Ke,
240
+ " version: ",
241
+ Xe
242
+ ] })
243
+ ] }),
244
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(z, { variant: "outline", children: "Cancel" }) }) }),
245
+ /* @__PURE__ */ e($, {})
246
+ ] })
247
+ }
248
+ )
249
+ ), E = () => {
250
+ const n = R();
251
+ return P(
252
+ () => n ? ke([n.pagination.state$, n.context.state$]).pipe(
253
+ ce(([t, o]) => {
254
+ var l;
255
+ const r = (l = o.manifest) == null ? void 0 : l.spineItems.every(
256
+ (i) => {
51
257
  var c;
52
- return (c = l.mediaType) == null ? void 0 : c.startsWith("image/");
258
+ return (c = i.mediaType) == null ? void 0 : c.startsWith("image/");
53
259
  }
54
260
  );
55
261
  return {
56
- ...n,
57
- hasChapters: !r.isFullyPrePaginated && !i
262
+ ...t,
263
+ hasChapters: !o.isFullyPrePaginated && !r
58
264
  };
59
265
  })
60
- ) : he,
61
- [e]
266
+ ) : Se,
267
+ [n]
62
268
  );
63
- }, ze = () => {
64
- const e = P(), n = Math.floor(
65
- ((e == null ? void 0 : e.percentageEstimateOfBook) ?? 0) * 100
66
- ), r = n > 0 ? n : 1;
67
- return (e == null ? void 0 : e.percentageEstimateOfBook) === void 0 ? null : /* @__PURE__ */ t(z, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ a(m, { fontSize: "sm", children: [
68
- r,
269
+ }, Ze = () => {
270
+ const n = E(), t = Math.floor(
271
+ ((n == null ? void 0 : n.percentageEstimateOfBook) ?? 0) * 100
272
+ ), o = t > 0 ? t : 1;
273
+ return (n == null ? void 0 : n.percentageEstimateOfBook) === void 0 ? null : /* @__PURE__ */ e(M, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ a(g, { fontSize: "sm", children: [
274
+ o,
69
275
  " %"
70
276
  ] }) });
71
- }, Me = () => {
72
- const [e, n] = R(/* @__PURE__ */ new Date());
73
- return B(() => {
74
- const r = setInterval(() => {
75
- n(/* @__PURE__ */ new Date());
277
+ }, en = () => {
278
+ const [n, t] = w(/* @__PURE__ */ new Date());
279
+ return Y(() => {
280
+ const o = setInterval(() => {
281
+ t(/* @__PURE__ */ new Date());
76
282
  }, 6e4);
77
- return () => clearInterval(r);
78
- }, []), e;
79
- }, Le = (e) => {
80
- const n = Me();
81
- return /* @__PURE__ */ t(m, { fontSize: "xs", ...e, children: n.toLocaleTimeString(navigator.language, {
283
+ return () => clearInterval(o);
284
+ }, []), n;
285
+ }, nn = (n) => {
286
+ const t = en();
287
+ return /* @__PURE__ */ e(g, { fontSize: "xs", ...n, children: t.toLocaleTimeString(navigator.language, {
82
288
  hour: "2-digit",
83
289
  minute: "2-digit"
84
290
  }) });
85
- }, $ = () => {
86
- const { quickMenuSignal: e } = _(F);
87
- return [de(e), e.setValue, e];
88
- }, Ee = () => {
89
- const [e] = $();
90
- return /* @__PURE__ */ t(
91
- z,
291
+ }, Z = () => {
292
+ const { quickMenuSignal: n } = ie(J);
293
+ return [ve(n), n.setValue, n];
294
+ }, tn = () => {
295
+ const [n] = Z();
296
+ return /* @__PURE__ */ e(
297
+ M,
92
298
  {
93
299
  position: "absolute",
94
300
  left: 0,
95
301
  bottom: 0,
96
302
  p: 2,
97
- color: e ? void 0 : "colorPalette.contrast",
98
- children: /* @__PURE__ */ t(Le, {})
303
+ color: n ? void 0 : "colorPalette.contrast",
304
+ children: /* @__PURE__ */ e(nn, {})
99
305
  }
100
306
  );
101
- }, Fe = C.forwardRef(
102
- function(n, r) {
307
+ }, on = D.forwardRef(
308
+ function(t, o) {
103
309
  const {
104
- showArrow: i,
105
- children: o,
106
- portalled: l = !0,
310
+ showArrow: r,
311
+ children: l,
312
+ portalled: i = !0,
107
313
  content: c,
108
314
  portalRef: d,
109
315
  ...u
110
- } = n;
316
+ } = t;
111
317
  return /* @__PURE__ */ a(
112
- I.Root,
318
+ A.Root,
113
319
  {
114
320
  ...u,
115
321
  positioning: { ...u.positioning, gutter: 4 },
116
322
  children: [
117
- /* @__PURE__ */ t(I.Trigger, { asChild: !0, children: o }),
118
- /* @__PURE__ */ t(Q, { disabled: !l, container: d, children: /* @__PURE__ */ t(I.Positioner, { children: /* @__PURE__ */ a(
119
- I.Content,
323
+ /* @__PURE__ */ e(A.Trigger, { asChild: !0, children: l }),
324
+ /* @__PURE__ */ e(de, { disabled: !i, container: d, children: /* @__PURE__ */ e(A.Positioner, { children: /* @__PURE__ */ a(
325
+ A.Content,
120
326
  {
121
327
  width: "auto",
122
328
  px: "2",
123
329
  py: "1",
124
330
  textStyle: "xs",
125
331
  rounded: "sm",
126
- ref: r,
332
+ ref: o,
127
333
  children: [
128
- i && /* @__PURE__ */ t(I.Arrow, { children: /* @__PURE__ */ t(I.ArrowTip, {}) }),
334
+ r && /* @__PURE__ */ e(A.Arrow, { children: /* @__PURE__ */ e(A.ArrowTip, {}) }),
129
335
  c
130
336
  ]
131
337
  }
@@ -134,84 +340,84 @@ const F = le({
134
340
  }
135
341
  );
136
342
  }
137
- ), $e = C.forwardRef(function(n, r) {
138
- const { children: i, ...o } = n;
139
- return /* @__PURE__ */ t(Fe, { content: i, ...o, ref: r, children: /* @__PURE__ */ t(
140
- p,
343
+ ), rn = D.forwardRef(function(t, o) {
344
+ const { children: r, ...l } = t;
345
+ return /* @__PURE__ */ e(on, { content: r, ...l, ref: o, children: /* @__PURE__ */ e(
346
+ C,
141
347
  {
142
348
  variant: "ghost",
143
349
  "aria-label": "info",
144
350
  size: "2xs",
145
351
  colorPalette: "gray",
146
- children: /* @__PURE__ */ t(Re, {})
352
+ children: /* @__PURE__ */ e(Ne, {})
147
353
  }
148
354
  ) });
149
- }), He = C.forwardRef(function(n, r) {
150
- return /* @__PURE__ */ t(O.Track, { ...n, ref: r, children: /* @__PURE__ */ t(O.Range, {}) });
355
+ }), ln = D.forwardRef(function(t, o) {
356
+ return /* @__PURE__ */ e(L.Track, { ...t, ref: o, children: /* @__PURE__ */ e(L.Range, {}) });
151
357
  });
152
- C.forwardRef(function(n, r) {
153
- const { children: i, info: o, ...l } = n;
154
- return /* @__PURE__ */ a(O.Label, { ...l, ref: r, children: [
155
- i,
156
- o && /* @__PURE__ */ t($e, { children: o })
358
+ D.forwardRef(function(t, o) {
359
+ const { children: r, info: l, ...i } = t;
360
+ return /* @__PURE__ */ a(L.Label, { ...i, ref: o, children: [
361
+ r,
362
+ l && /* @__PURE__ */ e(rn, { children: l })
157
363
  ] });
158
364
  });
159
- const We = O.Root, je = O.ValueText, H = () => {
160
- const e = P(), n = (e == null ? void 0 : e.numberOfTotalPages) === 1, r = ((e == null ? void 0 : e.beginNumberOfPagesInSpineItem) ?? 0) > 1, i = ((e == null ? void 0 : e.endNumberOfPagesInSpineItem) ?? 0) > 1, o = (e != null && e.hasChapters ? e == null ? void 0 : e.beginPageIndexInSpineItem : e == null ? void 0 : e.beginAbsolutePageIndex) ?? 0, l = (e != null && e.hasChapters ? e == null ? void 0 : e.endPageIndexInSpineItem : e == null ? void 0 : e.endAbsolutePageIndex) ?? 0, [c = 0, d = 0] = [
161
- o,
162
- l
163
- ].sort((f, h) => f - h), u = (e == null ? void 0 : e.beginPageIndexInSpineItem) !== (e == null ? void 0 : e.endPageIndexInSpineItem) || (e == null ? void 0 : e.beginSpineItemIndex) !== (e == null ? void 0 : e.endSpineItemIndex), s = e != null && e.hasChapters ? e == null ? void 0 : e.beginNumberOfPagesInSpineItem : e == null ? void 0 : e.numberOfTotalPages;
365
+ const sn = L.Root, an = L.ValueText, ee = () => {
366
+ const n = E(), t = (n == null ? void 0 : n.numberOfTotalPages) === 1, o = ((n == null ? void 0 : n.beginNumberOfPagesInSpineItem) ?? 0) > 1, r = ((n == null ? void 0 : n.endNumberOfPagesInSpineItem) ?? 0) > 1, l = (n != null && n.hasChapters ? n == null ? void 0 : n.beginPageIndexInSpineItem : n == null ? void 0 : n.beginAbsolutePageIndex) ?? 0, i = (n != null && n.hasChapters ? n == null ? void 0 : n.endPageIndexInSpineItem : n == null ? void 0 : n.endAbsolutePageIndex) ?? 0, [c = 0, d = 0] = [
367
+ l,
368
+ i
369
+ ].sort((p, h) => p - h), u = (n == null ? void 0 : n.beginPageIndexInSpineItem) !== (n == null ? void 0 : n.endPageIndexInSpineItem) || (n == null ? void 0 : n.beginSpineItemIndex) !== (n == null ? void 0 : n.endSpineItemIndex), s = n != null && n.hasChapters ? n == null ? void 0 : n.beginNumberOfPagesInSpineItem : n == null ? void 0 : n.numberOfTotalPages;
164
370
  return {
165
- hasOnlyOnePage: n,
166
- beginPageIndex: o,
167
- endPageIndex: l,
168
- isBeginWithinChapter: r,
169
- isEndWithinChapter: i,
371
+ hasOnlyOnePage: t,
372
+ beginPageIndex: l,
373
+ endPageIndex: i,
374
+ isBeginWithinChapter: o,
375
+ isEndWithinChapter: r,
170
376
  beginAndEndAreDifferent: u,
171
377
  totalApproximatePages: s,
172
378
  leftPageIndex: c,
173
379
  rightPageIndex: d
174
380
  };
175
- }, Ne = () => {
176
- const e = P(), {
177
- hasOnlyOnePage: n,
178
- leftPageIndex: r,
179
- rightPageIndex: i,
180
- totalApproximatePages: o,
181
- beginAndEndAreDifferent: l
182
- } = H(), c = Math.round(((e == null ? void 0 : e.percentageEstimateOfBook) ?? 0) * 100), d = (s) => s != null && s.subChapter ? `${s.title} / ${d(s.subChapter)}` : (s == null ? void 0 : s.title) || "", u = d(e == null ? void 0 : e.beginChapterInfo);
183
- return /* @__PURE__ */ a(y, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
184
- /* @__PURE__ */ t(We, { value: c, size: "xs", width: 150, children: /* @__PURE__ */ a(x, { justifyContent: "space-between", children: [
185
- /* @__PURE__ */ t(He, { width: 110 }),
186
- /* @__PURE__ */ t(je, { children: `${c}%` })
381
+ }, cn = () => {
382
+ const n = E(), {
383
+ hasOnlyOnePage: t,
384
+ leftPageIndex: o,
385
+ rightPageIndex: r,
386
+ totalApproximatePages: l,
387
+ beginAndEndAreDifferent: i
388
+ } = ee(), c = Math.round(((n == null ? void 0 : n.percentageEstimateOfBook) ?? 0) * 100), d = (s) => s != null && s.subChapter ? `${s.title} / ${d(s.subChapter)}` : (s == null ? void 0 : s.title) || "", u = d(n == null ? void 0 : n.beginChapterInfo);
389
+ return /* @__PURE__ */ a(k, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
390
+ /* @__PURE__ */ e(sn, { value: c, size: "xs", width: 150, children: /* @__PURE__ */ a(O, { justifyContent: "space-between", children: [
391
+ /* @__PURE__ */ e(ln, { width: 110 }),
392
+ /* @__PURE__ */ e(an, { children: `${c}%` })
187
393
  ] }) }),
188
- /* @__PURE__ */ t(m, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: u ? `Chapter: ${u}` : " " }),
189
- !n && /* @__PURE__ */ a(x, { children: [
190
- /* @__PURE__ */ t(m, { fontSize: "xs", children: l ? `${r + 1} - ${i + 1} of ${o}` : `${r + 1} of ${o}` }),
191
- !!(e != null && e.hasChapters) && /* @__PURE__ */ a(E, { children: [
192
- /* @__PURE__ */ t(m, { children: "-" }),
193
- /* @__PURE__ */ a(m, { fontSize: "xs", children: [
394
+ /* @__PURE__ */ e(g, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: u ? `Chapter: ${u}` : " " }),
395
+ !t && /* @__PURE__ */ a(O, { children: [
396
+ /* @__PURE__ */ e(g, { fontSize: "xs", children: i ? `${o + 1} - ${r + 1} of ${l}` : `${o + 1} of ${l}` }),
397
+ !!(n != null && n.hasChapters) && /* @__PURE__ */ a(X, { children: [
398
+ /* @__PURE__ */ e(g, { children: "-" }),
399
+ /* @__PURE__ */ a(g, { fontSize: "xs", children: [
194
400
  "(",
195
- ((e == null ? void 0 : e.beginAbsolutePageIndex) ?? 0) + 1,
401
+ ((n == null ? void 0 : n.beginAbsolutePageIndex) ?? 0) + 1,
196
402
  ")"
197
403
  ] })
198
404
  ] })
199
405
  ] })
200
406
  ] });
201
- }, K = b(
407
+ }, pe = f(
202
408
  ({
203
- children: e,
204
- position: n,
205
- ...r
206
- }) => /* @__PURE__ */ t(
207
- L,
409
+ children: n,
410
+ position: t,
411
+ ...o
412
+ }) => /* @__PURE__ */ e(
413
+ G,
208
414
  {
209
415
  display: "flex",
210
416
  flexDirection: "row",
211
417
  width: "100%",
212
418
  position: "absolute",
213
- ...n === "bottom" ? { bottom: 0 } : { top: 0 },
214
- animationName: n === "bottom" ? {
419
+ ...t === "bottom" ? { bottom: 0 } : { top: 0 },
420
+ animationName: t === "bottom" ? {
215
421
  _open: "slide-from-bottom, fade-in",
216
422
  _closed: "slide-to-bottom, fade-out"
217
423
  } : {
@@ -224,12 +430,12 @@ const We = O.Root, je = O.ValueText, H = () => {
224
430
  justifyContent: "center",
225
431
  shadow: "md",
226
432
  p: 4,
227
- ...r,
228
- children: e
433
+ ...o,
434
+ children: n
229
435
  }
230
436
  )
231
- ), Ve = fe(Oe), _e = b((e) => /* @__PURE__ */ t(
232
- z,
437
+ ), dn = Te(Fe), hn = f((n) => /* @__PURE__ */ e(
438
+ M,
233
439
  {
234
440
  display: "contents",
235
441
  css: {
@@ -237,8 +443,8 @@ const We = O.Root, je = O.ValueText, H = () => {
237
443
  "--bg-emphasized": "colors.bg.emphasized",
238
444
  "--color-solid": "colors.colorPalette.solid"
239
445
  },
240
- children: /* @__PURE__ */ t(
241
- Ve,
446
+ children: /* @__PURE__ */ e(
447
+ dn,
242
448
  {
243
449
  keyboard: !1,
244
450
  style: {
@@ -273,408 +479,468 @@ const We = O.Root, je = O.ValueText, H = () => {
273
479
  height: "24px",
274
480
  top: "50%",
275
481
  borderColor: "var(--color-solid)",
276
- transform: `translate(${e.reverse ? "50%" : "-50%"}, -50%)`,
482
+ transform: `translate(${n.reverse ? "50%" : "-50%"}, -50%)`,
277
483
  backgroundColor: "var(--bg)",
278
484
  marginTop: "0px"
279
485
  }
280
486
  },
281
- ...e
487
+ ...n
282
488
  }
283
489
  )
284
490
  }
285
- )), qe = () => {
286
- const e = P(), n = e == null ? void 0 : e.isUsingSpread, { beginPageIndex: r, totalApproximatePages: i = 0 } = H(), o = n ? Math.floor((r || 0) / 2) : r, [l, c] = U({
287
- default: o || 0
491
+ )), un = () => {
492
+ const n = E(), t = n == null ? void 0 : n.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = ee(), l = t ? Math.floor((o || 0) / 2) : o, [i, c] = le({
493
+ default: l || 0
288
494
  }), d = 0, u = Math.max(
289
495
  0,
290
- n ? Math.floor((i - 1) / 2) : i - 1
496
+ t ? Math.floor((r - 1) / 2) : r - 1
291
497
  );
292
- return B(() => {
293
- c.setValue(o || 0);
294
- }, [o, c]), {
295
- value: l,
498
+ return Y(() => {
499
+ c.setValue(l || 0);
500
+ }, [l, c]), {
501
+ value: i,
296
502
  valueSignal: c,
297
503
  min: d,
298
504
  max: u
299
505
  };
300
- }, Ue = () => {
301
- const e = D(), n = P(), { manifest: r } = v(() => e == null ? void 0 : e.context.state$, []) ?? {}, i = (r == null ? void 0 : r.readingDirection) === "rtl", o = n == null ? void 0 : n.isUsingSpread, { totalApproximatePages: l = 0, isBeginWithinChapter: c } = H(), d = 1, u = c, { value: s, valueSignal: f, min: h, max: S } = qe(), A = q(
302
- (T) => {
303
- const [k = 0] = Array.isArray(T) ? T : [T];
304
- f.setValue(k);
305
- const W = o ? Math.floor(k) * 2 : Math.floor(k);
306
- u ? e == null || e.navigation.goToPageOfSpineItem({
307
- pageIndex: W,
308
- spineItemId: e.pagination.getState().beginSpineItemIndex ?? 0,
506
+ }, gn = (n) => {
507
+ const t = R(), o = E(), { manifest: r } = P(() => t == null ? void 0 : t.context.state$, []) ?? {}, l = (r == null ? void 0 : r.readingDirection) === "rtl", i = o == null ? void 0 : o.isUsingSpread, { totalApproximatePages: c = 0, isBeginWithinChapter: d } = ee(), u = 1, s = d, { value: p, valueSignal: h, min: v, max: S } = un(), T = B(
508
+ (m) => {
509
+ const [y = 0] = Array.isArray(m) ? m : [m];
510
+ h.setValue(y);
511
+ const x = i ? Math.floor(y) * 2 : Math.floor(y);
512
+ s ? t == null || t.navigation.goToPageOfSpineItem({
513
+ pageIndex: x,
514
+ spineItemId: t.pagination.getState().beginSpineItemIndex ?? 0,
309
515
  animation: !1
310
- }) : e == null || e.navigation.goToAbsolutePageIndex({
311
- absolutePageIndex: W,
516
+ }) : t == null || t.navigation.goToAbsolutePageIndex({
517
+ absolutePageIndex: x,
312
518
  animation: !1
313
519
  });
314
520
  },
315
- [e, o, f, u]
521
+ [t, i, h, s]
316
522
  );
317
- return Y(
318
- () => e == null ? void 0 : e.navigation.throttleLock({
523
+ return se(
524
+ () => t == null ? void 0 : t.navigation.throttleLock({
319
525
  duration: 100,
320
- trigger: f.subject
526
+ trigger: h.subject
321
527
  }),
322
- [e, f]
323
- ), l === 1 || o && l === 2 ? null : /* @__PURE__ */ t(
324
- _e,
528
+ [t, h]
529
+ ), c === 1 || i && c === 2 ? null : /* @__PURE__ */ e(
530
+ hn,
325
531
  {
326
- value: [s],
532
+ value: [p],
327
533
  max: S,
328
- min: h,
329
- reverse: i,
330
- step: d,
331
- onChange: A
534
+ min: v,
535
+ reverse: l,
536
+ step: u,
537
+ onChange: T,
538
+ ...n
332
539
  }
333
540
  );
334
- }, Ye = b(
541
+ }, pn = f(
335
542
  ({
336
- open: e,
337
- onTableOfContentsClick: n,
338
- onHelpClick: r
543
+ open: n,
544
+ onItemClick: t
339
545
  }) => {
340
- const i = D(), o = v(() => i == null ? void 0 : i.navigation.state$, [i]), l = v(() => i == null ? void 0 : i.settings.values$, [i]), c = (l == null ? void 0 : l.computedPageTurnDirection) === "vertical", [d, u] = R(!0);
341
- return /* @__PURE__ */ t(
342
- K,
343
- {
344
- present: e,
345
- position: "bottom",
346
- children: /* @__PURE__ */ a(
347
- y,
546
+ const o = R(), r = P(() => o == null ? void 0 : o.navigation.state$, [o]), l = P(() => o == null ? void 0 : o.settings.values$, [o]), i = (l == null ? void 0 : l.computedPageTurnDirection) === "vertical", [c, d] = w(!0);
547
+ return /* @__PURE__ */ e(pe, { present: n, position: "bottom", children: /* @__PURE__ */ a(k, { flex: 1, overflow: "auto", children: [
548
+ /* @__PURE__ */ a(O, { flex: 1, alignItems: "center", justifyContent: "center", children: [
549
+ /* @__PURE__ */ e(
550
+ C,
551
+ {
552
+ "aria-label": "left",
553
+ size: "lg",
554
+ variant: "ghost",
555
+ flexShrink: 0,
556
+ onClick: () => o == null ? void 0 : o.navigation.goToLeftOrTopSpineItem(),
557
+ disabled: !(r != null && r.canGoLeftSpineItem) && !(r != null && r.canGoTopSpineItem),
558
+ children: i ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(Le, {})
559
+ }
560
+ ),
561
+ /* @__PURE__ */ a(
562
+ k,
348
563
  {
349
564
  flex: 1,
565
+ maxW: 400,
566
+ gap: 2,
567
+ alignItems: "center",
568
+ overflow: "auto",
569
+ px: 4,
350
570
  children: [
351
- /* @__PURE__ */ a(x, { flex: 1, alignItems: "center", justifyContent: "center", children: [
352
- /* @__PURE__ */ t(
353
- p,
354
- {
355
- "aria-label": "left",
356
- size: "lg",
357
- variant: "ghost",
358
- flexShrink: 0,
359
- onClick: () => i == null ? void 0 : i.navigation.goToLeftOrTopSpineItem(),
360
- disabled: !(o != null && o.canGoLeftSpineItem) && !(o != null && o.canGoTopSpineItem),
361
- children: c ? /* @__PURE__ */ t(Se, {}) : /* @__PURE__ */ t(Te, {})
362
- }
363
- ),
364
- /* @__PURE__ */ a(
365
- y,
366
- {
367
- flex: 1,
368
- maxW: 400,
369
- gap: 2,
370
- alignItems: "center",
371
- overflow: "visible",
372
- px: 4,
373
- children: [
374
- /* @__PURE__ */ t(Ne, {}),
375
- /* @__PURE__ */ t(z, { height: 5, maxW: 300, width: "100%", overflow: "visible", children: /* @__PURE__ */ t(Ue, {}) })
376
- ]
571
+ /* @__PURE__ */ e(cn, {}),
572
+ /* @__PURE__ */ e(
573
+ gn,
574
+ {
575
+ style: {
576
+ width: "100%",
577
+ maxWidth: "300px",
578
+ height: "35px"
377
579
  }
378
- ),
379
- /* @__PURE__ */ t(
380
- p,
580
+ }
581
+ )
582
+ ]
583
+ }
584
+ ),
585
+ /* @__PURE__ */ e(
586
+ C,
587
+ {
588
+ "aria-label": "right",
589
+ size: "lg",
590
+ flexShrink: 0,
591
+ variant: "ghost",
592
+ disabled: !(r != null && r.canGoRightSpineItem) && !(r != null && r.canGoBottomSpineItem),
593
+ onClick: () => {
594
+ o == null || o.navigation.goToRightOrBottomSpineItem();
595
+ },
596
+ children: i ? /* @__PURE__ */ e(_e, {}) : /* @__PURE__ */ e($e, {})
597
+ }
598
+ )
599
+ ] }),
600
+ /* @__PURE__ */ e(O, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ a(
601
+ U.Root,
602
+ {
603
+ open: c,
604
+ flex: 1,
605
+ onOpenChange: ({ open: u }) => {
606
+ d(u);
607
+ },
608
+ children: [
609
+ /* @__PURE__ */ e(
610
+ U.Trigger,
611
+ {
612
+ paddingY: "3",
613
+ width: "100%",
614
+ display: "flex",
615
+ justifyContent: "center",
616
+ children: /* @__PURE__ */ e(
617
+ De,
381
618
  {
382
- "aria-label": "right",
383
- size: "lg",
384
- flexShrink: 0,
385
- variant: "ghost",
386
- disabled: !(o != null && o.canGoRightSpineItem) && !(o != null && o.canGoBottomSpineItem),
387
- onClick: () => {
388
- i == null || i.navigation.goToRightOrBottomSpineItem();
389
- },
390
- children: c ? /* @__PURE__ */ t(ke, {}) : /* @__PURE__ */ t(we, {})
619
+ style: {
620
+ transform: c ? "rotate(0deg)" : "rotate(180deg)"
621
+ }
391
622
  }
392
623
  )
393
- ] }),
394
- /* @__PURE__ */ t(
395
- x,
624
+ }
625
+ ),
626
+ /* @__PURE__ */ a(U.Content, { display: "flex", justifyContent: "center", children: [
627
+ /* @__PURE__ */ e(
628
+ C,
396
629
  {
397
- alignItems: "center",
398
- justifyContent: "center",
399
- children: /* @__PURE__ */ a(
400
- M.Root,
401
- {
402
- open: d,
403
- flex: 1,
404
- onOpenChange: ({ open: s }) => {
405
- u(s);
406
- },
407
- children: [
408
- /* @__PURE__ */ t(
409
- M.Trigger,
410
- {
411
- paddingY: "3",
412
- width: "100%",
413
- display: "flex",
414
- justifyContent: "center",
415
- children: /* @__PURE__ */ t(
416
- be,
417
- {
418
- style: {
419
- transform: d ? "rotate(0deg)" : "rotate(180deg)"
420
- }
421
- }
422
- )
423
- }
424
- ),
425
- /* @__PURE__ */ a(
426
- M.Content,
427
- {
428
- display: "flex",
429
- justifyContent: "center",
430
- gap: 2,
431
- children: [
432
- /* @__PURE__ */ t(
433
- p,
434
- {
435
- "aria-label": "Help",
436
- size: "lg",
437
- variant: "ghost",
438
- onClick: r,
439
- children: /* @__PURE__ */ t(xe, {})
440
- }
441
- ),
442
- /* @__PURE__ */ t(
443
- p,
444
- {
445
- "aria-label": "Table of contents",
446
- size: "lg",
447
- variant: "ghost",
448
- onClick: n,
449
- children: /* @__PURE__ */ t(Ce, {})
450
- }
451
- )
452
- ]
453
- }
454
- )
455
- ]
456
- }
457
- )
630
+ "aria-label": "Help",
631
+ size: "lg",
632
+ variant: "ghost",
633
+ onClick: () => t("help"),
634
+ children: /* @__PURE__ */ e(Ae, {})
635
+ }
636
+ ),
637
+ /* @__PURE__ */ e(
638
+ C,
639
+ {
640
+ "aria-label": "Table of contents",
641
+ size: "lg",
642
+ variant: "ghost",
643
+ onClick: () => t("toc"),
644
+ children: /* @__PURE__ */ e(ze, {})
645
+ }
646
+ ),
647
+ he(o) && /* @__PURE__ */ e(
648
+ C,
649
+ {
650
+ "aria-label": "Search",
651
+ size: "lg",
652
+ variant: "ghost",
653
+ onClick: () => t("search"),
654
+ children: /* @__PURE__ */ e(Ee, {})
655
+ }
656
+ ),
657
+ ue(o) && /* @__PURE__ */ e(
658
+ C,
659
+ {
660
+ "aria-label": "Search",
661
+ size: "lg",
662
+ variant: "ghost",
663
+ onClick: () => t("bookmarks"),
664
+ children: /* @__PURE__ */ e(Be, {})
665
+ }
666
+ ),
667
+ ge(o) && /* @__PURE__ */ e(
668
+ C,
669
+ {
670
+ "aria-label": "Search",
671
+ size: "lg",
672
+ variant: "ghost",
673
+ onClick: () => t("annotations"),
674
+ children: /* @__PURE__ */ e(K, {})
458
675
  }
459
676
  )
460
- ]
461
- }
462
- )
463
- }
464
- );
677
+ ] })
678
+ ]
679
+ }
680
+ ) })
681
+ ] }) });
465
682
  }
466
- ), Qe = () => {
467
- const [e, n] = R(!1), r = q(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
468
- n(!1);
683
+ ), fn = () => {
684
+ const [n, t] = w(!1), o = B(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
685
+ t(!1);
469
686
  }) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
470
- n(!0);
687
+ t(!0);
471
688
  }), []);
472
- return B(() => {
473
- function i() {
474
- n(!!document.fullscreenElement);
689
+ return Y(() => {
690
+ function r() {
691
+ t(!!document.fullscreenElement);
475
692
  }
476
- return document.addEventListener("fullscreenchange", i), () => {
477
- document.removeEventListener("fullscreenchange", i);
693
+ return document.addEventListener("fullscreenchange", r), () => {
694
+ document.removeEventListener("fullscreenchange", r);
478
695
  };
479
696
  }, []), {
480
- isFullscreen: e,
481
- onToggleFullscreenClick: r
697
+ isFullscreen: n,
698
+ onToggleFullscreenClick: o
482
699
  };
483
- }, Ge = ({
484
- open: e,
485
- onBackClick: n,
486
- onMoreClick: r
487
- }) => {
488
- const i = D(), o = v(() => i == null ? void 0 : i.context.manifest$, [i]), { isFullscreen: l, onToggleFullscreenClick: c } = Qe();
489
- return /* @__PURE__ */ a(
490
- K,
491
- {
492
- present: e,
493
- position: "top",
494
- height: "80px",
495
- justifyContent: "space-between",
496
- children: [
497
- /* @__PURE__ */ t(
498
- p,
499
- {
500
- "aria-label": "left",
501
- size: "lg",
502
- variant: "ghost",
503
- flexShrink: 0,
504
- onClick: n,
505
- children: /* @__PURE__ */ t(ye, {})
506
- }
507
- ),
508
- /* @__PURE__ */ t(
509
- y,
510
- {
511
- flex: 1,
512
- maxW: 600,
513
- gap: 1,
514
- alignItems: "center",
515
- overflow: "auto",
516
- px: 4,
517
- children: /* @__PURE__ */ t(m, { truncate: !0, maxWidth: "100%", children: o == null ? void 0 : o.title })
518
- }
519
- ),
520
- /* @__PURE__ */ a(x, { children: [
521
- /* @__PURE__ */ t(
522
- p,
700
+ }, mn = f(
701
+ ({
702
+ open: n,
703
+ onItemClick: t
704
+ }) => {
705
+ const o = R(), r = P(() => o == null ? void 0 : o.context.manifest$, [o]), { isFullscreen: l, onToggleFullscreenClick: i } = fn();
706
+ return /* @__PURE__ */ a(
707
+ pe,
708
+ {
709
+ present: n,
710
+ position: "top",
711
+ height: "80px",
712
+ justifyContent: "space-between",
713
+ children: [
714
+ /* @__PURE__ */ e(
715
+ C,
523
716
  {
524
- "aria-label": "right",
717
+ "aria-label": "left",
525
718
  size: "lg",
526
- flexShrink: 0,
527
719
  variant: "ghost",
528
- onClick: r,
529
- children: /* @__PURE__ */ t(De, {})
720
+ flexShrink: 0,
721
+ onClick: () => t("back"),
722
+ children: /* @__PURE__ */ e(He, {})
530
723
  }
531
724
  ),
532
- /* @__PURE__ */ t(
533
- p,
725
+ /* @__PURE__ */ e(
726
+ k,
534
727
  {
535
- "aria-label": "right",
536
- size: "lg",
537
- flexShrink: 0,
538
- variant: "ghost",
539
- onClick: c,
540
- children: l ? /* @__PURE__ */ t(Ae, {}) : /* @__PURE__ */ t(Be, {})
728
+ flex: 1,
729
+ maxW: 600,
730
+ gap: 1,
731
+ alignItems: "center",
732
+ overflow: "auto",
733
+ px: 4,
734
+ children: /* @__PURE__ */ e(g, { truncate: !0, maxWidth: "100%", children: r == null ? void 0 : r.title })
541
735
  }
542
- )
543
- ] })
544
- ]
545
- }
546
- );
547
- }, Ke = b(
736
+ ),
737
+ /* @__PURE__ */ a(O, { children: [
738
+ /* @__PURE__ */ e(
739
+ C,
740
+ {
741
+ "aria-label": "right",
742
+ size: "lg",
743
+ flexShrink: 0,
744
+ variant: "ghost",
745
+ onClick: () => t("more"),
746
+ children: /* @__PURE__ */ e(je, {})
747
+ }
748
+ ),
749
+ /* @__PURE__ */ e(
750
+ C,
751
+ {
752
+ "aria-label": "right",
753
+ size: "lg",
754
+ flexShrink: 0,
755
+ variant: "ghost",
756
+ onClick: i,
757
+ children: l ? /* @__PURE__ */ e(Ve, {}) : /* @__PURE__ */ e(We, {})
758
+ }
759
+ )
760
+ ] })
761
+ ]
762
+ }
763
+ );
764
+ }
765
+ ), bn = f(
766
+ ({
767
+ onItemClick: n
768
+ }) => {
769
+ const [t] = Z();
770
+ return /* @__PURE__ */ a(X, { children: [
771
+ /* @__PURE__ */ e(mn, { open: t, onItemClick: n }),
772
+ /* @__PURE__ */ e(pn, { open: t, onItemClick: n })
773
+ ] });
774
+ }
775
+ ), xn = f(
776
+ ({
777
+ contextText: n = "",
778
+ startOffset: t = 0,
779
+ text: o,
780
+ cfi: r = "#",
781
+ onClick: l,
782
+ absolutePageIndex: i
783
+ }) => {
784
+ const d = n.substring(
785
+ Math.max(t - 15, 0),
786
+ Math.max(t, 0)
787
+ ), u = n.substring(
788
+ Math.min(t + o.length, n.length - 1),
789
+ Math.min(
790
+ t + o.length + 15,
791
+ n.length - 1
792
+ )
793
+ );
794
+ return /* @__PURE__ */ a(
795
+ q,
796
+ {
797
+ href: r,
798
+ style: { margin: 5, overflow: "hidden" },
799
+ onClick: (s) => {
800
+ s.preventDefault(), l(r);
801
+ },
802
+ display: "flex",
803
+ flexDirection: "column",
804
+ alignItems: "flex-start",
805
+ gap: 0,
806
+ children: [
807
+ /* @__PURE__ */ a(g, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
808
+ '"',
809
+ d,
810
+ /* @__PURE__ */ e("b", { children: o }),
811
+ u,
812
+ '"'
813
+ ] }),
814
+ /* @__PURE__ */ e(g, { fontSize: "sm", color: "gray.500", style: { textDecoration: "none" }, children: `Book page: ${i !== void 0 ? i + 1 : "unknown (not loaded)"}` })
815
+ ]
816
+ }
817
+ );
818
+ }
819
+ ), Cn = f(
548
820
  ({
549
- onBackClick: e,
550
- onMoreClick: n,
551
- onTableOfContentsClick: r,
552
- onHelpClick: i
821
+ onNavigate: n
553
822
  }) => {
554
- const [o] = $();
555
- return /* @__PURE__ */ a(E, { children: [
556
- /* @__PURE__ */ t(
557
- Ge,
823
+ const [t, o] = w(""), r = R(), l = he(r) ? r : void 0, i = (h) => {
824
+ o(h.target.value);
825
+ }, c = B(
826
+ (h) => {
827
+ n(), r == null || r.navigation.goToCfi(h);
828
+ },
829
+ [r, n]
830
+ ), d = P(
831
+ () => l == null ? void 0 : l.search.search(t).pipe(
832
+ ce((h) => ({ type: "end", data: h })),
833
+ Pe({ type: "start" })
834
+ ),
835
+ [r, t]
836
+ ), u = (d == null ? void 0 : d.type) === "start", s = (d == null ? void 0 : d.type) === "end" ? d.data : [], p = P(
837
+ () => r == null ? void 0 : r.pagination.locate(s.slice(0, 100)),
838
+ [s]
839
+ );
840
+ return /* @__PURE__ */ a(k, { flex: 1, height: "100%", children: [
841
+ /* @__PURE__ */ e(M, { px: 4, children: /* @__PURE__ */ e(
842
+ we,
558
843
  {
559
- open: o,
560
- onBackClick: e,
561
- onMoreClick: n
844
+ placeholder: "Type something...",
845
+ value: t,
846
+ onChange: i,
847
+ borderRadius: 0
562
848
  }
563
- ),
564
- /* @__PURE__ */ t(
565
- Ye,
849
+ ) }),
850
+ /* @__PURE__ */ a(
851
+ M,
566
852
  {
567
- open: o,
568
- onTableOfContentsClick: r,
569
- onHelpClick: i
853
+ px: 4,
854
+ pb: 4,
855
+ mt: 2,
856
+ flex: 1,
857
+ style: { overflow: "hidden", overflowY: "auto" },
858
+ children: [
859
+ u && /* @__PURE__ */ e(g, { children: "Searching ..." }),
860
+ !u && s.length === 0 && /* @__PURE__ */ e("p", { children: "There are no results" }),
861
+ !u && s.length >= 0 && /* @__PURE__ */ a(k, { children: [
862
+ /* @__PURE__ */ a(Q, { as: "h2", size: "md", children: [
863
+ s.length,
864
+ " result(s)"
865
+ ] }),
866
+ /* @__PURE__ */ e(k, { gap: 0, children: p == null ? void 0 : p.map((h, v) => {
867
+ var S, T, m, y, x, ne, te;
868
+ return /* @__PURE__ */ e(
869
+ xn,
870
+ {
871
+ contextText: ((m = (T = (S = h.meta) == null ? void 0 : S.range) == null ? void 0 : T.startContainer.parentElement) == null ? void 0 : m.textContent) ?? "",
872
+ pageIndex: (y = h.meta) == null ? void 0 : y.itemPageIndex,
873
+ startOffset: ((ne = (x = h.meta) == null ? void 0 : x.range) == null ? void 0 : ne.startOffset) ?? 0,
874
+ text: t,
875
+ cfi: h.cfi,
876
+ onClick: c,
877
+ absolutePageIndex: (te = h.meta) == null ? void 0 : te.absolutePageIndex
878
+ },
879
+ v
880
+ );
881
+ }) })
882
+ ] })
883
+ ]
570
884
  }
571
885
  )
572
886
  ] });
573
887
  }
574
- ), Xe = "@prose-reader/react-reader", Je = "1.185.0", Ze = C.forwardRef(function(n, r) {
575
- return /* @__PURE__ */ t(p, { variant: "ghost", "aria-label": "Close", ref: r, ...n, children: n.children ?? /* @__PURE__ */ t(Ie, {}) });
576
- }), X = C.forwardRef(function(n, r) {
577
- const {
578
- children: i,
579
- portalled: o = !0,
580
- portalRef: l,
581
- backdrop: c = !0,
582
- ...d
583
- } = n;
584
- return /* @__PURE__ */ a(Q, { disabled: !o, container: l, children: [
585
- c && /* @__PURE__ */ t(g.Backdrop, {}),
586
- /* @__PURE__ */ t(g.Positioner, { children: /* @__PURE__ */ t(g.Content, { ref: r, ...d, asChild: !1, children: i }) })
587
- ] });
588
- }), J = C.forwardRef(function(n, r) {
589
- return /* @__PURE__ */ t(
590
- g.CloseTrigger,
591
- {
592
- position: "absolute",
593
- top: "2",
594
- insetEnd: "2",
595
- ...n,
596
- asChild: !0,
597
- children: /* @__PURE__ */ t(Ze, { size: "sm", ref: r, children: n.children })
598
- }
599
- );
600
- }), Z = g.Root, ee = g.Footer, te = g.Header, ne = g.Body;
601
- g.Backdrop;
602
- const oe = g.Title;
603
- g.Description;
604
- g.Trigger;
605
- const re = g.ActionTrigger, et = b(
888
+ ), vn = f(
606
889
  ({
607
- open: e,
608
- setOpen: n
609
- }) => /* @__PURE__ */ t(
610
- Z,
890
+ open: n,
891
+ setOpen: t,
892
+ onNavigate: o
893
+ }) => /* @__PURE__ */ e(
894
+ N,
611
895
  {
612
896
  lazyMount: !0,
613
897
  placement: "center",
614
- open: e,
615
- onOpenChange: (r) => n(r.open),
898
+ open: n,
899
+ onOpenChange: (r) => t(r.open),
616
900
  size: { mdDown: "full", md: "lg" },
617
901
  scrollBehavior: "inside",
618
- children: /* @__PURE__ */ a(X, { children: [
619
- /* @__PURE__ */ t(te, { children: /* @__PURE__ */ t(oe, { children: "Help" }) }),
620
- /* @__PURE__ */ a(ne, { overflowY: "auto", flex: 1, children: [
621
- /* @__PURE__ */ t(j, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
622
- /* @__PURE__ */ a(x, { mb: 1, children: [
623
- /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(ve, {}) }),
624
- " ",
625
- /* @__PURE__ */ t(m, { children: "Navigate to right page" })
626
- ] }),
627
- /* @__PURE__ */ a(x, { mb: 1, children: [
628
- /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(Pe, {}) }),
629
- " ",
630
- /* @__PURE__ */ t(m, { children: "Navigate to left page" })
631
- ] }),
632
- /* @__PURE__ */ t(j, { mb: 2, mt: 4, as: "h3", size: "lg", children: "About" }),
633
- /* @__PURE__ */ a(m, { children: [
634
- Xe,
635
- " version: ",
636
- Je
637
- ] })
638
- ] }),
639
- /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
640
- /* @__PURE__ */ t(J, {})
902
+ children: /* @__PURE__ */ a(_, { height: "100%", children: [
903
+ /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { children: "Search" }) }),
904
+ /* @__PURE__ */ e(j, { flex: 1, children: /* @__PURE__ */ e(Cn, { onNavigate: o }) }),
905
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(z, { variant: "outline", children: "Cancel" }) }) }),
906
+ /* @__PURE__ */ e($, {})
641
907
  ] })
642
908
  }
643
909
  )
644
- ), tt = b(
910
+ ), In = f(
645
911
  ({
646
- onNavigate: e
912
+ onNavigate: n
647
913
  }) => {
648
- const n = D(), { manifest: r, assumedRenditionLayout: i } = v(() => n == null ? void 0 : n.context.state$, [n]) ?? {}, { nav: o } = r ?? {}, l = P();
649
- o != null && o.toc;
650
- const { beginSpineItemIndex: c, beginPageIndexInSpineItem: d } = l ?? {}, u = (i === "reflowable" ? d : c) || 0;
651
- console.log({ assumedRenditionLayout: i, currentSpineItemOrChapterPageIndex: u });
652
- let s = l == null ? void 0 : l.beginChapterInfo;
914
+ const t = R(), { manifest: o, assumedRenditionLayout: r } = P(() => t == null ? void 0 : t.context.state$, [t]) ?? {}, { nav: l } = o ?? {}, i = E();
915
+ l != null && l.toc;
916
+ const { beginSpineItemIndex: c, beginPageIndexInSpineItem: d } = i ?? {}, u = (r === "reflowable" ? d : c) || 0;
917
+ console.log({ assumedRenditionLayout: r, currentSpineItemOrChapterPageIndex: u });
918
+ let s = i == null ? void 0 : i.beginChapterInfo;
653
919
  for (; s != null && s.subChapter; )
654
920
  s = s == null ? void 0 : s.subChapter;
655
- const f = (h, S, A) => /* @__PURE__ */ a(ie.Fragment, { children: [
656
- /* @__PURE__ */ t(
657
- w.Item,
921
+ const p = (h, v, S) => /* @__PURE__ */ a(fe.Fragment, { children: [
922
+ /* @__PURE__ */ e(
923
+ I.Item,
658
924
  {
659
- pl: 4 * (A + 1),
925
+ pl: 4 * (S + 1),
660
926
  style: {
661
927
  display: "flex",
662
928
  alignItems: "center"
663
929
  },
664
930
  children: /* @__PURE__ */ a(
665
- pe,
931
+ q,
666
932
  {
667
933
  onClick: () => {
668
- e(), n == null || n.navigation.goToUrl(h.href);
934
+ n(), t == null || t.navigation.goToUrl(h.href);
669
935
  },
670
936
  href: "#",
671
937
  children: [
672
- (s == null ? void 0 : s.path) === h.path && /* @__PURE__ */ t(w.Indicator, { asChild: !0, children: /* @__PURE__ */ t(V, {}) }),
673
- (s == null ? void 0 : s.path) !== h.path && /* @__PURE__ */ t(w.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ t(V, {}) }),
674
- /* @__PURE__ */ a(y, { gap: 0, children: [
675
- /* @__PURE__ */ t(m, { fontSize: "md", children: h.title || h.path }),
676
- (s == null ? void 0 : s.path) === h.path && /* @__PURE__ */ t(
677
- m,
938
+ (s == null ? void 0 : s.path) === h.path && /* @__PURE__ */ e(I.Indicator, { asChild: !0, children: /* @__PURE__ */ e(re, {}) }),
939
+ (s == null ? void 0 : s.path) !== h.path && /* @__PURE__ */ e(I.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(re, {}) }),
940
+ /* @__PURE__ */ a(k, { gap: 0, children: [
941
+ /* @__PURE__ */ e(g, { fontSize: "md", children: h.title || h.path }),
942
+ (s == null ? void 0 : s.path) === h.path && /* @__PURE__ */ e(
943
+ g,
678
944
  {
679
945
  fontStyle: "italic",
680
946
  fontWeight: "bold",
@@ -688,83 +954,105 @@ const re = g.ActionTrigger, et = b(
688
954
  )
689
955
  }
690
956
  ),
691
- h.contents.length > 0 && /* @__PURE__ */ t(w.Root, { as: "div", gap: 2, children: h.contents.map(
692
- (T, k) => f(T, k, A + 1)
957
+ h.contents.length > 0 && /* @__PURE__ */ e(I.Root, { as: "div", gap: 2, children: h.contents.map(
958
+ (T, m) => p(T, m, S + 1)
693
959
  ) })
694
- ] }, S);
695
- return /* @__PURE__ */ t(w.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: o == null ? void 0 : o.toc.map((h, S) => f(h, S, 0)) });
960
+ ] }, v);
961
+ return /* @__PURE__ */ e(I.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: l == null ? void 0 : l.toc.map((h, v) => p(h, v, 0)) });
696
962
  }
697
- ), nt = b(
963
+ ), Sn = f(
698
964
  ({
699
- open: e,
700
- setOpen: n,
701
- onNavigate: r
702
- }) => /* @__PURE__ */ t(
703
- Z,
965
+ open: n,
966
+ setOpen: t,
967
+ onNavigate: o
968
+ }) => /* @__PURE__ */ e(
969
+ N,
704
970
  {
705
971
  lazyMount: !0,
706
972
  placement: "center",
707
- open: e,
708
- onOpenChange: (i) => n(i.open),
973
+ open: n,
974
+ onOpenChange: (r) => t(r.open),
709
975
  size: { mdDown: "full", md: "lg" },
710
976
  scrollBehavior: "inside",
711
- children: /* @__PURE__ */ a(X, { children: [
712
- /* @__PURE__ */ t(te, { children: /* @__PURE__ */ t(oe, { children: "Table of Contents" }) }),
713
- /* @__PURE__ */ t(ne, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ t(tt, { onNavigate: r }) }),
714
- /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
715
- /* @__PURE__ */ t(J, {})
977
+ children: /* @__PURE__ */ a(_, { children: [
978
+ /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(V, { children: "Table of Contents" }) }),
979
+ /* @__PURE__ */ e(j, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(In, { onNavigate: o }) }),
980
+ /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(z, { variant: "outline", children: "Cancel" }) }) }),
981
+ /* @__PURE__ */ e($, {})
716
982
  ] })
717
983
  }
718
984
  )
719
- ), pt = ({
720
- enableFloatingTime: e = !0,
721
- enableFloatingProgress: n = !0,
722
- ...r
985
+ ), _n = ({
986
+ enableFloatingTime: n = !0,
987
+ enableFloatingProgress: t = !0,
988
+ onItemClick: o
723
989
  }) => {
724
- const [i, o] = R(!1), [l, c] = R(!1), [d, u] = $();
725
- return /* @__PURE__ */ a(E, { children: [
726
- n && /* @__PURE__ */ t(
727
- L,
990
+ const [r, l] = w(!1), [i, c] = w(!1), [d, u] = w(!1), [s, p] = w(!1), [h, v] = w(!1), [S, T] = Z(), m = B(() => {
991
+ l(!1), c(!1), u(!1), p(!1), v(!1), T(!1);
992
+ }, [T]), y = B(
993
+ (x) => {
994
+ x === "annotations" ? p(!0) : x === "search" ? u(!0) : x === "help" ? c(!0) : x === "toc" ? l(!0) : x === "bookmarks" && v(!0), o == null || o(x);
995
+ },
996
+ [o]
997
+ );
998
+ return /* @__PURE__ */ a(X, { children: [
999
+ t && /* @__PURE__ */ e(
1000
+ G,
728
1001
  {
729
- present: !d,
1002
+ present: !S,
730
1003
  animationName: { _open: "fade-in", _closed: "fade-out" },
731
1004
  animationDuration: "moderate",
732
- children: /* @__PURE__ */ t(ze, {})
1005
+ children: /* @__PURE__ */ e(Ze, {})
733
1006
  }
734
1007
  ),
735
- /* @__PURE__ */ t(
736
- Ke,
1008
+ /* @__PURE__ */ e(bn, { onItemClick: y }),
1009
+ /* @__PURE__ */ e(Je, { open: i, setOpen: c }),
1010
+ /* @__PURE__ */ e(
1011
+ Sn,
737
1012
  {
738
- ...r,
739
- onTableOfContentsClick: () => o(!0),
740
- onHelpClick: () => c(!0)
1013
+ open: r,
1014
+ setOpen: l,
1015
+ onNavigate: m
741
1016
  }
742
1017
  ),
743
- /* @__PURE__ */ t(et, { open: l, setOpen: c }),
744
- /* @__PURE__ */ t(
745
- nt,
1018
+ /* @__PURE__ */ e(
1019
+ vn,
746
1020
  {
747
- open: i,
748
- setOpen: o,
749
- onNavigate: () => {
750
- o(!1), u(!1);
751
- }
1021
+ open: d,
1022
+ setOpen: u,
1023
+ onNavigate: m
1024
+ }
1025
+ ),
1026
+ /* @__PURE__ */ e(
1027
+ Ue,
1028
+ {
1029
+ open: s,
1030
+ setOpen: p,
1031
+ onNavigate: m
1032
+ }
1033
+ ),
1034
+ /* @__PURE__ */ e(
1035
+ Ge,
1036
+ {
1037
+ open: h,
1038
+ setOpen: v,
1039
+ onNavigate: m
752
1040
  }
753
1041
  ),
754
- /* @__PURE__ */ t(
755
- L,
1042
+ /* @__PURE__ */ e(
1043
+ G,
756
1044
  {
757
- present: e || d,
1045
+ present: n || S,
758
1046
  animationName: { _open: "fade-in", _closed: "fade-out" },
759
1047
  animationDuration: "slow",
760
1048
  overflow: "hidden",
761
- children: /* @__PURE__ */ t(Ee, {})
1049
+ children: /* @__PURE__ */ e(tn, {})
762
1050
  }
763
1051
  )
764
1052
  ] });
765
1053
  };
766
1054
  export {
767
- pt as ReactReader,
768
- ft as ReactReaderProvider
1055
+ _n as ReactReader,
1056
+ Ln as ReactReaderProvider
769
1057
  };
770
1058
  //# sourceMappingURL=index.js.map