html-flip-book-react 0.0.0-alpha.69 → 0.0.0-alpha.72

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.
@@ -1,10 +1,10 @@
1
- import { jsx as a, jsxs as E } from "react/jsx-runtime";
2
- import { createContext as ve, useContext as ye, useRef as J, useReducer as Fe, useMemo as Pe, useCallback as L, useEffect as U, useState as F, useLayoutEffect as Ne } from "react";
3
- let Me = 4;
4
- function he() {
5
- return Me;
1
+ import { jsx as a, jsxs as L } from "react/jsx-runtime";
2
+ import { createContext as Ce, useContext as Te, useRef as Q, useReducer as je, useMemo as Ie, useCallback as I, useEffect as U, useState as D, useLayoutEffect as Be } from "react";
3
+ let Se = 4;
4
+ function we() {
5
+ return Se;
6
6
  }
7
- const je = {
7
+ const $e = {
8
8
  id: "download",
9
9
  enName: "Download",
10
10
  enDescription: "Download entire book or page range",
@@ -17,51 +17,51 @@ const je = {
17
17
  );
18
18
  },
19
19
  canExecute: (e) => typeof e.data?.onDownload == "function"
20
- }, Be = [
20
+ }, Ae = [
21
21
  { key: "ArrowRight" },
22
22
  { key: "PageDown" },
23
23
  { key: " " }
24
24
  // Space
25
- ], ne = {
25
+ ], le = {
26
26
  id: "flipNext",
27
27
  navKind: "flip",
28
28
  enName: "Next Page",
29
29
  enDescription: "Flip to the next page",
30
30
  nameKey: "command.jumpToNextPage",
31
- hotkeys: Be,
31
+ hotkeys: Ae,
32
32
  execute: (e) => {
33
33
  e.handle?.flipNext();
34
34
  },
35
35
  canExecute: (e) => (e.handle?.getCurrentPageIndex() ?? 0) < (e.handle?.getTotalPages() ?? 0) - 1
36
- }, Se = [{ key: "ArrowLeft" }, { key: "PageUp" }], re = {
36
+ }, Re = [{ key: "ArrowLeft" }, { key: "PageUp" }], se = {
37
37
  id: "flipPrev",
38
38
  navKind: "flip",
39
39
  enName: "Previous Page",
40
40
  enDescription: "Flip to the previous page",
41
41
  nameKey: "command.jumpToPrevPage",
42
- hotkeys: Se,
42
+ hotkeys: Re,
43
43
  execute: (e) => {
44
44
  e.handle?.flipPrev();
45
45
  },
46
46
  canExecute: (e) => (e.handle?.getCurrentPageIndex() ?? 0) > 0
47
- }, $e = [{ key: "Home" }, { key: "ArrowLeft", modifiers: { ctrl: !0 } }], ae = {
47
+ }, Ke = [{ key: "Home" }, { key: "ArrowLeft", modifiers: { ctrl: !0 } }], ie = {
48
48
  id: "goToFirst",
49
49
  navKind: "jump",
50
50
  enName: "First Page",
51
51
  enDescription: "Jump to the first page",
52
52
  nameKey: "command.jumpToFirstPage",
53
- hotkeys: $e,
53
+ hotkeys: Ke,
54
54
  execute: (e) => {
55
55
  e.handle?.jumpToPage(0);
56
56
  },
57
57
  canExecute: (e) => e.handle?.getCurrentPageIndex() !== 0
58
- }, Ae = [{ key: "End" }, { key: "ArrowRight", modifiers: { ctrl: !0 } }], le = {
58
+ }, He = [{ key: "End" }, { key: "ArrowRight", modifiers: { ctrl: !0 } }], ce = {
59
59
  id: "goToLast",
60
60
  navKind: "jump",
61
61
  enName: "Last Page",
62
62
  enDescription: "Jump to the last page",
63
63
  nameKey: "command.jumpToLastPage",
64
- hotkeys: Ae,
64
+ hotkeys: He,
65
65
  execute: (e) => {
66
66
  const t = e.handle?.getTotalPages() ?? 0;
67
67
  e.handle?.jumpToPage(t - 1);
@@ -70,46 +70,46 @@ const je = {
70
70
  const t = e.handle?.getCurrentPageIndex() ?? 0, o = e.handle?.getTotalPages() ?? 0;
71
71
  return t !== o - 1;
72
72
  }
73
- }, Re = [{ key: "t" }], se = {
73
+ }, Oe = [{ key: "t" }], de = {
74
74
  id: "goToToc",
75
75
  navKind: "jump",
76
76
  enName: "Table of Contents",
77
77
  enDescription: "Jump to the table of contents",
78
78
  nameKey: "command.jumpToToc",
79
- hotkeys: Re,
79
+ hotkeys: Oe,
80
80
  execute: (e) => {
81
- const t = e.handle?.getTocPageIndex?.() ?? he();
81
+ const t = e.handle?.getTocPageIndex?.() ?? we();
82
82
  e.handle?.jumpToPage(t);
83
83
  },
84
84
  canExecute: (e) => {
85
- const t = e.handle?.getTocPageIndex?.() ?? he();
85
+ const t = e.handle?.getTocPageIndex?.() ?? we();
86
86
  return e.handle?.getCurrentPageIndex() !== t;
87
87
  }
88
- }, Ke = [{ key: "d", modifiers: { ctrl: !0, alt: !0 } }], He = {
88
+ }, Ue = [{ key: "d", modifiers: { ctrl: !0, alt: !0 } }], ze = {
89
89
  id: "toggleDebug",
90
90
  enName: "Toggle Debug Toolbar",
91
91
  enDescription: "Show or hide the debug toolbar (Ctrl+Alt+D)",
92
92
  nameKey: "command.toggleDebug",
93
93
  descriptionKey: "command.toggleDebugDesc",
94
- hotkeys: Ke,
94
+ hotkeys: Ue,
95
95
  execute: (e) => {
96
96
  e.handle?.toggleDebugBar?.();
97
97
  }
98
- }, X = () => document, pe = [
98
+ }, ee = () => document, xe = [
99
99
  "fullscreenchange",
100
100
  "webkitfullscreenchange",
101
101
  "fullscreenerror",
102
102
  "webkitfullscreenerror"
103
103
  ];
104
- function ie() {
105
- return typeof document > "u" ? null : X().fullscreenElement ?? X().webkitFullscreenElement ?? null;
104
+ function ue() {
105
+ return typeof document > "u" ? null : ee().fullscreenElement ?? ee().webkitFullscreenElement ?? null;
106
106
  }
107
- function ce(e) {
107
+ function me(e) {
108
108
  if (typeof document > "u") return !1;
109
- const t = e ?? X().documentElement;
110
- return typeof (t.requestFullscreen ?? t.webkitRequestFullscreen) != "function" ? !1 : (X().fullscreenEnabled ?? X().webkitFullscreenEnabled) !== !1;
109
+ const t = e ?? ee().documentElement;
110
+ return typeof (t.requestFullscreen ?? t.webkitRequestFullscreen) != "function" ? !1 : (ee().fullscreenEnabled ?? ee().webkitFullscreenEnabled) !== !1;
111
111
  }
112
- async function Oe(e) {
112
+ async function qe(e) {
113
113
  const t = e;
114
114
  if (t.requestFullscreen) {
115
115
  await t.requestFullscreen();
@@ -121,37 +121,37 @@ async function Oe(e) {
121
121
  }
122
122
  throw new Error("Fullscreen API is not available");
123
123
  }
124
- async function Ue() {
125
- const e = X();
124
+ async function We() {
125
+ const e = ee();
126
126
  if (e.exitFullscreen) {
127
127
  await e.exitFullscreen();
128
128
  return;
129
129
  }
130
130
  e.webkitExitFullscreen && e.webkitExitFullscreen();
131
131
  }
132
- const ze = [{ key: "F11" }], Y = {
132
+ const Ve = [{ key: "F11" }], te = {
133
133
  id: "toggleFullscreen",
134
134
  kind: "toggle",
135
135
  enName: "Toggle Fullscreen",
136
136
  enDescription: "Enter or exit fullscreen mode",
137
137
  nameKey: "command.toggleFullscreen",
138
138
  descriptionKey: "command.toggleFullscreenDesc",
139
- hotkeys: ze,
140
- canExecute: (e) => ce(e.data?.getFullscreenTarget?.()),
141
- isActive: () => ie() !== null,
139
+ hotkeys: Ve,
140
+ canExecute: (e) => me(e.data?.getFullscreenTarget?.()),
141
+ isActive: () => ue() !== null,
142
142
  setActive: (e, t) => {
143
- const o = ie();
143
+ const o = ue();
144
144
  if (t) {
145
145
  if (o) return;
146
146
  const n = e.data?.getFullscreenTarget?.() ?? document.documentElement;
147
- if (!ce(n)) return !1;
148
- Oe(n).catch(console.warn);
147
+ if (!me(n)) return !1;
148
+ qe(n).catch(console.warn);
149
149
  return;
150
150
  }
151
- o && Ue().catch(console.warn);
151
+ o && We().catch(console.warn);
152
152
  },
153
- execute: (e) => Y.setActive(e, !Y.isActive(e))
154
- }, ee = {
153
+ execute: (e) => te.setActive(e, !te.isActive(e))
154
+ }, ne = {
155
155
  id: "toggleTextSelection",
156
156
  kind: "toggle",
157
157
  enName: "Select Text",
@@ -165,32 +165,32 @@ const ze = [{ key: "F11" }], Y = {
165
165
  e.transient ? e.handle.setMouseMode(o, { persist: !1 }) : e.handle.setMouseMode(o);
166
166
  },
167
167
  execute: (e) => {
168
- const t = ee.setActive(
168
+ const t = ne.setActive(
169
169
  e,
170
- !ee.isActive(e)
170
+ !ne.isActive(e)
171
171
  );
172
172
  return t !== !1 && window.getSelection()?.removeAllRanges(), t;
173
173
  }
174
- }, qe = [
175
- ne,
176
- re,
177
- ae,
174
+ }, Je = [
178
175
  le,
179
176
  se,
180
- Y,
181
- He,
182
- ee,
183
- je
177
+ ie,
178
+ ce,
179
+ de,
180
+ te,
181
+ ze,
182
+ ne,
183
+ $e
184
184
  ];
185
- function Ce(e, t) {
185
+ function De(e, t) {
186
186
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
187
187
  }
188
- function We(e, t, o) {
189
- if (Ce(t.key, o) !== e.key) return !1;
188
+ function Ge(e, t, o) {
189
+ if (De(t.key, o) !== e.key) return !1;
190
190
  const n = e.modifiers ?? {};
191
191
  return !(e.key !== "Control" && !!n.ctrl !== t.ctrlKey || e.key !== "Shift" && !!n.shift !== t.shiftKey || e.key !== "Alt" && !!n.alt !== t.altKey || e.key !== "Meta" && !!n.meta !== t.metaKey);
192
192
  }
193
- function Ve(e, t) {
193
+ function _e(e, t) {
194
194
  const o = e.modifiers ?? {};
195
195
  return [
196
196
  o.ctrl && !t.ctrlKey,
@@ -199,11 +199,11 @@ function Ve(e, t) {
199
199
  o.meta && !t.metaKey
200
200
  ].some(Boolean);
201
201
  }
202
- function Je(e, t, o) {
203
- const n = Ce(t.key, o);
204
- return n === e.key || n.length === 1 && n.toLowerCase() === e.key.toLowerCase() ? !0 : Ve(e, t);
202
+ function Qe(e, t, o) {
203
+ const n = De(t.key, o);
204
+ return n === e.key || n.length === 1 && n.toLowerCase() === e.key.toLowerCase() ? !0 : _e(e, t);
205
205
  }
206
- function Ge(e, t) {
206
+ function Xe(e, t) {
207
207
  const o = e.modifiers ?? {}, n = t.modifiers ?? {};
208
208
  return [
209
209
  !!o.ctrl == !!n.ctrl,
@@ -212,17 +212,17 @@ function Ge(e, t) {
212
212
  !!o.meta == !!n.meta
213
213
  ].every(Boolean);
214
214
  }
215
- function be(e, t) {
216
- return e.key === t.key && e.mode === t.mode && (e.active ?? !0) === (t.active ?? !0) && Ge(e, t);
215
+ function ke(e, t) {
216
+ return e.key === t.key && e.mode === t.mode && (e.active ?? !0) === (t.active ?? !0) && Xe(e, t);
217
217
  }
218
- class _e {
218
+ class Ye {
219
219
  held = /* @__PURE__ */ new Map();
220
220
  has(t) {
221
221
  return this.held.has(t);
222
222
  }
223
223
  press(t, o, n) {
224
224
  const r = this.held.get(t.id);
225
- if (r?.bindings.some((i) => be(i, o))) return !1;
225
+ if (r?.bindings.some((i) => ke(i, o))) return !1;
226
226
  const s = r ?? {
227
227
  command: t,
228
228
  context: { ...n, transient: !0 },
@@ -232,7 +232,7 @@ class _e {
232
232
  return t.setActive(s.context, o.active ?? !0) === !1 ? !1 : (s.bindings.push(o), this.held.set(t.id, s), !0);
233
233
  }
234
234
  release(t, o) {
235
- return this.removeBindings((n) => Je(n, t, o));
235
+ return this.removeBindings((n) => Qe(n, t, o));
236
236
  }
237
237
  /** Restore removed/disabled bindings without interrupting holds on ordinary rerenders. */
238
238
  reconcile(t, o) {
@@ -240,7 +240,7 @@ class _e {
240
240
  }
241
241
  isRegistered(t, o, n) {
242
242
  const r = n[o.command.id];
243
- return !r || r.options.disableHotkeys || r.command !== o.command ? !1 : (r.options.hotkeys ?? r.command.hotkeys ?? []).some((s) => be(s, t));
243
+ return !r || r.options.disableHotkeys || r.command !== o.command ? !1 : (r.options.hotkeys ?? r.command.hotkeys ?? []).some((s) => ke(s, t));
244
244
  }
245
245
  clear() {
246
246
  return this.removeBindings(() => !0);
@@ -257,25 +257,25 @@ class _e {
257
257
  return o;
258
258
  }
259
259
  }
260
- const Te = ve(null);
261
- function Qe(e) {
260
+ const Ee = Ce(null);
261
+ function Ze(e) {
262
262
  return e instanceof HTMLElement ? !!(e.isContentEditable || e.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')) : !1;
263
263
  }
264
- function Xe(e) {
264
+ function et(e) {
265
265
  return e.options.disableHotkeys ? [] : e.options.hotkeys ?? e.command.hotkeys ?? [];
266
266
  }
267
- function Ye(e, t, o) {
267
+ function tt(e, t, o) {
268
268
  return t.mode !== "hold" ? !0 : e.kind !== "toggle" ? !1 : !e.canExecute || e.canExecute(o(e));
269
269
  }
270
- function Ze(e, t, o, n) {
270
+ function ot(e, t, o, n) {
271
271
  for (const r of Object.values(e)) {
272
- const s = Xe(r).find(
273
- (i) => We(i, t, o) && Ye(r.command, i, n)
272
+ const s = et(r).find(
273
+ (i) => Ge(i, t, o) && tt(r.command, i, n)
274
274
  );
275
275
  if (s) return { command: r.command, binding: s };
276
276
  }
277
277
  }
278
- const et = ({
278
+ const nt = ({
279
279
  flipBookRef: e,
280
280
  currentPage: t,
281
281
  totalPages: o,
@@ -285,90 +285,90 @@ const et = ({
285
285
  disableHotkeys: i = !1,
286
286
  children: c
287
287
  }) => {
288
- const m = J(new _e()).current, [, x] = Fe((d) => d + 1, 0), g = Pe(() => {
288
+ const g = Q(new Ye()).current, [, w] = je((d) => d + 1, 0), f = Ie(() => {
289
289
  const d = {};
290
- for (const u of qe)
291
- d[u.id] = {
292
- command: u,
293
- options: s[u.id] ?? {}
290
+ for (const m of Je)
291
+ d[m.id] = {
292
+ command: m,
293
+ options: s[m.id] ?? {}
294
294
  };
295
- for (const u of r)
296
- d[u.id] = {
297
- command: u,
298
- options: s[u.id] ?? {}
295
+ for (const m of r)
296
+ d[m.id] = {
297
+ command: m,
298
+ options: s[m.id] ?? {}
299
299
  };
300
300
  return d;
301
- }, [r, s]), h = L(
302
- (d, u) => {
303
- const M = g[d.id]?.options ?? {}, I = u ? { ...M.data, ...u } : M.data;
301
+ }, [r, s]), p = I(
302
+ (d, m) => {
303
+ const y = f[d.id]?.options ?? {}, $ = m ? { ...y.data, ...m } : y.data;
304
304
  return {
305
305
  handle: e.current,
306
- data: I
306
+ data: $
307
307
  };
308
308
  },
309
- [e, g]
310
- ), N = L(
311
- (d, u) => {
312
- if (m.has(d.id)) return;
313
- const M = h(d, u);
314
- d.canExecute && !d.canExecute(M) || (d.execute(M), x());
309
+ [e, f]
310
+ ), N = I(
311
+ (d, m) => {
312
+ if (g.has(d.id)) return;
313
+ const y = p(d, m);
314
+ d.canExecute && !d.canExecute(y) || (d.execute(y), w());
315
315
  },
316
- [h, m]
317
- ), T = L(
316
+ [p, g]
317
+ ), E = I(
318
318
  (d) => {
319
- if (m.has(d.id)) return !1;
320
- const u = h(d);
321
- return d.canExecute ? d.canExecute(u) : !0;
319
+ if (g.has(d.id)) return !1;
320
+ const m = p(d);
321
+ return d.canExecute ? d.canExecute(m) : !0;
322
322
  },
323
- [h, m]
324
- ), j = L(
325
- (d) => d.isActive(h(d)),
326
- [h]
327
- ), B = L(
328
- () => Object.values(g).map((d) => d.command),
329
- [g]
330
- ), P = J({ registry: g, execute: N, createCommandContext: h, direction: n, disableHotkeys: i });
331
- P.current = { registry: g, execute: N, createCommandContext: h, direction: n, disableHotkeys: i }, U(() => {
332
- m.reconcile(g, i) && x();
333
- }, [m, g, i]), U(() => {
334
- const d = (p, D, $) => {
335
- if (p.kind !== "toggle") return;
336
- const K = P.current.createCommandContext(p);
337
- !$.repeat && m.press(p, D, K) && x(), ["Control", "Shift", "Alt", "Meta"].includes(D.key) || $.preventDefault();
338
- }, u = (p) => {
339
- const { registry: D, execute: $, direction: K, disableHotkeys: H, createCommandContext: O } = P.current;
340
- if (H || p.defaultPrevented || Qe(p.target)) return;
341
- const k = Ze(D, p, K, O);
342
- k && (k.binding.mode === "hold" ? d(k.command, k.binding, p) : (p.preventDefault(), $(k.command)));
343
- }, M = (p) => {
344
- m.release(p, P.current.direction) && x();
345
- }, I = () => {
346
- m.clear() && x();
347
- }, A = () => {
348
- document.hidden && I();
323
+ [p, g]
324
+ ), M = I(
325
+ (d) => d.isActive(p(d)),
326
+ [p]
327
+ ), j = I(
328
+ () => Object.values(f).map((d) => d.command),
329
+ [f]
330
+ ), v = Q({ registry: f, execute: N, createCommandContext: p, direction: n, disableHotkeys: i });
331
+ v.current = { registry: f, execute: N, createCommandContext: p, direction: n, disableHotkeys: i }, U(() => {
332
+ g.reconcile(f, i) && w();
333
+ }, [g, f, i]), U(() => {
334
+ const d = (b, F, k) => {
335
+ if (b.kind !== "toggle") return;
336
+ const S = v.current.createCommandContext(b);
337
+ !k.repeat && g.press(b, F, S) && w(), ["Control", "Shift", "Alt", "Meta"].includes(F.key) || k.preventDefault();
338
+ }, m = (b) => {
339
+ const { registry: F, execute: k, direction: S, disableHotkeys: K, createCommandContext: V } = v.current;
340
+ if (K || b.defaultPrevented || Ze(b.target)) return;
341
+ const P = ot(F, b, S, V);
342
+ P && (P.binding.mode === "hold" ? d(P.command, P.binding, b) : (b.preventDefault(), k(P.command)));
343
+ }, y = (b) => {
344
+ g.release(b, v.current.direction) && w();
345
+ }, $ = () => {
346
+ g.clear() && w();
347
+ }, O = () => {
348
+ document.hidden && $();
349
349
  };
350
- return document.addEventListener("keydown", u), document.addEventListener("keyup", M), window.addEventListener("blur", I), document.addEventListener("visibilitychange", A), () => {
351
- document.removeEventListener("keydown", u), document.removeEventListener("keyup", M), window.removeEventListener("blur", I), document.removeEventListener("visibilitychange", A), m.clear();
350
+ return document.addEventListener("keydown", m), document.addEventListener("keyup", y), window.addEventListener("blur", $), document.addEventListener("visibilitychange", O), () => {
351
+ document.removeEventListener("keydown", m), document.removeEventListener("keyup", y), window.removeEventListener("blur", $), document.removeEventListener("visibilitychange", O), g.clear();
352
352
  };
353
- }, [m]);
354
- const S = { execute: N, canExecute: T, isActive: j, getAllCommands: B };
355
- return /* @__PURE__ */ a(Te.Provider, { value: S, children: c });
356
- }, Q = () => {
357
- const e = ye(Te);
353
+ }, [g]);
354
+ const B = { execute: N, canExecute: E, isActive: M, getAllCommands: j };
355
+ return /* @__PURE__ */ a(Ee.Provider, { value: B, children: c });
356
+ }, X = () => {
357
+ const e = Te(Ee);
358
358
  if (!e)
359
359
  throw new Error("useCommands must be used within a CommandProvider");
360
360
  return e;
361
361
  };
362
- function tt(e) {
362
+ function rt(e) {
363
363
  let t = "";
364
364
  for (const o of new TextEncoder().encode(e))
365
365
  t += String.fromCharCode(o);
366
366
  return btoa(t);
367
367
  }
368
- function we(e) {
369
- return { ext: "json", data: tt(JSON.stringify(e, null, " ")) };
368
+ function ve(e) {
369
+ return { ext: "json", data: rt(JSON.stringify(e, null, " ")) };
370
370
  }
371
- function xt(e) {
371
+ function yt(e) {
372
372
  const { pagesCount: t, pageSemantics: o } = e, n = (r) => {
373
373
  const s = o?.indexToSemanticName(r) ?? "", i = o?.indexToTitle(r) ?? "";
374
374
  return o ? { pageIndex: r, semanticName: s, title: i } : { pageIndex: r, semanticName: String(r + 1), title: `Page ${r + 1}` };
@@ -380,12 +380,12 @@ function xt(e) {
380
380
  const i = n(s);
381
381
  (i.semanticName || i.title) && r.push(i);
382
382
  }
383
- return Promise.resolve(we(r));
383
+ return Promise.resolve(ve(r));
384
384
  },
385
- onDownloadPageRange: (r) => Promise.resolve(we(r.map(n)))
385
+ onDownloadPageRange: (r) => Promise.resolve(ve(r.map(n)))
386
386
  };
387
387
  }
388
- const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE__ */ a(
388
+ const z = { size: 24 }, at = ({ size: e = z.size, className: t }) => /* @__PURE__ */ a(
389
389
  "svg",
390
390
  {
391
391
  xmlns: "http://www.w3.org/2000/svg",
@@ -401,7 +401,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
401
401
  "aria-hidden": "true",
402
402
  children: /* @__PURE__ */ a("path", { d: "m15 18-6-6 6-6" })
403
403
  }
404
- ), nt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ a(
404
+ ), lt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ a(
405
405
  "svg",
406
406
  {
407
407
  xmlns: "http://www.w3.org/2000/svg",
@@ -417,7 +417,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
417
417
  "aria-hidden": "true",
418
418
  children: /* @__PURE__ */ a("path", { d: "m9 18 6-6-6-6" })
419
419
  }
420
- ), rt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
420
+ ), st = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
421
421
  "svg",
422
422
  {
423
423
  xmlns: "http://www.w3.org/2000/svg",
@@ -436,7 +436,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
436
436
  /* @__PURE__ */ a("path", { d: "M7 6v12" })
437
437
  ]
438
438
  }
439
- ), at = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
439
+ ), it = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
440
440
  "svg",
441
441
  {
442
442
  xmlns: "http://www.w3.org/2000/svg",
@@ -455,7 +455,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
455
455
  /* @__PURE__ */ a("path", { d: "M17 6v12" })
456
456
  ]
457
457
  }
458
- ), lt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
458
+ ), ct = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
459
459
  "svg",
460
460
  {
461
461
  xmlns: "http://www.w3.org/2000/svg",
@@ -476,7 +476,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
476
476
  /* @__PURE__ */ a("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
477
477
  ]
478
478
  }
479
- ), st = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
479
+ ), dt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
480
480
  "svg",
481
481
  {
482
482
  xmlns: "http://www.w3.org/2000/svg",
@@ -497,10 +497,10 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
497
497
  /* @__PURE__ */ a("path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" })
498
498
  ]
499
499
  }
500
- ), it = ({
500
+ ), ut = ({
501
501
  size: e = z.size,
502
502
  className: t
503
- }) => /* @__PURE__ */ E(
503
+ }) => /* @__PURE__ */ L(
504
504
  "svg",
505
505
  {
506
506
  xmlns: "http://www.w3.org/2000/svg",
@@ -523,7 +523,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
523
523
  /* @__PURE__ */ a("path", { d: "M21 19h.01" })
524
524
  ]
525
525
  }
526
- ), kt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
526
+ ), Pt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
527
527
  "svg",
528
528
  {
529
529
  xmlns: "http://www.w3.org/2000/svg",
@@ -545,7 +545,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
545
545
  /* @__PURE__ */ a("rect", { x: "16", y: "6", width: "4", height: "15", rx: "0.5" })
546
546
  ]
547
547
  }
548
- ), ct = ({ size: e = z.size, className: t }) => /* @__PURE__ */ E(
548
+ ), mt = ({ size: e = z.size, className: t }) => /* @__PURE__ */ L(
549
549
  "svg",
550
550
  {
551
551
  xmlns: "http://www.w3.org/2000/svg",
@@ -585,7 +585,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
585
585
  className: `flipbook-toolbar-button ${s}`.trim(),
586
586
  children: r
587
587
  }
588
- ), vt = ({
588
+ ), Ct = ({
589
589
  onClick: e,
590
590
  ariaLabel: t,
591
591
  children: o,
@@ -600,7 +600,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
600
600
  className: `flipbook-toolbar-action ${r ?? ""}`.trim(),
601
601
  children: o
602
602
  }
603
- ), yt = ({
603
+ ), Tt = ({
604
604
  enabled: e,
605
605
  onChange: t,
606
606
  ariaLabel: o,
@@ -623,7 +623,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
623
623
  }
624
624
  ) })
625
625
  }
626
- ), dt = {
626
+ ), gt = {
627
627
  align: "left",
628
628
  direction: "ltr",
629
629
  translations: {
@@ -632,6 +632,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
632
632
  "toolbarItem.download.from": "From",
633
633
  "toolbarItem.download.to": "To",
634
634
  "toolbarItem.download.download": "Download",
635
+ "toolbarItem.download.error": "Download failed — try again",
635
636
  "command.downloadEntireBook": "Download entire book",
636
637
  "command.jumpToToc": "Table of contents",
637
638
  "command.jumpToFirstPage": "First page",
@@ -649,7 +650,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
649
650
  "toolbarItem.exitFullscreen": "Exit fullscreen",
650
651
  "toolbarItem.fullscreenUnsupported": "Fullscreen is not supported by this browser"
651
652
  }
652
- }, ut = {
653
+ }, ft = {
653
654
  align: "right",
654
655
  direction: "rtl",
655
656
  translations: {
@@ -658,6 +659,7 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
658
659
  "toolbarItem.download.from": "מ",
659
660
  "toolbarItem.download.to": "עד",
660
661
  "toolbarItem.download.download": "הורד",
662
+ "toolbarItem.download.error": "ההורדה נכשלה — נסו שוב",
661
663
  "command.downloadEntireBook": "הורד את כל הספר",
662
664
  "command.jumpToToc": "תוכן העניינים",
663
665
  "command.jumpToFirstPage": "עמוד ראשון",
@@ -675,10 +677,10 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
675
677
  "toolbarItem.exitFullscreen": "יציאה ממסך מלא",
676
678
  "toolbarItem.fullscreenUnsupported": "מסך מלא אינו נתמך בדפדפן זה"
677
679
  }
678
- }, de = {
679
- "en-US": dt,
680
- "he-IL": ut
681
- }, me = "en-US", mt = {
680
+ }, ge = {
681
+ "en-US": gt,
682
+ "he-IL": ft
683
+ }, he = "en-US", ht = {
682
684
  "toolbarItem.download": "Download",
683
685
  "toolbarItem.downloadPageRange": "Download page range…",
684
686
  "toolbarItem.download.from": "From",
@@ -699,43 +701,39 @@ const z = { size: 24 }, ot = ({ size: e = z.size, className: t }) => /* @__PURE_
699
701
  "toolbarItem.exitFullscreen": "Exit fullscreen",
700
702
  "toolbarItem.fullscreenUnsupported": "Fullscreen is not supported by this browser"
701
703
  };
702
- function Ie(e) {
703
- return de[e] ?? de[me];
704
+ function Le(e) {
705
+ return ge[e] ?? ge[he];
704
706
  }
705
- function ue(e) {
706
- return Ie(e).direction === "rtl";
707
+ function fe(e) {
708
+ return Le(e).direction === "rtl";
707
709
  }
708
- function gt(e) {
709
- return ue(e) ? "rtl" : "ltr";
710
+ function pt(e) {
711
+ return fe(e) ? "rtl" : "ltr";
710
712
  }
711
713
  function C(e, t) {
712
- const o = Ie(t).translations[e];
714
+ const o = Le(t).translations[e];
713
715
  if (o !== void 0 && o !== "") return o;
714
- const n = de[me].translations[e];
715
- return n !== void 0 && n !== "" ? n : mt[e] ?? e;
716
+ const n = ge[he].translations[e];
717
+ return n !== void 0 && n !== "" ? n : ht[e] ?? e;
716
718
  }
717
- const De = ve(null);
719
+ const Ne = Ce(null);
718
720
  function W() {
719
- const e = ye(De);
721
+ const e = Te(Ne);
720
722
  if (!e)
721
723
  throw new Error("Toolbar components must be used within a Toolbar");
722
724
  return e;
723
725
  }
724
- function xe(e) {
726
+ function ye(e) {
725
727
  return e.replace(/[׳'״"]/g, "");
726
728
  }
727
- function ke(e, t) {
728
- try {
729
- const o = atob(e.data), n = new Uint8Array(o.length);
730
- for (let c = 0; c < o.length; c++)
731
- n[c] = o.charCodeAt(c);
732
- const r = new Blob([n]), s = URL.createObjectURL(r), i = document.createElement("a");
733
- i.href = s, i.download = `${t}.${e.ext}`, i.click(), URL.revokeObjectURL(s);
734
- } catch (o) {
735
- console.error("Download failed:", o);
736
- }
729
+ function Pe(e, t) {
730
+ const o = atob(e.data), n = new Uint8Array(o.length);
731
+ for (let c = 0; c < o.length; c++)
732
+ n[c] = o.charCodeAt(c);
733
+ const r = new Blob([n]), s = URL.createObjectURL(r), i = document.createElement("a");
734
+ i.href = s, i.download = `${t}.${e.ext}`, i.click(), URL.revokeObjectURL(s);
737
735
  }
738
- function ft(e, t) {
736
+ function bt(e, t) {
739
737
  const o = [];
740
738
  for (let n = 0; n < e; n++) {
741
739
  const r = t?.indexToSemanticName(n) ?? "", s = t?.indexToTitle(n) ?? "";
@@ -751,7 +749,7 @@ function ft(e, t) {
751
749
  }
752
750
  return o;
753
751
  }
754
- const Pt = ({
752
+ const It = ({
755
753
  ariaLabel: e = "Download",
756
754
  className: t
757
755
  }) => {
@@ -762,140 +760,152 @@ const Pt = ({
762
760
  openDownloadMenuRef: s,
763
761
  downloadExecutorRef: i,
764
762
  flipBookRef: c
765
- } = W(), m = c.current?.getDownloadConfig?.() ?? void 0, [x, g] = F(!1);
766
- U(() => (s.current = () => g(!0), () => {
763
+ } = W(), g = c.current?.getDownloadConfig?.() ?? void 0, [w, f] = D(!1);
764
+ U(() => (s.current = () => f(!0), () => {
767
765
  s.current = null;
768
766
  }), [s]);
769
- const [h, N] = F("entire"), [T, j] = F(0), [B, P] = F(0), [S, d] = F(null), [u, M] = F(!1), I = J(null), A = J(null), p = Pe(
770
- () => ft(o, n),
767
+ const [p, N] = D("entire"), [E, M] = D(0), [j, v] = D(0), [B, d] = D(null), [m, y] = D(null), [$, O] = D(!1), b = Q(null), F = Q(null), k = Ie(
768
+ () => bt(o, n),
771
769
  [o, n]
772
- ), D = !!m?.onDownloadSefer, $ = !!m?.onDownloadPageRange, K = D || $, H = p[0]?.pageIndex ?? 0, O = p[p.length - 1]?.pageIndex ?? 0;
770
+ ), S = !!g?.onDownloadSefer, K = !!g?.onDownloadPageRange, V = S || K, P = k[0]?.pageIndex ?? 0, Y = k[k.length - 1]?.pageIndex ?? 0;
773
771
  U(() => {
774
- x && (N(D ? "entire" : "range"), j(H), P(O));
775
- }, [x, D, H, O]);
776
- const k = L(() => {
777
- g(!1);
778
- }, []);
779
- Ne(() => {
780
- if (!x || !A.current || !I.current) return;
781
- const l = A.current, b = I.current.querySelector(".flipbook-toolbar-download-trigger"), y = () => {
782
- const w = b?.getBoundingClientRect();
783
- if (!w) return;
784
- const R = 8, V = 6, te = window.innerHeight - w.bottom - V - R, ge = w.top - V - R, fe = Math.min(l.scrollHeight, window.innerHeight * 0.7, 480), oe = te < fe && ge > te;
785
- l.style.maxHeight = `${Math.max(0, Math.min(fe, oe ? ge : te))}px`;
786
- const Z = l.getBoundingClientRect(), Ee = ue(r) ? w.left : w.right - Z.width;
787
- l.style.left = `${Math.max(R, Math.min(Ee, window.innerWidth - Z.width - R))}px`;
788
- const Le = oe ? w.top - V - Z.height : w.bottom + V;
789
- l.style.top = `${Math.max(R, Math.min(Le, window.innerHeight - Z.height - R))}px`, M(oe);
772
+ w && (N(S ? "entire" : "range"), M(P), v(Y));
773
+ }, [w, S, P, Y]);
774
+ const H = I(() => {
775
+ f(!1), y(null);
776
+ }, []), x = I(
777
+ (l) => {
778
+ const h = c.current?.getDownloadConfig?.()?.onDownloadError?.(l);
779
+ y(
780
+ typeof h == "string" && h ? h : C("toolbarItem.download.error", r)
781
+ );
782
+ },
783
+ [c, r]
784
+ );
785
+ Be(() => {
786
+ if (!w || !F.current || !b.current) return;
787
+ const l = F.current, u = b.current.querySelector(".flipbook-toolbar-download-trigger"), h = () => {
788
+ const T = u?.getBoundingClientRect();
789
+ if (!T) return;
790
+ const R = 8, _ = 6, re = window.innerHeight - T.bottom - _ - R, pe = T.top - _ - R, be = Math.min(l.scrollHeight, window.innerHeight * 0.7, 480), ae = re < be && pe > re;
791
+ l.style.maxHeight = `${Math.max(0, Math.min(be, ae ? pe : re))}px`;
792
+ const oe = l.getBoundingClientRect(), Fe = fe(r) ? T.left : T.right - oe.width;
793
+ l.style.left = `${Math.max(R, Math.min(Fe, window.innerWidth - oe.width - R))}px`;
794
+ const Me = ae ? T.top - _ - oe.height : T.bottom + _;
795
+ l.style.top = `${Math.max(R, Math.min(Me, window.innerHeight - oe.height - R))}px`, O(ae);
790
796
  };
791
- y();
792
- const f = new ResizeObserver(y);
793
- f.observe(l);
794
- const v = I.current.closest('[role="toolbar"]');
795
- return v && f.observe(v), window.addEventListener("resize", y), window.addEventListener("scroll", y, !0), () => {
796
- f.disconnect(), window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0);
797
+ h();
798
+ const Z = new ResizeObserver(h);
799
+ Z.observe(l);
800
+ const G = b.current.closest('[role="toolbar"]');
801
+ return G && Z.observe(G), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
802
+ Z.disconnect(), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
797
803
  };
798
- }, [x, r]), U(() => {
799
- if (!x) return;
800
- const l = (b) => {
801
- I.current && !I.current.contains(b.target) && k();
804
+ }, [w, r]), U(() => {
805
+ if (!w) return;
806
+ const l = (u) => {
807
+ b.current && !b.current.contains(u.target) && H();
802
808
  };
803
809
  return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
804
- }, [x, k]);
805
- const G = L(async () => {
810
+ }, [w, H]);
811
+ const A = I(async () => {
806
812
  const l = c.current?.getDownloadConfig?.();
807
813
  if (l?.onDownloadSefer) {
808
- d("sefer");
814
+ d("sefer"), y(null);
809
815
  try {
810
- const b = await l.onDownloadSefer();
811
- b && ke(b, l.entireBookFilename ?? "book"), k();
816
+ const u = await l.onDownloadSefer();
817
+ u && Pe(u, l.entireBookFilename ?? "book"), H();
818
+ } catch (u) {
819
+ x(u);
812
820
  } finally {
813
821
  d(null);
814
822
  }
815
823
  }
816
- }, [c, k]), _ = L(
817
- async (l, b) => {
818
- const y = c.current?.getDownloadConfig?.();
819
- if (!y?.onDownloadPageRange) return;
820
- const f = [], v = [];
821
- for (let w = l; w <= b; w++) {
822
- f.push(w);
823
- const R = p.find((V) => V.pageIndex === w);
824
- R && v.push(R);
824
+ }, [c, H, x]), J = I(
825
+ async (l, u) => {
826
+ const h = c.current?.getDownloadConfig?.();
827
+ if (!h?.onDownloadPageRange) return;
828
+ const Z = [], G = [];
829
+ for (let T = l; T <= u; T++) {
830
+ Z.push(T);
831
+ const R = k.find((_) => _.pageIndex === T);
832
+ R && G.push(R);
825
833
  }
826
- d("range");
834
+ d("range"), y(null);
827
835
  try {
828
- const w = await y.onDownloadPageRange(
829
- f,
830
- v,
831
- y.downloadContext
836
+ const T = await h.onDownloadPageRange(
837
+ Z,
838
+ G,
839
+ h.downloadContext
832
840
  );
833
- if (w) {
834
- const R = xe(v[0]?.semanticName ?? String(l)), V = xe(
835
- v[v.length - 1]?.semanticName ?? String(b)
841
+ if (T) {
842
+ const R = ye(G[0]?.semanticName ?? String(l)), _ = ye(
843
+ G[G.length - 1]?.semanticName ?? String(u)
836
844
  );
837
- ke(w, `${y.rangeFilename ?? "pages"}-${R}-${V}`);
845
+ Pe(T, `${h.rangeFilename ?? "pages"}-${R}-${_}`);
838
846
  }
839
- k();
847
+ H();
848
+ } catch (T) {
849
+ x(T);
840
850
  } finally {
841
851
  d(null);
842
852
  }
843
853
  },
844
- [c, p, k]
854
+ [c, k, H, x]
845
855
  );
846
- return U(() => (i.current = (l, b) => {
847
- l === void 0 && b === void 0 ? G() : l !== void 0 && b !== void 0 && _(l, b);
856
+ return U(() => (i.current = (l, u) => {
857
+ l === void 0 && u === void 0 ? A() : l !== void 0 && u !== void 0 && J(l, u);
848
858
  }, () => {
849
859
  i.current = null;
850
- }), [i, G, _]), K ? /* @__PURE__ */ E("div", { className: `flipbook-toolbar-download-wrap ${t ?? ""}`.trim(), ref: I, children: [
860
+ }), [i, A, J]), V ? /* @__PURE__ */ L("div", { className: `flipbook-toolbar-download-wrap ${t ?? ""}`.trim(), ref: b, children: [
851
861
  /* @__PURE__ */ a(
852
862
  "button",
853
863
  {
854
864
  type: "button",
855
865
  className: "flipbook-toolbar-button flipbook-toolbar-download-trigger",
856
- onClick: () => g((l) => !l),
866
+ onClick: () => f((l) => !l),
857
867
  "aria-label": e ?? C("toolbarItem.download", r),
858
- "aria-expanded": x,
868
+ "aria-expanded": w,
859
869
  "aria-haspopup": "true",
860
- disabled: S !== null,
861
- children: /* @__PURE__ */ a(ct, { size: 18 })
870
+ disabled: B !== null,
871
+ children: /* @__PURE__ */ a(mt, { size: 18 })
862
872
  }
863
873
  ),
864
- x && /* @__PURE__ */ E(
874
+ w && /* @__PURE__ */ L(
865
875
  "div",
866
876
  {
867
- ref: A,
868
- className: `flipbook-toolbar-download-menu ${u ? "flipbook-toolbar-download-menu--open-up" : ""}`.trim(),
877
+ ref: F,
878
+ className: `flipbook-toolbar-download-menu ${$ ? "flipbook-toolbar-download-menu--open-up" : ""}`.trim(),
869
879
  role: "menu",
870
- dir: ue(r) ? "rtl" : "ltr",
880
+ dir: fe(r) ? "rtl" : "ltr",
871
881
  children: [
872
- /* @__PURE__ */ E(
882
+ /* @__PURE__ */ L(
873
883
  "fieldset",
874
884
  {
875
885
  className: "flipbook-toolbar-download-mode",
876
886
  "aria-label": C("toolbarItem.download", r),
877
887
  children: [
878
- D && /* @__PURE__ */ E("label", { className: "flipbook-toolbar-download-radio-label", children: [
888
+ S && /* @__PURE__ */ L("label", { className: "flipbook-toolbar-download-radio-label", children: [
879
889
  /* @__PURE__ */ a(
880
890
  "input",
881
891
  {
882
892
  type: "radio",
883
893
  name: "download-mode",
884
894
  className: "flipbook-toolbar-download-radio",
885
- checked: h === "entire",
895
+ checked: p === "entire",
886
896
  onChange: () => N("entire")
887
897
  }
888
898
  ),
889
899
  /* @__PURE__ */ a("span", { children: C("command.downloadEntireBook", r) })
890
900
  ] }),
891
- $ && /* @__PURE__ */ E("label", { className: "flipbook-toolbar-download-radio-label", children: [
901
+ K && /* @__PURE__ */ L("label", { className: "flipbook-toolbar-download-radio-label", children: [
892
902
  /* @__PURE__ */ a(
893
903
  "input",
894
904
  {
895
905
  type: "radio",
896
906
  name: "download-mode",
897
907
  className: "flipbook-toolbar-download-radio",
898
- checked: h === "range",
908
+ checked: p === "range",
899
909
  onChange: () => N("range")
900
910
  }
901
911
  ),
@@ -904,32 +914,33 @@ const Pt = ({
904
914
  ]
905
915
  }
906
916
  ),
907
- h === "range" && /* @__PURE__ */ E("div", { className: "flipbook-toolbar-download-range", children: [
908
- /* @__PURE__ */ E("label", { className: "flipbook-toolbar-download-range-label", children: [
917
+ p === "range" && /* @__PURE__ */ L("div", { className: "flipbook-toolbar-download-range", children: [
918
+ /* @__PURE__ */ L("label", { className: "flipbook-toolbar-download-range-label", children: [
909
919
  C("toolbarItem.download.from", r),
910
920
  /* @__PURE__ */ a(
911
921
  "select",
912
922
  {
913
- value: T,
914
- onChange: (l) => j(Number(l.target.value)),
923
+ value: E,
924
+ onChange: (l) => M(Number(l.target.value)),
915
925
  className: "flipbook-toolbar-download-range-select",
916
- children: p.map((l) => /* @__PURE__ */ a("option", { value: l.pageIndex, children: l.semanticName || l.title || `Page ${l.pageIndex + 1}` }, l.pageIndex))
926
+ children: k.map((l) => /* @__PURE__ */ a("option", { value: l.pageIndex, children: l.semanticName || l.title || `Page ${l.pageIndex + 1}` }, l.pageIndex))
917
927
  }
918
928
  )
919
929
  ] }),
920
- /* @__PURE__ */ E("label", { className: "flipbook-toolbar-download-range-label", children: [
930
+ /* @__PURE__ */ L("label", { className: "flipbook-toolbar-download-range-label", children: [
921
931
  C("toolbarItem.download.to", r),
922
932
  /* @__PURE__ */ a(
923
933
  "select",
924
934
  {
925
- value: B,
926
- onChange: (l) => P(Number(l.target.value)),
935
+ value: j,
936
+ onChange: (l) => v(Number(l.target.value)),
927
937
  className: "flipbook-toolbar-download-range-select",
928
- children: p.map((l) => /* @__PURE__ */ a("option", { value: l.pageIndex, children: l.semanticName || l.title || `Page ${l.pageIndex + 1}` }, l.pageIndex))
938
+ children: k.map((l) => /* @__PURE__ */ a("option", { value: l.pageIndex, children: l.semanticName || l.title || `Page ${l.pageIndex + 1}` }, l.pageIndex))
929
939
  }
930
940
  )
931
941
  ] })
932
942
  ] }),
943
+ m && /* @__PURE__ */ a("div", { role: "alert", className: "flipbook-toolbar-download-error", children: m }),
933
944
  /* @__PURE__ */ a(
934
945
  "button",
935
946
  {
@@ -937,39 +948,39 @@ const Pt = ({
937
948
  role: "menuitem",
938
949
  className: "flipbook-toolbar-download-menuitem flipbook-toolbar-download-primary",
939
950
  onClick: () => {
940
- if (h === "entire")
941
- G();
951
+ if (p === "entire")
952
+ A();
942
953
  else {
943
- const l = c.current?.getTotalPages?.() ?? o, b = Math.min(T, B);
944
- let y = Math.max(T, B);
945
- if (l > 0 && y >= l && (y = l - 1), y < b) return;
946
- _(b, y);
954
+ const l = c.current?.getTotalPages?.() ?? o, u = Math.min(E, j);
955
+ let h = Math.max(E, j);
956
+ if (l > 0 && h >= l && (h = l - 1), h < u) return;
957
+ J(u, h);
947
958
  }
948
959
  },
949
- disabled: S !== null,
950
- children: S === "sefer" || S === "range" ? "…" : C("toolbarItem.download.download", r)
960
+ disabled: B !== null,
961
+ children: B === "sefer" || B === "range" ? "…" : C("toolbarItem.download.download", r)
951
962
  }
952
963
  )
953
964
  ]
954
965
  }
955
966
  )
956
967
  ] }) : null;
957
- }, Ct = ({ children: e, className: t }) => {
958
- const { locale: o } = W(), { execute: n, canExecute: r } = Q(), s = () => {
959
- n(ae);
960
- }, i = /* @__PURE__ */ a(rt, { size: 18 }), c = C("command.jumpToFirstPage", o);
968
+ }, Dt = ({ children: e, className: t }) => {
969
+ const { locale: o } = W(), { execute: n, canExecute: r } = X(), s = () => {
970
+ n(ie);
971
+ }, i = /* @__PURE__ */ a(st, { size: 18 }), c = C("command.jumpToFirstPage", o);
961
972
  return /* @__PURE__ */ a(
962
973
  q,
963
974
  {
964
975
  onClick: s,
965
976
  ariaLabel: c,
966
977
  title: c,
967
- disabled: !r(ae),
978
+ disabled: !r(ie),
968
979
  className: `flipbook-toolbar-first ${t ?? ""}`.trim(),
969
980
  children: e ?? i
970
981
  }
971
982
  );
972
- }, Tt = ({
983
+ }, Et = ({
973
984
  targetRef: e,
974
985
  enterIcon: t,
975
986
  exitIcon: o,
@@ -978,61 +989,61 @@ const Pt = ({
978
989
  unsupportedBehavior: s = "hide",
979
990
  className: i
980
991
  }) => {
981
- const c = W(), { execute: m, canExecute: x } = Q(), g = e ?? c.fullscreenTargetRef, [h, N] = F(!1), [T, j] = F(!1);
992
+ const c = W(), { execute: g, canExecute: w } = X(), f = e ?? c.fullscreenTargetRef, [p, N] = D(!1), [E, M] = D(!1);
982
993
  U(() => {
983
994
  const d = () => {
984
- N(ie() !== null), j(ce(g?.current));
995
+ N(ue() !== null), M(me(f?.current));
985
996
  };
986
997
  d();
987
- for (const u of pe)
988
- document.addEventListener(u, d);
998
+ for (const m of xe)
999
+ document.addEventListener(m, d);
989
1000
  return () => {
990
- for (const u of pe)
991
- document.removeEventListener(u, d);
1001
+ for (const m of xe)
1002
+ document.removeEventListener(m, d);
992
1003
  };
993
- }, [g]);
994
- const B = () => {
995
- e ? m(Y, {
1004
+ }, [f]);
1005
+ const j = () => {
1006
+ e ? g(te, {
996
1007
  getFullscreenTarget: () => e.current ?? null
997
- }) : m(Y);
1008
+ }) : g(te);
998
1009
  };
999
- if (!T && s === "hide") return null;
1000
- const P = h ? r ?? C("toolbarItem.exitFullscreen", c.locale) : n ?? C("toolbarItem.enterFullscreen", c.locale), S = h ? o ?? /* @__PURE__ */ a(st, { size: 18 }) : t ?? /* @__PURE__ */ a(lt, { size: 18 });
1010
+ if (!E && s === "hide") return null;
1011
+ const v = p ? r ?? C("toolbarItem.exitFullscreen", c.locale) : n ?? C("toolbarItem.enterFullscreen", c.locale), B = p ? o ?? /* @__PURE__ */ a(dt, { size: 18 }) : t ?? /* @__PURE__ */ a(ct, { size: 18 });
1001
1012
  return /* @__PURE__ */ a(
1002
1013
  q,
1003
1014
  {
1004
- onClick: B,
1005
- ariaLabel: P,
1006
- ariaPressed: h,
1007
- disabled: !T || !x(Y),
1008
- title: T ? P : C("toolbarItem.fullscreenUnsupported", c.locale),
1009
- className: `flipbook-toolbar-fullscreen ${h ? "flipbook-toolbar-fullscreen--active" : ""} ${i ?? ""}`.trim(),
1010
- children: S
1015
+ onClick: j,
1016
+ ariaLabel: v,
1017
+ ariaPressed: p,
1018
+ disabled: !E || !w(te),
1019
+ title: E ? v : C("toolbarItem.fullscreenUnsupported", c.locale),
1020
+ className: `flipbook-toolbar-fullscreen ${p ? "flipbook-toolbar-fullscreen--active" : ""} ${i ?? ""}`.trim(),
1021
+ children: B
1011
1022
  }
1012
1023
  );
1013
- }, It = ({ children: e, className: t }) => {
1014
- const { locale: o } = W(), { execute: n, canExecute: r } = Q(), s = () => {
1015
- n(le);
1016
- }, i = /* @__PURE__ */ a(at, { size: 18 }), c = C("command.jumpToLastPage", o);
1024
+ }, Lt = ({ children: e, className: t }) => {
1025
+ const { locale: o } = W(), { execute: n, canExecute: r } = X(), s = () => {
1026
+ n(ce);
1027
+ }, i = /* @__PURE__ */ a(it, { size: 18 }), c = C("command.jumpToLastPage", o);
1017
1028
  return /* @__PURE__ */ a(
1018
1029
  q,
1019
1030
  {
1020
1031
  onClick: s,
1021
1032
  ariaLabel: c,
1022
1033
  title: c,
1023
- disabled: !r(le),
1034
+ disabled: !r(ce),
1024
1035
  className: `flipbook-toolbar-last ${t ?? ""}`.trim(),
1025
1036
  children: e ?? i
1026
1037
  }
1027
1038
  );
1028
- }, ht = ({
1039
+ }, wt = ({
1029
1040
  command: e,
1030
1041
  ariaLabel: t,
1031
1042
  children: o,
1032
1043
  disabled: n = !1,
1033
1044
  className: r
1034
1045
  }) => {
1035
- const { execute: s, canExecute: i, isActive: c } = Q();
1046
+ const { execute: s, canExecute: i, isActive: c } = X();
1036
1047
  return /* @__PURE__ */ a(
1037
1048
  q,
1038
1049
  {
@@ -1044,40 +1055,40 @@ const Pt = ({
1044
1055
  children: o
1045
1056
  }
1046
1057
  );
1047
- }, Dt = ({
1058
+ }, Nt = ({
1048
1059
  letters: e,
1049
1060
  ariaLabel: t,
1050
1061
  className: o
1051
1062
  }) => {
1052
1063
  const { locale: n } = W(), r = t ?? C("toolbarItem.selectText", n);
1053
1064
  return /* @__PURE__ */ a(
1054
- ht,
1065
+ wt,
1055
1066
  {
1056
- command: ee,
1067
+ command: ne,
1057
1068
  ariaLabel: r,
1058
1069
  className: `flipbook-toolbar-mouse-mode ${o ?? ""}`.trim(),
1059
- children: /* @__PURE__ */ E("span", { className: "flipbook-toolbar-mouse-mode-icon", "aria-hidden": "true", children: [
1070
+ children: /* @__PURE__ */ L("span", { className: "flipbook-toolbar-mouse-mode-icon", "aria-hidden": "true", children: [
1060
1071
  /* @__PURE__ */ a("span", { className: "flipbook-toolbar-mouse-mode-caret" }),
1061
1072
  /* @__PURE__ */ a("span", { children: e ?? C("toolbarItem.selectionLetters", n) })
1062
1073
  ] })
1063
1074
  }
1064
1075
  );
1065
- }, Et = ({ children: e, className: t }) => {
1066
- const { locale: o } = W(), { execute: n, canExecute: r } = Q(), s = () => {
1067
- n(ne);
1068
- }, i = C("command.jumpToNextPage", o), c = /* @__PURE__ */ a(nt, { size: 20 });
1076
+ }, Ft = ({ children: e, className: t }) => {
1077
+ const { locale: o } = W(), { execute: n, canExecute: r } = X(), s = () => {
1078
+ n(le);
1079
+ }, i = C("command.jumpToNextPage", o), c = /* @__PURE__ */ a(lt, { size: 20 });
1069
1080
  return /* @__PURE__ */ a(
1070
1081
  q,
1071
1082
  {
1072
1083
  onClick: s,
1073
1084
  ariaLabel: i,
1074
1085
  title: i,
1075
- disabled: !r(ne),
1086
+ disabled: !r(le),
1076
1087
  className: `flipbook-toolbar-next ${t ?? ""}`.trim(),
1077
1088
  children: e ?? c
1078
1089
  }
1079
1090
  );
1080
- }, Lt = ({
1091
+ }, Mt = ({
1081
1092
  mode: e,
1082
1093
  showTotal: t = !0,
1083
1094
  placeholder: o = "—",
@@ -1086,58 +1097,58 @@ const Pt = ({
1086
1097
  ariaLabel: s = "Go to page",
1087
1098
  maxLength: i = 10
1088
1099
  }) => {
1089
- const { flipBookRef: c, pageSemantics: m, direction: x, currentPage: g, totalPages: h, of: N } = W(), T = e ?? (m ? "semantic" : "index"), j = n ?? (T === "semantic" && !!m), [B, P] = F(""), [S, d] = F(!1), u = J(!1), M = J(g), I = g, A = g + 1 < h ? g + 1 : null, p = L(
1090
- (f) => T === "semantic" && m ? m.indexToSemanticName(f) || "" : String(f + 1),
1091
- [T, m]
1092
- ), D = p(I), $ = A != null ? p(A) : "", K = L(() => String(N), [N]), H = L(() => {
1093
- const f = D, v = $;
1094
- let w;
1095
- return !f && !v ? w = o : f ? v ? f === v ? w = f : w = `${f} - ${v}` : w = f : w = v, t ? `${w} / ${K()}` : w;
1096
- }, [D, $, o, t, K]), O = x === "rtl" ? $ || D : D || $, k = H();
1100
+ const { flipBookRef: c, pageSemantics: g, direction: w, currentPage: f, totalPages: p, of: N } = W(), E = e ?? (g ? "semantic" : "index"), M = n ?? (E === "semantic" && !!g), [j, v] = D(""), [B, d] = D(!1), m = Q(!1), y = Q(f), $ = f, O = f + 1 < p ? f + 1 : null, b = I(
1101
+ (l) => E === "semantic" && g ? g.indexToSemanticName(l) || "" : String(l + 1),
1102
+ [E, g]
1103
+ ), F = b($), k = O != null ? b(O) : "", S = I(() => String(N), [N]), K = I(() => {
1104
+ const l = F, u = k;
1105
+ let h;
1106
+ return !l && !u ? h = o : l ? u ? l === u ? h = l : h = `${l} - ${u}` : h = l : h = u, t ? `${h} / ${S()}` : h;
1107
+ }, [F, k, o, t, S]), V = w === "rtl" ? k || F : F || k, P = K();
1097
1108
  U(() => {
1098
- const f = g !== M.current;
1099
- M.current = g, f && (u.current = !1), !S && !u.current && P(k);
1100
- }, [k, S, g]);
1101
- const G = L(
1102
- (f) => {
1103
- if (j) {
1104
- d(!0), P(O), u.current = !1;
1105
- const v = () => f.target.select();
1106
- typeof requestAnimationFrame < "u" ? requestAnimationFrame(v) : v();
1109
+ const l = f !== y.current;
1110
+ y.current = f, l && (m.current = !1), !B && !m.current && v(P);
1111
+ }, [P, B, f]);
1112
+ const Y = I(
1113
+ (l) => {
1114
+ if (M) {
1115
+ d(!0), v(V), m.current = !1;
1116
+ const u = () => l.target.select();
1117
+ typeof requestAnimationFrame < "u" ? requestAnimationFrame(u) : u();
1107
1118
  }
1108
1119
  },
1109
- [j, O]
1110
- ), _ = L(() => {
1111
- d(!1), u.current || P(k);
1112
- }, [k]), l = L(
1113
- (f) => {
1114
- if (f.key === "Enter") {
1115
- if (m && B.trim()) {
1116
- const v = m.semanticNameToIndex(B.trim());
1117
- v != null && v >= 0 && v < h && (c.current?.jumpToPage(v), u.current = !0);
1120
+ [M, V]
1121
+ ), H = I(() => {
1122
+ d(!1), m.current || v(P);
1123
+ }, [P]), x = I(
1124
+ (l) => {
1125
+ if (l.key === "Enter") {
1126
+ if (g && j.trim()) {
1127
+ const u = g.semanticNameToIndex(j.trim());
1128
+ u != null && u >= 0 && u < p && (c.current?.jumpToPage(u), m.current = !0);
1118
1129
  }
1119
- f.currentTarget.blur();
1120
- } else f.key === "Escape" && f.currentTarget.blur();
1130
+ l.currentTarget.blur();
1131
+ } else l.key === "Escape" && l.currentTarget.blur();
1121
1132
  },
1122
- [B, m, h, c]
1123
- ), b = L((f) => {
1124
- P(f.target.value);
1133
+ [j, g, p, c]
1134
+ ), A = I((l) => {
1135
+ v(l.target.value);
1125
1136
  }, []);
1126
- return j ? /* @__PURE__ */ a(
1137
+ return M ? /* @__PURE__ */ a(
1127
1138
  "input",
1128
1139
  {
1129
1140
  type: "text",
1130
- className: `flipbook-toolbar-indicator ${S ? "flipbook-toolbar-indicator--editing" : ""} ${r ?? ""}`.trim(),
1131
- value: B,
1132
- onFocus: G,
1133
- onBlur: _,
1134
- onKeyDown: l,
1135
- onChange: b,
1141
+ className: `flipbook-toolbar-indicator ${B ? "flipbook-toolbar-indicator--editing" : ""} ${r ?? ""}`.trim(),
1142
+ value: j,
1143
+ onFocus: Y,
1144
+ onBlur: H,
1145
+ onKeyDown: x,
1146
+ onChange: A,
1136
1147
  "aria-label": s,
1137
1148
  "aria-live": "polite",
1138
1149
  "aria-atomic": "true",
1139
1150
  maxLength: i,
1140
- readOnly: !j
1151
+ readOnly: !M
1141
1152
  }
1142
1153
  ) : /* @__PURE__ */ a(
1143
1154
  "span",
@@ -1145,39 +1156,39 @@ const Pt = ({
1145
1156
  className: `flipbook-toolbar-indicator ${r ?? ""}`.trim(),
1146
1157
  "aria-live": "polite",
1147
1158
  "aria-atomic": "true",
1148
- children: k
1159
+ children: P
1149
1160
  }
1150
1161
  );
1151
- }, Ft = ({ children: e, className: t }) => {
1152
- const { locale: o } = W(), { execute: n, canExecute: r } = Q(), s = () => {
1153
- n(re);
1154
- }, i = C("command.jumpToPrevPage", o), c = /* @__PURE__ */ a(ot, { size: 20 });
1162
+ }, jt = ({ children: e, className: t }) => {
1163
+ const { locale: o } = W(), { execute: n, canExecute: r } = X(), s = () => {
1164
+ n(se);
1165
+ }, i = C("command.jumpToPrevPage", o), c = /* @__PURE__ */ a(at, { size: 20 });
1155
1166
  return /* @__PURE__ */ a(
1156
1167
  q,
1157
1168
  {
1158
1169
  onClick: s,
1159
1170
  ariaLabel: i,
1160
1171
  title: i,
1161
- disabled: !r(re),
1172
+ disabled: !r(se),
1162
1173
  className: `flipbook-toolbar-prev ${t ?? ""}`.trim(),
1163
1174
  children: e ?? c
1164
1175
  }
1165
1176
  );
1166
- }, Nt = ({ children: e, ariaLabel: t, className: o }) => {
1167
- const { locale: n } = W(), { execute: r, canExecute: s } = Q(), i = t ?? C("command.jumpToToc", n), c = () => {
1168
- r(se);
1169
- }, m = !s(se);
1177
+ }, Bt = ({ children: e, ariaLabel: t, className: o }) => {
1178
+ const { locale: n } = W(), { execute: r, canExecute: s } = X(), i = t ?? C("command.jumpToToc", n), c = () => {
1179
+ r(de);
1180
+ }, g = !s(de);
1170
1181
  return /* @__PURE__ */ a(
1171
1182
  q,
1172
1183
  {
1173
1184
  onClick: c,
1174
1185
  ariaLabel: i,
1175
- disabled: m,
1186
+ disabled: g,
1176
1187
  className: `flipbook-toolbar-toc ${o ?? ""}`.trim(),
1177
- children: e ?? /* @__PURE__ */ a(it, { size: 18 })
1188
+ children: e ?? /* @__PURE__ */ a(ut, { size: 18 })
1178
1189
  }
1179
1190
  );
1180
- }, pt = {
1191
+ }, xt = {
1181
1192
  id: "openDownloadMenu",
1182
1193
  enName: "Open download menu",
1183
1194
  enDescription: "Open the download menu",
@@ -1187,7 +1198,7 @@ const Pt = ({
1187
1198
  e.data?.open?.();
1188
1199
  },
1189
1200
  canExecute: (e) => typeof e.data?.open == "function"
1190
- }, Mt = ({
1201
+ }, St = ({
1191
1202
  flipBookRef: e,
1192
1203
  direction: t,
1193
1204
  locale: o,
@@ -1196,14 +1207,14 @@ const Pt = ({
1196
1207
  children: s,
1197
1208
  enableHotkeys: i = !0,
1198
1209
  commands: c,
1199
- commandOptions: m,
1200
- fullscreenTargetRef: x
1210
+ commandOptions: g,
1211
+ fullscreenTargetRef: w
1201
1212
  }) => {
1202
- const g = t ?? gt(o ?? me), h = o ?? (g === "rtl" ? "he-IL" : "en-US"), N = J(null), T = J(null), [j, B] = F(0), [P, S] = F(0), [d, u] = F(0), [M, I] = F(!0), [A, p] = F(!1), [D, $] = F("turn"), K = {
1203
- ...x ? {
1213
+ const f = t ?? pt(o ?? he), p = o ?? (f === "rtl" ? "he-IL" : "en-US"), N = Q(null), E = Q(null), [M, j] = D(0), [v, B] = D(0), [d, m] = D(0), [y, $] = D(!0), [O, b] = D(!1), [F, k] = D("turn"), S = {
1214
+ ...w ? {
1204
1215
  toggleFullscreen: {
1205
1216
  data: {
1206
- getFullscreenTarget: () => x.current ?? null
1217
+ getFullscreenTarget: () => w.current ?? null
1207
1218
  }
1208
1219
  }
1209
1220
  } : {},
@@ -1212,112 +1223,112 @@ const Pt = ({
1212
1223
  },
1213
1224
  download: {
1214
1225
  data: {
1215
- onDownload: (l, b) => T.current?.(l, b)
1226
+ onDownload: (x, A) => E.current?.(x, A)
1216
1227
  }
1217
1228
  }
1218
- }, H = new Map(Object.entries(m ?? {}));
1219
- for (const [l, b] of Object.entries(K)) {
1220
- const y = H.get(l);
1221
- H.set(
1222
- l,
1223
- y ? { ...b, ...y, data: { ...b.data, ...y.data } } : b
1229
+ }, K = new Map(Object.entries(g ?? {}));
1230
+ for (const [x, A] of Object.entries(S)) {
1231
+ const J = K.get(x);
1232
+ K.set(
1233
+ x,
1234
+ J ? { ...A, ...J, data: { ...A.data, ...J.data } } : A
1224
1235
  );
1225
1236
  }
1226
- const O = Object.fromEntries(H), k = L(() => {
1227
- const l = e.current;
1228
- l && (B(l.getCurrentPageIndex()), S(l.getTotalPages()), u(l.getOf()), I(l.isFirstPage()), p(l.isLastPage()), $(l.getMouseMode?.() ?? "turn"));
1237
+ const V = Object.fromEntries(K), P = I(() => {
1238
+ const x = e.current;
1239
+ x && (j(x.getCurrentPageIndex()), B(x.getTotalPages()), m(x.getOf()), $(x.isFirstPage()), b(x.isLastPage()), k(x.getMouseMode?.() ?? "turn"));
1229
1240
  }, [e]);
1230
1241
  U(() => {
1231
- k();
1232
- const l = setInterval(k, 200);
1233
- return () => clearInterval(l);
1234
- }, [k]);
1235
- const G = /* @__PURE__ */ a(
1236
- De.Provider,
1242
+ P();
1243
+ const x = setInterval(P, 200);
1244
+ return () => clearInterval(x);
1245
+ }, [P]);
1246
+ const Y = /* @__PURE__ */ a(
1247
+ Ne.Provider,
1237
1248
  {
1238
1249
  value: {
1239
1250
  flipBookRef: e,
1240
- direction: g,
1241
- locale: h,
1251
+ direction: f,
1252
+ locale: p,
1242
1253
  pageSemantics: n,
1243
- currentPage: j,
1244
- totalPages: P,
1254
+ currentPage: M,
1255
+ totalPages: v,
1245
1256
  of: d,
1246
- isFirstPage: M,
1247
- isLastPage: A,
1248
- mouseMode: D,
1257
+ isFirstPage: y,
1258
+ isLastPage: O,
1259
+ mouseMode: F,
1249
1260
  openDownloadMenuRef: N,
1250
- downloadExecutorRef: T,
1251
- fullscreenTargetRef: x
1261
+ downloadExecutorRef: E,
1262
+ fullscreenTargetRef: w
1252
1263
  },
1253
1264
  children: /* @__PURE__ */ a(
1254
1265
  "div",
1255
1266
  {
1256
- className: `flipbook-toolbar ${g === "rtl" ? "flipbook-toolbar--rtl" : ""} ${r}`.trim(),
1267
+ className: `flipbook-toolbar ${f === "rtl" ? "flipbook-toolbar--rtl" : ""} ${r}`.trim(),
1257
1268
  role: "toolbar",
1258
1269
  "aria-label": "FlipBook navigation",
1259
- dir: g,
1270
+ dir: f,
1260
1271
  children: s
1261
1272
  }
1262
1273
  )
1263
1274
  }
1264
- ), _ = [pt, ...c ?? []];
1275
+ ), H = [xt, ...c ?? []];
1265
1276
  return /* @__PURE__ */ a(
1266
- et,
1277
+ nt,
1267
1278
  {
1268
1279
  flipBookRef: e,
1269
- currentPage: j,
1270
- totalPages: P,
1271
- direction: g,
1272
- commands: _,
1273
- commandOptions: O,
1280
+ currentPage: M,
1281
+ totalPages: v,
1282
+ direction: f,
1283
+ commands: H,
1284
+ commandOptions: V,
1274
1285
  disableHotkeys: !i,
1275
- children: G
1286
+ children: Y
1276
1287
  }
1277
1288
  );
1278
1289
  };
1279
1290
  export {
1280
- vt as ActionButton,
1281
- yt as BookmarkToggleButton,
1282
- kt as BookshelfIcon,
1283
- rt as ChevronFirstIcon,
1284
- at as ChevronLastIcon,
1285
- ot as ChevronLeftIcon,
1286
- nt as ChevronRightIcon,
1287
- Pt as DownloadDropdown,
1288
- ct as DownloadIcon,
1289
- Ct as FirstPageButton,
1290
- Tt as FullscreenButton,
1291
- It as LastPageButton,
1292
- lt as MaximizeIcon,
1293
- st as MinimizeIcon,
1294
- Dt as MouseModeButton,
1295
- Et as NextButton,
1296
- Lt as PageIndicator,
1297
- Ft as PrevButton,
1298
- Lt as SemanticPageIndicator,
1299
- it as TableOfContentsIcon,
1300
- Nt as TocButton,
1301
- ht as ToggleButton,
1302
- Mt as Toolbar,
1291
+ Ct as ActionButton,
1292
+ Tt as BookmarkToggleButton,
1293
+ Pt as BookshelfIcon,
1294
+ st as ChevronFirstIcon,
1295
+ it as ChevronLastIcon,
1296
+ at as ChevronLeftIcon,
1297
+ lt as ChevronRightIcon,
1298
+ It as DownloadDropdown,
1299
+ mt as DownloadIcon,
1300
+ Dt as FirstPageButton,
1301
+ Et as FullscreenButton,
1302
+ Lt as LastPageButton,
1303
+ ct as MaximizeIcon,
1304
+ dt as MinimizeIcon,
1305
+ Nt as MouseModeButton,
1306
+ Ft as NextButton,
1307
+ Mt as PageIndicator,
1308
+ jt as PrevButton,
1309
+ Mt as SemanticPageIndicator,
1310
+ ut as TableOfContentsIcon,
1311
+ Bt as TocButton,
1312
+ wt as ToggleButton,
1313
+ St as Toolbar,
1303
1314
  q as ToolbarButton,
1304
- ce as canUseFullscreen,
1305
- xt as createDefaultDownloadConfig,
1306
- qe as defaultCommands,
1307
- je as downloadCommand,
1308
- Ue as exitFullscreen,
1309
- ne as flipNextCommand,
1310
- re as flipPrevCommand,
1311
- pe as fullscreenStateEvents,
1312
- ie as getFullscreenElement,
1313
- ae as goToFirstCommand,
1314
- le as goToLastCommand,
1315
- se as goToTocCommand,
1316
- Oe as requestFullscreen,
1317
- He as toggleDebugCommand,
1318
- Y as toggleFullscreenCommand,
1319
- ee as toggleTextSelectionCommand,
1320
- Q as useCommands,
1315
+ me as canUseFullscreen,
1316
+ yt as createDefaultDownloadConfig,
1317
+ Je as defaultCommands,
1318
+ $e as downloadCommand,
1319
+ We as exitFullscreen,
1320
+ le as flipNextCommand,
1321
+ se as flipPrevCommand,
1322
+ xe as fullscreenStateEvents,
1323
+ ue as getFullscreenElement,
1324
+ ie as goToFirstCommand,
1325
+ ce as goToLastCommand,
1326
+ de as goToTocCommand,
1327
+ qe as requestFullscreen,
1328
+ ze as toggleDebugCommand,
1329
+ te as toggleFullscreenCommand,
1330
+ ne as toggleTextSelectionCommand,
1331
+ X as useCommands,
1321
1332
  W as useToolbar
1322
1333
  };
1323
1334
  //# sourceMappingURL=index.js.map