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