@readium/navigator 2.2.5 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ const O = class at {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
O.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), O.AUDITORY = new O("auditory"), O.TACTILE = new O("tactile"), O.TEXTUAL = new O("textual"), O.VISUAL = new O("visual");
|
|
36
|
-
const f = class
|
|
36
|
+
const f = class Ei {
|
|
37
37
|
constructor(t) {
|
|
38
38
|
this.value = t;
|
|
39
39
|
}
|
|
@@ -42,7 +42,7 @@ const f = class yi {
|
|
|
42
42
|
*/
|
|
43
43
|
static deserialize(t) {
|
|
44
44
|
if (!(!t || typeof t != "string"))
|
|
45
|
-
return new
|
|
45
|
+
return new Ei(t);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Serializes a [Feature] to its RWPM JSON representation.
|
|
@@ -52,9 +52,9 @@ const f = class yi {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
f.NONE = new f("none"), f.ANNOTATIONS = new f("annotations"), f.ARIA = new f("ARIA"), f.INDEX = new f("index"), f.PAGE_BREAK_MARKERS = new f("pageBreakMarkers"), f.PAGE_NAVIGATION = new f("pageNavigation"), f.PRINT_PAGE_NUMBERS = new f("printPageNumbers"), f.READING_ORDER = new f("readingOrder"), f.STRUCTURAL_NAVIGATION = new f("structuralNavigation"), f.TABLE_OF_CONTENTS = new f("tableOfContents"), f.TAGGED_PDF = new f("taggedPDF"), f.ALTERNATIVE_TEXT = new f("alternativeText"), f.AUDIO_DESCRIPTION = new f("audioDescription"), f.CAPTIONS = new f("captions"), f.CLOSED_CAPTIONS = new f("closedCaptions"), f.DESCRIBED_MATH = new f("describedMath"), f.LONG_DESCRIPTION = new f("longDescription"), f.OPEN_CAPTIONS = new f("openCaptions"), f.SIGN_LANGUAGE = new f("signLanguage"), f.TRANSCRIPT = new f("transcript"), f.DISPLAY_TRANSFORMABILITY = new f("displayTransformability"), f.SYNCHRONIZED_AUDIO_TEXT = new f("synchronizedAudioText"), f.TIMING_CONTROL = new f("timingControl"), f.UNLOCKED = new f("unlocked"), f.CHEM_ML = new f("ChemML"), f.LATEX = new f("latex"), f.LATEX_CHEMISTRY = new f("latex-chemistry"), f.MATH_ML = new f("MathML"), f.MATH_ML_CHEMISTRY = new f("MathML-chemistry"), f.TTS_MARKUP = new f("ttsMarkup"), f.HIGH_CONTRAST_AUDIO = new f("highContrastAudio"), f.HIGH_CONTRAST_DISPLAY = new f("highContrastDisplay"), f.LARGE_PRINT = new f("largePrint"), f.BRAILLE = new f("braille"), f.TACTILE_GRAPHIC = new f("tactileGraphic"), f.TACTILE_OBJECT = new f("tactileObject"), f.FULL_RUBY_ANNOTATIONS = new f("fullRubyAnnotations"), f.HORIZONTAL_WRITING = new f("horizontalWriting"), f.RUBY_ANNOTATIONS = new f("rubyAnnotations"), f.VERTICAL_WRITING = new f("verticalWriting"), f.WITH_ADDITIONAL_WORD_SEGMENTATION = new f("withAdditionalWordSegmentation"), f.WITHOUT_ADDITIONAL_WORD_SEGMENTATION = new f("withoutAdditionalWordSegmentation");
|
|
55
|
-
let
|
|
55
|
+
let yi = f;
|
|
56
56
|
var B = /* @__PURE__ */ ((r) => (r.reflowable = "reflowable", r.fixed = "fixed", r.scrolled = "scrolled", r))(B || {});
|
|
57
|
-
let
|
|
57
|
+
let MA = class Ii {
|
|
58
58
|
/**
|
|
59
59
|
* Creates a [Encryption].
|
|
60
60
|
*/
|
|
@@ -66,7 +66,7 @@ let fA = class Fi {
|
|
|
66
66
|
*/
|
|
67
67
|
static deserialize(t) {
|
|
68
68
|
if (t && t.algorithm)
|
|
69
|
-
return new
|
|
69
|
+
return new Ii({
|
|
70
70
|
algorithm: t.algorithm,
|
|
71
71
|
compression: t.compression,
|
|
72
72
|
originalLength: t.originalLength,
|
|
@@ -115,16 +115,16 @@ let k = class he {
|
|
|
115
115
|
};
|
|
116
116
|
Object.defineProperty(k.prototype, "encryption", {
|
|
117
117
|
get: function() {
|
|
118
|
-
return
|
|
118
|
+
return MA.deserialize(this.otherProperties.encrypted);
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
function
|
|
121
|
+
function BA(r) {
|
|
122
122
|
return r && Array.isArray(r) ? r : void 0;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
return r && typeof r == "string" ? [r] :
|
|
124
|
+
function Fi(r) {
|
|
125
|
+
return r && typeof r == "string" ? [r] : BA(r);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ve(r) {
|
|
128
128
|
return typeof r == "string" ? new Date(r) : void 0;
|
|
129
129
|
}
|
|
130
130
|
function Qt(r) {
|
|
@@ -133,7 +133,7 @@ function Qt(r) {
|
|
|
133
133
|
function x(r) {
|
|
134
134
|
return Qt(r) !== void 0 && Math.sign(r) >= 0 ? r : void 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function wA(r) {
|
|
137
137
|
const t = new Array();
|
|
138
138
|
return r.forEach((e) => t.push(e)), t;
|
|
139
139
|
}
|
|
@@ -147,23 +147,23 @@ class u {
|
|
|
147
147
|
throw new Error("Invalid media type");
|
|
148
148
|
} else
|
|
149
149
|
throw new Error("Invalid media type");
|
|
150
|
-
const
|
|
150
|
+
const s = {};
|
|
151
151
|
for (let g = 1; g < A.length; g++) {
|
|
152
152
|
const M = A[g].split("=");
|
|
153
153
|
if (M.length === 2) {
|
|
154
154
|
const l = M[0].toLocaleLowerCase(), p = l === "charset" ? M[1].toUpperCase() : M[1];
|
|
155
|
-
|
|
155
|
+
s[l] = p;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
const
|
|
159
|
-
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) =>
|
|
158
|
+
const o = {}, a = Object.keys(s);
|
|
159
|
+
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) => o[g] = s[g]);
|
|
160
160
|
let h = "";
|
|
161
|
-
for (const g in
|
|
162
|
-
const M =
|
|
161
|
+
for (const g in o) {
|
|
162
|
+
const M = o[g];
|
|
163
163
|
h += `;${g}=${M}`;
|
|
164
164
|
}
|
|
165
|
-
const c = `${e}/${i}${h}`, d =
|
|
166
|
-
this.string = c, this.type = e, this.subtype = i, this.parameters =
|
|
165
|
+
const c = `${e}/${i}${h}`, d = o.encoding;
|
|
166
|
+
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding = d, this.name = t.name, this.fileExtension = t.fileExtension;
|
|
167
167
|
}
|
|
168
168
|
static parse(t) {
|
|
169
169
|
return new u(t);
|
|
@@ -200,9 +200,9 @@ class u {
|
|
|
200
200
|
if (!((this.type === "*" || this.type === e.type) && (this.subtype === "*" || this.subtype === e.subtype)))
|
|
201
201
|
return !1;
|
|
202
202
|
const i = new Set(
|
|
203
|
-
Object.entries(this.parameters).map(([n,
|
|
203
|
+
Object.entries(this.parameters).map(([n, s]) => `${n}=${s}`)
|
|
204
204
|
), A = new Set(
|
|
205
|
-
Object.entries(e.parameters).map(([n,
|
|
205
|
+
Object.entries(e.parameters).map(([n, s]) => `${n}=${s}`)
|
|
206
206
|
);
|
|
207
207
|
for (const n of Array.from(i.values()))
|
|
208
208
|
if (!A.has(n))
|
|
@@ -592,7 +592,7 @@ class u {
|
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
let
|
|
595
|
+
let ve = class {
|
|
596
596
|
constructor(t) {
|
|
597
597
|
this.uri = t, this.parameters = this.getParameters(t);
|
|
598
598
|
}
|
|
@@ -611,15 +611,15 @@ let De = class {
|
|
|
611
611
|
*/
|
|
612
612
|
expand(t) {
|
|
613
613
|
const e = (A) => A.split(",").map((n) => {
|
|
614
|
-
const
|
|
615
|
-
return
|
|
614
|
+
const s = t[n];
|
|
615
|
+
return s ? encodeURIComponent(s) : "";
|
|
616
616
|
}).join(","), i = (A) => "?" + A.split(",").map((n) => {
|
|
617
|
-
const
|
|
618
|
-
return
|
|
617
|
+
const s = n.split("=")[0], o = t[s];
|
|
618
|
+
return o ? `${s}=${encodeURIComponent(o)}` : "";
|
|
619
619
|
}).join("&");
|
|
620
620
|
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...A) => A[1] ? i(A[2]) : e(A[2]));
|
|
621
621
|
}
|
|
622
|
-
}, j = class
|
|
622
|
+
}, j = class Ui {
|
|
623
623
|
/**
|
|
624
624
|
* Creates a [Locations].
|
|
625
625
|
*/
|
|
@@ -631,17 +631,17 @@ let De = class {
|
|
|
631
631
|
*/
|
|
632
632
|
static deserialize(t) {
|
|
633
633
|
if (!t) return;
|
|
634
|
-
const e = Qt(t.progression), i = Qt(t.totalProgression), A = Qt(t.position), n = /* @__PURE__ */ new Map(),
|
|
634
|
+
const e = Qt(t.progression), i = Qt(t.totalProgression), A = Qt(t.position), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set([
|
|
635
635
|
"fragment",
|
|
636
636
|
"fragments",
|
|
637
637
|
"progression",
|
|
638
638
|
"totalProgression",
|
|
639
639
|
"position"
|
|
640
640
|
]);
|
|
641
|
-
return Object.entries(t).forEach(([
|
|
642
|
-
|
|
643
|
-
}), new
|
|
644
|
-
fragments:
|
|
641
|
+
return Object.entries(t).forEach(([o, a]) => {
|
|
642
|
+
s.has(o) || n.set(o, a);
|
|
643
|
+
}), new Ui({
|
|
644
|
+
fragments: Fi(t.fragments || t.fragment),
|
|
645
645
|
progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
|
|
646
646
|
totalProgression: i !== void 0 && i >= 0 && i <= 1 ? i : void 0,
|
|
647
647
|
position: A !== void 0 && A > 0 ? A : void 0,
|
|
@@ -655,7 +655,7 @@ let De = class {
|
|
|
655
655
|
const t = {};
|
|
656
656
|
return this.fragments && (t.fragments = this.fragments), this.progression !== void 0 && (t.progression = this.progression), this.totalProgression !== void 0 && (t.totalProgression = this.totalProgression), this.position !== void 0 && (t.position = this.position), this.otherLocations && this.otherLocations.forEach((e, i) => t[i] = e), t;
|
|
657
657
|
}
|
|
658
|
-
},
|
|
658
|
+
}, EA = class Ri {
|
|
659
659
|
/**
|
|
660
660
|
* Creates a [Text].
|
|
661
661
|
*/
|
|
@@ -667,7 +667,7 @@ let De = class {
|
|
|
667
667
|
*/
|
|
668
668
|
static deserialize(t) {
|
|
669
669
|
if (t)
|
|
670
|
-
return new
|
|
670
|
+
return new Ri({
|
|
671
671
|
after: t.after,
|
|
672
672
|
before: t.before,
|
|
673
673
|
highlight: t.highlight
|
|
@@ -697,7 +697,7 @@ let De = class {
|
|
|
697
697
|
type: t.type,
|
|
698
698
|
title: t.title,
|
|
699
699
|
locations: j.deserialize(t.locations),
|
|
700
|
-
text:
|
|
700
|
+
text: EA.deserialize(t.text)
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
/**
|
|
@@ -744,9 +744,9 @@ class H {
|
|
|
744
744
|
size: x(t.size),
|
|
745
745
|
duration: x(t.duration),
|
|
746
746
|
bitrate: x(t.bitrate),
|
|
747
|
-
languages:
|
|
748
|
-
alternates:
|
|
749
|
-
children:
|
|
747
|
+
languages: Fi(t.language),
|
|
748
|
+
alternates: De.deserialize(t.alternate),
|
|
749
|
+
children: De.deserialize(t.children)
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
/**
|
|
@@ -754,7 +754,7 @@ class H {
|
|
|
754
754
|
*/
|
|
755
755
|
serialize() {
|
|
756
756
|
const t = { href: this.href };
|
|
757
|
-
return this.templated !== void 0 && (t.templated = this.templated), this.type !== void 0 && (t.type = this.type), this.title !== void 0 && (t.title = this.title), this.rels && (t.rel =
|
|
757
|
+
return this.templated !== void 0 && (t.templated = this.templated), this.type !== void 0 && (t.type = this.type), this.title !== void 0 && (t.title = this.title), this.rels && (t.rel = wA(this.rels)), this.properties && (t.properties = this.properties.serialize()), this.height !== void 0 && (t.height = this.height), this.width !== void 0 && (t.width = this.width), this.size !== void 0 && (t.size = this.size), this.duration !== void 0 && (t.duration = this.duration), this.bitrate !== void 0 && (t.bitrate = this.bitrate), this.languages && (t.language = this.languages), this.alternates && (t.alternate = this.alternates.serialize()), this.children && (t.children = this.children.serialize()), t;
|
|
758
758
|
}
|
|
759
759
|
/** MediaType of the linked resource. */
|
|
760
760
|
get mediaType() {
|
|
@@ -771,14 +771,14 @@ class H {
|
|
|
771
771
|
}
|
|
772
772
|
/** List of URI template parameter keys, if the `Link` is templated. */
|
|
773
773
|
get templateParameters() {
|
|
774
|
-
return this.templated ? new
|
|
774
|
+
return this.templated ? new ve(this.href).parameters : /* @__PURE__ */ new Set();
|
|
775
775
|
}
|
|
776
776
|
/** Expands the `Link`'s HREF by replacing URI template variables by the given parameters.
|
|
777
777
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
778
778
|
*/
|
|
779
779
|
expandTemplate(t) {
|
|
780
780
|
return new H({
|
|
781
|
-
href: new
|
|
781
|
+
href: new ve(this.href).expand(t),
|
|
782
782
|
templated: !1
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -804,7 +804,7 @@ class H {
|
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
let
|
|
807
|
+
let De = class Ci {
|
|
808
808
|
/**
|
|
809
809
|
* Creates a [Links].
|
|
810
810
|
*/
|
|
@@ -816,7 +816,7 @@ let He = class Si {
|
|
|
816
816
|
*/
|
|
817
817
|
static deserialize(t) {
|
|
818
818
|
if (t && Array.isArray(t))
|
|
819
|
-
return new
|
|
819
|
+
return new Ci(
|
|
820
820
|
t.map((e) => H.deserialize(e)).filter((e) => e !== void 0)
|
|
821
821
|
);
|
|
822
822
|
}
|
|
@@ -898,11 +898,11 @@ let He = class Si {
|
|
|
898
898
|
return this.items.filter((t) => t.type);
|
|
899
899
|
}
|
|
900
900
|
};
|
|
901
|
-
var
|
|
901
|
+
var Si = /* @__PURE__ */ ((r) => (r.EPUB = "https://readium.org/webpub-manifest/profiles/epub", r.AUDIOBOOK = "https://readium.org/webpub-manifest/profiles/audiobook", r.DIVINA = "https://readium.org/webpub-manifest/profiles/divina", r.PDF = "https://readium.org/webpub-manifest/profiles/pdf", r))(Si || {}), N = /* @__PURE__ */ ((r) => (r.ltr = "ltr", r.rtl = "rtl", r))(N || {});
|
|
902
902
|
k.prototype.getContains = function() {
|
|
903
903
|
return new Set(this.otherProperties.contains || []);
|
|
904
904
|
};
|
|
905
|
-
let
|
|
905
|
+
let He = class zi {
|
|
906
906
|
/**
|
|
907
907
|
* Creates a [DomRange].
|
|
908
908
|
*/
|
|
@@ -917,7 +917,7 @@ let Ge = class Qi {
|
|
|
917
917
|
let e = x(t.textNodeIndex);
|
|
918
918
|
if (e === void 0) return;
|
|
919
919
|
let i = x(t.charOffset);
|
|
920
|
-
return i === void 0 && (i = x(t.offset)), new
|
|
920
|
+
return i === void 0 && (i = x(t.offset)), new zi({
|
|
921
921
|
cssSelector: t.cssSelector,
|
|
922
922
|
textNodeIndex: e,
|
|
923
923
|
charOffset: i
|
|
@@ -933,8 +933,7 @@ let Ge = class Qi {
|
|
|
933
933
|
};
|
|
934
934
|
return this.charOffset !== void 0 && (t.charOffset = this.charOffset), t;
|
|
935
935
|
}
|
|
936
|
-
}
|
|
937
|
-
class Ee {
|
|
936
|
+
}, yA = class Qi {
|
|
938
937
|
/**
|
|
939
938
|
* Creates a [DomRange].
|
|
940
939
|
*/
|
|
@@ -946,11 +945,11 @@ class Ee {
|
|
|
946
945
|
*/
|
|
947
946
|
static deserialize(t) {
|
|
948
947
|
if (!t) return;
|
|
949
|
-
let e =
|
|
948
|
+
let e = He.deserialize(t.start);
|
|
950
949
|
if (e)
|
|
951
|
-
return new
|
|
950
|
+
return new Qi({
|
|
952
951
|
start: e,
|
|
953
|
-
end:
|
|
952
|
+
end: He.deserialize(t.end)
|
|
954
953
|
});
|
|
955
954
|
}
|
|
956
955
|
/**
|
|
@@ -960,7 +959,7 @@ class Ee {
|
|
|
960
959
|
const t = { start: this.start.serialize() };
|
|
961
960
|
return this.end && (t.end = this.end.serialize()), t;
|
|
962
961
|
}
|
|
963
|
-
}
|
|
962
|
+
};
|
|
964
963
|
j.prototype.getCssSelector = function() {
|
|
965
964
|
return this.otherLocations?.get("cssSelector");
|
|
966
965
|
};
|
|
@@ -968,7 +967,7 @@ j.prototype.getPartialCfi = function() {
|
|
|
968
967
|
return this.otherLocations?.get("partialCfi");
|
|
969
968
|
};
|
|
970
969
|
j.prototype.getDomRange = function() {
|
|
971
|
-
return
|
|
970
|
+
return yA.deserialize(this.otherLocations?.get("domRange"));
|
|
972
971
|
};
|
|
973
972
|
j.prototype.fragmentParameters = function() {
|
|
974
973
|
return new Map(
|
|
@@ -1002,7 +1001,7 @@ j.prototype.space = function() {
|
|
|
1002
1001
|
if (t.length === 4 && !t.some(isNaN))
|
|
1003
1002
|
return t;
|
|
1004
1003
|
};
|
|
1005
|
-
|
|
1004
|
+
class Ee {
|
|
1006
1005
|
/** Creates a [Price]. */
|
|
1007
1006
|
constructor(t) {
|
|
1008
1007
|
this.currency = t.currency, this.value = t.value;
|
|
@@ -1017,7 +1016,7 @@ let EA = class Yi {
|
|
|
1017
1016
|
return;
|
|
1018
1017
|
let i = x(t.value);
|
|
1019
1018
|
if (i !== void 0)
|
|
1020
|
-
return new
|
|
1019
|
+
return new Ee({ currency: e, value: i });
|
|
1021
1020
|
}
|
|
1022
1021
|
/**
|
|
1023
1022
|
* Serializes a [Price] to its RWPM JSON representation.
|
|
@@ -1025,7 +1024,8 @@ let EA = class Yi {
|
|
|
1025
1024
|
serialize() {
|
|
1026
1025
|
return { currency: this.currency, value: this.value };
|
|
1027
1026
|
}
|
|
1028
|
-
}
|
|
1027
|
+
}
|
|
1028
|
+
let IA = class Yt {
|
|
1029
1029
|
/** Creates a [Acquisition]. */
|
|
1030
1030
|
constructor(t) {
|
|
1031
1031
|
this.type = t.type, this.children = t.children;
|
|
@@ -1075,7 +1075,7 @@ class ye {
|
|
|
1075
1075
|
return this.total !== void 0 && (t.total = this.total), this.position !== void 0 && (t.position = this.position), t;
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
class
|
|
1078
|
+
let FA = class Yi {
|
|
1079
1079
|
/** Creates a [Copies]. */
|
|
1080
1080
|
constructor(t) {
|
|
1081
1081
|
this.total = t.total, this.available = t.available;
|
|
@@ -1085,7 +1085,7 @@ class Ie {
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
static deserialize(t) {
|
|
1087
1087
|
if (t)
|
|
1088
|
-
return new
|
|
1088
|
+
return new Yi({
|
|
1089
1089
|
total: x(t.total),
|
|
1090
1090
|
available: x(t.available)
|
|
1091
1091
|
});
|
|
@@ -1097,8 +1097,8 @@ class Ie {
|
|
|
1097
1097
|
const t = {};
|
|
1098
1098
|
return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
|
|
1099
1099
|
}
|
|
1100
|
-
}
|
|
1101
|
-
class
|
|
1100
|
+
};
|
|
1101
|
+
class Ie {
|
|
1102
1102
|
/** Creates a [Availability]. */
|
|
1103
1103
|
constructor(t) {
|
|
1104
1104
|
this.state = t.state, this.since = t.since, this.until = t.until;
|
|
@@ -1108,10 +1108,10 @@ class Fe {
|
|
|
1108
1108
|
*/
|
|
1109
1109
|
static deserialize(t) {
|
|
1110
1110
|
if (t && t.state)
|
|
1111
|
-
return new
|
|
1111
|
+
return new Ie({
|
|
1112
1112
|
state: t.state,
|
|
1113
|
-
since:
|
|
1114
|
-
until:
|
|
1113
|
+
since: Ve(t.since),
|
|
1114
|
+
until: Ve(t.until)
|
|
1115
1115
|
});
|
|
1116
1116
|
}
|
|
1117
1117
|
/**
|
|
@@ -1126,61 +1126,61 @@ k.prototype.getNumberOfItems = function() {
|
|
|
1126
1126
|
return x(this.otherProperties.numberOfItems);
|
|
1127
1127
|
};
|
|
1128
1128
|
k.prototype.getPrice = function() {
|
|
1129
|
-
return
|
|
1129
|
+
return Ee.deserialize(this.otherProperties.price);
|
|
1130
1130
|
};
|
|
1131
1131
|
k.prototype.getIndirectAcquisitions = function() {
|
|
1132
1132
|
const r = this.otherProperties.indirectAcquisition;
|
|
1133
1133
|
if (r && Array.isArray(r))
|
|
1134
|
-
return r.map((t) =>
|
|
1134
|
+
return r.map((t) => IA.deserialize(t)).filter((t) => t !== void 0);
|
|
1135
1135
|
};
|
|
1136
1136
|
k.prototype.getHolds = function() {
|
|
1137
1137
|
return ye.deserialize(this.otherProperties.holds);
|
|
1138
1138
|
};
|
|
1139
1139
|
k.prototype.getCopies = function() {
|
|
1140
|
-
return
|
|
1140
|
+
return FA.deserialize(this.otherProperties.copies);
|
|
1141
1141
|
};
|
|
1142
1142
|
k.prototype.getAvailability = function() {
|
|
1143
|
-
return
|
|
1143
|
+
return Ie.deserialize(this.otherProperties.availability);
|
|
1144
1144
|
};
|
|
1145
1145
|
k.prototype.getAuthenticate = function() {
|
|
1146
1146
|
return H.deserialize(this.otherProperties.authenticate);
|
|
1147
1147
|
};
|
|
1148
|
-
const
|
|
1149
|
-
function
|
|
1150
|
-
console.warn(`${
|
|
1148
|
+
const UA = "CssSelectorGenerator";
|
|
1149
|
+
function Ge(r = "unknown problem", ...t) {
|
|
1150
|
+
console.warn(`${UA}: ${r}`, ...t);
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function RA(r) {
|
|
1153
1153
|
return r instanceof RegExp;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function CA(r) {
|
|
1156
1156
|
return r.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".+");
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function SA(r) {
|
|
1159
1159
|
const t = r.map((e) => {
|
|
1160
|
-
if (
|
|
1160
|
+
if (RA(e))
|
|
1161
1161
|
return (i) => e.test(i);
|
|
1162
1162
|
if (typeof e == "function")
|
|
1163
1163
|
return (i) => {
|
|
1164
1164
|
const A = e(i);
|
|
1165
|
-
return typeof A != "boolean" ? (
|
|
1165
|
+
return typeof A != "boolean" ? (Ge("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : A;
|
|
1166
1166
|
};
|
|
1167
1167
|
if (typeof e == "string") {
|
|
1168
|
-
const i = new RegExp("^" +
|
|
1168
|
+
const i = new RegExp("^" + CA(e) + "$");
|
|
1169
1169
|
return (A) => i.test(A);
|
|
1170
1170
|
}
|
|
1171
|
-
return
|
|
1171
|
+
return Ge("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
1172
1172
|
});
|
|
1173
1173
|
return (e) => t.some((i) => i(e));
|
|
1174
1174
|
}
|
|
1175
|
-
|
|
1175
|
+
SA([
|
|
1176
1176
|
"class",
|
|
1177
1177
|
"id",
|
|
1178
1178
|
// Angular attributes
|
|
1179
1179
|
"ng-*"
|
|
1180
1180
|
]);
|
|
1181
|
-
class
|
|
1181
|
+
class zA {
|
|
1182
1182
|
}
|
|
1183
|
-
class Ni extends
|
|
1183
|
+
class Ni extends zA {
|
|
1184
1184
|
/**
|
|
1185
1185
|
* Moves to the left content portion (eg. page) relative to the reading progression direction.
|
|
1186
1186
|
*/
|
|
@@ -1194,24 +1194,24 @@ class Ni extends CA {
|
|
|
1194
1194
|
this.readingProgression === N.ltr ? this.goForward(t, e) : this.readingProgression === N.rtl && this.goBackward(t, e);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
const SA = ':root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] body{zoom:var(--USER__zoom)!important}:root[style*=readium-iOSPatch-on][style*=--USER__zoom] body{-webkit-text-size-adjust:var(--USER__zoom)!important}@supports selector(figure:has(> img)){:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>img),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>video),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>svg),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>canvas),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>iframe),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>audio),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>img:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>video:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>svg:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>canvas:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>iframe:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>audio:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] table{zoom:calc(100% / var(--USER__zoom))!important}:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figcaption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] caption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] td,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] th{zoom:var(--USER__zoom)!important}}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-noRuby-on] body rt,:root[style*=readium-noRuby-on] body rp{display:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}', ft = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), xi = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), zA = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), Ue = (r, t) => {
|
|
1197
|
+
const QA = ':root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] body{zoom:var(--USER__zoom)!important}:root[style*=readium-iOSPatch-on][style*=--USER__zoom] body{-webkit-text-size-adjust:var(--USER__zoom)!important}@supports selector(figure:has(> img)){:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>img),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>video),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>svg),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>canvas),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>iframe),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>audio),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>img:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>video:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>svg:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>canvas:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>iframe:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>audio:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] table{zoom:calc(100% / var(--USER__zoom))!important}:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figcaption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] caption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] td,:root[style*=readium-experimentalZoom-on]:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] th{zoom:var(--USER__zoom)!important}}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-noRuby-on] body rt,:root[style*=readium-noRuby-on] body rp{display:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}', xi = '!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports._readium_cssSelectorGenerator=e():t._readium_cssSelectorGenerator=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"object"==typeof t&&null!==t&&t.nodeType===Node.ELEMENT_NODE}t.r(e),t.d(e,{_readium_cssSelectorGenerator:()=>Z,default:()=>tt,getCssSelector:()=>X});const o={NONE:"",DESCENDANT:" ",CHILD:" > "},r={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},i="_readium_cssSelectorGenerator";function c(t="unknown problem",...e){console.warn(`${i}: ${t}`,...e)}const s={selectors:[r.id,r.class,r.tag,r.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY,useScope:!1};function u(t){return t instanceof RegExp}function l(t){return["string","function"].includes(typeof t)||u(t)}function a(t){return Array.isArray(t)?t.filter(l):[]}function f(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function d(t,e){if(f(t))return t.contains(e)||c("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element\'s real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),t;const n=e.getRootNode({composed:!1});return f(n)?(n!==document&&c("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),n):S(e)}function m(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function p(t=[]){const[e=[],...n]=t;return 0===n.length?e:n.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function g(t){const e=t.map((t=>{if(u(t))return e=>t.test(e);if("function"==typeof t)return e=>{const n=t(e);return"boolean"!=typeof n?(c("pattern matcher function invalid","Provided pattern matching function does not return boolean. It\'s result will be ignored.",t),!1):n};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\\\{}()[\\]^$+?.]/g,"\\\\$&").replace(/\\*/g,".+")+"$");return t=>e.test(t)}return c("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function h(t,e,n){const o=Array.from(d(n,t[0]).querySelectorAll(e));return o.length===t.length&&t.every((t=>o.includes(t)))}function y(t,e){e=null!=e?e:S(t);const o=[];let r=t;for(;n(r)&&r!==e;)o.push(r),r=r.parentElement;return o}function b(t,e){return p(t.map((t=>y(t,e))))}function S(t){return t.ownerDocument.querySelector(":root")}const N=", ",v=new RegExp(["^$","\\\\s"].join("|")),E=new RegExp(["^$"].join("|")),x=[r.nthoftype,r.tag,r.id,r.class,r.attribute,r.nthchild],w=g(["class","id","ng-*"]);function I({name:t}){return`[${t}]`}function T({name:t,value:e}){return`[${t}=\'${e}\']`}function O({nodeName:t,nodeValue:e}){return{name:F(t),value:F(null!=e?e:void 0)}}function C(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t,nodeValue:e},n){const o=n.tagName.toLowerCase();return!(["input","option"].includes(o)&&"value"===t||"src"===t&&(null==e?void 0:e.startsWith("data:"))||w(t))}(e,t))).map(O);return[...e.map(I),...e.map(T)]}function j(t){var e;return(null!==(e=t.getAttribute("class"))&&void 0!==e?e:"").trim().split(/\\s+/).filter((t=>!E.test(t))).map((t=>`.${F(t)}`))}function A(t){var e;const n=null!==(e=t.getAttribute("id"))&&void 0!==e?e:"",o=`#${F(n)}`,r=t.getRootNode({composed:!1});return!v.test(n)&&h([t],o,r)?[o]:[]}function R(t){var e;const n=null===(e=t.parentElement)||void 0===e?void 0:e.children;if(n)for(let e=0;e<n.length;e++)if(n[e]===t)return[`:nth-child(${String(e+1)})`];return[]}function $(t){return[F(t.tagName.toLowerCase())]}function D(t){const e=[...new Set((n=t.map($),[].concat(...n)))];var n;return 0===e.length||e.length>1?[]:[e[0]]}function k(t){const e=D([t])[0],n=t.parentElement;if(n){const o=Array.from(n.children).filter((t=>t.tagName.toLowerCase()===e)),r=o.indexOf(t);if(r>-1)return[`${e}:nth-of-type(${String(r+1)})`]}return[]}function*P(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let n=0,o=L(1);for(;o.length<=t.length&&n<e;){n+=1;const e=o.map((e=>t[e]));yield e,o=_(o,t.length-1)}}function _(t=[],e=0){const n=t.length;if(0===n)return[];const o=[...t];o[n-1]+=1;for(let t=n-1;t>=0;t--)if(o[t]>e){if(0===t)return L(n+1);o[t-1]++,o[t]=o[t-1]+1}return o[n-1]>e?L(n+1):o}function L(t=1){return Array.from(Array(t).keys())}const M=":".charCodeAt(0).toString(16).toUpperCase(),V=/[ !"#$%&\'()\\[\\]{|}<>*+,./;=?@^`~\\\\]/;function F(t=""){return CSS?CSS.escape(t):function(t=""){return t.split("").map((t=>":"===t?`\\\\${M} `:V.test(t)?`\\\\${t}`:escape(t).replace(/%/g,"\\\\"))).join("")}(t)}const Y={tag:D,id:function(t){return 0===t.length||t.length>1?[]:A(t[0])},class:function(t){return p(t.map(j))},attribute:function(t){return p(t.map(C))},nthchild:function(t){return p(t.map(R))},nthoftype:function(t){return p(t.map(k))}},G={tag:$,id:A,class:j,attribute:C,nthchild:R,nthoftype:k};function W(t){return t.includes(r.tag)||t.includes(r.nthoftype)?[...t]:[...t,r.tag]}function*q(t,e){const n={};for(const o of t){const t=e[o];t&&t.length>0&&(n[o]=t)}for(const t of function*(t={}){const e=Object.entries(t);if(0===e.length)return;const n=[{index:e.length-1,partial:{}}];for(;n.length>0;){const t=n.pop();if(!t)break;const{index:o,partial:r}=t;if(o<0){yield r;continue}const[i,c]=e[o];for(let t=c.length-1;t>=0;t--)n.push({index:o-1,partial:Object.assign(Object.assign({},r),{[i]:c[t]})})}}(n))yield B(t)}function B(t={}){const e=[...x];return t[r.tag]&&t[r.nthoftype]&&e.splice(e.indexOf(r.tag),1),e.map((e=>{return(o=t)[n=e]?o[n].join(""):"";var n,o})).join("")}function H(t,e){return[...t.map((t=>e+o.DESCENDANT+t)),...t.map((t=>e+o.CHILD+t))]}function*U(t,e,n="",o){const r=function*(t,e){const n=new Set,o=function(t,e){const{blacklist:n,whitelist:o,combineWithinSelector:r,maxCombinations:i}=e,c=g(n),s=g(o);return function(t){const{selectors:e,includeTag:n}=t,o=[...e];return n&&!o.includes("tag")&&o.push("tag"),o}(e).reduce(((e,n)=>{const o=function(t,e){return(0,Y[e])(t)}(t,n),u=function(t=[],e,n){return t.filter((t=>n(t)||!e(t)))}(o,c,s),l=function(t=[],e){return t.sort(((t,n)=>{const o=e(t),r=e(n);return o&&!r?-1:!o&&r?1:0}))}(u,s);return e[n]=r?Array.from(P(l,{maxResults:i})):l.map((t=>[t])),e}),{})}(t,e);for(const t of function*(t,e){for(const n of function(t){const{selectors:e,combineBetweenSelectors:n,includeTag:o,maxCandidates:r}=t,i=n?function(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(P(t,{maxResults:e}))}(e,{maxResults:r}):e.map((t=>[t]));return o?i.map(W):i}(e))yield*q(n,t)}(o,e))n.has(t)||(n.add(t),yield t)}(t,o);for(const o of function*(t,e){if(""===e)yield*t;else for(const n of t)yield*H([n],e)}(r,n))h(t,o,e)&&(yield o)}function*z(t,e,n="",o){if(0===t.length)return null;const r=[t.length>1?t:[],...b(t,e).map((t=>[t]))];for(const t of r)for(const r of U(t,e,n,o))yield{foundElements:t,selector:r}}function J(t){return{value:t,include:!1}}function K({selectors:t,operator:e}){let n=[...x];t[r.tag]&&t[r.nthoftype]&&(n=n.filter((t=>t!==r.tag)));let o="";return n.forEach((e=>{var n;(null!==(n=t[e])&&void 0!==n?n:[]).forEach((({value:t,include:e})=>{e&&(o+=t)}))})),e+o}function Q(t,e){return t.map((t=>function(t,e){return[e?":scope":":root",...y(t,e).reverse().map((t=>{var e;const n=function(t,e,n=o.NONE){const r={};return e.forEach((e=>{Reflect.set(r,e,function(t,e){return G[e](t)}(t,e).map(J))})),{element:t,operator:n,selectors:r}}(t,[r.nthchild],o.CHILD);return(null!==(e=n.selectors.nthchild)&&void 0!==e?e:[]).forEach((t=>{t.include=!0})),n})).map(K)].join("")}(t,e))).join(N)}function X(t,e={}){return Z(t,Object.assign(Object.assign({},e),{maxResults:1})).next().value}function*Z(t,e={}){var o;const i=function(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter(n);return[...new Set(e)]}(t),c=function(t,e={}){const n=Object.assign(Object.assign({},s),e);return{selectors:(o=n.selectors,Array.isArray(o)?o.filter((t=>{return e=r,n=t,Object.values(e).includes(n);var e,n})):[]),whitelist:a(n.whitelist),blacklist:a(n.blacklist),root:d(n.root,t),combineWithinSelector:!!n.combineWithinSelector,combineBetweenSelectors:!!n.combineBetweenSelectors,includeTag:!!n.includeTag,maxCombinations:m(n.maxCombinations),maxCandidates:m(n.maxCandidates),useScope:!!n.useScope,maxResults:m(n.maxResults)};var o}(i[0],e),u=null!==(o=c.root)&&void 0!==o?o:S(i[0]);let l=0;for(const t of function*({elements:t,root:e,rootSelector:n="",options:o}){let r=e,i=n,c=!0;for(;c;){let n=!1;for(const c of z(t,r,i,o)){const{foundElements:o,selector:s}=c;if(n=!0,!h(t,s,e)){r=o[0],i=s;break}yield s}n||(c=!1)}}({elements:i,options:c,root:u,rootSelector:""}))if(yield t,l++,l>=c.maxResults)return;i.length>1&&(yield i.map((t=>X(t,c))).join(N),l++,l>=c.maxResults)||(yield Q(i,c.useScope?u:void 0))}const tt=X;return e})()));', ft = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), Ti = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), YA = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), Fe = (r, t) => {
|
|
1198
1198
|
const e = r.createElement("script");
|
|
1199
1199
|
return e.dataset.readium = "true", e.src = t.startsWith("blob:") ? t : ft(t, "text/javascript"), e;
|
|
1200
|
-
},
|
|
1200
|
+
}, NA = (r, t) => {
|
|
1201
1201
|
const e = r.createElement("link");
|
|
1202
1202
|
return e.dataset.readium = "true", e.rel = "stylesheet", e.type = "text/css", e.href = t.startsWith("blob:") ? t : ft(t, "text/css"), e;
|
|
1203
1203
|
}, $t = /* @__PURE__ */ new Map(), Xt = (r, t) => {
|
|
1204
1204
|
if ($t.has(r)) return $t.get(r);
|
|
1205
1205
|
const e = t();
|
|
1206
1206
|
return $t.set(r, e), e;
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1207
|
+
}, xA = (r) => Fe(r, Xt("css-selector-generator", () => ft(
|
|
1208
|
+
xi,
|
|
1209
1209
|
"text/javascript"
|
|
1210
|
-
))),
|
|
1210
|
+
))), TA = `
|
|
1211
1211
|
window._readium_blockedEvents = [];
|
|
1212
1212
|
window._readium_blockEvents = false; // WebPub doesn't need event blocking
|
|
1213
1213
|
window._readium_eventBlocker = null;
|
|
1214
|
-
`,
|
|
1214
|
+
`, PA = (r) => Fe(r, Xt("webpub-js-before", () => ft(Ti(TA), "text/javascript"))), bA = (r) => Fe(r, Xt("webpub-js-after", () => ft(Ti(`
|
|
1215
1215
|
if(window.onload) window.onload = new Proxy(window.onload, {
|
|
1216
1216
|
apply: function(target, receiver, args) {
|
|
1217
1217
|
if(!window._readium_blockEvents) {
|
|
@@ -1221,7 +1221,7 @@ if(window.onload) window.onload = new Proxy(window.onload, {
|
|
|
1221
1221
|
_readium_blockedEvents.push([0, target, receiver, args]);
|
|
1222
1222
|
}
|
|
1223
1223
|
});`), "text/javascript")));
|
|
1224
|
-
class
|
|
1224
|
+
class jA {
|
|
1225
1225
|
constructor(t, e, i, A) {
|
|
1226
1226
|
this.pub = t, this.item = i, this.burl = i.toURL(e) || "", this.cssProperties = A;
|
|
1227
1227
|
}
|
|
@@ -1254,17 +1254,17 @@ class PA {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
finalizeDOM(t, e, i, A, n) {
|
|
1256
1256
|
if (!t) return "";
|
|
1257
|
-
if (t.head.appendChild(
|
|
1257
|
+
if (t.head.appendChild(NA(t, Xt("ReadiumCSS-webpub", () => ft(YA(QA), "text/css")))), n && this.setProperties(n, t), t.body.querySelectorAll("img").forEach((a) => {
|
|
1258
1258
|
a.setAttribute("fetchpriority", "high");
|
|
1259
1259
|
}), e !== void 0) {
|
|
1260
1260
|
const a = t.createElement("base");
|
|
1261
1261
|
a.href = e, a.dataset.readium = "true", t.head.firstChild.before(a);
|
|
1262
1262
|
}
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
let
|
|
1266
|
-
return i.string === "application/xhtml+xml" ?
|
|
1267
|
-
new Blob([
|
|
1263
|
+
const s = this.hasExecutable(t);
|
|
1264
|
+
s && t.head.firstChild.before(PA(t)), t.head.firstChild.before(xA(t)), s && t.head.appendChild(bA(t));
|
|
1265
|
+
let o;
|
|
1266
|
+
return i.string === "application/xhtml+xml" ? o = new XMLSerializer().serializeToString(t) : o = this.serializeAsHTML(t, A || ""), URL.createObjectURL(
|
|
1267
|
+
new Blob([o], {
|
|
1268
1268
|
type: i.isHTML ? i.string : "application/xhtml+xml"
|
|
1269
1269
|
})
|
|
1270
1270
|
);
|
|
@@ -1272,12 +1272,12 @@ class PA {
|
|
|
1272
1272
|
serializeAsHTML(t, e) {
|
|
1273
1273
|
const i = e.match(/<!DOCTYPE[^>]*>/i), A = i ? i[0] + `
|
|
1274
1274
|
` : "";
|
|
1275
|
-
let
|
|
1276
|
-
return A +
|
|
1275
|
+
let s = t.documentElement.outerHTML;
|
|
1276
|
+
return A + s;
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
|
-
const
|
|
1280
|
-
class
|
|
1279
|
+
const VA = Math.pow(2, 32), ke = () => Math.round(Math.random() * VA).toString(36), de = () => `${Math.round(performance.now())}-${ke()}-${ke()}`, lt = 1;
|
|
1280
|
+
class vA {
|
|
1281
1281
|
constructor(t) {
|
|
1282
1282
|
this.destination = null, this.registrar = /* @__PURE__ */ new Map(), this.origin = "", this.channelId = "", this.receiver = this.receive.bind(this), this.preLog = [], this.wnd = t, t.addEventListener("message", this.receiver);
|
|
1283
1283
|
}
|
|
@@ -1316,7 +1316,7 @@ class jA {
|
|
|
1316
1316
|
Array.isArray(t) || (t = [t]), t.forEach((A) => {
|
|
1317
1317
|
const n = this.registrar.get(A);
|
|
1318
1318
|
if (n && n.length >= 0) {
|
|
1319
|
-
if (n.find((
|
|
1319
|
+
if (n.find((s) => s.module === e)) throw new Error(`Trying to register another callback for combination of event ${A} and module ${e}`);
|
|
1320
1320
|
n.push({
|
|
1321
1321
|
cb: i,
|
|
1322
1322
|
module: e
|
|
@@ -1361,8 +1361,8 @@ class jA {
|
|
|
1361
1361
|
targetOrigin: this.origin,
|
|
1362
1362
|
transfer: A
|
|
1363
1363
|
});
|
|
1364
|
-
} catch (
|
|
1365
|
-
if (A.length > 0) throw
|
|
1364
|
+
} catch (s) {
|
|
1365
|
+
if (A.length > 0) throw s;
|
|
1366
1366
|
this.destination.postMessage(n, this.origin, A);
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
@@ -1402,7 +1402,7 @@ const L = class ht {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
1404
|
L.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), L.AUDITORY = new L("auditory"), L.TACTILE = new L("tactile"), L.TEXTUAL = new L("textual"), L.VISUAL = new L("visual");
|
|
1405
|
-
class
|
|
1405
|
+
class Ue {
|
|
1406
1406
|
/**
|
|
1407
1407
|
* Creates a [Encryption].
|
|
1408
1408
|
*/
|
|
@@ -1414,7 +1414,7 @@ class Re {
|
|
|
1414
1414
|
*/
|
|
1415
1415
|
static deserialize(t) {
|
|
1416
1416
|
if (t && t.algorithm)
|
|
1417
|
-
return new
|
|
1417
|
+
return new Ue({
|
|
1418
1418
|
algorithm: t.algorithm,
|
|
1419
1419
|
compression: t.compression,
|
|
1420
1420
|
originalLength: t.originalLength,
|
|
@@ -1462,16 +1462,16 @@ class P {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
Object.defineProperty(P.prototype, "encryption", {
|
|
1464
1464
|
get: function() {
|
|
1465
|
-
return
|
|
1465
|
+
return Ue.deserialize(this.otherProperties.encrypted);
|
|
1466
1466
|
}
|
|
1467
1467
|
});
|
|
1468
|
-
function
|
|
1468
|
+
function DA(r) {
|
|
1469
1469
|
return r && Array.isArray(r) ? r : void 0;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1472
|
-
return r && typeof r == "string" ? [r] :
|
|
1471
|
+
function Pi(r) {
|
|
1472
|
+
return r && typeof r == "string" ? [r] : DA(r);
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function Je(r) {
|
|
1475
1475
|
return typeof r == "string" ? new Date(r) : void 0;
|
|
1476
1476
|
}
|
|
1477
1477
|
function Nt(r) {
|
|
@@ -1480,7 +1480,7 @@ function Nt(r) {
|
|
|
1480
1480
|
function T(r) {
|
|
1481
1481
|
return Nt(r) !== void 0 && Math.sign(r) >= 0 ? r : void 0;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function HA(r) {
|
|
1484
1484
|
const t = new Array();
|
|
1485
1485
|
return r.forEach((e) => t.push(e)), t;
|
|
1486
1486
|
}
|
|
@@ -1494,23 +1494,23 @@ class m {
|
|
|
1494
1494
|
throw new Error("Invalid media type");
|
|
1495
1495
|
} else
|
|
1496
1496
|
throw new Error("Invalid media type");
|
|
1497
|
-
const
|
|
1497
|
+
const s = {};
|
|
1498
1498
|
for (let g = 1; g < A.length; g++) {
|
|
1499
1499
|
const M = A[g].split("=");
|
|
1500
1500
|
if (M.length === 2) {
|
|
1501
1501
|
const l = M[0].toLocaleLowerCase(), p = l === "charset" ? M[1].toUpperCase() : M[1];
|
|
1502
|
-
|
|
1502
|
+
s[l] = p;
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
|
-
const
|
|
1506
|
-
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) =>
|
|
1505
|
+
const o = {}, a = Object.keys(s);
|
|
1506
|
+
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) => o[g] = s[g]);
|
|
1507
1507
|
let h = "";
|
|
1508
|
-
for (const g in
|
|
1509
|
-
const M =
|
|
1508
|
+
for (const g in o) {
|
|
1509
|
+
const M = o[g];
|
|
1510
1510
|
h += `;${g}=${M}`;
|
|
1511
1511
|
}
|
|
1512
|
-
const c = `${e}/${i}${h}`, d =
|
|
1513
|
-
this.string = c, this.type = e, this.subtype = i, this.parameters =
|
|
1512
|
+
const c = `${e}/${i}${h}`, d = o.encoding;
|
|
1513
|
+
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding = d, this.name = t.name, this.fileExtension = t.fileExtension;
|
|
1514
1514
|
}
|
|
1515
1515
|
static parse(t) {
|
|
1516
1516
|
return new m(t);
|
|
@@ -1547,9 +1547,9 @@ class m {
|
|
|
1547
1547
|
if (!((this.type === "*" || this.type === e.type) && (this.subtype === "*" || this.subtype === e.subtype)))
|
|
1548
1548
|
return !1;
|
|
1549
1549
|
const i = new Set(
|
|
1550
|
-
Object.entries(this.parameters).map(([n,
|
|
1550
|
+
Object.entries(this.parameters).map(([n, s]) => `${n}=${s}`)
|
|
1551
1551
|
), A = new Set(
|
|
1552
|
-
Object.entries(e.parameters).map(([n,
|
|
1552
|
+
Object.entries(e.parameters).map(([n, s]) => `${n}=${s}`)
|
|
1553
1553
|
);
|
|
1554
1554
|
for (const n of Array.from(i.values()))
|
|
1555
1555
|
if (!A.has(n))
|
|
@@ -1939,7 +1939,7 @@ class m {
|
|
|
1939
1939
|
});
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
|
-
class
|
|
1942
|
+
class We {
|
|
1943
1943
|
constructor(t) {
|
|
1944
1944
|
this.uri = t, this.parameters = this.getParameters(t);
|
|
1945
1945
|
}
|
|
@@ -1958,11 +1958,11 @@ class Oe {
|
|
|
1958
1958
|
*/
|
|
1959
1959
|
expand(t) {
|
|
1960
1960
|
const e = (A) => A.split(",").map((n) => {
|
|
1961
|
-
const
|
|
1962
|
-
return
|
|
1961
|
+
const s = t[n];
|
|
1962
|
+
return s ? encodeURIComponent(s) : "";
|
|
1963
1963
|
}).join(","), i = (A) => "?" + A.split(",").map((n) => {
|
|
1964
|
-
const
|
|
1965
|
-
return
|
|
1964
|
+
const s = n.split("=")[0], o = t[s];
|
|
1965
|
+
return o ? `${s}=${encodeURIComponent(o)}` : "";
|
|
1966
1966
|
}).join("&");
|
|
1967
1967
|
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...A) => A[1] ? i(A[2]) : e(A[2]));
|
|
1968
1968
|
}
|
|
@@ -1979,17 +1979,17 @@ class S {
|
|
|
1979
1979
|
*/
|
|
1980
1980
|
static deserialize(t) {
|
|
1981
1981
|
if (!t) return;
|
|
1982
|
-
const e = Nt(t.progression), i = Nt(t.totalProgression), A = Nt(t.position), n = /* @__PURE__ */ new Map(),
|
|
1982
|
+
const e = Nt(t.progression), i = Nt(t.totalProgression), A = Nt(t.position), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set([
|
|
1983
1983
|
"fragment",
|
|
1984
1984
|
"fragments",
|
|
1985
1985
|
"progression",
|
|
1986
1986
|
"totalProgression",
|
|
1987
1987
|
"position"
|
|
1988
1988
|
]);
|
|
1989
|
-
return Object.entries(t).forEach(([
|
|
1990
|
-
|
|
1989
|
+
return Object.entries(t).forEach(([o, a]) => {
|
|
1990
|
+
s.has(o) || n.set(o, a);
|
|
1991
1991
|
}), new S({
|
|
1992
|
-
fragments:
|
|
1992
|
+
fragments: Pi(t.fragments || t.fragment),
|
|
1993
1993
|
progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
|
|
1994
1994
|
totalProgression: i !== void 0 && i >= 0 && i <= 1 ? i : void 0,
|
|
1995
1995
|
position: A !== void 0 && A > 0 ? A : void 0,
|
|
@@ -2094,7 +2094,7 @@ class gt {
|
|
|
2094
2094
|
size: T(t.size),
|
|
2095
2095
|
duration: T(t.duration),
|
|
2096
2096
|
bitrate: T(t.bitrate),
|
|
2097
|
-
languages:
|
|
2097
|
+
languages: Pi(t.language),
|
|
2098
2098
|
alternates: Tt.deserialize(t.alternate),
|
|
2099
2099
|
children: Tt.deserialize(t.children)
|
|
2100
2100
|
});
|
|
@@ -2104,7 +2104,7 @@ class gt {
|
|
|
2104
2104
|
*/
|
|
2105
2105
|
serialize() {
|
|
2106
2106
|
const t = { href: this.href };
|
|
2107
|
-
return this.templated !== void 0 && (t.templated = this.templated), this.type !== void 0 && (t.type = this.type), this.title !== void 0 && (t.title = this.title), this.rels && (t.rel =
|
|
2107
|
+
return this.templated !== void 0 && (t.templated = this.templated), this.type !== void 0 && (t.type = this.type), this.title !== void 0 && (t.title = this.title), this.rels && (t.rel = HA(this.rels)), this.properties && (t.properties = this.properties.serialize()), this.height !== void 0 && (t.height = this.height), this.width !== void 0 && (t.width = this.width), this.size !== void 0 && (t.size = this.size), this.duration !== void 0 && (t.duration = this.duration), this.bitrate !== void 0 && (t.bitrate = this.bitrate), this.languages && (t.language = this.languages), this.alternates && (t.alternate = this.alternates.serialize()), this.children && (t.children = this.children.serialize()), t;
|
|
2108
2108
|
}
|
|
2109
2109
|
/** MediaType of the linked resource. */
|
|
2110
2110
|
get mediaType() {
|
|
@@ -2121,14 +2121,14 @@ class gt {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
/** List of URI template parameter keys, if the `Link` is templated. */
|
|
2123
2123
|
get templateParameters() {
|
|
2124
|
-
return this.templated ? new
|
|
2124
|
+
return this.templated ? new We(this.href).parameters : /* @__PURE__ */ new Set();
|
|
2125
2125
|
}
|
|
2126
2126
|
/** Expands the `Link`'s HREF by replacing URI template variables by the given parameters.
|
|
2127
2127
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
2128
2128
|
*/
|
|
2129
2129
|
expandTemplate(t) {
|
|
2130
2130
|
return new gt({
|
|
2131
|
-
href: new
|
|
2131
|
+
href: new We(this.href).expand(t),
|
|
2132
2132
|
templated: !1
|
|
2133
2133
|
});
|
|
2134
2134
|
}
|
|
@@ -2283,7 +2283,7 @@ class Pt {
|
|
|
2283
2283
|
return this.charOffset !== void 0 && (t.charOffset = this.charOffset), t;
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
|
-
class
|
|
2286
|
+
class Re {
|
|
2287
2287
|
/**
|
|
2288
2288
|
* Creates a [DomRange].
|
|
2289
2289
|
*/
|
|
@@ -2297,7 +2297,7 @@ class Ce {
|
|
|
2297
2297
|
if (!t) return;
|
|
2298
2298
|
let e = Pt.deserialize(t.start);
|
|
2299
2299
|
if (e)
|
|
2300
|
-
return new
|
|
2300
|
+
return new Re({
|
|
2301
2301
|
start: e,
|
|
2302
2302
|
end: Pt.deserialize(t.end)
|
|
2303
2303
|
});
|
|
@@ -2317,7 +2317,7 @@ S.prototype.getPartialCfi = function() {
|
|
|
2317
2317
|
return this.otherLocations?.get("partialCfi");
|
|
2318
2318
|
};
|
|
2319
2319
|
S.prototype.getDomRange = function() {
|
|
2320
|
-
return
|
|
2320
|
+
return Re.deserialize(this.otherLocations?.get("domRange"));
|
|
2321
2321
|
};
|
|
2322
2322
|
S.prototype.fragmentParameters = function() {
|
|
2323
2323
|
return new Map(
|
|
@@ -2351,7 +2351,7 @@ S.prototype.space = function() {
|
|
|
2351
2351
|
if (t.length === 4 && !t.some(isNaN))
|
|
2352
2352
|
return t;
|
|
2353
2353
|
};
|
|
2354
|
-
class
|
|
2354
|
+
class Ce {
|
|
2355
2355
|
/** Creates a [Price]. */
|
|
2356
2356
|
constructor(t) {
|
|
2357
2357
|
this.currency = t.currency, this.value = t.value;
|
|
@@ -2366,7 +2366,7 @@ class Se {
|
|
|
2366
2366
|
return;
|
|
2367
2367
|
let i = T(t.value);
|
|
2368
2368
|
if (i !== void 0)
|
|
2369
|
-
return new
|
|
2369
|
+
return new Ce({ currency: e, value: i });
|
|
2370
2370
|
}
|
|
2371
2371
|
/**
|
|
2372
2372
|
* Serializes a [Price] to its RWPM JSON representation.
|
|
@@ -2402,7 +2402,7 @@ class Bt {
|
|
|
2402
2402
|
return this.children && (t.children = this.children.map((e) => e.serialize())), t;
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
class
|
|
2405
|
+
class Se {
|
|
2406
2406
|
/** Creates a [Price]. */
|
|
2407
2407
|
constructor(t) {
|
|
2408
2408
|
this.total = t.total, this.position = t.position;
|
|
@@ -2412,7 +2412,7 @@ class ze {
|
|
|
2412
2412
|
*/
|
|
2413
2413
|
static deserialize(t) {
|
|
2414
2414
|
if (t)
|
|
2415
|
-
return new
|
|
2415
|
+
return new Se({
|
|
2416
2416
|
total: T(t.total),
|
|
2417
2417
|
position: T(t.position)
|
|
2418
2418
|
});
|
|
@@ -2425,7 +2425,7 @@ class ze {
|
|
|
2425
2425
|
return this.total !== void 0 && (t.total = this.total), this.position !== void 0 && (t.position = this.position), t;
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
class
|
|
2428
|
+
class ze {
|
|
2429
2429
|
/** Creates a [Copies]. */
|
|
2430
2430
|
constructor(t) {
|
|
2431
2431
|
this.total = t.total, this.available = t.available;
|
|
@@ -2435,7 +2435,7 @@ class Qe {
|
|
|
2435
2435
|
*/
|
|
2436
2436
|
static deserialize(t) {
|
|
2437
2437
|
if (t)
|
|
2438
|
-
return new
|
|
2438
|
+
return new ze({
|
|
2439
2439
|
total: T(t.total),
|
|
2440
2440
|
available: T(t.available)
|
|
2441
2441
|
});
|
|
@@ -2448,7 +2448,7 @@ class Qe {
|
|
|
2448
2448
|
return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
|
-
class
|
|
2451
|
+
class Qe {
|
|
2452
2452
|
/** Creates a [Availability]. */
|
|
2453
2453
|
constructor(t) {
|
|
2454
2454
|
this.state = t.state, this.since = t.since, this.until = t.until;
|
|
@@ -2458,10 +2458,10 @@ class Ye {
|
|
|
2458
2458
|
*/
|
|
2459
2459
|
static deserialize(t) {
|
|
2460
2460
|
if (t && t.state)
|
|
2461
|
-
return new
|
|
2461
|
+
return new Qe({
|
|
2462
2462
|
state: t.state,
|
|
2463
|
-
since:
|
|
2464
|
-
until:
|
|
2463
|
+
since: Je(t.since),
|
|
2464
|
+
until: Je(t.until)
|
|
2465
2465
|
});
|
|
2466
2466
|
}
|
|
2467
2467
|
/**
|
|
@@ -2476,7 +2476,7 @@ P.prototype.getNumberOfItems = function() {
|
|
|
2476
2476
|
return T(this.otherProperties.numberOfItems);
|
|
2477
2477
|
};
|
|
2478
2478
|
P.prototype.getPrice = function() {
|
|
2479
|
-
return
|
|
2479
|
+
return Ce.deserialize(this.otherProperties.price);
|
|
2480
2480
|
};
|
|
2481
2481
|
P.prototype.getIndirectAcquisitions = function() {
|
|
2482
2482
|
const r = this.otherProperties.indirectAcquisition;
|
|
@@ -2484,45 +2484,45 @@ P.prototype.getIndirectAcquisitions = function() {
|
|
|
2484
2484
|
return r.map((t) => Bt.deserialize(t)).filter((t) => t !== void 0);
|
|
2485
2485
|
};
|
|
2486
2486
|
P.prototype.getHolds = function() {
|
|
2487
|
-
return
|
|
2487
|
+
return Se.deserialize(this.otherProperties.holds);
|
|
2488
2488
|
};
|
|
2489
2489
|
P.prototype.getCopies = function() {
|
|
2490
|
-
return
|
|
2490
|
+
return ze.deserialize(this.otherProperties.copies);
|
|
2491
2491
|
};
|
|
2492
2492
|
P.prototype.getAvailability = function() {
|
|
2493
|
-
return
|
|
2493
|
+
return Qe.deserialize(this.otherProperties.availability);
|
|
2494
2494
|
};
|
|
2495
2495
|
P.prototype.getAuthenticate = function() {
|
|
2496
2496
|
return gt.deserialize(this.otherProperties.authenticate);
|
|
2497
2497
|
};
|
|
2498
|
-
const
|
|
2499
|
-
function
|
|
2500
|
-
console.warn(`${
|
|
2498
|
+
const GA = "CssSelectorGenerator";
|
|
2499
|
+
function Oe(r = "unknown problem", ...t) {
|
|
2500
|
+
console.warn(`${GA}: ${r}`, ...t);
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function kA(r) {
|
|
2503
2503
|
return r instanceof RegExp;
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function JA(r) {
|
|
2506
2506
|
return r.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".+");
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2508
|
+
function WA(r) {
|
|
2509
2509
|
const t = r.map((e) => {
|
|
2510
|
-
if (
|
|
2510
|
+
if (kA(e))
|
|
2511
2511
|
return (i) => e.test(i);
|
|
2512
2512
|
if (typeof e == "function")
|
|
2513
2513
|
return (i) => {
|
|
2514
2514
|
const A = e(i);
|
|
2515
|
-
return typeof A != "boolean" ? (
|
|
2515
|
+
return typeof A != "boolean" ? (Oe("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : A;
|
|
2516
2516
|
};
|
|
2517
2517
|
if (typeof e == "string") {
|
|
2518
|
-
const i = new RegExp("^" +
|
|
2518
|
+
const i = new RegExp("^" + JA(e) + "$");
|
|
2519
2519
|
return (A) => i.test(A);
|
|
2520
2520
|
}
|
|
2521
|
-
return
|
|
2521
|
+
return Oe("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
2522
2522
|
});
|
|
2523
2523
|
return (e) => t.some((i) => i(e));
|
|
2524
2524
|
}
|
|
2525
|
-
|
|
2525
|
+
WA([
|
|
2526
2526
|
"class",
|
|
2527
2527
|
"id",
|
|
2528
2528
|
// Angular attributes
|
|
@@ -2530,15 +2530,15 @@ kA([
|
|
|
2530
2530
|
]);
|
|
2531
2531
|
class Rt {
|
|
2532
2532
|
}
|
|
2533
|
-
function
|
|
2533
|
+
function Le(r) {
|
|
2534
2534
|
return r.split("").reverse().join("");
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2537
|
-
const i =
|
|
2536
|
+
function OA(r, t, e) {
|
|
2537
|
+
const i = Le(t);
|
|
2538
2538
|
return e.map((A) => {
|
|
2539
|
-
const n = Math.max(0, A.end - t.length - A.errors),
|
|
2539
|
+
const n = Math.max(0, A.end - t.length - A.errors), s = Le(r.slice(n, A.end));
|
|
2540
2540
|
return {
|
|
2541
|
-
start:
|
|
2541
|
+
start: bi(s, i, A.errors).reduce((o, a) => A.end - a.end < o ? A.end - a.end : o, A.end),
|
|
2542
2542
|
end: A.end,
|
|
2543
2543
|
errors: A.errors
|
|
2544
2544
|
};
|
|
@@ -2547,26 +2547,26 @@ function JA(r, t, e) {
|
|
|
2547
2547
|
function te(r) {
|
|
2548
2548
|
return (r | -r) >> 31 & 1;
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2550
|
+
function Xe(r, t, e, i) {
|
|
2551
2551
|
let A = r.P[e], n = r.M[e];
|
|
2552
|
-
const
|
|
2552
|
+
const s = i >>> 31, o = t[e] | s, a = o | n, h = (o & A) + A ^ A | o;
|
|
2553
2553
|
let c = n | ~(h | A), d = A & h;
|
|
2554
2554
|
const g = te(c & r.lastRowMask[e]) - te(d & r.lastRowMask[e]);
|
|
2555
|
-
return c <<= 1, d <<= 1, d |=
|
|
2555
|
+
return c <<= 1, d <<= 1, d |= s, c |= te(i) - s, A = d | ~(a | c), n = c & a, r.P[e] = A, r.M[e] = n, g;
|
|
2556
2556
|
}
|
|
2557
|
-
function
|
|
2557
|
+
function bi(r, t, e) {
|
|
2558
2558
|
if (t.length === 0)
|
|
2559
2559
|
return [];
|
|
2560
2560
|
e = Math.min(e, t.length);
|
|
2561
|
-
const i = [], A = 32, n = Math.ceil(t.length / A) - 1,
|
|
2561
|
+
const i = [], A = 32, n = Math.ceil(t.length / A) - 1, s = {
|
|
2562
2562
|
P: new Uint32Array(n + 1),
|
|
2563
2563
|
M: new Uint32Array(n + 1),
|
|
2564
2564
|
lastRowMask: new Uint32Array(n + 1)
|
|
2565
2565
|
};
|
|
2566
|
-
|
|
2567
|
-
const
|
|
2566
|
+
s.lastRowMask.fill(1 << 31), s.lastRowMask[n] = 1 << (t.length - 1) % A;
|
|
2567
|
+
const o = new Uint32Array(n + 1), a = /* @__PURE__ */ new Map(), h = [];
|
|
2568
2568
|
for (let g = 0; g < 256; g++)
|
|
2569
|
-
h.push(
|
|
2569
|
+
h.push(o);
|
|
2570
2570
|
for (let g = 0; g < t.length; g += 1) {
|
|
2571
2571
|
const M = t.charCodeAt(g);
|
|
2572
2572
|
if (a.has(M))
|
|
@@ -2587,23 +2587,23 @@ function Pi(r, t, e) {
|
|
|
2587
2587
|
d[g] = (g + 1) * A;
|
|
2588
2588
|
d[n] = t.length;
|
|
2589
2589
|
for (let g = 0; g <= c; g += 1)
|
|
2590
|
-
|
|
2590
|
+
s.P[g] = -1, s.M[g] = 0;
|
|
2591
2591
|
for (let g = 0; g < r.length; g += 1) {
|
|
2592
2592
|
const M = r.charCodeAt(g);
|
|
2593
2593
|
let l;
|
|
2594
|
-
M < h.length ? l = h[M] : (l = a.get(M), typeof l > "u" && (l =
|
|
2594
|
+
M < h.length ? l = h[M] : (l = a.get(M), typeof l > "u" && (l = o));
|
|
2595
2595
|
let p = 0;
|
|
2596
2596
|
for (let w = 0; w <= c; w += 1)
|
|
2597
|
-
p =
|
|
2597
|
+
p = Xe(s, l, w, p), d[w] += p;
|
|
2598
2598
|
if (d[c] - p <= e && c < n && (l[c + 1] & 1 || p < 0)) {
|
|
2599
|
-
c += 1,
|
|
2599
|
+
c += 1, s.P[c] = -1, s.M[c] = 0;
|
|
2600
2600
|
let w;
|
|
2601
2601
|
if (c === n) {
|
|
2602
2602
|
const E = t.length % A;
|
|
2603
2603
|
w = E === 0 ? A : E;
|
|
2604
2604
|
} else
|
|
2605
2605
|
w = A;
|
|
2606
|
-
d[c] = d[c - 1] + w - p +
|
|
2606
|
+
d[c] = d[c - 1] + w - p + Xe(s, l, c, p);
|
|
2607
2607
|
} else
|
|
2608
2608
|
for (; c > 0 && d[c] >= e + A; )
|
|
2609
2609
|
c -= 1;
|
|
@@ -2615,11 +2615,11 @@ function Pi(r, t, e) {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
return i;
|
|
2617
2617
|
}
|
|
2618
|
-
function
|
|
2619
|
-
const i =
|
|
2620
|
-
return
|
|
2618
|
+
function LA(r, t, e) {
|
|
2619
|
+
const i = bi(r, t, e);
|
|
2620
|
+
return OA(r, t, i);
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function ji(r, t, e) {
|
|
2623
2623
|
let i = 0;
|
|
2624
2624
|
const A = [];
|
|
2625
2625
|
for (; i !== -1; )
|
|
@@ -2628,36 +2628,36 @@ function bi(r, t, e) {
|
|
|
2628
2628
|
end: i + t.length,
|
|
2629
2629
|
errors: 0
|
|
2630
2630
|
}), i += 1);
|
|
2631
|
-
return A.length > 0 ? A :
|
|
2631
|
+
return A.length > 0 ? A : LA(r, t, e);
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
return t.length === 0 || r.length === 0 ? 0 : 1 -
|
|
2633
|
+
function Ze(r, t) {
|
|
2634
|
+
return t.length === 0 || r.length === 0 ? 0 : 1 - ji(r, t, t.length)[0].errors / t.length;
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2636
|
+
function XA(r, t, e = {}) {
|
|
2637
2637
|
if (t.length === 0)
|
|
2638
2638
|
return null;
|
|
2639
|
-
const i = Math.min(256, t.length / 2), A =
|
|
2639
|
+
const i = Math.min(256, t.length / 2), A = ji(r, t, i);
|
|
2640
2640
|
if (A.length === 0)
|
|
2641
2641
|
return null;
|
|
2642
|
-
const n = (
|
|
2643
|
-
const a = 1 -
|
|
2642
|
+
const n = (o) => {
|
|
2643
|
+
const a = 1 - o.errors / t.length, h = e.prefix ? Ze(
|
|
2644
2644
|
r.slice(
|
|
2645
|
-
Math.max(0,
|
|
2646
|
-
|
|
2645
|
+
Math.max(0, o.start - e.prefix.length),
|
|
2646
|
+
o.start
|
|
2647
2647
|
),
|
|
2648
2648
|
e.prefix
|
|
2649
|
-
) : 1, c = e.suffix ?
|
|
2650
|
-
r.slice(
|
|
2649
|
+
) : 1, c = e.suffix ? Ze(
|
|
2650
|
+
r.slice(o.end, o.end + e.suffix.length),
|
|
2651
2651
|
e.suffix
|
|
2652
2652
|
) : 1;
|
|
2653
2653
|
let d = 1;
|
|
2654
|
-
return typeof e.hint == "number" && (d = 1 - Math.abs(
|
|
2655
|
-
},
|
|
2656
|
-
start:
|
|
2657
|
-
end:
|
|
2658
|
-
score: n(
|
|
2654
|
+
return typeof e.hint == "number" && (d = 1 - Math.abs(o.start - e.hint) / r.length), (50 * a + 20 * h + 20 * c + 2 * d) / 92;
|
|
2655
|
+
}, s = A.map((o) => ({
|
|
2656
|
+
start: o.start,
|
|
2657
|
+
end: o.end,
|
|
2658
|
+
score: n(o)
|
|
2659
2659
|
}));
|
|
2660
|
-
return
|
|
2660
|
+
return s.sort((o, a) => a.score - o.score), s[0];
|
|
2661
2661
|
}
|
|
2662
2662
|
function ge(r, t, e) {
|
|
2663
2663
|
const i = e === 1 ? t : t - 1;
|
|
@@ -2666,10 +2666,10 @@ function ge(r, t, e) {
|
|
|
2666
2666
|
let A, n;
|
|
2667
2667
|
if (e === 2 ? (A = r.substring(0, t), n = A.trimEnd()) : (A = r.substring(t), n = A.trimStart()), !n.length)
|
|
2668
2668
|
return -1;
|
|
2669
|
-
const
|
|
2670
|
-
return e === 2 ? t -
|
|
2669
|
+
const s = A.length - n.length;
|
|
2670
|
+
return e === 2 ? t - s : t + s;
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function Ke(r, t) {
|
|
2673
2673
|
const e = r.commonAncestorContainer.ownerDocument.createNodeIterator(
|
|
2674
2674
|
r.commonAncestorContainer,
|
|
2675
2675
|
NodeFilter.SHOW_TEXT
|
|
@@ -2678,20 +2678,20 @@ function qe(r, t) {
|
|
|
2678
2678
|
for (; n && n !== i; )
|
|
2679
2679
|
n = e.nextNode();
|
|
2680
2680
|
t === 2 && (n = e.previousNode());
|
|
2681
|
-
let
|
|
2682
|
-
const
|
|
2681
|
+
let s = -1;
|
|
2682
|
+
const o = () => {
|
|
2683
2683
|
if (n = t === 1 ? e.nextNode() : e.previousNode(), n) {
|
|
2684
2684
|
const a = n.textContent, h = t === 1 ? 0 : a.length;
|
|
2685
|
-
|
|
2685
|
+
s = ge(a, h, t);
|
|
2686
2686
|
}
|
|
2687
2687
|
};
|
|
2688
|
-
for (; n &&
|
|
2689
|
-
|
|
2690
|
-
if (n &&
|
|
2691
|
-
return { node: n, offset:
|
|
2688
|
+
for (; n && s === -1 && n !== A; )
|
|
2689
|
+
o();
|
|
2690
|
+
if (n && s >= 0)
|
|
2691
|
+
return { node: n, offset: s };
|
|
2692
2692
|
throw new RangeError("No text nodes with non-whitespace text found in range");
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2694
|
+
function ZA(r) {
|
|
2695
2695
|
if (!r.toString().trim().length)
|
|
2696
2696
|
throw new RangeError("Range contains no non-whitespace text");
|
|
2697
2697
|
if (r.startContainer.nodeType !== Node.TEXT_NODE)
|
|
@@ -2717,24 +2717,24 @@ function LA(r) {
|
|
|
2717
2717
|
if (A.start >= 0 && (t.setStart(r.startContainer, A.start), e = !0), A.end > 0 && (t.setEnd(r.endContainer, A.end), i = !0), e && i)
|
|
2718
2718
|
return t;
|
|
2719
2719
|
if (!e) {
|
|
2720
|
-
const { node: n, offset:
|
|
2720
|
+
const { node: n, offset: s } = Ke(
|
|
2721
2721
|
t,
|
|
2722
2722
|
1
|
|
2723
2723
|
/* Forwards */
|
|
2724
2724
|
);
|
|
2725
|
-
n &&
|
|
2725
|
+
n && s >= 0 && t.setStart(n, s);
|
|
2726
2726
|
}
|
|
2727
2727
|
if (!i) {
|
|
2728
|
-
const { node: n, offset:
|
|
2728
|
+
const { node: n, offset: s } = Ke(
|
|
2729
2729
|
t,
|
|
2730
2730
|
2
|
|
2731
2731
|
/* Backwards */
|
|
2732
2732
|
);
|
|
2733
|
-
n &&
|
|
2733
|
+
n && s > 0 && t.setEnd(n, s);
|
|
2734
2734
|
}
|
|
2735
2735
|
return t;
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2737
|
+
function Vi(r) {
|
|
2738
2738
|
switch (r.nodeType) {
|
|
2739
2739
|
case Node.ELEMENT_NODE:
|
|
2740
2740
|
case Node.TEXT_NODE:
|
|
@@ -2743,23 +2743,23 @@ function ji(r) {
|
|
|
2743
2743
|
return 0;
|
|
2744
2744
|
}
|
|
2745
2745
|
}
|
|
2746
|
-
function
|
|
2746
|
+
function qe(r) {
|
|
2747
2747
|
let t = r.previousSibling, e = 0;
|
|
2748
2748
|
for (; t; )
|
|
2749
|
-
e +=
|
|
2749
|
+
e += Vi(t), t = t.previousSibling;
|
|
2750
2750
|
return e;
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function vi(r, ...t) {
|
|
2753
2753
|
let e = t.shift();
|
|
2754
2754
|
const i = r.ownerDocument.createNodeIterator(
|
|
2755
2755
|
r,
|
|
2756
2756
|
NodeFilter.SHOW_TEXT
|
|
2757
2757
|
), A = [];
|
|
2758
|
-
let n = i.nextNode(),
|
|
2758
|
+
let n = i.nextNode(), s, o = 0;
|
|
2759
2759
|
for (; e !== void 0 && n; )
|
|
2760
|
-
|
|
2761
|
-
for (; e !== void 0 &&
|
|
2762
|
-
A.push({ node:
|
|
2760
|
+
s = n, o + s.data.length > e ? (A.push({ node: s, offset: e - o }), e = t.shift()) : (n = i.nextNode(), o += s.data.length);
|
|
2761
|
+
for (; e !== void 0 && s && o === e; )
|
|
2762
|
+
A.push({ node: s, offset: s.data.length }), e = t.shift();
|
|
2763
2763
|
if (e !== void 0)
|
|
2764
2764
|
throw new RangeError("Offset exceeds text length");
|
|
2765
2765
|
return A;
|
|
@@ -2781,7 +2781,7 @@ class J {
|
|
|
2781
2781
|
throw new Error("Parent is not an ancestor of current element");
|
|
2782
2782
|
let e = this.element, i = this.offset;
|
|
2783
2783
|
for (; e !== t; )
|
|
2784
|
-
i +=
|
|
2784
|
+
i += qe(e), e = e.parentElement;
|
|
2785
2785
|
return new J(e, i);
|
|
2786
2786
|
}
|
|
2787
2787
|
/**
|
|
@@ -2803,7 +2803,7 @@ class J {
|
|
|
2803
2803
|
*/
|
|
2804
2804
|
resolve(t = {}) {
|
|
2805
2805
|
try {
|
|
2806
|
-
return
|
|
2806
|
+
return vi(this.element, this.offset)[0];
|
|
2807
2807
|
} catch (e) {
|
|
2808
2808
|
if (this.offset === 0 && t.direction !== void 0) {
|
|
2809
2809
|
const i = document.createTreeWalker(
|
|
@@ -2846,7 +2846,7 @@ class J {
|
|
|
2846
2846
|
throw new Error("Text node offset is out of range");
|
|
2847
2847
|
if (!t.parentElement)
|
|
2848
2848
|
throw new Error("Text node has no parent");
|
|
2849
|
-
const i =
|
|
2849
|
+
const i = qe(t) + e;
|
|
2850
2850
|
return new J(t.parentElement, i);
|
|
2851
2851
|
}
|
|
2852
2852
|
case Node.ELEMENT_NODE: {
|
|
@@ -2854,7 +2854,7 @@ class J {
|
|
|
2854
2854
|
throw new Error("Child node offset is out of range");
|
|
2855
2855
|
let i = 0;
|
|
2856
2856
|
for (let A = 0; A < e; A++)
|
|
2857
|
-
i +=
|
|
2857
|
+
i += Vi(t.childNodes[A]);
|
|
2858
2858
|
return new J(t, i);
|
|
2859
2859
|
}
|
|
2860
2860
|
default:
|
|
@@ -2888,7 +2888,7 @@ class q {
|
|
|
2888
2888
|
*/
|
|
2889
2889
|
toRange() {
|
|
2890
2890
|
let t, e;
|
|
2891
|
-
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [t, e] =
|
|
2891
|
+
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [t, e] = vi(
|
|
2892
2892
|
this.start.element,
|
|
2893
2893
|
this.start.offset,
|
|
2894
2894
|
this.end.offset
|
|
@@ -2927,7 +2927,7 @@ class q {
|
|
|
2927
2927
|
* whitespace
|
|
2928
2928
|
*/
|
|
2929
2929
|
static trimmedRange(t) {
|
|
2930
|
-
return
|
|
2930
|
+
return ZA(q.fromRange(t).toRange());
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
2933
|
class bt {
|
|
@@ -2969,10 +2969,10 @@ class jt {
|
|
|
2969
2969
|
* Will throw if `range` does not contain any text nodes.
|
|
2970
2970
|
*/
|
|
2971
2971
|
static fromRange(t, e) {
|
|
2972
|
-
const i = t.textContent, A = q.fromRange(e).relativeTo(t), n = A.start.offset,
|
|
2973
|
-
return new jt(t, i.slice(n,
|
|
2974
|
-
prefix: i.slice(Math.max(0, n -
|
|
2975
|
-
suffix: i.slice(
|
|
2972
|
+
const i = t.textContent, A = q.fromRange(e).relativeTo(t), n = A.start.offset, s = A.end.offset, o = 32;
|
|
2973
|
+
return new jt(t, i.slice(n, s), {
|
|
2974
|
+
prefix: i.slice(Math.max(0, n - o), n),
|
|
2975
|
+
suffix: i.slice(s, Math.min(i.length, s + o))
|
|
2976
2976
|
});
|
|
2977
2977
|
}
|
|
2978
2978
|
static fromSelector(t, e) {
|
|
@@ -2991,7 +2991,7 @@ class jt {
|
|
|
2991
2991
|
return this.toPositionAnchor(t).toRange();
|
|
2992
2992
|
}
|
|
2993
2993
|
toPositionAnchor(t = {}) {
|
|
2994
|
-
const e = this.root.textContent, i =
|
|
2994
|
+
const e = this.root.textContent, i = XA(e, this.exact, {
|
|
2995
2995
|
...this.context,
|
|
2996
2996
|
hint: t.hint
|
|
2997
2997
|
});
|
|
@@ -3000,7 +3000,7 @@ class jt {
|
|
|
3000
3000
|
return new bt(this.root, i.start, i.end);
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
|
-
function
|
|
3003
|
+
function KA(r) {
|
|
3004
3004
|
const t = r.tagName.toUpperCase();
|
|
3005
3005
|
return t === "IMG" || t === "VIDEO" || t === "AUDIO" || t === "IFRAME" || t === "OBJECT" || t === "EMBED" || t === "CANVAS";
|
|
3006
3006
|
}
|
|
@@ -3029,7 +3029,7 @@ function Zt(r, t) {
|
|
|
3029
3029
|
}
|
|
3030
3030
|
if (A) {
|
|
3031
3031
|
const n = r.createRange();
|
|
3032
|
-
return A.childNodes.length === 0 ||
|
|
3032
|
+
return A.childNodes.length === 0 || KA(A) ? (n.selectNode(A), n) : (n.setStartBefore(A), n.setEndAfter(A), n);
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
3035
|
} catch (e) {
|
|
@@ -3037,7 +3037,7 @@ function Zt(r, t) {
|
|
|
3037
3037
|
}
|
|
3038
3038
|
return null;
|
|
3039
3039
|
}
|
|
3040
|
-
function
|
|
3040
|
+
function qA(r, t) {
|
|
3041
3041
|
let e = r.getClientRects();
|
|
3042
3042
|
e.length || r.commonAncestorContainer.nodeType === Node.ELEMENT_NODE && (e = r.commonAncestorContainer.getClientRects());
|
|
3043
3043
|
const i = 1, A = [];
|
|
@@ -3050,30 +3050,30 @@ function ZA(r, t) {
|
|
|
3050
3050
|
top: h.top,
|
|
3051
3051
|
width: h.width
|
|
3052
3052
|
});
|
|
3053
|
-
const n =
|
|
3053
|
+
const n = Di(
|
|
3054
3054
|
A,
|
|
3055
3055
|
i
|
|
3056
|
-
),
|
|
3057
|
-
for (let h =
|
|
3058
|
-
const c =
|
|
3056
|
+
), s = $A(n, i), o = Hi(s), a = 4;
|
|
3057
|
+
for (let h = o.length - 1; h >= 0; h--) {
|
|
3058
|
+
const c = o[h];
|
|
3059
3059
|
if (!(c.width * c.height > a))
|
|
3060
|
-
if (
|
|
3061
|
-
|
|
3060
|
+
if (o.length > 1)
|
|
3061
|
+
o.splice(h, 1);
|
|
3062
3062
|
else
|
|
3063
3063
|
break;
|
|
3064
3064
|
}
|
|
3065
|
-
return
|
|
3065
|
+
return o;
|
|
3066
3066
|
}
|
|
3067
|
-
function
|
|
3067
|
+
function Di(r, t, e) {
|
|
3068
3068
|
for (let i = 0; i < r.length; i++)
|
|
3069
3069
|
for (let A = i + 1; A < r.length; A++) {
|
|
3070
|
-
const n = r[i],
|
|
3071
|
-
if (n ===
|
|
3070
|
+
const n = r[i], s = r[A];
|
|
3071
|
+
if (n === s)
|
|
3072
3072
|
continue;
|
|
3073
|
-
const
|
|
3074
|
-
if (
|
|
3075
|
-
const h = r.filter((d) => d !== n && d !==
|
|
3076
|
-
return h.push(c),
|
|
3073
|
+
const o = D(n.top, s.top, t) && D(n.bottom, s.bottom, t), a = D(n.left, s.left, t) && D(n.right, s.right, t);
|
|
3074
|
+
if (o && !a && Gi(n, s, t)) {
|
|
3075
|
+
const h = r.filter((d) => d !== n && d !== s), c = _A(n, s);
|
|
3076
|
+
return h.push(c), Di(
|
|
3077
3077
|
h,
|
|
3078
3078
|
t
|
|
3079
3079
|
);
|
|
@@ -3081,7 +3081,7 @@ function vi(r, t, e) {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
return r;
|
|
3083
3083
|
}
|
|
3084
|
-
function
|
|
3084
|
+
function _A(r, t) {
|
|
3085
3085
|
const e = Math.min(r.left, t.left), i = Math.max(r.right, t.right), A = Math.min(r.top, t.top), n = Math.max(r.bottom, t.bottom);
|
|
3086
3086
|
return {
|
|
3087
3087
|
bottom: n,
|
|
@@ -3092,7 +3092,7 @@ function KA(r, t) {
|
|
|
3092
3092
|
width: i - e
|
|
3093
3093
|
};
|
|
3094
3094
|
}
|
|
3095
|
-
function
|
|
3095
|
+
function $A(r, t) {
|
|
3096
3096
|
const e = new Set(r);
|
|
3097
3097
|
for (const i of r) {
|
|
3098
3098
|
if (!(i.width > 1 && i.height > 1)) {
|
|
@@ -3100,40 +3100,40 @@ function qA(r, t) {
|
|
|
3100
3100
|
continue;
|
|
3101
3101
|
}
|
|
3102
3102
|
for (const A of r)
|
|
3103
|
-
if (i !== A && e.has(A) &&
|
|
3103
|
+
if (i !== A && e.has(A) && tn(A, i, t)) {
|
|
3104
3104
|
e.delete(i);
|
|
3105
3105
|
break;
|
|
3106
3106
|
}
|
|
3107
3107
|
}
|
|
3108
3108
|
return Array.from(e);
|
|
3109
3109
|
}
|
|
3110
|
-
function
|
|
3110
|
+
function tn(r, t, e) {
|
|
3111
3111
|
return Ct(r, t.left, t.top, e) && Ct(r, t.right, t.top, e) && Ct(r, t.left, t.bottom, e) && Ct(r, t.right, t.bottom, e);
|
|
3112
3112
|
}
|
|
3113
3113
|
function Ct(r, t, e, i) {
|
|
3114
3114
|
return (r.left < t || D(r.left, t, i)) && (r.right > t || D(r.right, t, i)) && (r.top < e || D(r.top, e, i)) && (r.bottom > e || D(r.bottom, e, i));
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function Hi(r) {
|
|
3117
3117
|
for (let t = 0; t < r.length; t++)
|
|
3118
3118
|
for (let e = t + 1; e < r.length; e++) {
|
|
3119
3119
|
const i = r[t], A = r[e];
|
|
3120
|
-
if (i !== A &&
|
|
3121
|
-
let n = [],
|
|
3122
|
-
const
|
|
3123
|
-
if (
|
|
3124
|
-
n =
|
|
3120
|
+
if (i !== A && Gi(i, A, -1)) {
|
|
3121
|
+
let n = [], s;
|
|
3122
|
+
const o = _e(i, A);
|
|
3123
|
+
if (o.length === 1)
|
|
3124
|
+
n = o, s = i;
|
|
3125
3125
|
else {
|
|
3126
|
-
const h =
|
|
3127
|
-
|
|
3126
|
+
const h = _e(A, i);
|
|
3127
|
+
o.length < h.length ? (n = o, s = i) : (n = h, s = A);
|
|
3128
3128
|
}
|
|
3129
|
-
const a = r.filter((h) => h !==
|
|
3130
|
-
return Array.prototype.push.apply(a, n),
|
|
3129
|
+
const a = r.filter((h) => h !== s);
|
|
3130
|
+
return Array.prototype.push.apply(a, n), Hi(a);
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
3133
|
return r;
|
|
3134
3134
|
}
|
|
3135
|
-
function
|
|
3136
|
-
const e =
|
|
3135
|
+
function _e(r, t) {
|
|
3136
|
+
const e = en(t, r);
|
|
3137
3137
|
if (e.height === 0 || e.width === 0)
|
|
3138
3138
|
return [r];
|
|
3139
3139
|
const i = [];
|
|
@@ -3183,7 +3183,7 @@ function $e(r, t) {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
return i;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function en(r, t) {
|
|
3187
3187
|
const e = Math.max(r.left, t.left), i = Math.min(r.right, t.right), A = Math.max(r.top, t.top), n = Math.min(r.bottom, t.bottom);
|
|
3188
3188
|
return {
|
|
3189
3189
|
bottom: n,
|
|
@@ -3194,20 +3194,20 @@ function $A(r, t) {
|
|
|
3194
3194
|
width: Math.max(0, i - e)
|
|
3195
3195
|
};
|
|
3196
3196
|
}
|
|
3197
|
-
function
|
|
3197
|
+
function Gi(r, t, e) {
|
|
3198
3198
|
return (r.left < t.right || e >= 0 && D(r.left, t.right, e)) && (t.left < r.right || e >= 0 && D(t.left, r.right, e)) && (r.top < t.bottom || e >= 0 && D(r.top, t.bottom, e)) && (t.top < r.bottom || e >= 0 && D(t.top, r.bottom, e));
|
|
3199
3199
|
}
|
|
3200
3200
|
function D(r, t, e) {
|
|
3201
3201
|
return Math.abs(r - t) <= e;
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3203
|
+
function Ye(r) {
|
|
3204
3204
|
const t = {}, e = r.document.documentElement.style;
|
|
3205
3205
|
for (const i in r.document.documentElement.style)
|
|
3206
3206
|
Object.hasOwn(e, i) && !Number.isNaN(Number.parseInt(i)) && (t[e[i]] = e.getPropertyValue(e[i]));
|
|
3207
3207
|
return t;
|
|
3208
3208
|
}
|
|
3209
|
-
function
|
|
3210
|
-
const e =
|
|
3209
|
+
function ki(r, t) {
|
|
3210
|
+
const e = Ye(r);
|
|
3211
3211
|
Object.keys(e).forEach((i) => {
|
|
3212
3212
|
t.hasOwnProperty(i) || Kt(r, i);
|
|
3213
3213
|
}), Object.entries(t).forEach(([i, A]) => {
|
|
@@ -3224,7 +3224,7 @@ function Kt(r, t) {
|
|
|
3224
3224
|
r.document.documentElement.style.removeProperty(t);
|
|
3225
3225
|
}
|
|
3226
3226
|
let St = null, ie = null, Mt = 0;
|
|
3227
|
-
const ct = { r: 255, g: 255, b: 255, a: 1 }, nt = /* @__PURE__ */ new Map(),
|
|
3227
|
+
const ct = { r: 255, g: 255, b: 255, a: 1 }, nt = /* @__PURE__ */ new Map(), An = () => {
|
|
3228
3228
|
if (!St)
|
|
3229
3229
|
if (typeof OffscreenCanvas < "u")
|
|
3230
3230
|
St = new OffscreenCanvas(5, 5), ie = St.getContext("2d", {
|
|
@@ -3239,7 +3239,7 @@ const ct = { r: 255, g: 255, b: 255, a: 1 }, nt = /* @__PURE__ */ new Map(), tn
|
|
|
3239
3239
|
});
|
|
3240
3240
|
}
|
|
3241
3241
|
return ie;
|
|
3242
|
-
},
|
|
3242
|
+
}, nn = (r) => {
|
|
3243
3243
|
if (!r) return !0;
|
|
3244
3244
|
const t = r.trim().toLowerCase();
|
|
3245
3245
|
return t.startsWith("var(") || [
|
|
@@ -3266,18 +3266,18 @@ const ct = { r: 255, g: 255, b: 255, a: 1 }, nt = /* @__PURE__ */ new Map(), tn
|
|
|
3266
3266
|
const e = t ? `${r}|${t}` : r, i = nt.get(e);
|
|
3267
3267
|
if (i !== void 0)
|
|
3268
3268
|
return i ?? ct;
|
|
3269
|
-
if (
|
|
3269
|
+
if (nn(r))
|
|
3270
3270
|
return zt(r, "Unsupported color format or special value."), nt.set(e, null), ct;
|
|
3271
|
-
const A =
|
|
3271
|
+
const A = An();
|
|
3272
3272
|
if (!A)
|
|
3273
3273
|
return zt(r, "Could not get canvas context."), nt.set(e, null), ct;
|
|
3274
3274
|
try {
|
|
3275
3275
|
Mt === 0 && A.clearRect(0, 0, 5, 5);
|
|
3276
|
-
const n = Mt % 5,
|
|
3277
|
-
A.clearRect(n,
|
|
3278
|
-
const
|
|
3276
|
+
const n = Mt % 5, s = Math.floor(Mt / 5);
|
|
3277
|
+
A.clearRect(n, s, 1, 1), t && (A.fillStyle = t, A.fillRect(n, s, 1, 1)), A.fillStyle = r, A.fillRect(n, s, 1, 1);
|
|
3278
|
+
const o = A.getImageData(n, s, 1, 1);
|
|
3279
3279
|
Mt = (Mt + 1) % 25;
|
|
3280
|
-
const [a, h, c, d] =
|
|
3280
|
+
const [a, h, c, d] = o.data;
|
|
3281
3281
|
if (d === 0)
|
|
3282
3282
|
return zt(r, "Fully transparent color."), nt.set(e, null), ct;
|
|
3283
3283
|
const g = { r: a, g: h, b: c, a: d / 255 };
|
|
@@ -3288,24 +3288,24 @@ const ct = { r: 255, g: 255, b: 255, a: 1 }, nt = /* @__PURE__ */ new Map(), tn
|
|
|
3288
3288
|
}, Ae = (r) => {
|
|
3289
3289
|
const t = r / 255;
|
|
3290
3290
|
return t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
3291
|
-
},
|
|
3291
|
+
}, $e = (r) => {
|
|
3292
3292
|
const t = Ae(r.r), e = Ae(r.g), i = Ae(r.b);
|
|
3293
3293
|
return 0.2126 * t + 0.7152 * e + 0.0722 * i;
|
|
3294
|
-
},
|
|
3295
|
-
const e = typeof r == "string" ? ue(r) : r, i = typeof t == "string" ? ue(t) : t, A =
|
|
3296
|
-
return (
|
|
3294
|
+
}, ti = (r, t) => {
|
|
3295
|
+
const e = typeof r == "string" ? ue(r) : r, i = typeof t == "string" ? ue(t) : t, A = $e(e), n = $e(i), s = Math.max(A, n), o = Math.min(A, n);
|
|
3296
|
+
return (s + 0.05) / (o + 0.05);
|
|
3297
3297
|
}, me = (r, t = null) => {
|
|
3298
|
-
const e = ue(r, t), i =
|
|
3298
|
+
const e = ue(r, t), i = ti(e, { r: 255, g: 255, b: 255, a: 1 }), A = ti(e, { r: 0, g: 0, b: 0, a: 1 });
|
|
3299
3299
|
return i > A;
|
|
3300
|
-
},
|
|
3301
|
-
class
|
|
3300
|
+
}, rn = (r, t = null) => me(r, t) ? "white" : "black", ei = "#FFFF00", sn = () => "Highlight" in window, ii = ["IMG", "IMAGE", "AUDIO", "VIDEO", "SVG"];
|
|
3301
|
+
class on {
|
|
3302
3302
|
/**
|
|
3303
3303
|
* Creates a DecorationGroup object
|
|
3304
3304
|
* @param id Unique HTML ID-adhering name of the group
|
|
3305
3305
|
* @param name Human-readable name of the group
|
|
3306
3306
|
*/
|
|
3307
3307
|
constructor(t, e, i, A) {
|
|
3308
|
-
this.wnd = t, this.comms = e, this.id = i, this.name = A, this.items = [], this.lastItemId = 0, this.container = void 0, this.activateable = !1, this.experimentalHighlights = !1, this.currentRender = 0,
|
|
3308
|
+
this.wnd = t, this.comms = e, this.id = i, this.name = A, this.items = [], this.lastItemId = 0, this.container = void 0, this.activateable = !1, this.experimentalHighlights = !1, this.currentRender = 0, sn() && (this.experimentalHighlights = !0, this.notTextFlag = /* @__PURE__ */ new Map());
|
|
3309
3309
|
}
|
|
3310
3310
|
get activeable() {
|
|
3311
3311
|
return this.activateable;
|
|
@@ -3324,7 +3324,7 @@ class rn {
|
|
|
3324
3324
|
return;
|
|
3325
3325
|
}
|
|
3326
3326
|
const A = i.commonAncestorContainer;
|
|
3327
|
-
A.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (
|
|
3327
|
+
A.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (ii.includes(A.nodeName.toUpperCase()) && this.notTextFlag?.set(e, !0), i.cloneContents().querySelector(ii.join(", ").toLowerCase()) && this.notTextFlag?.set(e, !0), (A.textContent?.trim() || "").length === 0 && this.notTextFlag?.set(e, !0));
|
|
3328
3328
|
const n = {
|
|
3329
3329
|
decoration: t,
|
|
3330
3330
|
id: e,
|
|
@@ -3365,10 +3365,10 @@ class rn {
|
|
|
3365
3365
|
experimentalLayout(t) {
|
|
3366
3366
|
const [e, i] = this.requireContainer(!0);
|
|
3367
3367
|
i.add(t.range);
|
|
3368
|
-
const A = ee(this.wnd, "--USER__backgroundColor") || this.wnd.getComputedStyle(this.wnd.document.documentElement).getPropertyValue("background-color"), n = t.decoration?.style?.tint ??
|
|
3368
|
+
const A = ee(this.wnd, "--USER__backgroundColor") || this.wnd.getComputedStyle(this.wnd.document.documentElement).getPropertyValue("background-color"), n = t.decoration?.style?.tint ?? ei;
|
|
3369
3369
|
e.innerHTML = `
|
|
3370
3370
|
::highlight(${this.id}) {
|
|
3371
|
-
color: ${
|
|
3371
|
+
color: ${rn(n, A)};
|
|
3372
3372
|
background-color: ${n};
|
|
3373
3373
|
}`;
|
|
3374
3374
|
}
|
|
@@ -3380,24 +3380,24 @@ class rn {
|
|
|
3380
3380
|
if (this.experimentalHighlights && !this.notTextFlag?.has(t.id))
|
|
3381
3381
|
return this.experimentalLayout(t);
|
|
3382
3382
|
const e = this.wnd.document.createElement("div");
|
|
3383
|
-
e.setAttribute("id", t.id), e.style.setProperty("pointer-events", "none");
|
|
3383
|
+
e.setAttribute("id", t.id), e.dataset.highlightId = t.decoration.id, e.style.setProperty("pointer-events", "none");
|
|
3384
3384
|
const i = this.wnd.innerWidth, A = parseInt(
|
|
3385
3385
|
getComputedStyle(this.wnd.document.documentElement).getPropertyValue(
|
|
3386
3386
|
"column-count"
|
|
3387
3387
|
)
|
|
3388
|
-
), n = i / (A || 1),
|
|
3388
|
+
), n = i / (A || 1), s = this.wnd.document.scrollingElement, o = s.scrollLeft, a = s.scrollTop, h = (l, p, w) => {
|
|
3389
3389
|
if (l.style.position = "absolute", t.decoration?.style?.width === "viewport") {
|
|
3390
3390
|
l.style.width = `${i}px`, l.style.height = `${p.height}px`;
|
|
3391
3391
|
let E = Math.floor(p.left / i) * i;
|
|
3392
|
-
l.style.left = `${E +
|
|
3392
|
+
l.style.left = `${E + o}px`, l.style.top = `${p.top + a}px`;
|
|
3393
3393
|
} else if (t.decoration?.style?.width === "bounds")
|
|
3394
|
-
l.style.width = `${w.width}px`, l.style.height = `${p.height}px`, l.style.left = `${w.left +
|
|
3394
|
+
l.style.width = `${w.width}px`, l.style.height = `${p.height}px`, l.style.left = `${w.left + o}px`, l.style.top = `${p.top + a}px`;
|
|
3395
3395
|
else if (t.decoration?.style?.width === "page") {
|
|
3396
3396
|
l.style.width = `${n}px`, l.style.height = `${p.height}px`;
|
|
3397
3397
|
let E = Math.floor(p.left / n) * n;
|
|
3398
|
-
l.style.left = `${E +
|
|
3398
|
+
l.style.left = `${E + o}px`, l.style.top = `${p.top + a}px`;
|
|
3399
3399
|
} else
|
|
3400
|
-
l.style.width = `${p.width}px`, l.style.height = `${p.height}px`, l.style.left = `${p.left +
|
|
3400
|
+
l.style.width = `${p.width}px`, l.style.height = `${p.height}px`, l.style.left = `${p.left + o}px`, l.style.top = `${p.top + a}px`;
|
|
3401
3401
|
}, c = t.range.getBoundingClientRect();
|
|
3402
3402
|
let d = this.wnd.document.createElement("template");
|
|
3403
3403
|
const g = this.getCurrentDarkMode();
|
|
@@ -3406,7 +3406,7 @@ class rn {
|
|
|
3406
3406
|
data-readium="true"
|
|
3407
3407
|
class="readium-highlight"
|
|
3408
3408
|
style="${[
|
|
3409
|
-
`background-color: ${t.decoration?.style?.tint ??
|
|
3409
|
+
`background-color: ${t.decoration?.style?.tint ?? ei} !important`,
|
|
3410
3410
|
//"opacity: 0.3 !important",
|
|
3411
3411
|
`mix-blend-mode: ${g ? "exclusion" : "multiply"} !important`,
|
|
3412
3412
|
"opacity: 1 !important",
|
|
@@ -3420,7 +3420,7 @@ class rn {
|
|
|
3420
3420
|
const l = M.cloneNode(!0);
|
|
3421
3421
|
l.style.setProperty("pointer-events", "none"), h(l, c, c), e.append(l);
|
|
3422
3422
|
} else {
|
|
3423
|
-
let l =
|
|
3423
|
+
let l = qA(
|
|
3424
3424
|
t.range
|
|
3425
3425
|
);
|
|
3426
3426
|
l = l.sort((p, w) => p.top < w.top ? -1 : p.top > w.top ? 1 : 0);
|
|
@@ -3461,7 +3461,7 @@ class rn {
|
|
|
3461
3461
|
this.experimentalHighlights && this.wnd.CSS.highlights.delete(this.id), this.container && (this.container.remove(), this.container = void 0);
|
|
3462
3462
|
}
|
|
3463
3463
|
}
|
|
3464
|
-
const
|
|
3464
|
+
const Ji = class pe extends Rt {
|
|
3465
3465
|
constructor() {
|
|
3466
3466
|
super(...arguments), this.resizeFrame = 0, this.lastGroupId = 0, this.groups = /* @__PURE__ */ new Map(), this.handleResizer = this.handleResize.bind(this);
|
|
3467
3467
|
}
|
|
@@ -3488,32 +3488,32 @@ const ki = class pe extends Rt {
|
|
|
3488
3488
|
mount(t, e) {
|
|
3489
3489
|
return this.wnd = t, e.register("decorate", pe.moduleName, (i, A) => {
|
|
3490
3490
|
const n = i;
|
|
3491
|
-
n.decoration && n.decoration.locator && (n.decoration.locator = X.deserialize(n.decoration.locator)), this.groups.has(n.group) || this.groups.set(n.group, new
|
|
3491
|
+
n.decoration && n.decoration.locator && (n.decoration.locator = X.deserialize(n.decoration.locator)), this.groups.has(n.group) || this.groups.set(n.group, new on(
|
|
3492
3492
|
t,
|
|
3493
3493
|
e,
|
|
3494
3494
|
`readium-decoration-${this.lastGroupId++}`,
|
|
3495
3495
|
n.group
|
|
3496
3496
|
));
|
|
3497
|
-
const
|
|
3497
|
+
const s = this.groups.get(n.group);
|
|
3498
3498
|
switch (n.action) {
|
|
3499
3499
|
case "add":
|
|
3500
|
-
|
|
3500
|
+
s?.add(n.decoration);
|
|
3501
3501
|
break;
|
|
3502
3502
|
case "remove":
|
|
3503
|
-
|
|
3503
|
+
s?.remove(n.decoration.id);
|
|
3504
3504
|
break;
|
|
3505
3505
|
case "clear":
|
|
3506
|
-
|
|
3506
|
+
s?.clear();
|
|
3507
3507
|
break;
|
|
3508
3508
|
case "update":
|
|
3509
|
-
|
|
3509
|
+
s?.update(n.decoration);
|
|
3510
3510
|
break;
|
|
3511
3511
|
}
|
|
3512
3512
|
A(!0);
|
|
3513
3513
|
}), this.resizeObserver = new ResizeObserver(() => t.requestAnimationFrame(() => this.handleResize())), this.resizeObserver.observe(t.document.body), t.addEventListener("orientationchange", this.handleResizer), t.addEventListener("resize", this.handleResizer), this.backgroundObserver = new MutationObserver((i) => {
|
|
3514
3514
|
i.some((A) => {
|
|
3515
3515
|
if (A.type === "attributes" && A.attributeName === "style") {
|
|
3516
|
-
const n = A.target,
|
|
3516
|
+
const n = A.target, s = A.oldValue, o = n.getAttribute("style"), a = this.extractCustomProperty(s, "--USER__appearance"), h = this.extractCustomProperty(o, "--USER__appearance"), c = this.extractCustomProperty(s, "--USER__backgroundColor"), d = this.extractCustomProperty(o, "--USER__backgroundColor");
|
|
3517
3517
|
return a !== h || c !== d;
|
|
3518
3518
|
}
|
|
3519
3519
|
return !1;
|
|
@@ -3529,9 +3529,9 @@ const ki = class pe extends Rt {
|
|
|
3529
3529
|
return t.removeEventListener("orientationchange", this.handleResizer), t.removeEventListener("resize", this.handleResizer), e.unregisterAll(pe.moduleName), this.resizeObserver.disconnect(), this.backgroundObserver.disconnect(), this.cleanup(), e.log("Decorator Unmounted"), !0;
|
|
3530
3530
|
}
|
|
3531
3531
|
};
|
|
3532
|
-
|
|
3533
|
-
let
|
|
3534
|
-
const
|
|
3532
|
+
Ji.moduleName = "decorator";
|
|
3533
|
+
let an = Ji;
|
|
3534
|
+
const Ai = "readium-snapper-style", Wi = class fe extends Rt {
|
|
3535
3535
|
constructor() {
|
|
3536
3536
|
super(...arguments), this.protected = !1;
|
|
3537
3537
|
}
|
|
@@ -3544,59 +3544,59 @@ const ni = "readium-snapper-style", Ji = class fe extends Rt {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
mount(t, e) {
|
|
3546
3546
|
const i = t.document.createElement("style");
|
|
3547
|
-
return i.dataset.readium = "true", i.id =
|
|
3547
|
+
return i.dataset.readium = "true", i.id = Ai, i.textContent = this.buildStyles(), t.document.head.appendChild(i), e.register("protect", fe.moduleName, (A, n) => {
|
|
3548
3548
|
this.protected = !0, i.textContent = this.buildStyles(), n(!0);
|
|
3549
3549
|
}), e.register("unprotect", fe.moduleName, (A, n) => {
|
|
3550
3550
|
this.protected = !1, i.textContent = this.buildStyles(), n(!0);
|
|
3551
3551
|
}), e.log("Snapper Mounted"), !0;
|
|
3552
3552
|
}
|
|
3553
3553
|
unmount(t, e) {
|
|
3554
|
-
return t.document.getElementById(
|
|
3554
|
+
return t.document.getElementById(Ai)?.remove(), e.log("Snapper Unmounted"), !0;
|
|
3555
3555
|
}
|
|
3556
3556
|
};
|
|
3557
|
-
|
|
3558
|
-
let
|
|
3557
|
+
Wi.moduleName = "snapper";
|
|
3558
|
+
let Ne = Wi;
|
|
3559
3559
|
function tt(r) {
|
|
3560
3560
|
return r.document.body.dir.toLowerCase() === "rtl";
|
|
3561
3561
|
}
|
|
3562
|
-
function
|
|
3562
|
+
function Oi(r) {
|
|
3563
3563
|
return parseInt(
|
|
3564
3564
|
r.getComputedStyle(
|
|
3565
3565
|
r.document.documentElement
|
|
3566
3566
|
).getPropertyValue("column-count")
|
|
3567
3567
|
);
|
|
3568
3568
|
}
|
|
3569
|
-
function
|
|
3569
|
+
function ln(r) {
|
|
3570
3570
|
const t = getComputedStyle(r), e = parseFloat(t.paddingTop || "0"), i = parseFloat(t.paddingBottom || "0");
|
|
3571
3571
|
return r.clientHeight - e - i;
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3574
|
-
const t =
|
|
3573
|
+
function ni(r) {
|
|
3574
|
+
const t = Oi(r);
|
|
3575
3575
|
if (!t)
|
|
3576
3576
|
return !1;
|
|
3577
3577
|
const e = r.document.querySelectorAll("div[id^='readium-virtual-page']");
|
|
3578
3578
|
for (const a of e)
|
|
3579
3579
|
a.remove();
|
|
3580
|
-
const i = e.length, A = r.document.scrollingElement.scrollWidth, n = r.visualViewport.width,
|
|
3581
|
-
if (
|
|
3582
|
-
for (let a = 0; a <
|
|
3580
|
+
const i = e.length, A = r.document.scrollingElement.scrollWidth, n = r.visualViewport.width, s = Math.round(A / n * t) % t, o = t === 1 || s === 0 ? 0 : t - s;
|
|
3581
|
+
if (o > 0)
|
|
3582
|
+
for (let a = 0; a < o; a++) {
|
|
3583
3583
|
const h = r.document.createElement("div");
|
|
3584
|
-
h.setAttribute("id", `readium-virtual-page-${a}`), h.dataset.readium = "true", CSS.supports("break-before", "column") ? h.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (h.style.breakInside = "avoid-column"), h.style.height =
|
|
3584
|
+
h.setAttribute("id", `readium-virtual-page-${a}`), h.dataset.readium = "true", CSS.supports("break-before", "column") ? h.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (h.style.breakInside = "avoid-column"), h.style.height = ln(r.document.documentElement) + "px"), h.innerHTML = "​", r.document.body.appendChild(h);
|
|
3585
3585
|
}
|
|
3586
|
-
return i !==
|
|
3586
|
+
return i !== o;
|
|
3587
3587
|
}
|
|
3588
|
-
function
|
|
3588
|
+
function Li(r) {
|
|
3589
3589
|
const t = r.document.createElement("style");
|
|
3590
3590
|
t.appendChild(r.document.createTextNode("*{}")), r.document.body.appendChild(t), r.document.body.removeChild(t);
|
|
3591
3591
|
}
|
|
3592
|
-
function
|
|
3592
|
+
function hn(r) {
|
|
3593
3593
|
return r < 0.5 ? 2 * r * r : -1 + (4 - 2 * r) * r;
|
|
3594
3594
|
}
|
|
3595
3595
|
function C(r) {
|
|
3596
3596
|
const t = r.getSelection();
|
|
3597
3597
|
t && t.removeAllRanges();
|
|
3598
3598
|
}
|
|
3599
|
-
const
|
|
3599
|
+
const cn = [
|
|
3600
3600
|
"a",
|
|
3601
3601
|
"audio",
|
|
3602
3602
|
"button",
|
|
@@ -3610,11 +3610,11 @@ const ln = [
|
|
|
3610
3610
|
"textarea",
|
|
3611
3611
|
"video"
|
|
3612
3612
|
];
|
|
3613
|
-
function
|
|
3614
|
-
return
|
|
3613
|
+
function Xi(r) {
|
|
3614
|
+
return cn.indexOf(r.nodeName.toLowerCase()) !== -1 || r.hasAttribute("contenteditable") && r.getAttribute("contenteditable")?.toLowerCase() !== "false" ? r : r.parentElement ? Xi(r.parentElement) : null;
|
|
3615
3615
|
}
|
|
3616
|
-
function
|
|
3617
|
-
const e =
|
|
3616
|
+
function xe(r, t) {
|
|
3617
|
+
const e = Zi(r, r.document.body, t), i = r._readium_cssSelectorGenerator.getCssSelector(e, {
|
|
3618
3618
|
selectors: ["tag", "id", "class", "nthchild", "nthoftype", "attribute"]
|
|
3619
3619
|
});
|
|
3620
3620
|
return new X({
|
|
@@ -3630,15 +3630,15 @@ function Te(r, t) {
|
|
|
3630
3630
|
})
|
|
3631
3631
|
});
|
|
3632
3632
|
}
|
|
3633
|
-
function
|
|
3633
|
+
function Zi(r, t, e) {
|
|
3634
3634
|
for (var i = 0; i < t.children.length; i++) {
|
|
3635
3635
|
const A = t.children[i];
|
|
3636
|
-
if (!
|
|
3637
|
-
return
|
|
3636
|
+
if (!un(A) && dn(r, A, e))
|
|
3637
|
+
return gn(r, A) ? A : Zi(r, A, e);
|
|
3638
3638
|
}
|
|
3639
3639
|
return t;
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function dn(r, t, e) {
|
|
3642
3642
|
if (t === document.body || t === document.documentElement)
|
|
3643
3643
|
return !0;
|
|
3644
3644
|
if (!document || !document.documentElement || !document.body)
|
|
@@ -3646,11 +3646,11 @@ function hn(r, t, e) {
|
|
|
3646
3646
|
const i = t.getBoundingClientRect();
|
|
3647
3647
|
return e ? i.bottom > 0 && i.top < r.innerHeight : i.right > 0 && i.left < r.innerWidth;
|
|
3648
3648
|
}
|
|
3649
|
-
function
|
|
3649
|
+
function gn(r, t) {
|
|
3650
3650
|
const e = t.getBoundingClientRect();
|
|
3651
3651
|
return e.top >= 0 && e.left >= 0 && e.bottom <= r.innerHeight && e.right <= r.innerWidth;
|
|
3652
3652
|
}
|
|
3653
|
-
function
|
|
3653
|
+
function un(r) {
|
|
3654
3654
|
const t = getComputedStyle(r);
|
|
3655
3655
|
if (t) {
|
|
3656
3656
|
const e = t.getPropertyValue("display");
|
|
@@ -3659,7 +3659,7 @@ function dn(r) {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
return !1;
|
|
3661
3661
|
}
|
|
3662
|
-
const
|
|
3662
|
+
const ri = "readium-column-snapper-style", mn = 200, Ki = class b extends Ne {
|
|
3663
3663
|
constructor() {
|
|
3664
3664
|
super(...arguments), this.shakeTimeout = 0, this.snappingCancelled = !1, this.alreadyScrollLeft = 0, this.overscroll = 0, this.cachedScrollWidth = 0, this.touchState = 0, this.startingX = void 0, this.endingX = void 0, this.onTouchStarter = this.onTouchStart.bind(this), this.onTouchEnder = this.onTouchEnd.bind(this), this.onWidthChanger = this.onWidthChange.bind(this), this.onTouchMover = this.onTouchMove.bind(this);
|
|
3665
3665
|
}
|
|
@@ -3697,15 +3697,15 @@ const oi = "readium-column-snapper-style", gn = 200, Zi = class b extends xe {
|
|
|
3697
3697
|
}
|
|
3698
3698
|
// Snaps the current offset to the page width.
|
|
3699
3699
|
snapCurrentOffset(t = !1, e = !1) {
|
|
3700
|
-
const i = this.wnd.scrollX > 0 ? this.wnd.scrollX : this.alreadyScrollLeft, A = this.doc(), n = this.dragOffset(),
|
|
3700
|
+
const i = this.wnd.scrollX > 0 ? this.wnd.scrollX : this.alreadyScrollLeft, A = this.doc(), n = this.dragOffset(), s = Oi(this.wnd), o = Math.min(Math.max(0, i), this.cachedScrollWidth), a = tt(this.wnd) ? -1 : 1, h = (
|
|
3701
3701
|
// The hurdle to overcome in order to change pages
|
|
3702
3702
|
a * (this.wnd.innerWidth / 3) * (a * n > 0 ? 2 : 1)
|
|
3703
|
-
), c = this.snapOffset(
|
|
3703
|
+
), c = this.snapOffset(o + h);
|
|
3704
3704
|
if (t && c !== this.scrollOffset()) {
|
|
3705
3705
|
this.snappingCancelled = !1;
|
|
3706
|
-
const d = (p, w, E, R) => E > R ? w : p + (w - p) *
|
|
3706
|
+
const d = (p, w, E, R) => E > R ? w : p + (w - p) * hn(E / R), g = (
|
|
3707
3707
|
/*Math.abs(startX - (this.useTransform ? currentOffset : 0)) < 10 ? 1 : */
|
|
3708
|
-
|
|
3708
|
+
mn * s
|
|
3709
3709
|
);
|
|
3710
3710
|
let M;
|
|
3711
3711
|
const l = (p) => {
|
|
@@ -3760,7 +3760,7 @@ const oi = "readium-column-snapper-style", gn = 200, Zi = class b extends xe {
|
|
|
3760
3760
|
if (this.wnd = t, this.comms = e, !super.mount(t, e)) return !1;
|
|
3761
3761
|
t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "paginated");
|
|
3762
3762
|
const i = t.document.createElement("style");
|
|
3763
|
-
i.dataset.readium = "true", i.id =
|
|
3763
|
+
i.dataset.readium = "true", i.id = ri, i.textContent = `
|
|
3764
3764
|
@keyframes readium-bounce-l-animation {
|
|
3765
3765
|
0%, 100% {transform: translate3d(0, 0, 0);}
|
|
3766
3766
|
50% {transform: translate3d(-50px, 0, 0);}
|
|
@@ -3796,110 +3796,110 @@ const oi = "readium-column-snapper-style", gn = 200, Zi = class b extends xe {
|
|
|
3796
3796
|
}
|
|
3797
3797
|
`, t.document.head.appendChild(i), this.resizeObserver = new ResizeObserver(() => {
|
|
3798
3798
|
t.requestAnimationFrame(() => {
|
|
3799
|
-
t &&
|
|
3799
|
+
t && ni(t);
|
|
3800
3800
|
}), this.onWidthChange();
|
|
3801
3801
|
}), this.resizeObserver.observe(t.document.body), this.mutationObserver = new MutationObserver((n) => {
|
|
3802
|
-
for (const
|
|
3803
|
-
if (
|
|
3804
|
-
const
|
|
3802
|
+
for (const s of n)
|
|
3803
|
+
if (s.target === this.wnd.document.documentElement) {
|
|
3804
|
+
const o = s.oldValue, a = s.target.getAttribute("style"), h = /transform\s*:\s*([^;]+)/, c = o?.match(h), d = a?.match(h);
|
|
3805
3805
|
(!c && !d || c && !d || c && d && c[1] !== d[1]) && (t.requestAnimationFrame(() => {
|
|
3806
|
-
t &&
|
|
3806
|
+
t && ni(t);
|
|
3807
3807
|
}), this.onWidthChange());
|
|
3808
3808
|
} else
|
|
3809
3809
|
t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth);
|
|
3810
3810
|
}), t.frameElement && this.mutationObserver.observe(t.frameElement, { attributes: !0, attributeFilter: ["style"] }), this.mutationObserver.observe(t.document, { attributes: !0, attributeFilter: ["style"] }), this.mutationObserver.observe(t.document.documentElement, { attributes: !0, attributeFilter: ["style"] });
|
|
3811
3811
|
const A = (n) => {
|
|
3812
|
-
const
|
|
3813
|
-
return this.doc().scrollLeft = this.snapOffset(n),
|
|
3812
|
+
const s = this.doc().scrollLeft;
|
|
3813
|
+
return this.doc().scrollLeft = this.snapOffset(n), s !== this.doc().scrollLeft;
|
|
3814
3814
|
};
|
|
3815
|
-
return t.addEventListener("orientationchange", this.onWidthChanger), t.addEventListener("resize", this.onWidthChanger), t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth), e.register("go_progression", b.moduleName, (n,
|
|
3816
|
-
const
|
|
3817
|
-
if (
|
|
3815
|
+
return t.addEventListener("orientationchange", this.onWidthChanger), t.addEventListener("resize", this.onWidthChanger), t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth), e.register("go_progression", b.moduleName, (n, s) => {
|
|
3816
|
+
const o = n;
|
|
3817
|
+
if (o < 0 || o > 1) {
|
|
3818
3818
|
e.send("error", {
|
|
3819
3819
|
message: "go_progression must be given a position from 0.0 to 1.0"
|
|
3820
|
-
}),
|
|
3820
|
+
}), s(!1);
|
|
3821
3821
|
return;
|
|
3822
3822
|
}
|
|
3823
3823
|
this.wnd.requestAnimationFrame(() => {
|
|
3824
3824
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3825
|
-
const a = this.cachedScrollWidth, h = tt(t) ? -1 : 1, c = a *
|
|
3826
|
-
this.doc().scrollLeft = this.snapOffset(c), this.reportProgress(), C(this.wnd),
|
|
3825
|
+
const a = this.cachedScrollWidth, h = tt(t) ? -1 : 1, c = a * o * h;
|
|
3826
|
+
this.doc().scrollLeft = this.snapOffset(c), this.reportProgress(), C(this.wnd), s(!0);
|
|
3827
3827
|
});
|
|
3828
|
-
}), e.register("go_id", b.moduleName, (n,
|
|
3829
|
-
const
|
|
3830
|
-
if (!
|
|
3831
|
-
|
|
3828
|
+
}), e.register("go_id", b.moduleName, (n, s) => {
|
|
3829
|
+
const o = t.document.getElementById(n);
|
|
3830
|
+
if (!o) {
|
|
3831
|
+
s(!1);
|
|
3832
3832
|
return;
|
|
3833
3833
|
}
|
|
3834
3834
|
this.wnd.requestAnimationFrame(() => {
|
|
3835
|
-
this.doc().scrollLeft = this.snapOffset(
|
|
3835
|
+
this.doc().scrollLeft = this.snapOffset(o.getBoundingClientRect().left + t.scrollX), this.reportProgress(), C(this.wnd), s(!0);
|
|
3836
3836
|
});
|
|
3837
|
-
}), e.register("go_text", b.moduleName, (n,
|
|
3838
|
-
let
|
|
3839
|
-
Array.isArray(n) && (n.length > 1 && (
|
|
3837
|
+
}), e.register("go_text", b.moduleName, (n, s) => {
|
|
3838
|
+
let o;
|
|
3839
|
+
Array.isArray(n) && (n.length > 1 && (o = n[1]), n = n[0]);
|
|
3840
3840
|
const a = At.deserialize(n), h = Zt(this.wnd.document, new X({
|
|
3841
3841
|
href: t.location.href,
|
|
3842
3842
|
type: "text/html",
|
|
3843
3843
|
text: a,
|
|
3844
|
-
locations:
|
|
3844
|
+
locations: o ? new S({
|
|
3845
3845
|
otherLocations: /* @__PURE__ */ new Map([
|
|
3846
|
-
["cssSelector",
|
|
3846
|
+
["cssSelector", o]
|
|
3847
3847
|
])
|
|
3848
3848
|
}) : void 0
|
|
3849
3849
|
}));
|
|
3850
3850
|
if (!h) {
|
|
3851
|
-
|
|
3851
|
+
s(!1);
|
|
3852
3852
|
return;
|
|
3853
3853
|
}
|
|
3854
3854
|
this.wnd.requestAnimationFrame(() => {
|
|
3855
|
-
this.doc().scrollLeft = this.snapOffset(h.getBoundingClientRect().left + t.scrollX), this.reportProgress(), C(this.wnd),
|
|
3855
|
+
this.doc().scrollLeft = this.snapOffset(h.getBoundingClientRect().left + t.scrollX), this.reportProgress(), C(this.wnd), s(!0);
|
|
3856
3856
|
});
|
|
3857
|
-
}), e.register("go_end", b.moduleName, (n,
|
|
3858
|
-
const
|
|
3857
|
+
}), e.register("go_end", b.moduleName, (n, s) => {
|
|
3858
|
+
const o = tt(t) ? -1 : 1;
|
|
3859
3859
|
this.wnd.requestAnimationFrame(() => {
|
|
3860
3860
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3861
|
-
const a = this.cachedScrollWidth *
|
|
3862
|
-
if (this.doc().scrollLeft === a) return
|
|
3863
|
-
this.doc().scrollLeft = this.snapOffset(a), this.reportProgress(), C(this.wnd),
|
|
3861
|
+
const a = this.cachedScrollWidth * o;
|
|
3862
|
+
if (this.doc().scrollLeft === a) return s(!1);
|
|
3863
|
+
this.doc().scrollLeft = this.snapOffset(a), this.reportProgress(), C(this.wnd), s(!0);
|
|
3864
3864
|
});
|
|
3865
|
-
}), e.register("go_start", b.moduleName, (n,
|
|
3865
|
+
}), e.register("go_start", b.moduleName, (n, s) => {
|
|
3866
3866
|
this.wnd.requestAnimationFrame(() => {
|
|
3867
|
-
if (this.doc().scrollLeft === 0) return
|
|
3868
|
-
this.doc().scrollLeft = 0, this.reportProgress(), C(this.wnd),
|
|
3867
|
+
if (this.doc().scrollLeft === 0) return s(!1);
|
|
3868
|
+
this.doc().scrollLeft = 0, this.reportProgress(), C(this.wnd), s(!0);
|
|
3869
3869
|
});
|
|
3870
|
-
}), e.register("go_prev", b.moduleName, (n,
|
|
3870
|
+
}), e.register("go_prev", b.moduleName, (n, s) => {
|
|
3871
3871
|
this.wnd.requestAnimationFrame(() => {
|
|
3872
3872
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3873
|
-
const
|
|
3874
|
-
h && (this.reportProgress(), C(this.wnd)),
|
|
3873
|
+
const o = t.scrollX - t.innerWidth, a = tt(t) ? -(this.cachedScrollWidth - t.innerWidth) : 0, h = A(Math.max(o, a));
|
|
3874
|
+
h && (this.reportProgress(), C(this.wnd)), s(h);
|
|
3875
3875
|
});
|
|
3876
|
-
}), e.register("go_next", b.moduleName, (n,
|
|
3876
|
+
}), e.register("go_next", b.moduleName, (n, s) => {
|
|
3877
3877
|
this.wnd.requestAnimationFrame(() => {
|
|
3878
3878
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3879
|
-
const
|
|
3880
|
-
h && (this.reportProgress(), C(this.wnd)),
|
|
3879
|
+
const o = t.scrollX + t.innerWidth, a = tt(t) ? 0 : this.cachedScrollWidth - t.innerWidth, h = A(Math.min(o, a));
|
|
3880
|
+
h && (this.reportProgress(), C(this.wnd)), s(h);
|
|
3881
3881
|
});
|
|
3882
|
-
}), e.register("unfocus", b.moduleName, (n,
|
|
3883
|
-
this.snappingCancelled = !0, C(this.wnd),
|
|
3884
|
-
}), e.register("shake", b.moduleName, (n,
|
|
3885
|
-
this.shake(),
|
|
3886
|
-
}), e.register("focus", b.moduleName, (n,
|
|
3882
|
+
}), e.register("unfocus", b.moduleName, (n, s) => {
|
|
3883
|
+
this.snappingCancelled = !0, C(this.wnd), s(!0);
|
|
3884
|
+
}), e.register("shake", b.moduleName, (n, s) => {
|
|
3885
|
+
this.shake(), s(!0);
|
|
3886
|
+
}), e.register("focus", b.moduleName, (n, s) => {
|
|
3887
3887
|
this.wnd.requestAnimationFrame(() => {
|
|
3888
|
-
this.cachedScrollWidth = this.doc().scrollWidth, this.snapCurrentOffset(!1, !0), this.reportProgress(),
|
|
3888
|
+
this.cachedScrollWidth = this.doc().scrollWidth, this.snapCurrentOffset(!1, !0), this.reportProgress(), s(!0);
|
|
3889
3889
|
});
|
|
3890
|
-
}), e.register("first_visible_locator", b.moduleName, (n,
|
|
3891
|
-
const
|
|
3892
|
-
this.comms.send("first_visible_locator",
|
|
3890
|
+
}), e.register("first_visible_locator", b.moduleName, (n, s) => {
|
|
3891
|
+
const o = xe(t, !1);
|
|
3892
|
+
this.comms.send("first_visible_locator", o.serialize()), s(!0);
|
|
3893
3893
|
}), t.addEventListener("touchstart", this.onTouchStarter, { passive: !0 }), t.addEventListener("touchend", this.onTouchEnder, { passive: !0 }), t.addEventListener("touchmove", this.onTouchMover, { passive: !0 }), t.document.addEventListener("touchstart", () => {
|
|
3894
3894
|
}), e.log("ColumnSnapper Mounted"), !0;
|
|
3895
3895
|
}
|
|
3896
3896
|
unmount(t, e) {
|
|
3897
|
-
return this.snappingCancelled = !0, e.unregisterAll(b.moduleName), this.resizeObserver.disconnect(), this.mutationObserver.disconnect(), t.removeEventListener("touchstart", this.onTouchStarter), t.removeEventListener("touchend", this.onTouchEnder), t.removeEventListener("touchmove", this.onTouchMover), t.removeEventListener("orientationchange", this.onWidthChanger), t.removeEventListener("resize", this.onWidthChanger), t.document.getElementById(
|
|
3897
|
+
return this.snappingCancelled = !0, e.unregisterAll(b.moduleName), this.resizeObserver.disconnect(), this.mutationObserver.disconnect(), t.removeEventListener("touchstart", this.onTouchStarter), t.removeEventListener("touchend", this.onTouchEnder), t.removeEventListener("touchmove", this.onTouchMover), t.removeEventListener("orientationchange", this.onWidthChanger), t.removeEventListener("resize", this.onWidthChanger), t.document.getElementById(ri)?.remove(), e.log("ColumnSnapper Unmounted"), super.unmount(t, e);
|
|
3898
3898
|
}
|
|
3899
3899
|
};
|
|
3900
|
-
|
|
3901
|
-
let
|
|
3902
|
-
const si = "readium-scroll-snapper-style",
|
|
3900
|
+
Ki.moduleName = "column_snapper";
|
|
3901
|
+
let pn = Ki;
|
|
3902
|
+
const si = "readium-scroll-snapper-style", qi = class V extends Ne {
|
|
3903
3903
|
constructor() {
|
|
3904
3904
|
super(...arguments), this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce = null, this.handleScroll = () => {
|
|
3905
3905
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -3942,39 +3942,39 @@ const si = "readium-scroll-snapper-style", Ki = class V extends xe {
|
|
|
3942
3942
|
this.isResizing = !1, this.resizeDebounce = null, this.reportProgress();
|
|
3943
3943
|
}, 50);
|
|
3944
3944
|
}), this.resizeObserver.observe(t.document.body), t.addEventListener("scroll", this.handleScroll, { passive: !0 }), e.register("force_webkit_recalc", V.moduleName, () => {
|
|
3945
|
-
|
|
3945
|
+
Li(this.wnd);
|
|
3946
3946
|
const A = this.doc().scrollTop;
|
|
3947
3947
|
A > 1 ? this.doc().scrollTop = A - 1 : this.doc().scrollTop = A + 1, this.doc().scrollTop = A;
|
|
3948
3948
|
}), e.register("go_progression", V.moduleName, (A, n) => {
|
|
3949
|
-
const
|
|
3950
|
-
if (
|
|
3949
|
+
const s = A;
|
|
3950
|
+
if (s < 0 || s > 1) {
|
|
3951
3951
|
e.send("error", {
|
|
3952
3952
|
message: "go_progression must be given a position from 0.0 to 1.0"
|
|
3953
3953
|
}), n(!1);
|
|
3954
3954
|
return;
|
|
3955
3955
|
}
|
|
3956
3956
|
this.wnd.requestAnimationFrame(() => {
|
|
3957
|
-
this.doc().scrollTop = this.doc().offsetHeight *
|
|
3957
|
+
this.doc().scrollTop = this.doc().offsetHeight * s, this.reportProgress(), C(this.wnd), n(!0);
|
|
3958
3958
|
});
|
|
3959
3959
|
}), e.register("go_id", V.moduleName, (A, n) => {
|
|
3960
|
-
const
|
|
3961
|
-
if (!
|
|
3960
|
+
const s = t.document.getElementById(A);
|
|
3961
|
+
if (!s) {
|
|
3962
3962
|
n(!1);
|
|
3963
3963
|
return;
|
|
3964
3964
|
}
|
|
3965
3965
|
this.wnd.requestAnimationFrame(() => {
|
|
3966
|
-
this.doc().scrollTop =
|
|
3966
|
+
this.doc().scrollTop = s.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), n(!0);
|
|
3967
3967
|
});
|
|
3968
3968
|
}), e.register("go_text", V.moduleName, (A, n) => {
|
|
3969
|
-
let
|
|
3970
|
-
Array.isArray(A) && (A.length > 1 && (
|
|
3971
|
-
const
|
|
3969
|
+
let s;
|
|
3970
|
+
Array.isArray(A) && (A.length > 1 && (s = A[1]), A = A[0]);
|
|
3971
|
+
const o = At.deserialize(A), a = Zt(this.wnd.document, new X({
|
|
3972
3972
|
href: t.location.href,
|
|
3973
3973
|
type: "text/html",
|
|
3974
|
-
text:
|
|
3975
|
-
locations:
|
|
3974
|
+
text: o,
|
|
3975
|
+
locations: s ? new S({
|
|
3976
3976
|
otherLocations: /* @__PURE__ */ new Map([
|
|
3977
|
-
["cssSelector",
|
|
3977
|
+
["cssSelector", s]
|
|
3978
3978
|
])
|
|
3979
3979
|
}) : void 0
|
|
3980
3980
|
}));
|
|
@@ -3999,17 +3999,17 @@ const si = "readium-scroll-snapper-style", Ki = class V extends xe {
|
|
|
3999
3999
|
], V.moduleName, (A, n) => n(!1)), e.register("focus", V.moduleName, (A, n) => {
|
|
4000
4000
|
this.reportProgress(), n(!0);
|
|
4001
4001
|
}), e.register("first_visible_locator", V.moduleName, (A, n) => {
|
|
4002
|
-
const
|
|
4003
|
-
this.comms.send("first_visible_locator",
|
|
4002
|
+
const s = xe(t, !0);
|
|
4003
|
+
this.comms.send("first_visible_locator", s.serialize()), n(!0);
|
|
4004
4004
|
}), e.log("ScrollSnapper Mounted"), !0;
|
|
4005
4005
|
}
|
|
4006
4006
|
unmount(t, e) {
|
|
4007
4007
|
return e.unregisterAll(V.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(si)?.remove(), e.log("ScrollSnapper Unmounted"), !0;
|
|
4008
4008
|
}
|
|
4009
4009
|
};
|
|
4010
|
-
|
|
4011
|
-
let
|
|
4012
|
-
const
|
|
4010
|
+
qi.moduleName = "scroll_snapper";
|
|
4011
|
+
let fn = qi;
|
|
4012
|
+
const _i = class v extends Ne {
|
|
4013
4013
|
constructor() {
|
|
4014
4014
|
super(...arguments), this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce = null, this.handleScroll = () => {
|
|
4015
4015
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -4042,7 +4042,7 @@ const qi = class v extends xe {
|
|
|
4042
4042
|
this.isResizing = !1, this.resizeDebounce = null, this.reportProgress();
|
|
4043
4043
|
}, 50);
|
|
4044
4044
|
}), this.resizeObserver.observe(t.document.body), t.addEventListener("scroll", this.handleScroll, { passive: !0 }), e.register("force_webkit_recalc", v.moduleName, () => {
|
|
4045
|
-
|
|
4045
|
+
Li(this.wnd);
|
|
4046
4046
|
const i = this.doc().scrollTop;
|
|
4047
4047
|
i > 1 ? this.doc().scrollTop = i - 1 : this.doc().scrollTop = i + 1, this.doc().scrollTop = i;
|
|
4048
4048
|
}), e.register("go_progression", v.moduleName, (i, A) => {
|
|
@@ -4068,22 +4068,22 @@ const qi = class v extends xe {
|
|
|
4068
4068
|
}), e.register("go_text", v.moduleName, (i, A) => {
|
|
4069
4069
|
let n;
|
|
4070
4070
|
Array.isArray(i) && (i.length > 1 && (n = i[1]), i = i[0]);
|
|
4071
|
-
const
|
|
4071
|
+
const s = At.deserialize(i), o = Zt(this.wnd.document, new X({
|
|
4072
4072
|
href: t.location.href,
|
|
4073
4073
|
type: "text/html",
|
|
4074
|
-
text:
|
|
4074
|
+
text: s,
|
|
4075
4075
|
locations: n ? new S({
|
|
4076
4076
|
otherLocations: /* @__PURE__ */ new Map([
|
|
4077
4077
|
["cssSelector", n]
|
|
4078
4078
|
])
|
|
4079
4079
|
}) : void 0
|
|
4080
4080
|
}));
|
|
4081
|
-
if (!
|
|
4081
|
+
if (!o) {
|
|
4082
4082
|
A(!1);
|
|
4083
4083
|
return;
|
|
4084
4084
|
}
|
|
4085
4085
|
this.wnd.requestAnimationFrame(() => {
|
|
4086
|
-
this.doc().scrollTop =
|
|
4086
|
+
this.doc().scrollTop = o.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), A(!0);
|
|
4087
4087
|
});
|
|
4088
4088
|
}), e.register("go_start", v.moduleName, (i, A) => {
|
|
4089
4089
|
if (this.doc().scrollTop === 0) return A(!1);
|
|
@@ -4099,7 +4099,7 @@ const qi = class v extends xe {
|
|
|
4099
4099
|
], v.moduleName, (i, A) => A(!1)), e.register("focus", v.moduleName, (i, A) => {
|
|
4100
4100
|
this.reportProgress(), A(!0);
|
|
4101
4101
|
}), e.register("first_visible_locator", v.moduleName, (i, A) => {
|
|
4102
|
-
const n =
|
|
4102
|
+
const n = xe(t, !0);
|
|
4103
4103
|
e.send("first_visible_locator", n.serialize()), A(!0);
|
|
4104
4104
|
}), e.log("WebPubSnapper Mounted"), !0;
|
|
4105
4105
|
}
|
|
@@ -4107,9 +4107,9 @@ const qi = class v extends xe {
|
|
|
4107
4107
|
return e.unregisterAll(v.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), e.log("WebPubSnapper Unmounted"), !0;
|
|
4108
4108
|
}
|
|
4109
4109
|
};
|
|
4110
|
-
|
|
4111
|
-
let
|
|
4112
|
-
const
|
|
4110
|
+
_i.moduleName = "webpub_snapper";
|
|
4111
|
+
let Mn = _i;
|
|
4112
|
+
const $i = class extends Rt {
|
|
4113
4113
|
constructor() {
|
|
4114
4114
|
super(...arguments), this.pointerMoved = !1, this.onPointerUp = this.onPointUp.bind(this), this.onPointerMove = this.onPointMove.bind(this), this.onPointerDown = this.onPointDown.bind(this), this.onContextMenu = this.onContext.bind(this), this.onClicker = this.onClick.bind(this);
|
|
4115
4115
|
}
|
|
@@ -4119,7 +4119,7 @@ const _i = class extends Rt {
|
|
|
4119
4119
|
const A = e.getRangeAt(0)?.getClientRects();
|
|
4120
4120
|
if (!A || A.length === 0)
|
|
4121
4121
|
return;
|
|
4122
|
-
const n = A[0],
|
|
4122
|
+
const n = A[0], s = {
|
|
4123
4123
|
text: e.toString(),
|
|
4124
4124
|
x: n.x,
|
|
4125
4125
|
y: n.y,
|
|
@@ -4127,7 +4127,7 @@ const _i = class extends Rt {
|
|
|
4127
4127
|
height: n.height,
|
|
4128
4128
|
targetFrameSrc: this.wnd?.location?.href
|
|
4129
4129
|
};
|
|
4130
|
-
this.comms.send("text_selected",
|
|
4130
|
+
this.comms.send("text_selected", s);
|
|
4131
4131
|
}
|
|
4132
4132
|
if (this.pointerMoved) {
|
|
4133
4133
|
this.pointerMoved = !1;
|
|
@@ -4141,7 +4141,7 @@ const _i = class extends Rt {
|
|
|
4141
4141
|
y: t.clientY * i,
|
|
4142
4142
|
targetFrameSrc: this.wnd.location.href,
|
|
4143
4143
|
targetElement: t.target.outerHTML,
|
|
4144
|
-
interactiveElement:
|
|
4144
|
+
interactiveElement: Xi(t.target)?.outerHTML,
|
|
4145
4145
|
cssSelector: this.wnd._readium_cssSelectorGenerator.getCssSelector(t.target)
|
|
4146
4146
|
}), this.pointerMoved = !1;
|
|
4147
4147
|
}
|
|
@@ -4177,9 +4177,9 @@ const _i = class extends Rt {
|
|
|
4177
4177
|
return t.document.removeEventListener("pointerdown", this.onPointerDown), t.document.removeEventListener("pointerup", this.onPointerUp), t.document.removeEventListener("contextmenu", this.onContextMenu), t.document.removeEventListener("pointermove", this.onPointerMove), t.document.removeEventListener("click", this.onClicker), e.log("Peripherals Unmounted"), !0;
|
|
4178
4178
|
}
|
|
4179
4179
|
};
|
|
4180
|
-
|
|
4181
|
-
let
|
|
4182
|
-
const
|
|
4180
|
+
$i.moduleName = "peripherals";
|
|
4181
|
+
let Bn = $i;
|
|
4182
|
+
const tA = class Me extends Rt {
|
|
4183
4183
|
constructor() {
|
|
4184
4184
|
super(...arguments), this.mediaPlayingCount = 0, this.allAnimations = /* @__PURE__ */ new Set();
|
|
4185
4185
|
}
|
|
@@ -4229,7 +4229,7 @@ const $i = class Me extends Rt {
|
|
|
4229
4229
|
), Reflect.defineProperty(t.navigator, "epubReadingSystem", {
|
|
4230
4230
|
value: {
|
|
4231
4231
|
name: "readium-ts-toolkit",
|
|
4232
|
-
version: "2.2.
|
|
4232
|
+
version: "2.2.4",
|
|
4233
4233
|
hasFeature: (A, n = "") => {
|
|
4234
4234
|
switch (A) {
|
|
4235
4235
|
case "dom-manipulation":
|
|
@@ -4255,11 +4255,11 @@ const $i = class Me extends Rt {
|
|
|
4255
4255
|
}), "getAnimations" in t.document && t.document.getAnimations().forEach((A) => {
|
|
4256
4256
|
A.cancel(), this.allAnimations.add(A);
|
|
4257
4257
|
}), e.register("activate", Me.moduleName, (A, n) => {
|
|
4258
|
-
this.allAnimations.forEach((
|
|
4259
|
-
|
|
4258
|
+
this.allAnimations.forEach((s) => {
|
|
4259
|
+
s.cancel(), s.play();
|
|
4260
4260
|
}), n(!0);
|
|
4261
4261
|
}), e.register("unfocus", Me.moduleName, (A, n) => {
|
|
4262
|
-
this.pauseAllMedia(t), this.allAnimations.forEach((
|
|
4262
|
+
this.pauseAllMedia(t), this.allAnimations.forEach((s) => s.pause()), n(!0);
|
|
4263
4263
|
});
|
|
4264
4264
|
const i = t.document.querySelectorAll("audio,video");
|
|
4265
4265
|
for (let A = 0; A < i.length; A++) {
|
|
@@ -4276,9 +4276,9 @@ const $i = class Me extends Rt {
|
|
|
4276
4276
|
return t.removeEventListener("error", this.wndOnErr), t.removeEventListener("play", this.onMediaPlayEvent), t.removeEventListener("pause", this.onMediaPauseEvent), this.allAnimations.forEach((i) => i.cancel()), this.allAnimations.clear(), e.log("Setup Unmounted"), !0;
|
|
4277
4277
|
}
|
|
4278
4278
|
};
|
|
4279
|
-
|
|
4280
|
-
let
|
|
4281
|
-
const
|
|
4279
|
+
tA.moduleName = "setup";
|
|
4280
|
+
let eA = tA;
|
|
4281
|
+
const oi = "readium-viewport", iA = class et extends eA {
|
|
4282
4282
|
onViewportWidthChanged(t) {
|
|
4283
4283
|
const e = t.target;
|
|
4284
4284
|
yt(e, "--RS__viewportWidth", `${e.innerWidth}px`);
|
|
@@ -4286,18 +4286,18 @@ const ai = "readium-viewport", eA = class et extends tA {
|
|
|
4286
4286
|
mount(t, e) {
|
|
4287
4287
|
if (!super.mount(t, e)) return !1;
|
|
4288
4288
|
const i = t.document.createElement("meta");
|
|
4289
|
-
return i.dataset.readium = "true", i.setAttribute("name", "viewport"), i.setAttribute("id",
|
|
4289
|
+
return i.dataset.readium = "true", i.setAttribute("name", "viewport"), i.setAttribute("id", oi), i.setAttribute(
|
|
4290
4290
|
"content",
|
|
4291
4291
|
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"
|
|
4292
4292
|
), t.document.head.appendChild(i), t.addEventListener("orientationchange", this.onViewportWidthChanged), t.addEventListener("resize", this.onViewportWidthChanged), this.onViewportWidthChanged({
|
|
4293
4293
|
target: t
|
|
4294
4294
|
}), e.register("get_properties", et.moduleName, (A, n) => {
|
|
4295
|
-
|
|
4295
|
+
Ye(t), n(!0);
|
|
4296
4296
|
}), e.register("update_properties", et.moduleName, (A, n) => {
|
|
4297
|
-
A["--RS__viewportWidth"] = `${t.innerWidth}px`,
|
|
4297
|
+
A["--RS__viewportWidth"] = `${t.innerWidth}px`, ki(t, A), n(!0);
|
|
4298
4298
|
}), e.register("set_property", et.moduleName, (A, n) => {
|
|
4299
|
-
const
|
|
4300
|
-
yt(t,
|
|
4299
|
+
const s = A;
|
|
4300
|
+
yt(t, s[0], s[1]), n(!0);
|
|
4301
4301
|
}), e.register("remove_property", et.moduleName, (A, n) => {
|
|
4302
4302
|
Kt(t, A), n(!0);
|
|
4303
4303
|
}), e.register("activate", et.moduleName, (A, n) => {
|
|
@@ -4305,17 +4305,17 @@ const ai = "readium-viewport", eA = class et extends tA {
|
|
|
4305
4305
|
}), e.log("ReflowableSetup Mounted"), !0;
|
|
4306
4306
|
}
|
|
4307
4307
|
unmount(t, e) {
|
|
4308
|
-
return e.unregisterAll(et.moduleName), t.document.head.querySelector(`#${
|
|
4308
|
+
return e.unregisterAll(et.moduleName), t.document.head.querySelector(`#${oi}`)?.remove(), t.removeEventListener("orientationchange", this.onViewportWidthChanged), e.log("ReflowableSetup Unmounted"), super.unmount(t, e);
|
|
4309
4309
|
}
|
|
4310
4310
|
};
|
|
4311
|
-
|
|
4312
|
-
let
|
|
4313
|
-
const
|
|
4311
|
+
iA.moduleName = "reflowable_setup";
|
|
4312
|
+
let wn = iA;
|
|
4313
|
+
const ai = "readium-fixed-style", AA = class K extends eA {
|
|
4314
4314
|
mount(t, e) {
|
|
4315
4315
|
if (!super.mount(t, e)) return !1;
|
|
4316
4316
|
t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "paginated");
|
|
4317
4317
|
const i = t.document.createElement("style");
|
|
4318
|
-
return i.id =
|
|
4318
|
+
return i.id = ai, i.dataset.readium = "true", i.textContent = `
|
|
4319
4319
|
html, body {
|
|
4320
4320
|
text-size-adjust: none;
|
|
4321
4321
|
-ms-text-size-adjust: none;
|
|
@@ -4328,8 +4328,8 @@ const li = "readium-fixed-style", iA = class K extends tA {
|
|
|
4328
4328
|
|
|
4329
4329
|
/*cursor: var() TODO*/
|
|
4330
4330
|
}`, t.document.head.appendChild(i), e.register("set_property", K.moduleName, (A, n) => {
|
|
4331
|
-
const
|
|
4332
|
-
yt(t,
|
|
4331
|
+
const s = A;
|
|
4332
|
+
yt(t, s[0], s[1]), n(!0);
|
|
4333
4333
|
}), e.register("remove_property", K.moduleName, (A, n) => {
|
|
4334
4334
|
Kt(t, A), n(!0);
|
|
4335
4335
|
}), e.register("first_visible_locator", K.moduleName, (A, n) => n(!1)), e.register("unfocus", K.moduleName, (A, n) => {
|
|
@@ -4348,12 +4348,12 @@ const li = "readium-fixed-style", iA = class K extends tA {
|
|
|
4348
4348
|
}), e.log("FixedSetup Mounted"), !0;
|
|
4349
4349
|
}
|
|
4350
4350
|
unmount(t, e) {
|
|
4351
|
-
return e.unregisterAll(K.moduleName), t.document.getElementById(
|
|
4351
|
+
return e.unregisterAll(K.moduleName), t.document.getElementById(ai)?.remove(), e.log("FixedSetup Unmounted"), super.unmount(t, e);
|
|
4352
4352
|
}
|
|
4353
4353
|
};
|
|
4354
|
-
|
|
4355
|
-
let
|
|
4356
|
-
const
|
|
4354
|
+
AA.moduleName = "fixed_setup";
|
|
4355
|
+
let En = AA;
|
|
4356
|
+
const nA = class it extends Rt {
|
|
4357
4357
|
wndOnErr(t) {
|
|
4358
4358
|
this.comms?.send("error", {
|
|
4359
4359
|
message: t.message,
|
|
@@ -4368,9 +4368,9 @@ const AA = class it extends Rt {
|
|
|
4368
4368
|
this.wndOnErr,
|
|
4369
4369
|
!1
|
|
4370
4370
|
), e.register("get_properties", it.moduleName, (i, A) => {
|
|
4371
|
-
|
|
4371
|
+
Ye(t), A(!0);
|
|
4372
4372
|
}), e.register("update_properties", it.moduleName, (i, A) => {
|
|
4373
|
-
|
|
4373
|
+
ki(t, i), A(!0);
|
|
4374
4374
|
}), e.register("set_property", it.moduleName, (i, A) => {
|
|
4375
4375
|
const n = i;
|
|
4376
4376
|
yt(t, n[0], n[1]), A(!0);
|
|
@@ -4384,33 +4384,33 @@ const AA = class it extends Rt {
|
|
|
4384
4384
|
return e.unregisterAll(it.moduleName), t.removeEventListener("error", this.wndOnErr), e.log("WebPubSetup Unmounted"), !0;
|
|
4385
4385
|
}
|
|
4386
4386
|
};
|
|
4387
|
-
|
|
4388
|
-
let
|
|
4389
|
-
const
|
|
4387
|
+
nA.moduleName = "webpub_setup";
|
|
4388
|
+
let yn = nA;
|
|
4389
|
+
const In = [
|
|
4390
4390
|
"fixed_setup",
|
|
4391
4391
|
"decorator",
|
|
4392
4392
|
"peripherals"
|
|
4393
|
-
],
|
|
4393
|
+
], Fn = [
|
|
4394
4394
|
"reflowable_setup",
|
|
4395
4395
|
"decorator",
|
|
4396
4396
|
"peripherals",
|
|
4397
4397
|
"column_snapper",
|
|
4398
4398
|
"scroll_snapper"
|
|
4399
|
-
],
|
|
4399
|
+
], Un = [
|
|
4400
4400
|
"webpub_setup",
|
|
4401
4401
|
"webpub_snapper",
|
|
4402
4402
|
"decorator",
|
|
4403
4403
|
"peripherals"
|
|
4404
4404
|
], Vt = new Map([
|
|
4405
4405
|
// All modules go here
|
|
4406
|
-
|
|
4407
|
-
Mn,
|
|
4406
|
+
En,
|
|
4408
4407
|
wn,
|
|
4408
|
+
yn,
|
|
4409
|
+
Mn,
|
|
4410
|
+
Bn,
|
|
4411
|
+
an,
|
|
4409
4412
|
pn,
|
|
4410
|
-
fn
|
|
4411
|
-
on,
|
|
4412
|
-
un,
|
|
4413
|
-
mn
|
|
4413
|
+
fn
|
|
4414
4414
|
].map((r) => [r.moduleName, r]));
|
|
4415
4415
|
class pt {
|
|
4416
4416
|
/**
|
|
@@ -4418,7 +4418,7 @@ class pt {
|
|
|
4418
4418
|
* @param initialModules List of initial modules to load
|
|
4419
4419
|
*/
|
|
4420
4420
|
constructor(t = window, e = []) {
|
|
4421
|
-
this.loadedModules = [], this.wnd = t, this.comms = new
|
|
4421
|
+
this.loadedModules = [], this.wnd = t, this.comms = new vA(t);
|
|
4422
4422
|
const i = [...new Set(e)];
|
|
4423
4423
|
if (i.length) {
|
|
4424
4424
|
if (typeof t > "u")
|
|
@@ -4462,7 +4462,7 @@ class pt {
|
|
|
4462
4462
|
this.comms.destroy(), this.loadedModules.forEach((t) => t.unmount(this.wnd, this.comms)), this.loadedModules = [];
|
|
4463
4463
|
}
|
|
4464
4464
|
}
|
|
4465
|
-
const
|
|
4465
|
+
const Rn = 1e4;
|
|
4466
4466
|
class It {
|
|
4467
4467
|
constructor(t, e) {
|
|
4468
4468
|
this.registry = /* @__PURE__ */ new Map(), this._ready = !1, this.listenerBuffer = [], this.handler = this.handle.bind(this), this.wnd = t, this.origin = e;
|
|
@@ -4473,7 +4473,7 @@ class It {
|
|
|
4473
4473
|
}
|
|
4474
4474
|
this.gc = setInterval(() => {
|
|
4475
4475
|
this.registry.forEach((i, A) => {
|
|
4476
|
-
performance.now() - i.time >
|
|
4476
|
+
performance.now() - i.time > Rn && (console.warn(A, "event for", i.key, "was never handled!"), this.registry.delete(A));
|
|
4477
4477
|
});
|
|
4478
4478
|
}, 5e3), window.addEventListener("message", this.handler), this.send("_ping", void 0);
|
|
4479
4479
|
}
|
|
@@ -4521,8 +4521,8 @@ class It {
|
|
|
4521
4521
|
* @returns Identifier associated with the message
|
|
4522
4522
|
*/
|
|
4523
4523
|
send(t, e, i, A = !1, n = []) {
|
|
4524
|
-
const
|
|
4525
|
-
return i && this.registry.set(
|
|
4524
|
+
const s = de();
|
|
4525
|
+
return i && this.registry.set(s, {
|
|
4526
4526
|
// Add callback to the registry
|
|
4527
4527
|
cb: i,
|
|
4528
4528
|
time: performance.now(),
|
|
@@ -4531,7 +4531,7 @@ class It {
|
|
|
4531
4531
|
{
|
|
4532
4532
|
_readium: lt,
|
|
4533
4533
|
_channel: this.channelId,
|
|
4534
|
-
id:
|
|
4534
|
+
id: s,
|
|
4535
4535
|
data: e,
|
|
4536
4536
|
key: t,
|
|
4537
4537
|
strict: A
|
|
@@ -4539,15 +4539,15 @@ class It {
|
|
|
4539
4539
|
"/",
|
|
4540
4540
|
// Same origin
|
|
4541
4541
|
n
|
|
4542
|
-
),
|
|
4542
|
+
), s;
|
|
4543
4543
|
}
|
|
4544
4544
|
}
|
|
4545
|
-
const
|
|
4546
|
-
RS__oldStyleTf:
|
|
4547
|
-
},
|
|
4545
|
+
const Cn = "'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif", Sn = {
|
|
4546
|
+
RS__oldStyleTf: Cn
|
|
4547
|
+
}, zn = 16, li = Sn.RS__oldStyleTf;
|
|
4548
4548
|
class wt {
|
|
4549
4549
|
constructor(t) {
|
|
4550
|
-
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize ||
|
|
4550
|
+
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize || zn, this._fontFace = t.fontFace || li, this._sample = t.sample || null, this._pageGutter = t.pageGutter || 0, this._letterSpacing = t.letterSpacing ? Math.round(t.letterSpacing * this._baseFontSize) : 0, this._wordSpacing = t.wordSpacing ? Math.round(t.wordSpacing * this._baseFontSize) : 0, this._isCJK = t.isCJK || !1, this._getRelative = t.getRelative || !1, this._padding = this._pageGutter * 2, this._minDivider = this._minChars && this._minChars < this._optimalChars ? this._optimalChars / this._minChars : this._minChars === null ? null : 1, this._maxMultiplier = this._maxChars && this._maxChars > this._optimalChars ? this._maxChars / this._optimalChars : this._maxChars === null ? null : 1, this._approximatedWordSpaces = wt.approximateWordSpaces(this._optimalChars, this._sample);
|
|
4551
4551
|
}
|
|
4552
4552
|
updateMultipliers() {
|
|
4553
4553
|
this._minDivider = this._minChars && this._minChars < this._optimalChars ? this._optimalChars / this._minChars : this._minChars === null ? null : 1, this._maxMultiplier = this._maxChars && this._maxChars > this._optimalChars ? this._maxChars / this._optimalChars : this._maxChars === null ? null : 1;
|
|
@@ -4556,7 +4556,7 @@ class wt {
|
|
|
4556
4556
|
// Not filtering because pretty much everything can
|
|
4557
4557
|
// trigger a recomputation anyway.
|
|
4558
4558
|
update(t) {
|
|
4559
|
-
t.optimalChars && (this._optimalChars = t.optimalChars), t.minChars !== void 0 && (this._minChars = t.minChars), t.maxChars !== void 0 && (this._maxChars = t.maxChars), t.baseFontSize && (this._baseFontSize = t.baseFontSize), t.fontFace !== void 0 && (this._fontFace = t.fontFace ||
|
|
4559
|
+
t.optimalChars && (this._optimalChars = t.optimalChars), t.minChars !== void 0 && (this._minChars = t.minChars), t.maxChars !== void 0 && (this._maxChars = t.maxChars), t.baseFontSize && (this._baseFontSize = t.baseFontSize), t.fontFace !== void 0 && (this._fontFace = t.fontFace || li), t.letterSpacing && (this._letterSpacing = t.letterSpacing), t.wordSpacing && (this._wordSpacing = t.wordSpacing), t.isCJK != null && (this._isCJK = t.isCJK), t.pageGutter && (this._pageGutter = t.pageGutter), t.getRelative && (this._getRelative = t.getRelative), t.sample && (this._sample = t.sample, this._approximatedWordSpaces = wt.approximateWordSpaces(this._optimalChars, this._sample)), this.updateMultipliers(), this._optimalLineLength = this.getOptimalLineLength();
|
|
4560
4560
|
}
|
|
4561
4561
|
get baseFontSize() {
|
|
4562
4562
|
return this._baseFontSize;
|
|
@@ -4619,51 +4619,51 @@ class wt {
|
|
|
4619
4619
|
return this.getLineLengthFallback();
|
|
4620
4620
|
}
|
|
4621
4621
|
}
|
|
4622
|
-
const
|
|
4622
|
+
const rA = () => typeof navigator > "u" ? "" : navigator.userAgent || "", sA = () => typeof navigator > "u" ? void 0 : navigator.userAgentData || void 0;
|
|
4623
4623
|
class oA {
|
|
4624
4624
|
constructor() {
|
|
4625
|
-
const t =
|
|
4625
|
+
const t = sA(), e = rA(), i = (n) => (typeof n == "string" || typeof n == "number") && n ? String(n).replace(/_/g, ".").split(".").map((s) => parseInt(s) || 0) : [], A = (n = "") => {
|
|
4626
4626
|
if (!n) return [];
|
|
4627
|
-
const
|
|
4628
|
-
return
|
|
4627
|
+
const s = new RegExp("^.*" + n + "[ :\\/]?(\\d+([\\._]\\d+)*).*$");
|
|
4628
|
+
return s.test(e) ? i(e.replace(s, "$1")) : [];
|
|
4629
4629
|
};
|
|
4630
|
-
this.OS = ((n) => (/(macOS|Mac OS X)/.test(e) ? (/\(iP(hone|od touch);/.test(e) && (n.iOS = A("CPU (?:iPhone )?OS ")), /\(iPad;/.test(e) ? n.iOS = n.iPadOS = A("CPU (?:iPhone )?OS ") : /(macOS|Mac OS X) \d/.test(e) && (document.ontouchend !== void 0 ? n.iOS = n.iPadOS = A() : n.macOS = A("(?:macOS|Mac OS X) "))) : /Windows( NT)? \d/.test(e) ? n.Windows = ((
|
|
4631
|
-
const
|
|
4632
|
-
if (!(!
|
|
4633
|
-
if (/^i(OS|P(hone|od touch))$/.test(
|
|
4634
|
-
else if (/^iPad(OS)?$/.test(
|
|
4635
|
-
else if (/^(macOS|(Mac )?OS X|Mac(Intel)?)$/.test(
|
|
4636
|
-
else if (/^(Microsoft )?Windows$/.test(
|
|
4637
|
-
else if (/^(Google )?Android$/.test(
|
|
4638
|
-
else if (/^((Google )?Chrome OS|CrOS)$/.test(
|
|
4639
|
-
else if (/^(Linux|Ubuntu|X11)$/.test(
|
|
4630
|
+
this.OS = ((n) => (/(macOS|Mac OS X)/.test(e) ? (/\(iP(hone|od touch);/.test(e) && (n.iOS = A("CPU (?:iPhone )?OS ")), /\(iPad;/.test(e) ? n.iOS = n.iPadOS = A("CPU (?:iPhone )?OS ") : /(macOS|Mac OS X) \d/.test(e) && (document.ontouchend !== void 0 ? n.iOS = n.iPadOS = A() : n.macOS = A("(?:macOS|Mac OS X) "))) : /Windows( NT)? \d/.test(e) ? n.Windows = ((s) => s[0] !== 6 || !s[1] ? s : s[1] === 1 ? [7] : s[1] === 2 ? [8] : [8, 1])(A("Windows(?: NT)?")) : /Android \d/.test(e) ? n.Android = A("Android") : /CrOS/.test(e) ? n.ChromeOS = A() : /X11;/.test(e) && (n.Linux = A()), n))({}), t && t.getHighEntropyValues(["architecture", "model", "platform", "platformVersion", "uaFullVersion"]).then((n) => ((s) => {
|
|
4631
|
+
const o = n.platform, a = n.platformVersion;
|
|
4632
|
+
if (!(!o || !a)) {
|
|
4633
|
+
if (/^i(OS|P(hone|od touch))$/.test(o)) s.iOS = i(a);
|
|
4634
|
+
else if (/^iPad(OS)?$/.test(o)) s.iOS = s.iPadOS = i(a);
|
|
4635
|
+
else if (/^(macOS|(Mac )?OS X|Mac(Intel)?)$/.test(o)) document.ontouchend !== void 0 ? s.iOS = s.iPadOS = i() : s.macOS = i(a);
|
|
4636
|
+
else if (/^(Microsoft )?Windows$/.test(o)) s.Windows = i(a);
|
|
4637
|
+
else if (/^(Google )?Android$/.test(o)) s.Android = i(a);
|
|
4638
|
+
else if (/^((Google )?Chrome OS|CrOS)$/.test(o)) s.ChromeOS = i(a);
|
|
4639
|
+
else if (/^(Linux|Ubuntu|X11)$/.test(o)) s.Linux = i(a);
|
|
4640
4640
|
else return;
|
|
4641
|
-
Object.keys(this.OS).forEach((h) => delete this.OS[h]), Object.assign(this.OS,
|
|
4641
|
+
Object.keys(this.OS).forEach((h) => delete this.OS[h]), Object.assign(this.OS, s);
|
|
4642
4642
|
}
|
|
4643
4643
|
})({})), this.UA = ((n) => {
|
|
4644
|
-
let
|
|
4644
|
+
let s = !1;
|
|
4645
4645
|
if (t && Array.isArray(t.brands)) {
|
|
4646
|
-
const
|
|
4647
|
-
|
|
4646
|
+
const o = t.brands.reduce((a, h) => (a[h.brand] = [h.version * 1], a), {});
|
|
4647
|
+
o["Google Chrome"] ? (s = !0, n.Blink = n.Chromium = o.Chromium || [], n.Chrome = o["Google Chrome"]) : o["Microsoft Edge"] ? (s = !0, n.Blink = n.Chromium = o.Chromium || [], n.Edge = o["Microsoft Edge"]) : o.Opera && (s = !0, n.Blink = n.Chromium = o.Chromium || [], n.Opera = o.Opera);
|
|
4648
4648
|
}
|
|
4649
|
-
return
|
|
4650
|
-
})({}), this.Env = { get: () => [this.OS, this.UA].reduce((n,
|
|
4651
|
-
for (const
|
|
4649
|
+
return s || (/ Gecko\/\d/.test(e) ? (n.Gecko = A("rv"), / Waterfox\/\d/.test(e) ? n.Waterfox = A("Waterfox") : / Firefox\/\d/.test(e) && (n.Firefox = A("Firefox"))) : / Edge\/\d/.test(e) ? (n.EdgeHTML = A("Edge"), n.Edge = n.EdgeHTML) : / Chrom(ium|e)\/\d/.test(e) ? (n.Blink = n.Chromium = ((o) => o[0] ? o : A("Chrome"))(A("Chromium")), / EdgA?\/\d/.test(e) ? n.Edge = ((o) => o[0] ? o : A("Edg"))(A("EdgA")) : / OPR\/\d/.test(e) ? n.Opera = A("OPR") : / Vivaldi\/\d/.test(e) ? n.Vivaldi = A("Vivaldi") : / Silk\/\d/.test(e) ? n.Silk = A("Silk") : / UCBrowser\/\d/.test(e) ? n.UCBrowser = A("UCBrowser") : / Phoebe\/\d/.test(e) ? n.Phoebe = A("Phoebe") : n.Chrome = ((o) => o[0] ? o : n.Chromium)(A("Chrome"))) : / AppleWebKit\/\d/.test(e) ? (n.WebKit = A("AppleWebKit"), / CriOS \d/.test(e) ? n.Chrome = A("CriOS") : / FxiOS \d/.test(e) ? n.Firefox = A("FxiOS") : / EdgiOS\/\d/.test(e) ? n.Edge = A("EdgiOS") : / Version\/\d/.test(e) && (n.Safari = A("Version"))) : / Trident\/\d/.test(e) && (n.Trident = A("Trident"), n.InternetExplorer = ((o) => o[0] ? o : A("MSIE"))(A("rv")))), /[\[; ]FB(AN|_IAB)\//.test(e) && (n.Facebook = A("FBAV")), / Line\/\d/.test(e) && (n.LINE = A("Line")), n;
|
|
4650
|
+
})({}), this.Env = { get: () => [this.OS, this.UA].reduce((n, s) => {
|
|
4651
|
+
for (const o in s) s[o] && n.push(o);
|
|
4652
4652
|
return n;
|
|
4653
4653
|
}, []) };
|
|
4654
4654
|
}
|
|
4655
4655
|
}
|
|
4656
|
-
class
|
|
4656
|
+
class Qn extends oA {
|
|
4657
4657
|
get iOSRequest() {
|
|
4658
|
-
const t =
|
|
4658
|
+
const t = sA(), e = rA();
|
|
4659
4659
|
if (this.OS.iOS && !this.OS.iPadOS)
|
|
4660
4660
|
return "mobile";
|
|
4661
4661
|
if (this.OS.iPadOS)
|
|
4662
4662
|
return /\(iPad;/.test(e) || t && /^iPad(OS)?$/.test(t.platform) ? "mobile" : "desktop";
|
|
4663
4663
|
}
|
|
4664
4664
|
}
|
|
4665
|
-
const Et = new oA(), U = new
|
|
4666
|
-
class
|
|
4665
|
+
const Et = new oA(), U = new Qn();
|
|
4666
|
+
class Yn {
|
|
4667
4667
|
constructor(t) {
|
|
4668
4668
|
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;
|
|
4669
4669
|
}
|
|
@@ -4750,7 +4750,7 @@ class zn {
|
|
|
4750
4750
|
return this.loader;
|
|
4751
4751
|
}
|
|
4752
4752
|
}
|
|
4753
|
-
class
|
|
4753
|
+
class Nn {
|
|
4754
4754
|
constructor(t, e) {
|
|
4755
4755
|
this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.container = t, this.currentCssProperties = e;
|
|
4756
4756
|
}
|
|
@@ -4763,17 +4763,17 @@ class Qn {
|
|
|
4763
4763
|
let A = this.pool.values(), n = A.next();
|
|
4764
4764
|
for (; n.value; )
|
|
4765
4765
|
await n.value.destroy(), n = A.next();
|
|
4766
|
-
this.pool.clear(), this.blobs.forEach((
|
|
4767
|
-
(
|
|
4766
|
+
this.pool.clear(), this.blobs.forEach((s) => URL.revokeObjectURL(s)), this.blobs.clear(), this.container.childNodes.forEach((s) => {
|
|
4767
|
+
(s.nodeType === Node.ELEMENT_NODE || s.nodeType === Node.TEXT_NODE) && s.remove();
|
|
4768
4768
|
});
|
|
4769
4769
|
}
|
|
4770
4770
|
async update(t, e, i) {
|
|
4771
4771
|
const A = t.readingOrder.items;
|
|
4772
4772
|
let n = A.findIndex((a) => a.href === e.href);
|
|
4773
4773
|
if (n < 0) throw Error(`Locator not found in reading order: ${e.href}`);
|
|
4774
|
-
const
|
|
4775
|
-
this.inprogress.has(
|
|
4776
|
-
const
|
|
4774
|
+
const s = A[n].href;
|
|
4775
|
+
this.inprogress.has(s) && await this.inprogress.get(s);
|
|
4776
|
+
const o = new Promise(async (a, h) => {
|
|
4777
4777
|
const c = [], d = [];
|
|
4778
4778
|
t.readingOrder.items.forEach((l, p) => {
|
|
4779
4779
|
p !== n && p !== n - 1 && p !== n + 1 && (c.includes(l.href) || c.push(l.href)), p === n && (d.includes(l.href) || d.push(l.href));
|
|
@@ -4797,29 +4797,29 @@ class Qn {
|
|
|
4797
4797
|
const p = t.readingOrder.findWithHref(l);
|
|
4798
4798
|
if (!p) return;
|
|
4799
4799
|
if (!this.blobs.has(l)) {
|
|
4800
|
-
const R = await new
|
|
4800
|
+
const R = await new jA(t, this.currentBaseURL || "", p, this.currentCssProperties).build();
|
|
4801
4801
|
this.blobs.set(l, R);
|
|
4802
4802
|
}
|
|
4803
|
-
const w = new
|
|
4804
|
-
l !==
|
|
4803
|
+
const w = new Yn(this.blobs.get(l));
|
|
4804
|
+
l !== s && await w.hide(), this.container.appendChild(w.iframe), await w.load(i), this.pool.set(l, w);
|
|
4805
4805
|
};
|
|
4806
4806
|
try {
|
|
4807
4807
|
await Promise.all(d.map((l) => g(l)));
|
|
4808
4808
|
} catch (l) {
|
|
4809
4809
|
h(l);
|
|
4810
4810
|
}
|
|
4811
|
-
const M = this.pool.get(
|
|
4811
|
+
const M = this.pool.get(s);
|
|
4812
4812
|
M?.source !== this._currentFrame?.source && (await this._currentFrame?.hide(), M && await M.load(i), M && await M.show(e.locations.progression), this._currentFrame = M), a();
|
|
4813
4813
|
});
|
|
4814
|
-
this.inprogress.set(
|
|
4814
|
+
this.inprogress.set(s, o), await o, this.inprogress.delete(s);
|
|
4815
4815
|
}
|
|
4816
4816
|
setCSSProperties(t) {
|
|
4817
4817
|
if (!((i, A) => {
|
|
4818
|
-
const n = Object.keys(i),
|
|
4819
|
-
if (n.length !==
|
|
4818
|
+
const n = Object.keys(i), s = Object.keys(A);
|
|
4819
|
+
if (n.length !== s.length)
|
|
4820
4820
|
return !1;
|
|
4821
|
-
for (const
|
|
4822
|
-
if (i[
|
|
4821
|
+
for (const o of n)
|
|
4822
|
+
if (i[o] !== A[o])
|
|
4823
4823
|
return !1;
|
|
4824
4824
|
return !0;
|
|
4825
4825
|
})(this.currentCssProperties || {}, t)) {
|
|
@@ -4854,16 +4854,16 @@ class Qn {
|
|
|
4854
4854
|
}), t;
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
|
-
var ne,
|
|
4858
|
-
function
|
|
4859
|
-
if (
|
|
4860
|
-
|
|
4857
|
+
var ne, hi;
|
|
4858
|
+
function xn() {
|
|
4859
|
+
if (hi) return ne;
|
|
4860
|
+
hi = 1;
|
|
4861
4861
|
function r(A) {
|
|
4862
4862
|
if (typeof A != "string")
|
|
4863
4863
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(A));
|
|
4864
4864
|
}
|
|
4865
4865
|
function t(A, n) {
|
|
4866
|
-
for (var
|
|
4866
|
+
for (var s = "", o = 0, a = -1, h = 0, c, d = 0; d <= A.length; ++d) {
|
|
4867
4867
|
if (d < A.length)
|
|
4868
4868
|
c = A.charCodeAt(d);
|
|
4869
4869
|
else {
|
|
@@ -4873,43 +4873,43 @@ function Yn() {
|
|
|
4873
4873
|
}
|
|
4874
4874
|
if (c === 47) {
|
|
4875
4875
|
if (!(a === d - 1 || h === 1)) if (a !== d - 1 && h === 2) {
|
|
4876
|
-
if (
|
|
4877
|
-
if (
|
|
4878
|
-
var g =
|
|
4879
|
-
if (g !==
|
|
4880
|
-
g === -1 ? (
|
|
4876
|
+
if (s.length < 2 || o !== 2 || s.charCodeAt(s.length - 1) !== 46 || s.charCodeAt(s.length - 2) !== 46) {
|
|
4877
|
+
if (s.length > 2) {
|
|
4878
|
+
var g = s.lastIndexOf("/");
|
|
4879
|
+
if (g !== s.length - 1) {
|
|
4880
|
+
g === -1 ? (s = "", o = 0) : (s = s.slice(0, g), o = s.length - 1 - s.lastIndexOf("/")), a = d, h = 0;
|
|
4881
4881
|
continue;
|
|
4882
4882
|
}
|
|
4883
|
-
} else if (
|
|
4884
|
-
|
|
4883
|
+
} else if (s.length === 2 || s.length === 1) {
|
|
4884
|
+
s = "", o = 0, a = d, h = 0;
|
|
4885
4885
|
continue;
|
|
4886
4886
|
}
|
|
4887
4887
|
}
|
|
4888
|
-
n && (
|
|
4888
|
+
n && (s.length > 0 ? s += "/.." : s = "..", o = 2);
|
|
4889
4889
|
} else
|
|
4890
|
-
|
|
4890
|
+
s.length > 0 ? s += "/" + A.slice(a + 1, d) : s = A.slice(a + 1, d), o = d - a - 1;
|
|
4891
4891
|
a = d, h = 0;
|
|
4892
4892
|
} else c === 46 && h !== -1 ? ++h : h = -1;
|
|
4893
4893
|
}
|
|
4894
|
-
return
|
|
4894
|
+
return s;
|
|
4895
4895
|
}
|
|
4896
4896
|
function e(A, n) {
|
|
4897
|
-
var
|
|
4898
|
-
return
|
|
4897
|
+
var s = n.dir || n.root, o = n.base || (n.name || "") + (n.ext || "");
|
|
4898
|
+
return s ? s === n.root ? s + o : s + A + o : o;
|
|
4899
4899
|
}
|
|
4900
4900
|
var i = {
|
|
4901
4901
|
// path.resolve([from ...], to)
|
|
4902
4902
|
resolve: function() {
|
|
4903
|
-
for (var n = "",
|
|
4903
|
+
for (var n = "", s = !1, o, a = arguments.length - 1; a >= -1 && !s; a--) {
|
|
4904
4904
|
var h;
|
|
4905
|
-
a >= 0 ? h = arguments[a] : (
|
|
4905
|
+
a >= 0 ? h = arguments[a] : (o === void 0 && (o = process.cwd()), h = o), r(h), h.length !== 0 && (n = h + "/" + n, s = h.charCodeAt(0) === 47);
|
|
4906
4906
|
}
|
|
4907
|
-
return n = t(n, !
|
|
4907
|
+
return n = t(n, !s), s ? n.length > 0 ? "/" + n : "/" : n.length > 0 ? n : ".";
|
|
4908
4908
|
},
|
|
4909
4909
|
normalize: function(n) {
|
|
4910
4910
|
if (r(n), n.length === 0) return ".";
|
|
4911
|
-
var
|
|
4912
|
-
return n = t(n, !
|
|
4911
|
+
var s = n.charCodeAt(0) === 47, o = n.charCodeAt(n.length - 1) === 47;
|
|
4912
|
+
return n = t(n, !s), n.length === 0 && !s && (n = "."), n.length > 0 && o && (n += "/"), s ? "/" + n : n;
|
|
4913
4913
|
},
|
|
4914
4914
|
isAbsolute: function(n) {
|
|
4915
4915
|
return r(n), n.length > 0 && n.charCodeAt(0) === 47;
|
|
@@ -4917,98 +4917,98 @@ function Yn() {
|
|
|
4917
4917
|
join: function() {
|
|
4918
4918
|
if (arguments.length === 0)
|
|
4919
4919
|
return ".";
|
|
4920
|
-
for (var n,
|
|
4921
|
-
var
|
|
4922
|
-
r(
|
|
4920
|
+
for (var n, s = 0; s < arguments.length; ++s) {
|
|
4921
|
+
var o = arguments[s];
|
|
4922
|
+
r(o), o.length > 0 && (n === void 0 ? n = o : n += "/" + o);
|
|
4923
4923
|
}
|
|
4924
4924
|
return n === void 0 ? "." : i.normalize(n);
|
|
4925
4925
|
},
|
|
4926
|
-
relative: function(n,
|
|
4927
|
-
if (r(n), r(
|
|
4928
|
-
for (var
|
|
4926
|
+
relative: function(n, s) {
|
|
4927
|
+
if (r(n), r(s), n === s || (n = i.resolve(n), s = i.resolve(s), n === s)) return "";
|
|
4928
|
+
for (var o = 1; o < n.length && n.charCodeAt(o) === 47; ++o)
|
|
4929
4929
|
;
|
|
4930
|
-
for (var a = n.length, h = a -
|
|
4930
|
+
for (var a = n.length, h = a - o, c = 1; c < s.length && s.charCodeAt(c) === 47; ++c)
|
|
4931
4931
|
;
|
|
4932
|
-
for (var d =
|
|
4932
|
+
for (var d = s.length, g = d - c, M = h < g ? h : g, l = -1, p = 0; p <= M; ++p) {
|
|
4933
4933
|
if (p === M) {
|
|
4934
4934
|
if (g > M) {
|
|
4935
|
-
if (
|
|
4936
|
-
return
|
|
4935
|
+
if (s.charCodeAt(c + p) === 47)
|
|
4936
|
+
return s.slice(c + p + 1);
|
|
4937
4937
|
if (p === 0)
|
|
4938
|
-
return
|
|
4939
|
-
} else h > M && (n.charCodeAt(
|
|
4938
|
+
return s.slice(c + p);
|
|
4939
|
+
} else h > M && (n.charCodeAt(o + p) === 47 ? l = p : p === 0 && (l = 0));
|
|
4940
4940
|
break;
|
|
4941
4941
|
}
|
|
4942
|
-
var w = n.charCodeAt(
|
|
4942
|
+
var w = n.charCodeAt(o + p), E = s.charCodeAt(c + p);
|
|
4943
4943
|
if (w !== E)
|
|
4944
4944
|
break;
|
|
4945
4945
|
w === 47 && (l = p);
|
|
4946
4946
|
}
|
|
4947
4947
|
var R = "";
|
|
4948
|
-
for (p =
|
|
4948
|
+
for (p = o + l + 1; p <= a; ++p)
|
|
4949
4949
|
(p === a || n.charCodeAt(p) === 47) && (R.length === 0 ? R += ".." : R += "/..");
|
|
4950
|
-
return R.length > 0 ? R +
|
|
4950
|
+
return R.length > 0 ? R + s.slice(c + l) : (c += l, s.charCodeAt(c) === 47 && ++c, s.slice(c));
|
|
4951
4951
|
},
|
|
4952
4952
|
_makeLong: function(n) {
|
|
4953
4953
|
return n;
|
|
4954
4954
|
},
|
|
4955
4955
|
dirname: function(n) {
|
|
4956
4956
|
if (r(n), n.length === 0) return ".";
|
|
4957
|
-
for (var
|
|
4958
|
-
if (
|
|
4957
|
+
for (var s = n.charCodeAt(0), o = s === 47, a = -1, h = !0, c = n.length - 1; c >= 1; --c)
|
|
4958
|
+
if (s = n.charCodeAt(c), s === 47) {
|
|
4959
4959
|
if (!h) {
|
|
4960
4960
|
a = c;
|
|
4961
4961
|
break;
|
|
4962
4962
|
}
|
|
4963
4963
|
} else
|
|
4964
4964
|
h = !1;
|
|
4965
|
-
return a === -1 ?
|
|
4965
|
+
return a === -1 ? o ? "/" : "." : o && a === 1 ? "//" : n.slice(0, a);
|
|
4966
4966
|
},
|
|
4967
|
-
basename: function(n,
|
|
4968
|
-
if (
|
|
4967
|
+
basename: function(n, s) {
|
|
4968
|
+
if (s !== void 0 && typeof s != "string") throw new TypeError('"ext" argument must be a string');
|
|
4969
4969
|
r(n);
|
|
4970
|
-
var
|
|
4971
|
-
if (
|
|
4972
|
-
if (
|
|
4973
|
-
var d =
|
|
4970
|
+
var o = 0, a = -1, h = !0, c;
|
|
4971
|
+
if (s !== void 0 && s.length > 0 && s.length <= n.length) {
|
|
4972
|
+
if (s.length === n.length && s === n) return "";
|
|
4973
|
+
var d = s.length - 1, g = -1;
|
|
4974
4974
|
for (c = n.length - 1; c >= 0; --c) {
|
|
4975
4975
|
var M = n.charCodeAt(c);
|
|
4976
4976
|
if (M === 47) {
|
|
4977
4977
|
if (!h) {
|
|
4978
|
-
|
|
4978
|
+
o = c + 1;
|
|
4979
4979
|
break;
|
|
4980
4980
|
}
|
|
4981
4981
|
} else
|
|
4982
|
-
g === -1 && (h = !1, g = c + 1), d >= 0 && (M ===
|
|
4982
|
+
g === -1 && (h = !1, g = c + 1), d >= 0 && (M === s.charCodeAt(d) ? --d === -1 && (a = c) : (d = -1, a = g));
|
|
4983
4983
|
}
|
|
4984
|
-
return
|
|
4984
|
+
return o === a ? a = g : a === -1 && (a = n.length), n.slice(o, a);
|
|
4985
4985
|
} else {
|
|
4986
4986
|
for (c = n.length - 1; c >= 0; --c)
|
|
4987
4987
|
if (n.charCodeAt(c) === 47) {
|
|
4988
4988
|
if (!h) {
|
|
4989
|
-
|
|
4989
|
+
o = c + 1;
|
|
4990
4990
|
break;
|
|
4991
4991
|
}
|
|
4992
4992
|
} else a === -1 && (h = !1, a = c + 1);
|
|
4993
|
-
return a === -1 ? "" : n.slice(
|
|
4993
|
+
return a === -1 ? "" : n.slice(o, a);
|
|
4994
4994
|
}
|
|
4995
4995
|
},
|
|
4996
4996
|
extname: function(n) {
|
|
4997
4997
|
r(n);
|
|
4998
|
-
for (var
|
|
4998
|
+
for (var s = -1, o = 0, a = -1, h = !0, c = 0, d = n.length - 1; d >= 0; --d) {
|
|
4999
4999
|
var g = n.charCodeAt(d);
|
|
5000
5000
|
if (g === 47) {
|
|
5001
5001
|
if (!h) {
|
|
5002
|
-
|
|
5002
|
+
o = d + 1;
|
|
5003
5003
|
break;
|
|
5004
5004
|
}
|
|
5005
5005
|
continue;
|
|
5006
5006
|
}
|
|
5007
|
-
a === -1 && (h = !1, a = d + 1), g === 46 ?
|
|
5007
|
+
a === -1 && (h = !1, a = d + 1), g === 46 ? s === -1 ? s = d : c !== 1 && (c = 1) : s !== -1 && (c = -1);
|
|
5008
5008
|
}
|
|
5009
|
-
return
|
|
5009
|
+
return s === -1 || a === -1 || // We saw a non-dot character immediately before the dot
|
|
5010
5010
|
c === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
5011
|
-
c === 1 &&
|
|
5011
|
+
c === 1 && s === a - 1 && s === o + 1 ? "" : n.slice(s, a);
|
|
5012
5012
|
},
|
|
5013
5013
|
format: function(n) {
|
|
5014
5014
|
if (n === null || typeof n != "object")
|
|
@@ -5017,23 +5017,23 @@ function Yn() {
|
|
|
5017
5017
|
},
|
|
5018
5018
|
parse: function(n) {
|
|
5019
5019
|
r(n);
|
|
5020
|
-
var
|
|
5021
|
-
if (n.length === 0) return
|
|
5022
|
-
var
|
|
5023
|
-
a ? (
|
|
5020
|
+
var s = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
5021
|
+
if (n.length === 0) return s;
|
|
5022
|
+
var o = n.charCodeAt(0), a = o === 47, h;
|
|
5023
|
+
a ? (s.root = "/", h = 1) : h = 0;
|
|
5024
5024
|
for (var c = -1, d = 0, g = -1, M = !0, l = n.length - 1, p = 0; l >= h; --l) {
|
|
5025
|
-
if (
|
|
5025
|
+
if (o = n.charCodeAt(l), o === 47) {
|
|
5026
5026
|
if (!M) {
|
|
5027
5027
|
d = l + 1;
|
|
5028
5028
|
break;
|
|
5029
5029
|
}
|
|
5030
5030
|
continue;
|
|
5031
5031
|
}
|
|
5032
|
-
g === -1 && (M = !1, g = l + 1),
|
|
5032
|
+
g === -1 && (M = !1, g = l + 1), o === 46 ? c === -1 ? c = l : p !== 1 && (p = 1) : c !== -1 && (p = -1);
|
|
5033
5033
|
}
|
|
5034
5034
|
return c === -1 || g === -1 || // We saw a non-dot character immediately before the dot
|
|
5035
5035
|
p === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
5036
|
-
p === 1 && c === g - 1 && c === d + 1 ? g !== -1 && (d === 0 && a ?
|
|
5036
|
+
p === 1 && c === g - 1 && c === d + 1 ? g !== -1 && (d === 0 && a ? s.base = s.name = n.slice(1, g) : s.base = s.name = n.slice(d, g)) : (d === 0 && a ? (s.name = n.slice(1, c), s.base = n.slice(1, g)) : (s.name = n.slice(d, c), s.base = n.slice(d, g)), s.ext = n.slice(c, g)), d > 0 ? s.dir = n.slice(0, d - 1) : a && (s.dir = "/"), s;
|
|
5037
5037
|
},
|
|
5038
5038
|
sep: "/",
|
|
5039
5039
|
delimiter: ":",
|
|
@@ -5042,11 +5042,11 @@ function Yn() {
|
|
|
5042
5042
|
};
|
|
5043
5043
|
return i.posix = i, ne = i, ne;
|
|
5044
5044
|
}
|
|
5045
|
-
var vt =
|
|
5046
|
-
const
|
|
5047
|
-
experimentalHeaderFiltering:
|
|
5048
|
-
experimentalZoom:
|
|
5049
|
-
},
|
|
5045
|
+
var vt = xn();
|
|
5046
|
+
const Tn = { description: "Attempts to filter out paragraphs that are implicitly headings or part of headers", scope: "RS", value: "readium-experimentalHeaderFiltering-on" }, Pn = { 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" }, bn = {
|
|
5047
|
+
experimentalHeaderFiltering: Tn,
|
|
5048
|
+
experimentalZoom: Pn
|
|
5049
|
+
}, Te = bn;
|
|
5050
5050
|
var Z = /* @__PURE__ */ ((r) => (r.start = "start", r.left = "left", r.right = "right", r.justify = "justify", r))(Z || {});
|
|
5051
5051
|
const rt = {
|
|
5052
5052
|
range: [0, 100],
|
|
@@ -5066,7 +5066,7 @@ const rt = {
|
|
|
5066
5066
|
}, kt = {
|
|
5067
5067
|
range: [1, 2],
|
|
5068
5068
|
step: 0.1
|
|
5069
|
-
},
|
|
5069
|
+
}, st = {
|
|
5070
5070
|
range: [20, 100],
|
|
5071
5071
|
step: 1
|
|
5072
5072
|
}, Jt = {
|
|
@@ -5109,7 +5109,7 @@ class qt {
|
|
|
5109
5109
|
return `${t}rem`;
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
|
-
class
|
|
5112
|
+
class aA extends qt {
|
|
5113
5113
|
constructor(t) {
|
|
5114
5114
|
super(), this.a11yNormalize = t.a11yNormalize ?? null, this.bodyHyphens = t.bodyHyphens ?? null, this.fontFamily = t.fontFamily ?? null, this.fontWeight = t.fontWeight ?? 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.noRuby = t.noRuby ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.textAlign = t.textAlign ?? null, this.wordSpacing = t.wordSpacing ?? null, this.zoom = t.zoom ?? null;
|
|
5115
5115
|
}
|
|
@@ -5118,18 +5118,18 @@ class sA extends qt {
|
|
|
5118
5118
|
return this.a11yNormalize && (t["--USER__a11yNormalize"] = this.toFlag("a11y")), this.bodyHyphens && (t["--USER__bodyHyphens"] = this.bodyHyphens), this.fontFamily && (t["--USER__fontFamily"] = this.fontFamily), this.fontWeight != null && (t["--USER__fontWeight"] = this.toUnitless(this.fontWeight)), 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.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.textAlign && (t["--USER__textAlign"] = this.textAlign), this.wordSpacing != null && (t["--USER__wordSpacing"] = this.toRem(this.wordSpacing)), this.zoom !== null && (t["--USER__zoom"] = this.toPercentage(this.zoom, !0)), t;
|
|
5119
5119
|
}
|
|
5120
5120
|
}
|
|
5121
|
-
class
|
|
5121
|
+
class jn extends qt {
|
|
5122
5122
|
constructor(t) {
|
|
5123
5123
|
super(), this.experiments = t.experiments ?? null;
|
|
5124
5124
|
}
|
|
5125
5125
|
toCSSProperties() {
|
|
5126
5126
|
const t = {};
|
|
5127
5127
|
return this.experiments && this.experiments.forEach((e) => {
|
|
5128
|
-
t["--RS__" + e] =
|
|
5128
|
+
t["--RS__" + e] = Te[e].value;
|
|
5129
5129
|
}), t;
|
|
5130
5130
|
}
|
|
5131
5131
|
}
|
|
5132
|
-
class
|
|
5132
|
+
class Vn {
|
|
5133
5133
|
constructor(t) {
|
|
5134
5134
|
this.rsProperties = t.rsProperties, this.userProperties = t.userProperties;
|
|
5135
5135
|
}
|
|
@@ -5152,13 +5152,13 @@ class bn {
|
|
|
5152
5152
|
wordSpacing: t.wordSpacing,
|
|
5153
5153
|
zoom: t.zoom
|
|
5154
5154
|
};
|
|
5155
|
-
this.userProperties = new
|
|
5155
|
+
this.userProperties = new aA(e);
|
|
5156
5156
|
}
|
|
5157
5157
|
}
|
|
5158
|
-
function
|
|
5158
|
+
function vn(r, t) {
|
|
5159
5159
|
return r == null || t == null || r <= t ? r : void 0;
|
|
5160
5160
|
}
|
|
5161
|
-
function
|
|
5161
|
+
function Dn(r, t) {
|
|
5162
5162
|
return r == null || t == null || r >= t ? r : void 0;
|
|
5163
5163
|
}
|
|
5164
5164
|
function Y(r) {
|
|
@@ -5189,9 +5189,9 @@ function W(r, t) {
|
|
|
5189
5189
|
function re(r, t) {
|
|
5190
5190
|
return r === void 0 ? t : r;
|
|
5191
5191
|
}
|
|
5192
|
-
function
|
|
5192
|
+
function lA(r) {
|
|
5193
5193
|
if (r !== void 0)
|
|
5194
|
-
return r === null ? null : r.filter((t) => t in
|
|
5194
|
+
return r === null ? null : r.filter((t) => t in Te);
|
|
5195
5195
|
}
|
|
5196
5196
|
class Ft {
|
|
5197
5197
|
constructor(t = {}) {
|
|
@@ -5216,12 +5216,12 @@ class Ft {
|
|
|
5216
5216
|
return new Ft(e);
|
|
5217
5217
|
}
|
|
5218
5218
|
}
|
|
5219
|
-
class
|
|
5219
|
+
class Hn {
|
|
5220
5220
|
constructor(t) {
|
|
5221
|
-
this.fontFamily = Y(t.fontFamily) || null, this.fontWeight = W(t.fontWeight, $.range) || null, this.hyphens = I(t.hyphens) ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = y(t.letterSpacing) || null, this.ligatures = I(t.ligatures) ?? null, this.lineHeight = y(t.lineHeight) || null, this.noRuby = I(t.noRuby) ?? !1, this.paragraphIndent = y(t.paragraphIndent) ?? null, this.paragraphSpacing = y(t.paragraphSpacing) ?? null, this.textAlign = _t(t.textAlign, Z) || null, this.textNormalization = I(t.textNormalization) ?? !1, this.wordSpacing = y(t.wordSpacing) || null, this.zoom = W(t.zoom, Lt.range) || 1, this.experiments =
|
|
5221
|
+
this.fontFamily = Y(t.fontFamily) || null, this.fontWeight = W(t.fontWeight, $.range) || null, this.hyphens = I(t.hyphens) ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = y(t.letterSpacing) || null, this.ligatures = I(t.ligatures) ?? null, this.lineHeight = y(t.lineHeight) || null, this.noRuby = I(t.noRuby) ?? !1, this.paragraphIndent = y(t.paragraphIndent) ?? null, this.paragraphSpacing = y(t.paragraphSpacing) ?? null, this.textAlign = _t(t.textAlign, Z) || null, this.textNormalization = I(t.textNormalization) ?? !1, this.wordSpacing = y(t.wordSpacing) || null, this.zoom = W(t.zoom, Lt.range) || 1, this.experiments = lA(t.experiments) ?? null;
|
|
5222
5222
|
}
|
|
5223
5223
|
}
|
|
5224
|
-
class
|
|
5224
|
+
class ci {
|
|
5225
5225
|
constructor(t, e, i) {
|
|
5226
5226
|
this.fontFamily = null, this.fontWeight = null, this.hyphens = null, this.iOSPatch = null, this.iPadOSPatch = null, this.letterSpacing = null, this.ligatures = null, this.lineHeight = null, this.noRuby = null, this.paragraphIndent = null, this.paragraphSpacing = null, this.textAlign = null, this.textNormalization = null, this.wordSpacing = null, i && (this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : t.iOSPatch === !0 ? (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? U.OS.iPadOS && U.iOSRequest === "desktop" : e.iPadOSPatch, this.letterSpacing = t.letterSpacing !== void 0 ? t.letterSpacing : e.letterSpacing !== void 0 ? e.letterSpacing : null, this.ligatures = typeof t.ligatures == "boolean" ? t.ligatures : e.ligatures ?? null, this.lineHeight = t.lineHeight !== void 0 ? t.lineHeight : e.lineHeight !== void 0 ? e.lineHeight : null, this.noRuby = typeof t.noRuby == "boolean" ? t.noRuby : e.noRuby ?? null, this.paragraphIndent = t.paragraphIndent !== void 0 ? t.paragraphIndent : e.paragraphIndent !== void 0 ? e.paragraphIndent : null, this.paragraphSpacing = t.paragraphSpacing !== void 0 ? t.paragraphSpacing : e.paragraphSpacing !== void 0 ? e.paragraphSpacing : null, this.textAlign = t.textAlign || e.textAlign || null, this.textNormalization = typeof t.textNormalization == "boolean" ? t.textNormalization : e.textNormalization ?? null, this.wordSpacing = t.wordSpacing !== void 0 ? t.wordSpacing : e.wordSpacing !== void 0 ? e.wordSpacing : null), this.zoom = t.zoom !== void 0 ? t.zoom : e.zoom !== void 0 ? e.zoom : null, this.experiments = e.experiments || null;
|
|
5227
5227
|
}
|
|
@@ -5271,7 +5271,7 @@ class z extends Q {
|
|
|
5271
5271
|
this._value = !this._value, this._onChange(this._value);
|
|
5272
5272
|
}
|
|
5273
5273
|
}
|
|
5274
|
-
class
|
|
5274
|
+
class hA extends Q {
|
|
5275
5275
|
constructor({
|
|
5276
5276
|
initialValue: t = null,
|
|
5277
5277
|
effectiveValue: e,
|
|
@@ -5309,9 +5309,9 @@ class F extends Q {
|
|
|
5309
5309
|
isEffective: i,
|
|
5310
5310
|
onChange: A,
|
|
5311
5311
|
supportedRange: n,
|
|
5312
|
-
step:
|
|
5312
|
+
step: s
|
|
5313
5313
|
}) {
|
|
5314
|
-
super({ initialValue: t, effectiveValue: e, isEffective: i, onChange: A }), this._supportedRange = n, this._step =
|
|
5314
|
+
super({ initialValue: t, effectiveValue: e, isEffective: i, onChange: A }), this._supportedRange = n, this._step = s, this._decimals = this._step.toString().includes(".") ? this._step.toString().split(".")[1].length : 0;
|
|
5315
5315
|
}
|
|
5316
5316
|
set value(t) {
|
|
5317
5317
|
if (t && (t < this._supportedRange[0] || t > this._supportedRange[1]))
|
|
@@ -5352,7 +5352,7 @@ class F extends Q {
|
|
|
5352
5352
|
this._value = null;
|
|
5353
5353
|
}
|
|
5354
5354
|
}
|
|
5355
|
-
class
|
|
5355
|
+
class di {
|
|
5356
5356
|
constructor(t, e, i) {
|
|
5357
5357
|
this.preferences = t, this.settings = e, this.metadata = i;
|
|
5358
5358
|
}
|
|
@@ -5364,7 +5364,7 @@ class gi {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
get isDisplayTransformable() {
|
|
5366
5366
|
return this.metadata?.accessibility?.feature?.some(
|
|
5367
|
-
(t) => t.value ===
|
|
5367
|
+
(t) => t.value === yi.DISPLAY_TRANSFORMABILITY.value
|
|
5368
5368
|
) ?? !1;
|
|
5369
5369
|
}
|
|
5370
5370
|
get fontFamily() {
|
|
@@ -5488,7 +5488,7 @@ class gi {
|
|
|
5488
5488
|
});
|
|
5489
5489
|
}
|
|
5490
5490
|
get textAlign() {
|
|
5491
|
-
return new
|
|
5491
|
+
return new hA({
|
|
5492
5492
|
initialValue: this.preferences.textAlign,
|
|
5493
5493
|
effectiveValue: this.settings.textAlign || Z.start,
|
|
5494
5494
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5533,7 +5533,7 @@ class gi {
|
|
|
5533
5533
|
});
|
|
5534
5534
|
}
|
|
5535
5535
|
}
|
|
5536
|
-
const
|
|
5536
|
+
const Gn = (r) => ({
|
|
5537
5537
|
frameLoaded: r.frameLoaded || (() => {
|
|
5538
5538
|
}),
|
|
5539
5539
|
positionChanged: r.positionChanged || (() => {
|
|
@@ -5550,39 +5550,39 @@ const Dn = (r) => ({
|
|
|
5550
5550
|
textSelected: r.textSelected || (() => {
|
|
5551
5551
|
})
|
|
5552
5552
|
});
|
|
5553
|
-
class
|
|
5553
|
+
class kn extends Ni {
|
|
5554
5554
|
constructor(t, e, i, A = void 0, n = { preferences: {}, defaults: {} }) {
|
|
5555
5555
|
if (super(), this.currentIndex = 0, this._preferencesEditor = null, this.webViewport = {
|
|
5556
5556
|
readingOrder: [],
|
|
5557
5557
|
progressions: /* @__PURE__ */ new Map(),
|
|
5558
5558
|
positions: null
|
|
5559
|
-
}, this.pub = e, this.container = t, this.listeners =
|
|
5560
|
-
rsProperties: new
|
|
5561
|
-
userProperties: new
|
|
5559
|
+
}, this.pub = e, this.container = t, this.listeners = Gn(i), this._preferences = new Ft(n.preferences), this._defaults = new Hn(n.defaults), this._settings = new ci(this._preferences, this._defaults, this.hasDisplayTransformability), this._css = new Vn({
|
|
5560
|
+
rsProperties: new jn({ experiments: this._settings.experiments || null }),
|
|
5561
|
+
userProperties: new aA({ zoom: this._settings.zoom })
|
|
5562
5562
|
}), A && typeof A.copyWithLocations == "function") {
|
|
5563
5563
|
this.currentLocation = A;
|
|
5564
|
-
const
|
|
5565
|
-
|
|
5564
|
+
const s = this.pub.readingOrder.findIndexWithHref(A.href);
|
|
5565
|
+
s >= 0 && (this.currentIndex = s);
|
|
5566
5566
|
} else
|
|
5567
5567
|
this.currentLocation = this.createCurrentLocator();
|
|
5568
5568
|
}
|
|
5569
5569
|
async load() {
|
|
5570
5570
|
await this.updateCSS(!1);
|
|
5571
5571
|
const t = this.compileCSSProperties(this._css);
|
|
5572
|
-
this.framePool = new
|
|
5572
|
+
this.framePool = new Nn(this.container, t), await this.apply();
|
|
5573
5573
|
}
|
|
5574
5574
|
// Configurable interface implementation
|
|
5575
5575
|
get settings() {
|
|
5576
5576
|
return Object.freeze({ ...this._settings });
|
|
5577
5577
|
}
|
|
5578
5578
|
get preferencesEditor() {
|
|
5579
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
5579
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new di(this._preferences, this.settings, this.pub.metadata)), this._preferencesEditor;
|
|
5580
5580
|
}
|
|
5581
5581
|
async submitPreferences(t) {
|
|
5582
5582
|
this._preferences = this._preferences.merging(t), await this.applyPreferences();
|
|
5583
5583
|
}
|
|
5584
5584
|
async applyPreferences() {
|
|
5585
|
-
this._settings = new
|
|
5585
|
+
this._settings = new ci(this._preferences, this._defaults, this.hasDisplayTransformability), this._preferencesEditor !== null && (this._preferencesEditor = new di(this._preferences, this.settings, this.pub.metadata)), await this.updateCSS(!0);
|
|
5586
5586
|
}
|
|
5587
5587
|
async updateCSS(t) {
|
|
5588
5588
|
this._css.update(this._settings), t && await this.commitCSS(this._css);
|
|
@@ -5608,7 +5608,7 @@ class Hn extends Ni {
|
|
|
5608
5608
|
}
|
|
5609
5609
|
get hasDisplayTransformability() {
|
|
5610
5610
|
return this.pub.metadata?.accessibility?.feature?.some(
|
|
5611
|
-
(t) => t.value ===
|
|
5611
|
+
(t) => t.value === yi.DISPLAY_TRANSFORMABILITY.value
|
|
5612
5612
|
) ?? !1;
|
|
5613
5613
|
}
|
|
5614
5614
|
eventListener(t, e) {
|
|
@@ -5639,34 +5639,34 @@ class Hn extends Ni {
|
|
|
5639
5639
|
"text/html"
|
|
5640
5640
|
).body.children[0];
|
|
5641
5641
|
if (n.nodeType === n.ELEMENT_NODE && n.nodeName === "A" && n.hasAttribute("href")) {
|
|
5642
|
-
const
|
|
5643
|
-
if (
|
|
5642
|
+
const s = n.attributes.getNamedItem("href")?.value;
|
|
5643
|
+
if (s.startsWith("#"))
|
|
5644
5644
|
this.go(this.currentLocation.copyWithLocations({
|
|
5645
|
-
fragments: [
|
|
5645
|
+
fragments: [s.substring(1)]
|
|
5646
5646
|
}), !1, () => {
|
|
5647
5647
|
});
|
|
5648
|
-
else if (
|
|
5648
|
+
else if (s.startsWith("mailto:") || s.startsWith("tel:"))
|
|
5649
5649
|
this.listeners.handleLocator(new H({
|
|
5650
|
-
href:
|
|
5650
|
+
href: s
|
|
5651
5651
|
}).locator);
|
|
5652
5652
|
else
|
|
5653
5653
|
try {
|
|
5654
|
-
let
|
|
5655
|
-
if (
|
|
5656
|
-
|
|
5654
|
+
let o;
|
|
5655
|
+
if (s.startsWith("http://") || s.startsWith("https://"))
|
|
5656
|
+
o = s;
|
|
5657
5657
|
else if (this.currentLocation.href.startsWith("http://") || this.currentLocation.href.startsWith("https://")) {
|
|
5658
5658
|
const h = new URL(this.currentLocation.href);
|
|
5659
|
-
|
|
5659
|
+
o = new URL(s, h).href;
|
|
5660
5660
|
} else
|
|
5661
|
-
|
|
5662
|
-
const a = this.pub.readingOrder.findWithHref(
|
|
5661
|
+
o = vt.join(vt.dirname(this.currentLocation.href), s);
|
|
5662
|
+
const a = this.pub.readingOrder.findWithHref(o);
|
|
5663
5663
|
a ? this.goLink(a, !1, () => {
|
|
5664
|
-
}) : (console.warn(`Internal link not found in readingOrder: ${
|
|
5665
|
-
href:
|
|
5664
|
+
}) : (console.warn(`Internal link not found in readingOrder: ${o}`), this.listeners.handleLocator(new H({
|
|
5665
|
+
href: s
|
|
5666
5666
|
}).locator));
|
|
5667
|
-
} catch (
|
|
5668
|
-
console.warn(`Couldn't resolve internal link for ${
|
|
5669
|
-
href:
|
|
5667
|
+
} catch (o) {
|
|
5668
|
+
console.warn(`Couldn't resolve internal link for ${s}: ${o}`), this.listeners.handleLocator(new H({
|
|
5669
|
+
href: s
|
|
5670
5670
|
}).locator);
|
|
5671
5671
|
}
|
|
5672
5672
|
} else console.log("Clicked on", n);
|
|
@@ -5690,7 +5690,7 @@ class Hn extends Ni {
|
|
|
5690
5690
|
}
|
|
5691
5691
|
}
|
|
5692
5692
|
determineModules() {
|
|
5693
|
-
return Array.from(Vt.keys()).filter((e) =>
|
|
5693
|
+
return Array.from(Vt.keys()).filter((e) => Un.includes(e));
|
|
5694
5694
|
}
|
|
5695
5695
|
attachListener() {
|
|
5696
5696
|
this.framePool.currentFrames[0]?.msg && (this.framePool.currentFrames[0].msg.listener = (t, e) => {
|
|
@@ -5793,17 +5793,17 @@ class Hn extends Ni {
|
|
|
5793
5793
|
e(i);
|
|
5794
5794
|
return;
|
|
5795
5795
|
}
|
|
5796
|
-
const
|
|
5797
|
-
|
|
5798
|
-
this.framePool.currentFrames[0].msg.send("go_progression",
|
|
5796
|
+
const s = t?.locations?.progression;
|
|
5797
|
+
s && s > 0 ? i = await new Promise((a, h) => {
|
|
5798
|
+
this.framePool.currentFrames[0].msg.send("go_progression", s, (c) => a(c));
|
|
5799
5799
|
}) : i = !0, e(i);
|
|
5800
5800
|
}
|
|
5801
5801
|
go(t, e, i) {
|
|
5802
5802
|
const A = t.href.split("#")[0];
|
|
5803
5803
|
if (!this.pub.readingOrder.findWithHref(A))
|
|
5804
5804
|
return i(this.listeners.handleLocator(t));
|
|
5805
|
-
const
|
|
5806
|
-
|
|
5805
|
+
const s = this.pub.readingOrder.findIndexWithHref(A);
|
|
5806
|
+
s >= 0 && (this.currentIndex = s), this.currentLocation = this.createCurrentLocator(), this.apply().then(() => this.loadLocator(t, (o) => i(o))).then(() => {
|
|
5807
5807
|
this.attachListener();
|
|
5808
5808
|
});
|
|
5809
5809
|
}
|
|
@@ -5828,20 +5828,20 @@ class Hn extends Ni {
|
|
|
5828
5828
|
});
|
|
5829
5829
|
}
|
|
5830
5830
|
}
|
|
5831
|
-
const yr = Hn, Gn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__viewportWidth:100%;--RS__pageGutter:0;--RS__defaultLineLength:40rem;--RS__colGap:0;--RS__colCount:1;--RS__colWidth:100vw}@page{margin:0!important}:root{position:relative;-webkit-column-width:var(--RS__colWidth);-moz-column-width:var(--RS__colWidth);column-width:var(--RS__colWidth);-webkit-column-count:var(--RS__colCount);-moz-column-count:var(--RS__colCount);column-count:var(--RS__colCount);-webkit-column-gap:var(--RS__colGap);-moz-column-gap:var(--RS__colGap);column-gap:var(--RS__colGap);-moz-column-fill:auto;column-fill:auto;width:var(--RS__viewportWidth);height:100vh;max-width:var(--RS__viewportWidth);max-height:100vh;min-width:var(--RS__viewportWidth);min-height:100vh;padding:0!important;margin:0!important;font-size:1rem!important;box-sizing:border-box;-webkit-touch-callout:none}body{width:100%;max-width:var(--RS__defaultLineLength)!important;padding:0 var(--RS__pageGutter)!important;margin:0 auto!important;box-sizing:border-box}:root:not([style*=readium-noOverflow-on]) body{overflow:hidden}@supports (overflow: clip){:root:not([style*=readium-noOverflow-on]){overflow:clip}:root:not([style*=readium-noOverflow-on]) body{overflow:clip;overflow-clip-margin:content-box}}:root[style*=readium-scroll-on]{-webkit-columns:auto auto!important;-moz-columns:auto auto!important;columns:auto auto!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important}:root[style*=readium-scroll-on] body{max-width:var(--RS__defaultLineLength)!important;box-sizing:border-box!important}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:auto}@supports (overflow: clip){:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]){overflow:auto}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:clip}}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingTop] body{padding-top:var(--RS__scrollPaddingTop)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingBottom] body{padding-bottom:var(--RS__scrollPaddingBottom)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingLeft] body{padding-left:var(--RS__scrollPaddingLeft)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingRight] body{padding-right:var(--RS__scrollPaddingRight)!important}:root[style*=--USER__backgroundColor]{background-color:var(--USER__backgroundColor)!important}:root[style*=--USER__backgroundColor] *{background-color:transparent!important}:root[style*=--USER__textColor]{color:var(--USER__textColor)!important}:root[style*=--USER__textColor] *:not(a){color:inherit!important;background-color:transparent!important;border-color:currentcolor!important}:root[style*=--USER__textColor] svg text{fill:currentcolor!important;stroke:none!important}:root[style*=--USER__linkColor] a:link,:root[style*=--USER__linkColor] a:link *{color:var(--USER__linkColor)!important}:root[style*=--USER__visitedColor] a:visited,:root[style*=--USER__visitedColor] a:visited *{color:var(--USER__visitedColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::-moz-selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__colCount]{-webkit-column-count:var(--USER__colCount);-moz-column-count:var(--USER__colCount);column-count:var(--USER__colCount);--RS__colWidth:auto}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"]{-webkit-column-count:1;-moz-column-count:1;column-count:1}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"],:root[style*="--USER__colCount: 1"],:root[style*="--USER__colCount:1"]{--RS__colWidth:100vw}:root[style*=--USER__lineLength] body{max-width:var(--USER__lineLength)!important}:root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] body{zoom:var(--USER__fontSize)!important}:root:not([style*=readium-deprecatedFontSize-on])[style*=readium-iOSPatch-on][style*=--USER__fontSize] body{-webkit-text-size-adjust:var(--USER__fontSize)!important}@supports selector(figure:has(> img)){:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>img),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>video),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>svg),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>canvas),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>iframe),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>audio),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>img:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>video:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>svg:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>canvas:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>iframe:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>audio:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] table{zoom:calc(100% / var(--USER__fontSize))!important}:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figcaption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] caption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] td,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] th{zoom:var(--USER__fontSize)!important}}@supports not (zoom: 1){:root[style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}}:root[style*=readium-deprecatedFontSize-on][style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-blend-on] svg,:root[style*=readium-blend-on] img{background-color:transparent!important;mix-blend-mode:multiply!important}:root[style*=--USER__darkenImages] img{-webkit-filter:brightness(var(--USER__darkenImages))!important;filter:brightness(var(--USER__darkenImages))!important}:root[style*=readium-darken-on] img{-webkit-filter:brightness(80%)!important;filter:brightness(80%)!important}:root[style*=--USER__invertImages] img{-webkit-filter:invert(var(--USER__invertImages))!important;filter:invert(var(--USER__invertImages))!important}:root[style*=readium-invert-on] img{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=--USER__darkenImages][style*=--USER__invertImages] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important;filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important}:root[style*=readium-darken-on][style*=--USER__invertImages] img{-webkit-filter:brightness(80%) invert(var(--USER__invertImages))!important;filter:brightness(80%) invert(var(--USER__invertImages))!important}:root[style*=--USER__darkenImages][style*=readium-invert-on] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(100%)!important;filter:brightness(var(--USER__darkenImages)) invert(100%)!important}:root[style*=readium-darken-on][style*=readium-invert-on] img{-webkit-filter:brightness(80%) invert(100%)!important;filter:brightness(80%) invert(100%)!important}:root[style*=--USER__invertGaiji] img[class*=gaiji]{-webkit-filter:invert(var(--USER__invertGaiji))!important;filter:invert(var(--USER__invertGaiji))!important}:root[style*=readium-invertGaiji-on] img[class*=gaiji]{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=readium-normalize-on]{--USER__typeScale:1.2}:root[style*=readium-normalize-on] p,:root[style*=readium-normalize-on] li,:root[style*=readium-normalize-on] div,:root[style*=readium-normalize-on] pre,:root[style*=readium-normalize-on] dd{font-size:1rem!important}:root[style*=readium-normalize-on] h1{font-size:1.75rem!important;font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h2{font-size:1.5rem!important;font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h3{font-size:1.25rem!important;font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h4,:root[style*=readium-normalize-on] h5,:root[style*=readium-normalize-on] h6{font-size:1rem!important}:root[style*=readium-normalize-on] small{font-size:smaller!important}:root[style*=readium-normalize-on] sub,:root[style*=readium-normalize-on] sup{font-size:67.5%!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h1{font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h2{font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h3{font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}', kn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);@-ms-viewport{width:device-width}@viewport{width:device-width;zoom:1}:root{--RS__monospaceTf:ui-monospace, "Andale Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--RS__humanistTf:Seravek, Calibri, "Gill Sans Nova", Roboto, Ubuntu, "DejaVu Sans", source-sans-pro, sans-serif;--RS__sansTf:-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", "Arial Nova", "Liberation Sans", Arial, sans-serif;--RS__modernTf:Athelas, Constantia, Charter, "Bitstream Charter", Cambria, "Georgia Pro", Georgia, serif;--RS__oldStyleTf:"Iowan Old Style", Sitka, "Sitka Text", Palatino, "Book Antiqua", "URW Palladio L", P052, serif;--RS__baseFontFamily:var(--RS__oldStyleTf);--RS__lineHeightCompensation:1;--RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation));--RS__selectionTextColor:inherit;--RS__selectionBackgroundColor:#b4d8fe;--RS__visitedColor:#551A8B;--RS__linkColor:#0000EE;--RS__textColor:#121212;--RS__backgroundColor:#FFFFFF;color:var(--RS__textColor)!important;background-color:var(--RS__backgroundColor)!important}::-moz-selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}::selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}html{font-family:var(--RS__baseFontFamily);line-height:1.6;line-height:var(--RS__baseLineHeight);text-rendering:optimizelegibility}h1,h2,h3{line-height:normal}:lang(ja),:lang(zh),:lang(ko){word-wrap:break-word;-webkit-line-break:strict;-epub-line-break:strict;line-break:strict}math{font-family:"Latin Modern Math","STIX Two Math","XITS Math","STIX Math","Libertinus Math","TeX Gyre Termes Math","TeX Gyre Bonum Math",TeX Gyre Schola,"DejaVu Math TeX Gyre","TeX Gyre Pagella Math","Asana Math","Cambria Math","Lucida Bright Math","Minion Math",STIXGeneral,STIXSizeOneSym,Symbol,Times New Roman,serif}:lang(am){--RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif;--RS__lineHeightCompensation:1.167}:lang(ar){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(bn){--RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif;--RS__lineHeightCompensation:1.067}:lang(bo){--RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif}:lang(chr){--RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee";--RS__lineHeightCompensation:1.167}:lang(fa){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(gu){--RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif;--RS__lineHeightCompensation:1.167}:lang(he){--RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif;--RS__lineHeightCompensation:1.1}:lang(hi){--RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif;--RS__lineHeightCompensation:1.1}:lang(hy){--RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif}:lang(iu){--RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif}:lang(ja){--RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif;--RS__lineHeightCompensation:1.167;--RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif;--RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif;--RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif;--RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif}:lang(km){--RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif;--RS__lineHeightCompensation:1.067}:lang(kn){--RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif;--RS__lineHeightCompensation:1.1}:lang(ko){--RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif;--RS__lineHeightCompensation:1.167}:lang(lo){--RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif}:lang(ml){--RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif;--RS__lineHeightCompensation:1.067}:lang(or){--RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif;--RS__lineHeightCompensation:1.167}:lang(pa){--RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif;--RS__lineHeightCompensation:1.1}:lang(si){--RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif;--RS__lineHeightCompensation:1.167}:lang(ta){--RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif;--RS__lineHeightCompensation:1.067}:lang(te){--RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif}:lang(th){--RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif;--RS__lineHeightCompensation:1.067}:lang(zh){--RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-Hant),:lang(zh-TW){--RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-HK){--RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Regular.woff2) format("woff2"),url(./assets/AccessibleDfA-Regular.woff) format("woff")}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:700;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Bold.woff2) format("woff2")}@font-face{font-family:AccessibleDfA;font-style:italic;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Italic.woff2) format("woff2")}@font-face{font-family:IA Writer Duospace;font-style:normal;font-weight:400;src:local("iAWriterDuospace-Regular"),url(./assets/iAWriterDuospace-Regular.ttf) format("truetype")}body{widows:2;orphans:2}figcaption,th,td{widows:1;orphans:1}h2,h3,h4,h5,h6,dt,hr,caption{-webkit-column-break-after:avoid;page-break-after:avoid;break-after:avoid}h1,h2,h3,h4,h5,h6,dt,figure,tr{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}body{-webkit-hyphenate-character:"-";-moz-hyphenate-character:"-";-ms-hyphenate-character:"-";hyphenate-character:"-";-webkit-hyphenate-limit-lines:3;-ms-hyphenate-limit-lines:3;hyphenate-limit-lines:3}h1,h2,h3,h4,h5,h6,dt,figcaption,pre,caption,address,center,code,var{-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;-epub-hyphens:none;hyphens:none}body{font-variant-numeric:oldstyle-nums proportional-nums}:lang(ja) body,:lang(zh) body,:lang(ko) body{font-variant-numeric:lining-nums proportional-nums}h1,h2,h3,h4,h5,h6,dt{font-variant-numeric:lining-nums proportional-nums}table{font-variant-numeric:lining-nums tabular-nums}code,var{font-variant-ligatures:none;font-variant-numeric:lining-nums tabular-nums slashed-zero}rt{font-variant-east-asian:ruby}:lang(ar){font-variant-ligatures:common-ligatures}:lang(ko){font-kerning:normal}hr{color:inherit;border-color:currentcolor}table,th,td{border-color:currentcolor}figure,blockquote{margin:1em 5%}ul,ol{padding-left:5%}dd{margin-left:5%}pre{white-space:pre-wrap;-ms-tab-size:2;-moz-tab-size:2;-webkit-tab-size:2;tab-size:2}abbr[title],acronym[title]{text-decoration:dotted underline}nobr wbr{white-space:normal}ruby>rt,ruby>rp{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}*:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)),*:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)),*:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)),:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) cite,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) dfn,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) em,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) i,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) cite,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) dfn,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) em,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) i,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) cite,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) dfn,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) em,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) i{font-style:normal}:lang(ja) a,:lang(zh) a,:lang(ko) a{text-decoration:none}:root{--RS__maxMediaWidth:100%;--RS__maxMediaHeight:95vh;--RS__boxSizingMedia:border-box;--RS__boxSizingTable:border-box}a,a span,span a,h1,h2,h3,h4,h5,h6{word-wrap:break-word}div{max-width:var(--RS__maxMediaWidth)}img,svg|svg,video{object-fit:contain;width:auto;height:auto;max-width:var(--RS__maxMediaWidth);max-height:var(--RS__maxMediaHeight)!important;box-sizing:var(--RS__boxSizingMedia);-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}audio{max-width:100%;-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}table{max-width:var(--RS__maxMediaWidth);box-sizing:var(--RS__boxSizingTable)}', Jn = "@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__compFontFamily:var(--RS__baseFontFamily);--RS__codeFontFamily:var(--RS__monospaceTf);--RS__typeScale:1.125;--RS__baseFontSize:100%;--RS__flowSpacing:1.5rem;--RS__paraSpacing:0;--RS__paraIndent:1em;--RS__linkColor:#0000EE;--RS__visitedColor:#551A8B;--RS__primaryColor:;--RS__secondaryColor:}body{font-size:var(--RS__baseFontSize)}h1,h2,h3,h4,h5,h6{font-family:var(--RS__compFontFamily)}blockquote,figure,p,pre,aside,footer,form,hr{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}p{margin-top:var(--RS__paraSpacing);margin-bottom:var(--RS__paraSpacing);text-indent:var(--RS__paraIndent)}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p,hr+p{text-indent:0}pre{font-family:var(--RS__codeFontFamily)}code,kbd,samp,tt{font-family:var(--RS__codeFontFamily)}sub,sup{position:relative;font-size:67.5%;line-height:1}sub{bottom:-.2ex}sup{bottom:0}:link{color:var(--RS__linkColor)}:visited{color:var(--RS__visitedColor)}h1{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:calc(var(--RS__flowSpacing) * 2);font-size:calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale))}h2{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:var(--RS__flowSpacing);font-size:calc((1em * var(--RS__typeScale)) * var(--RS__typeScale))}h3{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:calc(1em * var(--RS__typeScale))}h4{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em}h5{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em;font-variant:small-caps}h6{margin-top:var(--RS__flowSpacing);margin-bottom:0;font-size:1em;text-transform:lowercase;font-variant:small-caps}dl,ol,ul{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}table{margin:var(--RS__flowSpacing) 0;border:1px solid currentcolor;border-collapse:collapse;empty-cells:show}thead,tbody,tfoot,table>tr{vertical-align:top}th{text-align:left}th,td{padding:4px;border:1px solid currentcolor}", _ = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), hA = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), oe = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), be = (r, t) => {
|
|
5831
|
+
const Fr = kn, Jn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__viewportWidth:100%;--RS__pageGutter:0;--RS__defaultLineLength:40rem;--RS__colGap:0;--RS__colCount:1;--RS__colWidth:100vw}@page{margin:0!important}:root{position:relative;-webkit-column-width:var(--RS__colWidth);-moz-column-width:var(--RS__colWidth);column-width:var(--RS__colWidth);-webkit-column-count:var(--RS__colCount);-moz-column-count:var(--RS__colCount);column-count:var(--RS__colCount);-webkit-column-gap:var(--RS__colGap);-moz-column-gap:var(--RS__colGap);column-gap:var(--RS__colGap);-moz-column-fill:auto;column-fill:auto;width:var(--RS__viewportWidth);height:100vh;max-width:var(--RS__viewportWidth);max-height:100vh;min-width:var(--RS__viewportWidth);min-height:100vh;padding:0!important;margin:0!important;font-size:1rem!important;box-sizing:border-box;-webkit-touch-callout:none}body{width:100%;max-width:var(--RS__defaultLineLength)!important;padding:0 var(--RS__pageGutter)!important;margin:0 auto!important;box-sizing:border-box}:root:not([style*=readium-noOverflow-on]) body{overflow:hidden}@supports (overflow: clip){:root:not([style*=readium-noOverflow-on]){overflow:clip}:root:not([style*=readium-noOverflow-on]) body{overflow:clip;overflow-clip-margin:content-box}}:root[style*=readium-scroll-on]{-webkit-columns:auto auto!important;-moz-columns:auto auto!important;columns:auto auto!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important}:root[style*=readium-scroll-on] body{max-width:var(--RS__defaultLineLength)!important;box-sizing:border-box!important}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:auto}@supports (overflow: clip){:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]){overflow:auto}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:clip}}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingTop] body{padding-top:var(--RS__scrollPaddingTop)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingBottom] body{padding-bottom:var(--RS__scrollPaddingBottom)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingLeft] body{padding-left:var(--RS__scrollPaddingLeft)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingRight] body{padding-right:var(--RS__scrollPaddingRight)!important}:root[style*=--USER__backgroundColor]{background-color:var(--USER__backgroundColor)!important}:root[style*=--USER__backgroundColor] *{background-color:transparent!important}:root[style*=--USER__textColor]{color:var(--USER__textColor)!important}:root[style*=--USER__textColor] *:not(a){color:inherit!important;background-color:transparent!important;border-color:currentcolor!important}:root[style*=--USER__textColor] svg text{fill:currentcolor!important;stroke:none!important}:root[style*=--USER__linkColor] a:link,:root[style*=--USER__linkColor] a:link *{color:var(--USER__linkColor)!important}:root[style*=--USER__visitedColor] a:visited,:root[style*=--USER__visitedColor] a:visited *{color:var(--USER__visitedColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::-moz-selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__colCount]{-webkit-column-count:var(--USER__colCount);-moz-column-count:var(--USER__colCount);column-count:var(--USER__colCount);--RS__colWidth:auto}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"]{-webkit-column-count:1;-moz-column-count:1;column-count:1}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"],:root[style*="--USER__colCount: 1"],:root[style*="--USER__colCount:1"]{--RS__colWidth:100vw}:root[style*=--USER__lineLength] body{max-width:var(--USER__lineLength)!important}:root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] body{zoom:var(--USER__fontSize)!important}:root:not([style*=readium-deprecatedFontSize-on])[style*=readium-iOSPatch-on][style*=--USER__fontSize] body{-webkit-text-size-adjust:var(--USER__fontSize)!important}@supports selector(figure:has(> img)){:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>img),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>video),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>svg),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>canvas),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>iframe),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>audio),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>img:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>video:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>svg:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>canvas:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>iframe:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>audio:only-child),:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] table{zoom:calc(100% / var(--USER__fontSize))!important}:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figcaption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] caption,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] td,:root[style*=readium-experimentalZoom-on]:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] th{zoom:var(--USER__fontSize)!important}}@supports not (zoom: 1){:root[style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}}:root[style*=readium-deprecatedFontSize-on][style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not(blockquote p,figcaption p,header p,hgroup p,:root[style*=readium-experimentalHeaderFiltering-on] p[class*=title],:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>h1+p,:root[style*=readium-experimentalHeaderFiltering-on] div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-blend-on] svg,:root[style*=readium-blend-on] img{background-color:transparent!important;mix-blend-mode:multiply!important}:root[style*=--USER__darkenImages] img{-webkit-filter:brightness(var(--USER__darkenImages))!important;filter:brightness(var(--USER__darkenImages))!important}:root[style*=readium-darken-on] img{-webkit-filter:brightness(80%)!important;filter:brightness(80%)!important}:root[style*=--USER__invertImages] img{-webkit-filter:invert(var(--USER__invertImages))!important;filter:invert(var(--USER__invertImages))!important}:root[style*=readium-invert-on] img{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=--USER__darkenImages][style*=--USER__invertImages] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important;filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important}:root[style*=readium-darken-on][style*=--USER__invertImages] img{-webkit-filter:brightness(80%) invert(var(--USER__invertImages))!important;filter:brightness(80%) invert(var(--USER__invertImages))!important}:root[style*=--USER__darkenImages][style*=readium-invert-on] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(100%)!important;filter:brightness(var(--USER__darkenImages)) invert(100%)!important}:root[style*=readium-darken-on][style*=readium-invert-on] img{-webkit-filter:brightness(80%) invert(100%)!important;filter:brightness(80%) invert(100%)!important}:root[style*=--USER__invertGaiji] img[class*=gaiji]{-webkit-filter:invert(var(--USER__invertGaiji))!important;filter:invert(var(--USER__invertGaiji))!important}:root[style*=readium-invertGaiji-on] img[class*=gaiji]{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=readium-normalize-on]{--USER__typeScale:1.2}:root[style*=readium-normalize-on] p,:root[style*=readium-normalize-on] li,:root[style*=readium-normalize-on] div,:root[style*=readium-normalize-on] pre,:root[style*=readium-normalize-on] dd{font-size:1rem!important}:root[style*=readium-normalize-on] h1{font-size:1.75rem!important;font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h2{font-size:1.5rem!important;font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h3{font-size:1.25rem!important;font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h4,:root[style*=readium-normalize-on] h5,:root[style*=readium-normalize-on] h6{font-size:1rem!important}:root[style*=readium-normalize-on] small{font-size:smaller!important}:root[style*=readium-normalize-on] sub,:root[style*=readium-normalize-on] sup{font-size:67.5%!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h1{font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h2{font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h3{font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}', Wn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);@-ms-viewport{width:device-width}@viewport{width:device-width;zoom:1}:root{--RS__monospaceTf:ui-monospace, "Andale Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--RS__humanistTf:Seravek, Calibri, "Gill Sans Nova", Roboto, Ubuntu, "DejaVu Sans", source-sans-pro, sans-serif;--RS__sansTf:-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", "Arial Nova", "Liberation Sans", Arial, sans-serif;--RS__modernTf:Athelas, Constantia, Charter, "Bitstream Charter", Cambria, "Georgia Pro", Georgia, serif;--RS__oldStyleTf:"Iowan Old Style", Sitka, "Sitka Text", Palatino, "Book Antiqua", "URW Palladio L", P052, serif;--RS__baseFontFamily:var(--RS__oldStyleTf);--RS__lineHeightCompensation:1;--RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation));--RS__selectionTextColor:inherit;--RS__selectionBackgroundColor:#b4d8fe;--RS__visitedColor:#551A8B;--RS__linkColor:#0000EE;--RS__textColor:#121212;--RS__backgroundColor:#FFFFFF;color:var(--RS__textColor)!important;background-color:var(--RS__backgroundColor)!important}::-moz-selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}::selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}html{font-family:var(--RS__baseFontFamily);line-height:1.6;line-height:var(--RS__baseLineHeight);text-rendering:optimizelegibility}h1,h2,h3{line-height:normal}:lang(ja),:lang(zh),:lang(ko){word-wrap:break-word;-webkit-line-break:strict;-epub-line-break:strict;line-break:strict}math{font-family:"Latin Modern Math","STIX Two Math","XITS Math","STIX Math","Libertinus Math","TeX Gyre Termes Math","TeX Gyre Bonum Math",TeX Gyre Schola,"DejaVu Math TeX Gyre","TeX Gyre Pagella Math","Asana Math","Cambria Math","Lucida Bright Math","Minion Math",STIXGeneral,STIXSizeOneSym,Symbol,Times New Roman,serif}:lang(am){--RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif;--RS__lineHeightCompensation:1.167}:lang(ar){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(bn){--RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif;--RS__lineHeightCompensation:1.067}:lang(bo){--RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif}:lang(chr){--RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee";--RS__lineHeightCompensation:1.167}:lang(fa){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(gu){--RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif;--RS__lineHeightCompensation:1.167}:lang(he){--RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif;--RS__lineHeightCompensation:1.1}:lang(hi){--RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif;--RS__lineHeightCompensation:1.1}:lang(hy){--RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif}:lang(iu){--RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif}:lang(ja){--RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif;--RS__lineHeightCompensation:1.167;--RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif;--RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif;--RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif;--RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif}:lang(km){--RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif;--RS__lineHeightCompensation:1.067}:lang(kn){--RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif;--RS__lineHeightCompensation:1.1}:lang(ko){--RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif;--RS__lineHeightCompensation:1.167}:lang(lo){--RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif}:lang(ml){--RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif;--RS__lineHeightCompensation:1.067}:lang(or){--RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif;--RS__lineHeightCompensation:1.167}:lang(pa){--RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif;--RS__lineHeightCompensation:1.1}:lang(si){--RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif;--RS__lineHeightCompensation:1.167}:lang(ta){--RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif;--RS__lineHeightCompensation:1.067}:lang(te){--RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif}:lang(th){--RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif;--RS__lineHeightCompensation:1.067}:lang(zh){--RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-Hant),:lang(zh-TW){--RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-HK){--RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Regular.woff2) format("woff2"),url(./assets/AccessibleDfA-Regular.woff) format("woff")}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:700;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Bold.woff2) format("woff2")}@font-face{font-family:AccessibleDfA;font-style:italic;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Italic.woff2) format("woff2")}@font-face{font-family:IA Writer Duospace;font-style:normal;font-weight:400;src:local("iAWriterDuospace-Regular"),url(./assets/iAWriterDuospace-Regular.ttf) format("truetype")}body{widows:2;orphans:2}figcaption,th,td{widows:1;orphans:1}h2,h3,h4,h5,h6,dt,hr,caption{-webkit-column-break-after:avoid;page-break-after:avoid;break-after:avoid}h1,h2,h3,h4,h5,h6,dt,figure,tr{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}body{-webkit-hyphenate-character:"-";-moz-hyphenate-character:"-";-ms-hyphenate-character:"-";hyphenate-character:"-";-webkit-hyphenate-limit-lines:3;-ms-hyphenate-limit-lines:3;hyphenate-limit-lines:3}h1,h2,h3,h4,h5,h6,dt,figcaption,pre,caption,address,center,code,var{-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;-epub-hyphens:none;hyphens:none}body{font-variant-numeric:oldstyle-nums proportional-nums}:lang(ja) body,:lang(zh) body,:lang(ko) body{font-variant-numeric:lining-nums proportional-nums}h1,h2,h3,h4,h5,h6,dt{font-variant-numeric:lining-nums proportional-nums}table{font-variant-numeric:lining-nums tabular-nums}code,var{font-variant-ligatures:none;font-variant-numeric:lining-nums tabular-nums slashed-zero}rt{font-variant-east-asian:ruby}:lang(ar){font-variant-ligatures:common-ligatures}:lang(ko){font-kerning:normal}hr{color:inherit;border-color:currentcolor}table,th,td{border-color:currentcolor}figure,blockquote{margin:1em 5%}ul,ol{padding-left:5%}dd{margin-left:5%}pre{white-space:pre-wrap;-ms-tab-size:2;-moz-tab-size:2;-webkit-tab-size:2;tab-size:2}abbr[title],acronym[title]{text-decoration:dotted underline}nobr wbr{white-space:normal}ruby>rt,ruby>rp{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}*:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)),*:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)),*:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)),:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) cite,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) dfn,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) em,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) i,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) cite,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) dfn,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) em,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) i,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) cite,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) dfn,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) em,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) i{font-style:normal}:lang(ja) a,:lang(zh) a,:lang(ko) a{text-decoration:none}:root{--RS__maxMediaWidth:100%;--RS__maxMediaHeight:95vh;--RS__boxSizingMedia:border-box;--RS__boxSizingTable:border-box}a,a span,span a,h1,h2,h3,h4,h5,h6{word-wrap:break-word}div{max-width:var(--RS__maxMediaWidth)}img,svg|svg,video{object-fit:contain;width:auto;height:auto;max-width:var(--RS__maxMediaWidth);max-height:var(--RS__maxMediaHeight)!important;box-sizing:var(--RS__boxSizingMedia);-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}audio{max-width:100%;-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}table{max-width:var(--RS__maxMediaWidth);box-sizing:var(--RS__boxSizingTable)}', On = "@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__compFontFamily:var(--RS__baseFontFamily);--RS__codeFontFamily:var(--RS__monospaceTf);--RS__typeScale:1.125;--RS__baseFontSize:100%;--RS__flowSpacing:1.5rem;--RS__paraSpacing:0;--RS__paraIndent:1em;--RS__linkColor:#0000EE;--RS__visitedColor:#551A8B;--RS__primaryColor:;--RS__secondaryColor:}body{font-size:var(--RS__baseFontSize)}h1,h2,h3,h4,h5,h6{font-family:var(--RS__compFontFamily)}blockquote,figure,p,pre,aside,footer,form,hr{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}p{margin-top:var(--RS__paraSpacing);margin-bottom:var(--RS__paraSpacing);text-indent:var(--RS__paraIndent)}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p,hr+p{text-indent:0}pre{font-family:var(--RS__codeFontFamily)}code,kbd,samp,tt{font-family:var(--RS__codeFontFamily)}sub,sup{position:relative;font-size:67.5%;line-height:1}sub{bottom:-.2ex}sup{bottom:0}:link{color:var(--RS__linkColor)}:visited{color:var(--RS__visitedColor)}h1{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:calc(var(--RS__flowSpacing) * 2);font-size:calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale))}h2{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:var(--RS__flowSpacing);font-size:calc((1em * var(--RS__typeScale)) * var(--RS__typeScale))}h3{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:calc(1em * var(--RS__typeScale))}h4{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em}h5{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em;font-variant:small-caps}h6{margin-top:var(--RS__flowSpacing);margin-bottom:0;font-size:1em;text-transform:lowercase;font-variant:small-caps}dl,ol,ul{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}table{margin:var(--RS__flowSpacing) 0;border:1px solid currentcolor;border-collapse:collapse;empty-cells:show}thead,tbody,tfoot,table>tr{vertical-align:top}th{text-align:left}th,td{padding:4px;border:1px solid currentcolor}", _ = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), cA = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), se = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), Pe = (r, t) => {
|
|
5832
5832
|
const e = r.createElement("script");
|
|
5833
5833
|
return e.dataset.readium = "true", e.src = t.startsWith("blob:") ? t : _(t, "text/javascript"), e;
|
|
5834
|
-
},
|
|
5834
|
+
}, oe = (r, t) => {
|
|
5835
5835
|
const e = r.createElement("link");
|
|
5836
5836
|
return e.dataset.readium = "true", e.rel = "stylesheet", e.type = "text/css", e.href = t.startsWith("blob:") ? t : _(t, "text/css"), e;
|
|
5837
5837
|
}, ae = /* @__PURE__ */ new Map(), mt = (r, t) => {
|
|
5838
5838
|
if (ae.has(r)) return ae.get(r);
|
|
5839
5839
|
const e = t();
|
|
5840
5840
|
return ae.set(r, e), e;
|
|
5841
|
-
},
|
|
5842
|
-
|
|
5841
|
+
}, Ln = (r) => Pe(r, mt("css-selector-generator", () => _(
|
|
5842
|
+
xi,
|
|
5843
5843
|
"text/javascript"
|
|
5844
|
-
))),
|
|
5844
|
+
))), Xn = (r) => Pe(r, mt("JS-Before", () => _(cA(
|
|
5845
5845
|
`
|
|
5846
5846
|
const noop=()=>{},emptyObj={},emptyPromise=()=>Promise.resolve(void 0),fakeStorage={getItem:noop,setItem:noop,removeItem:noop,clear:noop,key:noop,length:0};["localStorage","sessionStorage"].forEach((e=>Object.defineProperty(window,e,{get:()=>fakeStorage,configurable:!0}))),Object.defineProperty(document,"cookie",{get:()=>"",set:noop,configurable:!0}),Object.defineProperty(window,"indexedDB",{get:()=>{},configurable:!0}),Object.defineProperty(window,"caches",{get:()=>emptyObj,configurable:!0}),Object.defineProperty(navigator,"storage",{get:()=>({persist:emptyPromise,persisted:emptyPromise,estimate:()=>Promise.resolve({quota:0,usage:0})}),configurable:!0}),Object.defineProperty(navigator,"serviceWorker",{get:()=>({register:emptyPromise,getRegistration:emptyPromise,ready:emptyPromise()}),configurable:!0});
|
|
5847
5847
|
|
|
@@ -5857,7 +5857,7 @@ const yr = Hn, Gn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epu
|
|
|
5857
5857
|
};
|
|
5858
5858
|
window.addEventListener("DOMContentLoaded", window._readium_eventBlocker, true);
|
|
5859
5859
|
window.addEventListener("load", window._readium_eventBlocker, true);`
|
|
5860
|
-
), "text/javascript"))),
|
|
5860
|
+
), "text/javascript"))), Zn = (r) => Pe(r, mt("JS-After", () => _(cA(
|
|
5861
5861
|
`
|
|
5862
5862
|
if(window.onload) window.onload = new Proxy(window.onload, {
|
|
5863
5863
|
apply: function(target, receiver, args) {
|
|
@@ -5870,7 +5870,7 @@ const yr = Hn, Gn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epu
|
|
|
5870
5870
|
]);
|
|
5871
5871
|
}
|
|
5872
5872
|
});`
|
|
5873
|
-
), "text/javascript"))),
|
|
5873
|
+
), "text/javascript"))), Kn = (r) => {
|
|
5874
5874
|
const t = r.join(" ");
|
|
5875
5875
|
return [
|
|
5876
5876
|
// 'self' is useless because the document is loaded from a blob: URL
|
|
@@ -5895,7 +5895,7 @@ const yr = Hn, Gn = '@namespace url(http://www.w3.org/1999/xhtml);@namespace epu
|
|
|
5895
5895
|
//`report-uri ?`,
|
|
5896
5896
|
].join("; ");
|
|
5897
5897
|
};
|
|
5898
|
-
class
|
|
5898
|
+
class dA {
|
|
5899
5899
|
constructor(t, e, i, A) {
|
|
5900
5900
|
this.pub = t, this.item = i, this.burl = i.toURL(e) || "", this.cssProperties = A;
|
|
5901
5901
|
}
|
|
@@ -5939,11 +5939,11 @@ class cA {
|
|
|
5939
5939
|
A && e.documentElement.style.setProperty(i, A);
|
|
5940
5940
|
}
|
|
5941
5941
|
}
|
|
5942
|
-
finalizeDOM(t, e, i, A, n = !1,
|
|
5942
|
+
finalizeDOM(t, e, i, A, n = !1, s) {
|
|
5943
5943
|
if (!t) return "";
|
|
5944
5944
|
if (!n) {
|
|
5945
|
-
const h =
|
|
5946
|
-
t.head.firstChild ? t.head.firstChild.before(h) : t.head.appendChild(h), this.hasStyle(t) || h.after(
|
|
5945
|
+
const h = oe(t, mt("ReadiumCSS-before", () => _(se(Wn), "text/css")));
|
|
5946
|
+
t.head.firstChild ? t.head.firstChild.before(h) : t.head.appendChild(h), this.hasStyle(t) || h.after(oe(t, mt("ReadiumCSS-default", () => _(se(On), "text/css")))), t.head.appendChild(oe(t, mt("ReadiumCSS-after", () => _(se(Jn), "text/css")))), s && this.setProperties(s, t);
|
|
5947
5947
|
}
|
|
5948
5948
|
if (t.body.querySelectorAll("img").forEach((h) => {
|
|
5949
5949
|
h.setAttribute("fetchpriority", "high");
|
|
@@ -5958,10 +5958,10 @@ class cA {
|
|
|
5958
5958
|
const h = t.createElement("base");
|
|
5959
5959
|
h.href = i, h.dataset.readium = "true", t.head.firstChild.before(h);
|
|
5960
5960
|
}
|
|
5961
|
-
const
|
|
5962
|
-
|
|
5961
|
+
const o = this.hasExecutable(t);
|
|
5962
|
+
o && t.head.firstChild.before(Xn(t)), t.head.firstChild.before(Ln(t)), o && t.head.appendChild(Zn(t));
|
|
5963
5963
|
const a = t.createElement("meta");
|
|
5964
|
-
return a.httpEquiv = "Content-Security-Policy", a.content =
|
|
5964
|
+
return a.httpEquiv = "Content-Security-Policy", a.content = Kn(e ? [e] : []), a.dataset.readium = "true", t.head.firstChild.before(a), URL.createObjectURL(
|
|
5965
5965
|
new Blob([new XMLSerializer().serializeToString(t)], {
|
|
5966
5966
|
type: A.isHTML ? A.string : "application/xhtml+xml"
|
|
5967
5967
|
// Fallback to XHTML
|
|
@@ -5969,7 +5969,7 @@ class cA {
|
|
|
5969
5969
|
);
|
|
5970
5970
|
}
|
|
5971
5971
|
}
|
|
5972
|
-
class
|
|
5972
|
+
class qn {
|
|
5973
5973
|
constructor(t) {
|
|
5974
5974
|
this.hidden = !0, this.destroyed = !1, this.currModules = [], this.frame = document.createElement("iframe"), this.frame.sandbox.value = "allow-same-origin allow-scripts", 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.source = t;
|
|
5975
5975
|
}
|
|
@@ -6062,8 +6062,8 @@ class Zn {
|
|
|
6062
6062
|
return this.loader;
|
|
6063
6063
|
}
|
|
6064
6064
|
}
|
|
6065
|
-
const
|
|
6066
|
-
class
|
|
6065
|
+
const gi = 5, ui = 3;
|
|
6066
|
+
class _n {
|
|
6067
6067
|
constructor(t, e, i) {
|
|
6068
6068
|
this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.container = t, this.positions = e, this.currentCssProperties = i;
|
|
6069
6069
|
}
|
|
@@ -6076,19 +6076,19 @@ class Kn {
|
|
|
6076
6076
|
let A = this.pool.values(), n = A.next();
|
|
6077
6077
|
for (; n.value; )
|
|
6078
6078
|
await n.value.destroy(), n = A.next();
|
|
6079
|
-
this.pool.clear(), this.blobs.forEach((
|
|
6080
|
-
(
|
|
6079
|
+
this.pool.clear(), this.blobs.forEach((s) => URL.revokeObjectURL(s)), this.container.childNodes.forEach((s) => {
|
|
6080
|
+
(s.nodeType === Node.ELEMENT_NODE || s.nodeType === Node.TEXT_NODE) && s.remove();
|
|
6081
6081
|
});
|
|
6082
6082
|
}
|
|
6083
6083
|
async update(t, e, i, A = !1) {
|
|
6084
6084
|
let n = this.positions.findIndex((a) => a.locations.position === e.locations.position);
|
|
6085
6085
|
if (n < 0) throw Error(`Locator not found in position list: ${e.locations.position} > ${this.positions.reduce((a, h) => h.locations.position || 0 > a ? h.locations.position || 0 : a, 0)}`);
|
|
6086
|
-
const
|
|
6087
|
-
this.inprogress.has(
|
|
6088
|
-
const
|
|
6086
|
+
const s = this.positions[n].href;
|
|
6087
|
+
this.inprogress.has(s) && await this.inprogress.get(s);
|
|
6088
|
+
const o = new Promise(async (a, h) => {
|
|
6089
6089
|
const c = [], d = [];
|
|
6090
6090
|
this.positions.forEach((l, p) => {
|
|
6091
|
-
(p > n +
|
|
6091
|
+
(p > n + gi || p < n - gi) && (c.includes(l.href) || c.push(l.href)), p < n + ui && p > n - ui && (d.includes(l.href) || d.push(l.href));
|
|
6092
6092
|
}), c.forEach(async (l) => {
|
|
6093
6093
|
d.includes(l) || this.pool.has(l) && (await this.pool.get(l)?.destroy(), this.pool.delete(l), this.pendingUpdates.has(l) && this.pendingUpdates.set(l, { inPool: !1 }));
|
|
6094
6094
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((l) => URL.revokeObjectURL(l)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
@@ -6109,29 +6109,29 @@ class Kn {
|
|
|
6109
6109
|
const p = t.readingOrder.findWithHref(l);
|
|
6110
6110
|
if (!p) return;
|
|
6111
6111
|
if (!this.blobs.has(l)) {
|
|
6112
|
-
const R = await new
|
|
6112
|
+
const R = await new dA(t, this.currentBaseURL || "", p, this.currentCssProperties).build();
|
|
6113
6113
|
this.blobs.set(l, R);
|
|
6114
6114
|
}
|
|
6115
|
-
const w = new
|
|
6116
|
-
l !==
|
|
6115
|
+
const w = new qn(this.blobs.get(l));
|
|
6116
|
+
l !== s && await w.hide(), this.container.appendChild(w.iframe), await w.load(i), this.pool.set(l, w);
|
|
6117
6117
|
};
|
|
6118
6118
|
try {
|
|
6119
6119
|
await Promise.all(d.map((l) => g(l)));
|
|
6120
6120
|
} catch (l) {
|
|
6121
6121
|
h(l);
|
|
6122
6122
|
}
|
|
6123
|
-
const M = this.pool.get(
|
|
6123
|
+
const M = this.pool.get(s);
|
|
6124
6124
|
(M?.source !== this._currentFrame?.source || A) && (await this._currentFrame?.hide(), M && await M.load(i), M && await M.show(e.locations.progression), this._currentFrame = M), a();
|
|
6125
6125
|
});
|
|
6126
|
-
this.inprogress.set(
|
|
6126
|
+
this.inprogress.set(s, o), await o, this.inprogress.delete(s);
|
|
6127
6127
|
}
|
|
6128
6128
|
setCSSProperties(t) {
|
|
6129
6129
|
if (!((i, A) => {
|
|
6130
|
-
const n = Object.keys(i),
|
|
6131
|
-
if (n.length !==
|
|
6130
|
+
const n = Object.keys(i), s = Object.keys(A);
|
|
6131
|
+
if (n.length !== s.length)
|
|
6132
6132
|
return !1;
|
|
6133
|
-
for (const
|
|
6134
|
-
if (i[
|
|
6133
|
+
for (const o of n)
|
|
6134
|
+
if (i[o] !== A[o])
|
|
6135
6135
|
return !1;
|
|
6136
6136
|
return !0;
|
|
6137
6137
|
})(this.currentCssProperties || {}, t)) {
|
|
@@ -6166,7 +6166,7 @@ class Kn {
|
|
|
6166
6166
|
}), t;
|
|
6167
6167
|
}
|
|
6168
6168
|
}
|
|
6169
|
-
class
|
|
6169
|
+
class $n {
|
|
6170
6170
|
constructor(t, e, i) {
|
|
6171
6171
|
this.currModules = [], this.cachedPage = void 0, this.peripherals = t, this.debugHref = i, this.frame = document.createElement("iframe"), this.frame.sandbox.value = "allow-same-origin allow-scripts", this.frame.classList.add("readium-navigator-iframe"), this.frame.classList.add("blank"), this.frame.scrolling = "no", this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.display = "none", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transformOrigin = "0 0", this.frame.style.transform = "scale(1)", this.frame.style.background = "#fff", this.frame.style.touchAction = "none", this.frame.dataset.originalHref = i, this.source = "about:blank", this.wrapper = document.createElement("div"), this.wrapper.style.position = "relative", this.wrapper.style.float = this.wrapper.style.cssFloat = e === N.rtl ? "right" : "left", this.wrapper.appendChild(this.frame);
|
|
6172
6172
|
}
|
|
@@ -6210,11 +6210,11 @@ class qn {
|
|
|
6210
6210
|
);
|
|
6211
6211
|
if (e) {
|
|
6212
6212
|
const i = /(\w+) *= *([^\s,]+)/g;
|
|
6213
|
-
let A, n = 0,
|
|
6213
|
+
let A, n = 0, s = 0;
|
|
6214
6214
|
for (; A = i.exec(e.content); )
|
|
6215
|
-
A[1] === "width" ? n = Number.parseFloat(A[2]) : A[1] === "height" && (
|
|
6216
|
-
if (n > 0 &&
|
|
6217
|
-
return { width: n, height:
|
|
6215
|
+
A[1] === "width" ? n = Number.parseFloat(A[2]) : A[1] === "height" && (s = Number.parseFloat(A[2]));
|
|
6216
|
+
if (n > 0 && s > 0)
|
|
6217
|
+
return { width: n, height: s };
|
|
6218
6218
|
}
|
|
6219
6219
|
return {
|
|
6220
6220
|
width: t.document.body.scrollWidth,
|
|
@@ -6229,11 +6229,11 @@ class qn {
|
|
|
6229
6229
|
this.frame.style.transform = `scale(${i})`;
|
|
6230
6230
|
const A = this.frame.getBoundingClientRect(), n = this.wrapper.clientHeight - A.height;
|
|
6231
6231
|
if (this.frame.style.top = `${n / 2}px`, t === G.left) {
|
|
6232
|
-
const
|
|
6233
|
-
this.frame.style.left = `${
|
|
6232
|
+
const s = this.wrapper.clientWidth - A.width;
|
|
6233
|
+
this.frame.style.left = `${s}px`;
|
|
6234
6234
|
} else if (t === G.center) {
|
|
6235
|
-
const
|
|
6236
|
-
this.frame.style.left = `${
|
|
6235
|
+
const s = this.wrapper.clientWidth - A.width;
|
|
6236
|
+
this.frame.style.left = `${s / 2}px`;
|
|
6237
6237
|
} else
|
|
6238
6238
|
this.frame.style.left = "0px";
|
|
6239
6239
|
this.frame.style.removeProperty("visibility"), this.frame.style.removeProperty("aria-hidden"), this.frame.style.removeProperty("pointer-events"), this.frame.classList.remove("blank"), this.frame.classList.add("loaded");
|
|
@@ -6329,8 +6329,8 @@ class qn {
|
|
|
6329
6329
|
return this.loader;
|
|
6330
6330
|
}
|
|
6331
6331
|
}
|
|
6332
|
-
var
|
|
6333
|
-
class
|
|
6332
|
+
var tr = /* @__PURE__ */ ((r) => (r[r.Left = 0] = "Left", r[r.Center = 1] = "Center", r[r.Right = 2] = "Right", r))(tr || {}), er = /* @__PURE__ */ ((r) => (r[r.Top = 0] = "Top", r[r.Middle = 1] = "Middle", r[r.Bottom = 2] = "Bottom", r))(er || {});
|
|
6333
|
+
class ir {
|
|
6334
6334
|
constructor() {
|
|
6335
6335
|
this.outerWidth = 0, this.outerHeight = 0, this.HTML = document.documentElement, this.Head = document.head, this.Body = document.body;
|
|
6336
6336
|
}
|
|
@@ -6348,8 +6348,8 @@ class tr {
|
|
|
6348
6348
|
}
|
|
6349
6349
|
getTouchCenter(t) {
|
|
6350
6350
|
if (t.touches.length !== 2) return null;
|
|
6351
|
-
const e = this.HTML.scrollLeft + this.Body.scrollLeft, i = this.HTML.scrollTop + this.Body.scrollTop, A = t.touches[0].screenX - this.outerWidth - e, n = t.touches[0].screenY - this.outerHeight - i,
|
|
6352
|
-
return { X: (A +
|
|
6351
|
+
const e = this.HTML.scrollLeft + this.Body.scrollLeft, i = this.HTML.scrollTop + this.Body.scrollTop, A = t.touches[0].screenX - this.outerWidth - e, n = t.touches[0].screenY - this.outerHeight - i, s = t.touches[1].screenX - this.outerWidth - e, o = t.touches[1].screenY - this.outerHeight - i;
|
|
6352
|
+
return { X: (A + s) / 2, Y: (n + o) / 2 };
|
|
6353
6353
|
}
|
|
6354
6354
|
getBibiEvent(t) {
|
|
6355
6355
|
if (!t) return {
|
|
@@ -6364,13 +6364,13 @@ class tr {
|
|
|
6364
6364
|
X: e.X / window.innerWidth,
|
|
6365
6365
|
Y: e.Y / window.innerHeight
|
|
6366
6366
|
};
|
|
6367
|
-
let n,
|
|
6368
|
-
|
|
6367
|
+
let n, s, o, a;
|
|
6368
|
+
o = n = i, a = s = 1 - i;
|
|
6369
6369
|
const h = {
|
|
6370
6370
|
X: null,
|
|
6371
6371
|
Y: null
|
|
6372
6372
|
};
|
|
6373
|
-
return A.X <
|
|
6373
|
+
return A.X < o ? h.X = 0 : a < A.X ? h.X = 2 : h.X = 1, A.Y < n ? h.Y = 0 : s < A.Y ? h.Y = 2 : h.Y = 1, {
|
|
6374
6374
|
Target: t.target,
|
|
6375
6375
|
Coord: e,
|
|
6376
6376
|
Ratio: A,
|
|
@@ -6378,7 +6378,7 @@ class tr {
|
|
|
6378
6378
|
};
|
|
6379
6379
|
}
|
|
6380
6380
|
}
|
|
6381
|
-
class
|
|
6381
|
+
class Ar {
|
|
6382
6382
|
constructor() {
|
|
6383
6383
|
this._DOM = {
|
|
6384
6384
|
show: !1,
|
|
@@ -6396,8 +6396,8 @@ class er {
|
|
|
6396
6396
|
return this._DOM;
|
|
6397
6397
|
}
|
|
6398
6398
|
}
|
|
6399
|
-
const
|
|
6400
|
-
class
|
|
6399
|
+
const mi = 6, le = 1.02, pi = 50;
|
|
6400
|
+
class nr {
|
|
6401
6401
|
constructor(t, e = !1) {
|
|
6402
6402
|
this.dragState = 0, this.minimumMoved = !1, this.pan = {
|
|
6403
6403
|
startX: 0,
|
|
@@ -6416,7 +6416,7 @@ class ir {
|
|
|
6416
6416
|
target: { X: 0, Y: 0 },
|
|
6417
6417
|
touchN: 0,
|
|
6418
6418
|
startTranslate: { X: 0, Y: 0 }
|
|
6419
|
-
}, this._scale = 1, this.scaleDebouncer = 0, this.frameBounds = null, this.debugger = null, this.btouchstartHandler = this.touchstartHandler.bind(this), this.btouchendHandler = this.touchendHandler.bind(this), this.btouchmoveHandler = this.touchmoveHandler.bind(this), this.bdblclickHandler = this.dblclickHandler.bind(this), this.bmousedownHandler = this.mousedownHandler.bind(this), this.bmouseupHandler = this.mouseupHandler.bind(this), this.bmousemoveHandler = this.mousemoveHandler.bind(this), this.moveFrame = 0, this.manager = t, this.coordinator = new
|
|
6419
|
+
}, this._scale = 1, this.scaleDebouncer = 0, this.frameBounds = null, this.debugger = null, this.btouchstartHandler = this.touchstartHandler.bind(this), this.btouchendHandler = this.touchendHandler.bind(this), this.btouchmoveHandler = this.touchmoveHandler.bind(this), this.bdblclickHandler = this.dblclickHandler.bind(this), this.bmousedownHandler = this.mousedownHandler.bind(this), this.bmouseupHandler = this.mouseupHandler.bind(this), this.bmousemoveHandler = this.mousemoveHandler.bind(this), this.moveFrame = 0, this.manager = t, this.coordinator = new ir(), this.attachEvents(), e && (this.debugger = new Ar());
|
|
6420
6420
|
}
|
|
6421
6421
|
get scale() {
|
|
6422
6422
|
return this._scale;
|
|
@@ -6512,7 +6512,7 @@ class ir {
|
|
|
6512
6512
|
*/
|
|
6513
6513
|
touchendHandler(t) {
|
|
6514
6514
|
if (t.stopPropagation(), !t.touches || t.touches.length === 0)
|
|
6515
|
-
this.pan.endX && !this.isScaled ? (this.pinch.touchN && (this.pan.endX = this.pan.startX), this.updateAfterDrag()) : !this.pinch.touchN && Math.abs(this.pan.overscrollX) >
|
|
6515
|
+
this.pan.endX && !this.isScaled ? (this.pinch.touchN && (this.pan.endX = this.pan.startX), this.updateAfterDrag()) : !this.pinch.touchN && Math.abs(this.pan.overscrollX) > pi && Math.abs(this.pan.overscrollY) < pi / 2 && (this.pan.startX = 0, this.pan.endX = -this.pan.overscrollX, this.updateAfterDrag()), this.dragState = 0, this.minimumMoved = !1, this.clearPinch(), this.debugger?.show && (this.debugger.DOM.center.style.display = "none", this.debugger.DOM.touch1.style.display = "none", this.debugger.DOM.touch2.style.display = "none");
|
|
6516
6516
|
else if (t.touches.length === 1) {
|
|
6517
6517
|
this.dragState = 1, t.touches[0].identifier !== this.pan.touchID && (this.pan.touchID = t.touches[0].identifier), this.debugger?.show && (this.debugger.DOM.center.style.display = "none", this.debugger.DOM.touch2.style.display = "none", this.debugger.DOM.pinchTarget.style.display = "none");
|
|
6518
6518
|
const e = this.startTouch(t);
|
|
@@ -6534,8 +6534,8 @@ class ir {
|
|
|
6534
6534
|
const n = this.scale;
|
|
6535
6535
|
if (this.dragState === 2 && i) {
|
|
6536
6536
|
if (this.pinch.touchN++, this.pinch.touchN < 4) return;
|
|
6537
|
-
let
|
|
6538
|
-
|
|
6537
|
+
let s = i / this.pinch.startDistance * this.scale;
|
|
6538
|
+
s >= mi && (s = mi), s <= le && (s = 1), this.scale = s, this.pinch.startDistance = i, A = !0;
|
|
6539
6539
|
}
|
|
6540
6540
|
if (this.pan.letItGo === !1 && (this.pan.letItGo = Math.abs(this.pan.startY - e.Y) < Math.abs(this.pan.startX - e.X)), this.debugger?.show && (this.debugger.DOM.touch1.style.top = `${e.Y - 10}px`, this.debugger.DOM.touch1.style.left = `${e.X - 10}px`, this.debugger.DOM.touch1.innerText = `${e.X.toFixed(2)},${e.Y.toFixed(2)}`), this.dragState > 0 && this.isScaled || this.dragState > 1) {
|
|
6541
6541
|
if (this.dragState === 1) {
|
|
@@ -6559,8 +6559,8 @@ class ir {
|
|
|
6559
6559
|
let d = (a.X - (this.pan.startX - this.manager.width / 2)) * 1 / this.scale, g = (a.Y - (this.pan.startY - this.manager.height / 2)) * 1 / this.scale;
|
|
6560
6560
|
this.pan.translateX = d, this.pan.translateY = g, this.debugger?.show && (this.debugger.DOM.pinchTarget.style.left = `${this.pinch.target.X * this.scale / this.pinch.startScale - 5 + this.manager.width / 2}px`, this.debugger.DOM.pinchTarget.style.top = `${this.pinch.target.Y * this.scale / this.pinch.startScale - 5 + this.manager.height / 2}px`, this.debugger.DOM.pinchTarget.innerText = `${(this.pinch.target.X * this.scale / this.pinch.startScale).toFixed(2)},${(this.pinch.target.Y * this.scale / this.pinch.startScale).toFixed(2)}`);
|
|
6561
6561
|
}
|
|
6562
|
-
const
|
|
6563
|
-
this.pan.translateX < -
|
|
6562
|
+
const s = this.frameBounds.width / 6, o = this.frameBounds.height / 6;
|
|
6563
|
+
this.pan.translateX < -s && (this.pan.overscrollX = -(s + this.pan.translateX), this.pan.translateX = -s), this.pan.translateY < -o && (this.pan.overscrollY = -(o + this.pan.translateY), this.pan.translateY = -o), this.pan.translateX > s && (this.pan.overscrollX = s - this.pan.translateX, this.pan.translateX = s), this.pan.translateY > o && (this.pan.overscrollY = o - this.pan.translateY, this.pan.translateY = o), A = !0, this.debugger?.show && (this.debugger.DOM.stats.innerText = `TX: ${this.pan.translateX.toFixed(2)}
|
|
6564
6564
|
TY: ${this.pan.translateY.toFixed(2)}
|
|
6565
6565
|
Zoom: ${this.scale.toFixed(2)}
|
|
6566
6566
|
Overscroll: ${this.pan.overscrollX.toFixed(2)},${this.pan.overscrollY.toFixed(2)}`);
|
|
@@ -6571,7 +6571,7 @@ Overscroll: ${this.pan.overscrollX.toFixed(2)},${this.pan.overscrollY.toFixed(2)
|
|
|
6571
6571
|
}
|
|
6572
6572
|
if (this.dragState > 0 && this.pan.letItGo) {
|
|
6573
6573
|
this.pan.endX = e.X;
|
|
6574
|
-
const
|
|
6574
|
+
const o = this.manager.currentSlide * (this.manager.width / this.manager.perPage), a = this.pan.endX - this.pan.startX, h = this.manager.rtl ? o + a : o - a;
|
|
6575
6575
|
cancelAnimationFrame(this.moveFrame), this.moveFrame = requestAnimationFrame(() => {
|
|
6576
6576
|
requestAnimationFrame(() => {
|
|
6577
6577
|
this.manager.spineElement.style.transform = `translate3d(${(this.manager.rtl ? 1 : -1) * h}px, 0, 0)`;
|
|
@@ -6618,7 +6618,7 @@ Overscroll: ${this.pan.overscrollX.toFixed(2)},${this.pan.overscrollY.toFixed(2)
|
|
|
6618
6618
|
}
|
|
6619
6619
|
}
|
|
6620
6620
|
var Be = /* @__PURE__ */ ((r) => (r.auto = "auto", r.landscape = "landscape", r.portrait = "portrait", r))(Be || {}), we = /* @__PURE__ */ ((r) => (r.auto = "auto", r.both = "both", r.none = "none", r.landscape = "landscape", r))(we || {});
|
|
6621
|
-
class
|
|
6621
|
+
class rr {
|
|
6622
6622
|
// TODO getter
|
|
6623
6623
|
constructor(t) {
|
|
6624
6624
|
this.shift = !0, this.spreads = [], this.nLandscape = 0, this.index(t), this.testShift(t), console.log(`Indexed ${this.spreads.length} spreads for ${t.readingOrder.items.length} items`);
|
|
@@ -6646,8 +6646,8 @@ class Ar {
|
|
|
6646
6646
|
this.spreads.forEach((i, A) => {
|
|
6647
6647
|
if (i.length > 1)
|
|
6648
6648
|
return;
|
|
6649
|
-
const n = i[0],
|
|
6650
|
-
A === 0 && (
|
|
6649
|
+
const n = i[0], s = n.properties?.otherProperties.orientation;
|
|
6650
|
+
A === 0 && (s === "landscape" || s !== "portrait" && ((n.width || 0) > (n.height || 0) || n.properties?.otherProperties.spread === "both")) && (this.shift = !1), e && n.properties?.page === G.center && this.spreads[A - 1][0].addProperties({ addBlank: !0 }), s === "portrait" && n.properties?.page !== "center" && n.properties?.otherProperties.number > 1 ? e = !0 : e = !1;
|
|
6651
6651
|
}), this.shift || this.index(t, !0);
|
|
6652
6652
|
}
|
|
6653
6653
|
buildSpreads(t) {
|
|
@@ -6663,13 +6663,13 @@ class Ar {
|
|
|
6663
6663
|
return this.spreads.find((e) => e.includes(t)) || void 0;
|
|
6664
6664
|
}
|
|
6665
6665
|
}
|
|
6666
|
-
const
|
|
6667
|
-
class
|
|
6666
|
+
const fi = 8, Mi = 5, sr = 300, or = 15e3, ar = 250, lr = 150, hr = 500;
|
|
6667
|
+
class cr {
|
|
6668
6668
|
constructor(t, e, i) {
|
|
6669
6669
|
if (this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.delayedShow = /* @__PURE__ */ new Map(), this.delayedTimeout = /* @__PURE__ */ new Map(), this.previousFrames = [], this.width = 0, this.height = 0, this.transform = "", this.currentSlide = 0, this.spread = !0, this.orientationInternal = -1, this.container = t, this.positions = e, this.pub = i, this.spreadPresentation = i.metadata.otherMetadata?.spread || we.auto, this.pub.metadata.effectiveReadingProgression !== N.rtl && this.pub.metadata.effectiveReadingProgression !== N.ltr)
|
|
6670
6670
|
throw Error("Unsupported reading progression for EPUB");
|
|
6671
|
-
this.spreader = new
|
|
6672
|
-
const n = new
|
|
6671
|
+
this.spreader = new rr(this.pub), this.containerHeightCached = t.clientHeight, this.bookElement = document.createElement("div"), this.bookElement.ariaLabel = "Book", this.bookElement.tabIndex = -1, this.updateBookStyle(!0), this.spineElement = document.createElement("div"), this.spineElement.ariaLabel = "Spine", this.bookElement.appendChild(this.spineElement), this.container.appendChild(this.bookElement), this.updateSpineStyle(!0), this.peripherals = new nr(this), this.pub.readingOrder.items.forEach((A) => {
|
|
6672
|
+
const n = new $n(this.peripherals, this.pub.metadata.effectiveReadingProgression, A.href);
|
|
6673
6673
|
this.spineElement.appendChild(n.element), this.pool.set(A.href, n), n.width = 100 / this.length * (A.properties?.otherProperties.orientation === Be.landscape || A.properties?.otherProperties.addBlank ? this.perPage : 1), n.height = this.height;
|
|
6674
6674
|
});
|
|
6675
6675
|
}
|
|
@@ -6689,12 +6689,12 @@ class lr {
|
|
|
6689
6689
|
this.currentSlide + this.perPage > this.length && (this.currentSlide = this.length <= this.perPage ? 0 : this.length - 1), this.containerHeightCached = this.container.clientHeight, this.orientationInternal = -1, this.updateSpineStyle(!0), t && (this.currentSlide = this.reAlign(), this.slideToCurrent(!e, e)), clearTimeout(this.resizeTimeout), this.resizeTimeout = window.setTimeout(() => {
|
|
6690
6690
|
this.pool.forEach((i, A) => {
|
|
6691
6691
|
let n = this.pub.readingOrder.items.findIndex((a) => a.href === A);
|
|
6692
|
-
const
|
|
6693
|
-
if (i.width = 100 / this.length * (
|
|
6694
|
-
const
|
|
6695
|
-
i.update(this.spreadPosition(
|
|
6692
|
+
const s = this.pub.readingOrder.items[n];
|
|
6693
|
+
if (i.width = 100 / this.length * (s.properties?.otherProperties.orientation === Be.landscape || s.properties?.otherProperties.addBlank ? this.perPage : 1), i.height = this.height, !i.loaded) return;
|
|
6694
|
+
const o = this.spreader.findByLink(s);
|
|
6695
|
+
i.update(this.spreadPosition(o, s));
|
|
6696
6696
|
});
|
|
6697
|
-
},
|
|
6697
|
+
}, ar);
|
|
6698
6698
|
}
|
|
6699
6699
|
/**
|
|
6700
6700
|
* It is important that these values be cached to avoid spamming them on redraws, they are expensive.
|
|
@@ -6721,7 +6721,7 @@ class lr {
|
|
|
6721
6721
|
let i = "0";
|
|
6722
6722
|
this.updateDimensions(), this.perPage > 1 && (i = `${this.width / 2}px`);
|
|
6723
6723
|
const A = {
|
|
6724
|
-
transition: t ? `all ${e ?
|
|
6724
|
+
transition: t ? `all ${e ? lr : hr}ms ease-out` : "all 0ms ease-out",
|
|
6725
6725
|
marginRight: this.rtl ? i : "0",
|
|
6726
6726
|
marginLeft: this.rtl ? "0" : i,
|
|
6727
6727
|
width: `${this.width / this.perPage * this.length}px`,
|
|
@@ -6845,8 +6845,8 @@ class lr {
|
|
|
6845
6845
|
let A = this.pool.values(), n = A.next();
|
|
6846
6846
|
for (; n.value; )
|
|
6847
6847
|
await n.value.destroy(), n = A.next();
|
|
6848
|
-
this.pool.clear(), this.blobs.forEach((
|
|
6849
|
-
(
|
|
6848
|
+
this.pool.clear(), this.blobs.forEach((s) => URL.revokeObjectURL(s)), this.container.childNodes.forEach((s) => {
|
|
6849
|
+
(s.nodeType === Node.ELEMENT_NODE || s.nodeType === Node.TEXT_NODE) && s.remove();
|
|
6850
6850
|
});
|
|
6851
6851
|
}
|
|
6852
6852
|
makeSpread(t) {
|
|
@@ -6874,14 +6874,14 @@ class lr {
|
|
|
6874
6874
|
let n = this.pub.readingOrder.items.findIndex((a) => a.href === e.href);
|
|
6875
6875
|
if (n < 0) throw Error("Href not found in reading order");
|
|
6876
6876
|
this.currentSlide !== n && (this.currentSlide = this.reAlign(n), this.slideToCurrent(!0));
|
|
6877
|
-
const
|
|
6877
|
+
const s = this.makeSpread(this.currentSlide);
|
|
6878
6878
|
this.perPage > 1 && n++;
|
|
6879
|
-
for (const a of
|
|
6879
|
+
for (const a of s)
|
|
6880
6880
|
await this.waitForItem(a.href);
|
|
6881
|
-
const
|
|
6881
|
+
const o = new Promise(async (a, h) => {
|
|
6882
6882
|
const c = [], d = [];
|
|
6883
6883
|
this.positions.forEach((l, p) => {
|
|
6884
|
-
(p > n +
|
|
6884
|
+
(p > n + fi || p < n - fi) && (c.includes(l.href) || c.push(l.href)), p < n + Mi && p > n - Mi && (d.includes(l.href) || d.push(l.href));
|
|
6885
6885
|
}), c.forEach(async (l) => {
|
|
6886
6886
|
d.includes(l) || this.pool.has(l) && (this.cancelShowing(l), await this.pool.get(l)?.unload());
|
|
6887
6887
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((l) => URL.revokeObjectURL(l)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
@@ -6889,19 +6889,19 @@ class lr {
|
|
|
6889
6889
|
const p = t.readingOrder.findIndexWithHref(l), w = t.readingOrder.items[p];
|
|
6890
6890
|
if (w) {
|
|
6891
6891
|
if (!this.blobs.has(l)) {
|
|
6892
|
-
const R = await new
|
|
6892
|
+
const R = await new dA(t, this.currentBaseURL || "", w).build(!0);
|
|
6893
6893
|
this.blobs.set(l, R);
|
|
6894
6894
|
}
|
|
6895
6895
|
this.delayedShow.has(l) || this.delayedShow.set(l, new Promise((E, R) => {
|
|
6896
|
-
let
|
|
6897
|
-
const
|
|
6896
|
+
let be = !1;
|
|
6897
|
+
const mA = window.setTimeout(async () => {
|
|
6898
6898
|
this.delayedTimeout.set(l, 0);
|
|
6899
|
-
const
|
|
6900
|
-
await
|
|
6901
|
-
},
|
|
6899
|
+
const pA = this.makeSpread(this.reAlign(p)), fA = this.spreadPosition(pA, w), je = this.pool.get(l);
|
|
6900
|
+
await je.load(i, this.blobs.get(l)), this.peripherals.isScaled || await je.show(fA), this.delayedShow.delete(l), be = !0, E();
|
|
6901
|
+
}, sr);
|
|
6902
6902
|
setTimeout(() => {
|
|
6903
|
-
!
|
|
6904
|
-
},
|
|
6903
|
+
!be && this.delayedShow.has(l) && R(`Offscreen load timeout: ${l}`);
|
|
6904
|
+
}, or), this.delayedTimeout.set(l, mA);
|
|
6905
6905
|
}));
|
|
6906
6906
|
}
|
|
6907
6907
|
};
|
|
@@ -6911,9 +6911,9 @@ class lr {
|
|
|
6911
6911
|
h(l);
|
|
6912
6912
|
}
|
|
6913
6913
|
const M = [];
|
|
6914
|
-
for (const l of
|
|
6914
|
+
for (const l of s) {
|
|
6915
6915
|
const p = this.pool.get(l.href), w = this.blobs.get(l.href);
|
|
6916
|
-
w && (this.cancelShowing(l.href), await p.load(i, w), await p.show(this.spreadPosition(
|
|
6916
|
+
w && (this.cancelShowing(l.href), await p.load(i, w), await p.show(this.spreadPosition(s, l)), this.previousFrames.push(p), await p.activate(), M.push(p));
|
|
6917
6917
|
}
|
|
6918
6918
|
for (; this.previousFrames.length > 0; ) {
|
|
6919
6919
|
const l = this.previousFrames.shift();
|
|
@@ -6921,10 +6921,10 @@ class lr {
|
|
|
6921
6921
|
}
|
|
6922
6922
|
this.previousFrames = M, a();
|
|
6923
6923
|
});
|
|
6924
|
-
for (const a of
|
|
6925
|
-
this.inprogress.set(a.href,
|
|
6926
|
-
await
|
|
6927
|
-
for (const a of
|
|
6924
|
+
for (const a of s)
|
|
6925
|
+
this.inprogress.set(a.href, o);
|
|
6926
|
+
await o;
|
|
6927
|
+
for (const a of s)
|
|
6928
6928
|
this.inprogress.delete(a.href);
|
|
6929
6929
|
}
|
|
6930
6930
|
get currentFrames() {
|
|
@@ -7000,20 +7000,20 @@ class Ut {
|
|
|
7000
7000
|
return new Ut(e);
|
|
7001
7001
|
}
|
|
7002
7002
|
}
|
|
7003
|
-
class
|
|
7003
|
+
class dr {
|
|
7004
7004
|
constructor(t) {
|
|
7005
|
-
this.backgroundColor = Y(t.backgroundColor) || null, this.blendFilter = I(t.blendFilter) ?? !1, this.constraint = y(t.constraint) || 0, this.columnCount = y(t.columnCount) || null, this.darkenFilter = ut(t.darkenFilter) ?? !1, this.deprecatedFontSize = I(t.deprecatedFontSize), (this.deprecatedFontSize === !1 || this.deprecatedFontSize === null) && (this.deprecatedFontSize = !CSS.supports("zoom", "1")), this.fontFamily = Y(t.fontFamily) || null, this.fontSize = W(t.fontSize, Dt.range) || 1, this.fontSizeNormalize = I(t.fontSizeNormalize) ?? !1, this.fontOpticalSizing = I(t.fontOpticalSizing) ?? null, this.fontWeight = W(t.fontWeight, $.range) || null, this.fontWidth = W(t.fontWidth, Ht.range) || null, this.hyphens = I(t.hyphens) ?? null, this.invertFilter = ut(t.invertFilter) ?? !1, this.invertGaijiFilter = ut(t.invertGaijiFilter) ?? !1, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = y(t.letterSpacing) || null, this.ligatures = I(t.ligatures) ?? null, this.lineHeight = y(t.lineHeight) || null, this.linkColor = Y(t.linkColor) || null, this.noRuby = I(t.noRuby) ?? !1, this.pageGutter = re(y(t.pageGutter), 20), this.paragraphIndent = y(t.paragraphIndent) ?? null, this.paragraphSpacing = y(t.paragraphSpacing) ?? null, this.scroll = I(t.scroll) ?? !1, this.scrollPaddingTop = y(t.scrollPaddingTop) ?? null, this.scrollPaddingBottom = y(t.scrollPaddingBottom) ?? null, this.selectionBackgroundColor = Y(t.selectionBackgroundColor) || null, this.selectionTextColor = Y(t.selectionTextColor) || null, this.textAlign = _t(t.textAlign, Z) || null, this.textColor = Y(t.textColor) || null, this.textNormalization = I(t.textNormalization) ?? !1, this.visitedColor = Y(t.visitedColor) || null, this.wordSpacing = y(t.wordSpacing) || null, this.optimalLineLength = y(t.optimalLineLength) || 65, this.maximalLineLength = re(
|
|
7005
|
+
this.backgroundColor = Y(t.backgroundColor) || null, this.blendFilter = I(t.blendFilter) ?? !1, this.constraint = y(t.constraint) || 0, this.columnCount = y(t.columnCount) || null, this.darkenFilter = ut(t.darkenFilter) ?? !1, this.deprecatedFontSize = I(t.deprecatedFontSize), (this.deprecatedFontSize === !1 || this.deprecatedFontSize === null) && (this.deprecatedFontSize = !CSS.supports("zoom", "1")), this.fontFamily = Y(t.fontFamily) || null, this.fontSize = W(t.fontSize, Dt.range) || 1, this.fontSizeNormalize = I(t.fontSizeNormalize) ?? !1, this.fontOpticalSizing = I(t.fontOpticalSizing) ?? null, this.fontWeight = W(t.fontWeight, $.range) || null, this.fontWidth = W(t.fontWidth, Ht.range) || null, this.hyphens = I(t.hyphens) ?? null, this.invertFilter = ut(t.invertFilter) ?? !1, this.invertGaijiFilter = ut(t.invertGaijiFilter) ?? !1, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = y(t.letterSpacing) || null, this.ligatures = I(t.ligatures) ?? null, this.lineHeight = y(t.lineHeight) || null, this.linkColor = Y(t.linkColor) || null, this.noRuby = I(t.noRuby) ?? !1, this.pageGutter = re(y(t.pageGutter), 20), this.paragraphIndent = y(t.paragraphIndent) ?? null, this.paragraphSpacing = y(t.paragraphSpacing) ?? null, this.scroll = I(t.scroll) ?? !1, this.scrollPaddingTop = y(t.scrollPaddingTop) ?? null, this.scrollPaddingBottom = y(t.scrollPaddingBottom) ?? null, this.selectionBackgroundColor = Y(t.selectionBackgroundColor) || null, this.selectionTextColor = Y(t.selectionTextColor) || null, this.textAlign = _t(t.textAlign, Z) || null, this.textColor = Y(t.textColor) || null, this.textNormalization = I(t.textNormalization) ?? !1, this.visitedColor = Y(t.visitedColor) || null, this.wordSpacing = y(t.wordSpacing) || null, this.optimalLineLength = y(t.optimalLineLength) || 65, this.maximalLineLength = re(Dn(t.maximalLineLength, this.optimalLineLength), 80), this.minimalLineLength = re(vn(t.minimalLineLength, this.optimalLineLength), 40), this.experiments = lA(t.experiments) || null;
|
|
7006
7006
|
}
|
|
7007
7007
|
}
|
|
7008
|
-
const
|
|
7009
|
-
RS__backgroundColor:
|
|
7010
|
-
RS__textColor:
|
|
7011
|
-
RS__linkColor:
|
|
7012
|
-
RS__visitedColor:
|
|
7013
|
-
RS__selectionBackgroundColor:
|
|
7014
|
-
RS__selectionTextColor:
|
|
7008
|
+
const gr = "#FFFFFF", ur = "#121212", mr = "#0000EE", pr = "#551A8B", fr = "#b4d8fe", Mr = "inherit", ot = {
|
|
7009
|
+
RS__backgroundColor: gr,
|
|
7010
|
+
RS__textColor: ur,
|
|
7011
|
+
RS__linkColor: mr,
|
|
7012
|
+
RS__visitedColor: pr,
|
|
7013
|
+
RS__selectionBackgroundColor: fr,
|
|
7014
|
+
RS__selectionTextColor: Mr
|
|
7015
7015
|
};
|
|
7016
|
-
class
|
|
7016
|
+
class Bi {
|
|
7017
7017
|
constructor(t, e, i) {
|
|
7018
7018
|
this.preferences = t, this.settings = e, this.metadata = i, this.layout = this.metadata?.effectiveLayout || B.reflowable;
|
|
7019
7019
|
}
|
|
@@ -7026,7 +7026,7 @@ class wi {
|
|
|
7026
7026
|
get backgroundColor() {
|
|
7027
7027
|
return new Q({
|
|
7028
7028
|
initialValue: this.preferences.backgroundColor,
|
|
7029
|
-
effectiveValue: this.settings.backgroundColor ||
|
|
7029
|
+
effectiveValue: this.settings.backgroundColor || ot.RS__backgroundColor,
|
|
7030
7030
|
isEffective: this.preferences.backgroundColor !== null,
|
|
7031
7031
|
onChange: (t) => {
|
|
7032
7032
|
this.updatePreference("backgroundColor", t || null);
|
|
@@ -7247,7 +7247,7 @@ class wi {
|
|
|
7247
7247
|
get linkColor() {
|
|
7248
7248
|
return new Q({
|
|
7249
7249
|
initialValue: this.preferences.linkColor,
|
|
7250
|
-
effectiveValue: this.settings.linkColor ||
|
|
7250
|
+
effectiveValue: this.settings.linkColor || ot.RS__linkColor,
|
|
7251
7251
|
isEffective: this.layout !== B.fixed && this.preferences.linkColor !== null,
|
|
7252
7252
|
onChange: (t) => {
|
|
7253
7253
|
this.updatePreference("linkColor", t || null);
|
|
@@ -7262,8 +7262,8 @@ class wi {
|
|
|
7262
7262
|
onChange: (t) => {
|
|
7263
7263
|
this.updatePreference("maximalLineLength", t);
|
|
7264
7264
|
},
|
|
7265
|
-
supportedRange:
|
|
7266
|
-
step:
|
|
7265
|
+
supportedRange: st.range,
|
|
7266
|
+
step: st.step
|
|
7267
7267
|
});
|
|
7268
7268
|
}
|
|
7269
7269
|
get minimalLineLength() {
|
|
@@ -7274,8 +7274,8 @@ class wi {
|
|
|
7274
7274
|
onChange: (t) => {
|
|
7275
7275
|
this.updatePreference("minimalLineLength", t);
|
|
7276
7276
|
},
|
|
7277
|
-
supportedRange:
|
|
7278
|
-
step:
|
|
7277
|
+
supportedRange: st.range,
|
|
7278
|
+
step: st.step
|
|
7279
7279
|
});
|
|
7280
7280
|
}
|
|
7281
7281
|
get noRuby() {
|
|
@@ -7296,8 +7296,8 @@ class wi {
|
|
|
7296
7296
|
onChange: (t) => {
|
|
7297
7297
|
this.updatePreference("optimalLineLength", t);
|
|
7298
7298
|
},
|
|
7299
|
-
supportedRange:
|
|
7300
|
-
step:
|
|
7299
|
+
supportedRange: st.range,
|
|
7300
|
+
step: st.step
|
|
7301
7301
|
});
|
|
7302
7302
|
}
|
|
7303
7303
|
get pageGutter() {
|
|
@@ -7390,7 +7390,7 @@ class wi {
|
|
|
7390
7390
|
get selectionBackgroundColor() {
|
|
7391
7391
|
return new Q({
|
|
7392
7392
|
initialValue: this.preferences.selectionBackgroundColor,
|
|
7393
|
-
effectiveValue: this.settings.selectionBackgroundColor ||
|
|
7393
|
+
effectiveValue: this.settings.selectionBackgroundColor || ot.RS__selectionBackgroundColor,
|
|
7394
7394
|
isEffective: this.layout !== B.fixed && this.preferences.selectionBackgroundColor !== null,
|
|
7395
7395
|
onChange: (t) => {
|
|
7396
7396
|
this.updatePreference("selectionBackgroundColor", t || null);
|
|
@@ -7400,7 +7400,7 @@ class wi {
|
|
|
7400
7400
|
get selectionTextColor() {
|
|
7401
7401
|
return new Q({
|
|
7402
7402
|
initialValue: this.preferences.selectionTextColor,
|
|
7403
|
-
effectiveValue: this.settings.selectionTextColor ||
|
|
7403
|
+
effectiveValue: this.settings.selectionTextColor || ot.RS__selectionTextColor,
|
|
7404
7404
|
isEffective: this.layout !== B.fixed && this.preferences.selectionTextColor !== null,
|
|
7405
7405
|
onChange: (t) => {
|
|
7406
7406
|
this.updatePreference("selectionTextColor", t || null);
|
|
@@ -7408,7 +7408,7 @@ class wi {
|
|
|
7408
7408
|
});
|
|
7409
7409
|
}
|
|
7410
7410
|
get textAlign() {
|
|
7411
|
-
return new
|
|
7411
|
+
return new hA({
|
|
7412
7412
|
initialValue: this.preferences.textAlign,
|
|
7413
7413
|
effectiveValue: this.settings.textAlign || Z.start,
|
|
7414
7414
|
isEffective: this.layout !== B.fixed && this.preferences.textAlign !== null,
|
|
@@ -7421,7 +7421,7 @@ class wi {
|
|
|
7421
7421
|
get textColor() {
|
|
7422
7422
|
return new Q({
|
|
7423
7423
|
initialValue: this.preferences.textColor,
|
|
7424
|
-
effectiveValue: this.settings.textColor ||
|
|
7424
|
+
effectiveValue: this.settings.textColor || ot.RS__textColor,
|
|
7425
7425
|
isEffective: this.layout !== B.fixed && this.preferences.textColor !== null,
|
|
7426
7426
|
onChange: (t) => {
|
|
7427
7427
|
this.updatePreference("textColor", t || null);
|
|
@@ -7441,7 +7441,7 @@ class wi {
|
|
|
7441
7441
|
get visitedColor() {
|
|
7442
7442
|
return new Q({
|
|
7443
7443
|
initialValue: this.preferences.visitedColor,
|
|
7444
|
-
effectiveValue: this.settings.visitedColor ||
|
|
7444
|
+
effectiveValue: this.settings.visitedColor || ot.RS__visitedColor,
|
|
7445
7445
|
isEffective: this.layout !== B.fixed && this.preferences.visitedColor !== null,
|
|
7446
7446
|
onChange: (t) => {
|
|
7447
7447
|
this.updatePreference("visitedColor", t || null);
|
|
@@ -7461,7 +7461,7 @@ class wi {
|
|
|
7461
7461
|
});
|
|
7462
7462
|
}
|
|
7463
7463
|
}
|
|
7464
|
-
class
|
|
7464
|
+
class wi {
|
|
7465
7465
|
constructor(t, e) {
|
|
7466
7466
|
this.backgroundColor = t.backgroundColor || e.backgroundColor || null, this.blendFilter = typeof t.blendFilter == "boolean" ? t.blendFilter : e.blendFilter ?? null, this.columnCount = t.columnCount !== void 0 ? t.columnCount : e.columnCount !== void 0 ? e.columnCount : null, this.constraint = t.constraint || e.constraint, this.darkenFilter = typeof t.darkenFilter == "boolean" ? t.darkenFilter : e.darkenFilter ?? null, this.deprecatedFontSize = typeof t.deprecatedFontSize == "boolean" ? t.deprecatedFontSize : e.deprecatedFontSize ?? null, this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontSize = t.fontSize !== void 0 ? t.fontSize : e.fontSize !== void 0 ? e.fontSize : null, this.fontSizeNormalize = typeof t.fontSizeNormalize == "boolean" ? t.fontSizeNormalize : e.fontSizeNormalize ?? null, this.fontOpticalSizing = typeof t.fontOpticalSizing == "boolean" ? t.fontOpticalSizing : e.fontOpticalSizing ?? null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.fontWidth = t.fontWidth !== void 0 ? t.fontWidth : e.fontWidth !== void 0 ? e.fontWidth : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.invertFilter = typeof t.invertFilter == "boolean" ? t.invertFilter : e.invertFilter ?? null, this.invertGaijiFilter = typeof t.invertGaijiFilter == "boolean" ? t.invertGaijiFilter : e.invertGaijiFilter ?? null, this.iOSPatch = this.deprecatedFontSize || t.iOSPatch === !1 ? !1 : t.iOSPatch === !0 ? (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = this.deprecatedFontSize || t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? U.OS.iPadOS && U.iOSRequest === "desktop" : e.iPadOSPatch, this.letterSpacing = t.letterSpacing !== void 0 ? t.letterSpacing : e.letterSpacing !== void 0 ? e.letterSpacing : null, this.ligatures = typeof t.ligatures == "boolean" ? t.ligatures : e.ligatures ?? null, this.lineHeight = t.lineHeight !== void 0 ? t.lineHeight : e.lineHeight !== void 0 ? e.lineHeight : null, this.linkColor = t.linkColor || e.linkColor || null, this.maximalLineLength = t.maximalLineLength === null ? null : t.maximalLineLength || e.maximalLineLength || null, this.minimalLineLength = t.minimalLineLength === null ? null : t.minimalLineLength || e.minimalLineLength || null, this.noRuby = typeof t.noRuby == "boolean" ? t.noRuby : e.noRuby ?? null, this.optimalLineLength = t.optimalLineLength || e.optimalLineLength, this.pageGutter = t.pageGutter !== void 0 ? t.pageGutter : e.pageGutter !== void 0 ? e.pageGutter : null, this.paragraphIndent = t.paragraphIndent !== void 0 ? t.paragraphIndent : e.paragraphIndent !== void 0 ? e.paragraphIndent : null, this.paragraphSpacing = t.paragraphSpacing !== void 0 ? t.paragraphSpacing : e.paragraphSpacing !== void 0 ? e.paragraphSpacing : null, this.scroll = typeof t.scroll == "boolean" ? t.scroll : e.scroll ?? null, this.scrollPaddingTop = t.scrollPaddingTop !== void 0 ? t.scrollPaddingTop : e.scrollPaddingTop !== void 0 ? e.scrollPaddingTop : null, this.scrollPaddingBottom = t.scrollPaddingBottom !== void 0 ? t.scrollPaddingBottom : e.scrollPaddingBottom !== void 0 ? e.scrollPaddingBottom : null, this.selectionBackgroundColor = t.selectionBackgroundColor || e.selectionBackgroundColor || null, this.selectionTextColor = t.selectionTextColor || e.selectionTextColor || null, this.textAlign = t.textAlign || e.textAlign || null, this.textColor = t.textColor || e.textColor || null, this.textNormalization = typeof t.textNormalization == "boolean" ? t.textNormalization : e.textNormalization ?? null, this.visitedColor = t.visitedColor || e.visitedColor || null, this.wordSpacing = t.wordSpacing !== void 0 ? t.wordSpacing : e.wordSpacing !== void 0 ? e.wordSpacing : null, this.experiments = e.experiments || null;
|
|
7467
7467
|
}
|
|
@@ -7470,7 +7470,7 @@ function xt(r) {
|
|
|
7470
7470
|
const t = getComputedStyle(r), e = parseFloat(t.paddingLeft || "0"), i = parseFloat(t.paddingRight || "0");
|
|
7471
7471
|
return r.clientWidth - e - i;
|
|
7472
7472
|
}
|
|
7473
|
-
class
|
|
7473
|
+
class gA extends qt {
|
|
7474
7474
|
constructor(t) {
|
|
7475
7475
|
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;
|
|
7476
7476
|
}
|
|
@@ -7479,18 +7479,18 @@ class dA extends qt {
|
|
|
7479
7479
|
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;
|
|
7480
7480
|
}
|
|
7481
7481
|
}
|
|
7482
|
-
class
|
|
7482
|
+
class Br extends qt {
|
|
7483
7483
|
constructor(t) {
|
|
7484
7484
|
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.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;
|
|
7485
7485
|
}
|
|
7486
7486
|
toCSSProperties() {
|
|
7487
7487
|
const t = {};
|
|
7488
7488
|
return this.backgroundColor && (t["--RS__backgroundColor"] = this.backgroundColor), this.baseFontFamily && (t["--RS__baseFontFamily"] = this.baseFontFamily), this.baseFontSize != null && (t["--RS__baseFontSize"] = this.toRem(this.baseFontSize)), this.baseLineHeight != null && (t["--RS__baseLineHeight"] = this.toUnitless(this.baseLineHeight)), this.boxSizingMedia && (t["--RS__boxSizingMedia"] = this.boxSizingMedia), this.boxSizingTable && (t["--RS__boxSizingTable"] = this.boxSizingTable), this.colWidth != null && (t["--RS__colWidth"] = this.colWidth), this.colCount != null && (t["--RS__colCount"] = this.toUnitless(this.colCount)), this.colGap != null && (t["--RS__colGap"] = this.toPx(this.colGap)), this.codeFontFamily && (t["--RS__codeFontFamily"] = this.codeFontFamily), this.compFontFamily && (t["--RS__compFontFamily"] = this.compFontFamily), this.defaultLineLength != null && (t["--RS__defaultLineLength"] = this.toPx(this.defaultLineLength)), this.flowSpacing != null && (t["--RS__flowSpacing"] = this.toRem(this.flowSpacing)), this.humanistTf && (t["--RS__humanistTf"] = this.humanistTf), this.linkColor && (t["--RS__linkColor"] = this.linkColor), this.maxMediaWidth && (t["--RS__maxMediaWidth"] = this.toVw(this.maxMediaWidth)), this.maxMediaHeight && (t["--RS__maxMediaHeight"] = this.toVh(this.maxMediaHeight)), this.modernTf && (t["--RS__modernTf"] = this.modernTf), this.monospaceTf && (t["--RS__monospaceTf"] = this.monospaceTf), this.noOverflow && (t["--RS__disableOverflow"] = this.toFlag("noOverflow")), this.noVerticalPagination && (t["--RS__disablePagination"] = this.toFlag("noVerticalPagination")), this.oldStyleTf && (t["--RS__oldStyleTf"] = this.oldStyleTf), this.pageGutter != null && (t["--RS__pageGutter"] = this.toPx(this.pageGutter)), this.paraIndent != null && (t["--RS__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--RS__paraSpacing"] = this.toRem(this.paraSpacing)), this.primaryColor && (t["--RS__primaryColor"] = this.primaryColor), this.sansSerifJa && (t["--RS__sans-serif-ja"] = this.sansSerifJa), this.sansSerifJaV && (t["--RS__sans-serif-ja-v"] = this.sansSerifJaV), this.sansTf && (t["--RS__sansTf"] = this.sansTf), this.scrollPaddingBottom != null && (t["--RS__scrollPaddingBottom"] = this.toPx(this.scrollPaddingBottom)), this.scrollPaddingTop != null && (t["--RS__scrollPaddingTop"] = this.toPx(this.scrollPaddingTop)), this.secondaryColor && (t["--RS__secondaryColor"] = this.secondaryColor), this.selectionBackgroundColor && (t["--RS__selectionBackgroundColor"] = this.selectionBackgroundColor), this.selectionTextColor && (t["--RS__selectionTextColor"] = this.selectionTextColor), this.serifJa && (t["--RS__serif-ja"] = this.serifJa), this.serifJaV && (t["--RS__serif-ja-v"] = this.serifJaV), this.textColor && (t["--RS__textColor"] = this.textColor), this.typeScale && (t["--RS__typeScale"] = this.toUnitless(this.typeScale)), this.visitedColor && (t["--RS__visitedColor"] = this.visitedColor), this.experiments && this.experiments.forEach((e) => {
|
|
7489
|
-
t["--RS__" + e] =
|
|
7489
|
+
t["--RS__" + e] = Te[e].value;
|
|
7490
7490
|
}), t;
|
|
7491
7491
|
}
|
|
7492
7492
|
}
|
|
7493
|
-
class
|
|
7493
|
+
class wr {
|
|
7494
7494
|
constructor(t) {
|
|
7495
7495
|
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.cachedColCount = t.userProperties.colCount, this.effectiveContainerWidth = xt(this.containerParent);
|
|
7496
7496
|
}
|
|
@@ -7540,7 +7540,7 @@ class Mr {
|
|
|
7540
7540
|
visitedColor: t.visitedColor,
|
|
7541
7541
|
wordSpacing: t.wordSpacing
|
|
7542
7542
|
};
|
|
7543
|
-
this.userProperties = new
|
|
7543
|
+
this.userProperties = new gA(i);
|
|
7544
7544
|
}
|
|
7545
7545
|
updateLayout(t, e, i, A) {
|
|
7546
7546
|
return i ?? this.userProperties.view === "scroll" ? this.computeScrollLength(t, e) : this.paginate(t, e, A);
|
|
@@ -7559,40 +7559,40 @@ class Mr {
|
|
|
7559
7559
|
// TODO: As scroll shows, the effective line-length
|
|
7560
7560
|
// should be the same as uncompensated when scale >= 1
|
|
7561
7561
|
paginate(t, e, i) {
|
|
7562
|
-
const A = Math.round(xt(this.containerParent) - this.constraint), n = this.getCompensatedMetrics(t, e), { zoomCompensation:
|
|
7562
|
+
const A = Math.round(xt(this.containerParent) - this.constraint), n = this.getCompensatedMetrics(t, e), { zoomCompensation: s, optimal: o, minimal: a, maximal: h } = n, c = () => A >= o && h !== null ? Math.min(Math.round(h * s), A) : A;
|
|
7563
7563
|
let d = 1, g = A;
|
|
7564
7564
|
if (i === void 0)
|
|
7565
7565
|
return {
|
|
7566
7566
|
colCount: void 0,
|
|
7567
7567
|
effectiveContainerWidth: g,
|
|
7568
|
-
effectiveLineLength: Math.round(g / d *
|
|
7568
|
+
effectiveLineLength: Math.round(g / d * s)
|
|
7569
7569
|
};
|
|
7570
7570
|
if (i === null)
|
|
7571
|
-
if (A >=
|
|
7572
|
-
d = Math.floor(A /
|
|
7573
|
-
const M = Math.round(d * (h *
|
|
7571
|
+
if (A >= o && h !== null) {
|
|
7572
|
+
d = Math.floor(A / o);
|
|
7573
|
+
const M = Math.round(d * (h * s));
|
|
7574
7574
|
g = Math.min(M, A);
|
|
7575
7575
|
} else
|
|
7576
7576
|
g = c();
|
|
7577
7577
|
else if (i > 1) {
|
|
7578
|
-
const M = Math.round(i * (a !== null ? a :
|
|
7578
|
+
const M = Math.round(i * (a !== null ? a : o));
|
|
7579
7579
|
if (A >= M)
|
|
7580
7580
|
if (d = i, h === null)
|
|
7581
7581
|
g = A;
|
|
7582
7582
|
else {
|
|
7583
|
-
const l = Math.round(d * (h *
|
|
7583
|
+
const l = Math.round(d * (h * s));
|
|
7584
7584
|
g = Math.min(l, A);
|
|
7585
7585
|
}
|
|
7586
7586
|
else if (a !== null && A < Math.round(i * a))
|
|
7587
7587
|
if (d = Math.floor(A / a), d <= 1)
|
|
7588
7588
|
d = 1, g = c();
|
|
7589
7589
|
else {
|
|
7590
|
-
const l = Math.round(d * (
|
|
7590
|
+
const l = Math.round(d * (o * s));
|
|
7591
7591
|
g = Math.min(l, A);
|
|
7592
7592
|
}
|
|
7593
7593
|
else {
|
|
7594
7594
|
d = i;
|
|
7595
|
-
const l = Math.round(d * (
|
|
7595
|
+
const l = Math.round(d * (o * s));
|
|
7596
7596
|
g = Math.min(l, A);
|
|
7597
7597
|
}
|
|
7598
7598
|
} else
|
|
@@ -7600,17 +7600,17 @@ class Mr {
|
|
|
7600
7600
|
return {
|
|
7601
7601
|
colCount: d,
|
|
7602
7602
|
effectiveContainerWidth: g,
|
|
7603
|
-
effectiveLineLength: Math.round(g / d / (t && t >= 1 ? t : 1) *
|
|
7603
|
+
effectiveLineLength: Math.round(g / d / (t && t >= 1 ? t : 1) * s)
|
|
7604
7604
|
};
|
|
7605
7605
|
}
|
|
7606
7606
|
// This behaves as paginate where colCount = 1
|
|
7607
7607
|
computeScrollLength(t, e) {
|
|
7608
|
-
const i = Math.round(xt(this.containerParent) - this.constraint), A = this.getCompensatedMetrics(t && (t < 1 || e) ? t : 1, e), n = A.zoomCompensation,
|
|
7609
|
-
let a, h = i, c = Math.round(
|
|
7610
|
-
if (
|
|
7608
|
+
const i = Math.round(xt(this.containerParent) - this.constraint), A = this.getCompensatedMetrics(t && (t < 1 || e) ? t : 1, e), n = A.zoomCompensation, s = A.optimal, o = A.maximal;
|
|
7609
|
+
let a, h = i, c = Math.round(s * n);
|
|
7610
|
+
if (o === null)
|
|
7611
7611
|
c = i;
|
|
7612
7612
|
else {
|
|
7613
|
-
const d = Math.min(Math.round(
|
|
7613
|
+
const d = Math.min(Math.round(o * n), i);
|
|
7614
7614
|
c = e ? d : Math.round(d * n);
|
|
7615
7615
|
}
|
|
7616
7616
|
return {
|
|
@@ -7627,7 +7627,7 @@ class Mr {
|
|
|
7627
7627
|
this.userProperties.colCount = t.colCount, this.userProperties.lineLength = t.effectiveLineLength, this.effectiveContainerWidth = t.effectiveContainerWidth, this.container.style.width = `${this.effectiveContainerWidth}px`;
|
|
7628
7628
|
}
|
|
7629
7629
|
}
|
|
7630
|
-
const
|
|
7630
|
+
const Er = (r) => ({
|
|
7631
7631
|
frameLoaded: r.frameLoaded || (() => {
|
|
7632
7632
|
}),
|
|
7633
7633
|
positionChanged: r.positionChanged || (() => {
|
|
@@ -7646,15 +7646,15 @@ const Br = (r) => ({
|
|
|
7646
7646
|
textSelected: r.textSelected || (() => {
|
|
7647
7647
|
})
|
|
7648
7648
|
});
|
|
7649
|
-
class
|
|
7650
|
-
constructor(t, e, i, A = [], n = void 0,
|
|
7649
|
+
class uA extends Ni {
|
|
7650
|
+
constructor(t, e, i, A = [], n = void 0, s = { preferences: {}, defaults: {} }) {
|
|
7651
7651
|
super(), this._preferencesEditor = null, this.reflowViewport = {
|
|
7652
7652
|
readingOrder: [],
|
|
7653
7653
|
progressions: /* @__PURE__ */ new Map(),
|
|
7654
7654
|
positions: null
|
|
7655
|
-
}, this.pub = e, this.container = t, this.listeners =
|
|
7656
|
-
rsProperties: new
|
|
7657
|
-
userProperties: new
|
|
7655
|
+
}, this.pub = e, this.container = t, this.listeners = Er(i), this.currentLocation = n, A.length && (this.positions = A), this._preferences = new Ut(s.preferences), this._defaults = new dr(s.defaults), this._settings = new wi(this._preferences, this._defaults), this._css = new wr({
|
|
7656
|
+
rsProperties: new Br({}),
|
|
7657
|
+
userProperties: new gA({}),
|
|
7658
7658
|
lineLengths: new wt({
|
|
7659
7659
|
optimalChars: this._settings.optimalLineLength,
|
|
7660
7660
|
minChars: this._settings.minimalLineLength,
|
|
@@ -7667,21 +7667,21 @@ class gA extends Ni {
|
|
|
7667
7667
|
}),
|
|
7668
7668
|
container: t,
|
|
7669
7669
|
constraint: this._settings.constraint
|
|
7670
|
-
}), this._layout =
|
|
7670
|
+
}), this._layout = uA.determineLayout(e, !!this._settings.scroll), this.currentProgression = e.metadata.effectiveReadingProgression, this.resizeObserver = new ResizeObserver(() => this.ownerWindow.requestAnimationFrame(async () => await this.resizeHandler())), this.resizeObserver.observe(this.container.parentElement || document.documentElement);
|
|
7671
7671
|
}
|
|
7672
7672
|
static determineLayout(t, e) {
|
|
7673
7673
|
const i = t.metadata.effectiveLayout;
|
|
7674
|
-
return i === B.fixed || t.metadata.otherMetadata && "http://openmangaformat.org/schema/1.0#version" in t.metadata.otherMetadata || t.metadata?.conformsTo?.includes(
|
|
7674
|
+
return i === B.fixed || t.metadata.otherMetadata && "http://openmangaformat.org/schema/1.0#version" in t.metadata.otherMetadata || t.metadata?.conformsTo?.includes(Si.DIVINA) ? B.fixed : i === B.scrolled || i === B.reflowable && e ? B.scrolled : B.reflowable;
|
|
7675
7675
|
}
|
|
7676
7676
|
async load() {
|
|
7677
7677
|
if (this.positions?.length || (this.positions = await this.pub.positionsFromManifest()), this._layout === B.fixed)
|
|
7678
|
-
this.framePool = new
|
|
7678
|
+
this.framePool = new cr(this.container, this.positions, this.pub), this.framePool.listener = (t, e) => {
|
|
7679
7679
|
this.eventListener(t, e);
|
|
7680
7680
|
};
|
|
7681
7681
|
else {
|
|
7682
7682
|
await this.updateCSS(!1);
|
|
7683
7683
|
const t = this.compileCSSProperties(this._css);
|
|
7684
|
-
this.framePool = new
|
|
7684
|
+
this.framePool = new _n(this.container, this.positions, t);
|
|
7685
7685
|
}
|
|
7686
7686
|
this.currentLocation === void 0 && (this.currentLocation = this.positions[0]), await this.resizeHandler(), await this.apply();
|
|
7687
7687
|
}
|
|
@@ -7694,14 +7694,14 @@ class gA extends Ni {
|
|
|
7694
7694
|
}
|
|
7695
7695
|
}
|
|
7696
7696
|
get preferencesEditor() {
|
|
7697
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
7697
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new Bi(this._preferences, this.settings, this.pub.metadata)), this._preferencesEditor;
|
|
7698
7698
|
}
|
|
7699
7699
|
async submitPreferences(t) {
|
|
7700
7700
|
this._preferences = this._preferences.merging(t), await this.applyPreferences();
|
|
7701
7701
|
}
|
|
7702
7702
|
async applyPreferences() {
|
|
7703
7703
|
const t = this._settings;
|
|
7704
|
-
this._settings = new
|
|
7704
|
+
this._settings = new wi(this._preferences, this._defaults), this._preferencesEditor !== null && (this._preferencesEditor = new Bi(this._preferences, this.settings, this.pub.metadata)), this._layout === B.fixed ? this.handleFXLPrefs(t, this._settings) : await this.updateCSS(!0);
|
|
7705
7705
|
}
|
|
7706
7706
|
// TODO: fit, etc.
|
|
7707
7707
|
handleFXLPrefs(t, e) {
|
|
@@ -7784,37 +7784,37 @@ class gA extends Ni {
|
|
|
7784
7784
|
"text/html"
|
|
7785
7785
|
).body.children[0];
|
|
7786
7786
|
if (n.nodeType === n.ELEMENT_NODE && n.nodeName === "A" && n.hasAttribute("href")) {
|
|
7787
|
-
const
|
|
7788
|
-
if (
|
|
7787
|
+
const s = n.attributes.getNamedItem("href")?.value;
|
|
7788
|
+
if (s.startsWith("#"))
|
|
7789
7789
|
this.go(this.currentLocation.copyWithLocations({
|
|
7790
|
-
fragments: [
|
|
7790
|
+
fragments: [s.substring(1)]
|
|
7791
7791
|
}), !1, () => {
|
|
7792
7792
|
});
|
|
7793
|
-
else if (
|
|
7793
|
+
else if (s.startsWith("http://") || s.startsWith("https://") || s.startsWith("mailto:") || s.startsWith("tel:"))
|
|
7794
7794
|
this.listeners.handleLocator(new H({
|
|
7795
|
-
href:
|
|
7795
|
+
href: s
|
|
7796
7796
|
}).locator);
|
|
7797
7797
|
else
|
|
7798
7798
|
try {
|
|
7799
7799
|
this.goLink(new H({
|
|
7800
|
-
href: vt.join(vt.dirname(this.currentLocation.href),
|
|
7800
|
+
href: vt.join(vt.dirname(this.currentLocation.href), s)
|
|
7801
7801
|
}), !1, () => {
|
|
7802
7802
|
});
|
|
7803
|
-
} catch (
|
|
7804
|
-
console.warn(`Couldn't go to link for ${
|
|
7805
|
-
href:
|
|
7803
|
+
} catch (o) {
|
|
7804
|
+
console.warn(`Couldn't go to link for ${s}: ${o}`), this.listeners.handleLocator(new H({
|
|
7805
|
+
href: s
|
|
7806
7806
|
}).locator);
|
|
7807
7807
|
}
|
|
7808
7808
|
} else console.log("Clicked on", n);
|
|
7809
7809
|
} else {
|
|
7810
7810
|
if (this._layout === B.fixed && this.framePool.doNotDisturb && (A.doNotDisturb = !0), this._layout === B.fixed && (this.currentProgression === N.rtl || this.currentProgression === N.ltr) && this.framePool.currentFrames.length > 1) {
|
|
7811
|
-
const
|
|
7812
|
-
A.targetFrameSrc ===
|
|
7811
|
+
const o = this.framePool.currentFrames;
|
|
7812
|
+
A.targetFrameSrc === o[this.currentProgression === N.rtl ? 0 : 1]?.source && (A.x += (o[this.currentProgression === N.rtl ? 1 : 0]?.iframe.contentWindow?.innerWidth ?? 0) * window.devicePixelRatio);
|
|
7813
7813
|
}
|
|
7814
7814
|
if (t === "click" ? this.listeners.click(A) : this.listeners.tap(A)) break;
|
|
7815
|
-
const
|
|
7816
|
-
A.x >=
|
|
7817
|
-
}) : A.x >
|
|
7815
|
+
const s = (this._cframes.length === 2 ? this._cframes[0].window.innerWidth + this._cframes[1].window.innerWidth : this._cframes[0].window.innerWidth) * window.devicePixelRatio / 4;
|
|
7816
|
+
A.x >= s && A.x <= s * 3 && this.listeners.miscPointer(1), A.x < s ? this.goLeft(!1, () => {
|
|
7817
|
+
}) : A.x > s * 3 && this.goRight(!1, () => {
|
|
7818
7818
|
});
|
|
7819
7819
|
}
|
|
7820
7820
|
break;
|
|
@@ -7848,7 +7848,7 @@ class gA extends Ni {
|
|
|
7848
7848
|
}
|
|
7849
7849
|
determineModules() {
|
|
7850
7850
|
let t = Array.from(Vt.keys());
|
|
7851
|
-
return this._layout === B.fixed ? t.filter((e) =>
|
|
7851
|
+
return this._layout === B.fixed ? t.filter((e) => In.includes(e)) : (t = t.filter((e) => Fn.includes(e)), this._layout === B.scrolled ? t = t.filter((e) => e !== "column_snapper") : t = t.filter((e) => e !== "scroll_snapper"), t);
|
|
7852
7852
|
}
|
|
7853
7853
|
// Start listening to messages from the current iframe
|
|
7854
7854
|
attachListener() {
|
|
@@ -7877,19 +7877,19 @@ class gA extends Ni {
|
|
|
7877
7877
|
if (!A.prev(A.perPage)) return !1;
|
|
7878
7878
|
} else
|
|
7879
7879
|
throw Error("Invalid relative value for FXL");
|
|
7880
|
-
const
|
|
7881
|
-
if (n >
|
|
7882
|
-
for (let
|
|
7883
|
-
if (this.positions[
|
|
7884
|
-
this.currentLocation = this.positions[
|
|
7880
|
+
const s = A.viewport.positions[0];
|
|
7881
|
+
if (n > s) {
|
|
7882
|
+
for (let o = this.positions.length - 1; o >= 0; o--)
|
|
7883
|
+
if (this.positions[o].href === this.pub.readingOrder.items[s - 1].href) {
|
|
7884
|
+
this.currentLocation = this.positions[o].copyWithLocations({
|
|
7885
7885
|
progression: 0.999999999999
|
|
7886
7886
|
});
|
|
7887
7887
|
break;
|
|
7888
7888
|
}
|
|
7889
|
-
} else if (n <
|
|
7890
|
-
for (let
|
|
7891
|
-
if (this.positions[
|
|
7892
|
-
this.currentLocation = this.positions[
|
|
7889
|
+
} else if (n < s) {
|
|
7890
|
+
for (let o = 0; o < this.positions.length; o++)
|
|
7891
|
+
if (this.positions[o].href === this.pub.readingOrder.items[s - 1].href) {
|
|
7892
|
+
this.currentLocation = this.positions[o];
|
|
7893
7893
|
break;
|
|
7894
7894
|
}
|
|
7895
7895
|
}
|
|
@@ -7930,11 +7930,11 @@ class gA extends Ni {
|
|
|
7930
7930
|
(n) => n.href === this.currentLocation.href
|
|
7931
7931
|
);
|
|
7932
7932
|
let i = this.currentLocation, A;
|
|
7933
|
-
return e.some((n,
|
|
7934
|
-
const
|
|
7935
|
-
if (t.start <=
|
|
7933
|
+
return e.some((n, s) => {
|
|
7934
|
+
const o = n.locations.progression ?? 0;
|
|
7935
|
+
if (t.start <= o) {
|
|
7936
7936
|
i = n;
|
|
7937
|
-
const a = e.splice(
|
|
7937
|
+
const a = e.splice(s + 1, e.length);
|
|
7938
7938
|
return A = this.findLastPositionInProgressionRange(a, t), !0;
|
|
7939
7939
|
} else return !1;
|
|
7940
7940
|
}), { first: i, last: A };
|
|
@@ -8024,9 +8024,9 @@ class gA extends Ni {
|
|
|
8024
8024
|
e(i);
|
|
8025
8025
|
return;
|
|
8026
8026
|
}
|
|
8027
|
-
const
|
|
8028
|
-
|
|
8029
|
-
this._cframes[0].msg.send("go_progression",
|
|
8027
|
+
const s = t?.locations?.progression;
|
|
8028
|
+
s && s > 0 ? i = await new Promise((a, h) => {
|
|
8029
|
+
this._cframes[0].msg.send("go_progression", s, (c) => a(c));
|
|
8030
8030
|
}) : i = !0, e(i);
|
|
8031
8031
|
}
|
|
8032
8032
|
go(t, e, i) {
|
|
@@ -8034,7 +8034,7 @@ class gA extends Ni {
|
|
|
8034
8034
|
let n = this.pub.readingOrder.findWithHref(A);
|
|
8035
8035
|
if (!n)
|
|
8036
8036
|
return i(this.listeners.handleLocator(t));
|
|
8037
|
-
this.currentLocation = this.positions.find((
|
|
8037
|
+
this.currentLocation = this.positions.find((s) => s.href === n.href), this.apply().then(() => this.loadLocator(t, (s) => i(s))).then(() => {
|
|
8038
8038
|
this.attachListener();
|
|
8039
8039
|
});
|
|
8040
8040
|
}
|
|
@@ -8042,7 +8042,7 @@ class gA extends Ni {
|
|
|
8042
8042
|
return this.go(t.locator, e, i);
|
|
8043
8043
|
}
|
|
8044
8044
|
}
|
|
8045
|
-
class
|
|
8045
|
+
class Ur {
|
|
8046
8046
|
constructor(t) {
|
|
8047
8047
|
this.sourceNode = null, this.listeners = {}, this.isMutedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.isLoadingValue = !1, this.isLoadedValue = !1, this.isEndedValue = !1, this.playback = t.playback, this.audioContext = t.audioContext, this.gainNode = this.audioContext?.createGain(), this.setVolume(this.playback.state.volume), this.mediaElement = document.createElement("audio"), this.mediaElement.crossOrigin = "use-credentials", this.mediaElement.addEventListener(
|
|
8048
8048
|
"canplaythrough",
|
|
@@ -8217,64 +8217,64 @@ class Ir {
|
|
|
8217
8217
|
}
|
|
8218
8218
|
export {
|
|
8219
8219
|
z as BooleanPreference,
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8220
|
+
hA as EnumPreference,
|
|
8221
|
+
dr as EpubDefaults,
|
|
8222
|
+
uA as EpubNavigator,
|
|
8223
8223
|
Ut as EpubPreferences,
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8224
|
+
Bi as EpubPreferencesEditor,
|
|
8225
|
+
wi as EpubSettings,
|
|
8226
|
+
Fr as ExperimentalWebPubNavigator,
|
|
8227
|
+
ir as FXLCoordinator,
|
|
8228
|
+
$n as FXLFrameManager,
|
|
8229
|
+
cr as FXLFramePoolManager,
|
|
8230
|
+
nr as FXLPeripherals,
|
|
8231
|
+
rr as FXLSpreader,
|
|
8232
8232
|
It as FrameComms,
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8233
|
+
qn as FrameManager,
|
|
8234
|
+
_n as FramePoolManager,
|
|
8235
|
+
tr as HorizontalThird,
|
|
8236
8236
|
wt as LineLengths,
|
|
8237
|
-
|
|
8237
|
+
zA as Navigator,
|
|
8238
8238
|
Be as Orientation,
|
|
8239
8239
|
Q as Preference,
|
|
8240
8240
|
qt as Properties,
|
|
8241
|
-
|
|
8241
|
+
Br as RSProperties,
|
|
8242
8242
|
F as RangePreference,
|
|
8243
|
-
|
|
8243
|
+
wr as ReadiumCSS,
|
|
8244
8244
|
we as Spread,
|
|
8245
8245
|
Z as TextAlignment,
|
|
8246
|
-
|
|
8247
|
-
|
|
8246
|
+
gA as UserProperties,
|
|
8247
|
+
er as VerticalThird,
|
|
8248
8248
|
Ni as VisualNavigator,
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8249
|
+
Ur as WebAudioEngine,
|
|
8250
|
+
jA as WebPubBlobBuilder,
|
|
8251
|
+
Vn as WebPubCSS,
|
|
8252
|
+
Hn as WebPubDefaults,
|
|
8253
|
+
Yn as WebPubFrameManager,
|
|
8254
|
+
Nn as WebPubFramePoolManager,
|
|
8255
|
+
kn as WebPubNavigator,
|
|
8256
8256
|
Ft as WebPubPreferences,
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8257
|
+
di as WebPubPreferencesEditor,
|
|
8258
|
+
ci as WebPubSettings,
|
|
8259
|
+
jn as WebRSProperties,
|
|
8260
|
+
aA as WebUserProperties,
|
|
8261
8261
|
I as ensureBoolean,
|
|
8262
8262
|
_t as ensureEnumValue,
|
|
8263
|
-
|
|
8263
|
+
lA as ensureExperiment,
|
|
8264
8264
|
ut as ensureFilter,
|
|
8265
|
-
|
|
8266
|
-
|
|
8265
|
+
vn as ensureLessThanOrEqual,
|
|
8266
|
+
Dn as ensureMoreThanOrEqual,
|
|
8267
8267
|
y as ensureNonNegative,
|
|
8268
8268
|
Y as ensureString,
|
|
8269
8269
|
W as ensureValueInRange,
|
|
8270
|
-
|
|
8270
|
+
Te as experiments,
|
|
8271
8271
|
rt as filterRangeConfig,
|
|
8272
8272
|
Dt as fontSizeRangeConfig,
|
|
8273
8273
|
$ as fontWeightRangeConfig,
|
|
8274
8274
|
Ht as fontWidthRangeConfig,
|
|
8275
8275
|
Gt as letterSpacingRangeConfig,
|
|
8276
8276
|
kt as lineHeightRangeConfig,
|
|
8277
|
-
|
|
8277
|
+
st as lineLengthRangeConfig,
|
|
8278
8278
|
Jt as paragraphIndentRangeConfig,
|
|
8279
8279
|
Wt as paragraphSpacingRangeConfig,
|
|
8280
8280
|
Et as sML,
|