@readium/navigator 2.5.2-beta.4 → 2.5.2-beta.5
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 +207 -202
- package/dist/index.umd.cjs +16 -16
- package/package.json +1 -1
- package/src/epub/fxl/FXLFrameManager.ts +13 -2
- package/types/src/epub/fxl/FXLFrameManager.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const S = class S {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
S.EPUB_A11Y_10_WCAG_20_A = new S("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a"), S.EPUB_A11Y_10_WCAG_20_AA = new S("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa"), S.EPUB_A11Y_10_WCAG_20_AAA = new S("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa"), S.EPUB_A11Y_11_WCAG_20_A = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-a"), S.EPUB_A11Y_11_WCAG_20_AA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aa"), S.EPUB_A11Y_11_WCAG_20_AAA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aaa"), S.EPUB_A11Y_11_WCAG_21_A = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-a"), S.EPUB_A11Y_11_WCAG_21_AA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aa"), S.EPUB_A11Y_11_WCAG_21_AAA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aaa"), S.EPUB_A11Y_11_WCAG_22_A = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-a"), S.EPUB_A11Y_11_WCAG_22_AA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aa"), S.EPUB_A11Y_11_WCAG_22_AAA = new S("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aaa");
|
|
38
|
-
let
|
|
38
|
+
let Qe = S;
|
|
39
39
|
const C = class C {
|
|
40
40
|
constructor(t) {
|
|
41
41
|
this.value = t;
|
|
@@ -55,7 +55,7 @@ const C = class C {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
C.AUDITORY = new C("auditory"), C.CHART_ON_VISUAL = new C("chartOnVisual"), C.CHEM_ON_VISUAL = new C("chemOnVisual"), C.COLOR_DEPENDENT = new C("colorDependent"), C.DIAGRAM_ON_VISUAL = new C("diagramOnVisual"), C.MATH_ON_VISUAL = new C("mathOnVisual"), C.MUSIC_ON_VISUAL = new C("musicOnVisual"), C.TACTILE = new C("tactile"), C.TEXT_ON_VISUAL = new C("textOnVisual"), C.TEXTUAL = new C("textual"), C.VISUAL = new C("visual");
|
|
58
|
-
let
|
|
58
|
+
let ti = C;
|
|
59
59
|
const D = class D {
|
|
60
60
|
constructor(t) {
|
|
61
61
|
if (typeof t == "string") {
|
|
@@ -91,7 +91,7 @@ const D = class D {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
D.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), D.AUDITORY = new D("auditory"), D.TACTILE = new D("tactile"), D.TEXTUAL = new D("textual"), D.VISUAL = new D("visual");
|
|
94
|
-
let
|
|
94
|
+
let ei = D;
|
|
95
95
|
const y = class y {
|
|
96
96
|
constructor(t) {
|
|
97
97
|
this.value = t;
|
|
@@ -131,7 +131,7 @@ const L = class L {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
L.FLASHING = new L("flashing"), L.NO_FLASHING_HAZARD = new L("noFlashingHazard"), L.UNKNOWN_FLASHING_HAZARD = new L("unknownFlashingHazard"), L.MOTION_SIMULATION = new L("motionSimulation"), L.NO_MOTION_SIMULATION_HAZARD = new L("noMotionSimulationHazard"), L.UNKNOWN_MOTION_SIMULATION_HAZARD = new L("unknownMotionSimulationHazard"), L.SOUND = new L("sound"), L.NO_SOUND_HAZARD = new L("noSoundHazard"), L.UNKNOWN_SOUND_HAZARD = new L("unknownSoundHazard"), L.UNKNOWN = new L("unknown"), L.NONE = new L("none");
|
|
134
|
-
let
|
|
134
|
+
let ii = L;
|
|
135
135
|
const k = class k {
|
|
136
136
|
constructor(t) {
|
|
137
137
|
this.value = t;
|
|
@@ -151,10 +151,10 @@ const k = class k {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
k.NONE = new k("none"), k.DOCUMENTED = new k("documented"), k.LEGAL = new k("legal"), k.TEMPORARY = new k("temporary"), k.TECHNICAL = new k("technical"), k.EAA_DISPROPORTIONATE_BURDEN = new k("eaa-disproportionate-burden"), k.EAA_FUNDAMENTAL_ALTERATION = new k("eaa-fundamental-alteration"), k.EAA_MICROENTERPRISE = new k("eaa-microenterprise"), k.EAA_TECHNICAL_IMPOSSIBILITY = new k("eaa-technical-impossibility"), k.EAA_TEMPORARY = new k("eaa-temporary");
|
|
154
|
-
let
|
|
155
|
-
const ni = ["en", "ar", "da", "fr", "it", "pt_PT", "sv"], kn = /* @__PURE__ */ JSON.parse(`{"format":{"audiobook":"Audiobook","audiobookJSON":"Audiobook Manifest","cbz":"Comic Book Archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"LCP Protected Audiobook","lcpdf":"LCP Protected PDF","lcpl":"LCP License Document","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_one":"audiobook","audiobook_other":"audiobooks","book_one":"book","book_other":"books","comic_one":"comic","comic_other":"comics","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"No information is available","publisher-contact":"For more information about the accessibility of this product, please contact the publisher: ","title":"Accessibility summary"},"additional-accessibility-information":{"aria":{"compact":"ARIA roles included","descriptive":"Content is enhanced with ARIA roles to optimize organization and facilitate navigation"},"audio-descriptions":"Audio descriptions","braille":"Braille","color-not-sole-means-of-conveying-information":"Color is not the sole means of conveying information","dyslexia-readability":"Dyslexia readability","full-ruby-annotations":"Full ruby annotations","high-contrast-between-foreground-and-background-audio":"High contrast between foreground and background audio","high-contrast-between-text-and-background":"High contrast between foreground text and background","large-print":"Large print","page-breaks":{"compact":"Page breaks included","descriptive":"Page breaks included from the original print source"},"ruby-annotations":"Some Ruby annotations","sign-language":"Sign language","tactile-graphics":{"compact":"Tactile graphics included","descriptive":"Tactile graphics have been integrated to facilitate access to visual elements for blind people"},"tactile-objects":"Tactile 3D objects","text-to-speech-hinting":"Text-to-speech hinting provided","title":"Additional accessibility information","ultra-high-contrast-between-text-and-background":"Ultra high contrast between text and background","visible-page-numbering":"Visible page numbering","without-background-sounds":"Without background sounds"},"conformance":{"a":{"compact":"This publication meets minimum accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level A standard"},"aa":{"compact":"This publication meets accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AA standard"},"aaa":{"compact":"This publication exceeds accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AAA standard"},"certifier":"The publication was certified by ","certifier-credentials":"The certifier's credential is ","details":{"certification-info":"The publication was certified on ","certifier-report":"For more information refer to the certifier's report","claim":"This publication claims to meet","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Level A","level-aa":"Level AA","level-aaa":"Level AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.2"}},"details-title":"Detailed conformance information","no":"No information is available","title":"Conformance","unknown-standard":"Conformance to accepted standards for accessibility of this publication cannot be determined"},"hazards":{"flashing":{"compact":"Flashing content","descriptive":"The publication contains flashing content that can cause photosensitive seizures"},"flashing-none":{"compact":"No flashing hazards","descriptive":"The publication does not contain flashing content that can cause photosensitive seizures"},"flashing-unknown":{"compact":"Flashing hazards not known","descriptive":"The presence of flashing content that can cause photosensitive seizures could not be determined"},"motion":{"compact":"Motion simulation","descriptive":"The publication contains motion simulations that can cause motion sickness"},"motion-none":{"compact":"No motion simulation hazards","descriptive":"The publication does not contain motion simulations that can cause motion sickness"},"motion-unknown":{"compact":"Motion simulation hazards not known","descriptive":"The presence of motion simulations that can cause motion sickness could not be determined"},"no-metadata":"No information is available","none":{"compact":"No hazards","descriptive":"The publication contains no hazards"},"sound":{"compact":"Sounds","descriptive":"The publication contains sounds that can cause sensitivity issues"},"sound-none":{"compact":"No sound hazards","descriptive":"The publication does not contain sounds that can cause sensitivity issues"},"sound-unknown":{"compact":"Sound hazards not known","descriptive":"The presence of sounds that can cause sensitivity issues could not be determined"},"title":"Hazards","unknown":"The presence of hazards is unknown"},"legal-considerations":{"exempt":{"compact":"Claims an accessibility exemption in some jurisdictions","descriptive":"This publication claims an accessibility exemption in some jurisdictions"},"no-metadata":"No information is available","title":"Legal considerations"},"navigation":{"index":{"compact":"Index","descriptive":"Index with links to referenced entries"},"no-metadata":"No information is available","page-navigation":{"compact":"Go to page","descriptive":"Page list to go to pages from the print source version"},"structural":{"compact":"Headings","descriptive":"Elements such as headings, tables, etc for structured navigation"},"title":"Navigation","toc":{"compact":"Table of contents","descriptive":"Table of contents to all chapters of the text via links"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Chemical formulas in LaTeX","descriptive":"Chemical formulas in accessible format (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Chemical formulas in MathML","descriptive":"Chemical formulas in accessible format (MathML)"},"accessible-math-as-latex":{"compact":"Math as LaTeX","descriptive":"Math formulas in accessible format (LaTeX)"},"accessible-math-described":"Text descriptions of math are provided","closed-captions":{"compact":"Videos have closed captions","descriptive":"Videos included in publications have closed captions"},"extended-descriptions":"Information-rich images are described by extended descriptions","math-as-mathml":{"compact":"Math as MathML","descriptive":"Math formulas in accessible format (MathML)"},"open-captions":{"compact":"Videos have open captions","descriptive":"Videos included in publications have open captions"},"title":"Rich content","transcript":"Transcript(s) provided","unknown":"No information is available"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Has alternative text","descriptive":"Has alternative text descriptions for images"},"no-metadata":"No information about nonvisual reading is available","none":{"compact":"Not readable in read aloud or dynamic braille","descriptive":"The content is not readable as read aloud speech or dynamic braille"},"not-fully":{"compact":"Not fully readable in read aloud or dynamic braille","descriptive":"Not all of the content will be readable as read aloud speech or dynamic braille"},"readable":{"compact":"Readable in read aloud or dynamic braille","descriptive":"All content can be read as read aloud speech or dynamic braille"}},"prerecorded-audio":{"complementary":{"compact":"Prerecorded audio clips","descriptive":"Prerecorded audio clips are embedded in the content"},"no-metadata":"No information about prerecorded audio is available","only":{"compact":"Prerecorded audio only","descriptive":"Audiobook with no text alternative"},"synchronized":{"compact":"Prerecorded audio synchronized with text","descriptive":"All the content is available as prerecorded audio synchronized with text"}},"title":"Ways of reading","visual-adjustments":{"modifiable":{"compact":"Appearance can be modified","descriptive":"Appearance of the text and page layout can be modified according to the capabilities of the reading system (font family and font size, spaces between paragraphs, sentences, words, and letters, as well as color of background and text)"},"unknown":"No information about appearance modifiability is available","unmodifiable":{"compact":"Appearance cannot be modified","descriptive":"Text and page layout cannot be modified as the reading experience is close to a print version, but reading systems can still provide zooming options"}}}}},"altIdentifier_one":"alternate identifier","altIdentifier_other":"alternate identifiers","artist_one":"artist","artist_other":"artists","author_one":"author","author_other":"authors","collection_one":"editorial collection","collection_other":"editorial collections","colorist_one":"colorist","colorist_other":"colorists","contributor_one":"contributor","contributor_other":"contributors","description":"description","duration":"duration","editor_one":"editor","editor_other":"editors","identifier_one":"identifier","identifier_other":"identifiers","illustrator_one":"illustrator","illustrator_other":"illustrators","imprint_one":"imprint","imprint_other":"imprints","inker_one":"inker","inker_other":"inkers","language_one":"language","language_other":"languages","letterer_one":"letterer","letterer_other":"letterers","modified":"modification date","narrator_one":"narrator","narrator_other":"narrators","numberOfPages":"print length","penciler_one":"penciler","penciler_other":"pencilers","published":"publication date","publisher_one":"publisher","publisher_other":"publishers","series_one":"series","series_other":"series","subject_one":"subject","subject_other":"subjects","subtitle":"subtitle","title":"title","translator_one":"translator","translator_other":"translators"}}`), On = {
|
|
154
|
+
let ni = k;
|
|
155
|
+
const si = ["en", "ar", "da", "fr", "it", "pt_PT", "sv"], kn = /* @__PURE__ */ JSON.parse(`{"format":{"audiobook":"Audiobook","audiobookJSON":"Audiobook Manifest","cbz":"Comic Book Archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"LCP Protected Audiobook","lcpdf":"LCP Protected PDF","lcpl":"LCP License Document","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_one":"audiobook","audiobook_other":"audiobooks","book_one":"book","book_other":"books","comic_one":"comic","comic_other":"comics","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"No information is available","publisher-contact":"For more information about the accessibility of this product, please contact the publisher: ","title":"Accessibility summary"},"additional-accessibility-information":{"aria":{"compact":"ARIA roles included","descriptive":"Content is enhanced with ARIA roles to optimize organization and facilitate navigation"},"audio-descriptions":"Audio descriptions","braille":"Braille","color-not-sole-means-of-conveying-information":"Color is not the sole means of conveying information","dyslexia-readability":"Dyslexia readability","full-ruby-annotations":"Full ruby annotations","high-contrast-between-foreground-and-background-audio":"High contrast between foreground and background audio","high-contrast-between-text-and-background":"High contrast between foreground text and background","large-print":"Large print","page-breaks":{"compact":"Page breaks included","descriptive":"Page breaks included from the original print source"},"ruby-annotations":"Some Ruby annotations","sign-language":"Sign language","tactile-graphics":{"compact":"Tactile graphics included","descriptive":"Tactile graphics have been integrated to facilitate access to visual elements for blind people"},"tactile-objects":"Tactile 3D objects","text-to-speech-hinting":"Text-to-speech hinting provided","title":"Additional accessibility information","ultra-high-contrast-between-text-and-background":"Ultra high contrast between text and background","visible-page-numbering":"Visible page numbering","without-background-sounds":"Without background sounds"},"conformance":{"a":{"compact":"This publication meets minimum accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level A standard"},"aa":{"compact":"This publication meets accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AA standard"},"aaa":{"compact":"This publication exceeds accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AAA standard"},"certifier":"The publication was certified by ","certifier-credentials":"The certifier's credential is ","details":{"certification-info":"The publication was certified on ","certifier-report":"For more information refer to the certifier's report","claim":"This publication claims to meet","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Level A","level-aa":"Level AA","level-aaa":"Level AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.2"}},"details-title":"Detailed conformance information","no":"No information is available","title":"Conformance","unknown-standard":"Conformance to accepted standards for accessibility of this publication cannot be determined"},"hazards":{"flashing":{"compact":"Flashing content","descriptive":"The publication contains flashing content that can cause photosensitive seizures"},"flashing-none":{"compact":"No flashing hazards","descriptive":"The publication does not contain flashing content that can cause photosensitive seizures"},"flashing-unknown":{"compact":"Flashing hazards not known","descriptive":"The presence of flashing content that can cause photosensitive seizures could not be determined"},"motion":{"compact":"Motion simulation","descriptive":"The publication contains motion simulations that can cause motion sickness"},"motion-none":{"compact":"No motion simulation hazards","descriptive":"The publication does not contain motion simulations that can cause motion sickness"},"motion-unknown":{"compact":"Motion simulation hazards not known","descriptive":"The presence of motion simulations that can cause motion sickness could not be determined"},"no-metadata":"No information is available","none":{"compact":"No hazards","descriptive":"The publication contains no hazards"},"sound":{"compact":"Sounds","descriptive":"The publication contains sounds that can cause sensitivity issues"},"sound-none":{"compact":"No sound hazards","descriptive":"The publication does not contain sounds that can cause sensitivity issues"},"sound-unknown":{"compact":"Sound hazards not known","descriptive":"The presence of sounds that can cause sensitivity issues could not be determined"},"title":"Hazards","unknown":"The presence of hazards is unknown"},"legal-considerations":{"exempt":{"compact":"Claims an accessibility exemption in some jurisdictions","descriptive":"This publication claims an accessibility exemption in some jurisdictions"},"no-metadata":"No information is available","title":"Legal considerations"},"navigation":{"index":{"compact":"Index","descriptive":"Index with links to referenced entries"},"no-metadata":"No information is available","page-navigation":{"compact":"Go to page","descriptive":"Page list to go to pages from the print source version"},"structural":{"compact":"Headings","descriptive":"Elements such as headings, tables, etc for structured navigation"},"title":"Navigation","toc":{"compact":"Table of contents","descriptive":"Table of contents to all chapters of the text via links"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Chemical formulas in LaTeX","descriptive":"Chemical formulas in accessible format (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Chemical formulas in MathML","descriptive":"Chemical formulas in accessible format (MathML)"},"accessible-math-as-latex":{"compact":"Math as LaTeX","descriptive":"Math formulas in accessible format (LaTeX)"},"accessible-math-described":"Text descriptions of math are provided","closed-captions":{"compact":"Videos have closed captions","descriptive":"Videos included in publications have closed captions"},"extended-descriptions":"Information-rich images are described by extended descriptions","math-as-mathml":{"compact":"Math as MathML","descriptive":"Math formulas in accessible format (MathML)"},"open-captions":{"compact":"Videos have open captions","descriptive":"Videos included in publications have open captions"},"title":"Rich content","transcript":"Transcript(s) provided","unknown":"No information is available"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Has alternative text","descriptive":"Has alternative text descriptions for images"},"no-metadata":"No information about nonvisual reading is available","none":{"compact":"Not readable in read aloud or dynamic braille","descriptive":"The content is not readable as read aloud speech or dynamic braille"},"not-fully":{"compact":"Not fully readable in read aloud or dynamic braille","descriptive":"Not all of the content will be readable as read aloud speech or dynamic braille"},"readable":{"compact":"Readable in read aloud or dynamic braille","descriptive":"All content can be read as read aloud speech or dynamic braille"}},"prerecorded-audio":{"complementary":{"compact":"Prerecorded audio clips","descriptive":"Prerecorded audio clips are embedded in the content"},"no-metadata":"No information about prerecorded audio is available","only":{"compact":"Prerecorded audio only","descriptive":"Audiobook with no text alternative"},"synchronized":{"compact":"Prerecorded audio synchronized with text","descriptive":"All the content is available as prerecorded audio synchronized with text"}},"title":"Ways of reading","visual-adjustments":{"modifiable":{"compact":"Appearance can be modified","descriptive":"Appearance of the text and page layout can be modified according to the capabilities of the reading system (font family and font size, spaces between paragraphs, sentences, words, and letters, as well as color of background and text)"},"unknown":"No information about appearance modifiability is available","unmodifiable":{"compact":"Appearance cannot be modified","descriptive":"Text and page layout cannot be modified as the reading experience is close to a print version, but reading systems can still provide zooming options"}}}}},"altIdentifier_one":"alternate identifier","altIdentifier_other":"alternate identifiers","artist_one":"artist","artist_other":"artists","author_one":"author","author_other":"authors","collection_one":"editorial collection","collection_other":"editorial collections","colorist_one":"colorist","colorist_other":"colorists","contributor_one":"contributor","contributor_other":"contributors","description":"description","duration":"duration","editor_one":"editor","editor_other":"editors","identifier_one":"identifier","identifier_other":"identifiers","illustrator_one":"illustrator","illustrator_other":"illustrators","imprint_one":"imprint","imprint_other":"imprints","inker_one":"inker","inker_other":"inkers","language_one":"language","language_other":"languages","letterer_one":"letterer","letterer_other":"letterers","modified":"modification date","narrator_one":"narrator","narrator_other":"narrators","numberOfPages":"print length","penciler_one":"penciler","penciler_other":"pencilers","published":"publication date","publisher_one":"publisher","publisher_other":"publishers","series_one":"series","series_other":"series","subject_one":"subject","subject_other":"subjects","subtitle":"subtitle","title":"title","translator_one":"translator","translator_other":"translators"}}`), On = {
|
|
156
156
|
publication: kn
|
|
157
|
-
},
|
|
157
|
+
}, ri = {
|
|
158
158
|
fr: () => import("./fr-C5HEel98.js"),
|
|
159
159
|
ar: () => import("./ar-DyHX_uy2.js"),
|
|
160
160
|
da: () => import("./da-Dct0PS3E.js"),
|
|
@@ -165,10 +165,10 @@ const ni = ["en", "ar", "da", "fr", "it", "pt_PT", "sv"], kn = /* @__PURE__ */ J
|
|
|
165
165
|
sv: () => import("./sv-BfzAFsVN.js")
|
|
166
166
|
// 'tr': () => import('@edrlab/thorium-locales/publication-metadata/tr.json'),
|
|
167
167
|
// 'uk': () => import('@edrlab/thorium-locales/publication-metadata/uk.json')
|
|
168
|
-
},
|
|
168
|
+
}, oi = On?.publication?.metadata?.accessibility?.["display-guide"] || {};
|
|
169
169
|
class gt {
|
|
170
170
|
constructor() {
|
|
171
|
-
this.currentLocaleCode = "en", this.locale =
|
|
171
|
+
this.currentLocaleCode = "en", this.locale = oi, this.loadedLocales = {}, this.loadedLocales.en = oi;
|
|
172
172
|
}
|
|
173
173
|
static getInstance() {
|
|
174
174
|
return gt.instance || (gt.instance = new gt()), gt.instance;
|
|
@@ -179,14 +179,14 @@ class gt {
|
|
|
179
179
|
* @returns Promise indicating if the locale was loaded successfully
|
|
180
180
|
*/
|
|
181
181
|
async loadLocale(t) {
|
|
182
|
-
if (!
|
|
182
|
+
if (!si.includes(t))
|
|
183
183
|
return console.warn(`Locale '${t}' is not enabled`), !1;
|
|
184
184
|
if (t in this.loadedLocales)
|
|
185
185
|
return !0;
|
|
186
186
|
try {
|
|
187
|
-
if (!(t in
|
|
187
|
+
if (!(t in ri))
|
|
188
188
|
return console.warn(`Locale file not found for: ${t}`), !1;
|
|
189
|
-
const n = (await
|
|
189
|
+
const n = (await ri[t]()).default?.publication?.metadata?.accessibility?.["display-guide"];
|
|
190
190
|
return n ? (this.loadedLocales[t] = n, !0) : (console.warn(`No accessibility strings found in locale ${t}`), !1);
|
|
191
191
|
} catch (e) {
|
|
192
192
|
return console.warn(`Failed to load locale ${t}:`, e), !1;
|
|
@@ -220,7 +220,7 @@ class gt {
|
|
|
220
220
|
* Gets a list of available locale codes
|
|
221
221
|
*/
|
|
222
222
|
getAvailableLocales() {
|
|
223
|
-
return
|
|
223
|
+
return si;
|
|
224
224
|
}
|
|
225
225
|
getNestedValue(t, e) {
|
|
226
226
|
const i = e.split(".");
|
|
@@ -311,10 +311,10 @@ Object.defineProperty(G.prototype, "encryption", {
|
|
|
311
311
|
function Rn(r) {
|
|
312
312
|
return r && Array.isArray(r) ? r : void 0;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Yi(r) {
|
|
315
315
|
return r && typeof r == "string" ? [r] : Rn(r);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function ai(r) {
|
|
318
318
|
return typeof r == "string" ? new Date(r) : void 0;
|
|
319
319
|
}
|
|
320
320
|
function Ut(r) {
|
|
@@ -786,7 +786,7 @@ class m {
|
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
class
|
|
789
|
+
class li {
|
|
790
790
|
constructor(t) {
|
|
791
791
|
this.uri = t, this.parameters = this.getParameters(t);
|
|
792
792
|
}
|
|
@@ -836,7 +836,7 @@ class _ {
|
|
|
836
836
|
return Object.entries(t).forEach(([a, l]) => {
|
|
837
837
|
o.has(a) || s.set(a, l);
|
|
838
838
|
}), new _({
|
|
839
|
-
fragments:
|
|
839
|
+
fragments: Yi(t.fragments || t.fragment),
|
|
840
840
|
progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
|
|
841
841
|
totalProgression: i !== void 0 && i >= 0 && i <= 1 ? i : void 0,
|
|
842
842
|
position: n !== void 0 && n > 0 ? n : void 0,
|
|
@@ -941,7 +941,7 @@ class $ {
|
|
|
941
941
|
size: V(t.size),
|
|
942
942
|
duration: V(t.duration),
|
|
943
943
|
bitrate: V(t.bitrate),
|
|
944
|
-
languages:
|
|
944
|
+
languages: Yi(t.language),
|
|
945
945
|
alternates: Ht.deserialize(t.alternate),
|
|
946
946
|
children: Ht.deserialize(t.children)
|
|
947
947
|
});
|
|
@@ -968,14 +968,14 @@ class $ {
|
|
|
968
968
|
}
|
|
969
969
|
/** List of URI template parameter keys, if the `Link` is templated. */
|
|
970
970
|
get templateParameters() {
|
|
971
|
-
return this.templated ? new
|
|
971
|
+
return this.templated ? new li(this.href).parameters : /* @__PURE__ */ new Set();
|
|
972
972
|
}
|
|
973
973
|
/** Expands the `Link`'s HREF by replacing URI template variables by the given parameters.
|
|
974
974
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
975
975
|
*/
|
|
976
976
|
expandTemplate(t) {
|
|
977
977
|
return new $({
|
|
978
|
-
href: new
|
|
978
|
+
href: new li(this.href).expand(t),
|
|
979
979
|
templated: !1
|
|
980
980
|
});
|
|
981
981
|
}
|
|
@@ -1095,7 +1095,7 @@ class Ht {
|
|
|
1095
1095
|
return this.items.filter((t) => t.type);
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
var
|
|
1098
|
+
var qi = /* @__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))(qi || {}), N = /* @__PURE__ */ ((r) => (r.ltr = "ltr", r.rtl = "rtl", r))(N || {});
|
|
1099
1099
|
G.prototype.getContains = function() {
|
|
1100
1100
|
return new Set(this.otherProperties.contains || []);
|
|
1101
1101
|
};
|
|
@@ -1308,8 +1308,8 @@ class Ue {
|
|
|
1308
1308
|
if (t && t.state)
|
|
1309
1309
|
return new Ue({
|
|
1310
1310
|
state: t.state,
|
|
1311
|
-
since:
|
|
1312
|
-
until:
|
|
1311
|
+
since: ai(t.since),
|
|
1312
|
+
until: ai(t.until)
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
1315
|
/**
|
|
@@ -1344,7 +1344,7 @@ G.prototype.getAuthenticate = function() {
|
|
|
1344
1344
|
return $.deserialize(this.otherProperties.authenticate);
|
|
1345
1345
|
};
|
|
1346
1346
|
const Tn = "CssSelectorGenerator";
|
|
1347
|
-
function
|
|
1347
|
+
function hi(r = "unknown problem", ...t) {
|
|
1348
1348
|
console.warn(`${Tn}: ${r}`, ...t);
|
|
1349
1349
|
}
|
|
1350
1350
|
function Mn(r) {
|
|
@@ -1360,13 +1360,13 @@ function zn(r) {
|
|
|
1360
1360
|
if (typeof e == "function")
|
|
1361
1361
|
return (i) => {
|
|
1362
1362
|
const n = e(i);
|
|
1363
|
-
return typeof n != "boolean" ? (
|
|
1363
|
+
return typeof n != "boolean" ? (hi("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : n;
|
|
1364
1364
|
};
|
|
1365
1365
|
if (typeof e == "string") {
|
|
1366
1366
|
const i = new RegExp("^" + Nn(e) + "$");
|
|
1367
1367
|
return (n) => i.test(n);
|
|
1368
1368
|
}
|
|
1369
|
-
return
|
|
1369
|
+
return hi("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
1370
1370
|
});
|
|
1371
1371
|
return (e) => t.some((i) => i(e));
|
|
1372
1372
|
}
|
|
@@ -1376,7 +1376,7 @@ zn([
|
|
|
1376
1376
|
// Angular attributes
|
|
1377
1377
|
"ng-*"
|
|
1378
1378
|
]);
|
|
1379
|
-
const In = Math.pow(2, 32),
|
|
1379
|
+
const In = Math.pow(2, 32), ci = () => Math.round(Math.random() * In).toString(36), we = () => `${Math.round(performance.now())}-${ci()}-${ci()}`, ft = 1;
|
|
1380
1380
|
class Dn {
|
|
1381
1381
|
constructor(t) {
|
|
1382
1382
|
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);
|
|
@@ -1469,15 +1469,15 @@ class Dn {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
class Et {
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function di(r) {
|
|
1473
1473
|
return r.split("").reverse().join("");
|
|
1474
1474
|
}
|
|
1475
1475
|
function Fn(r, t, e) {
|
|
1476
|
-
const i =
|
|
1476
|
+
const i = di(t);
|
|
1477
1477
|
return e.map((n) => {
|
|
1478
|
-
const s = Math.max(0, n.end - t.length - n.errors), o =
|
|
1478
|
+
const s = Math.max(0, n.end - t.length - n.errors), o = di(r.slice(s, n.end));
|
|
1479
1479
|
return {
|
|
1480
|
-
start:
|
|
1480
|
+
start: Ki(o, i, n.errors).reduce((l, h) => n.end - h.end < l ? n.end - h.end : l, n.end),
|
|
1481
1481
|
end: n.end,
|
|
1482
1482
|
errors: n.errors
|
|
1483
1483
|
};
|
|
@@ -1486,14 +1486,14 @@ function Fn(r, t, e) {
|
|
|
1486
1486
|
function de(r) {
|
|
1487
1487
|
return (r | -r) >> 31 & 1;
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function ui(r, t, e, i) {
|
|
1490
1490
|
let n = r.P[e], s = r.M[e];
|
|
1491
1491
|
const o = i >>> 31, a = t[e] | o, l = a | s, h = (a & n) + n ^ n | a;
|
|
1492
1492
|
let c = s | ~(h | n), u = n & h;
|
|
1493
1493
|
const p = de(c & r.lastRowMask[e]) - de(u & r.lastRowMask[e]);
|
|
1494
1494
|
return c <<= 1, u <<= 1, u |= o, c |= de(i) - o, n = u | ~(l | c), s = c & l, r.P[e] = n, r.M[e] = s, p;
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1496
|
+
function Ki(r, t, e) {
|
|
1497
1497
|
if (t.length === 0)
|
|
1498
1498
|
return [];
|
|
1499
1499
|
e = Math.min(e, t.length);
|
|
@@ -1535,7 +1535,7 @@ function qi(r, t, e) {
|
|
|
1535
1535
|
g < h.length ? d = h[g] : (d = l.get(g), typeof d > "u" && (d = a));
|
|
1536
1536
|
let f = 0;
|
|
1537
1537
|
for (let w = 0; w <= c; w += 1)
|
|
1538
|
-
f =
|
|
1538
|
+
f = ui(o, d, w, f), u[w] += f;
|
|
1539
1539
|
if (u[c] - f <= e && c < s && (d[c + 1] & 1 || f < 0)) {
|
|
1540
1540
|
c += 1, o.P[c] = -1, o.M[c] = 0;
|
|
1541
1541
|
let w;
|
|
@@ -1544,7 +1544,7 @@ function qi(r, t, e) {
|
|
|
1544
1544
|
w = P === 0 ? n : P;
|
|
1545
1545
|
} else
|
|
1546
1546
|
w = n;
|
|
1547
|
-
u[c] = u[c - 1] + w - f +
|
|
1547
|
+
u[c] = u[c - 1] + w - f + ui(o, d, c, f);
|
|
1548
1548
|
} else
|
|
1549
1549
|
for (; c > 0 && u[c] >= e + n; )
|
|
1550
1550
|
c -= 1;
|
|
@@ -1557,10 +1557,10 @@ function qi(r, t, e) {
|
|
|
1557
1557
|
return i;
|
|
1558
1558
|
}
|
|
1559
1559
|
function Wn(r, t, e) {
|
|
1560
|
-
const i =
|
|
1560
|
+
const i = Ki(r, t, e);
|
|
1561
1561
|
return Fn(r, t, i);
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Ji(r, t, e) {
|
|
1564
1564
|
let i = 0;
|
|
1565
1565
|
const n = [];
|
|
1566
1566
|
for (; i !== -1; )
|
|
@@ -1571,23 +1571,23 @@ function Ki(r, t, e) {
|
|
|
1571
1571
|
}), i += 1);
|
|
1572
1572
|
return n.length > 0 ? n : Wn(r, t, e);
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1575
|
-
return t.length === 0 || r.length === 0 ? 0 : 1 -
|
|
1574
|
+
function pi(r, t) {
|
|
1575
|
+
return t.length === 0 || r.length === 0 ? 0 : 1 - Ji(r, t, t.length)[0].errors / t.length;
|
|
1576
1576
|
}
|
|
1577
1577
|
function Un(r, t, e = {}) {
|
|
1578
1578
|
if (t.length === 0)
|
|
1579
1579
|
return null;
|
|
1580
|
-
const i = Math.min(256, t.length / 2), n =
|
|
1580
|
+
const i = Math.min(256, t.length / 2), n = Ji(r, t, i);
|
|
1581
1581
|
if (n.length === 0)
|
|
1582
1582
|
return null;
|
|
1583
1583
|
const s = (a) => {
|
|
1584
|
-
const p = 1 - a.errors / t.length, g = e.prefix ?
|
|
1584
|
+
const p = 1 - a.errors / t.length, g = e.prefix ? pi(
|
|
1585
1585
|
r.slice(
|
|
1586
1586
|
Math.max(0, a.start - e.prefix.length),
|
|
1587
1587
|
a.start
|
|
1588
1588
|
),
|
|
1589
1589
|
e.prefix
|
|
1590
|
-
) : 1, d = e.suffix ?
|
|
1590
|
+
) : 1, d = e.suffix ? pi(
|
|
1591
1591
|
r.slice(a.end, a.end + e.suffix.length),
|
|
1592
1592
|
e.suffix
|
|
1593
1593
|
) : 1;
|
|
@@ -1610,7 +1610,7 @@ function ve(r, t, e) {
|
|
|
1610
1610
|
const o = n.length - s.length;
|
|
1611
1611
|
return e === 2 ? t - o : t + o;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function fi(r, t) {
|
|
1614
1614
|
const e = r.commonAncestorContainer.ownerDocument.createNodeIterator(
|
|
1615
1615
|
r.commonAncestorContainer,
|
|
1616
1616
|
NodeFilter.SHOW_TEXT
|
|
@@ -1658,7 +1658,7 @@ function Bn(r) {
|
|
|
1658
1658
|
if (n.start >= 0 && (t.setStart(r.startContainer, n.start), e = !0), n.end > 0 && (t.setEnd(r.endContainer, n.end), i = !0), e && i)
|
|
1659
1659
|
return t;
|
|
1660
1660
|
if (!e) {
|
|
1661
|
-
const { node: s, offset: o } =
|
|
1661
|
+
const { node: s, offset: o } = fi(
|
|
1662
1662
|
t,
|
|
1663
1663
|
1
|
|
1664
1664
|
/* Forwards */
|
|
@@ -1666,7 +1666,7 @@ function Bn(r) {
|
|
|
1666
1666
|
s && o >= 0 && t.setStart(s, o);
|
|
1667
1667
|
}
|
|
1668
1668
|
if (!i) {
|
|
1669
|
-
const { node: s, offset: o } =
|
|
1669
|
+
const { node: s, offset: o } = fi(
|
|
1670
1670
|
t,
|
|
1671
1671
|
2
|
|
1672
1672
|
/* Backwards */
|
|
@@ -1675,7 +1675,7 @@ function Bn(r) {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
return t;
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function Zi(r) {
|
|
1679
1679
|
switch (r.nodeType) {
|
|
1680
1680
|
case Node.ELEMENT_NODE:
|
|
1681
1681
|
case Node.TEXT_NODE:
|
|
@@ -1684,13 +1684,13 @@ function Ji(r) {
|
|
|
1684
1684
|
return 0;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function mi(r) {
|
|
1688
1688
|
let t = r.previousSibling, e = 0;
|
|
1689
1689
|
for (; t; )
|
|
1690
|
-
e +=
|
|
1690
|
+
e += Zi(t), t = t.previousSibling;
|
|
1691
1691
|
return e;
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function Qi(r, ...t) {
|
|
1694
1694
|
let e = t.shift();
|
|
1695
1695
|
const i = r.ownerDocument.createNodeIterator(
|
|
1696
1696
|
r,
|
|
@@ -1722,7 +1722,7 @@ class K {
|
|
|
1722
1722
|
throw new Error("Parent is not an ancestor of current element");
|
|
1723
1723
|
let e = this.element, i = this.offset;
|
|
1724
1724
|
for (; e !== t; )
|
|
1725
|
-
i +=
|
|
1725
|
+
i += mi(e), e = e.parentElement;
|
|
1726
1726
|
return new K(e, i);
|
|
1727
1727
|
}
|
|
1728
1728
|
/**
|
|
@@ -1744,7 +1744,7 @@ class K {
|
|
|
1744
1744
|
*/
|
|
1745
1745
|
resolve(t = {}) {
|
|
1746
1746
|
try {
|
|
1747
|
-
return
|
|
1747
|
+
return Qi(this.element, this.offset)[0];
|
|
1748
1748
|
} catch (e) {
|
|
1749
1749
|
if (this.offset === 0 && t.direction !== void 0) {
|
|
1750
1750
|
const i = document.createTreeWalker(
|
|
@@ -1787,7 +1787,7 @@ class K {
|
|
|
1787
1787
|
throw new Error("Text node offset is out of range");
|
|
1788
1788
|
if (!t.parentElement)
|
|
1789
1789
|
throw new Error("Text node has no parent");
|
|
1790
|
-
const i =
|
|
1790
|
+
const i = mi(t) + e;
|
|
1791
1791
|
return new K(t.parentElement, i);
|
|
1792
1792
|
}
|
|
1793
1793
|
case Node.ELEMENT_NODE: {
|
|
@@ -1795,7 +1795,7 @@ class K {
|
|
|
1795
1795
|
throw new Error("Child node offset is out of range");
|
|
1796
1796
|
let i = 0;
|
|
1797
1797
|
for (let n = 0; n < e; n++)
|
|
1798
|
-
i +=
|
|
1798
|
+
i += Zi(t.childNodes[n]);
|
|
1799
1799
|
return new K(t, i);
|
|
1800
1800
|
}
|
|
1801
1801
|
default:
|
|
@@ -1829,7 +1829,7 @@ class et {
|
|
|
1829
1829
|
*/
|
|
1830
1830
|
toRange() {
|
|
1831
1831
|
let t, e;
|
|
1832
|
-
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [t, e] =
|
|
1832
|
+
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [t, e] = Qi(
|
|
1833
1833
|
this.start.element,
|
|
1834
1834
|
this.start.offset,
|
|
1835
1835
|
this.end.offset
|
|
@@ -1991,10 +1991,10 @@ function Vn(r, t) {
|
|
|
1991
1991
|
top: h.top,
|
|
1992
1992
|
width: h.width
|
|
1993
1993
|
});
|
|
1994
|
-
const s =
|
|
1994
|
+
const s = tn(
|
|
1995
1995
|
n,
|
|
1996
1996
|
i
|
|
1997
|
-
), o = $n(s, i), a =
|
|
1997
|
+
), o = $n(s, i), a = en(o), l = 4;
|
|
1998
1998
|
for (let h = a.length - 1; h >= 0; h--) {
|
|
1999
1999
|
const c = a[h];
|
|
2000
2000
|
if (!(c.width * c.height > l))
|
|
@@ -2005,16 +2005,16 @@ function Vn(r, t) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
return a;
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2008
|
+
function tn(r, t, e) {
|
|
2009
2009
|
for (let i = 0; i < r.length; i++)
|
|
2010
2010
|
for (let n = i + 1; n < r.length; n++) {
|
|
2011
2011
|
const s = r[i], o = r[n];
|
|
2012
2012
|
if (s === o)
|
|
2013
2013
|
continue;
|
|
2014
2014
|
const a = j(s.top, o.top, t) && j(s.bottom, o.bottom, t), l = j(s.left, o.left, t) && j(s.right, o.right, t);
|
|
2015
|
-
if (a && !l &&
|
|
2015
|
+
if (a && !l && nn(s, o, t)) {
|
|
2016
2016
|
const u = r.filter((g) => g !== s && g !== o), p = jn(s, o);
|
|
2017
|
-
return u.push(p),
|
|
2017
|
+
return u.push(p), tn(
|
|
2018
2018
|
u,
|
|
2019
2019
|
t
|
|
2020
2020
|
);
|
|
@@ -2054,26 +2054,26 @@ function Xn(r, t, e) {
|
|
|
2054
2054
|
function Dt(r, t, e, i) {
|
|
2055
2055
|
return (r.left < t || j(r.left, t, i)) && (r.right > t || j(r.right, t, i)) && (r.top < e || j(r.top, e, i)) && (r.bottom > e || j(r.bottom, e, i));
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function en(r) {
|
|
2058
2058
|
for (let t = 0; t < r.length; t++)
|
|
2059
2059
|
for (let e = t + 1; e < r.length; e++) {
|
|
2060
2060
|
const i = r[t], n = r[e];
|
|
2061
|
-
if (i !== n &&
|
|
2061
|
+
if (i !== n && nn(i, n, -1)) {
|
|
2062
2062
|
let s = [], o;
|
|
2063
|
-
const a =
|
|
2063
|
+
const a = gi(i, n);
|
|
2064
2064
|
if (a.length === 1)
|
|
2065
2065
|
s = a, o = i;
|
|
2066
2066
|
else {
|
|
2067
|
-
const h =
|
|
2067
|
+
const h = gi(n, i);
|
|
2068
2068
|
a.length < h.length ? (s = a, o = i) : (s = h, o = n);
|
|
2069
2069
|
}
|
|
2070
2070
|
const l = r.filter((h) => h !== o);
|
|
2071
|
-
return Array.prototype.push.apply(l, s),
|
|
2071
|
+
return Array.prototype.push.apply(l, s), en(l);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
return r;
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function gi(r, t) {
|
|
2077
2077
|
const e = Gn(t, r);
|
|
2078
2078
|
if (e.height === 0 || e.width === 0)
|
|
2079
2079
|
return [r];
|
|
@@ -2135,7 +2135,7 @@ function Gn(r, t) {
|
|
|
2135
2135
|
width: Math.max(0, i - e)
|
|
2136
2136
|
};
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function nn(r, t, e) {
|
|
2139
2139
|
return (r.left < t.right || e >= 0 && j(r.left, t.right, e)) && (t.left < r.right || e >= 0 && j(t.left, r.right, e)) && (r.top < t.bottom || e >= 0 && j(r.top, t.bottom, e)) && (t.top < r.bottom || e >= 0 && j(t.top, r.bottom, e));
|
|
2140
2140
|
}
|
|
2141
2141
|
function j(r, t, e) {
|
|
@@ -2147,7 +2147,7 @@ function Be(r) {
|
|
|
2147
2147
|
Object.hasOwn(e, i) && !Number.isNaN(Number.parseInt(i)) && (t[e[i]] = e.getPropertyValue(e[i]));
|
|
2148
2148
|
return t;
|
|
2149
2149
|
}
|
|
2150
|
-
function
|
|
2150
|
+
function sn(r, t) {
|
|
2151
2151
|
const e = Be(r);
|
|
2152
2152
|
Object.keys(e).forEach((i) => {
|
|
2153
2153
|
t.hasOwnProperty(i) || re(r, i);
|
|
@@ -2229,16 +2229,16 @@ const mt = { r: 255, g: 255, b: 255, a: 1 }, ct = /* @__PURE__ */ new Map(), Yn
|
|
|
2229
2229
|
}, fe = (r) => {
|
|
2230
2230
|
const t = r / 255;
|
|
2231
2231
|
return t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
2232
|
-
},
|
|
2232
|
+
}, yi = (r) => {
|
|
2233
2233
|
const t = fe(r.r), e = fe(r.g), i = fe(r.b);
|
|
2234
2234
|
return 0.2126 * t + 0.7152 * e + 0.0722 * i;
|
|
2235
|
-
},
|
|
2236
|
-
const e = typeof r == "string" ? Se(r) : r, i = typeof t == "string" ? Se(t) : t, n =
|
|
2235
|
+
}, bi = (r, t) => {
|
|
2236
|
+
const e = typeof r == "string" ? Se(r) : r, i = typeof t == "string" ? Se(t) : t, n = yi(e), s = yi(i), o = Math.max(n, s), a = Math.min(n, s);
|
|
2237
2237
|
return (o + 0.05) / (a + 0.05);
|
|
2238
2238
|
}, Pe = (r, t = null) => {
|
|
2239
|
-
const e = Se(r, t), i =
|
|
2239
|
+
const e = Se(r, t), i = bi(e, { r: 255, g: 255, b: 255, a: 1 }), n = bi(e, { r: 0, g: 0, b: 0, a: 1 });
|
|
2240
2240
|
return i > n;
|
|
2241
|
-
}, Kn = (r, t = null) => Pe(r, t) ? "white" : "black",
|
|
2241
|
+
}, Kn = (r, t = null) => Pe(r, t) ? "white" : "black", wi = "#FFFF00", Jn = () => "Highlight" in window, vi = ["IMG", "IMAGE", "AUDIO", "VIDEO", "SVG"];
|
|
2242
2242
|
class Zn {
|
|
2243
2243
|
/**
|
|
2244
2244
|
* Creates a DecorationGroup object
|
|
@@ -2265,7 +2265,7 @@ class Zn {
|
|
|
2265
2265
|
return;
|
|
2266
2266
|
}
|
|
2267
2267
|
const n = i.commonAncestorContainer;
|
|
2268
|
-
n.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (
|
|
2268
|
+
n.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (vi.includes(n.nodeName.toUpperCase()) && this.notTextFlag?.set(e, !0), i.cloneContents().querySelector(vi.join(", ").toLowerCase()) && this.notTextFlag?.set(e, !0), (n.textContent?.trim() || "").length === 0 && this.notTextFlag?.set(e, !0));
|
|
2269
2269
|
const s = {
|
|
2270
2270
|
decoration: t,
|
|
2271
2271
|
id: e,
|
|
@@ -2306,7 +2306,7 @@ class Zn {
|
|
|
2306
2306
|
experimentalLayout(t) {
|
|
2307
2307
|
const [e, i] = this.requireContainer(!0);
|
|
2308
2308
|
i.add(t.range);
|
|
2309
|
-
const n = ue(this.wnd, "--USER__backgroundColor") || this.wnd.getComputedStyle(this.wnd.document.documentElement).getPropertyValue("background-color"), s = t.decoration?.style?.tint ??
|
|
2309
|
+
const n = ue(this.wnd, "--USER__backgroundColor") || this.wnd.getComputedStyle(this.wnd.document.documentElement).getPropertyValue("background-color"), s = t.decoration?.style?.tint ?? wi;
|
|
2310
2310
|
e.innerHTML = `
|
|
2311
2311
|
::highlight(${this.id}) {
|
|
2312
2312
|
color: ${Kn(s, n)};
|
|
@@ -2347,7 +2347,7 @@ class Zn {
|
|
|
2347
2347
|
data-readium="true"
|
|
2348
2348
|
class="readium-highlight"
|
|
2349
2349
|
style="${[
|
|
2350
|
-
`background-color: ${t.decoration?.style?.tint ??
|
|
2350
|
+
`background-color: ${t.decoration?.style?.tint ?? wi} !important`,
|
|
2351
2351
|
//"opacity: 0.3 !important",
|
|
2352
2352
|
`mix-blend-mode: ${p ? "exclusion" : "multiply"} !important`,
|
|
2353
2353
|
"opacity: 1 !important",
|
|
@@ -2473,7 +2473,7 @@ const Ot = class Ot extends Et {
|
|
|
2473
2473
|
};
|
|
2474
2474
|
Ot.moduleName = "decorator";
|
|
2475
2475
|
let Ee = Ot;
|
|
2476
|
-
const
|
|
2476
|
+
const Si = "readium-snapper-style", Rt = class Rt extends Et {
|
|
2477
2477
|
constructor() {
|
|
2478
2478
|
super(...arguments), this.protected = !1;
|
|
2479
2479
|
}
|
|
@@ -2486,14 +2486,14 @@ const vi = "readium-snapper-style", Rt = class Rt extends Et {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
mount(t, e) {
|
|
2488
2488
|
const i = t.document.createElement("style");
|
|
2489
|
-
return i.dataset.readium = "true", i.id =
|
|
2489
|
+
return i.dataset.readium = "true", i.id = Si, i.textContent = this.buildStyles(), t.document.head.appendChild(i), e.register("protect", Rt.moduleName, (n, s) => {
|
|
2490
2490
|
this.protected = !0, i.textContent = this.buildStyles(), s(!0);
|
|
2491
2491
|
}), e.register("unprotect", Rt.moduleName, (n, s) => {
|
|
2492
2492
|
this.protected = !1, i.textContent = this.buildStyles(), s(!0);
|
|
2493
2493
|
}), e.log("Snapper Mounted"), !0;
|
|
2494
2494
|
}
|
|
2495
2495
|
unmount(t, e) {
|
|
2496
|
-
return t.document.getElementById(
|
|
2496
|
+
return t.document.getElementById(Si)?.remove(), e.log("Snapper Unmounted"), !0;
|
|
2497
2497
|
}
|
|
2498
2498
|
};
|
|
2499
2499
|
Rt.moduleName = "snapper";
|
|
@@ -2504,19 +2504,19 @@ function Qn(r) {
|
|
|
2504
2504
|
function ts(r) {
|
|
2505
2505
|
return (r.getComputedStyle(r.document.documentElement).writingMode || r.getComputedStyle(r.document.body).writingMode) === "vertical-lr";
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2507
|
+
function rn(r) {
|
|
2508
2508
|
return parseInt(
|
|
2509
2509
|
r.getComputedStyle(
|
|
2510
2510
|
r.document.documentElement
|
|
2511
2511
|
).getPropertyValue("column-count")
|
|
2512
2512
|
);
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function Pi(r) {
|
|
2515
2515
|
const t = getComputedStyle(r), e = parseFloat(t.paddingTop || "0"), i = parseFloat(t.paddingBottom || "0");
|
|
2516
2516
|
return r.clientHeight - e - i;
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2519
|
-
const t =
|
|
2518
|
+
function Ei(r) {
|
|
2519
|
+
const t = rn(r);
|
|
2520
2520
|
if (!t)
|
|
2521
2521
|
return !1;
|
|
2522
2522
|
const e = r.document.querySelectorAll("div[id^='readium-virtual-page']");
|
|
@@ -2526,7 +2526,7 @@ function Pi(r) {
|
|
|
2526
2526
|
if (l > 0)
|
|
2527
2527
|
for (let h = 0; h < l; h++) {
|
|
2528
2528
|
const c = r.document.createElement("div");
|
|
2529
|
-
c.setAttribute("id", `readium-virtual-page-${h}`), c.dataset.readium = "true", CSS.supports("break-before", "column") ? c.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (c.style.breakInside = "avoid-column"), c.style.height =
|
|
2529
|
+
c.setAttribute("id", `readium-virtual-page-${h}`), c.dataset.readium = "true", CSS.supports("break-before", "column") ? c.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (c.style.breakInside = "avoid-column"), c.style.height = Pi(r.document.documentElement) + "px"), c.innerHTML = "​", r.document.body.appendChild(c);
|
|
2530
2530
|
}
|
|
2531
2531
|
return i !== l;
|
|
2532
2532
|
}
|
|
@@ -2557,16 +2557,16 @@ const is = [
|
|
|
2557
2557
|
"video"
|
|
2558
2558
|
], ns = ["dialog", "radiogroup", "radio", "menu", "menuitem"];
|
|
2559
2559
|
function Ve(r) {
|
|
2560
|
-
return ss(r) ? null :
|
|
2560
|
+
return ss(r) ? null : on(r) ? r : r.parentElement ? Ve(r.parentElement) : null;
|
|
2561
2561
|
}
|
|
2562
2562
|
function ss(r) {
|
|
2563
2563
|
return r ? r.closest("[inert]") !== null || r.hasAttribute("disabled") : !0;
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2565
|
+
function on(r) {
|
|
2566
2566
|
return r ? r.role && ns.includes(r.role) || r.tabIndex >= 0 ? !0 : is.includes(r.nodeName.toLowerCase()) || r.hasAttribute("contenteditable") && r.getAttribute("contenteditable")?.toLowerCase() !== "false" : !1;
|
|
2567
2567
|
}
|
|
2568
2568
|
function oe(r, t) {
|
|
2569
|
-
const e =
|
|
2569
|
+
const e = an(r, r.document.body, t), i = r._readium_cssSelectorGenerator.getCssSelector(e, {
|
|
2570
2570
|
selectors: ["tag", "id", "class", "nthchild", "nthoftype", "attribute"]
|
|
2571
2571
|
});
|
|
2572
2572
|
return new I({
|
|
@@ -2582,11 +2582,11 @@ function oe(r, t) {
|
|
|
2582
2582
|
})
|
|
2583
2583
|
});
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function an(r, t, e) {
|
|
2586
2586
|
for (var i = 0; i < t.children.length; i++) {
|
|
2587
2587
|
const n = t.children[i];
|
|
2588
2588
|
if (!as(n) && rs(r, n, e))
|
|
2589
|
-
return os(r, n) ? n :
|
|
2589
|
+
return os(r, n) ? n : an(r, n, e);
|
|
2590
2590
|
}
|
|
2591
2591
|
return t;
|
|
2592
2592
|
}
|
|
@@ -2633,7 +2633,7 @@ const ls = {
|
|
|
2633
2633
|
// Only trigger on near-perfect patterns
|
|
2634
2634
|
maxConsistentScrolls: 20
|
|
2635
2635
|
// Need many consistent scrolls
|
|
2636
|
-
},
|
|
2636
|
+
}, ln = {
|
|
2637
2637
|
maxSelectionsPerSecond: 500,
|
|
2638
2638
|
minVariance: 50,
|
|
2639
2639
|
historySize: 20
|
|
@@ -2677,7 +2677,7 @@ class ae {
|
|
|
2677
2677
|
this.history = [], this.consistentScrollCount = 0;
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
-
const
|
|
2680
|
+
const _i = "readium-column-snapper-style", cs = 200, F = class F extends St {
|
|
2681
2681
|
constructor() {
|
|
2682
2682
|
super(...arguments), this.isSnapProtectionEnabled = !1, this.patternAnalyzer = null, this.lastTurnTime = 0, this.rtl = !1, 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);
|
|
2683
2683
|
}
|
|
@@ -2733,7 +2733,7 @@ const Ei = "readium-column-snapper-style", cs = 200, F = class F extends St {
|
|
|
2733
2733
|
}
|
|
2734
2734
|
// Snaps the current offset to the page width.
|
|
2735
2735
|
snapCurrentOffset(t = !1, e = !1) {
|
|
2736
|
-
const i = this.doc(), n =
|
|
2736
|
+
const i = this.doc(), n = rn(this.wnd), s = this.cachedScrollWidth - this.wnd.innerWidth, o = Math.min(Math.max(0, this.normScroll()), s), a = this.dragOffset(), l = this.rtl ? -a : a, h = this.wnd.innerWidth / 3 * (l > 0 ? 2 : 1), c = Math.min(s, Math.max(0, this.snapNormOffset(o + h))), u = this.rtl ? -c : c, p = this.rtl ? -o : o, g = u > p ? "right" : "left";
|
|
2737
2737
|
if (this.checkSuspiciousSnap(g, Math.abs(u - p)), t && u !== p) {
|
|
2738
2738
|
this.snappingCancelled = !1;
|
|
2739
2739
|
const d = (R, Y, lt, ht) => lt > ht ? Y : R + (Y - R) * es(lt / ht), f = cs * n;
|
|
@@ -2813,7 +2813,7 @@ const Ei = "readium-column-snapper-style", cs = 200, F = class F extends St {
|
|
|
2813
2813
|
if (this.wnd = t, this.comms = e, this.rtl = Qn(t), !super.mount(t, e)) return !1;
|
|
2814
2814
|
t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "paginated");
|
|
2815
2815
|
const i = t.document.createElement("style");
|
|
2816
|
-
i.dataset.readium = "true", i.id =
|
|
2816
|
+
i.dataset.readium = "true", i.id = _i, i.textContent = `
|
|
2817
2817
|
@keyframes readium-bounce-l-animation {
|
|
2818
2818
|
0%, 100% {transform: translate3d(0, 0, 0);}
|
|
2819
2819
|
50% {transform: translate3d(-50px, 0, 0);}
|
|
@@ -2849,14 +2849,14 @@ const Ei = "readium-column-snapper-style", cs = 200, F = class F extends St {
|
|
|
2849
2849
|
}
|
|
2850
2850
|
`, t.document.head.appendChild(i), this.resizeObserver = new ResizeObserver(() => {
|
|
2851
2851
|
t.requestAnimationFrame(() => {
|
|
2852
|
-
t &&
|
|
2852
|
+
t && Ei(t);
|
|
2853
2853
|
}), this.onWidthChange();
|
|
2854
2854
|
}), this.resizeObserver.observe(t.document.body), this.mutationObserver = new MutationObserver((o) => {
|
|
2855
2855
|
for (const a of o)
|
|
2856
2856
|
if (a.target === this.wnd.document.documentElement) {
|
|
2857
2857
|
const l = a.oldValue, h = a.target.getAttribute("style"), c = /transform\s*:\s*([^;]+)/, u = l?.match(c), p = h?.match(c);
|
|
2858
2858
|
(!u && !p || u && !p || u && p && u[1] !== p[1]) && (t.requestAnimationFrame(() => {
|
|
2859
|
-
t &&
|
|
2859
|
+
t && Ei(t);
|
|
2860
2860
|
}), this.onWidthChange());
|
|
2861
2861
|
} else
|
|
2862
2862
|
t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth);
|
|
@@ -2951,12 +2951,12 @@ const Ei = "readium-column-snapper-style", cs = 200, F = class F extends St {
|
|
|
2951
2951
|
}), e.log("ColumnSnapper Mounted"), !0;
|
|
2952
2952
|
}
|
|
2953
2953
|
unmount(t, e) {
|
|
2954
|
-
return this.snappingCancelled = !0, e.unregisterAll(F.moduleName), this.resizeObserver.disconnect(), this.mutationObserver.disconnect(), this.patternAnalyzer && (this.patternAnalyzer.clear(), this.patternAnalyzer = null, this.isSnapProtectionEnabled = !1), 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(
|
|
2954
|
+
return this.snappingCancelled = !0, e.unregisterAll(F.moduleName), this.resizeObserver.disconnect(), this.mutationObserver.disconnect(), this.patternAnalyzer && (this.patternAnalyzer.clear(), this.patternAnalyzer = null, this.isSnapProtectionEnabled = !1), 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(_i)?.remove(), e.log("ColumnSnapper Unmounted"), super.unmount(t, e);
|
|
2955
2955
|
}
|
|
2956
2956
|
};
|
|
2957
2957
|
F.moduleName = "column_snapper";
|
|
2958
2958
|
let _e = F;
|
|
2959
|
-
const
|
|
2959
|
+
const Ci = "readium-scroll-snapper-style", U = class U extends St {
|
|
2960
2960
|
constructor() {
|
|
2961
2961
|
super(...arguments), this.patternAnalyzer = null, this.lastScrollTime = 0, this.isScrollProtectionEnabled = !1, this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce = null, this.handleScroll = (t) => {
|
|
2962
2962
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -3007,7 +3007,7 @@ const _i = "readium-scroll-snapper-style", U = class U extends St {
|
|
|
3007
3007
|
mount(t, e) {
|
|
3008
3008
|
this.wnd = t, this.comms = e, this.initialScrollHandled = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce && (this.wnd.clearTimeout(this.resizeDebounce), this.resizeDebounce = null), t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "scrolling");
|
|
3009
3009
|
const i = t.document.createElement("style");
|
|
3010
|
-
return i.dataset.readium = "true", i.id =
|
|
3010
|
+
return i.dataset.readium = "true", i.id = Ci, i.textContent = `
|
|
3011
3011
|
* {
|
|
3012
3012
|
scrollbar-width: none; /* for Firefox */
|
|
3013
3013
|
}
|
|
@@ -3084,7 +3084,7 @@ const _i = "readium-scroll-snapper-style", U = class U extends St {
|
|
|
3084
3084
|
}), e.log("ScrollSnapper Mounted"), !0;
|
|
3085
3085
|
}
|
|
3086
3086
|
unmount(t, e) {
|
|
3087
|
-
return e.unregisterAll(U.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(
|
|
3087
|
+
return e.unregisterAll(U.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(Ci)?.remove(), this.patternAnalyzer && (this.patternAnalyzer.clear(), this.patternAnalyzer = null, this.isScrollProtectionEnabled = !1), e.log("ScrollSnapper Unmounted"), !0;
|
|
3088
3088
|
}
|
|
3089
3089
|
};
|
|
3090
3090
|
U.moduleName = "scroll_snapper";
|
|
@@ -3253,7 +3253,7 @@ class ds {
|
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
3255
|
class us {
|
|
3256
|
-
constructor(t =
|
|
3256
|
+
constructor(t = ln) {
|
|
3257
3257
|
this.options = t, this.events = [], this.selectionStartTime = 0, this.lastSelectionTime = 0, this.lastSelectionPosition = 0, this.selectionPatterns = [], this.lastSelectedText = "";
|
|
3258
3258
|
}
|
|
3259
3259
|
analyze(t) {
|
|
@@ -3294,7 +3294,7 @@ class us {
|
|
|
3294
3294
|
this.events = [], this.selectionStartTime = 0, this.lastSelectionTime = 0, this.lastSelectionPosition = 0, this.selectionPatterns = [], this.lastSelectedText = "";
|
|
3295
3295
|
}
|
|
3296
3296
|
}
|
|
3297
|
-
class
|
|
3297
|
+
class hn {
|
|
3298
3298
|
/**
|
|
3299
3299
|
* Checks if the given keyboard event matches any of the provided key combinations
|
|
3300
3300
|
*/
|
|
@@ -3376,7 +3376,7 @@ class ln {
|
|
|
3376
3376
|
const l = a.suppressOnInteractiveElement;
|
|
3377
3377
|
if (l) {
|
|
3378
3378
|
const h = (n?.document ?? document).activeElement;
|
|
3379
|
-
if (Array.isArray(l) ? l.some((c) => h?.matches(c)) :
|
|
3379
|
+
if (Array.isArray(l) ? l.some((c) => h?.matches(c)) : on(h)) return;
|
|
3380
3380
|
}
|
|
3381
3381
|
o.preventDefault(), o.stopPropagation(), a.handler(o);
|
|
3382
3382
|
return;
|
|
@@ -3386,7 +3386,7 @@ class ln {
|
|
|
3386
3386
|
}
|
|
3387
3387
|
const yt = class yt extends Et {
|
|
3388
3388
|
constructor() {
|
|
3389
|
-
super(...arguments), this.configApplied = !1, this.cleanupCallbacks = [], this.pointerMoved = !1, this.isContextMenuEnabled = !1, this.isDragAndDropEnabled = !1, this.isSelectionMonitoringEnabled = !1, this.isBulkCopyProtectionEnabled = !1, this.selectionAnalyzer = null, this.currentSelection = null, this.bulkCopyProtector = null, this.keyManager = new
|
|
3389
|
+
super(...arguments), this.configApplied = !1, this.cleanupCallbacks = [], this.pointerMoved = !1, this.isContextMenuEnabled = !1, this.isDragAndDropEnabled = !1, this.isSelectionMonitoringEnabled = !1, this.isBulkCopyProtectionEnabled = !1, this.selectionAnalyzer = null, this.currentSelection = null, this.bulkCopyProtector = null, this.keyManager = new hn(), this.keyDownHandler = null, this.preventBulkCopy = (t) => {
|
|
3390
3390
|
if (!this.isBulkCopyProtectionEnabled || !this.bulkCopyProtector)
|
|
3391
3391
|
return !0;
|
|
3392
3392
|
if (!this.bulkCopyProtector.shouldAllowCopy(t)) {
|
|
@@ -3517,7 +3517,7 @@ const yt = class yt extends Et {
|
|
|
3517
3517
|
}
|
|
3518
3518
|
addSelectionMonitoring(t) {
|
|
3519
3519
|
if (this.isSelectionMonitoringEnabled || !this.wnd) return;
|
|
3520
|
-
const e = t ||
|
|
3520
|
+
const e = t || ln;
|
|
3521
3521
|
this.selectionAnalyzer = new us(e), this.wnd.document.addEventListener("selectionchange", this.handleSelection), this.isSelectionMonitoringEnabled = !0;
|
|
3522
3522
|
}
|
|
3523
3523
|
removeSelectionMonitoring() {
|
|
@@ -3660,7 +3660,7 @@ const At = class At extends Et {
|
|
|
3660
3660
|
), Reflect.defineProperty(t.navigator, "epubReadingSystem", {
|
|
3661
3661
|
value: {
|
|
3662
3662
|
name: "readium-ts-toolkit",
|
|
3663
|
-
version: "2.5.2-beta.
|
|
3663
|
+
version: "2.5.2-beta.5",
|
|
3664
3664
|
hasFeature: (n, s = "") => {
|
|
3665
3665
|
switch (n) {
|
|
3666
3666
|
case "dom-manipulation":
|
|
@@ -3709,7 +3709,7 @@ const At = class At extends Et {
|
|
|
3709
3709
|
};
|
|
3710
3710
|
At.moduleName = "setup";
|
|
3711
3711
|
let Xt = At;
|
|
3712
|
-
const
|
|
3712
|
+
const Li = "readium-viewport", Z = class Z extends Xt {
|
|
3713
3713
|
onViewportWidthChanged(t) {
|
|
3714
3714
|
const e = t.target;
|
|
3715
3715
|
Tt(e, "--RS__viewportWidth", `${e.innerWidth}px`);
|
|
@@ -3717,7 +3717,7 @@ const Ci = "readium-viewport", Z = class Z extends Xt {
|
|
|
3717
3717
|
mount(t, e) {
|
|
3718
3718
|
if (!super.mount(t, e)) return !1;
|
|
3719
3719
|
const i = t.document.createElement("meta");
|
|
3720
|
-
return i.dataset.readium = "true", i.setAttribute("name", "viewport"), i.setAttribute("id",
|
|
3720
|
+
return i.dataset.readium = "true", i.setAttribute("name", "viewport"), i.setAttribute("id", Li), i.setAttribute(
|
|
3721
3721
|
"content",
|
|
3722
3722
|
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"
|
|
3723
3723
|
), t.document.head.appendChild(i), t.addEventListener("orientationchange", this.onViewportWidthChanged), t.addEventListener("resize", this.onViewportWidthChanged), this.onViewportWidthChanged({
|
|
@@ -3725,7 +3725,7 @@ const Ci = "readium-viewport", Z = class Z extends Xt {
|
|
|
3725
3725
|
}), e.register("get_properties", Z.moduleName, (n, s) => {
|
|
3726
3726
|
Be(t), s(!0);
|
|
3727
3727
|
}), e.register("update_properties", Z.moduleName, (n, s) => {
|
|
3728
|
-
n["--RS__viewportWidth"] = `${t.innerWidth}px`,
|
|
3728
|
+
n["--RS__viewportWidth"] = `${t.innerWidth}px`, sn(t, n), s(!0);
|
|
3729
3729
|
}), e.register("set_property", Z.moduleName, (n, s) => {
|
|
3730
3730
|
const o = n;
|
|
3731
3731
|
Tt(t, o[0], o[1]), s(!0);
|
|
@@ -3736,17 +3736,17 @@ const Ci = "readium-viewport", Z = class Z extends Xt {
|
|
|
3736
3736
|
}), e.log("ReflowableSetup Mounted"), !0;
|
|
3737
3737
|
}
|
|
3738
3738
|
unmount(t, e) {
|
|
3739
|
-
return e.unregisterAll(Z.moduleName), t.document.head.querySelector(`#${
|
|
3739
|
+
return e.unregisterAll(Z.moduleName), t.document.head.querySelector(`#${Li}`)?.remove(), t.removeEventListener("orientationchange", this.onViewportWidthChanged), e.log("ReflowableSetup Unmounted"), super.unmount(t, e);
|
|
3740
3740
|
}
|
|
3741
3741
|
};
|
|
3742
3742
|
Z.moduleName = "reflowable_setup";
|
|
3743
3743
|
let ke = Z;
|
|
3744
|
-
const
|
|
3744
|
+
const xi = "readium-fixed-style", q = class q extends Xt {
|
|
3745
3745
|
mount(t, e) {
|
|
3746
3746
|
if (!super.mount(t, e)) return !1;
|
|
3747
3747
|
t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "paginated");
|
|
3748
3748
|
const i = t.document.createElement("style");
|
|
3749
|
-
return i.id =
|
|
3749
|
+
return i.id = xi, i.dataset.readium = "true", i.textContent = `
|
|
3750
3750
|
html, body {
|
|
3751
3751
|
text-size-adjust: none;
|
|
3752
3752
|
-ms-text-size-adjust: none;
|
|
@@ -3779,7 +3779,7 @@ const Li = "readium-fixed-style", q = class q extends Xt {
|
|
|
3779
3779
|
}), e.log("FixedSetup Mounted"), !0;
|
|
3780
3780
|
}
|
|
3781
3781
|
unmount(t, e) {
|
|
3782
|
-
return e.unregisterAll(q.moduleName), t.document.getElementById(
|
|
3782
|
+
return e.unregisterAll(q.moduleName), t.document.getElementById(xi)?.remove(), e.log("FixedSetup Unmounted"), super.unmount(t, e);
|
|
3783
3783
|
}
|
|
3784
3784
|
};
|
|
3785
3785
|
q.moduleName = "fixed_setup";
|
|
@@ -3801,7 +3801,7 @@ const Q = class Q extends Et {
|
|
|
3801
3801
|
), e.register("get_properties", Q.moduleName, (i, n) => {
|
|
3802
3802
|
Be(t), n(!0);
|
|
3803
3803
|
}), e.register("update_properties", Q.moduleName, (i, n) => {
|
|
3804
|
-
|
|
3804
|
+
sn(t, i), n(!0);
|
|
3805
3805
|
}), e.register("set_property", Q.moduleName, (i, n) => {
|
|
3806
3806
|
const s = i;
|
|
3807
3807
|
Tt(t, s[0], s[1]), n(!0);
|
|
@@ -3854,7 +3854,7 @@ let ps = (nt = class extends Et {
|
|
|
3854
3854
|
return this.beforePrintHandler && (t.removeEventListener("beforeprint", this.beforePrintHandler), this.beforePrintHandler = null), this.styleElement?.parentNode && (this.styleElement.parentNode.removeChild(this.styleElement), this.styleElement = null), this.comms?.unregisterAll(nt.moduleName), this.configApplied = !1, !0;
|
|
3855
3855
|
}
|
|
3856
3856
|
}, nt.moduleName = "print_protection", nt);
|
|
3857
|
-
const
|
|
3857
|
+
const ki = "readium-cjk-vertical-snapper-style", H = class H extends St {
|
|
3858
3858
|
constructor() {
|
|
3859
3859
|
super(...arguments), this.patternAnalyzer = null, this.lastScrollTime = 0, this.isScrollProtectionEnabled = !1, this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollLeft = 0, this.isResizing = !1, this.resizeDebounce = null, this.verticalLR = !1, this.handleScroll = (t) => {
|
|
3860
3860
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -3911,7 +3911,7 @@ const xi = "readium-cjk-vertical-snapper-style", H = class H extends St {
|
|
|
3911
3911
|
mount(t, e) {
|
|
3912
3912
|
this.wnd = t, this.comms = e, this.initialScrollHandled = !1, this.lastScrollLeft = 0, this.isResizing = !1, this.verticalLR = ts(t), this.resizeDebounce && (this.wnd.clearTimeout(this.resizeDebounce), this.resizeDebounce = null), t.navigator.epubReadingSystem && (t.navigator.epubReadingSystem.layoutStyle = "scrolling");
|
|
3913
3913
|
const i = t.document.createElement("style");
|
|
3914
|
-
return i.dataset.readium = "true", i.id =
|
|
3914
|
+
return i.dataset.readium = "true", i.id = ki, i.textContent = `
|
|
3915
3915
|
* {
|
|
3916
3916
|
scrollbar-width: none;
|
|
3917
3917
|
}
|
|
@@ -3990,7 +3990,7 @@ const xi = "readium-cjk-vertical-snapper-style", H = class H extends St {
|
|
|
3990
3990
|
}), e.log("CJKVerticalSnapper Mounted"), !0;
|
|
3991
3991
|
}
|
|
3992
3992
|
unmount(t, e) {
|
|
3993
|
-
return e.unregisterAll(H.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(
|
|
3993
|
+
return e.unregisterAll(H.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(ki)?.remove(), this.patternAnalyzer && (this.patternAnalyzer.clear(), this.patternAnalyzer = null, this.isScrollProtectionEnabled = !1), e.log("CJKVerticalSnapper Unmounted"), !0;
|
|
3994
3994
|
}
|
|
3995
3995
|
};
|
|
3996
3996
|
H.moduleName = "cjk_vertical_snapper";
|
|
@@ -4144,7 +4144,7 @@ const ys = {
|
|
|
4144
4144
|
// Ctrl+S
|
|
4145
4145
|
]
|
|
4146
4146
|
};
|
|
4147
|
-
class
|
|
4147
|
+
class cn {
|
|
4148
4148
|
/**
|
|
4149
4149
|
* Merges keyboard peripherals from content protection config with user-provided peripherals
|
|
4150
4150
|
* Content protection peripherals are added first for priority, then user peripherals are added only if they don't conflict
|
|
@@ -4170,7 +4170,7 @@ class hn {
|
|
|
4170
4170
|
return i;
|
|
4171
4171
|
}
|
|
4172
4172
|
}
|
|
4173
|
-
class
|
|
4173
|
+
class dn extends cn {
|
|
4174
4174
|
/**
|
|
4175
4175
|
* Moves to the left content portion (eg. page) relative to the reading progression direction.
|
|
4176
4176
|
*/
|
|
@@ -4184,7 +4184,7 @@ class cn extends hn {
|
|
|
4184
4184
|
this.readingProgression === N.ltr ? this.goForward(t, e) : this.readingProgression === N.rtl && this.goBackward(t, e);
|
|
4185
4185
|
}
|
|
4186
4186
|
}
|
|
4187
|
-
class Ss extends
|
|
4187
|
+
class Ss extends cn {
|
|
4188
4188
|
}
|
|
4189
4189
|
class Ps {
|
|
4190
4190
|
constructor(t, e, i, n) {
|
|
@@ -4318,10 +4318,10 @@ class Mt {
|
|
|
4318
4318
|
}
|
|
4319
4319
|
const _s = "'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif", Cs = {
|
|
4320
4320
|
RS__oldStyleTf: _s
|
|
4321
|
-
}, Ls = 16,
|
|
4321
|
+
}, Ls = 16, Oi = Cs.RS__oldStyleTf;
|
|
4322
4322
|
class kt {
|
|
4323
4323
|
constructor(t) {
|
|
4324
|
-
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize || Ls, this._fontFace = t.fontFace ||
|
|
4324
|
+
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize || Ls, this._fontFace = t.fontFace || Oi, this._sample = t.sample || null, this._padding = t.padding ?? 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._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 = kt.approximateWordSpaces(this._optimalChars, this._sample);
|
|
4325
4325
|
}
|
|
4326
4326
|
updateMultipliers() {
|
|
4327
4327
|
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;
|
|
@@ -4330,7 +4330,7 @@ class kt {
|
|
|
4330
4330
|
// Not filtering because pretty much everything can
|
|
4331
4331
|
// trigger a recomputation anyway.
|
|
4332
4332
|
update(t) {
|
|
4333
|
-
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 ||
|
|
4333
|
+
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 || Oi), t.letterSpacing && (this._letterSpacing = t.letterSpacing), t.wordSpacing && (this._wordSpacing = t.wordSpacing), t.isCJK != null && (this._isCJK = t.isCJK), t.padding !== void 0 && (this._padding = t.padding ?? 0), t.getRelative && (this._getRelative = t.getRelative), t.sample && (this._sample = t.sample, this._approximatedWordSpaces = kt.approximateWordSpaces(this._optimalChars, this._sample)), this.updateMultipliers(), this._optimalLineLength = this.getOptimalLineLength();
|
|
4334
4334
|
}
|
|
4335
4335
|
get baseFontSize() {
|
|
4336
4336
|
return this._baseFontSize;
|
|
@@ -4393,10 +4393,10 @@ class kt {
|
|
|
4393
4393
|
return this.getLineLengthFallback();
|
|
4394
4394
|
}
|
|
4395
4395
|
}
|
|
4396
|
-
const
|
|
4397
|
-
class
|
|
4396
|
+
const un = () => typeof navigator > "u" ? "" : navigator.userAgent || "", pn = () => typeof navigator > "u" ? void 0 : navigator.userAgentData || void 0;
|
|
4397
|
+
class fn {
|
|
4398
4398
|
constructor() {
|
|
4399
|
-
const t =
|
|
4399
|
+
const t = pn(), e = un(), i = (s) => (typeof s == "string" || typeof s == "number") && s ? String(s).replace(/_/g, ".").split(".").map((o) => parseInt(o) || 0) : [], n = (s = "") => {
|
|
4400
4400
|
if (!s) return [];
|
|
4401
4401
|
const o = new RegExp("^.*" + s + "[ :\\/]?(\\d+([\\._]\\d+)*).*$");
|
|
4402
4402
|
return o.test(e) ? i(e.replace(o, "$1")) : [];
|
|
@@ -4427,16 +4427,16 @@ class pn {
|
|
|
4427
4427
|
}, []) };
|
|
4428
4428
|
}
|
|
4429
4429
|
}
|
|
4430
|
-
class xs extends
|
|
4430
|
+
class xs extends fn {
|
|
4431
4431
|
get iOSRequest() {
|
|
4432
|
-
const t =
|
|
4432
|
+
const t = pn(), e = un();
|
|
4433
4433
|
if (this.OS.iOS && !this.OS.iPadOS)
|
|
4434
4434
|
return "mobile";
|
|
4435
4435
|
if (this.OS.iPadOS)
|
|
4436
4436
|
return /\(iPad;/.test(e) || t && /^iPad(OS)?$/.test(t.platform) ? "mobile" : "desktop";
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
4439
|
-
const J = new
|
|
4439
|
+
const J = new fn(), T = new xs();
|
|
4440
4440
|
function bt(r) {
|
|
4441
4441
|
const t = r.languages?.[0]?.toLowerCase(), e = r.readingProgression;
|
|
4442
4442
|
if (t) {
|
|
@@ -4447,7 +4447,7 @@ function bt(r) {
|
|
|
4447
4447
|
}
|
|
4448
4448
|
return "ltr";
|
|
4449
4449
|
}
|
|
4450
|
-
class
|
|
4450
|
+
class $e {
|
|
4451
4451
|
constructor(t, e) {
|
|
4452
4452
|
this.config = t, this.onUpdate = e, this.unsubs = [], this.conditionValues = /* @__PURE__ */ new Map();
|
|
4453
4453
|
}
|
|
@@ -4512,7 +4512,7 @@ class ks {
|
|
|
4512
4512
|
});
|
|
4513
4513
|
}
|
|
4514
4514
|
applyContentProtection() {
|
|
4515
|
-
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && (this.conditionBridge?.destroy(), this.conditionBridge = new
|
|
4515
|
+
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && (this.conditionBridge?.destroy(), this.conditionBridge = new $e(
|
|
4516
4516
|
this.keyboardPeripheralsConfig,
|
|
4517
4517
|
(t) => {
|
|
4518
4518
|
t.length > 0 && this.comms.send("keyboard_peripherals", t);
|
|
@@ -4686,10 +4686,10 @@ class Os {
|
|
|
4686
4686
|
}), t;
|
|
4687
4687
|
}
|
|
4688
4688
|
}
|
|
4689
|
-
var me,
|
|
4689
|
+
var me, Ri;
|
|
4690
4690
|
function Rs() {
|
|
4691
|
-
if (
|
|
4692
|
-
|
|
4691
|
+
if (Ri) return me;
|
|
4692
|
+
Ri = 1;
|
|
4693
4693
|
function r(n) {
|
|
4694
4694
|
if (typeof n != "string")
|
|
4695
4695
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
@@ -4878,7 +4878,7 @@ var Gt = Rs();
|
|
|
4878
4878
|
const As = { description: "Attempts to filter out paragraphs that are implicitly headings or part of headers", scope: "RS", value: "readium-experimentalHeaderFiltering-on" }, Ts = { 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" }, Ms = {
|
|
4879
4879
|
experimentalHeaderFiltering: As,
|
|
4880
4880
|
experimentalZoom: Ts
|
|
4881
|
-
},
|
|
4881
|
+
}, Xe = Ms;
|
|
4882
4882
|
var tt = /* @__PURE__ */ ((r) => (r.start = "start", r.left = "left", r.right = "right", r.justify = "justify", r))(tt || {});
|
|
4883
4883
|
const dt = {
|
|
4884
4884
|
range: [0, 100],
|
|
@@ -4966,7 +4966,7 @@ class Ns extends le {
|
|
|
4966
4966
|
toCSSProperties() {
|
|
4967
4967
|
const t = {};
|
|
4968
4968
|
return this.experiments && this.experiments.forEach((e) => {
|
|
4969
|
-
t["--RS__" + e] =
|
|
4969
|
+
t["--RS__" + e] = Xe[e].value;
|
|
4970
4970
|
}), t;
|
|
4971
4971
|
}
|
|
4972
4972
|
}
|
|
@@ -5032,7 +5032,7 @@ function ge(r, t) {
|
|
|
5032
5032
|
}
|
|
5033
5033
|
function gn(r) {
|
|
5034
5034
|
if (r !== void 0)
|
|
5035
|
-
return r === null ? null : r.filter((t) => t in
|
|
5035
|
+
return r === null ? null : r.filter((t) => t in Xe);
|
|
5036
5036
|
}
|
|
5037
5037
|
class Nt {
|
|
5038
5038
|
constructor(t = {}) {
|
|
@@ -5062,7 +5062,7 @@ class Fs {
|
|
|
5062
5062
|
this.fontFamily = W(t.fontFamily) || null, this.fontWeight = z(t.fontWeight, st.range) || null, this.hyphens = E(t.hyphens) ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : (T.OS.iOS || T.OS.iPadOS) && T.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : T.OS.iPadOS && T.iOSRequest === "desktop", this.letterSpacing = v(t.letterSpacing) || null, this.ligatures = E(t.ligatures) ?? null, this.lineHeight = v(t.lineHeight) || null, this.noRuby = E(t.noRuby) ?? !1, this.paragraphIndent = v(t.paragraphIndent) ?? null, this.paragraphSpacing = v(t.paragraphSpacing) ?? null, this.textAlign = he(t.textAlign, tt) || null, this.textNormalization = E(t.textNormalization) ?? !1, this.wordSpacing = v(t.wordSpacing) || null, this.zoom = z(t.zoom, ee.range) || 1, this.experiments = gn(t.experiments) ?? null;
|
|
5063
5063
|
}
|
|
5064
5064
|
}
|
|
5065
|
-
class
|
|
5065
|
+
class Ai {
|
|
5066
5066
|
constructor(t, e, i) {
|
|
5067
5067
|
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 ? (T.OS.iOS || T.OS.iPadOS) && T.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? T.OS.iPadOS && T.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;
|
|
5068
5068
|
}
|
|
@@ -5193,7 +5193,7 @@ class x extends M {
|
|
|
5193
5193
|
this._value = null;
|
|
5194
5194
|
}
|
|
5195
5195
|
}
|
|
5196
|
-
class
|
|
5196
|
+
class Ti {
|
|
5197
5197
|
constructor(t, e, i) {
|
|
5198
5198
|
this.preferences = t, this.settings = e, this.metadata = i;
|
|
5199
5199
|
}
|
|
@@ -5393,7 +5393,7 @@ const bn = (r) => {
|
|
|
5393
5393
|
i.dataset.readium = "true", t.id && (i.id = t.id);
|
|
5394
5394
|
const n = t.type || bn(t);
|
|
5395
5395
|
return n && (i.type = n), wn(i, t), i.src = e, i;
|
|
5396
|
-
},
|
|
5396
|
+
}, Mi = (r, t, e) => {
|
|
5397
5397
|
const i = r.createElement("link");
|
|
5398
5398
|
i.dataset.readium = "true", t.id && (i.id = t.id), t.rel && (i.rel = t.rel);
|
|
5399
5399
|
const n = t.type || bn(t);
|
|
@@ -5480,14 +5480,14 @@ class vn {
|
|
|
5480
5480
|
...e.attributes,
|
|
5481
5481
|
as: e.as
|
|
5482
5482
|
}
|
|
5483
|
-
}, s =
|
|
5483
|
+
}, s = Mi(t, n, i);
|
|
5484
5484
|
t.head.appendChild(s);
|
|
5485
5485
|
}
|
|
5486
5486
|
createElement(t, e, i) {
|
|
5487
5487
|
if (e.as === "script")
|
|
5488
5488
|
return Ws(t, e, i);
|
|
5489
5489
|
if (e.as === "link")
|
|
5490
|
-
return
|
|
5490
|
+
return Mi(t, e, i);
|
|
5491
5491
|
throw new Error(`Unsupported element type: ${e.as}`);
|
|
5492
5492
|
}
|
|
5493
5493
|
async applyRule(t, e) {
|
|
@@ -5925,7 +5925,7 @@ onmessage = function(event) {
|
|
|
5925
5925
|
time: performance.now() - startTime
|
|
5926
5926
|
})
|
|
5927
5927
|
}
|
|
5928
|
-
`,
|
|
5928
|
+
`, Je = class Je {
|
|
5929
5929
|
constructor(t, e) {
|
|
5930
5930
|
this.callbacks = /* @__PURE__ */ new Map(), this.worker = t, this.blobUrl = e, this.worker.onmessage = (i) => {
|
|
5931
5931
|
const n = i.data, s = n.id, o = this.callbacks.get(n.id);
|
|
@@ -5950,14 +5950,14 @@ onmessage = function(event) {
|
|
|
5950
5950
|
this.worker.terminate(), URL.revokeObjectURL(this.blobUrl);
|
|
5951
5951
|
}
|
|
5952
5952
|
};
|
|
5953
|
-
|
|
5954
|
-
let se =
|
|
5955
|
-
function
|
|
5953
|
+
Je.workerScript = Xs;
|
|
5954
|
+
let se = Je;
|
|
5955
|
+
function Ge(r) {
|
|
5956
5956
|
return typeof window < "u" && console ? console[r] : (...t) => {
|
|
5957
5957
|
};
|
|
5958
5958
|
}
|
|
5959
|
-
const Gs =
|
|
5960
|
-
async function
|
|
5959
|
+
const Gs = Ge("log"), Ni = Ge("table"), Ys = Ge("clear");
|
|
5960
|
+
async function zi() {
|
|
5961
5961
|
if (typeof navigator < "u" && navigator.brave && navigator.brave.isBrave)
|
|
5962
5962
|
try {
|
|
5963
5963
|
return await Promise.race([
|
|
@@ -6018,11 +6018,11 @@ class Ks {
|
|
|
6018
6018
|
return (await this.workerConsole.table(t)).time;
|
|
6019
6019
|
} catch {
|
|
6020
6020
|
const i = performance.now();
|
|
6021
|
-
return
|
|
6021
|
+
return Ni(t), performance.now() - i;
|
|
6022
6022
|
}
|
|
6023
6023
|
else {
|
|
6024
6024
|
const e = performance.now();
|
|
6025
|
-
return
|
|
6025
|
+
return Ni(t), performance.now() - e;
|
|
6026
6026
|
}
|
|
6027
6027
|
}
|
|
6028
6028
|
/**
|
|
@@ -6064,14 +6064,14 @@ class Ks {
|
|
|
6064
6064
|
if (!this.isPerformanceDetectionEnabled())
|
|
6065
6065
|
return !1;
|
|
6066
6066
|
const t = await this.calcTablePrintTime(), e = Math.max(await this.calcLogPrintTime(), await this.calcLogPrintTime());
|
|
6067
|
-
return this.maxPrintTime = Math.max(this.maxPrintTime, e), this.workerConsole ? await this.workerConsole.clear() : Ys(), t === 0 ? !1 : this.maxPrintTime === 0 ? !!await
|
|
6067
|
+
return this.maxPrintTime = Math.max(this.maxPrintTime, e), this.workerConsole ? await this.workerConsole.clear() : Ys(), t === 0 ? !1 : this.maxPrintTime === 0 ? !!await zi() : t > this.maxPrintTime * 10;
|
|
6068
6068
|
}
|
|
6069
6069
|
/**
|
|
6070
6070
|
* Debugger-based detection (fallback method)
|
|
6071
6071
|
* WARNING: This method impacts user experience
|
|
6072
6072
|
*/
|
|
6073
6073
|
async checkDebuggerBased() {
|
|
6074
|
-
if (!this.isDebuggerDetectionEnabled() || await
|
|
6074
|
+
if (!this.isDebuggerDetectionEnabled() || await zi())
|
|
6075
6075
|
return !1;
|
|
6076
6076
|
const t = performance.now();
|
|
6077
6077
|
try {
|
|
@@ -6200,7 +6200,7 @@ class Qs {
|
|
|
6200
6200
|
}
|
|
6201
6201
|
}
|
|
6202
6202
|
const ot = "readium:navigator:suspiciousActivity";
|
|
6203
|
-
class
|
|
6203
|
+
class Ye {
|
|
6204
6204
|
dispatchSuspiciousActivity(t, e) {
|
|
6205
6205
|
const i = new CustomEvent(ot, {
|
|
6206
6206
|
detail: {
|
|
@@ -6249,9 +6249,9 @@ class Ge {
|
|
|
6249
6249
|
}
|
|
6250
6250
|
}
|
|
6251
6251
|
const at = "readium:navigator:keyboardPeripheral";
|
|
6252
|
-
class
|
|
6252
|
+
class qe {
|
|
6253
6253
|
constructor(t = {}) {
|
|
6254
|
-
this.keyManager = new
|
|
6254
|
+
this.keyManager = new hn(), this.setupKeyboardPeripherals(t.keyboardPeripherals || []);
|
|
6255
6255
|
}
|
|
6256
6256
|
setupKeyboardPeripherals(t) {
|
|
6257
6257
|
if (t.length > 0) {
|
|
@@ -6297,13 +6297,13 @@ const tr = (r) => ({
|
|
|
6297
6297
|
peripheral: r.peripheral || (() => {
|
|
6298
6298
|
})
|
|
6299
6299
|
});
|
|
6300
|
-
class er extends
|
|
6300
|
+
class er extends dn {
|
|
6301
6301
|
constructor(t, e, i, n = void 0, s = { preferences: {}, defaults: {} }) {
|
|
6302
6302
|
super(), this.currentIndex = 0, this._preferencesEditor = null, this._injector = null, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this.webViewport = {
|
|
6303
6303
|
readingOrder: [],
|
|
6304
6304
|
progressions: /* @__PURE__ */ new Map(),
|
|
6305
6305
|
positions: null
|
|
6306
|
-
}, this.pub = e, this.container = t, this.listeners = tr(i), this._preferences = new Nt(s.preferences), this._defaults = new Fs(s.defaults), this._settings = new
|
|
6306
|
+
}, this.pub = e, this.container = t, this.listeners = tr(i), this._preferences = new Nt(s.preferences), this._defaults = new Fs(s.defaults), this._settings = new Ai(this._preferences, this._defaults, this.hasDisplayTransformability), this._css = new zs({
|
|
6307
6307
|
rsProperties: new Ns({ experiments: this._settings.experiments || null }),
|
|
6308
6308
|
userProperties: new mn({ zoom: this._settings.zoom })
|
|
6309
6309
|
});
|
|
@@ -6314,10 +6314,10 @@ class er extends cn {
|
|
|
6314
6314
|
}), this._contentProtection = s.contentProtection || {}, this._keyboardPeripherals = this.mergeKeyboardPeripherals(
|
|
6315
6315
|
this._contentProtection,
|
|
6316
6316
|
s.keyboardPeripherals || []
|
|
6317
|
-
), (this._contentProtection.disableContextMenu || this._contentProtection.checkAutomation || this._contentProtection.checkIFrameEmbedding || this._contentProtection.monitorDevTools || this._contentProtection.protectPrinting?.disable) && (this._navigatorProtector = new
|
|
6317
|
+
), (this._contentProtection.disableContextMenu || this._contentProtection.checkAutomation || this._contentProtection.checkIFrameEmbedding || this._contentProtection.monitorDevTools || this._contentProtection.protectPrinting?.disable) && (this._navigatorProtector = new Ye(this._contentProtection), this._suspiciousActivityListener = (l) => {
|
|
6318
6318
|
const { type: h, ...c } = l.detail;
|
|
6319
6319
|
h === "context_menu" ? this.listeners.contextMenu(c) : this.listeners.contentProtection(h, c);
|
|
6320
|
-
}, window.addEventListener(ot, this._suspiciousActivityListener)), this._keyboardPeripherals.length > 0 && (this._keyboardPeripheralsManager = new
|
|
6320
|
+
}, window.addEventListener(ot, this._suspiciousActivityListener)), this._keyboardPeripherals.length > 0 && (this._keyboardPeripheralsManager = new qe({
|
|
6321
6321
|
keyboardPeripherals: this._keyboardPeripherals
|
|
6322
6322
|
}), this._keyboardPeripheralListener = (l) => {
|
|
6323
6323
|
const h = l.detail;
|
|
@@ -6345,13 +6345,13 @@ class er extends cn {
|
|
|
6345
6345
|
return Object.freeze({ ...this._settings });
|
|
6346
6346
|
}
|
|
6347
6347
|
get preferencesEditor() {
|
|
6348
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
6348
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new Ti(this._preferences, this.settings, this.pub.metadata)), this._preferencesEditor;
|
|
6349
6349
|
}
|
|
6350
6350
|
async submitPreferences(t) {
|
|
6351
6351
|
this._preferences = this._preferences.merging(t), await this.applyPreferences();
|
|
6352
6352
|
}
|
|
6353
6353
|
async applyPreferences() {
|
|
6354
|
-
this._settings = new
|
|
6354
|
+
this._settings = new Ai(this._preferences, this._defaults, this.hasDisplayTransformability), this._preferencesEditor !== null && (this._preferencesEditor = new Ti(this._preferences, this.settings, this.pub.metadata)), await this.updateCSS(!0);
|
|
6355
6355
|
}
|
|
6356
6356
|
async updateCSS(t) {
|
|
6357
6357
|
this._css.update(this._settings), t && await this.commitCSS(this._css);
|
|
@@ -6737,7 +6737,7 @@ class _n {
|
|
|
6737
6737
|
});
|
|
6738
6738
|
}
|
|
6739
6739
|
applyContentProtection() {
|
|
6740
|
-
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && (this.conditionBridge?.destroy(), this.conditionBridge = new
|
|
6740
|
+
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && (this.conditionBridge?.destroy(), this.conditionBridge = new $e(
|
|
6741
6741
|
this.keyboardPeripheralsConfig,
|
|
6742
6742
|
(t) => {
|
|
6743
6743
|
t.length > 0 && this.comms.send("keyboard_peripherals", t);
|
|
@@ -6804,7 +6804,7 @@ class _n {
|
|
|
6804
6804
|
return this.loader;
|
|
6805
6805
|
}
|
|
6806
6806
|
}
|
|
6807
|
-
const
|
|
6807
|
+
const Ii = 5, Di = 3;
|
|
6808
6808
|
class nr {
|
|
6809
6809
|
constructor(t, e, i, n, s, o) {
|
|
6810
6810
|
this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.injector = null, this.container = t, this.positions = e, this.currentCssProperties = i, this.injector = n ?? null, this.contentProtectionConfig = s || {}, this.keyboardPeripheralsConfig = o || [];
|
|
@@ -6832,7 +6832,7 @@ class nr {
|
|
|
6832
6832
|
const a = new Promise(async (l, h) => {
|
|
6833
6833
|
const c = [], u = [];
|
|
6834
6834
|
this.positions.forEach((d, f) => {
|
|
6835
|
-
(f > s +
|
|
6835
|
+
(f > s + Ii || f < s - Ii) && (c.includes(d.href) || c.push(d.href)), f < s + Di && f > s - Di && (u.includes(d.href) || u.push(d.href));
|
|
6836
6836
|
}), c.forEach(async (d) => {
|
|
6837
6837
|
u.includes(d) || this.pool.has(d) && (await this.pool.get(d)?.destroy(), this.pool.delete(d), this.pendingUpdates.has(d) && this.pendingUpdates.set(d, { inPool: !1 }));
|
|
6838
6838
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((d) => {
|
|
@@ -6995,7 +6995,7 @@ class sr {
|
|
|
6995
6995
|
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");
|
|
6996
6996
|
}
|
|
6997
6997
|
async destroy() {
|
|
6998
|
-
await this.unfocus(), this.loader?.destroy(), this.wrapper.remove();
|
|
6998
|
+
this.conditionBridge?.destroy(), await this.unfocus(), this.loader?.destroy(), this.wrapper.remove();
|
|
6999
6999
|
}
|
|
7000
7000
|
async unload() {
|
|
7001
7001
|
if (this.loaded)
|
|
@@ -7026,7 +7026,12 @@ class sr {
|
|
|
7026
7026
|
this.comms?.halt();
|
|
7027
7027
|
}
|
|
7028
7028
|
applyContentProtection() {
|
|
7029
|
-
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && this.
|
|
7029
|
+
this.comms || this.comms.resume(), this.comms.send("peripherals_protection", this.contentProtectionConfig), this.keyboardPeripheralsConfig && this.keyboardPeripheralsConfig.length > 0 && (this.conditionBridge?.destroy(), this.conditionBridge = new $e(
|
|
7030
|
+
this.keyboardPeripheralsConfig,
|
|
7031
|
+
(t) => {
|
|
7032
|
+
t.length > 0 && this.comms.send("keyboard_peripherals", t);
|
|
7033
|
+
}
|
|
7034
|
+
), this.conditionBridge.setup()), this.contentProtectionConfig.protectPrinting?.disable && this.comms.send("print_protection", this.contentProtectionConfig.protectPrinting);
|
|
7030
7035
|
}
|
|
7031
7036
|
async show(t) {
|
|
7032
7037
|
if (!this.frame.parentElement) {
|
|
@@ -7155,7 +7160,7 @@ class lr {
|
|
|
7155
7160
|
return this._DOM;
|
|
7156
7161
|
}
|
|
7157
7162
|
}
|
|
7158
|
-
const
|
|
7163
|
+
const Fi = 6, ye = 1.02, Wi = 50;
|
|
7159
7164
|
class hr {
|
|
7160
7165
|
constructor(t, e = !1) {
|
|
7161
7166
|
this.dragState = 0, this.minimumMoved = !1, this.pan = {
|
|
@@ -7271,7 +7276,7 @@ class hr {
|
|
|
7271
7276
|
*/
|
|
7272
7277
|
touchendHandler(t) {
|
|
7273
7278
|
if (t.stopPropagation(), !t.touches || t.touches.length === 0)
|
|
7274
|
-
this.pan.endX && !this.isScaled ? (this.pinch.touchN && (this.pan.endX = this.pan.startX), this.updateAfterDrag()) : !this.pinch.touchN && Math.abs(this.pan.overscrollX) >
|
|
7279
|
+
this.pan.endX && !this.isScaled ? (this.pinch.touchN && (this.pan.endX = this.pan.startX), this.updateAfterDrag()) : !this.pinch.touchN && Math.abs(this.pan.overscrollX) > Wi && Math.abs(this.pan.overscrollY) < Wi / 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");
|
|
7275
7280
|
else if (t.touches.length === 1) {
|
|
7276
7281
|
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");
|
|
7277
7282
|
const e = this.startTouch(t);
|
|
@@ -7294,7 +7299,7 @@ class hr {
|
|
|
7294
7299
|
if (this.dragState === 2 && i) {
|
|
7295
7300
|
if (this.pinch.touchN++, this.pinch.touchN < 4) return;
|
|
7296
7301
|
let o = i / this.pinch.startDistance * this.scale;
|
|
7297
|
-
o >=
|
|
7302
|
+
o >= Fi && (o = Fi), o <= ye && (o = 1), this.scale = o, this.pinch.startDistance = i, n = !0;
|
|
7298
7303
|
}
|
|
7299
7304
|
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) {
|
|
7300
7305
|
if (this.dragState === 1) {
|
|
@@ -7422,7 +7427,7 @@ class cr {
|
|
|
7422
7427
|
return this.spreads.find((e) => e.includes(t)) || void 0;
|
|
7423
7428
|
}
|
|
7424
7429
|
}
|
|
7425
|
-
const
|
|
7430
|
+
const Ui = 8, Bi = 5, dr = 300, ur = 15e3, pr = 250, fr = 150, mr = 500;
|
|
7426
7431
|
class gr {
|
|
7427
7432
|
constructor(t, e, i, n, s, o) {
|
|
7428
7433
|
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.injector = null, 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.injector = n ?? null, this.contentProtectionConfig = s || {}, this.keyboardPeripheralsConfig = o || [], this.spreadPresentation = i.metadata.otherMetadata?.spread || Ne.auto, this.pub.metadata.effectiveReadingProgression !== N.rtl && this.pub.metadata.effectiveReadingProgression !== N.ltr)
|
|
@@ -7640,7 +7645,7 @@ class gr {
|
|
|
7640
7645
|
const a = new Promise(async (l, h) => {
|
|
7641
7646
|
const c = [], u = [];
|
|
7642
7647
|
this.positions.forEach((d, f) => {
|
|
7643
|
-
(f > s +
|
|
7648
|
+
(f > s + Ui || f < s - Ui) && (c.includes(d.href) || c.push(d.href)), f < s + Bi && f > s - Bi && (u.includes(d.href) || u.push(d.href));
|
|
7644
7649
|
}), c.forEach(async (d) => {
|
|
7645
7650
|
u.includes(d) || this.pool.has(d) && (this.cancelShowing(d), await this.pool.get(d)?.unload());
|
|
7646
7651
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((d) => URL.revokeObjectURL(d)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
@@ -7662,8 +7667,8 @@ class gr {
|
|
|
7662
7667
|
let Y = !1;
|
|
7663
7668
|
const lt = window.setTimeout(async () => {
|
|
7664
7669
|
this.delayedTimeout.set(d, 0);
|
|
7665
|
-
const ht = this.makeSpread(this.reAlign(f)), xn = this.spreadPosition(ht, w),
|
|
7666
|
-
await
|
|
7670
|
+
const ht = this.makeSpread(this.reAlign(f)), xn = this.spreadPosition(ht, w), Ze = this.pool.get(d);
|
|
7671
|
+
await Ze.load(i, this.blobs.get(d)), this.peripherals.isScaled || await Ze.show(xn), this.delayedShow.delete(d), Y = !0, P();
|
|
7667
7672
|
}, dr);
|
|
7668
7673
|
setTimeout(() => {
|
|
7669
7674
|
!Y && this.delayedShow.has(d) && R(`Offscreen load timeout: ${d}`);
|
|
@@ -7779,7 +7784,7 @@ const br = "#FFFFFF", wr = "#121212", vr = "#0000EE", Sr = "#551A8B", Pr = "#b4d
|
|
|
7779
7784
|
RS__selectionBackgroundColor: Pr,
|
|
7780
7785
|
RS__selectionTextColor: Er
|
|
7781
7786
|
};
|
|
7782
|
-
class
|
|
7787
|
+
class Hi {
|
|
7783
7788
|
constructor(t, e, i) {
|
|
7784
7789
|
this.preferences = t, this.settings = e, this.metadata = i, this.layout = this.metadata?.effectiveLayout || b.reflowable;
|
|
7785
7790
|
}
|
|
@@ -8224,7 +8229,7 @@ class Bi {
|
|
|
8224
8229
|
});
|
|
8225
8230
|
}
|
|
8226
8231
|
}
|
|
8227
|
-
class
|
|
8232
|
+
class Vi {
|
|
8228
8233
|
constructor(t, e) {
|
|
8229
8234
|
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 ? (T.OS.iOS || T.OS.iPadOS) && T.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = this.deprecatedFontSize || t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? T.OS.iPadOS && T.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.scrollPaddingLeft = t.scrollPaddingLeft !== void 0 ? t.scrollPaddingLeft : e.scrollPaddingLeft !== void 0 ? e.scrollPaddingLeft : null, this.scrollPaddingRight = t.scrollPaddingRight !== void 0 ? t.scrollPaddingRight : e.scrollPaddingRight !== void 0 ? e.scrollPaddingRight : 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;
|
|
8230
8235
|
}
|
|
@@ -8253,7 +8258,7 @@ class Cr extends le {
|
|
|
8253
8258
|
toCSSProperties() {
|
|
8254
8259
|
const t = {};
|
|
8255
8260
|
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.scrollPaddingLeft != null && (t["--RS__scrollPaddingLeft"] = this.toPx(this.scrollPaddingLeft)), this.scrollPaddingRight != null && (t["--RS__scrollPaddingRight"] = this.toPx(this.scrollPaddingRight)), 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) => {
|
|
8256
|
-
t["--RS__" + e] =
|
|
8261
|
+
t["--RS__" + e] = Xe[e].value;
|
|
8257
8262
|
}), t;
|
|
8258
8263
|
}
|
|
8259
8264
|
}
|
|
@@ -8604,13 +8609,13 @@ const Or = (r) => ({
|
|
|
8604
8609
|
peripheral: r.peripheral || (() => {
|
|
8605
8610
|
})
|
|
8606
8611
|
});
|
|
8607
|
-
class Ln extends
|
|
8612
|
+
class Ln extends dn {
|
|
8608
8613
|
constructor(t, e, i, n = [], s = void 0, o = { preferences: {}, defaults: {} }) {
|
|
8609
8614
|
super(), this._preferencesEditor = null, this._injector = null, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this.reflowViewport = {
|
|
8610
8615
|
readingOrder: [],
|
|
8611
8616
|
progressions: /* @__PURE__ */ new Map(),
|
|
8612
8617
|
positions: null
|
|
8613
|
-
}, this.pub = e, this.container = t, this.listeners = Or(i), this.currentLocation = s, n.length && (this.positions = n), this._preferences = new zt(o.preferences), this._defaults = new yr(o.defaults), this._settings = new
|
|
8618
|
+
}, this.pub = e, this.container = t, this.listeners = Or(i), this.currentLocation = s, n.length && (this.positions = n), this._preferences = new zt(o.preferences), this._defaults = new yr(o.defaults), this._settings = new Vi(this._preferences, this._defaults);
|
|
8614
8619
|
const a = bt(e.metadata), l = a === "cjk-horizontal", h = a === "cjk-vertical", u = h || a === "mongolian-vertical", p = l || h;
|
|
8615
8620
|
this._css = new Lr({
|
|
8616
8621
|
rsProperties: new Cr({ noVerticalPagination: u || void 0 }),
|
|
@@ -8632,10 +8637,10 @@ class Ln extends cn {
|
|
|
8632
8637
|
}), this._layout = Ln.determineLayout(e, !!this._settings.scroll), this.currentProgression = e.metadata.effectiveReadingProgression, this._injectablesConfig = o.injectables || { rules: [], allowedDomains: [] }, this._readiumRulesPromise = kr(e.metadata, e.readingOrder.items), this._contentProtection = o.contentProtection || {}, this._keyboardPeripherals = this.mergeKeyboardPeripherals(
|
|
8633
8638
|
this._contentProtection,
|
|
8634
8639
|
o.keyboardPeripherals || []
|
|
8635
|
-
), (this._contentProtection.disableContextMenu || this._contentProtection.checkAutomation || this._contentProtection.checkIFrameEmbedding || this._contentProtection.monitorDevTools || this._contentProtection.protectPrinting?.disable) && (this._navigatorProtector = new
|
|
8640
|
+
), (this._contentProtection.disableContextMenu || this._contentProtection.checkAutomation || this._contentProtection.checkIFrameEmbedding || this._contentProtection.monitorDevTools || this._contentProtection.protectPrinting?.disable) && (this._navigatorProtector = new Ye(this._contentProtection), this._suspiciousActivityListener = (g) => {
|
|
8636
8641
|
const { type: d, ...f } = g.detail;
|
|
8637
8642
|
d === "context_menu" ? this.listeners.contextMenu(f) : this.listeners.contentProtection(d, f);
|
|
8638
|
-
}, window.addEventListener(ot, this._suspiciousActivityListener)), this._keyboardPeripherals.length > 0 && (this._keyboardPeripheralsManager = new
|
|
8643
|
+
}, window.addEventListener(ot, this._suspiciousActivityListener)), this._keyboardPeripherals.length > 0 && (this._keyboardPeripheralsManager = new qe({
|
|
8639
8644
|
keyboardPeripherals: this._keyboardPeripherals
|
|
8640
8645
|
}), this._keyboardPeripheralListener = (g) => {
|
|
8641
8646
|
const d = g.detail;
|
|
@@ -8644,7 +8649,7 @@ class Ln extends cn {
|
|
|
8644
8649
|
}
|
|
8645
8650
|
static determineLayout(t, e) {
|
|
8646
8651
|
const i = t.metadata.effectiveLayout;
|
|
8647
|
-
if (i === b.fixed || t.metadata.otherMetadata && "http://openmangaformat.org/schema/1.0#version" in t.metadata.otherMetadata || t.metadata?.conformsTo?.includes(
|
|
8652
|
+
if (i === b.fixed || t.metadata.otherMetadata && "http://openmangaformat.org/schema/1.0#version" in t.metadata.otherMetadata || t.metadata?.conformsTo?.includes(qi.DIVINA))
|
|
8648
8653
|
return b.fixed;
|
|
8649
8654
|
if (i === b.scrolled)
|
|
8650
8655
|
return b.scrolled;
|
|
@@ -8693,14 +8698,14 @@ class Ln extends cn {
|
|
|
8693
8698
|
}
|
|
8694
8699
|
}
|
|
8695
8700
|
get preferencesEditor() {
|
|
8696
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
8701
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new Hi(this._preferences, this.settings, this.pub.metadata)), this._preferencesEditor;
|
|
8697
8702
|
}
|
|
8698
8703
|
async submitPreferences(t) {
|
|
8699
8704
|
this._preferences = this._preferences.merging(t), await this.applyPreferences();
|
|
8700
8705
|
}
|
|
8701
8706
|
async applyPreferences() {
|
|
8702
8707
|
const t = this._settings;
|
|
8703
|
-
this._settings = new
|
|
8708
|
+
this._settings = new Vi(this._preferences, this._defaults), this._preferencesEditor !== null && (this._preferencesEditor = new Hi(this._preferences, this.settings, this.pub.metadata)), this._layout === b.fixed ? this.handleFXLPrefs(t, this._settings) : await this.updateCSS(!0);
|
|
8704
8709
|
}
|
|
8705
8710
|
// TODO: fit, etc.
|
|
8706
8711
|
handleFXLPrefs(t, e) {
|
|
@@ -9278,12 +9283,12 @@ class PreservePitchProcessor extends AudioWorkletProcessor {
|
|
|
9278
9283
|
|
|
9279
9284
|
registerProcessor('preserve-pitch-processor', PreservePitchProcessor);
|
|
9280
9285
|
`;
|
|
9281
|
-
class
|
|
9286
|
+
class Ke {
|
|
9282
9287
|
constructor(t) {
|
|
9283
9288
|
this.workletNode = null, this.url = null, this.ctx = t;
|
|
9284
9289
|
}
|
|
9285
9290
|
static async createWorklet(t) {
|
|
9286
|
-
const { ctx: e, pitchFactor: i, modulePath: n } = t, s = new
|
|
9291
|
+
const { ctx: e, pitchFactor: i, modulePath: n } = t, s = new Ke(e);
|
|
9287
9292
|
try {
|
|
9288
9293
|
if (n)
|
|
9289
9294
|
await e.audioWorklet.addModule(n);
|
|
@@ -9490,7 +9495,7 @@ class Ar {
|
|
|
9490
9495
|
*/
|
|
9491
9496
|
setPlaybackRate(t, e) {
|
|
9492
9497
|
this.mediaElement.playbackRate = t, e ? "preservesPitch" in this.mediaElement ? this.mediaElement.preservesPitch = !0 : this.activateWebAudio().then(() => {
|
|
9493
|
-
this.worklet ? this.worklet.updatePitchFactor(1 / t) :
|
|
9498
|
+
this.worklet ? this.worklet.updatePitchFactor(1 / t) : Ke.createWorklet({
|
|
9494
9499
|
ctx: this.getOrCreateAudioContext(),
|
|
9495
9500
|
pitchFactor: 1
|
|
9496
9501
|
}).then((i) => {
|
|
@@ -9590,12 +9595,12 @@ class Tr {
|
|
|
9590
9595
|
this.volume = z(t.volume, ie.range) ?? 1, this.playbackRate = z(t.playbackRate, ne.range) ?? 1, this.preservePitch = E(t.preservePitch) ?? !0, this.skipBackwardInterval = z(t.skipBackwardInterval, it.range) ?? 10, this.skipForwardInterval = z(t.skipForwardInterval, it.range) ?? 10, this.pollInterval = v(t.pollInterval) ?? 1e3, this.autoPlay = E(t.autoPlay) ?? !0, this.enableMediaSession = E(t.enableMediaSession) ?? !0;
|
|
9591
9596
|
}
|
|
9592
9597
|
}
|
|
9593
|
-
class
|
|
9598
|
+
class ji {
|
|
9594
9599
|
constructor(t, e) {
|
|
9595
9600
|
this.volume = t.volume ?? e.volume, this.playbackRate = t.playbackRate ?? e.playbackRate, this.preservePitch = t.preservePitch ?? e.preservePitch, this.skipBackwardInterval = t.skipBackwardInterval ?? e.skipBackwardInterval, this.skipForwardInterval = t.skipForwardInterval ?? e.skipForwardInterval, this.pollInterval = t.pollInterval ?? e.pollInterval, this.autoPlay = t.autoPlay ?? e.autoPlay, this.enableMediaSession = t.enableMediaSession ?? e.enableMediaSession;
|
|
9596
9601
|
}
|
|
9597
9602
|
}
|
|
9598
|
-
class
|
|
9603
|
+
class $i {
|
|
9599
9604
|
constructor(t, e) {
|
|
9600
9605
|
this.preferences = t, this.settings = e;
|
|
9601
9606
|
}
|
|
@@ -9694,7 +9699,7 @@ class ji {
|
|
|
9694
9699
|
});
|
|
9695
9700
|
}
|
|
9696
9701
|
}
|
|
9697
|
-
const
|
|
9702
|
+
const Xi = 1, Gi = 1;
|
|
9698
9703
|
class Mr {
|
|
9699
9704
|
constructor(t, e, i = {}) {
|
|
9700
9705
|
this.pool = /* @__PURE__ */ new Map(), this._audioEngine = t, this._publication = e, this._supportedAudioTypes = this.detectSupportedAudioTypes(), i.disableRemotePlayback && (this._audioEngine.getMediaElement().disableRemotePlayback = !0);
|
|
@@ -9747,7 +9752,7 @@ class Mr {
|
|
|
9747
9752
|
for (let n = 0; n < e.length; n++) {
|
|
9748
9753
|
if (n === t) continue;
|
|
9749
9754
|
const s = this.pickPlayableHref(e[n]);
|
|
9750
|
-
n >= t -
|
|
9755
|
+
n >= t - Gi && n <= t + Gi ? (this.ensure(s), i.add(s)) : n >= t - Xi && n <= t + Xi && this.pool.has(s) && i.add(s);
|
|
9751
9756
|
}
|
|
9752
9757
|
for (const [n, s] of this.pool)
|
|
9753
9758
|
i.has(n) || (s.removeAttribute("src"), s.load(), this.pool.delete(n));
|
|
@@ -9798,7 +9803,7 @@ class zr {
|
|
|
9798
9803
|
document.removeEventListener("copy", this.copyHandler, !0), window.removeEventListener("unload", this.unloadHandler);
|
|
9799
9804
|
}
|
|
9800
9805
|
}
|
|
9801
|
-
class Ir extends
|
|
9806
|
+
class Ir extends Ye {
|
|
9802
9807
|
constructor(t = {}) {
|
|
9803
9808
|
super(t), t.disableDragAndDrop && (this.dragAndDropProtector = new Nr({
|
|
9804
9809
|
onDragDetected: (e) => {
|
|
@@ -9854,7 +9859,7 @@ class Wr extends Ss {
|
|
|
9854
9859
|
preferences: {},
|
|
9855
9860
|
defaults: {}
|
|
9856
9861
|
}) {
|
|
9857
|
-
if (super(), this.positionPollInterval = null, this.navigationId = 0, this._playIntent = !1, this._preferencesEditor = null, this._mediaSessionEnabled = !1, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this._isNavigating = !1, this._isStalled = !1, this._stalledWatchdog = null, this._stalledCheckTime = 0, this.pub = t, this.listeners = Dr(e), this._preferences = new ce(n.preferences), this._defaults = new Tr(n.defaults), this._settings = new
|
|
9862
|
+
if (super(), this.positionPollInterval = null, this.navigationId = 0, this._playIntent = !1, this._preferencesEditor = null, this._mediaSessionEnabled = !1, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this._isNavigating = !1, this._isStalled = !1, this._stalledWatchdog = null, this._stalledCheckTime = 0, this.pub = t, this.listeners = Dr(e), this._preferences = new ce(n.preferences), this._defaults = new Tr(n.defaults), this._settings = new ji(this._preferences, this._defaults), t.readingOrder.items.length === 0)
|
|
9858
9863
|
throw new Error("AudioNavigator: publication has an empty reading order");
|
|
9859
9864
|
if (i)
|
|
9860
9865
|
this.currentLocation = this.ensureLocatorLocations(i);
|
|
@@ -9895,7 +9900,7 @@ class Wr extends Ss {
|
|
|
9895
9900
|
(h.disableContextMenu || h.checkAutomation || h.checkIFrameEmbedding || h.monitorDevTools || h.protectPrinting?.disable || h.disableDragAndDrop || h.protectCopy) && (this._navigatorProtector = new Ir(h), this._suspiciousActivityListener = (u) => {
|
|
9896
9901
|
const { type: p, ...g } = u.detail;
|
|
9897
9902
|
p === "context_menu" ? this.listeners.contextMenu(g) : this.listeners.contentProtection(p, g);
|
|
9898
|
-
}, window.addEventListener(ot, this._suspiciousActivityListener)), c.length > 0 && (this._keyboardPeripheralsManager = new
|
|
9903
|
+
}, window.addEventListener(ot, this._suspiciousActivityListener)), c.length > 0 && (this._keyboardPeripheralsManager = new qe({ keyboardPeripherals: c }), this._keyboardPeripheralListener = (u) => {
|
|
9899
9904
|
this.listeners.peripheral(u.detail);
|
|
9900
9905
|
}, window.addEventListener(at, this._keyboardPeripheralListener)), this.setupEventListeners(), this._isNavigating = !0, this.pool.setCurrentAudio(o, "forward"), this.applyPreferences(), this.waitForLoadedAndSeeked(a).then(() => {
|
|
9901
9906
|
this._isNavigating = !1, this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()), this._notifyTimelineChange(this.currentLocator), this.listeners.positionChanged(this.currentLocator), this._setupRemotePlayback();
|
|
@@ -9907,13 +9912,13 @@ class Wr extends Ss {
|
|
|
9907
9912
|
return this._settings;
|
|
9908
9913
|
}
|
|
9909
9914
|
get preferencesEditor() {
|
|
9910
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
9915
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new $i(this._preferences, this.settings)), this._preferencesEditor;
|
|
9911
9916
|
}
|
|
9912
9917
|
async submitPreferences(t) {
|
|
9913
9918
|
this._preferences = this._preferences.merging(t), this.applyPreferences();
|
|
9914
9919
|
}
|
|
9915
9920
|
applyPreferences() {
|
|
9916
|
-
this._settings = new
|
|
9921
|
+
this._settings = new ji(this._preferences, this._defaults), this._preferencesEditor !== null && (this._preferencesEditor = new $i(this._preferences, this.settings)), this.pool.audioEngine.setVolume(this._settings.volume), this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate, this._settings.preservePitch), this.positionPollInterval !== null && this.startPositionPolling(), this._settings.enableMediaSession && !this._mediaSessionEnabled ? (this._mediaSessionEnabled = !0, this.setupMediaSession()) : !this._settings.enableMediaSession && this._mediaSessionEnabled && (this._mediaSessionEnabled = !1, this.destroyMediaSession());
|
|
9917
9922
|
}
|
|
9918
9923
|
get publication() {
|
|
9919
9924
|
return this.pub;
|
|
@@ -10212,15 +10217,15 @@ export {
|
|
|
10212
10217
|
Tr as AudioDefaults,
|
|
10213
10218
|
Wr as AudioNavigator,
|
|
10214
10219
|
ce as AudioPreferences,
|
|
10215
|
-
|
|
10216
|
-
|
|
10220
|
+
$i as AudioPreferencesEditor,
|
|
10221
|
+
ji as AudioSettings,
|
|
10217
10222
|
A as BooleanPreference,
|
|
10218
10223
|
yn as EnumPreference,
|
|
10219
10224
|
yr as EpubDefaults,
|
|
10220
10225
|
Ln as EpubNavigator,
|
|
10221
10226
|
zt as EpubPreferences,
|
|
10222
|
-
|
|
10223
|
-
|
|
10227
|
+
Hi as EpubPreferencesEditor,
|
|
10228
|
+
Vi as EpubSettings,
|
|
10224
10229
|
Fr as ExperimentalWebPubNavigator,
|
|
10225
10230
|
ar as FXLCoordinator,
|
|
10226
10231
|
sr as FXLFrameManager,
|
|
@@ -10234,7 +10239,7 @@ export {
|
|
|
10234
10239
|
vn as Injector,
|
|
10235
10240
|
kt as LineLengths,
|
|
10236
10241
|
Ss as MediaNavigator,
|
|
10237
|
-
|
|
10242
|
+
cn as Navigator,
|
|
10238
10243
|
Me as Orientation,
|
|
10239
10244
|
M as Preference,
|
|
10240
10245
|
le as Properties,
|
|
@@ -10245,7 +10250,7 @@ export {
|
|
|
10245
10250
|
tt as TextAlignment,
|
|
10246
10251
|
Cn as UserProperties,
|
|
10247
10252
|
or as VerticalThird,
|
|
10248
|
-
|
|
10253
|
+
dn as VisualNavigator,
|
|
10249
10254
|
Ar as WebAudioEngine,
|
|
10250
10255
|
Ps as WebPubBlobBuilder,
|
|
10251
10256
|
zs as WebPubCSS,
|
|
@@ -10254,8 +10259,8 @@ export {
|
|
|
10254
10259
|
Os as WebPubFramePoolManager,
|
|
10255
10260
|
er as WebPubNavigator,
|
|
10256
10261
|
Nt as WebPubPreferences,
|
|
10257
|
-
|
|
10258
|
-
|
|
10262
|
+
Ti as WebPubPreferencesEditor,
|
|
10263
|
+
Ai as WebPubSettings,
|
|
10259
10264
|
Ns as WebRSProperties,
|
|
10260
10265
|
mn as WebUserProperties,
|
|
10261
10266
|
E as ensureBoolean,
|
|
@@ -10267,7 +10272,7 @@ export {
|
|
|
10267
10272
|
v as ensureNonNegative,
|
|
10268
10273
|
W as ensureString,
|
|
10269
10274
|
z as ensureValueInRange,
|
|
10270
|
-
|
|
10275
|
+
Xe as experiments,
|
|
10271
10276
|
dt as filterRangeConfig,
|
|
10272
10277
|
Yt as fontSizeRangeConfig,
|
|
10273
10278
|
st as fontWeightRangeConfig,
|