@prose-reader/react-reader 1.255.0 → 1.257.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.
- package/dist/ReactReader.d.ts +2 -2
- package/dist/context/context.d.ts +3 -3
- package/dist/fonts/useFontSizeNotifications.d.ts +4 -0
- package/dist/index.js +628 -641
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/navigation/FloatingTime.d.ts +1 -1
- package/dist/notifications/useNotifications.d.ts +0 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { signal as
|
|
5
|
-
import { Subject as
|
|
6
|
-
import { IconButton as I, Portal as
|
|
7
|
-
import { LuX as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import { isPositionInArea as
|
|
10
|
-
import { isShallowEqual as
|
|
11
|
-
import { BiFontSize as
|
|
12
|
-
import { BsBookmarks as
|
|
13
|
-
import { MdOutlineFitScreen as
|
|
14
|
-
import { RiGalleryView2 as
|
|
15
|
-
import { RxDoubleArrowUp as
|
|
16
|
-
import { HiOutlineInformationCircle as
|
|
17
|
-
import
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as fe } from "react/jsx-runtime";
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import Xe, { createContext as Ke, useContext as Fe, useEffect as G, memo as f, useCallback as z, useState as P, useMemo as Je, useLayoutEffect as en, useRef as nn } from "react";
|
|
4
|
+
import { signal as N, useObserve as C, useConstant as ie, useSignalValue as ue, isDefined as _e, useLiveRef as tn, useSubscribe as me, useSignalState as on } from "reactjrx";
|
|
5
|
+
import { Subject as rn, map as V, filter as he, switchMap as W, EMPTY as ze, of as pe, withLatestFrom as an, NEVER as xe, startWith as ln, distinctUntilChanged as Le, throttleTime as Ve, tap as sn, first as $e, combineLatest as cn, mergeMap as dn, Observable as un, skip as hn, merge as Ne, timer as He, finalize as pn, BehaviorSubject as gn, animationFrameScheduler as fn } from "rxjs";
|
|
6
|
+
import { IconButton as I, Portal as ke, Dialog as w, List as D, Link as Ie, Stack as O, Text as b, Tabs as B, Button as q, Presence as se, Box as _, createToaster as mn, Toaster as bn, Toast as ne, Spinner as Cn, RadioGroup as ae, Slider as y, HStack as F, For as vn, useMediaQuery as Sn, Fieldset as H, Heading as Ce, Kbd as we, Popover as te, Progress as ce, chakra as xn, Collapsible as ve, Field as re, Input as kn } from "@chakra-ui/react";
|
|
7
|
+
import { LuX as In, LuNotebookPen as ge, LuBookmark as Rn, LuCheck as On, LuArrowBigRight as Mn, LuArrowBigLeft as Tn, LuChevronDown as zn, LuCircleHelp as wn, LuTableOfContents as yn, LuSearch as Pn, LuZoomOut as En, LuZoomIn as Bn, LuGalleryHorizontal as An, LuCircleCheck as ye } from "react-icons/lu";
|
|
8
|
+
import { createPortal as Dn } from "react-dom";
|
|
9
|
+
import { isPositionInArea as Fn } from "@prose-reader/enhancer-gestures";
|
|
10
|
+
import { isShallowEqual as _n, observeIntersection as Ln, isHtmlTagElement as Vn } from "@prose-reader/core";
|
|
11
|
+
import { BiFontSize as $n } from "react-icons/bi";
|
|
12
|
+
import { BsBookmarks as Nn } from "react-icons/bs";
|
|
13
|
+
import { MdOutlineFitScreen as Hn, MdFullscreenExit as Wn, MdFullscreen as Gn } from "react-icons/md";
|
|
14
|
+
import { RiGalleryView2 as qn } from "react-icons/ri";
|
|
15
|
+
import { RxDoubleArrowUp as jn, RxDoubleArrowLeft as Qn, RxDoubleArrowDown as Un, RxDoubleArrowRight as Yn } from "react-icons/rx";
|
|
16
|
+
import { HiOutlineInformationCircle as Zn } from "react-icons/hi";
|
|
17
|
+
import Xn from "rc-slider";
|
|
18
18
|
import "rc-slider/assets/index.css";
|
|
19
|
-
import { IoIosArrowBack as
|
|
20
|
-
const
|
|
19
|
+
import { IoIosArrowBack as Kn, IoMdMore as Jn } from "react-icons/io";
|
|
20
|
+
const et = "data-bookmark-area", We = () => ({
|
|
21
21
|
reader: void 0,
|
|
22
22
|
quickMenuOpen: !1,
|
|
23
23
|
onQuickMenuOpenChange: () => {
|
|
24
24
|
},
|
|
25
|
-
quickMenuBottomBarBoundingBoxSignal:
|
|
25
|
+
quickMenuBottomBarBoundingBoxSignal: N({
|
|
26
26
|
default: void 0
|
|
27
27
|
}),
|
|
28
|
-
notificationsSubject: new
|
|
28
|
+
notificationsSubject: new rn(),
|
|
29
29
|
refitMenuOpen: !1,
|
|
30
30
|
onRefitMenuOpenChange: () => {
|
|
31
31
|
},
|
|
@@ -35,27 +35,30 @@ const Kn = "data-bookmark-area", We = () => ({
|
|
|
35
35
|
fontSizeMin: 0.2,
|
|
36
36
|
fontSizeMax: 5,
|
|
37
37
|
uncontrolledFontSize: 1
|
|
38
|
-
}),
|
|
39
|
-
|
|
38
|
+
}), Re = Ke(
|
|
39
|
+
N({ default: We() })
|
|
40
40
|
), $ = (n) => {
|
|
41
|
-
const t =
|
|
42
|
-
return
|
|
43
|
-
},
|
|
41
|
+
const t = Fe(Re);
|
|
42
|
+
return C(t, n);
|
|
43
|
+
}, nt = () => Fe(Re), v = () => {
|
|
44
44
|
const { reader: n } = $(["reader"]);
|
|
45
45
|
return n;
|
|
46
|
-
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n,
|
|
47
|
-
const n =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, de = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, qe = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, je = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, tt = () => {
|
|
47
|
+
const n = v(), { fontSize: t, uncontrolledFontSize: o } = $([
|
|
48
|
+
"fontSize",
|
|
49
|
+
"uncontrolledFontSize"
|
|
50
|
+
]), r = t ?? o;
|
|
51
|
+
return G(() => {
|
|
52
|
+
if (n && r) {
|
|
53
|
+
const i = setTimeout(() => {
|
|
51
54
|
n.settings.update({
|
|
52
|
-
fontScale:
|
|
55
|
+
fontScale: r
|
|
53
56
|
});
|
|
54
57
|
}, 200);
|
|
55
|
-
return () => clearTimeout(
|
|
58
|
+
return () => clearTimeout(i);
|
|
56
59
|
}
|
|
57
|
-
}, [n,
|
|
58
|
-
},
|
|
60
|
+
}, [n, r]), null;
|
|
61
|
+
}, ot = ({
|
|
59
62
|
children: n,
|
|
60
63
|
onQuickMenuOpenChange: t,
|
|
61
64
|
quickMenuOpen: o,
|
|
@@ -65,44 +68,44 @@ const Kn = "data-bookmark-area", We = () => ({
|
|
|
65
68
|
onFontSizeChange: s,
|
|
66
69
|
...c
|
|
67
70
|
}) => {
|
|
68
|
-
const d =
|
|
69
|
-
() =>
|
|
70
|
-
),
|
|
71
|
+
const d = ie(() => N({ default: We() })), u = ie(
|
|
72
|
+
() => N({ default: d.value.fontSizeMenuOpen })
|
|
73
|
+
), p = ue(
|
|
71
74
|
u
|
|
72
|
-
),
|
|
73
|
-
(
|
|
74
|
-
u.update(
|
|
75
|
+
), h = z(
|
|
76
|
+
(L) => {
|
|
77
|
+
u.update(L);
|
|
75
78
|
},
|
|
76
79
|
[u]
|
|
77
|
-
),
|
|
78
|
-
() =>
|
|
79
|
-
),
|
|
80
|
-
(
|
|
81
|
-
|
|
80
|
+
), m = ie(
|
|
81
|
+
() => N({ default: d.value.quickMenuOpen })
|
|
82
|
+
), x = z(
|
|
83
|
+
(L) => {
|
|
84
|
+
m.update(L);
|
|
82
85
|
},
|
|
83
|
-
[
|
|
84
|
-
), k =
|
|
85
|
-
|
|
86
|
-
),
|
|
87
|
-
() =>
|
|
88
|
-
),
|
|
89
|
-
(
|
|
90
|
-
R.update(
|
|
86
|
+
[m]
|
|
87
|
+
), k = ue(
|
|
88
|
+
m
|
|
89
|
+
), T = o ?? k, S = t ?? x, R = ie(
|
|
90
|
+
() => N({ default: d.value.refitMenuOpen })
|
|
91
|
+
), E = z(
|
|
92
|
+
(L) => {
|
|
93
|
+
R.update(L);
|
|
91
94
|
},
|
|
92
95
|
[R]
|
|
93
|
-
),
|
|
96
|
+
), M = ue(
|
|
94
97
|
R
|
|
95
98
|
);
|
|
96
|
-
return
|
|
97
|
-
d.update((
|
|
98
|
-
...
|
|
99
|
+
return G(() => {
|
|
100
|
+
d.update((L) => ({
|
|
101
|
+
...L,
|
|
99
102
|
...c,
|
|
100
|
-
onQuickMenuOpenChange:
|
|
101
|
-
quickMenuOpen:
|
|
102
|
-
onFontSizeMenuOpenChange:
|
|
103
|
-
fontSizeMenuOpen:
|
|
104
|
-
onRefitMenuOpenChange:
|
|
105
|
-
refitMenuOpen:
|
|
103
|
+
onQuickMenuOpenChange: S,
|
|
104
|
+
quickMenuOpen: T,
|
|
105
|
+
onFontSizeMenuOpenChange: h,
|
|
106
|
+
fontSizeMenuOpen: p,
|
|
107
|
+
onRefitMenuOpenChange: E,
|
|
108
|
+
refitMenuOpen: M,
|
|
106
109
|
fontSizeScope: r,
|
|
107
110
|
onFontSizeScopeChange: i,
|
|
108
111
|
fontSize: a,
|
|
@@ -110,29 +113,29 @@ const Kn = "data-bookmark-area", We = () => ({
|
|
|
110
113
|
}));
|
|
111
114
|
}, [
|
|
112
115
|
...Object.values(c),
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
T,
|
|
117
|
+
S,
|
|
115
118
|
r,
|
|
116
119
|
i,
|
|
117
120
|
a,
|
|
118
121
|
s,
|
|
119
122
|
d,
|
|
120
|
-
g,
|
|
121
123
|
p,
|
|
122
124
|
h,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
M,
|
|
126
|
+
E
|
|
127
|
+
]), /* @__PURE__ */ e(Re.Provider, { value: d, children: n });
|
|
128
|
+
}, Eo = f(
|
|
126
129
|
({
|
|
127
130
|
children: n,
|
|
128
131
|
...t
|
|
129
|
-
}) => /* @__PURE__ */ l(
|
|
130
|
-
/* @__PURE__ */ e(
|
|
132
|
+
}) => /* @__PURE__ */ l(ot, { ...t, children: [
|
|
133
|
+
/* @__PURE__ */ e(tt, {}),
|
|
131
134
|
n
|
|
132
135
|
] })
|
|
133
|
-
),
|
|
134
|
-
return /* @__PURE__ */ e(I, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(
|
|
135
|
-
}), j =
|
|
136
|
+
), rt = A.forwardRef(function(t, o) {
|
|
137
|
+
return /* @__PURE__ */ e(I, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(In, {}) });
|
|
138
|
+
}), j = A.forwardRef(function(t, o) {
|
|
136
139
|
const {
|
|
137
140
|
children: r,
|
|
138
141
|
portalled: i = !0,
|
|
@@ -140,34 +143,34 @@ const Kn = "data-bookmark-area", We = () => ({
|
|
|
140
143
|
backdrop: s = !0,
|
|
141
144
|
...c
|
|
142
145
|
} = t;
|
|
143
|
-
return /* @__PURE__ */ l(
|
|
144
|
-
s && /* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
146
|
+
return /* @__PURE__ */ l(ke, { disabled: !i, container: a, children: [
|
|
147
|
+
s && /* @__PURE__ */ e(w.Backdrop, {}),
|
|
148
|
+
/* @__PURE__ */ e(w.Positioner, { children: /* @__PURE__ */ e(w.Content, { ref: o, ...c, asChild: !1, children: r }) })
|
|
146
149
|
] });
|
|
147
|
-
}),
|
|
150
|
+
}), Q = A.forwardRef(function(t, o) {
|
|
148
151
|
return /* @__PURE__ */ e(
|
|
149
|
-
|
|
152
|
+
w.CloseTrigger,
|
|
150
153
|
{
|
|
151
154
|
position: "absolute",
|
|
152
155
|
top: "2",
|
|
153
156
|
insetEnd: "2",
|
|
154
157
|
...t,
|
|
155
158
|
asChild: !0,
|
|
156
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(rt, { size: "sm", ref: o, children: t.children })
|
|
157
160
|
}
|
|
158
161
|
);
|
|
159
|
-
}),
|
|
160
|
-
|
|
161
|
-
const K =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
const t =
|
|
166
|
-
return { data:
|
|
162
|
+
}), U = w.Root, Y = w.Footer, Z = w.Header, X = w.Body;
|
|
163
|
+
w.Backdrop;
|
|
164
|
+
const K = w.Title;
|
|
165
|
+
w.Description;
|
|
166
|
+
w.Trigger;
|
|
167
|
+
const J = w.ActionTrigger, it = (n) => {
|
|
168
|
+
const t = v(), o = de(t) ? t : void 0;
|
|
169
|
+
return { data: C(
|
|
167
170
|
() => o?.annotations.annotations$.pipe(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
V((i) => i.find((a) => a.id === n)),
|
|
172
|
+
he(_e),
|
|
173
|
+
W((i) => o.locateResource(i))
|
|
171
174
|
),
|
|
172
175
|
[o]
|
|
173
176
|
) };
|
|
@@ -176,23 +179,23 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
176
179
|
onNavigate: t,
|
|
177
180
|
allowLeftIcon: o = !0
|
|
178
181
|
}) => {
|
|
179
|
-
const r =
|
|
180
|
-
return /* @__PURE__ */ e(
|
|
181
|
-
|
|
182
|
+
const r = v(), { data: i } = it(n), a = i?.meta.range?.toString() || i?.meta.node?.textContent;
|
|
183
|
+
return /* @__PURE__ */ e(D.Item, { children: /* @__PURE__ */ l(
|
|
184
|
+
Ie,
|
|
182
185
|
{
|
|
183
186
|
href: "#",
|
|
184
187
|
onClick: () => {
|
|
185
188
|
t(), r?.navigation.goToCfi(i?.meta.cfi ?? "");
|
|
186
189
|
},
|
|
187
190
|
children: [
|
|
188
|
-
i?.resource?.notes ? /* @__PURE__ */ e(
|
|
191
|
+
i?.resource?.notes ? /* @__PURE__ */ e(D.Indicator, { asChild: !0, children: /* @__PURE__ */ e(ge, {}) }) : o ? /* @__PURE__ */ e(D.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(ge, {}) }) : null,
|
|
189
192
|
/* @__PURE__ */ l(O, { gap: 0, children: [
|
|
190
|
-
a ? /* @__PURE__ */ e(
|
|
193
|
+
a ? /* @__PURE__ */ e(b, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ l(b, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
|
|
191
194
|
"Page ",
|
|
192
195
|
(i?.meta.absolutePageIndex ?? 0) + 1
|
|
193
196
|
] }),
|
|
194
197
|
/* @__PURE__ */ e(
|
|
195
|
-
|
|
198
|
+
b,
|
|
196
199
|
{
|
|
197
200
|
fontStyle: "italic",
|
|
198
201
|
fontWeight: "bold",
|
|
@@ -204,24 +207,24 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
204
207
|
]
|
|
205
208
|
}
|
|
206
209
|
) });
|
|
207
|
-
},
|
|
208
|
-
const n =
|
|
209
|
-
return { data:
|
|
210
|
+
}, be = () => {
|
|
211
|
+
const n = v(), t = de(n) ? n : void 0;
|
|
212
|
+
return { data: C(
|
|
210
213
|
() => t?.annotations.annotations$.pipe(
|
|
211
|
-
|
|
214
|
+
W(
|
|
212
215
|
(r) => t.locateResource(r)
|
|
213
216
|
)
|
|
214
217
|
),
|
|
215
218
|
[t]
|
|
216
219
|
) };
|
|
217
|
-
},
|
|
218
|
-
const { data: n } =
|
|
220
|
+
}, at = () => {
|
|
221
|
+
const { data: n } = be();
|
|
219
222
|
return {
|
|
220
223
|
data: n?.filter((t) => t.meta.isCfiRange)
|
|
221
224
|
};
|
|
222
|
-
},
|
|
223
|
-
const { data: t } =
|
|
224
|
-
return /* @__PURE__ */ e(
|
|
225
|
+
}, lt = ({ onNavigate: n }) => {
|
|
226
|
+
const { data: t } = at();
|
|
227
|
+
return /* @__PURE__ */ e(D.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
225
228
|
Qe,
|
|
226
229
|
{
|
|
227
230
|
id: o.resource.id,
|
|
@@ -229,16 +232,16 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
229
232
|
},
|
|
230
233
|
o.resource.id
|
|
231
234
|
)) });
|
|
232
|
-
},
|
|
233
|
-
const { data: n } =
|
|
235
|
+
}, st = () => {
|
|
236
|
+
const { data: n } = be();
|
|
234
237
|
return {
|
|
235
238
|
data: n?.filter(
|
|
236
239
|
(t) => !t.meta.isCfiRange && !t.resource.notes
|
|
237
240
|
)
|
|
238
241
|
};
|
|
239
|
-
},
|
|
240
|
-
const { data: t } =
|
|
241
|
-
return /* @__PURE__ */ e(
|
|
242
|
+
}, ct = ({ onNavigate: n }) => {
|
|
243
|
+
const { data: t } = st();
|
|
244
|
+
return /* @__PURE__ */ e(D.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
242
245
|
Qe,
|
|
243
246
|
{
|
|
244
247
|
id: o.resource.id,
|
|
@@ -247,42 +250,42 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
247
250
|
},
|
|
248
251
|
o.resource.id
|
|
249
252
|
)) });
|
|
250
|
-
},
|
|
253
|
+
}, dt = f(
|
|
251
254
|
({
|
|
252
255
|
onNavigate: n,
|
|
253
256
|
defaultTab: t
|
|
254
257
|
}) => {
|
|
255
|
-
const [o, r] =
|
|
258
|
+
const [o, r] = P(t ?? "bookmarks");
|
|
256
259
|
return /* @__PURE__ */ l(
|
|
257
|
-
|
|
260
|
+
B.Root,
|
|
258
261
|
{
|
|
259
262
|
value: o,
|
|
260
263
|
onValueChange: (i) => r(i.value),
|
|
261
264
|
children: [
|
|
262
|
-
/* @__PURE__ */ l(
|
|
263
|
-
/* @__PURE__ */ l(
|
|
264
|
-
/* @__PURE__ */ e(
|
|
265
|
+
/* @__PURE__ */ l(B.List, { children: [
|
|
266
|
+
/* @__PURE__ */ l(B.Trigger, { value: "bookmarks", children: [
|
|
267
|
+
/* @__PURE__ */ e(Rn, {}),
|
|
265
268
|
"Bookmarks"
|
|
266
269
|
] }),
|
|
267
|
-
/* @__PURE__ */ l(
|
|
268
|
-
/* @__PURE__ */ e(
|
|
270
|
+
/* @__PURE__ */ l(B.Trigger, { value: "annotations", children: [
|
|
271
|
+
/* @__PURE__ */ e(ge, {}),
|
|
269
272
|
"Annotations"
|
|
270
273
|
] }),
|
|
271
|
-
/* @__PURE__ */ e(
|
|
274
|
+
/* @__PURE__ */ e(B.Indicator, {})
|
|
272
275
|
] }),
|
|
273
|
-
/* @__PURE__ */ e(
|
|
274
|
-
/* @__PURE__ */ e(
|
|
276
|
+
/* @__PURE__ */ e(B.Content, { value: "bookmarks", children: /* @__PURE__ */ e(ct, { onNavigate: n }) }),
|
|
277
|
+
/* @__PURE__ */ e(B.Content, { value: "annotations", children: /* @__PURE__ */ e(lt, { onNavigate: n }) })
|
|
275
278
|
]
|
|
276
279
|
}
|
|
277
280
|
);
|
|
278
281
|
}
|
|
279
|
-
),
|
|
282
|
+
), ut = f(
|
|
280
283
|
({
|
|
281
284
|
openWith: n,
|
|
282
285
|
setOpen: t,
|
|
283
286
|
onNavigate: o
|
|
284
287
|
}) => /* @__PURE__ */ e(
|
|
285
|
-
|
|
288
|
+
U,
|
|
286
289
|
{
|
|
287
290
|
lazyMount: !0,
|
|
288
291
|
placement: "center",
|
|
@@ -291,66 +294,66 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
291
294
|
size: { mdDown: "full", md: "lg" },
|
|
292
295
|
scrollBehavior: "inside",
|
|
293
296
|
children: /* @__PURE__ */ l(j, { height: "100%", children: [
|
|
294
|
-
/* @__PURE__ */ e(
|
|
295
|
-
/* @__PURE__ */ e(
|
|
296
|
-
|
|
297
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Annotations" }) }),
|
|
298
|
+
/* @__PURE__ */ e(X, { flex: 1, children: /* @__PURE__ */ e(
|
|
299
|
+
dt,
|
|
297
300
|
{
|
|
298
301
|
onNavigate: o,
|
|
299
302
|
defaultTab: n
|
|
300
303
|
}
|
|
301
304
|
) }),
|
|
302
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
303
|
-
/* @__PURE__ */ e(
|
|
305
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Cancel" }) }) }),
|
|
306
|
+
/* @__PURE__ */ e(Q, {})
|
|
304
307
|
] })
|
|
305
308
|
}
|
|
306
309
|
)
|
|
307
|
-
),
|
|
308
|
-
const t =
|
|
309
|
-
return o ? /* @__PURE__ */ e(
|
|
310
|
-
}),
|
|
310
|
+
), ht = f(({ children: n }) => {
|
|
311
|
+
const t = v(), o = C(() => t?.spine.element$, [t]);
|
|
312
|
+
return o ? /* @__PURE__ */ e(fe, { children: Dn(n, o) }) : null;
|
|
313
|
+
}), pt = ({
|
|
311
314
|
absolutePageIndex: n,
|
|
312
315
|
itemIndex: t
|
|
313
316
|
}) => {
|
|
314
|
-
const o =
|
|
317
|
+
const o = v();
|
|
315
318
|
return {
|
|
316
|
-
spineItem:
|
|
317
|
-
|
|
318
|
-
) :
|
|
319
|
+
spineItem: C(() => o ? t !== void 0 ? pe(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
|
|
320
|
+
V((i) => o.spine.spineItemsManager.get(i?.itemIndex))
|
|
321
|
+
) : ze : ze, [t, n, o])
|
|
319
322
|
};
|
|
320
|
-
},
|
|
323
|
+
}, gt = ({
|
|
321
324
|
absolutePageIndex: n,
|
|
322
325
|
itemIndex: t
|
|
323
326
|
}) => {
|
|
324
|
-
const { spineItem: o } =
|
|
325
|
-
() => o?.isReady$ ??
|
|
327
|
+
const { spineItem: o } = pt({ absolutePageIndex: n, itemIndex: t }), r = C(
|
|
328
|
+
() => o?.isReady$ ?? pe(!1),
|
|
326
329
|
[o]
|
|
327
330
|
);
|
|
328
331
|
return { spineItem: o, isReady: r };
|
|
329
|
-
},
|
|
332
|
+
}, ft = f(
|
|
330
333
|
({
|
|
331
334
|
absolutePageIndex: n,
|
|
332
335
|
left: t,
|
|
333
336
|
top: o,
|
|
334
337
|
width: r
|
|
335
338
|
}) => {
|
|
336
|
-
const { isReady: i } =
|
|
339
|
+
const { isReady: i } = gt({
|
|
337
340
|
absolutePageIndex: n
|
|
338
|
-
}), { data: a } =
|
|
341
|
+
}), { data: a } = be(), s = a?.find(
|
|
339
342
|
(d) => d?.meta?.absolutePageIndex === n && d.meta.range === void 0
|
|
340
343
|
);
|
|
341
344
|
if (!i) return null;
|
|
342
345
|
const c = r * 0.1 / 2;
|
|
343
346
|
return /* @__PURE__ */ e(
|
|
344
|
-
|
|
347
|
+
se,
|
|
345
348
|
{
|
|
346
349
|
present: !!s,
|
|
347
350
|
lazyMount: !0,
|
|
348
351
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
349
352
|
animationDuration: "moderate",
|
|
350
353
|
children: /* @__PURE__ */ e(
|
|
351
|
-
|
|
354
|
+
_,
|
|
352
355
|
{
|
|
353
|
-
"data-bookmark-area":
|
|
356
|
+
"data-bookmark-area": et,
|
|
354
357
|
position: "absolute",
|
|
355
358
|
left: t + r,
|
|
356
359
|
transform: "translateX(-100%)",
|
|
@@ -373,11 +376,11 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
373
376
|
}
|
|
374
377
|
);
|
|
375
378
|
}
|
|
376
|
-
),
|
|
377
|
-
const n =
|
|
378
|
-
return /* @__PURE__ */ e(
|
|
379
|
+
), mt = f(() => {
|
|
380
|
+
const n = v(), t = C(() => n?.layoutInfo$, [n]);
|
|
381
|
+
return /* @__PURE__ */ e(ht, { children: t?.pages.map(
|
|
379
382
|
({ absoluteLayout: { left: o, top: r, width: i } }, a) => /* @__PURE__ */ e(
|
|
380
|
-
|
|
383
|
+
ft,
|
|
381
384
|
{
|
|
382
385
|
absolutePageIndex: a,
|
|
383
386
|
left: o,
|
|
@@ -387,16 +390,16 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
387
390
|
a
|
|
388
391
|
)
|
|
389
392
|
) });
|
|
390
|
-
}),
|
|
391
|
-
const n =
|
|
392
|
-
return
|
|
393
|
-
},
|
|
394
|
-
const n =
|
|
395
|
-
|
|
393
|
+
}), bt = () => {
|
|
394
|
+
const n = v();
|
|
395
|
+
return de(n) ? n : void 0;
|
|
396
|
+
}, Ct = () => {
|
|
397
|
+
const n = bt(), { data: t } = be();
|
|
398
|
+
G(() => n ? n.gestures.hooks.register(
|
|
396
399
|
"beforeTapGesture",
|
|
397
400
|
({ event$: r }) => r.pipe(
|
|
398
|
-
|
|
399
|
-
|
|
401
|
+
an(n?.annotations.candidates$),
|
|
402
|
+
V(([i, a]) => {
|
|
400
403
|
if (!i.page) return !0;
|
|
401
404
|
const {
|
|
402
405
|
spineItem: s,
|
|
@@ -404,7 +407,7 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
404
407
|
spineItemPagePosition: d,
|
|
405
408
|
pageSize: u
|
|
406
409
|
} = i.page;
|
|
407
|
-
if (
|
|
410
|
+
if (Fn(
|
|
408
411
|
d,
|
|
409
412
|
{
|
|
410
413
|
type: "corner",
|
|
@@ -414,48 +417,48 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
414
417
|
},
|
|
415
418
|
u
|
|
416
419
|
)) {
|
|
417
|
-
const
|
|
420
|
+
const h = n.spine.pages.fromSpineItemPageIndex(
|
|
418
421
|
s,
|
|
419
422
|
c
|
|
420
423
|
);
|
|
421
|
-
if (!
|
|
422
|
-
const
|
|
423
|
-
(k) => k?.meta?.absolutePageIndex ===
|
|
424
|
+
if (!h) return !0;
|
|
425
|
+
const m = t?.find(
|
|
426
|
+
(k) => k?.meta?.absolutePageIndex === h.absolutePageIndex && k.meta.range === void 0
|
|
424
427
|
);
|
|
425
|
-
if (
|
|
426
|
-
return n?.annotations.delete(
|
|
427
|
-
if (a?.[
|
|
428
|
+
if (m)
|
|
429
|
+
return n?.annotations.delete(m.resource.id), !1;
|
|
430
|
+
if (a?.[h.absolutePageIndex])
|
|
428
431
|
return n?.annotations.annotateAbsolutePage({
|
|
429
|
-
absolutePageIndex:
|
|
432
|
+
absolutePageIndex: h.absolutePageIndex
|
|
430
433
|
}), !1;
|
|
431
434
|
}
|
|
432
435
|
return !0;
|
|
433
436
|
})
|
|
434
437
|
)
|
|
435
438
|
) : void 0, [n, t]);
|
|
436
|
-
},
|
|
439
|
+
}, Se = mn({
|
|
437
440
|
placement: "bottom-end",
|
|
438
441
|
pauseOnPageIdle: !0
|
|
439
|
-
}),
|
|
440
|
-
n.type === "loading" ? /* @__PURE__ */ e(
|
|
442
|
+
}), vt = () => /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ e(bn, { toaster: Se, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ l(ne.Root, { width: { md: "sm" }, children: [
|
|
443
|
+
n.type === "loading" ? /* @__PURE__ */ e(Cn, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ e(ne.Indicator, {}),
|
|
441
444
|
/* @__PURE__ */ l(O, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
442
|
-
n.title && /* @__PURE__ */ e(
|
|
443
|
-
n.description && /* @__PURE__ */ e(
|
|
445
|
+
n.title && /* @__PURE__ */ e(ne.Title, { children: n.title }),
|
|
446
|
+
n.description && /* @__PURE__ */ e(ne.Description, { children: n.description })
|
|
444
447
|
] }),
|
|
445
|
-
n.action && /* @__PURE__ */ e(
|
|
446
|
-
n.meta?.closable && /* @__PURE__ */ e(
|
|
447
|
-
] }) }) }),
|
|
448
|
+
n.action && /* @__PURE__ */ e(ne.ActionTrigger, { children: n.action.label }),
|
|
449
|
+
n.meta?.closable && /* @__PURE__ */ e(ne.CloseTrigger, {})
|
|
450
|
+
] }) }) }), le = A.forwardRef(
|
|
448
451
|
function(t, o) {
|
|
449
452
|
const { children: r, inputProps: i, rootRef: a, ...s } = t;
|
|
450
|
-
return /* @__PURE__ */ l(
|
|
451
|
-
/* @__PURE__ */ e(
|
|
452
|
-
/* @__PURE__ */ e(
|
|
453
|
-
r && /* @__PURE__ */ e(
|
|
453
|
+
return /* @__PURE__ */ l(ae.Item, { ref: a, ...s, children: [
|
|
454
|
+
/* @__PURE__ */ e(ae.ItemHiddenInput, { ref: o, ...i }),
|
|
455
|
+
/* @__PURE__ */ e(ae.ItemIndicator, {}),
|
|
456
|
+
r && /* @__PURE__ */ e(ae.ItemText, { children: r })
|
|
454
457
|
] });
|
|
455
458
|
}
|
|
456
|
-
),
|
|
459
|
+
), Ue = ae.Root, Oe = A.forwardRef(
|
|
457
460
|
function(t, o) {
|
|
458
|
-
const { marks: r, label: i, showValue: a, ...s } = t, c = t.defaultValue ?? t.value, d = r?.map((
|
|
461
|
+
const { marks: r, label: i, showValue: a, ...s } = t, c = t.defaultValue ?? t.value, d = r?.map((p) => typeof p == "number" ? { value: p, label: void 0 } : p), u = !!d?.some((p) => p.label);
|
|
459
462
|
return /* @__PURE__ */ l(y.Root, { ref: o, thumbAlignment: "center", ...s, children: [
|
|
460
463
|
i && !a && /* @__PURE__ */ e(y.Label, { children: i }),
|
|
461
464
|
i && a && /* @__PURE__ */ l(F, { justify: "space-between", children: [
|
|
@@ -464,17 +467,17 @@ const X = T.ActionTrigger, tt = (n) => {
|
|
|
464
467
|
] }),
|
|
465
468
|
/* @__PURE__ */ l(y.Control, { "data-has-mark-label": u || void 0, children: [
|
|
466
469
|
/* @__PURE__ */ e(y.Track, { children: /* @__PURE__ */ e(y.Range, {}) }),
|
|
467
|
-
/* @__PURE__ */ e(
|
|
468
|
-
/* @__PURE__ */ e(
|
|
470
|
+
/* @__PURE__ */ e(St, { value: c }),
|
|
471
|
+
/* @__PURE__ */ e(xt, { marks: d })
|
|
469
472
|
] })
|
|
470
473
|
] });
|
|
471
474
|
}
|
|
472
475
|
);
|
|
473
|
-
function
|
|
476
|
+
function St(n) {
|
|
474
477
|
const { value: t } = n;
|
|
475
|
-
return /* @__PURE__ */ e(
|
|
478
|
+
return /* @__PURE__ */ e(vn, { each: t, children: (o, r) => /* @__PURE__ */ e(y.Thumb, { index: r, children: /* @__PURE__ */ e(y.HiddenInput, {}) }, r) });
|
|
476
479
|
}
|
|
477
|
-
const
|
|
480
|
+
const xt = A.forwardRef(
|
|
478
481
|
function(t, o) {
|
|
479
482
|
const { marks: r } = t;
|
|
480
483
|
return r?.length ? /* @__PURE__ */ e(y.MarkerGroup, { ref: o, children: r.map((i, a) => {
|
|
@@ -485,14 +488,14 @@ const vt = B.forwardRef(
|
|
|
485
488
|
] }, a);
|
|
486
489
|
}) }) : null;
|
|
487
490
|
}
|
|
488
|
-
),
|
|
491
|
+
), kt = ["global", "book", "device"], Pe = [
|
|
489
492
|
"global",
|
|
490
493
|
"book",
|
|
491
494
|
"mobile",
|
|
492
495
|
"tablet",
|
|
493
496
|
"desktop"
|
|
494
|
-
],
|
|
495
|
-
const n =
|
|
497
|
+
], It = "(max-width: 767px)", Rt = "(max-width: 1023px)", Ot = f(() => {
|
|
498
|
+
const n = nt(), {
|
|
496
499
|
fontSizeMenuOpen: t,
|
|
497
500
|
onFontSizeMenuOpenChange: o,
|
|
498
501
|
uncontrolledFontSize: r,
|
|
@@ -512,23 +515,23 @@ const vt = B.forwardRef(
|
|
|
512
515
|
"onFontSizeChange",
|
|
513
516
|
"onFontSizeScopeChange",
|
|
514
517
|
"uncontrolledFontSize"
|
|
515
|
-
]),
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
]),
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
518
|
+
]), p = tn(d), [h, m] = Sn([
|
|
519
|
+
It,
|
|
520
|
+
Rt
|
|
521
|
+
]), [x, k] = P(
|
|
522
|
+
c ?? "global"
|
|
523
|
+
), T = z(
|
|
524
|
+
(g, ee) => {
|
|
525
|
+
p.current ? p.current(g, ee) : n.update((Ze) => ({
|
|
526
|
+
...Ze,
|
|
527
|
+
fontSize: ee
|
|
528
|
+
}));
|
|
524
529
|
},
|
|
525
|
-
[
|
|
526
|
-
),
|
|
527
|
-
(
|
|
530
|
+
[p, n]
|
|
531
|
+
), S = z(
|
|
532
|
+
(g) => i,
|
|
528
533
|
[i]
|
|
529
|
-
)
|
|
530
|
-
console.log({ activeReferenceScope: S, fontSizeScope: c, fontSize: i });
|
|
531
|
-
const P = {
|
|
534
|
+
), R = {
|
|
532
535
|
showValue: !0,
|
|
533
536
|
max: s * 100,
|
|
534
537
|
min: a * 100,
|
|
@@ -539,76 +542,77 @@ const vt = B.forwardRef(
|
|
|
539
542
|
{ value: a * 100, label: `${a * 100}%` },
|
|
540
543
|
{ value: s * 100, label: `${s * 100}%` }
|
|
541
544
|
]
|
|
542
|
-
}
|
|
545
|
+
}, E = z(
|
|
546
|
+
(g) => {
|
|
547
|
+
const ee = g.value;
|
|
548
|
+
u?.(ee);
|
|
549
|
+
},
|
|
550
|
+
[u]
|
|
551
|
+
), M = z((g) => {
|
|
552
|
+
k(g.value);
|
|
553
|
+
}, []), L = z(
|
|
554
|
+
(g) => {
|
|
555
|
+
const ee = g.value[0] ?? 0;
|
|
556
|
+
T(x, ee / 100);
|
|
557
|
+
},
|
|
558
|
+
[T, x]
|
|
559
|
+
);
|
|
543
560
|
return /* @__PURE__ */ e(
|
|
544
|
-
|
|
561
|
+
U,
|
|
545
562
|
{
|
|
546
563
|
lazyMount: !0,
|
|
547
564
|
open: t,
|
|
548
|
-
onOpenChange: (
|
|
549
|
-
o(
|
|
565
|
+
onOpenChange: (g) => {
|
|
566
|
+
o(g.open);
|
|
550
567
|
},
|
|
551
568
|
placement: "center",
|
|
552
569
|
children: /* @__PURE__ */ l(j, { maxH: "40vh", overflow: "auto", children: [
|
|
553
|
-
/* @__PURE__ */ e(
|
|
554
|
-
/* @__PURE__ */ e(
|
|
555
|
-
/* @__PURE__ */ l(
|
|
556
|
-
/* @__PURE__ */ e(
|
|
557
|
-
/* @__PURE__ */ e(
|
|
558
|
-
/* @__PURE__ */ e(
|
|
559
|
-
|
|
570
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Font size" }) }),
|
|
571
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ l(O, { gap: 8, flex: 1, children: [
|
|
572
|
+
/* @__PURE__ */ l(H.Root, { children: [
|
|
573
|
+
/* @__PURE__ */ e(H.Legend, { children: "Scope" }),
|
|
574
|
+
/* @__PURE__ */ e(H.HelperText, { children: "The scope to which apply the font size for this book." }),
|
|
575
|
+
/* @__PURE__ */ e(H.Content, { children: /* @__PURE__ */ e(
|
|
576
|
+
Ue,
|
|
560
577
|
{
|
|
561
|
-
onValueChange:
|
|
562
|
-
const M = h.value;
|
|
563
|
-
u?.(M);
|
|
564
|
-
},
|
|
578
|
+
onValueChange: E,
|
|
565
579
|
value: c ?? "global",
|
|
566
580
|
disabled: !c,
|
|
567
|
-
children: /* @__PURE__ */ e(F, { gap: 2, children:
|
|
581
|
+
children: /* @__PURE__ */ e(F, { gap: 2, children: kt.map((g) => /* @__PURE__ */ e(le, { value: g, children: g === "device" ? h ? "device (Mobile)" : m ? "device (Tablet)" : "device (Desktop)" : g }, g)) })
|
|
568
582
|
}
|
|
569
583
|
) })
|
|
570
584
|
] }),
|
|
571
|
-
/* @__PURE__ */ l(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
{
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
))
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
onValueChange: (M) => {
|
|
596
|
-
const fe = M.value[0] ?? 0;
|
|
597
|
-
x(h, fe / 100);
|
|
598
|
-
},
|
|
599
|
-
...P
|
|
600
|
-
}
|
|
601
|
-
) }, h))
|
|
602
|
-
]
|
|
603
|
-
}
|
|
604
|
-
)
|
|
585
|
+
/* @__PURE__ */ l(B.Root, { value: x, onValueChange: M, children: [
|
|
586
|
+
/* @__PURE__ */ e(B.List, { children: Pe.map((g) => /* @__PURE__ */ l(
|
|
587
|
+
B.Trigger,
|
|
588
|
+
{
|
|
589
|
+
value: g,
|
|
590
|
+
textTransform: "capitalize",
|
|
591
|
+
disabled: g !== "global" && !c,
|
|
592
|
+
children: [
|
|
593
|
+
c === g && /* @__PURE__ */ e(On, {}),
|
|
594
|
+
g
|
|
595
|
+
]
|
|
596
|
+
},
|
|
597
|
+
g
|
|
598
|
+
)) }),
|
|
599
|
+
Pe.map((g) => /* @__PURE__ */ e(B.Content, { value: g, children: /* @__PURE__ */ e(
|
|
600
|
+
Oe,
|
|
601
|
+
{
|
|
602
|
+
label: "%",
|
|
603
|
+
value: [(S(g) ?? 1) * 100],
|
|
604
|
+
onValueChange: L,
|
|
605
|
+
...R
|
|
606
|
+
}
|
|
607
|
+
) }, g))
|
|
608
|
+
] })
|
|
605
609
|
] }) }),
|
|
606
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
607
|
-
/* @__PURE__ */ e(
|
|
610
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Close" }) }) }),
|
|
611
|
+
/* @__PURE__ */ e(Q, {})
|
|
608
612
|
] })
|
|
609
613
|
}
|
|
610
614
|
);
|
|
611
|
-
}),
|
|
615
|
+
}), Mt = {
|
|
612
616
|
x: 0,
|
|
613
617
|
y: 0,
|
|
614
618
|
width: 0,
|
|
@@ -618,43 +622,43 @@ const vt = B.forwardRef(
|
|
|
618
622
|
bottom: 0,
|
|
619
623
|
right: 0
|
|
620
624
|
};
|
|
621
|
-
function
|
|
622
|
-
const [n, t] =
|
|
625
|
+
function Tt() {
|
|
626
|
+
const [n, t] = P(null), [o, r] = P(Mt), i = Je(
|
|
623
627
|
() => new ResizeObserver((a) => {
|
|
624
628
|
if (a[0]) {
|
|
625
|
-
const { x: s, y: c, width: d, height: u, top:
|
|
626
|
-
r({ x: s, y: c, width: d, height: u, top:
|
|
629
|
+
const { x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right: x } = a[0].contentRect;
|
|
630
|
+
r({ x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right: x });
|
|
627
631
|
}
|
|
628
632
|
}),
|
|
629
633
|
[]
|
|
630
634
|
);
|
|
631
|
-
return
|
|
635
|
+
return en(() => {
|
|
632
636
|
if (n)
|
|
633
637
|
return i.observe(n), () => {
|
|
634
638
|
i.disconnect();
|
|
635
639
|
};
|
|
636
640
|
}, [n, i]), [t, o, n];
|
|
637
641
|
}
|
|
638
|
-
const
|
|
639
|
-
const r =
|
|
640
|
-
|
|
642
|
+
const zt = (n, t, o) => {
|
|
643
|
+
const r = v(), i = qe(r) ? r : void 0;
|
|
644
|
+
me(() => {
|
|
641
645
|
if (!i || !n) return xe;
|
|
642
646
|
const a = t.layout.layout$.pipe(
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
), s =
|
|
647
|
+
ln(t.layout.layoutInfo),
|
|
648
|
+
Le(_n)
|
|
649
|
+
), s = Ln(
|
|
646
650
|
n
|
|
647
|
-
).pipe(
|
|
651
|
+
).pipe(V((c) => c.some((d) => d.isIntersecting)));
|
|
648
652
|
return a.pipe(
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
653
|
+
Ve(100, void 0, { trailing: !0 }),
|
|
654
|
+
W(() => s.pipe(
|
|
655
|
+
sn((c) => {
|
|
652
656
|
c || (n.innerHTML = "");
|
|
653
657
|
}),
|
|
654
|
-
|
|
658
|
+
he((c) => c),
|
|
655
659
|
$e()
|
|
656
660
|
).pipe(
|
|
657
|
-
|
|
661
|
+
W(() => (n.innerHTML = "", i?.gallery.snapshot(
|
|
658
662
|
t,
|
|
659
663
|
n,
|
|
660
664
|
o
|
|
@@ -662,16 +666,16 @@ const Ot = (n, t, o) => {
|
|
|
662
666
|
))
|
|
663
667
|
);
|
|
664
668
|
}, [i, t, o, n]);
|
|
665
|
-
},
|
|
669
|
+
}, wt = f(
|
|
666
670
|
({ item: n, onNavigated: t }) => {
|
|
667
|
-
const [o, r, i] =
|
|
668
|
-
|
|
669
|
-
const s =
|
|
671
|
+
const [o, r, i] = Tt(), a = v();
|
|
672
|
+
zt(i, n, r);
|
|
673
|
+
const s = C(
|
|
670
674
|
() => a?.locateResource(n, { mode: "shallow" }),
|
|
671
675
|
[a, n]
|
|
672
676
|
);
|
|
673
677
|
return /* @__PURE__ */ l(
|
|
674
|
-
|
|
678
|
+
_,
|
|
675
679
|
{
|
|
676
680
|
width: "100%",
|
|
677
681
|
aspectRatio: "2/3",
|
|
@@ -687,7 +691,7 @@ const Ot = (n, t, o) => {
|
|
|
687
691
|
},
|
|
688
692
|
children: [
|
|
689
693
|
/* @__PURE__ */ e(
|
|
690
|
-
|
|
694
|
+
_,
|
|
691
695
|
{
|
|
692
696
|
height: "100%",
|
|
693
697
|
width: "100%",
|
|
@@ -697,7 +701,7 @@ const Ot = (n, t, o) => {
|
|
|
697
701
|
}
|
|
698
702
|
),
|
|
699
703
|
/* @__PURE__ */ l(
|
|
700
|
-
|
|
704
|
+
b,
|
|
701
705
|
{
|
|
702
706
|
position: "absolute",
|
|
703
707
|
bottom: 0,
|
|
@@ -717,11 +721,11 @@ const Ot = (n, t, o) => {
|
|
|
717
721
|
}
|
|
718
722
|
);
|
|
719
723
|
}
|
|
720
|
-
),
|
|
724
|
+
), yt = f(
|
|
721
725
|
({ open: n, setOpen: t }) => {
|
|
722
|
-
const o =
|
|
726
|
+
const o = v(), r = C(() => o?.spineItemsManager.items$, [o]);
|
|
723
727
|
return /* @__PURE__ */ e(
|
|
724
|
-
|
|
728
|
+
U,
|
|
725
729
|
{
|
|
726
730
|
lazyMount: !0,
|
|
727
731
|
placement: "center",
|
|
@@ -730,9 +734,9 @@ const Ot = (n, t, o) => {
|
|
|
730
734
|
size: { mdDown: "full", md: "lg" },
|
|
731
735
|
scrollBehavior: "inside",
|
|
732
736
|
children: /* @__PURE__ */ l(j, { height: "100%", children: [
|
|
733
|
-
/* @__PURE__ */ e(
|
|
734
|
-
/* @__PURE__ */ e(
|
|
735
|
-
|
|
737
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Gallery" }) }),
|
|
738
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
739
|
+
_,
|
|
736
740
|
{
|
|
737
741
|
gridTemplateColumns: [
|
|
738
742
|
"repeat(2, minmax(0, 1fr))",
|
|
@@ -743,7 +747,7 @@ const Ot = (n, t, o) => {
|
|
|
743
747
|
pt: 2,
|
|
744
748
|
"data-grid": !0,
|
|
745
749
|
children: r?.map((i) => /* @__PURE__ */ e(
|
|
746
|
-
|
|
750
|
+
wt,
|
|
747
751
|
{
|
|
748
752
|
item: i,
|
|
749
753
|
onNavigated: () => {
|
|
@@ -754,15 +758,15 @@ const Ot = (n, t, o) => {
|
|
|
754
758
|
))
|
|
755
759
|
}
|
|
756
760
|
) }),
|
|
757
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
758
|
-
/* @__PURE__ */ e(
|
|
761
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Cancel" }) }) }),
|
|
762
|
+
/* @__PURE__ */ e(Q, {})
|
|
759
763
|
] })
|
|
760
764
|
}
|
|
761
765
|
);
|
|
762
766
|
}
|
|
763
|
-
),
|
|
767
|
+
), Pt = "@prose-reader/react-reader", Et = "1.256.0", Bt = f(
|
|
764
768
|
({ open: n, setOpen: t }) => /* @__PURE__ */ e(
|
|
765
|
-
|
|
769
|
+
U,
|
|
766
770
|
{
|
|
767
771
|
lazyMount: !0,
|
|
768
772
|
placement: "center",
|
|
@@ -771,9 +775,9 @@ const Ot = (n, t, o) => {
|
|
|
771
775
|
size: { mdDown: "full", md: "lg" },
|
|
772
776
|
scrollBehavior: "inside",
|
|
773
777
|
children: /* @__PURE__ */ l(j, { children: [
|
|
774
|
-
/* @__PURE__ */ e(
|
|
778
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Help" }) }),
|
|
775
779
|
/* @__PURE__ */ l(
|
|
776
|
-
|
|
780
|
+
X,
|
|
777
781
|
{
|
|
778
782
|
overflowY: "auto",
|
|
779
783
|
flex: 1,
|
|
@@ -782,43 +786,43 @@ const Ot = (n, t, o) => {
|
|
|
782
786
|
gap: 4,
|
|
783
787
|
children: [
|
|
784
788
|
/* @__PURE__ */ l(O, { children: [
|
|
785
|
-
/* @__PURE__ */ e(
|
|
789
|
+
/* @__PURE__ */ e(Ce, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
786
790
|
/* @__PURE__ */ l(F, { mb: 1, children: [
|
|
787
|
-
/* @__PURE__ */ e(
|
|
791
|
+
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(Mn, {}) }),
|
|
788
792
|
" ",
|
|
789
|
-
/* @__PURE__ */ e(
|
|
793
|
+
/* @__PURE__ */ e(b, { children: "Navigate to right page" })
|
|
790
794
|
] }),
|
|
791
795
|
/* @__PURE__ */ l(F, { mb: 1, children: [
|
|
792
|
-
/* @__PURE__ */ e(
|
|
796
|
+
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(Tn, {}) }),
|
|
793
797
|
" ",
|
|
794
|
-
/* @__PURE__ */ e(
|
|
798
|
+
/* @__PURE__ */ e(b, { children: "Navigate to left page" })
|
|
795
799
|
] })
|
|
796
800
|
] }),
|
|
797
801
|
/* @__PURE__ */ l(O, { children: [
|
|
798
|
-
/* @__PURE__ */ e(
|
|
799
|
-
/* @__PURE__ */ e(F, { mb: 1, children: /* @__PURE__ */ e(
|
|
802
|
+
/* @__PURE__ */ e(Ce, { mb: 2, as: "h3", size: "lg", children: "Bookmarks" }),
|
|
803
|
+
/* @__PURE__ */ e(F, { mb: 1, children: /* @__PURE__ */ e(b, { children: "Tap on the top right corner of a page bookmark it" }) })
|
|
800
804
|
] }),
|
|
801
805
|
/* @__PURE__ */ l(O, { children: [
|
|
802
|
-
/* @__PURE__ */ e(
|
|
803
|
-
/* @__PURE__ */ l(
|
|
804
|
-
|
|
806
|
+
/* @__PURE__ */ e(Ce, { mb: 2, as: "h3", size: "lg", children: "About" }),
|
|
807
|
+
/* @__PURE__ */ l(b, { children: [
|
|
808
|
+
Pt,
|
|
805
809
|
" version: ",
|
|
806
|
-
|
|
810
|
+
Et
|
|
807
811
|
] })
|
|
808
812
|
] })
|
|
809
813
|
]
|
|
810
814
|
}
|
|
811
815
|
),
|
|
812
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
813
|
-
/* @__PURE__ */ e(
|
|
816
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Cancel" }) }) }),
|
|
817
|
+
/* @__PURE__ */ e(Q, {})
|
|
814
818
|
] })
|
|
815
819
|
}
|
|
816
820
|
)
|
|
817
|
-
),
|
|
818
|
-
const n =
|
|
819
|
-
return
|
|
820
|
-
() => n ?
|
|
821
|
-
|
|
821
|
+
), oe = () => {
|
|
822
|
+
const n = v();
|
|
823
|
+
return C(
|
|
824
|
+
() => n ? cn([n.pagination.state$, n.context]).pipe(
|
|
825
|
+
V(([t, o]) => {
|
|
822
826
|
const r = o.manifest?.spineItems.every(
|
|
823
827
|
(i) => i.mediaType?.startsWith("image/")
|
|
824
828
|
);
|
|
@@ -830,52 +834,52 @@ const Ot = (n, t, o) => {
|
|
|
830
834
|
) : xe,
|
|
831
835
|
[n]
|
|
832
836
|
);
|
|
833
|
-
},
|
|
834
|
-
const n =
|
|
837
|
+
}, At = () => {
|
|
838
|
+
const n = oe(), t = Math.floor(
|
|
835
839
|
(n?.percentageEstimateOfBook ?? 0) * 100
|
|
836
840
|
), o = t > 0 ? t : 1;
|
|
837
|
-
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(
|
|
841
|
+
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(_, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ l(b, { fontSize: "sm", children: [
|
|
838
842
|
o,
|
|
839
843
|
" %"
|
|
840
844
|
] }) });
|
|
841
|
-
},
|
|
842
|
-
const [n, t] =
|
|
843
|
-
return
|
|
845
|
+
}, Dt = () => {
|
|
846
|
+
const [n, t] = P(/* @__PURE__ */ new Date());
|
|
847
|
+
return G(() => {
|
|
844
848
|
const o = setInterval(() => {
|
|
845
849
|
t(/* @__PURE__ */ new Date());
|
|
846
850
|
}, 6e4);
|
|
847
851
|
return () => clearInterval(o);
|
|
848
852
|
}, []), n;
|
|
849
|
-
},
|
|
850
|
-
const t =
|
|
851
|
-
return /* @__PURE__ */ e(
|
|
853
|
+
}, Ft = (n) => {
|
|
854
|
+
const t = Dt();
|
|
855
|
+
return /* @__PURE__ */ e(b, { fontSize: "xs", ...n, children: t.toLocaleTimeString(navigator.language, {
|
|
852
856
|
hour: "2-digit",
|
|
853
857
|
minute: "2-digit"
|
|
854
858
|
}) });
|
|
855
|
-
},
|
|
859
|
+
}, Me = () => {
|
|
856
860
|
const { quickMenuOpen: n, onQuickMenuOpenChange: t } = $([
|
|
857
861
|
"quickMenuOpen",
|
|
858
862
|
"onQuickMenuOpenChange"
|
|
859
863
|
]);
|
|
860
864
|
return [n, t];
|
|
861
|
-
},
|
|
862
|
-
const [n] =
|
|
865
|
+
}, _t = f(() => {
|
|
866
|
+
const [n] = Me();
|
|
863
867
|
return /* @__PURE__ */ e(
|
|
864
|
-
|
|
868
|
+
_,
|
|
865
869
|
{
|
|
866
870
|
position: "absolute",
|
|
867
871
|
left: 0,
|
|
868
872
|
bottom: 0,
|
|
869
873
|
p: 2,
|
|
870
874
|
color: n ? void 0 : "colorPalette.contrast",
|
|
871
|
-
children: /* @__PURE__ */ e(
|
|
875
|
+
children: /* @__PURE__ */ e(Ft, {})
|
|
872
876
|
}
|
|
873
877
|
);
|
|
874
|
-
},
|
|
875
|
-
const n =
|
|
876
|
-
|
|
878
|
+
}), Lt = () => {
|
|
879
|
+
const n = v();
|
|
880
|
+
me(
|
|
877
881
|
() => n?.links$.subscribe((t) => {
|
|
878
|
-
if (t.type === "click" &&
|
|
882
|
+
if (t.type === "click" && Vn(t.target, "a")) {
|
|
879
883
|
if (!t.target.href) return;
|
|
880
884
|
const o = new URL(t.target.href);
|
|
881
885
|
window.location.host !== o.host && confirm(
|
|
@@ -885,40 +889,18 @@ const Ot = (n, t, o) => {
|
|
|
885
889
|
}),
|
|
886
890
|
[n]
|
|
887
891
|
);
|
|
888
|
-
},
|
|
889
|
-
fontScaleChange: "fontScaleChange"
|
|
890
|
-
}, _t = () => {
|
|
891
|
-
const n = C(), { notificationsSubject: t, fontSizeMenuOpen: o } = $([
|
|
892
|
-
"notificationsSubject",
|
|
893
|
-
"fontSizeMenuOpen"
|
|
894
|
-
]);
|
|
895
|
-
ce(
|
|
896
|
-
() => o ? ve : n?.settings.values$.pipe(
|
|
897
|
-
_(({ fontScale: r }) => r),
|
|
898
|
-
ke(),
|
|
899
|
-
Ve(1),
|
|
900
|
-
Le((r) => {
|
|
901
|
-
t.next({
|
|
902
|
-
key: Ft.fontScaleChange,
|
|
903
|
-
title: "Font size changed",
|
|
904
|
-
description: `${r * 100} %`
|
|
905
|
-
});
|
|
906
|
-
})
|
|
907
|
-
),
|
|
908
|
-
[n, t, o]
|
|
909
|
-
);
|
|
910
|
-
}, Lt = () => {
|
|
892
|
+
}, Vt = () => {
|
|
911
893
|
const { notificationsSubject: n } = $([
|
|
912
894
|
"notificationsSubject"
|
|
913
895
|
]);
|
|
914
|
-
|
|
896
|
+
me(
|
|
915
897
|
() => n.pipe(
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
const o = t.duration ?? 3e3, r = new
|
|
898
|
+
he(_e),
|
|
899
|
+
dn((t) => {
|
|
900
|
+
const o = t.duration ?? 3e3, r = new un((a) => {
|
|
919
901
|
try {
|
|
920
902
|
queueMicrotask(() => {
|
|
921
|
-
const s =
|
|
903
|
+
const s = Se.create({
|
|
922
904
|
title: t.title,
|
|
923
905
|
description: t.description,
|
|
924
906
|
duration: o
|
|
@@ -929,20 +911,20 @@ const Ot = (n, t, o) => {
|
|
|
929
911
|
a.error(s);
|
|
930
912
|
}
|
|
931
913
|
}), i = n.pipe(
|
|
932
|
-
|
|
933
|
-
|
|
914
|
+
hn(1),
|
|
915
|
+
he((a) => !!t.key && a?.key === t.key)
|
|
934
916
|
);
|
|
935
917
|
return r.pipe(
|
|
936
|
-
|
|
918
|
+
W(
|
|
937
919
|
(a) => Ne(
|
|
938
920
|
He(o),
|
|
939
921
|
t.abort ?? xe,
|
|
940
922
|
i
|
|
941
923
|
).pipe(
|
|
942
924
|
$e(),
|
|
943
|
-
|
|
925
|
+
pn(() => {
|
|
944
926
|
queueMicrotask(() => {
|
|
945
|
-
|
|
927
|
+
Se.dismiss(a);
|
|
946
928
|
});
|
|
947
929
|
})
|
|
948
930
|
)
|
|
@@ -952,7 +934,7 @@ const Ot = (n, t, o) => {
|
|
|
952
934
|
),
|
|
953
935
|
[n]
|
|
954
936
|
);
|
|
955
|
-
}, $t =
|
|
937
|
+
}, $t = A.forwardRef(
|
|
956
938
|
function(t, o) {
|
|
957
939
|
const {
|
|
958
940
|
showArrow: r,
|
|
@@ -963,14 +945,14 @@ const Ot = (n, t, o) => {
|
|
|
963
945
|
...d
|
|
964
946
|
} = t;
|
|
965
947
|
return /* @__PURE__ */ l(
|
|
966
|
-
|
|
948
|
+
te.Root,
|
|
967
949
|
{
|
|
968
950
|
...d,
|
|
969
951
|
positioning: { ...d.positioning, gutter: 4 },
|
|
970
952
|
children: [
|
|
971
|
-
/* @__PURE__ */ e(
|
|
972
|
-
/* @__PURE__ */ e(
|
|
973
|
-
|
|
953
|
+
/* @__PURE__ */ e(te.Trigger, { asChild: !0, children: i }),
|
|
954
|
+
/* @__PURE__ */ e(ke, { disabled: !a, container: c, children: /* @__PURE__ */ e(te.Positioner, { children: /* @__PURE__ */ l(
|
|
955
|
+
te.Content,
|
|
974
956
|
{
|
|
975
957
|
width: "auto",
|
|
976
958
|
px: "2",
|
|
@@ -979,7 +961,7 @@ const Ot = (n, t, o) => {
|
|
|
979
961
|
rounded: "sm",
|
|
980
962
|
ref: o,
|
|
981
963
|
children: [
|
|
982
|
-
r && /* @__PURE__ */ e(
|
|
964
|
+
r && /* @__PURE__ */ e(te.Arrow, { children: /* @__PURE__ */ e(te.ArrowTip, {}) }),
|
|
983
965
|
s
|
|
984
966
|
]
|
|
985
967
|
}
|
|
@@ -988,7 +970,7 @@ const Ot = (n, t, o) => {
|
|
|
988
970
|
}
|
|
989
971
|
);
|
|
990
972
|
}
|
|
991
|
-
),
|
|
973
|
+
), Nt = A.forwardRef(function(t, o) {
|
|
992
974
|
const { children: r, ...i } = t;
|
|
993
975
|
return /* @__PURE__ */ e($t, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
|
|
994
976
|
I,
|
|
@@ -997,24 +979,24 @@ const Ot = (n, t, o) => {
|
|
|
997
979
|
"aria-label": "info",
|
|
998
980
|
size: "2xs",
|
|
999
981
|
colorPalette: "gray",
|
|
1000
|
-
children: /* @__PURE__ */ e(
|
|
982
|
+
children: /* @__PURE__ */ e(Zn, {})
|
|
1001
983
|
}
|
|
1002
984
|
) });
|
|
1003
|
-
}),
|
|
1004
|
-
return /* @__PURE__ */ e(
|
|
985
|
+
}), Ht = A.forwardRef(function(t, o) {
|
|
986
|
+
return /* @__PURE__ */ e(ce.Track, { ...t, ref: o, children: /* @__PURE__ */ e(ce.Range, {}) });
|
|
1005
987
|
});
|
|
1006
|
-
|
|
988
|
+
A.forwardRef(function(t, o) {
|
|
1007
989
|
const { children: r, info: i, ...a } = t;
|
|
1008
|
-
return /* @__PURE__ */ l(
|
|
990
|
+
return /* @__PURE__ */ l(ce.Label, { ...a, ref: o, children: [
|
|
1009
991
|
r,
|
|
1010
|
-
i && /* @__PURE__ */ e(
|
|
992
|
+
i && /* @__PURE__ */ e(Nt, { children: i })
|
|
1011
993
|
] });
|
|
1012
994
|
});
|
|
1013
|
-
const
|
|
1014
|
-
const n =
|
|
995
|
+
const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
996
|
+
const n = oe(), t = n?.numberOfTotalPages === 1, o = (n?.beginNumberOfPagesInSpineItem ?? 0) > 1, r = (n?.endNumberOfPagesInSpineItem ?? 0) > 1, i = (n?.hasChapters ? n?.beginPageIndexInSpineItem : n?.beginAbsolutePageIndex) ?? 0, a = (n?.hasChapters ? n?.endPageIndexInSpineItem : n?.endAbsolutePageIndex) ?? 0, [s = 0, c = 0] = [
|
|
1015
997
|
i,
|
|
1016
998
|
a
|
|
1017
|
-
].sort((
|
|
999
|
+
].sort((p, h) => p - h), d = n?.beginPageIndexInSpineItem !== n?.endPageIndexInSpineItem || n?.beginSpineItemIndex !== n?.endSpineItemIndex, u = n?.hasChapters ? n?.beginNumberOfPagesInSpineItem : n?.numberOfTotalPages;
|
|
1018
1000
|
return {
|
|
1019
1001
|
hasOnlyOnePage: t,
|
|
1020
1002
|
beginPageIndex: i,
|
|
@@ -1026,25 +1008,25 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1026
1008
|
leftPageIndex: s,
|
|
1027
1009
|
rightPageIndex: c
|
|
1028
1010
|
};
|
|
1029
|
-
},
|
|
1030
|
-
const n =
|
|
1011
|
+
}, qt = () => {
|
|
1012
|
+
const n = oe(), {
|
|
1031
1013
|
hasOnlyOnePage: t,
|
|
1032
1014
|
leftPageIndex: o,
|
|
1033
1015
|
rightPageIndex: r,
|
|
1034
1016
|
totalApproximatePages: i,
|
|
1035
1017
|
beginAndEndAreDifferent: a
|
|
1036
|
-
} =
|
|
1018
|
+
} = Te(), s = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
|
|
1037
1019
|
return /* @__PURE__ */ l(O, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
1038
|
-
/* @__PURE__ */ e(
|
|
1039
|
-
/* @__PURE__ */ e(
|
|
1040
|
-
/* @__PURE__ */ e(
|
|
1020
|
+
/* @__PURE__ */ e(Wt, { value: s, size: "xs", width: 150, children: /* @__PURE__ */ l(F, { justifyContent: "space-between", children: [
|
|
1021
|
+
/* @__PURE__ */ e(Ht, { width: 110 }),
|
|
1022
|
+
/* @__PURE__ */ e(Gt, { children: `${s}%` })
|
|
1041
1023
|
] }) }),
|
|
1042
|
-
/* @__PURE__ */ e(
|
|
1024
|
+
/* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: d ? `Chapter: ${d}` : " " }),
|
|
1043
1025
|
!t && /* @__PURE__ */ l(F, { children: [
|
|
1044
|
-
/* @__PURE__ */ e(
|
|
1045
|
-
!!n?.hasChapters && /* @__PURE__ */ l(
|
|
1046
|
-
/* @__PURE__ */ e(
|
|
1047
|
-
/* @__PURE__ */ l(
|
|
1026
|
+
/* @__PURE__ */ e(b, { fontSize: "xs", children: a ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
|
|
1027
|
+
!!n?.hasChapters && /* @__PURE__ */ l(fe, { children: [
|
|
1028
|
+
/* @__PURE__ */ e(b, { children: "-" }),
|
|
1029
|
+
/* @__PURE__ */ l(b, { fontSize: "xs", children: [
|
|
1048
1030
|
"(",
|
|
1049
1031
|
(n?.beginAbsolutePageIndex ?? 0) + 1,
|
|
1050
1032
|
")"
|
|
@@ -1052,13 +1034,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1052
1034
|
] })
|
|
1053
1035
|
] })
|
|
1054
1036
|
] });
|
|
1055
|
-
},
|
|
1037
|
+
}, Ye = f(
|
|
1056
1038
|
({
|
|
1057
1039
|
children: n,
|
|
1058
1040
|
position: t,
|
|
1059
1041
|
...o
|
|
1060
1042
|
}) => /* @__PURE__ */ e(
|
|
1061
|
-
|
|
1043
|
+
se,
|
|
1062
1044
|
{
|
|
1063
1045
|
display: "flex",
|
|
1064
1046
|
flexDirection: "row",
|
|
@@ -1082,8 +1064,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1082
1064
|
children: n
|
|
1083
1065
|
}
|
|
1084
1066
|
)
|
|
1085
|
-
), jt =
|
|
1086
|
-
|
|
1067
|
+
), jt = xn(Xn), Qt = f((n) => /* @__PURE__ */ e(
|
|
1068
|
+
_,
|
|
1087
1069
|
{
|
|
1088
1070
|
display: "contents",
|
|
1089
1071
|
css: {
|
|
@@ -1136,16 +1118,16 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1136
1118
|
}
|
|
1137
1119
|
)
|
|
1138
1120
|
}
|
|
1139
|
-
)),
|
|
1140
|
-
const t =
|
|
1141
|
-
() =>
|
|
1121
|
+
)), Ut = () => {
|
|
1122
|
+
const t = oe()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = Te(), i = t ? Math.floor((o || 0) / 2) : o, [a, s] = on(
|
|
1123
|
+
() => N({
|
|
1142
1124
|
default: i || 0
|
|
1143
1125
|
})
|
|
1144
1126
|
), c = 0, d = Math.max(
|
|
1145
1127
|
0,
|
|
1146
1128
|
t ? Math.floor((r - 1) / 2) : r - 1
|
|
1147
1129
|
);
|
|
1148
|
-
return
|
|
1130
|
+
return G(() => {
|
|
1149
1131
|
s.update(i || 0);
|
|
1150
1132
|
}, [i, s]), {
|
|
1151
1133
|
value: a,
|
|
@@ -1154,46 +1136,46 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1154
1136
|
max: d
|
|
1155
1137
|
};
|
|
1156
1138
|
}, Yt = (n) => {
|
|
1157
|
-
const t =
|
|
1158
|
-
(
|
|
1159
|
-
const [R = 0] = Array.isArray(
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1139
|
+
const t = v(), o = oe(), { manifest: r } = C(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: s = 0, isBeginWithinChapter: c } = Te(), d = 1, u = c, { value: p, valueSignal: h, min: m, max: x } = Ut(), k = z(
|
|
1140
|
+
(S) => {
|
|
1141
|
+
const [R = 0] = Array.isArray(S) ? S : [S];
|
|
1142
|
+
h.update(R);
|
|
1143
|
+
const E = a ? Math.floor(R) * 2 : Math.floor(R);
|
|
1162
1144
|
u ? t?.navigation.goToPageOfSpineItem({
|
|
1163
|
-
pageIndex:
|
|
1145
|
+
pageIndex: E,
|
|
1164
1146
|
spineItemId: t.pagination.state.beginSpineItemIndex ?? 0,
|
|
1165
1147
|
animation: !1
|
|
1166
1148
|
}) : t?.navigation.goToAbsolutePageIndex({
|
|
1167
|
-
absolutePageIndex:
|
|
1149
|
+
absolutePageIndex: E,
|
|
1168
1150
|
animation: !1
|
|
1169
1151
|
});
|
|
1170
1152
|
},
|
|
1171
|
-
[t, a,
|
|
1153
|
+
[t, a, h, u]
|
|
1172
1154
|
);
|
|
1173
|
-
return
|
|
1155
|
+
return me(
|
|
1174
1156
|
() => t?.navigation.throttleLock({
|
|
1175
1157
|
duration: 100,
|
|
1176
|
-
trigger:
|
|
1158
|
+
trigger: h.subject
|
|
1177
1159
|
}),
|
|
1178
|
-
[t,
|
|
1179
|
-
), s === 1 || a && s === 2 ? /* @__PURE__ */ e(
|
|
1180
|
-
|
|
1160
|
+
[t, h]
|
|
1161
|
+
), s === 1 || a && s === 2 ? /* @__PURE__ */ e(_, { style: n.style }) : /* @__PURE__ */ e(
|
|
1162
|
+
Qt,
|
|
1181
1163
|
{
|
|
1182
|
-
value: [
|
|
1183
|
-
max:
|
|
1184
|
-
min:
|
|
1164
|
+
value: [p],
|
|
1165
|
+
max: x,
|
|
1166
|
+
min: m,
|
|
1185
1167
|
reverse: i,
|
|
1186
1168
|
step: d,
|
|
1187
1169
|
onChange: k,
|
|
1188
1170
|
...n
|
|
1189
1171
|
}
|
|
1190
1172
|
);
|
|
1191
|
-
},
|
|
1173
|
+
}, Zt = f(
|
|
1192
1174
|
({
|
|
1193
1175
|
open: n,
|
|
1194
1176
|
onItemClick: t
|
|
1195
1177
|
}) => {
|
|
1196
|
-
const o =
|
|
1178
|
+
const o = nn(null), r = v(), {
|
|
1197
1179
|
quickMenuBottomBarBoundingBoxSignal: i,
|
|
1198
1180
|
onFontSizeMenuOpenChange: a,
|
|
1199
1181
|
onRefitMenuOpenChange: s
|
|
@@ -1201,25 +1183,25 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1201
1183
|
"quickMenuBottomBarBoundingBoxSignal",
|
|
1202
1184
|
"onFontSizeMenuOpenChange",
|
|
1203
1185
|
"onRefitMenuOpenChange"
|
|
1204
|
-
]), c =
|
|
1186
|
+
]), c = C(() => r?.navigation.state$, [r]), d = C(() => r?.settings.values$, [r]), u = C(
|
|
1205
1187
|
() => r?.zoom.state$.pipe(
|
|
1206
|
-
|
|
1207
|
-
(
|
|
1188
|
+
V(
|
|
1189
|
+
(S) => S.currentScale > 1 ? "in" : S.currentScale < 1 ? "out" : void 0
|
|
1208
1190
|
)
|
|
1209
1191
|
),
|
|
1210
1192
|
[r]
|
|
1211
|
-
),
|
|
1212
|
-
return
|
|
1193
|
+
), p = u === "in", h = u === "out", m = d?.computedPageTurnMode === "scrollable", x = d?.computedPageTurnDirection === "vertical", [k, T] = P(!0);
|
|
1194
|
+
return G(() => {
|
|
1213
1195
|
if (!o.current) return;
|
|
1214
|
-
const
|
|
1215
|
-
for (const
|
|
1216
|
-
i.update(
|
|
1196
|
+
const S = new ResizeObserver((R) => {
|
|
1197
|
+
for (const E of R)
|
|
1198
|
+
i.update(E);
|
|
1217
1199
|
});
|
|
1218
|
-
return
|
|
1219
|
-
|
|
1200
|
+
return S.observe(o.current), () => {
|
|
1201
|
+
S.disconnect();
|
|
1220
1202
|
};
|
|
1221
1203
|
}, [i]), /* @__PURE__ */ l(
|
|
1222
|
-
|
|
1204
|
+
Ye,
|
|
1223
1205
|
{
|
|
1224
1206
|
present: n,
|
|
1225
1207
|
position: "bottom",
|
|
@@ -1248,7 +1230,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1248
1230
|
flexShrink: 0,
|
|
1249
1231
|
onClick: () => r?.navigation.goToLeftOrTopSpineItem(),
|
|
1250
1232
|
disabled: !c?.canGoLeftSpineItem && !c?.canGoTopSpineItem,
|
|
1251
|
-
children:
|
|
1233
|
+
children: x ? /* @__PURE__ */ e(jn, {}) : /* @__PURE__ */ e(Qn, {})
|
|
1252
1234
|
}
|
|
1253
1235
|
),
|
|
1254
1236
|
/* @__PURE__ */ l(
|
|
@@ -1261,7 +1243,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1261
1243
|
overflow: "auto",
|
|
1262
1244
|
px: 4,
|
|
1263
1245
|
children: [
|
|
1264
|
-
/* @__PURE__ */ e(
|
|
1246
|
+
/* @__PURE__ */ e(qt, {}),
|
|
1265
1247
|
/* @__PURE__ */ e(
|
|
1266
1248
|
Yt,
|
|
1267
1249
|
{
|
|
@@ -1286,31 +1268,31 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1286
1268
|
onClick: () => {
|
|
1287
1269
|
r?.navigation.goToRightOrBottomSpineItem();
|
|
1288
1270
|
},
|
|
1289
|
-
children:
|
|
1271
|
+
children: x ? /* @__PURE__ */ e(Un, {}) : /* @__PURE__ */ e(Yn, {})
|
|
1290
1272
|
}
|
|
1291
1273
|
)
|
|
1292
1274
|
]
|
|
1293
1275
|
}
|
|
1294
1276
|
),
|
|
1295
1277
|
/* @__PURE__ */ e(F, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ l(
|
|
1296
|
-
|
|
1278
|
+
ve.Root,
|
|
1297
1279
|
{
|
|
1298
1280
|
open: k,
|
|
1299
1281
|
flex: 1,
|
|
1300
|
-
onOpenChange: ({ open:
|
|
1301
|
-
|
|
1282
|
+
onOpenChange: ({ open: S }) => {
|
|
1283
|
+
T(S);
|
|
1302
1284
|
},
|
|
1303
1285
|
width: "100%",
|
|
1304
1286
|
children: [
|
|
1305
1287
|
/* @__PURE__ */ e(
|
|
1306
|
-
|
|
1288
|
+
ve.Trigger,
|
|
1307
1289
|
{
|
|
1308
1290
|
paddingY: "3",
|
|
1309
1291
|
width: "100%",
|
|
1310
1292
|
display: "flex",
|
|
1311
1293
|
justifyContent: "center",
|
|
1312
1294
|
children: /* @__PURE__ */ e(
|
|
1313
|
-
|
|
1295
|
+
zn,
|
|
1314
1296
|
{
|
|
1315
1297
|
style: {
|
|
1316
1298
|
transform: k ? "rotate(0deg)" : "rotate(180deg)"
|
|
@@ -1319,7 +1301,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1319
1301
|
)
|
|
1320
1302
|
}
|
|
1321
1303
|
),
|
|
1322
|
-
/* @__PURE__ */ e(
|
|
1304
|
+
/* @__PURE__ */ e(ve.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ l(_, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
|
|
1323
1305
|
/* @__PURE__ */ e(
|
|
1324
1306
|
I,
|
|
1325
1307
|
{
|
|
@@ -1327,7 +1309,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1327
1309
|
size: "lg",
|
|
1328
1310
|
variant: "ghost",
|
|
1329
1311
|
onClick: () => t("help"),
|
|
1330
|
-
children: /* @__PURE__ */ e(
|
|
1312
|
+
children: /* @__PURE__ */ e(wn, {})
|
|
1331
1313
|
}
|
|
1332
1314
|
),
|
|
1333
1315
|
/* @__PURE__ */ e(
|
|
@@ -1337,7 +1319,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1337
1319
|
size: "lg",
|
|
1338
1320
|
variant: "ghost",
|
|
1339
1321
|
onClick: () => t("toc"),
|
|
1340
|
-
children: /* @__PURE__ */ e(
|
|
1322
|
+
children: /* @__PURE__ */ e(yn, {})
|
|
1341
1323
|
}
|
|
1342
1324
|
),
|
|
1343
1325
|
Ge(r) && /* @__PURE__ */ e(
|
|
@@ -1347,7 +1329,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1347
1329
|
size: "lg",
|
|
1348
1330
|
variant: "ghost",
|
|
1349
1331
|
onClick: () => t("search"),
|
|
1350
|
-
children: /* @__PURE__ */ e(
|
|
1332
|
+
children: /* @__PURE__ */ e(Pn, {})
|
|
1351
1333
|
}
|
|
1352
1334
|
),
|
|
1353
1335
|
/* @__PURE__ */ e(
|
|
@@ -1355,14 +1337,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1355
1337
|
{
|
|
1356
1338
|
"aria-label": "Zoom",
|
|
1357
1339
|
size: "lg",
|
|
1358
|
-
variant:
|
|
1340
|
+
variant: p ? "solid" : "ghost",
|
|
1359
1341
|
onClick: () => {
|
|
1360
|
-
|
|
1342
|
+
p ? r?.zoom.exit({ animate: !0 }) : r?.zoom.enter({
|
|
1361
1343
|
animate: !0,
|
|
1362
1344
|
scale: 2
|
|
1363
1345
|
});
|
|
1364
1346
|
},
|
|
1365
|
-
children:
|
|
1347
|
+
children: p ? /* @__PURE__ */ e(En, {}) : /* @__PURE__ */ e(Bn, {})
|
|
1366
1348
|
}
|
|
1367
1349
|
),
|
|
1368
1350
|
/* @__PURE__ */ e(
|
|
@@ -1374,30 +1356,30 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1374
1356
|
a(!0);
|
|
1375
1357
|
},
|
|
1376
1358
|
variant: "ghost",
|
|
1377
|
-
children: /* @__PURE__ */ e(
|
|
1359
|
+
children: /* @__PURE__ */ e($n, {})
|
|
1378
1360
|
}
|
|
1379
1361
|
),
|
|
1380
|
-
|
|
1362
|
+
de(r) && /* @__PURE__ */ e(
|
|
1381
1363
|
I,
|
|
1382
1364
|
{
|
|
1383
1365
|
"aria-label": "Bookmarks",
|
|
1384
1366
|
size: "lg",
|
|
1385
1367
|
variant: "ghost",
|
|
1386
1368
|
onClick: () => t("bookmarks"),
|
|
1387
|
-
children: /* @__PURE__ */ e(
|
|
1369
|
+
children: /* @__PURE__ */ e(Nn, {})
|
|
1388
1370
|
}
|
|
1389
1371
|
),
|
|
1390
|
-
|
|
1372
|
+
de(r) && /* @__PURE__ */ e(
|
|
1391
1373
|
I,
|
|
1392
1374
|
{
|
|
1393
1375
|
"aria-label": "Annotations",
|
|
1394
1376
|
size: "lg",
|
|
1395
1377
|
variant: "ghost",
|
|
1396
1378
|
onClick: () => t("annotations"),
|
|
1397
|
-
children: /* @__PURE__ */ e(
|
|
1379
|
+
children: /* @__PURE__ */ e(ge, {})
|
|
1398
1380
|
}
|
|
1399
1381
|
),
|
|
1400
|
-
|
|
1382
|
+
je(r) && /* @__PURE__ */ e(
|
|
1401
1383
|
I,
|
|
1402
1384
|
{
|
|
1403
1385
|
"aria-label": "Refit",
|
|
@@ -1406,8 +1388,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1406
1388
|
onClick: () => {
|
|
1407
1389
|
s(!0);
|
|
1408
1390
|
},
|
|
1409
|
-
disabled: !
|
|
1410
|
-
children: /* @__PURE__ */ e(
|
|
1391
|
+
disabled: !m,
|
|
1392
|
+
children: /* @__PURE__ */ e(Hn, {})
|
|
1411
1393
|
}
|
|
1412
1394
|
),
|
|
1413
1395
|
/* @__PURE__ */ e(
|
|
@@ -1415,24 +1397,24 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1415
1397
|
{
|
|
1416
1398
|
"aria-label": "Thumbnails",
|
|
1417
1399
|
size: "lg",
|
|
1418
|
-
variant:
|
|
1400
|
+
variant: h ? "solid" : "ghost",
|
|
1419
1401
|
onClick: () => {
|
|
1420
|
-
|
|
1402
|
+
h ? r?.zoom.exit({ animate: !0 }) : r?.zoom.enter({
|
|
1421
1403
|
animate: !0,
|
|
1422
1404
|
scale: 0.5
|
|
1423
1405
|
});
|
|
1424
1406
|
},
|
|
1425
|
-
children: /* @__PURE__ */ e(
|
|
1407
|
+
children: /* @__PURE__ */ e(An, {})
|
|
1426
1408
|
}
|
|
1427
1409
|
),
|
|
1428
|
-
|
|
1410
|
+
qe(r) && /* @__PURE__ */ e(
|
|
1429
1411
|
I,
|
|
1430
1412
|
{
|
|
1431
1413
|
"aria-label": "Gallery",
|
|
1432
1414
|
size: "lg",
|
|
1433
1415
|
variant: "ghost",
|
|
1434
1416
|
onClick: () => t("gallery"),
|
|
1435
|
-
children: /* @__PURE__ */ e(
|
|
1417
|
+
children: /* @__PURE__ */ e(qn, {})
|
|
1436
1418
|
}
|
|
1437
1419
|
)
|
|
1438
1420
|
] }) })
|
|
@@ -1443,13 +1425,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1443
1425
|
}
|
|
1444
1426
|
);
|
|
1445
1427
|
}
|
|
1446
|
-
),
|
|
1447
|
-
const [n, t] =
|
|
1428
|
+
), Xt = () => {
|
|
1429
|
+
const [n, t] = P(!1), o = z(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1448
1430
|
t(!1);
|
|
1449
1431
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1450
1432
|
t(!0);
|
|
1451
1433
|
}), []);
|
|
1452
|
-
return
|
|
1434
|
+
return G(() => {
|
|
1453
1435
|
function r() {
|
|
1454
1436
|
t(!!document.fullscreenElement);
|
|
1455
1437
|
}
|
|
@@ -1460,14 +1442,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1460
1442
|
isFullscreen: n,
|
|
1461
1443
|
onToggleFullscreenClick: o
|
|
1462
1444
|
};
|
|
1463
|
-
}, Kt =
|
|
1445
|
+
}, Kt = f(
|
|
1464
1446
|
({
|
|
1465
1447
|
open: n,
|
|
1466
1448
|
onItemClick: t
|
|
1467
1449
|
}) => {
|
|
1468
|
-
const o =
|
|
1450
|
+
const o = v(), r = C(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = Xt();
|
|
1469
1451
|
return /* @__PURE__ */ l(
|
|
1470
|
-
|
|
1452
|
+
Ye,
|
|
1471
1453
|
{
|
|
1472
1454
|
present: n,
|
|
1473
1455
|
position: "top",
|
|
@@ -1482,7 +1464,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1482
1464
|
variant: "ghost",
|
|
1483
1465
|
flexShrink: 0,
|
|
1484
1466
|
onClick: () => t("back"),
|
|
1485
|
-
children: /* @__PURE__ */ e(
|
|
1467
|
+
children: /* @__PURE__ */ e(Kn, {})
|
|
1486
1468
|
}
|
|
1487
1469
|
),
|
|
1488
1470
|
/* @__PURE__ */ e(
|
|
@@ -1494,7 +1476,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1494
1476
|
alignItems: "center",
|
|
1495
1477
|
overflow: "auto",
|
|
1496
1478
|
px: 4,
|
|
1497
|
-
children: /* @__PURE__ */ e(
|
|
1479
|
+
children: /* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", children: r?.title })
|
|
1498
1480
|
}
|
|
1499
1481
|
),
|
|
1500
1482
|
/* @__PURE__ */ l(F, { children: [
|
|
@@ -1506,7 +1488,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1506
1488
|
flexShrink: 0,
|
|
1507
1489
|
variant: "ghost",
|
|
1508
1490
|
onClick: () => t("more"),
|
|
1509
|
-
children: /* @__PURE__ */ e(
|
|
1491
|
+
children: /* @__PURE__ */ e(Jn, {})
|
|
1510
1492
|
}
|
|
1511
1493
|
),
|
|
1512
1494
|
/* @__PURE__ */ e(
|
|
@@ -1517,7 +1499,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1517
1499
|
flexShrink: 0,
|
|
1518
1500
|
variant: "ghost",
|
|
1519
1501
|
onClick: a,
|
|
1520
|
-
children: i ? /* @__PURE__ */ e(
|
|
1502
|
+
children: i ? /* @__PURE__ */ e(Wn, {}) : /* @__PURE__ */ e(Gn, {})
|
|
1521
1503
|
}
|
|
1522
1504
|
)
|
|
1523
1505
|
] })
|
|
@@ -1525,15 +1507,15 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1525
1507
|
}
|
|
1526
1508
|
);
|
|
1527
1509
|
}
|
|
1528
|
-
),
|
|
1510
|
+
), Jt = f(
|
|
1529
1511
|
({
|
|
1530
1512
|
onItemClick: n
|
|
1531
1513
|
}) => {
|
|
1532
|
-
const [t] =
|
|
1514
|
+
const [t] = Me(), { refitMenuOpen: o, fontSizeMenuOpen: r } = $([
|
|
1533
1515
|
"refitMenuOpen",
|
|
1534
1516
|
"fontSizeMenuOpen"
|
|
1535
1517
|
]);
|
|
1536
|
-
return /* @__PURE__ */ l(
|
|
1518
|
+
return /* @__PURE__ */ l(fe, { children: [
|
|
1537
1519
|
/* @__PURE__ */ e(
|
|
1538
1520
|
Kt,
|
|
1539
1521
|
{
|
|
@@ -1542,7 +1524,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1542
1524
|
}
|
|
1543
1525
|
),
|
|
1544
1526
|
/* @__PURE__ */ e(
|
|
1545
|
-
|
|
1527
|
+
Zt,
|
|
1546
1528
|
{
|
|
1547
1529
|
open: t && !o && !r,
|
|
1548
1530
|
onItemClick: n
|
|
@@ -1550,41 +1532,41 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1550
1532
|
)
|
|
1551
1533
|
] });
|
|
1552
1534
|
}
|
|
1553
|
-
),
|
|
1535
|
+
), eo = A.forwardRef(
|
|
1554
1536
|
function(t, o) {
|
|
1555
1537
|
const { label: r, children: i, helperText: a, errorText: s, optionalText: c, ...d } = t;
|
|
1556
|
-
return /* @__PURE__ */ l(
|
|
1557
|
-
r && /* @__PURE__ */ l(
|
|
1538
|
+
return /* @__PURE__ */ l(re.Root, { ref: o, ...d, children: [
|
|
1539
|
+
r && /* @__PURE__ */ l(re.Label, { children: [
|
|
1558
1540
|
r,
|
|
1559
|
-
/* @__PURE__ */ e(
|
|
1541
|
+
/* @__PURE__ */ e(re.RequiredIndicator, { fallback: c })
|
|
1560
1542
|
] }),
|
|
1561
1543
|
i,
|
|
1562
|
-
a && /* @__PURE__ */ e(
|
|
1563
|
-
s && /* @__PURE__ */ e(
|
|
1544
|
+
a && /* @__PURE__ */ e(re.HelperText, { children: a }),
|
|
1545
|
+
s && /* @__PURE__ */ e(re.ErrorText, { children: s })
|
|
1564
1546
|
] });
|
|
1565
1547
|
}
|
|
1566
|
-
),
|
|
1548
|
+
), no = f(() => {
|
|
1567
1549
|
const { refitMenuOpen: t, onRefitMenuOpenChange: o } = $([
|
|
1568
1550
|
"refitMenuOpen",
|
|
1569
1551
|
"onRefitMenuOpenChange"
|
|
1570
|
-
]), r =
|
|
1552
|
+
]), r = v(), i = je(r) ? r : void 0, a = C(
|
|
1571
1553
|
() => i?.refit.settings$,
|
|
1572
1554
|
[i]
|
|
1573
1555
|
);
|
|
1574
1556
|
return /* @__PURE__ */ e(
|
|
1575
|
-
|
|
1557
|
+
U,
|
|
1576
1558
|
{
|
|
1577
1559
|
lazyMount: !0,
|
|
1578
1560
|
open: t,
|
|
1579
1561
|
onOpenChange: (s) => o(s.open),
|
|
1580
1562
|
placement: "center",
|
|
1581
1563
|
children: /* @__PURE__ */ l(j, { children: [
|
|
1582
|
-
/* @__PURE__ */ e(
|
|
1583
|
-
/* @__PURE__ */ e(
|
|
1584
|
-
/* @__PURE__ */ e(
|
|
1585
|
-
/* @__PURE__ */ l(
|
|
1586
|
-
/* @__PURE__ */ e(
|
|
1587
|
-
|
|
1564
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Viewport fit" }) }),
|
|
1565
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ l(H.Root, { children: [
|
|
1566
|
+
/* @__PURE__ */ e(H.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
|
|
1567
|
+
/* @__PURE__ */ l(H.Content, { children: [
|
|
1568
|
+
/* @__PURE__ */ e(eo, { label: "Profile", children: /* @__PURE__ */ e(
|
|
1569
|
+
Ue,
|
|
1588
1570
|
{
|
|
1589
1571
|
defaultValue: "fit",
|
|
1590
1572
|
onValueChange: (s) => {
|
|
@@ -1596,15 +1578,15 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1596
1578
|
},
|
|
1597
1579
|
value: a?.viewportFit ?? "fit",
|
|
1598
1580
|
children: /* @__PURE__ */ l(O, { gap: 2, children: [
|
|
1599
|
-
/* @__PURE__ */ e(
|
|
1600
|
-
/* @__PURE__ */ e(
|
|
1601
|
-
/* @__PURE__ */ e(
|
|
1602
|
-
/* @__PURE__ */ e(
|
|
1581
|
+
/* @__PURE__ */ e(le, { value: "desktop", children: "Desktop" }),
|
|
1582
|
+
/* @__PURE__ */ e(le, { value: "tablet", children: "Tablet" }),
|
|
1583
|
+
/* @__PURE__ */ e(le, { value: "fit", children: "Full width (default)" }),
|
|
1584
|
+
/* @__PURE__ */ e(le, { value: "custom", children: "Custom" })
|
|
1603
1585
|
] })
|
|
1604
1586
|
}
|
|
1605
1587
|
) }),
|
|
1606
1588
|
/* @__PURE__ */ e(
|
|
1607
|
-
|
|
1589
|
+
Oe,
|
|
1608
1590
|
{
|
|
1609
1591
|
label: "Maximum width (%)",
|
|
1610
1592
|
showValue: !0,
|
|
@@ -1623,12 +1605,12 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1623
1605
|
)
|
|
1624
1606
|
] })
|
|
1625
1607
|
] }) }),
|
|
1626
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
1627
|
-
/* @__PURE__ */ e(
|
|
1608
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Close" }) }) }),
|
|
1609
|
+
/* @__PURE__ */ e(Q, {})
|
|
1628
1610
|
] })
|
|
1629
1611
|
}
|
|
1630
1612
|
);
|
|
1631
|
-
}),
|
|
1613
|
+
}), to = f(
|
|
1632
1614
|
({
|
|
1633
1615
|
contextText: n = "",
|
|
1634
1616
|
startOffset: t = 0,
|
|
@@ -1648,7 +1630,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1648
1630
|
)
|
|
1649
1631
|
);
|
|
1650
1632
|
return /* @__PURE__ */ l(
|
|
1651
|
-
|
|
1633
|
+
Ie,
|
|
1652
1634
|
{
|
|
1653
1635
|
href: r,
|
|
1654
1636
|
style: { margin: 5, overflow: "hidden" },
|
|
@@ -1660,30 +1642,30 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1660
1642
|
alignItems: "flex-start",
|
|
1661
1643
|
gap: 0,
|
|
1662
1644
|
children: [
|
|
1663
|
-
/* @__PURE__ */ l(
|
|
1645
|
+
/* @__PURE__ */ l(b, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
|
|
1664
1646
|
'"',
|
|
1665
1647
|
c,
|
|
1666
1648
|
/* @__PURE__ */ e("b", { children: o }),
|
|
1667
1649
|
d,
|
|
1668
1650
|
'"'
|
|
1669
1651
|
] }),
|
|
1670
|
-
/* @__PURE__ */ e(
|
|
1652
|
+
/* @__PURE__ */ e(b, { fontSize: "sm", color: "gray.500", style: { textDecoration: "none" }, children: `Book page: ${a !== void 0 ? a + 1 : "unknown (not loaded)"}` })
|
|
1671
1653
|
]
|
|
1672
1654
|
}
|
|
1673
1655
|
);
|
|
1674
1656
|
}
|
|
1675
|
-
),
|
|
1676
|
-
const n =
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
(a) => a === "" || !r ?
|
|
1680
|
-
|
|
1657
|
+
), oo = 500, ro = () => {
|
|
1658
|
+
const n = ie(() => new gn("")), t = C(n), o = v(), r = Ge(o) ? o : void 0, i = C(() => n.pipe(
|
|
1659
|
+
Le(),
|
|
1660
|
+
W(
|
|
1661
|
+
(a) => a === "" || !r ? pe(void 0) : Ne(
|
|
1662
|
+
pe({
|
|
1681
1663
|
type: "start",
|
|
1682
1664
|
data: void 0
|
|
1683
1665
|
}),
|
|
1684
|
-
He(
|
|
1685
|
-
|
|
1686
|
-
|
|
1666
|
+
He(oo).pipe(
|
|
1667
|
+
W(() => r.search.search(a)),
|
|
1668
|
+
V((s) => ({ type: "end", data: s }))
|
|
1687
1669
|
)
|
|
1688
1670
|
)
|
|
1689
1671
|
)
|
|
@@ -1694,22 +1676,22 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1694
1676
|
status: i?.type ?? "idle",
|
|
1695
1677
|
data: i?.data
|
|
1696
1678
|
};
|
|
1697
|
-
},
|
|
1679
|
+
}, io = f(
|
|
1698
1680
|
({ onNavigate: n }) => {
|
|
1699
|
-
const t =
|
|
1681
|
+
const t = v(), { value: o, setValue: r, status: i, data: a } = ro(), s = (u) => {
|
|
1700
1682
|
r(u.target.value);
|
|
1701
|
-
}, c =
|
|
1683
|
+
}, c = z(
|
|
1702
1684
|
(u) => {
|
|
1703
1685
|
n(), t?.navigation.goToCfi(u);
|
|
1704
1686
|
},
|
|
1705
1687
|
[t, n]
|
|
1706
|
-
), d =
|
|
1688
|
+
), d = C(
|
|
1707
1689
|
() => t?.locateResource(a?.slice(0, 100) ?? []),
|
|
1708
1690
|
[a]
|
|
1709
1691
|
);
|
|
1710
1692
|
return /* @__PURE__ */ l(O, { flex: 1, height: "100%", gap: 2, children: [
|
|
1711
1693
|
/* @__PURE__ */ e(
|
|
1712
|
-
|
|
1694
|
+
kn,
|
|
1713
1695
|
{
|
|
1714
1696
|
placeholder: "Type something...",
|
|
1715
1697
|
value: o,
|
|
@@ -1731,15 +1713,15 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1731
1713
|
px: 4,
|
|
1732
1714
|
flex: 1,
|
|
1733
1715
|
children: [
|
|
1734
|
-
i === "start" && /* @__PURE__ */ e(
|
|
1735
|
-
a?.length === 0 && /* @__PURE__ */ e(
|
|
1716
|
+
i === "start" && /* @__PURE__ */ e(b, { children: "Searching ..." }),
|
|
1717
|
+
a?.length === 0 && /* @__PURE__ */ e(b, { children: "No results" }),
|
|
1736
1718
|
i === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */ l(O, { children: [
|
|
1737
|
-
/* @__PURE__ */ l(
|
|
1719
|
+
/* @__PURE__ */ l(b, { fontSize: "md", children: [
|
|
1738
1720
|
a?.length,
|
|
1739
1721
|
" result(s)"
|
|
1740
1722
|
] }),
|
|
1741
|
-
/* @__PURE__ */ e(O, { gap: 0, children: d?.map((u,
|
|
1742
|
-
|
|
1723
|
+
/* @__PURE__ */ e(O, { gap: 0, children: d?.map((u, p) => /* @__PURE__ */ e(
|
|
1724
|
+
to,
|
|
1743
1725
|
{
|
|
1744
1726
|
contextText: u.meta?.range?.startContainer.parentElement?.textContent ?? "",
|
|
1745
1727
|
pageIndex: u.meta?.itemPageIndex,
|
|
@@ -1749,7 +1731,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1749
1731
|
onClick: c,
|
|
1750
1732
|
absolutePageIndex: u.meta?.absolutePageIndex
|
|
1751
1733
|
},
|
|
1752
|
-
|
|
1734
|
+
p
|
|
1753
1735
|
)) })
|
|
1754
1736
|
] })
|
|
1755
1737
|
]
|
|
@@ -1757,13 +1739,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1757
1739
|
)
|
|
1758
1740
|
] });
|
|
1759
1741
|
}
|
|
1760
|
-
),
|
|
1742
|
+
), ao = f(
|
|
1761
1743
|
({
|
|
1762
1744
|
open: n,
|
|
1763
1745
|
setOpen: t,
|
|
1764
1746
|
onNavigate: o
|
|
1765
1747
|
}) => /* @__PURE__ */ e(
|
|
1766
|
-
|
|
1748
|
+
U,
|
|
1767
1749
|
{
|
|
1768
1750
|
lazyMount: !0,
|
|
1769
1751
|
placement: "center",
|
|
@@ -1772,44 +1754,44 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1772
1754
|
size: { mdDown: "full", md: "lg" },
|
|
1773
1755
|
scrollBehavior: "inside",
|
|
1774
1756
|
children: /* @__PURE__ */ l(j, { height: "100%", children: [
|
|
1775
|
-
/* @__PURE__ */ e(
|
|
1776
|
-
/* @__PURE__ */ e(
|
|
1777
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
1778
|
-
/* @__PURE__ */ e(
|
|
1757
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Search" }) }),
|
|
1758
|
+
/* @__PURE__ */ e(X, { flex: 1, p: 0, children: /* @__PURE__ */ e(io, { onNavigate: o }) }),
|
|
1759
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Cancel" }) }) }),
|
|
1760
|
+
/* @__PURE__ */ e(Q, {})
|
|
1779
1761
|
] })
|
|
1780
1762
|
}
|
|
1781
1763
|
)
|
|
1782
|
-
),
|
|
1764
|
+
), lo = f(
|
|
1783
1765
|
({ onNavigate: n }) => {
|
|
1784
|
-
const t =
|
|
1766
|
+
const t = v(), { manifest: o, assumedRenditionLayout: r } = C(() => t?.context, [t]) ?? {}, { nav: i } = o ?? {}, a = oe();
|
|
1785
1767
|
i?.toc;
|
|
1786
1768
|
const { beginSpineItemIndex: s, beginPageIndexInSpineItem: c } = a ?? {}, d = (r === "reflowable" ? c : s) || 0;
|
|
1787
1769
|
let u = a?.beginChapterInfo;
|
|
1788
1770
|
for (; u?.subChapter; )
|
|
1789
1771
|
u = u?.subChapter;
|
|
1790
|
-
const
|
|
1772
|
+
const p = (h, m, x) => /* @__PURE__ */ l(Xe.Fragment, { children: [
|
|
1791
1773
|
/* @__PURE__ */ e(
|
|
1792
|
-
|
|
1774
|
+
D.Item,
|
|
1793
1775
|
{
|
|
1794
|
-
pl: 4 * (
|
|
1776
|
+
pl: 4 * (x + 1),
|
|
1795
1777
|
style: {
|
|
1796
1778
|
display: "flex",
|
|
1797
1779
|
alignItems: "center"
|
|
1798
1780
|
},
|
|
1799
1781
|
children: /* @__PURE__ */ l(
|
|
1800
|
-
|
|
1782
|
+
Ie,
|
|
1801
1783
|
{
|
|
1802
1784
|
onClick: () => {
|
|
1803
|
-
n(), t?.navigation.goToUrl(
|
|
1785
|
+
n(), t?.navigation.goToUrl(h.href);
|
|
1804
1786
|
},
|
|
1805
1787
|
href: "#",
|
|
1806
1788
|
children: [
|
|
1807
|
-
u?.path ===
|
|
1808
|
-
u?.path !==
|
|
1789
|
+
u?.path === h.path && /* @__PURE__ */ e(D.Indicator, { asChild: !0, children: /* @__PURE__ */ e(ye, {}) }),
|
|
1790
|
+
u?.path !== h.path && /* @__PURE__ */ e(D.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(ye, {}) }),
|
|
1809
1791
|
/* @__PURE__ */ l(O, { gap: 0, children: [
|
|
1810
|
-
/* @__PURE__ */ e(
|
|
1811
|
-
u?.path ===
|
|
1812
|
-
|
|
1792
|
+
/* @__PURE__ */ e(b, { fontSize: "md", children: h.title || h.path }),
|
|
1793
|
+
u?.path === h.path && /* @__PURE__ */ e(
|
|
1794
|
+
b,
|
|
1813
1795
|
{
|
|
1814
1796
|
fontStyle: "italic",
|
|
1815
1797
|
fontWeight: "bold",
|
|
@@ -1823,19 +1805,19 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1823
1805
|
)
|
|
1824
1806
|
}
|
|
1825
1807
|
),
|
|
1826
|
-
|
|
1827
|
-
(k,
|
|
1808
|
+
h.contents.length > 0 && /* @__PURE__ */ e(D.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1809
|
+
(k, T) => p(k, T, x + 1)
|
|
1828
1810
|
) })
|
|
1829
|
-
] },
|
|
1830
|
-
return /* @__PURE__ */ e(
|
|
1811
|
+
] }, m);
|
|
1812
|
+
return /* @__PURE__ */ e(D.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h, m) => p(h, m, 0)) });
|
|
1831
1813
|
}
|
|
1832
|
-
),
|
|
1814
|
+
), so = f(
|
|
1833
1815
|
({
|
|
1834
1816
|
open: n,
|
|
1835
1817
|
setOpen: t,
|
|
1836
1818
|
onNavigate: o
|
|
1837
1819
|
}) => /* @__PURE__ */ e(
|
|
1838
|
-
|
|
1820
|
+
U,
|
|
1839
1821
|
{
|
|
1840
1822
|
lazyMount: !0,
|
|
1841
1823
|
placement: "center",
|
|
@@ -1844,43 +1826,43 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1844
1826
|
size: { mdDown: "full", md: "lg" },
|
|
1845
1827
|
scrollBehavior: "inside",
|
|
1846
1828
|
children: /* @__PURE__ */ l(j, { children: [
|
|
1847
|
-
/* @__PURE__ */ e(
|
|
1848
|
-
/* @__PURE__ */ e(
|
|
1849
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
1850
|
-
/* @__PURE__ */ e(
|
|
1829
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: "Table of Contents" }) }),
|
|
1830
|
+
/* @__PURE__ */ e(X, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(lo, { onNavigate: o }) }),
|
|
1831
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(q, { variant: "outline", children: "Cancel" }) }) }),
|
|
1832
|
+
/* @__PURE__ */ e(Q, {})
|
|
1851
1833
|
] })
|
|
1852
1834
|
}
|
|
1853
1835
|
)
|
|
1854
|
-
), Ee = 0.5, Be = 1, Ae = 5,
|
|
1836
|
+
), Ee = 0.5, Be = 1, Ae = 5, co = (n, t, o, r) => {
|
|
1855
1837
|
if (n > t && n < t + r)
|
|
1856
1838
|
return t + r;
|
|
1857
1839
|
const i = Math.min(Math.max(n, t), o), a = Math.round((i - t) / r) * r + t;
|
|
1858
1840
|
return Math.round(a * 100) / 100;
|
|
1859
|
-
},
|
|
1841
|
+
}, uo = f(() => {
|
|
1860
1842
|
const { quickMenuBottomBarBoundingBoxSignal: n } = $([
|
|
1861
1843
|
"quickMenuBottomBarBoundingBoxSignal"
|
|
1862
|
-
]), t =
|
|
1844
|
+
]), t = ue(
|
|
1863
1845
|
n
|
|
1864
|
-
), o =
|
|
1846
|
+
), o = v(), r = C(
|
|
1865
1847
|
() => o?.zoom.state$.pipe(
|
|
1866
|
-
|
|
1867
|
-
|
|
1848
|
+
V((c) => c.currentScale),
|
|
1849
|
+
Ve(100, fn, {
|
|
1868
1850
|
leading: !0,
|
|
1869
1851
|
trailing: !0
|
|
1870
1852
|
})
|
|
1871
1853
|
),
|
|
1872
1854
|
[o]
|
|
1873
|
-
) ?? 1, i =
|
|
1874
|
-
() => o?.zoom.state$.pipe(
|
|
1855
|
+
) ?? 1, i = C(
|
|
1856
|
+
() => o?.zoom.state$.pipe(V((c) => c.isZooming)),
|
|
1875
1857
|
[o]
|
|
1876
|
-
) ?? !1, a =
|
|
1858
|
+
) ?? !1, a = co(
|
|
1877
1859
|
r,
|
|
1878
1860
|
Be,
|
|
1879
1861
|
Ae,
|
|
1880
1862
|
Ee
|
|
1881
1863
|
), s = t?.borderBoxSize?.[0]?.blockSize ?? 1;
|
|
1882
1864
|
return /* @__PURE__ */ e(
|
|
1883
|
-
|
|
1865
|
+
se,
|
|
1884
1866
|
{
|
|
1885
1867
|
present: i && r > 1,
|
|
1886
1868
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
@@ -1893,7 +1875,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1893
1875
|
borderRadius: "md",
|
|
1894
1876
|
p: 4,
|
|
1895
1877
|
children: /* @__PURE__ */ e(
|
|
1896
|
-
|
|
1878
|
+
Oe,
|
|
1897
1879
|
{
|
|
1898
1880
|
value: [a],
|
|
1899
1881
|
min: Be,
|
|
@@ -1908,92 +1890,97 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
|
|
|
1908
1890
|
)
|
|
1909
1891
|
}
|
|
1910
1892
|
);
|
|
1911
|
-
}),
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
s(!1), d(!1),
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1893
|
+
}), De = { _open: "fade-in", _closed: "fade-out" }, ho = f(() => (Ct(), null)), po = f(() => (Lt(), Vt(), /* @__PURE__ */ e(ho, {}))), Bo = f(
|
|
1894
|
+
({
|
|
1895
|
+
enableFloatingTime: n = !0,
|
|
1896
|
+
enableFloatingProgress: t = !0,
|
|
1897
|
+
onItemClick: o,
|
|
1898
|
+
children: r,
|
|
1899
|
+
...i
|
|
1900
|
+
}) => {
|
|
1901
|
+
const [a, s] = P(!1), [c, d] = P(!1), [u, p] = P(!1), [h, m] = P(void 0), [x, k] = P(!1), [T, S] = Me(), R = z(() => {
|
|
1902
|
+
s(!1), d(!1), p(!1), m(void 0), S(!1), k(!1);
|
|
1903
|
+
}, [S]), E = z(
|
|
1904
|
+
(M) => {
|
|
1905
|
+
M === "annotations" ? m("annotations") : M === "search" ? p(!0) : M === "help" ? d(!0) : M === "toc" ? s(!0) : M === "bookmarks" ? m("bookmarks") : M === "gallery" && k(!0), o?.(M);
|
|
1906
|
+
},
|
|
1907
|
+
[o]
|
|
1908
|
+
);
|
|
1909
|
+
return /* @__PURE__ */ l(fe, { children: [
|
|
1910
|
+
/* @__PURE__ */ e(po, {}),
|
|
1911
|
+
/* @__PURE__ */ l(
|
|
1912
|
+
_,
|
|
1913
|
+
{
|
|
1914
|
+
position: "absolute",
|
|
1915
|
+
top: 0,
|
|
1916
|
+
left: 0,
|
|
1917
|
+
height: "100%",
|
|
1918
|
+
width: "100%",
|
|
1919
|
+
overflow: "hidden",
|
|
1920
|
+
"data-prose-react-reader": !0,
|
|
1921
|
+
...i,
|
|
1922
|
+
children: [
|
|
1923
|
+
r,
|
|
1924
|
+
t && /* @__PURE__ */ e(
|
|
1925
|
+
se,
|
|
1926
|
+
{
|
|
1927
|
+
present: !T,
|
|
1928
|
+
animationName: De,
|
|
1929
|
+
animationDuration: "moderate",
|
|
1930
|
+
children: /* @__PURE__ */ e(At, {})
|
|
1931
|
+
}
|
|
1932
|
+
),
|
|
1933
|
+
/* @__PURE__ */ e(yt, { open: x, setOpen: k }),
|
|
1934
|
+
/* @__PURE__ */ e(no, {}),
|
|
1935
|
+
/* @__PURE__ */ e(Jt, { onItemClick: E }),
|
|
1936
|
+
/* @__PURE__ */ e(uo, {}),
|
|
1937
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1938
|
+
/* @__PURE__ */ e(mt, {}),
|
|
1939
|
+
/* @__PURE__ */ e(Bt, { open: c, setOpen: d }),
|
|
1940
|
+
/* @__PURE__ */ e(
|
|
1941
|
+
so,
|
|
1942
|
+
{
|
|
1943
|
+
open: a,
|
|
1944
|
+
setOpen: s,
|
|
1945
|
+
onNavigate: R
|
|
1946
|
+
}
|
|
1947
|
+
),
|
|
1948
|
+
/* @__PURE__ */ e(
|
|
1949
|
+
ao,
|
|
1950
|
+
{
|
|
1951
|
+
open: u,
|
|
1952
|
+
setOpen: p,
|
|
1953
|
+
onNavigate: R
|
|
1954
|
+
}
|
|
1955
|
+
),
|
|
1956
|
+
/* @__PURE__ */ e(
|
|
1957
|
+
ut,
|
|
1958
|
+
{
|
|
1959
|
+
openWith: h,
|
|
1960
|
+
setOpen: (M) => m(M ? "annotations" : void 0),
|
|
1961
|
+
onNavigate: R
|
|
1962
|
+
}
|
|
1963
|
+
),
|
|
1964
|
+
/* @__PURE__ */ e(
|
|
1965
|
+
se,
|
|
1966
|
+
{
|
|
1967
|
+
present: n || T,
|
|
1968
|
+
animationName: De,
|
|
1969
|
+
animationDuration: "slow",
|
|
1970
|
+
overflow: "hidden",
|
|
1971
|
+
children: /* @__PURE__ */ e(_t, {})
|
|
1972
|
+
}
|
|
1973
|
+
),
|
|
1974
|
+
/* @__PURE__ */ e(vt, {})
|
|
1975
|
+
]
|
|
1976
|
+
}
|
|
1977
|
+
)
|
|
1978
|
+
] });
|
|
1979
|
+
}
|
|
1980
|
+
);
|
|
1994
1981
|
export {
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1982
|
+
et as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
1983
|
+
Bo as ReactReader,
|
|
1984
|
+
Eo as ReactReaderProvider
|
|
1998
1985
|
};
|
|
1999
1986
|
//# sourceMappingURL=index.js.map
|