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