@readium/navigator 2.5.0-beta.2 → 2.5.0-beta.3
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/{ReadiumCSS-after-C-T_0paD.js → ReadiumCSS-after-AX2xHXM6.js} +3 -3
- package/dist/{ReadiumCSS-after-lr-n3fz2.js → ReadiumCSS-after-DIfxADJu.js} +4 -4
- package/dist/{ReadiumCSS-after-B_e3a-PY.js → ReadiumCSS-after-Djsq77vV.js} +10 -10
- package/dist/{ReadiumCSS-after-mXeKKPap.js → ReadiumCSS-after-DwG-6hYO.js} +4 -4
- package/dist/{ReadiumCSS-before-CfXPAGaQ.js → ReadiumCSS-before-B8zaPxhu.js} +1 -1
- package/dist/{ReadiumCSS-before-KVen5ceo.js → ReadiumCSS-before-BA9Irzag.js} +1 -1
- package/dist/{ReadiumCSS-before-CrNWvuyE.js → ReadiumCSS-before-Cz5-ynli.js} +1 -1
- package/dist/{ReadiumCSS-before-Bjd3POej.js → ReadiumCSS-before-DKjdmFso.js} +1 -1
- package/dist/{ReadiumCSS-default-C63bYOYF.js → ReadiumCSS-default-BGrBd7Sk.js} +1 -1
- package/dist/{ReadiumCSS-default-BKAG5pGU.js → ReadiumCSS-default-CcWmjgaR.js} +1 -1
- package/dist/{ReadiumCSS-default-DnlgDaBu.js → ReadiumCSS-default-DsgDIxGa.js} +1 -1
- package/dist/{ReadiumCSS-default-CclvbeNC.js → ReadiumCSS-default-DzJEDDcb.js} +1 -1
- package/dist/index.js +75 -71
- package/dist/index.umd.cjs +58 -58
- package/package.json +2 -2
- package/src/epub/EpubNavigator.ts +1 -1
- package/src/epub/css/ReadiumCSS.ts +12 -3
- package/src/epub/frame/FrameBlobBuilder.ts +1 -1
- package/src/epub/index.ts +0 -1
- package/src/helpers/dimensions.ts +7 -0
- package/src/helpers/index.ts +1 -0
- package/src/injection/epubInjectables.ts +1 -1
- package/src/webpub/WebPubNavigator.ts +1 -1
- package/types/src/epub/css/ReadiumCSS.d.ts +1 -0
- package/types/src/epub/index.d.ts +0 -1
- package/types/src/helpers/dimensions.d.ts +1 -0
- package/types/src/helpers/index.d.ts +1 -0
- /package/src/{epub/helpers → helpers}/scriptMode.ts +0 -0
- /package/types/src/{epub/helpers → helpers}/scriptMode.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -295,7 +295,7 @@ body{
|
|
|
295
295
|
:root[style*="--USER__lineHeight"] p,
|
|
296
296
|
:root[style*="--USER__lineHeight"] li,
|
|
297
297
|
:root[style*="--USER__lineHeight"] div{
|
|
298
|
-
line-height:
|
|
298
|
+
line-height:var(--USER__lineHeight) !important;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
:root[style*="--USER__paraSpacing"] p{
|
|
@@ -330,7 +330,7 @@ body{
|
|
|
330
330
|
:root[style*="--USER__wordSpacing"] div,
|
|
331
331
|
:root[style*="--USER__wordSpacing"] dt,
|
|
332
332
|
:root[style*="--USER__wordSpacing"] dd{
|
|
333
|
-
word-spacing:var(--USER__wordSpacing);
|
|
333
|
+
word-spacing:var(--USER__wordSpacing) !important;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
:root[style*="--USER__ligatures"]{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -258,7 +258,7 @@ body{
|
|
|
258
258
|
:root[style*="--USER__lineHeight"] p,
|
|
259
259
|
:root[style*="--USER__lineHeight"] li,
|
|
260
260
|
:root[style*="--USER__lineHeight"] div{
|
|
261
|
-
line-height:
|
|
261
|
+
line-height:var(--USER__lineHeight) !important;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
:root[style*="--USER__paraSpacing"] p{
|
|
@@ -294,8 +294,8 @@ body{
|
|
|
294
294
|
:root[style*="--USER__letterSpacing"] div,
|
|
295
295
|
:root[style*="--USER__letterSpacing"] dt,
|
|
296
296
|
:root[style*="--USER__letterSpacing"] dd{
|
|
297
|
-
letter-spacing:var(--USER__letterSpacing);
|
|
298
|
-
font-variant:none;
|
|
297
|
+
letter-spacing:var(--USER__letterSpacing) !important;
|
|
298
|
+
font-variant:none !important;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
:root[style*="readium-noRuby-on"] body rt,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -247,11 +247,11 @@ body{
|
|
|
247
247
|
:root[style*="--USER__bodyHyphens"] li,
|
|
248
248
|
:root[style*="--USER__bodyHyphens"] div,
|
|
249
249
|
:root[style*="--USER__bodyHyphens"] dd{
|
|
250
|
-
-webkit-hyphens:
|
|
251
|
-
-moz-hyphens:
|
|
252
|
-
-ms-hyphens:
|
|
253
|
-
-epub-hyphens:
|
|
254
|
-
hyphens:
|
|
250
|
+
-webkit-hyphens:var(--USER__bodyHyphens) !important;
|
|
251
|
+
-moz-hyphens:var(--USER__bodyHyphens) !important;
|
|
252
|
+
-ms-hyphens:var(--USER__bodyHyphens) !important;
|
|
253
|
+
-epub-hyphens:var(--USER__bodyHyphens) !important;
|
|
254
|
+
hyphens:var(--USER__bodyHyphens) !important;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
:root[style*="--USER__fontFamily"]{
|
|
@@ -342,7 +342,7 @@ body{
|
|
|
342
342
|
:root[style*="--USER__lineHeight"] p,
|
|
343
343
|
:root[style*="--USER__lineHeight"] li,
|
|
344
344
|
:root[style*="--USER__lineHeight"] div{
|
|
345
|
-
line-height:
|
|
345
|
+
line-height:var(--USER__lineHeight) !important;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
:root[style*="--USER__paraSpacing"] p{
|
|
@@ -377,7 +377,7 @@ body{
|
|
|
377
377
|
:root[style*="--USER__wordSpacing"] div,
|
|
378
378
|
:root[style*="--USER__wordSpacing"] dt,
|
|
379
379
|
:root[style*="--USER__wordSpacing"] dd{
|
|
380
|
-
word-spacing:var(--USER__wordSpacing);
|
|
380
|
+
word-spacing:var(--USER__wordSpacing) !important;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
:root[style*="--USER__letterSpacing"] h1,
|
|
@@ -391,8 +391,8 @@ body{
|
|
|
391
391
|
:root[style*="--USER__letterSpacing"] div,
|
|
392
392
|
:root[style*="--USER__letterSpacing"] dt,
|
|
393
393
|
:root[style*="--USER__letterSpacing"] dd{
|
|
394
|
-
letter-spacing:var(--USER__letterSpacing);
|
|
395
|
-
font-variant:none;
|
|
394
|
+
letter-spacing:var(--USER__letterSpacing) !important;
|
|
395
|
+
font-variant:none !important;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
:root[style*="--USER__ligatures"]{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const t = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -273,7 +273,7 @@ body{
|
|
|
273
273
|
:root[style*="--USER__lineHeight"] p,
|
|
274
274
|
:root[style*="--USER__lineHeight"] li,
|
|
275
275
|
:root[style*="--USER__lineHeight"] div{
|
|
276
|
-
line-height:
|
|
276
|
+
line-height:var(--USER__lineHeight) !important;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
:root[style*="--USER__paraSpacing"] p{
|
|
@@ -309,8 +309,8 @@ body{
|
|
|
309
309
|
:root[style*="--USER__letterSpacing"] div,
|
|
310
310
|
:root[style*="--USER__letterSpacing"] dt,
|
|
311
311
|
:root[style*="--USER__letterSpacing"] dd{
|
|
312
|
-
letter-spacing:var(--USER__letterSpacing);
|
|
313
|
-
font-variant:none;
|
|
312
|
+
letter-spacing:var(--USER__letterSpacing) !important;
|
|
313
|
+
font-variant:none !important;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
:root[style*="readium-noRuby-on"] body rt,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const n = `/*!
|
|
2
|
-
* Readium CSS v.2.0.
|
|
2
|
+
* Readium CSS v.2.0.2
|
|
3
3
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
4
4
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5
5
|
* LICENSE file present in the project repository where this source code is maintained.
|
package/dist/index.js
CHANGED
|
@@ -3641,7 +3641,7 @@ const At = class At extends Et {
|
|
|
3641
3641
|
), Reflect.defineProperty(t.navigator, "epubReadingSystem", {
|
|
3642
3642
|
value: {
|
|
3643
3643
|
name: "readium-ts-toolkit",
|
|
3644
|
-
version: "2.5.0-beta.
|
|
3644
|
+
version: "2.5.0-beta.3",
|
|
3645
3645
|
hasFeature: (n, s = "") => {
|
|
3646
3646
|
switch (n) {
|
|
3647
3647
|
case "dom-manipulation":
|
|
@@ -4408,6 +4408,16 @@ class Es extends un {
|
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
const J = new un(), T = new Es();
|
|
4411
|
+
function bt(r) {
|
|
4412
|
+
const t = r.languages?.[0]?.toLowerCase(), e = r.readingProgression;
|
|
4413
|
+
if (t) {
|
|
4414
|
+
if (t.startsWith("zh") || t.startsWith("ja") || t.startsWith("ko"))
|
|
4415
|
+
return e === N.rtl ? "cjk-vertical" : "cjk-horizontal";
|
|
4416
|
+
if (t.startsWith("mn-mong")) return "mongolian-vertical";
|
|
4417
|
+
if (t.startsWith("ar") || t.startsWith("fa") || t.startsWith("he")) return "rtl";
|
|
4418
|
+
}
|
|
4419
|
+
return "ltr";
|
|
4420
|
+
}
|
|
4411
4421
|
class _s {
|
|
4412
4422
|
constructor(t, e = {}, i = []) {
|
|
4413
4423
|
this.hidden = !0, this.destroyed = !1, this.currModules = [], this.frame = document.createElement("iframe"), this.frame.classList.add("readium-navigator-iframe"), this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.opacity = "0", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transition = "visibility 0s, opacity 0.1s linear", this.frame.style.backgroundColor = "#FFFFFF", this.source = t, this.contentProtectionConfig = { ...e }, this.keyboardPeripheralsConfig = [...i];
|
|
@@ -4804,16 +4814,6 @@ function Ls() {
|
|
|
4804
4814
|
return i.posix = i, me = i, me;
|
|
4805
4815
|
}
|
|
4806
4816
|
var Gt = Ls();
|
|
4807
|
-
function bt(r) {
|
|
4808
|
-
const t = r.languages?.[0]?.toLowerCase(), e = r.readingProgression;
|
|
4809
|
-
if (t) {
|
|
4810
|
-
if (t.startsWith("zh") || t.startsWith("ja") || t.startsWith("ko"))
|
|
4811
|
-
return e === N.rtl ? "cjk-vertical" : "cjk-horizontal";
|
|
4812
|
-
if (t.startsWith("mn-mong")) return "mongolian-vertical";
|
|
4813
|
-
if (t.startsWith("ar") || t.startsWith("fa") || t.startsWith("he")) return "rtl";
|
|
4814
|
-
}
|
|
4815
|
-
return "ltr";
|
|
4816
|
-
}
|
|
4817
4817
|
const xs = { description: "Attempts to filter out paragraphs that are implicitly headings or part of headers", scope: "RS", value: "readium-experimentalHeaderFiltering-on" }, Os = { description: "Attemps to filter out elements that are sized using viewport units and should not be scaled directly e.g. tables, images, iframes, etc.", scope: "RS", value: "readium-experimentalZoom-on" }, ks = {
|
|
4818
4818
|
experimentalHeaderFiltering: xs,
|
|
4819
4819
|
experimentalZoom: Os
|
|
@@ -5484,7 +5484,7 @@ class bn {
|
|
|
5484
5484
|
}
|
|
5485
5485
|
}
|
|
5486
5486
|
const vt = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), Ct = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " "), Is = `/*!
|
|
5487
|
-
* Readium CSS v.2.0.
|
|
5487
|
+
* Readium CSS v.2.0.2
|
|
5488
5488
|
* Copyright (c) 2017–2026. Readium Foundation. All rights reserved.
|
|
5489
5489
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5490
5490
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -5533,11 +5533,11 @@ const vt = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").repl
|
|
|
5533
5533
|
:root[style*="--USER__bodyHyphens"] li,
|
|
5534
5534
|
:root[style*="--USER__bodyHyphens"] div,
|
|
5535
5535
|
:root[style*="--USER__bodyHyphens"] dd{
|
|
5536
|
-
-webkit-hyphens:
|
|
5537
|
-
-moz-hyphens:
|
|
5538
|
-
-ms-hyphens:
|
|
5539
|
-
-epub-hyphens:
|
|
5540
|
-
hyphens:
|
|
5536
|
+
-webkit-hyphens:var(--USER__bodyHyphens) !important;
|
|
5537
|
+
-moz-hyphens:var(--USER__bodyHyphens) !important;
|
|
5538
|
+
-ms-hyphens:var(--USER__bodyHyphens) !important;
|
|
5539
|
+
-epub-hyphens:var(--USER__bodyHyphens) !important;
|
|
5540
|
+
hyphens:var(--USER__bodyHyphens) !important;
|
|
5541
5541
|
}
|
|
5542
5542
|
|
|
5543
5543
|
:root[style*="--USER__fontFamily"]{
|
|
@@ -5617,7 +5617,7 @@ const vt = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").repl
|
|
|
5617
5617
|
:root[style*="--USER__lineHeight"] p,
|
|
5618
5618
|
:root[style*="--USER__lineHeight"] li,
|
|
5619
5619
|
:root[style*="--USER__lineHeight"] div{
|
|
5620
|
-
line-height:
|
|
5620
|
+
line-height:var(--USER__lineHeight) !important;
|
|
5621
5621
|
}
|
|
5622
5622
|
|
|
5623
5623
|
:root[style*="--USER__paraSpacing"] p{
|
|
@@ -5652,7 +5652,7 @@ const vt = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").repl
|
|
|
5652
5652
|
:root[style*="--USER__wordSpacing"] div,
|
|
5653
5653
|
:root[style*="--USER__wordSpacing"] dt,
|
|
5654
5654
|
:root[style*="--USER__wordSpacing"] dd{
|
|
5655
|
-
word-spacing:var(--USER__wordSpacing);
|
|
5655
|
+
word-spacing:var(--USER__wordSpacing) !important;
|
|
5656
5656
|
}
|
|
5657
5657
|
|
|
5658
5658
|
:root[style*="--USER__letterSpacing"] h1,
|
|
@@ -5666,8 +5666,8 @@ const vt = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").repl
|
|
|
5666
5666
|
:root[style*="--USER__letterSpacing"] div,
|
|
5667
5667
|
:root[style*="--USER__letterSpacing"] dt,
|
|
5668
5668
|
:root[style*="--USER__letterSpacing"] dd{
|
|
5669
|
-
letter-spacing:var(--USER__letterSpacing);
|
|
5670
|
-
font-variant:none;
|
|
5669
|
+
letter-spacing:var(--USER__letterSpacing) !important;
|
|
5670
|
+
font-variant:none !important;
|
|
5671
5671
|
}
|
|
5672
5672
|
|
|
5673
5673
|
:root[style*="--USER__fontWeight"] body{
|
|
@@ -6546,7 +6546,7 @@ class Js extends hn {
|
|
|
6546
6546
|
});
|
|
6547
6547
|
}
|
|
6548
6548
|
}
|
|
6549
|
-
const
|
|
6549
|
+
const Nr = Js, Zs = (r) => {
|
|
6550
6550
|
const t = r.join(" ");
|
|
6551
6551
|
return [
|
|
6552
6552
|
// 'self' is useless because the document is loaded from a blob: URL
|
|
@@ -8162,6 +8162,10 @@ function Lt(r) {
|
|
|
8162
8162
|
const t = getComputedStyle(r), e = parseFloat(t.paddingLeft || "0"), i = parseFloat(t.paddingRight || "0");
|
|
8163
8163
|
return r.clientWidth - e - i;
|
|
8164
8164
|
}
|
|
8165
|
+
function vr(r) {
|
|
8166
|
+
const t = getComputedStyle(r), e = parseFloat(t.paddingTop || "0"), i = parseFloat(t.paddingBottom || "0");
|
|
8167
|
+
return r.clientHeight - e - i;
|
|
8168
|
+
}
|
|
8165
8169
|
class En extends le {
|
|
8166
8170
|
constructor(t) {
|
|
8167
8171
|
super(), this.a11yNormalize = t.a11yNormalize ?? null, this.backgroundColor = t.backgroundColor ?? null, this.blendFilter = t.blendFilter ?? null, this.bodyHyphens = t.bodyHyphens ?? null, this.colCount = t.colCount ?? null, this.darkenFilter = t.darkenFilter ?? null, this.deprecatedFontSize = t.deprecatedFontSize ?? null, this.fontFamily = t.fontFamily ?? null, this.fontOpticalSizing = t.fontOpticalSizing ?? null, this.fontSize = t.fontSize ?? null, this.fontSizeNormalize = t.fontSizeNormalize ?? null, this.fontWeight = t.fontWeight ?? null, this.fontWidth = t.fontWidth ?? null, this.invertFilter = t.invertFilter ?? null, this.invertGaijiFilter = t.invertGaijiFilter ?? null, this.iOSPatch = t.iOSPatch ?? null, this.iPadOSPatch = t.iPadOSPatch ?? null, this.letterSpacing = t.letterSpacing ?? null, this.ligatures = t.ligatures ?? null, this.lineHeight = t.lineHeight ?? null, this.lineLength = t.lineLength ?? null, this.linkColor = t.linkColor ?? null, this.noRuby = t.noRuby ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.selectionBackgroundColor = t.selectionBackgroundColor ?? null, this.selectionTextColor = t.selectionTextColor ?? null, this.textAlign = t.textAlign ?? null, this.textColor = t.textColor ?? null, this.view = t.view ?? null, this.visitedColor = t.visitedColor ?? null, this.wordSpacing = t.wordSpacing ?? null;
|
|
@@ -8171,7 +8175,7 @@ class En extends le {
|
|
|
8171
8175
|
return this.a11yNormalize && (t["--USER__a11yNormalize"] = this.toFlag("a11y")), this.backgroundColor && (t["--USER__backgroundColor"] = this.backgroundColor), this.blendFilter && (t["--USER__blendFilter"] = this.toFlag("blend")), this.bodyHyphens && (t["--USER__bodyHyphens"] = this.bodyHyphens), this.colCount && (t["--USER__colCount"] = this.toUnitless(this.colCount)), this.darkenFilter === !0 ? t["--USER__darkenFilter"] = this.toFlag("darken") : typeof this.darkenFilter == "number" && (t["--USER__darkenFilter"] = this.toPercentage(this.darkenFilter)), this.deprecatedFontSize && (t["--USER__fontSizeImplementation"] = this.toFlag("deprecatedFontSize")), this.fontFamily && (t["--USER__fontFamily"] = this.fontFamily), this.fontOpticalSizing != null && (t["--USER__fontOpticalSizing"] = this.fontOpticalSizing), this.fontSize != null && (t["--USER__fontSize"] = this.toPercentage(this.fontSize, !0)), this.fontSizeNormalize && (t["--USER__fontSizeNormalize"] = this.toFlag("normalize")), this.fontWeight != null && (t["--USER__fontWeight"] = this.toUnitless(this.fontWeight)), this.fontWidth != null && (t["--USER__fontWidth"] = typeof this.fontWidth == "string" ? this.fontWidth : this.toUnitless(this.fontWidth)), this.invertFilter === !0 ? t["--USER__invertFilter"] = this.toFlag("invert") : typeof this.invertFilter == "number" && (t["--USER__invertFilter"] = this.toPercentage(this.invertFilter)), this.invertGaijiFilter === !0 ? t["--USER__invertGaiji"] = this.toFlag("invertGaiji") : typeof this.invertGaijiFilter == "number" && (t["--USER__invertGaiji"] = this.toPercentage(this.invertGaijiFilter)), this.iOSPatch && (t["--USER__iOSPatch"] = this.toFlag("iOSPatch")), this.iPadOSPatch && (t["--USER__iPadOSPatch"] = this.toFlag("iPadOSPatch")), this.letterSpacing != null && (t["--USER__letterSpacing"] = this.toRem(this.letterSpacing)), this.ligatures && (t["--USER__ligatures"] = this.ligatures), this.lineHeight != null && (t["--USER__lineHeight"] = this.toUnitless(this.lineHeight)), this.lineLength != null && (t["--USER__lineLength"] = this.toPx(this.lineLength)), this.linkColor && (t["--USER__linkColor"] = this.linkColor), this.noRuby && (t["--USER__noRuby"] = this.toFlag("noRuby")), this.paraIndent != null && (t["--USER__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--USER__paraSpacing"] = this.toRem(this.paraSpacing)), this.selectionBackgroundColor && (t["--USER__selectionBackgroundColor"] = this.selectionBackgroundColor), this.selectionTextColor && (t["--USER__selectionTextColor"] = this.selectionTextColor), this.textAlign && (t["--USER__textAlign"] = this.textAlign), this.textColor && (t["--USER__textColor"] = this.textColor), this.view && (t["--USER__view"] = this.toFlag(this.view)), this.visitedColor && (t["--USER__visitedColor"] = this.visitedColor), this.wordSpacing != null && (t["--USER__wordSpacing"] = this.toRem(this.wordSpacing)), t;
|
|
8172
8176
|
}
|
|
8173
8177
|
}
|
|
8174
|
-
class
|
|
8178
|
+
class Sr extends le {
|
|
8175
8179
|
constructor(t) {
|
|
8176
8180
|
super(), this.backgroundColor = t.backgroundColor ?? null, this.baseFontFamily = t.baseFontFamily ?? null, this.baseFontSize = t.baseFontSize ?? null, this.baseLineHeight = t.baseLineHeight ?? null, this.boxSizingMedia = t.boxSizingMedia ?? null, this.boxSizingTable = t.boxSizingTable ?? null, this.colWidth = t.colWidth ?? null, this.colCount = t.colCount ?? null, this.colGap = t.colGap ?? null, this.codeFontFamily = t.codeFontFamily ?? null, this.compFontFamily = t.compFontFamily ?? null, this.defaultLineLength = t.defaultLineLength ?? null, this.flowSpacing = t.flowSpacing ?? null, this.humanistTf = t.humanistTf ?? null, this.linkColor = t.linkColor ?? null, this.maxMediaWidth = t.maxMediaWidth ?? null, this.maxMediaHeight = t.maxMediaHeight ?? null, this.modernTf = t.modernTf ?? null, this.monospaceTf = t.monospaceTf ?? null, this.noOverflow = t.noOverflow ?? null, this.noVerticalPagination = t.noVerticalPagination ?? null, this.oldStyleTf = t.oldStyleTf ?? null, this.pageGutter = t.pageGutter ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.primaryColor = t.primaryColor ?? null, this.scrollPaddingBottom = t.scrollPaddingBottom ?? null, this.scrollPaddingLeft = t.scrollPaddingLeft ?? null, this.scrollPaddingRight = t.scrollPaddingRight ?? null, this.scrollPaddingTop = t.scrollPaddingTop ?? null, this.sansSerifJa = t.sansSerifJa ?? null, this.sansSerifJaV = t.sansSerifJaV ?? null, this.sansTf = t.sansTf ?? null, this.secondaryColor = t.secondaryColor ?? null, this.selectionBackgroundColor = t.selectionBackgroundColor ?? null, this.selectionTextColor = t.selectionTextColor ?? null, this.serifJa = t.serifJa ?? null, this.serifJaV = t.serifJaV ?? null, this.textColor = t.textColor ?? null, this.typeScale = t.typeScale ?? null, this.visitedColor = t.visitedColor ?? null, this.experiments = t.experiments ?? null;
|
|
8177
8181
|
}
|
|
@@ -8182,7 +8186,7 @@ class vr extends le {
|
|
|
8182
8186
|
}), t;
|
|
8183
8187
|
}
|
|
8184
8188
|
}
|
|
8185
|
-
class
|
|
8189
|
+
class Pr {
|
|
8186
8190
|
constructor(t) {
|
|
8187
8191
|
this.rsProperties = t.rsProperties, this.userProperties = t.userProperties, this.lineLengths = t.lineLengths, this.container = t.container, this.containerParent = t.container.parentElement || document.documentElement, this.constraint = t.constraint, this.isCJKVertical = t.isCJKVertical ?? !1, this.cachedColCount = t.userProperties.colCount, this.effectiveContainerWidth = Lt(this.containerParent);
|
|
8188
8192
|
}
|
|
@@ -8235,11 +8239,7 @@ class Sr {
|
|
|
8235
8239
|
this.userProperties = new En(i);
|
|
8236
8240
|
}
|
|
8237
8241
|
updateLayout(t, e, i, n) {
|
|
8238
|
-
|
|
8239
|
-
const o = Math.round(Lt(this.containerParent) - this.constraint);
|
|
8240
|
-
return { colCount: void 0, effectiveContainerWidth: o, effectiveLineLength: o };
|
|
8241
|
-
}
|
|
8242
|
-
return i ?? this.userProperties.view === "scroll" ? this.computeScrollLength(t, e) : this.paginate(t, e, n);
|
|
8242
|
+
return this.isCJKVertical ? this.computeCJKVerticalLength(t, e) : i ?? this.userProperties.view === "scroll" ? this.computeScrollLength(t, e) : this.paginate(t, e, n);
|
|
8243
8243
|
}
|
|
8244
8244
|
getCompensatedMetrics(t, e) {
|
|
8245
8245
|
const i = t || this.userProperties.fontSize || 1, n = i < 1 ? 1 / i : e ? i : 1;
|
|
@@ -8299,6 +8299,10 @@ class Sr {
|
|
|
8299
8299
|
effectiveLineLength: Math.round(p / u / (t && t >= 1 ? t : 1) * o)
|
|
8300
8300
|
};
|
|
8301
8301
|
}
|
|
8302
|
+
computeCJKVerticalLength(t, e) {
|
|
8303
|
+
const i = Math.round(Lt(this.containerParent) - this.constraint), n = Math.round(vr(this.containerParent)), s = this.getCompensatedMetrics(t, e), o = s.maximal !== null ? Math.min(Math.round(s.maximal * s.zoomCompensation), n) : n;
|
|
8304
|
+
return { colCount: void 0, effectiveContainerWidth: i, effectiveLineLength: o };
|
|
8305
|
+
}
|
|
8302
8306
|
// This behaves as paginate where colCount = 1
|
|
8303
8307
|
computeScrollLength(t, e) {
|
|
8304
8308
|
const i = Math.round(Lt(this.containerParent) - this.constraint), n = this.getCompensatedMetrics(t && (t < 1 || e) ? t : 1, e), s = n.zoomCompensation, o = n.optimal, a = n.maximal;
|
|
@@ -8323,7 +8327,7 @@ class Sr {
|
|
|
8323
8327
|
this.userProperties.colCount = t.colCount, this.userProperties.lineLength = t.effectiveLineLength, this.effectiveContainerWidth = t.effectiveContainerWidth, this.container.style.width = `${this.effectiveContainerWidth}px`;
|
|
8324
8328
|
}
|
|
8325
8329
|
}
|
|
8326
|
-
const
|
|
8330
|
+
const Er = `// Note: we aren't blocking some of the events right now to try and be as nonintrusive as possible.
|
|
8327
8331
|
// For a more comprehensive implementation, see https://github.com/hackademix/noscript/blob/3a83c0e4a506f175e38b0342dad50cdca3eae836/src/content/syncFetchPolicy.js#L142
|
|
8328
8332
|
// The snippet of code at the beginning of this source is an attempt at defence against JS using persistent storage
|
|
8329
8333
|
(function() {
|
|
@@ -8389,7 +8393,7 @@ const Pr = `// Note: we aren't blocking some of the events right now to try and
|
|
|
8389
8393
|
window.addEventListener("load", window._readium_eventBlocker, true);
|
|
8390
8394
|
})();
|
|
8391
8395
|
`;
|
|
8392
|
-
async function
|
|
8396
|
+
async function _r(r, t) {
|
|
8393
8397
|
const e = r.effectiveLayout === b.fixed, i = t.filter((a) => a.mediaType.isHTML).map((a) => a.href), n = i.length > 0 ? i : [/\.xhtml$/, /\.html$/], s = [
|
|
8394
8398
|
// CSS Selector Generator - always injected
|
|
8395
8399
|
{
|
|
@@ -8403,7 +8407,7 @@ async function Er(r, t) {
|
|
|
8403
8407
|
id: "execution-prevention",
|
|
8404
8408
|
as: "script",
|
|
8405
8409
|
target: "head",
|
|
8406
|
-
blob: new Blob([vt(
|
|
8410
|
+
blob: new Blob([vt(Er)], { type: "text/javascript" }),
|
|
8407
8411
|
condition: (a) => !!(a.querySelector("script") || a.querySelector("body[onload]:not(body[onload=''])"))
|
|
8408
8412
|
}
|
|
8409
8413
|
], o = [
|
|
@@ -8422,18 +8426,18 @@ async function Er(r, t) {
|
|
|
8422
8426
|
switch (a) {
|
|
8423
8427
|
case "rtl": {
|
|
8424
8428
|
const [u, p, g] = await Promise.all([
|
|
8425
|
-
import("./ReadiumCSS-before-
|
|
8426
|
-
import("./ReadiumCSS-default-
|
|
8427
|
-
import("./ReadiumCSS-after-
|
|
8429
|
+
import("./ReadiumCSS-before-Cz5-ynli.js"),
|
|
8430
|
+
import("./ReadiumCSS-default-CcWmjgaR.js"),
|
|
8431
|
+
import("./ReadiumCSS-after-AX2xHXM6.js")
|
|
8428
8432
|
]);
|
|
8429
8433
|
l = u.default, h = p.default, c = g.default;
|
|
8430
8434
|
break;
|
|
8431
8435
|
}
|
|
8432
8436
|
case "cjk-horizontal": {
|
|
8433
8437
|
const [u, p, g] = await Promise.all([
|
|
8434
|
-
import("./ReadiumCSS-before-
|
|
8435
|
-
import("./ReadiumCSS-default-
|
|
8436
|
-
import("./ReadiumCSS-after-
|
|
8438
|
+
import("./ReadiumCSS-before-BA9Irzag.js"),
|
|
8439
|
+
import("./ReadiumCSS-default-DsgDIxGa.js"),
|
|
8440
|
+
import("./ReadiumCSS-after-DwG-6hYO.js")
|
|
8437
8441
|
]);
|
|
8438
8442
|
l = u.default, h = p.default, c = g.default;
|
|
8439
8443
|
break;
|
|
@@ -8444,18 +8448,18 @@ async function Er(r, t) {
|
|
|
8444
8448
|
// same stylesheet set per the Readium CSS spec.
|
|
8445
8449
|
case "mongolian-vertical": {
|
|
8446
8450
|
const [u, p, g] = await Promise.all([
|
|
8447
|
-
import("./ReadiumCSS-before-
|
|
8448
|
-
import("./ReadiumCSS-default-
|
|
8449
|
-
import("./ReadiumCSS-after-
|
|
8451
|
+
import("./ReadiumCSS-before-DKjdmFso.js"),
|
|
8452
|
+
import("./ReadiumCSS-default-BGrBd7Sk.js"),
|
|
8453
|
+
import("./ReadiumCSS-after-DIfxADJu.js")
|
|
8450
8454
|
]);
|
|
8451
8455
|
l = u.default, h = p.default, c = g.default;
|
|
8452
8456
|
break;
|
|
8453
8457
|
}
|
|
8454
8458
|
default: {
|
|
8455
8459
|
const [u, p, g] = await Promise.all([
|
|
8456
|
-
import("./ReadiumCSS-before-
|
|
8457
|
-
import("./ReadiumCSS-default-
|
|
8458
|
-
import("./ReadiumCSS-after-
|
|
8460
|
+
import("./ReadiumCSS-before-B8zaPxhu.js"),
|
|
8461
|
+
import("./ReadiumCSS-default-DzJEDDcb.js"),
|
|
8462
|
+
import("./ReadiumCSS-after-Djsq77vV.js")
|
|
8459
8463
|
]);
|
|
8460
8464
|
l = u.default, h = p.default, c = g.default;
|
|
8461
8465
|
break;
|
|
@@ -8504,7 +8508,7 @@ async function Er(r, t) {
|
|
|
8504
8508
|
}
|
|
8505
8509
|
];
|
|
8506
8510
|
}
|
|
8507
|
-
const
|
|
8511
|
+
const Cr = (r) => ({
|
|
8508
8512
|
frameLoaded: r.frameLoaded || (() => {
|
|
8509
8513
|
}),
|
|
8510
8514
|
positionChanged: r.positionChanged || (() => {
|
|
@@ -8535,10 +8539,10 @@ class _n extends hn {
|
|
|
8535
8539
|
readingOrder: [],
|
|
8536
8540
|
progressions: /* @__PURE__ */ new Map(),
|
|
8537
8541
|
positions: null
|
|
8538
|
-
}, this.pub = e, this.container = t, this.listeners =
|
|
8542
|
+
}, this.pub = e, this.container = t, this.listeners = Cr(i), this.currentLocation = s, n.length && (this.positions = n), this._preferences = new zt(o.preferences), this._defaults = new pr(o.defaults), this._settings = new Bi(this._preferences, this._defaults);
|
|
8539
8543
|
const a = bt(e.metadata), l = a === "cjk-horizontal", h = a === "cjk-vertical", u = h || a === "mongolian-vertical", p = l || h;
|
|
8540
|
-
this._css = new
|
|
8541
|
-
rsProperties: new
|
|
8544
|
+
this._css = new Pr({
|
|
8545
|
+
rsProperties: new Sr({ noVerticalPagination: u || void 0 }),
|
|
8542
8546
|
userProperties: new En({}),
|
|
8543
8547
|
lineLengths: new Ot({
|
|
8544
8548
|
optimalChars: this._settings.optimalLineLength,
|
|
@@ -8554,7 +8558,7 @@ class _n extends hn {
|
|
|
8554
8558
|
container: t,
|
|
8555
8559
|
constraint: this._settings.constraint,
|
|
8556
8560
|
isCJKVertical: u
|
|
8557
|
-
}), this._layout = _n.determineLayout(e, !!this._settings.scroll), this.currentProgression = e.metadata.effectiveReadingProgression, this._injectablesConfig = o.injectables || { rules: [], allowedDomains: [] }, this._readiumRulesPromise =
|
|
8561
|
+
}), this._layout = _n.determineLayout(e, !!this._settings.scroll), this.currentProgression = e.metadata.effectiveReadingProgression, this._injectablesConfig = o.injectables || { rules: [], allowedDomains: [] }, this._readiumRulesPromise = _r(e.metadata, e.readingOrder.items), this._contentProtection = o.contentProtection || {}, this._keyboardPeripherals = this.mergeKeyboardPeripherals(
|
|
8558
8562
|
this._contentProtection,
|
|
8559
8563
|
o.keyboardPeripherals || []
|
|
8560
8564
|
), (this._contentProtection.disableContextMenu || this._contentProtection.checkAutomation || this._contentProtection.checkIFrameEmbedding || this._contentProtection.monitorDevTools || this._contentProtection.protectPrinting?.disable) && (this._navigatorProtector = new Xe(this._contentProtection), this._suspiciousActivityListener = (g) => {
|
|
@@ -8984,7 +8988,7 @@ class _n extends hn {
|
|
|
8984
8988
|
return this.go(t.locator, e, i);
|
|
8985
8989
|
}
|
|
8986
8990
|
}
|
|
8987
|
-
const
|
|
8991
|
+
const Lr = `// PreservePitchProcessor.js
|
|
8988
8992
|
// AudioWorklet processor for pitch preservation via pitch shifting.
|
|
8989
8993
|
//
|
|
8990
8994
|
// Architecture:
|
|
@@ -9209,7 +9213,7 @@ class Ye {
|
|
|
9209
9213
|
if (n)
|
|
9210
9214
|
await e.audioWorklet.addModule(n);
|
|
9211
9215
|
else {
|
|
9212
|
-
const o = new Blob([
|
|
9216
|
+
const o = new Blob([Lr], { type: "text/javascript" });
|
|
9213
9217
|
s.url = URL.createObjectURL(o), await e.audioWorklet.addModule(s.url);
|
|
9214
9218
|
}
|
|
9215
9219
|
} catch (o) {
|
|
@@ -9229,7 +9233,7 @@ class Ye {
|
|
|
9229
9233
|
this.workletNode && (this.workletNode.disconnect(), this.workletNode = null), this.url && (URL.revokeObjectURL(this.url), this.url = null);
|
|
9230
9234
|
}
|
|
9231
9235
|
}
|
|
9232
|
-
class
|
|
9236
|
+
class xr {
|
|
9233
9237
|
constructor(t) {
|
|
9234
9238
|
this.audioContext = null, this.sourceNode = null, this.gainNode = null, this.listeners = {}, this.isMutedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.isLoadingValue = !1, this.isLoadedValue = !1, this.isEndedValue = !1, this.isStoppedValue = !1, this.worklet = null, this.webAudioActive = !1, this.boundOnCanPlayThrough = this.onCanPlayThrough.bind(this), this.boundOnTimeUpdate = this.onTimeUpdate.bind(this), this.boundOnError = this.onError.bind(this), this.boundOnEnded = this.onEnded.bind(this), this.boundOnStalled = this.onStalled.bind(this), this.boundOnEmptied = this.onEmptied.bind(this), this.boundOnSuspend = this.onSuspend.bind(this), this.boundOnWaiting = this.onWaiting.bind(this), this.boundOnLoadedMetadata = this.onLoadedMetadata.bind(this), this.boundOnSeeking = this.onSeeking.bind(this), this.boundOnSeeked = this.onSeeked.bind(this), this.boundOnPlay = this.onPlay.bind(this), this.boundOnPlaying = this.onPlaying.bind(this), this.boundOnPause = this.onPause.bind(this), this.boundOnProgress = this.onProgress.bind(this), this.playback = t.playback, this.mediaElement = document.createElement("audio"), this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.addEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.addEventListener("error", this.boundOnError), this.mediaElement.addEventListener("ended", this.boundOnEnded), this.mediaElement.addEventListener("stalled", this.boundOnStalled), this.mediaElement.addEventListener("emptied", this.boundOnEmptied), this.mediaElement.addEventListener("suspend", this.boundOnSuspend), this.mediaElement.addEventListener("waiting", this.boundOnWaiting), this.mediaElement.addEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.addEventListener("seeking", this.boundOnSeeking), this.mediaElement.addEventListener("seeked", this.boundOnSeeked), this.mediaElement.addEventListener("play", this.boundOnPlay), this.mediaElement.addEventListener("playing", this.boundOnPlaying), this.mediaElement.addEventListener("pause", this.boundOnPause), this.mediaElement.addEventListener("progress", this.boundOnProgress), this.mediaElement.currentTime = this.playback.state.currentTime;
|
|
9235
9239
|
}
|
|
@@ -9506,7 +9510,7 @@ class ce {
|
|
|
9506
9510
|
return new ce(e);
|
|
9507
9511
|
}
|
|
9508
9512
|
}
|
|
9509
|
-
class
|
|
9513
|
+
class Or {
|
|
9510
9514
|
constructor(t = {}) {
|
|
9511
9515
|
this.volume = z(t.volume, ie.range) ?? 1, this.playbackRate = z(t.playbackRate, ne.range) ?? 1, this.preservePitch = E(t.preservePitch) ?? !0, this.skipBackwardInterval = z(t.skipBackwardInterval, it.range) ?? 10, this.skipForwardInterval = z(t.skipForwardInterval, it.range) ?? 10, this.pollInterval = v(t.pollInterval) ?? 1e3, this.autoPlay = E(t.autoPlay) ?? !0, this.enableMediaSession = E(t.enableMediaSession) ?? !0;
|
|
9512
9516
|
}
|
|
@@ -9616,7 +9620,7 @@ class Vi {
|
|
|
9616
9620
|
}
|
|
9617
9621
|
}
|
|
9618
9622
|
const ji = 1, $i = 1;
|
|
9619
|
-
class
|
|
9623
|
+
class kr {
|
|
9620
9624
|
constructor(t, e, i = {}) {
|
|
9621
9625
|
this.pool = /* @__PURE__ */ new Map(), this._audioEngine = t, this._publication = e, this._supportedAudioTypes = this.detectSupportedAudioTypes(), i.disableRemotePlayback && (this._audioEngine.getMediaElement().disableRemotePlayback = !0);
|
|
9622
9626
|
}
|
|
@@ -9693,7 +9697,7 @@ class Or {
|
|
|
9693
9697
|
this.pool.clear();
|
|
9694
9698
|
}
|
|
9695
9699
|
}
|
|
9696
|
-
class
|
|
9700
|
+
class Rr {
|
|
9697
9701
|
constructor(t = {}) {
|
|
9698
9702
|
this.dragstartHandler = (e) => {
|
|
9699
9703
|
e.preventDefault(), e.stopPropagation(), t.onDragDetected?.(Array.from(e.dataTransfer?.types ?? []));
|
|
@@ -9709,7 +9713,7 @@ class kr {
|
|
|
9709
9713
|
document.removeEventListener("dragstart", this.dragstartHandler, !0), document.removeEventListener("dragover", this.dragoverHandler, !0), document.removeEventListener("drop", this.dropHandler, !0), window.removeEventListener("unload", this.unloadHandler);
|
|
9710
9714
|
}
|
|
9711
9715
|
}
|
|
9712
|
-
class
|
|
9716
|
+
class Ar {
|
|
9713
9717
|
constructor(t = {}) {
|
|
9714
9718
|
this.copyHandler = (e) => {
|
|
9715
9719
|
e.preventDefault(), e.stopPropagation(), t.onCopyBlocked?.();
|
|
@@ -9719,16 +9723,16 @@ class Rr {
|
|
|
9719
9723
|
document.removeEventListener("copy", this.copyHandler, !0), window.removeEventListener("unload", this.unloadHandler);
|
|
9720
9724
|
}
|
|
9721
9725
|
}
|
|
9722
|
-
class
|
|
9726
|
+
class Tr extends Xe {
|
|
9723
9727
|
constructor(t = {}) {
|
|
9724
|
-
super(t), t.disableDragAndDrop && (this.dragAndDropProtector = new
|
|
9728
|
+
super(t), t.disableDragAndDrop && (this.dragAndDropProtector = new Rr({
|
|
9725
9729
|
onDragDetected: (e) => {
|
|
9726
9730
|
this.dispatchSuspiciousActivity("drag_detected", { dataTransferTypes: e, targetFrameSrc: "" });
|
|
9727
9731
|
},
|
|
9728
9732
|
onDropDetected: (e, i) => {
|
|
9729
9733
|
this.dispatchSuspiciousActivity("drop_detected", { dataTransferTypes: e, fileCount: i, targetFrameSrc: "" });
|
|
9730
9734
|
}
|
|
9731
|
-
})), t.protectCopy && (this.copyProtector = new
|
|
9735
|
+
})), t.protectCopy && (this.copyProtector = new Ar({
|
|
9732
9736
|
onCopyBlocked: () => {
|
|
9733
9737
|
this.dispatchSuspiciousActivity("bulk_copy", { targetFrameSrc: "" });
|
|
9734
9738
|
}
|
|
@@ -9738,7 +9742,7 @@ class Ar extends Xe {
|
|
|
9738
9742
|
super.destroy(), this.dragAndDropProtector?.destroy(), this.copyProtector?.destroy();
|
|
9739
9743
|
}
|
|
9740
9744
|
}
|
|
9741
|
-
const
|
|
9745
|
+
const Mr = (r) => ({
|
|
9742
9746
|
trackLoaded: r.trackLoaded ?? (() => {
|
|
9743
9747
|
}),
|
|
9744
9748
|
positionChanged: r.positionChanged ?? (() => {
|
|
@@ -9770,12 +9774,12 @@ const Tr = (r) => ({
|
|
|
9770
9774
|
remotePlaybackStateChanged: r.remotePlaybackStateChanged ?? (() => {
|
|
9771
9775
|
})
|
|
9772
9776
|
});
|
|
9773
|
-
class
|
|
9777
|
+
class zr extends ys {
|
|
9774
9778
|
constructor(t, e, i, n = {
|
|
9775
9779
|
preferences: {},
|
|
9776
9780
|
defaults: {}
|
|
9777
9781
|
}) {
|
|
9778
|
-
if (super(), this.positionPollInterval = null, this.navigationId = 0, this._playIntent = !1, this._preferencesEditor = null, this._mediaSessionEnabled = !1, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this._isNavigating = !1, this._isStalled = !1, this._stalledWatchdog = null, this._stalledCheckTime = 0, this.pub = t, this.listeners =
|
|
9782
|
+
if (super(), this.positionPollInterval = null, this.navigationId = 0, this._playIntent = !1, this._preferencesEditor = null, this._mediaSessionEnabled = !1, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this._isNavigating = !1, this._isStalled = !1, this._stalledWatchdog = null, this._stalledCheckTime = 0, this.pub = t, this.listeners = Mr(e), this._preferences = new ce(n.preferences), this._defaults = new Or(n.defaults), this._settings = new Hi(this._preferences, this._defaults), t.readingOrder.items.length === 0)
|
|
9779
9783
|
throw new Error("AudioNavigator: publication has an empty reading order");
|
|
9780
9784
|
if (i)
|
|
9781
9785
|
this.currentLocation = this.ensureLocatorLocations(i);
|
|
@@ -9796,7 +9800,7 @@ class Nr extends ys {
|
|
|
9796
9800
|
const s = this.currentLocation.href.split("#")[0], o = this.hrefToTrackIndex(s);
|
|
9797
9801
|
if (o === -1)
|
|
9798
9802
|
throw new Error(`AudioNavigator: initial href "${s}" not found in reading order`);
|
|
9799
|
-
const a = this.currentLocation.locations?.time() || 0, l = new
|
|
9803
|
+
const a = this.currentLocation.locations?.time() || 0, l = new xr({
|
|
9800
9804
|
playback: {
|
|
9801
9805
|
state: {
|
|
9802
9806
|
currentTime: a,
|
|
@@ -9806,14 +9810,14 @@ class Nr extends ys {
|
|
|
9806
9810
|
index: o
|
|
9807
9811
|
}
|
|
9808
9812
|
});
|
|
9809
|
-
this.pool = new
|
|
9813
|
+
this.pool = new kr(l, t, n.contentProtection);
|
|
9810
9814
|
const h = n.contentProtection || {};
|
|
9811
9815
|
this._contentProtection = h;
|
|
9812
9816
|
const c = this.mergeKeyboardPeripherals(
|
|
9813
9817
|
h,
|
|
9814
9818
|
n.keyboardPeripherals || []
|
|
9815
9819
|
);
|
|
9816
|
-
(h.disableContextMenu || h.checkAutomation || h.checkIFrameEmbedding || h.monitorDevTools || h.protectPrinting?.disable || h.disableDragAndDrop || h.protectCopy) && (this._navigatorProtector = new
|
|
9820
|
+
(h.disableContextMenu || h.checkAutomation || h.checkIFrameEmbedding || h.monitorDevTools || h.protectPrinting?.disable || h.disableDragAndDrop || h.protectCopy) && (this._navigatorProtector = new Tr(h), this._suspiciousActivityListener = (u) => {
|
|
9817
9821
|
const { type: p, ...g } = u.detail;
|
|
9818
9822
|
p === "context_menu" ? this.listeners.contextMenu(g) : this.listeners.contentProtection(p, g);
|
|
9819
9823
|
}, window.addEventListener(ot, this._suspiciousActivityListener)), c.length > 0 && (this._keyboardPeripheralsManager = new Ge({ keyboardPeripherals: c }), this._keyboardPeripheralListener = (u) => {
|
|
@@ -10130,8 +10134,8 @@ class Nr extends ys {
|
|
|
10130
10134
|
}
|
|
10131
10135
|
}
|
|
10132
10136
|
export {
|
|
10133
|
-
|
|
10134
|
-
|
|
10137
|
+
Or as AudioDefaults,
|
|
10138
|
+
zr as AudioNavigator,
|
|
10135
10139
|
ce as AudioPreferences,
|
|
10136
10140
|
Vi as AudioPreferencesEditor,
|
|
10137
10141
|
Hi as AudioSettings,
|
|
@@ -10142,7 +10146,7 @@ export {
|
|
|
10142
10146
|
zt as EpubPreferences,
|
|
10143
10147
|
Ui as EpubPreferencesEditor,
|
|
10144
10148
|
Bi as EpubSettings,
|
|
10145
|
-
|
|
10149
|
+
Nr as ExperimentalWebPubNavigator,
|
|
10146
10150
|
nr as FXLCoordinator,
|
|
10147
10151
|
tr as FXLFrameManager,
|
|
10148
10152
|
ur as FXLFramePoolManager,
|
|
@@ -10159,15 +10163,15 @@ export {
|
|
|
10159
10163
|
Me as Orientation,
|
|
10160
10164
|
M as Preference,
|
|
10161
10165
|
le as Properties,
|
|
10162
|
-
|
|
10166
|
+
Sr as RSProperties,
|
|
10163
10167
|
x as RangePreference,
|
|
10164
|
-
|
|
10168
|
+
Pr as ReadiumCSS,
|
|
10165
10169
|
Ne as Spread,
|
|
10166
10170
|
tt as TextAlignment,
|
|
10167
10171
|
En as UserProperties,
|
|
10168
10172
|
ir as VerticalThird,
|
|
10169
10173
|
hn as VisualNavigator,
|
|
10170
|
-
|
|
10174
|
+
xr as WebAudioEngine,
|
|
10171
10175
|
bs as WebPubBlobBuilder,
|
|
10172
10176
|
As as WebPubCSS,
|
|
10173
10177
|
Ns as WebPubDefaults,
|