@readium/speech 0.6.0 → 0.7.1
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/README.md +3 -1
- package/build/SpeechServer/speechServerVoiceMapping.d.ts +2 -2
- package/build/SpeechServer/types.d.ts +2 -1
- package/build/index.cjs +27 -27
- package/build/index.js +653 -647
- package/build/preferences/SpeechDefaults.d.ts +3 -5
- package/build/preferences/SpeechPreferences.d.ts +3 -5
- package/build/preferences/SpeechPreferencesEditor.d.ts +2 -3
- package/build/preferences/SpeechSettings.d.ts +2 -3
- package/build/preferences/constraints.d.ts +2 -2
- package/build/speechNavigator.d.ts +2 -0
- package/build/utterance.d.ts +0 -1
- package/build/utterances/extractUtterances.d.ts +3 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -401,7 +401,7 @@ const U = (t) => {
|
|
|
401
401
|
],
|
|
402
402
|
testUtterance: "你好,我叫 {name},係越中文聲。"
|
|
403
403
|
}
|
|
404
|
-
},
|
|
404
|
+
}, ut = /* @__PURE__ */ new Map(), ni = /* @__PURE__ */ Object.assign({ "../../json/ar.json": () => import("./ar-CJhBAgKq.js"), "../../json/bg.json": () => import("./bg-JvP4LoOT.js"), "../../json/bho.json": () => import("./bho-CpuLBMN3.js"), "../../json/bn.json": () => import("./bn-84u93pMd.js"), "../../json/ca.json": () => import("./ca-DdScTbex.js"), "../../json/cmn.json": () => import("./cmn-Dd1zrvTE.js"), "../../json/cs.json": () => import("./cs-CDMne0uc.js"), "../../json/da.json": () => import("./da-oFf4cHgj.js"), "../../json/de.json": () => import("./de-Bjgc3bVq.js"), "../../json/el.json": () => import("./el-FkKIcghI.js"), "../../json/en.json": () => import("./en-BELFJRDQ.js"), "../../json/es.json": () => import("./es-nAmbEkcR.js"), "../../json/eu.json": () => import("./eu-DxWirHU-.js"), "../../json/fa.json": () => import("./fa-CTVUniYi.js"), "../../json/fi.json": () => import("./fi-Do6QFzRv.js"), "../../json/fr.json": () => import("./fr-B5-P9o29.js"), "../../json/gl.json": () => import("./gl-DqSXeC_F.js"), "../../json/he.json": () => import("./he-CpyNwgaH.js"), "../../json/hi.json": () => import("./hi-CeOBacbl.js"), "../../json/hr.json": () => import("./hr-CSpU18l6.js"), "../../json/hu.json": () => import("./hu-oONHmpR6.js"), "../../json/id.json": () => import("./id-BpZuB5Iw.js"), "../../json/it.json": () => import("./it-CM4X84UA.js"), "../../json/ja.json": () => import("./ja-e-iw3c4_.js"), "../../json/kk.json": () => import("./kk-BdLCAb2s.js"), "../../json/kn.json": () => import("./kn-BYRvouO5.js"), "../../json/ko.json": () => import("./ko-EIouMDK1.js"), "../../json/mr.json": () => import("./mr-DN-hwEV1.js"), "../../json/ms.json": () => import("./ms-B5E3oaWE.js"), "../../json/nb.json": () => import("./nb-DOw05HBh.js"), "../../json/nl.json": () => import("./nl-CEydw4A9.js"), "../../json/pl.json": () => import("./pl-Ivj_eAP7.js"), "../../json/pt.json": () => import("./pt-BPEGqRmW.js"), "../../json/ro.json": () => import("./ro-BQ617SOx.js"), "../../json/ru.json": () => import("./ru-Dieeph4H.js"), "../../json/sk.json": () => import("./sk-pEiOt4GQ.js"), "../../json/sl.json": () => import("./sl-Z6jWAR8J.js"), "../../json/sv.json": () => import("./sv-BT09piiZ.js"), "../../json/ta.json": () => import("./ta-B0YMGW5q.js"), "../../json/te.json": () => import("./te-ax-HNsAY.js"), "../../json/th.json": () => import("./th-C7Dbxwoz.js"), "../../json/tr.json": () => import("./tr-mipEichO.js"), "../../json/uk.json": () => import("./uk-CHdx7DHz.js"), "../../json/vi.json": () => import("./vi-DrlcEwAD.js"), "../../json/wuu.json": () => import("./wuu-C6uQvT6g.js"), "../../json/yue.json": () => import("./yue-CFroa59o.js") });
|
|
405
405
|
async function ri(t) {
|
|
406
406
|
try {
|
|
407
407
|
const e = t.split("-")[0], n = ni[`../../json/${e}.json`];
|
|
@@ -422,7 +422,7 @@ async function ri(t) {
|
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
function dn(t) {
|
|
425
|
-
return
|
|
425
|
+
return ut.has(t) || ut.set(t, ri(t)), ut.get(t);
|
|
426
426
|
}
|
|
427
427
|
const ii = ["veryLow", "low", "normal", "high", "veryHigh"], si = ["android", "apple"], ai = (t) => ({
|
|
428
428
|
...t,
|
|
@@ -448,7 +448,7 @@ const ii = ["veryLow", "low", "normal", "high", "veryHigh"], si = ["android", "a
|
|
|
448
448
|
e = `${n.toLowerCase()}-${r.toUpperCase()}`;
|
|
449
449
|
}
|
|
450
450
|
return Oe[e] || e;
|
|
451
|
-
},
|
|
451
|
+
}, Rt = async (t) => {
|
|
452
452
|
if (!t) return [];
|
|
453
453
|
try {
|
|
454
454
|
const e = D(t);
|
|
@@ -548,7 +548,7 @@ async function $e(t) {
|
|
|
548
548
|
}
|
|
549
549
|
const n = /* @__PURE__ */ new Map();
|
|
550
550
|
for (const [r, i] of e.entries()) {
|
|
551
|
-
const s = /* @__PURE__ */ new Map(), o = await
|
|
551
|
+
const s = /* @__PURE__ */ new Map(), o = await Rt(r), a = /* @__PURE__ */ new Map();
|
|
552
552
|
o.forEach((c, l) => {
|
|
553
553
|
a.set(c.name.toLowerCase(), l), c.altNames?.forEach((d) => {
|
|
554
554
|
a.set(d.toLowerCase(), l);
|
|
@@ -566,21 +566,21 @@ const oi = [{ name: "Albert", nativeID: ["com.apple.speech.synthesis.voice.Alber
|
|
|
566
566
|
voices: oi
|
|
567
567
|
}, ci = [{ name: "Eddy", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Flo", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Grandma", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Grandpa", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Jacques", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Reed", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Rocko", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Sandy", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Shelley", localizedName: "apple", note: "Eloquence voices are preloaded by default on Apple devices.", language: "en-US", otherLanguages: ["en-GB", "de-DE", "fr-FR", "fr-CA", "es-ES", "es-MX", "fi-FI", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-HK"], os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Fred", language: "en-US", os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Junior", language: "en-US", os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Kathy", language: "en-US", os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "Ralph", language: "en-US", os: ["macOS", "iOS", "iPadOS"], preloaded: !0 }, { name: "eSpeak Arabic", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ar", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Bulgarian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "bg", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Bengali", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "bn", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Catalan", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ca", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Chinese (Mandarin, latin as English)", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "cmn", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Czech", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "cs", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Danish", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "da", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak German", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "de", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Greek", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "el", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Spanish (Spain)", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "es", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Estonian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "et", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Finnish", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "fi", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Gujarati", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "gu", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Croatian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "hr", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Hungarian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "hu", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Indonesian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "id", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Italian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "it", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Kannada", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "kn", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Korean", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ko", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Lithuanian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "lt", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Latvian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "lv", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Malayalm", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ml", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Marathi", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "mr", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Malay", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ms", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Norwegian Bokmål", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "nb", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Polish", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "pl", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Portuguese (Brazil)", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "pt-br", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Romanian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ro", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Russian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ru", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Slovak", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "sk", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Slovenian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "sl", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Serbian", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "sv", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Swedish", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "sv", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Swahili", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "sw", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Tamil", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "ta", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Telugu", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "te", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Turkish", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "tr", os: ["ChromeOS"], preloaded: !0 }, { name: "eSpeak Vietnamese (Northern)", note: "eSpeak voices are preloaded by default on Chrome OS.", language: "vi", os: ["ChromeOS"], preloaded: !0 }], ui = {
|
|
568
568
|
voices: ci
|
|
569
|
-
}, hi = li, di = ui,
|
|
569
|
+
}, hi = li, di = ui, Nt = (t, e) => hi.voices.some(
|
|
570
570
|
(n) => t.includes(n.name) || e && n.nativeID?.some((r) => e.includes(r)) || n.altNames?.some((r) => t.includes(r))
|
|
571
571
|
), It = (t, e) => di.voices.some(
|
|
572
572
|
(n) => t.includes(n.name)
|
|
573
|
-
) || e === "veryLow", pn = (t) => t?.length ? t.filter((e) => !(e.isNovelty ||
|
|
573
|
+
) || e === "veryLow", pn = (t) => t?.length ? t.filter((e) => !(e.isNovelty || Nt(e.name, e.voiceURI))) : [], mn = (t) => t?.length ? t.filter((e) => !It(e.name, e.quality)) : [], gi = { ar: { normal: "محسن", high: "استثنائي" }, ca: { normal: "millorada", high: "prèmium" }, "cmn-CN": { normal: "优化音质", high: "高音质" }, "cmn-TW": { normal: "增強音質", high: "高音質" }, cs: { normal: "vylepšená verze", high: "prémiový" }, da: { normal: "forbedret", high: "høj kvalitet" }, de: { normal: "erweitert", high: "premium" }, el: { normal: "βελτιωμένη", high: "υψηλής ποιότητας" }, en: { normal: "Enhanced", high: "Premium" }, es: { normal: "mejorada", high: "premium" }, fi: { normal: "parannettu", high: "korkealaatuinen" }, fr: { normal: "premium", high: "de qualité" }, he: { normal: "משופר", high: "פרימיום" }, hi: { normal: "बेहतर", high: "प्रीमियम" }, hr: { normal: "poboljšani", high: "vrhunski" }, hu: { normal: "továbbfejlesztett", high: "prémium" }, id: { normal: "Ditingkatkan", high: "Premium" }, it: { normal: "ottimizzata", high: "premium" }, ja: { normal: "拡張", high: "プレミアム" }, ko: { normal: "고품질", high: "프리미엄" }, ms: { normal: "Dipertingkat", high: "Premium" }, nb: { normal: "forbedret", high: "premium" }, nl: { normal: "verbeterd", high: "premium" }, pl: { normal: "rozszerzony", high: "premium" }, pt: { normal: "melhorada", high: "premium" }, ro: { normal: "îmbunătățită", high: "premium" }, ru: { normal: "улучшенный", high: "высшее качество" }, sk: { normal: "vylepšený", high: "prémiový" }, sl: { normal: "izboljšano", high: "prvovrsten" }, sv: { normal: "förbättrad", high: "premium" }, th: { normal: "คุณภาพสูง", high: "คุณภาพสูง" }, tr: { normal: "Geliştirilmiş", high: "Yüksek Kaliteli" }, uk: { normal: "вдосконалений", high: "високої якості" }, vi: { normal: "Nâng cao", high: "Cao cấp" } }, fi = {
|
|
574
574
|
quality: gi
|
|
575
|
-
},
|
|
575
|
+
}, Lt = {
|
|
576
576
|
apple: fi.quality
|
|
577
577
|
// android: androidQualities.quality
|
|
578
578
|
}, pi = (t, e, n) => {
|
|
579
579
|
if (!t) return;
|
|
580
580
|
const r = Array.isArray(n) ? n : n ? [n] : [];
|
|
581
581
|
for (const i of r)
|
|
582
|
-
if (i &&
|
|
583
|
-
const s =
|
|
582
|
+
if (i && Lt[i]) {
|
|
583
|
+
const s = Lt[i], o = U(e)[0], a = s[e] || s[o];
|
|
584
584
|
if (a) {
|
|
585
585
|
const c = t.toLowerCase(), { normal: l, high: d } = a;
|
|
586
586
|
if (d && c.includes(d.toLowerCase()))
|
|
@@ -590,7 +590,7 @@ const oi = [{ name: "Albert", nativeID: ["com.apple.speech.synthesis.voice.Alber
|
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
}, mi = (t, e) => {
|
|
593
|
-
const n =
|
|
593
|
+
const n = Lt[e];
|
|
594
594
|
if (n)
|
|
595
595
|
for (const [r, { high: i, normal: s }] of Object.entries(n)) {
|
|
596
596
|
const o = i && t.some((c) => c.includes(i)), a = s && t.some((c) => c.includes(s));
|
|
@@ -962,8 +962,8 @@ class k {
|
|
|
962
962
|
return await Promise.all(
|
|
963
963
|
e.filter((i) => i?.name && i?.lang).map(async (i) => {
|
|
964
964
|
const s = D(i.lang), [o] = k.extractLangRegionFromBCP47(s), a = this.normalizeVoiceName(i.name), c = `${i.lang.toLowerCase()}_${a}`, l = n.get(c) || 1;
|
|
965
|
-
let d = await
|
|
966
|
-
(!d || d.length === 0) && (d = await
|
|
965
|
+
let d = await Rt(s);
|
|
966
|
+
(!d || d.length === 0) && (d = await Rt(o));
|
|
967
967
|
const u = this.findMatchingJsonVoice(d, a), g = this.inferVoiceQuality(i, u, l);
|
|
968
968
|
return u ? {
|
|
969
969
|
...u,
|
|
@@ -975,7 +975,7 @@ class k {
|
|
|
975
975
|
quality: g,
|
|
976
976
|
isDefault: i.default || !1,
|
|
977
977
|
offlineAvailability: i.localService || !1,
|
|
978
|
-
isNovelty:
|
|
978
|
+
isNovelty: Nt(i.name, i.voiceURI),
|
|
979
979
|
isLowQuality: It(i.name, g)
|
|
980
980
|
} : {
|
|
981
981
|
source: "browser",
|
|
@@ -987,7 +987,7 @@ class k {
|
|
|
987
987
|
quality: g,
|
|
988
988
|
isDefault: i.default || !1,
|
|
989
989
|
offlineAvailability: i.localService || !1,
|
|
990
|
-
isNovelty:
|
|
990
|
+
isNovelty: Nt(i.name, i.voiceURI),
|
|
991
991
|
isLowQuality: It(i.name, g)
|
|
992
992
|
};
|
|
993
993
|
})
|
|
@@ -1258,7 +1258,7 @@ const wi = ["webKit", "moz", "ms", "o"], Si = [
|
|
|
1258
1258
|
const r = `on${n}`;
|
|
1259
1259
|
t[r] = e && t.speechSynthesisUtterance ? be(t.speechSynthesisUtterance.prototype, r) : !1;
|
|
1260
1260
|
}), t;
|
|
1261
|
-
},
|
|
1261
|
+
}, Ai = () => {
|
|
1262
1262
|
const e = typeof window < "u" && (window.navigator || {}).userAgent || "", n = () => /android/i.test(e), r = () => /kaios/i.test(e), i = () => typeof window.InstallTrigger < "u" ? !0 : /firefox/i.test(e), s = () => typeof window.GestureEvent < "u" || /safari/i.test(e);
|
|
1263
1263
|
return {
|
|
1264
1264
|
isAndroid: n(),
|
|
@@ -1267,13 +1267,13 @@ const wi = ["webKit", "moz", "ms", "o"], Si = [
|
|
|
1267
1267
|
isKaiOS: r()
|
|
1268
1268
|
};
|
|
1269
1269
|
};
|
|
1270
|
-
function
|
|
1270
|
+
function Oi(t) {
|
|
1271
1271
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1272
1272
|
}
|
|
1273
|
-
var
|
|
1273
|
+
var ht, bn;
|
|
1274
1274
|
function Ti() {
|
|
1275
|
-
if (bn) return
|
|
1276
|
-
bn = 1,
|
|
1275
|
+
if (bn) return ht;
|
|
1276
|
+
bn = 1, ht = e;
|
|
1277
1277
|
function t(r) {
|
|
1278
1278
|
return r instanceof Buffer ? Buffer.from(r) : new r.constructor(r.buffer.slice(), r.byteOffset, r.length);
|
|
1279
1279
|
}
|
|
@@ -1389,32 +1389,32 @@ function Ti() {
|
|
|
1389
1389
|
return i.pop(), s.pop(), g;
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
|
-
return
|
|
1392
|
+
return ht;
|
|
1393
1393
|
}
|
|
1394
1394
|
var Ri = Ti();
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
-
function
|
|
1395
|
+
const lr = /* @__PURE__ */ Oi(Ri);
|
|
1396
|
+
lr();
|
|
1397
|
+
function Pt(t) {
|
|
1398
1398
|
if (t == null || typeof t != "object") return !1;
|
|
1399
1399
|
let e = Object.getPrototypeOf(t);
|
|
1400
1400
|
return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null ? !1 : !(Symbol.iterator in t) && !(Symbol.toStringTag in t);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function ne(t) {
|
|
1403
1403
|
return typeof t == "string";
|
|
1404
1404
|
}
|
|
1405
1405
|
function Ni(t) {
|
|
1406
1406
|
return Number.isFinite(t);
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function Y(t) {
|
|
1409
1409
|
return Number.isSafeInteger(t) && t >= 0;
|
|
1410
1410
|
}
|
|
1411
1411
|
function G(t) {
|
|
1412
1412
|
return t != null;
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1414
|
+
function Ii(t, e) {
|
|
1415
|
+
return Pt(t) && ne(e) && e in t;
|
|
1416
1416
|
}
|
|
1417
|
-
var
|
|
1417
|
+
var Li = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis, Pi = typeof self == "object" && self && self.Object === Object && self, Gt = Li || Pi || Function("return this")(), ue = Gt.Symbol, cr = Object.prototype, qi = cr.hasOwnProperty, $i = cr.toString, ve = ue ? ue.toStringTag : void 0;
|
|
1418
1418
|
function Di(t) {
|
|
1419
1419
|
var e = qi.call(t, ve), n = t[ve];
|
|
1420
1420
|
try {
|
|
@@ -1430,15 +1430,15 @@ function Ui(t) {
|
|
|
1430
1430
|
return Bi.call(t);
|
|
1431
1431
|
}
|
|
1432
1432
|
var zi = "[object Null]", ji = "[object Undefined]", vn = ue ? ue.toStringTag : void 0;
|
|
1433
|
-
function
|
|
1433
|
+
function ur(t) {
|
|
1434
1434
|
return t == null ? t === void 0 ? ji : zi : vn && vn in Object(t) ? Di(t) : Ui(t);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function hr(t) {
|
|
1437
1437
|
return t != null && typeof t == "object";
|
|
1438
1438
|
}
|
|
1439
1439
|
var Vi = "[object Symbol]";
|
|
1440
1440
|
function Fi(t) {
|
|
1441
|
-
return typeof t == "symbol" ||
|
|
1441
|
+
return typeof t == "symbol" || hr(t) && ur(t) == Vi;
|
|
1442
1442
|
}
|
|
1443
1443
|
function Hi(t, e) {
|
|
1444
1444
|
for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
|
|
@@ -1446,11 +1446,11 @@ function Hi(t, e) {
|
|
|
1446
1446
|
return i;
|
|
1447
1447
|
}
|
|
1448
1448
|
var Mi = Array.isArray, wn = ue ? ue.prototype : void 0, Sn = wn ? wn.toString : void 0;
|
|
1449
|
-
function
|
|
1449
|
+
function Wt(t) {
|
|
1450
1450
|
if (typeof t == "string")
|
|
1451
1451
|
return t;
|
|
1452
1452
|
if (Mi(t))
|
|
1453
|
-
return Hi(t,
|
|
1453
|
+
return Hi(t, Wt) + "";
|
|
1454
1454
|
if (Fi(t))
|
|
1455
1455
|
return Sn ? Sn.call(t) : "";
|
|
1456
1456
|
var e = t + "";
|
|
@@ -1466,22 +1466,22 @@ var Ki = /^\s+/;
|
|
|
1466
1466
|
function Ji(t) {
|
|
1467
1467
|
return t && t.slice(0, Wi(t) + 1).replace(Ki, "");
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function dr(t) {
|
|
1470
1470
|
var e = typeof t;
|
|
1471
1471
|
return t != null && (e == "object" || e == "function");
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function gr(t) {
|
|
1474
1474
|
return t;
|
|
1475
1475
|
}
|
|
1476
1476
|
var Qi = "[object AsyncFunction]", Xi = "[object Function]", Zi = "[object GeneratorFunction]", Yi = "[object Proxy]";
|
|
1477
|
-
function
|
|
1478
|
-
if (!
|
|
1477
|
+
function fr(t) {
|
|
1478
|
+
if (!dr(t))
|
|
1479
1479
|
return !1;
|
|
1480
|
-
var e =
|
|
1480
|
+
var e = ur(t);
|
|
1481
1481
|
return e == Xi || e == Zi || e == Qi || e == Yi;
|
|
1482
1482
|
}
|
|
1483
|
-
var
|
|
1484
|
-
var t = /[^.]+$/.exec(
|
|
1483
|
+
var dt = Gt["__core-js_shared__"], xn = (function() {
|
|
1484
|
+
var t = /[^.]+$/.exec(dt && dt.keys && dt.keys.IE_PROTO || "");
|
|
1485
1485
|
return t ? "Symbol(src)_1." + t : "";
|
|
1486
1486
|
})();
|
|
1487
1487
|
function es(t) {
|
|
@@ -1505,15 +1505,15 @@ var is = /[\\^$.*+?()[\]{}|]/g, ss = /^\[object .+?Constructor\]$/, as = Functio
|
|
|
1505
1505
|
"^" + ls.call(cs).replace(is, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1506
1506
|
);
|
|
1507
1507
|
function hs(t) {
|
|
1508
|
-
if (!
|
|
1508
|
+
if (!dr(t) || es(t))
|
|
1509
1509
|
return !1;
|
|
1510
|
-
var e =
|
|
1510
|
+
var e = fr(t) ? us : ss;
|
|
1511
1511
|
return e.test(rs(t));
|
|
1512
1512
|
}
|
|
1513
1513
|
function ds(t, e) {
|
|
1514
1514
|
return t?.[e];
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Kt(t, e) {
|
|
1517
1517
|
var n = ds(t, e);
|
|
1518
1518
|
return hs(n) ? n : void 0;
|
|
1519
1519
|
}
|
|
@@ -1550,7 +1550,7 @@ function bs(t) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
var kn = (function() {
|
|
1552
1552
|
try {
|
|
1553
|
-
var t =
|
|
1553
|
+
var t = Kt(Object, "defineProperty");
|
|
1554
1554
|
return t({}, "", {}), t;
|
|
1555
1555
|
} catch {
|
|
1556
1556
|
}
|
|
@@ -1561,7 +1561,7 @@ var kn = (function() {
|
|
|
1561
1561
|
value: bs(e),
|
|
1562
1562
|
writable: !0
|
|
1563
1563
|
});
|
|
1564
|
-
} :
|
|
1564
|
+
} : gr, ws = ys(vs);
|
|
1565
1565
|
function Ss(t, e, n, r) {
|
|
1566
1566
|
for (var i = t.length, s = n + -1; ++s < i; )
|
|
1567
1567
|
if (e(t[s], s, t))
|
|
@@ -1577,18 +1577,18 @@ function ks(t, e, n) {
|
|
|
1577
1577
|
return r;
|
|
1578
1578
|
return -1;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Jt(t, e, n) {
|
|
1581
1581
|
return e === e ? ks(t, e, n) : Ss(t, xs, n);
|
|
1582
1582
|
}
|
|
1583
1583
|
function Cs(t, e) {
|
|
1584
1584
|
var n = t == null ? 0 : t.length;
|
|
1585
|
-
return !!n &&
|
|
1585
|
+
return !!n && Jt(t, e, 0) > -1;
|
|
1586
1586
|
}
|
|
1587
1587
|
function Es(t, e) {
|
|
1588
1588
|
return t === e || t !== t && e !== e;
|
|
1589
1589
|
}
|
|
1590
1590
|
var Cn = Math.max;
|
|
1591
|
-
function
|
|
1591
|
+
function As(t, e, n) {
|
|
1592
1592
|
return e = Cn(e === void 0 ? t.length - 1 : e, 0), function() {
|
|
1593
1593
|
for (var r = arguments, i = -1, s = Cn(r.length - e, 0), o = Array(s); ++i < s; )
|
|
1594
1594
|
o[i] = r[e + i];
|
|
@@ -1598,28 +1598,28 @@ function Os(t, e, n) {
|
|
|
1598
1598
|
return a[e] = n(o), gs(t, this, a);
|
|
1599
1599
|
};
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1602
|
-
return ws(
|
|
1601
|
+
function Os(t, e) {
|
|
1602
|
+
return ws(As(t, e, gr), t + "");
|
|
1603
1603
|
}
|
|
1604
1604
|
var Ts = 9007199254740991;
|
|
1605
1605
|
function Rs(t) {
|
|
1606
1606
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ts;
|
|
1607
1607
|
}
|
|
1608
1608
|
function Ns(t) {
|
|
1609
|
-
return t != null && Rs(t.length) && !
|
|
1609
|
+
return t != null && Rs(t.length) && !fr(t);
|
|
1610
1610
|
}
|
|
1611
|
-
var
|
|
1612
|
-
function
|
|
1613
|
-
this.__data__ =
|
|
1611
|
+
var Te = Kt(Object, "create");
|
|
1612
|
+
function Is() {
|
|
1613
|
+
this.__data__ = Te ? Te(null) : {}, this.size = 0;
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function Ls(t) {
|
|
1616
1616
|
var e = this.has(t) && delete this.__data__[t];
|
|
1617
1617
|
return this.size -= e ? 1 : 0, e;
|
|
1618
1618
|
}
|
|
1619
1619
|
var Ps = "__lodash_hash_undefined__", qs = Object.prototype, $s = qs.hasOwnProperty;
|
|
1620
1620
|
function Ds(t) {
|
|
1621
1621
|
var e = this.__data__;
|
|
1622
|
-
if (
|
|
1622
|
+
if (Te) {
|
|
1623
1623
|
var n = e[t];
|
|
1624
1624
|
return n === Ps ? void 0 : n;
|
|
1625
1625
|
}
|
|
@@ -1628,29 +1628,29 @@ function Ds(t) {
|
|
|
1628
1628
|
var _s = Object.prototype, Bs = _s.hasOwnProperty;
|
|
1629
1629
|
function Us(t) {
|
|
1630
1630
|
var e = this.__data__;
|
|
1631
|
-
return
|
|
1631
|
+
return Te ? e[t] !== void 0 : Bs.call(e, t);
|
|
1632
1632
|
}
|
|
1633
1633
|
var zs = "__lodash_hash_undefined__";
|
|
1634
1634
|
function js(t, e) {
|
|
1635
1635
|
var n = this.__data__;
|
|
1636
|
-
return this.size += this.has(t) ? 0 : 1, n[t] =
|
|
1636
|
+
return this.size += this.has(t) ? 0 : 1, n[t] = Te && e === void 0 ? zs : e, this;
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function Q(t) {
|
|
1639
1639
|
var e = -1, n = t == null ? 0 : t.length;
|
|
1640
1640
|
for (this.clear(); ++e < n; ) {
|
|
1641
1641
|
var r = t[e];
|
|
1642
1642
|
this.set(r[0], r[1]);
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1645
|
+
Q.prototype.clear = Is;
|
|
1646
|
+
Q.prototype.delete = Ls;
|
|
1647
|
+
Q.prototype.get = Ds;
|
|
1648
|
+
Q.prototype.has = Us;
|
|
1649
|
+
Q.prototype.set = js;
|
|
1650
1650
|
function Vs() {
|
|
1651
1651
|
this.__data__ = [], this.size = 0;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function st(t, e) {
|
|
1654
1654
|
for (var n = t.length; n--; )
|
|
1655
1655
|
if (Es(t[n][0], e))
|
|
1656
1656
|
return n;
|
|
@@ -1658,21 +1658,21 @@ function at(t, e) {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
var Fs = Array.prototype, Hs = Fs.splice;
|
|
1660
1660
|
function Ms(t) {
|
|
1661
|
-
var e = this.__data__, n =
|
|
1661
|
+
var e = this.__data__, n = st(e, t);
|
|
1662
1662
|
if (n < 0)
|
|
1663
1663
|
return !1;
|
|
1664
1664
|
var r = e.length - 1;
|
|
1665
1665
|
return n == r ? e.pop() : Hs.call(e, n, 1), --this.size, !0;
|
|
1666
1666
|
}
|
|
1667
1667
|
function Gs(t) {
|
|
1668
|
-
var e = this.__data__, n =
|
|
1668
|
+
var e = this.__data__, n = st(e, t);
|
|
1669
1669
|
return n < 0 ? void 0 : e[n][1];
|
|
1670
1670
|
}
|
|
1671
1671
|
function Ws(t) {
|
|
1672
|
-
return
|
|
1672
|
+
return st(this.__data__, t) > -1;
|
|
1673
1673
|
}
|
|
1674
1674
|
function Ks(t, e) {
|
|
1675
|
-
var n = this.__data__, r =
|
|
1675
|
+
var n = this.__data__, r = st(n, t);
|
|
1676
1676
|
return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
|
|
1677
1677
|
}
|
|
1678
1678
|
function ge(t) {
|
|
@@ -1687,34 +1687,34 @@ ge.prototype.delete = Ms;
|
|
|
1687
1687
|
ge.prototype.get = Gs;
|
|
1688
1688
|
ge.prototype.has = Ws;
|
|
1689
1689
|
ge.prototype.set = Ks;
|
|
1690
|
-
var Js =
|
|
1690
|
+
var Js = Kt(Gt, "Map");
|
|
1691
1691
|
function Qs() {
|
|
1692
1692
|
this.size = 0, this.__data__ = {
|
|
1693
|
-
hash: new
|
|
1693
|
+
hash: new Q(),
|
|
1694
1694
|
map: new (Js || ge)(),
|
|
1695
|
-
string: new
|
|
1695
|
+
string: new Q()
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
1698
|
function Xs(t) {
|
|
1699
1699
|
var e = typeof t;
|
|
1700
1700
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function at(t, e) {
|
|
1703
1703
|
var n = t.__data__;
|
|
1704
1704
|
return Xs(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
1705
1705
|
}
|
|
1706
1706
|
function Zs(t) {
|
|
1707
|
-
var e =
|
|
1707
|
+
var e = at(this, t).delete(t);
|
|
1708
1708
|
return this.size -= e ? 1 : 0, e;
|
|
1709
1709
|
}
|
|
1710
1710
|
function Ys(t) {
|
|
1711
|
-
return
|
|
1711
|
+
return at(this, t).get(t);
|
|
1712
1712
|
}
|
|
1713
1713
|
function ea(t) {
|
|
1714
|
-
return
|
|
1714
|
+
return at(this, t).has(t);
|
|
1715
1715
|
}
|
|
1716
1716
|
function ta(t, e) {
|
|
1717
|
-
var n =
|
|
1717
|
+
var n = at(this, t), r = n.size;
|
|
1718
1718
|
return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
|
|
1719
1719
|
}
|
|
1720
1720
|
function fe(t) {
|
|
@@ -1730,7 +1730,7 @@ fe.prototype.get = Ys;
|
|
|
1730
1730
|
fe.prototype.has = ea;
|
|
1731
1731
|
fe.prototype.set = ta;
|
|
1732
1732
|
function na(t) {
|
|
1733
|
-
return t == null ? "" :
|
|
1733
|
+
return t == null ? "" : Wt(t);
|
|
1734
1734
|
}
|
|
1735
1735
|
function ra(t, e, n) {
|
|
1736
1736
|
var r = -1, i = t.length;
|
|
@@ -1750,12 +1750,12 @@ function ga(t) {
|
|
|
1750
1750
|
function fa(t) {
|
|
1751
1751
|
return t.split("");
|
|
1752
1752
|
}
|
|
1753
|
-
var
|
|
1754
|
-
function
|
|
1755
|
-
return t.match(
|
|
1753
|
+
var pr = "\\ud800-\\udfff", pa = "\\u0300-\\u036f", ma = "\\ufe20-\\ufe2f", ya = "\\u20d0-\\u20ff", ba = pa + ma + ya, va = "\\ufe0e\\ufe0f", wa = "[" + pr + "]", qt = "[" + ba + "]", $t = "\\ud83c[\\udffb-\\udfff]", Sa = "(?:" + qt + "|" + $t + ")", mr = "[^" + pr + "]", yr = "(?:\\ud83c[\\udde6-\\uddff]){2}", br = "[\\ud800-\\udbff][\\udc00-\\udfff]", xa = "\\u200d", vr = Sa + "?", wr = "[" + va + "]?", ka = "(?:" + xa + "(?:" + [mr, yr, br].join("|") + ")" + wr + vr + ")*", Ca = wr + vr + ka, Ea = "(?:" + [mr + qt + "?", qt, yr, br, wa].join("|") + ")", Aa = RegExp($t + "(?=" + $t + ")|" + Ea + Ca, "g");
|
|
1754
|
+
function Oa(t) {
|
|
1755
|
+
return t.match(Aa) || [];
|
|
1756
1756
|
}
|
|
1757
1757
|
function En(t) {
|
|
1758
|
-
return ga(t) ?
|
|
1758
|
+
return ga(t) ? Oa(t) : fa(t);
|
|
1759
1759
|
}
|
|
1760
1760
|
var Ta = "__lodash_hash_undefined__";
|
|
1761
1761
|
function Ra(t) {
|
|
@@ -1764,25 +1764,25 @@ function Ra(t) {
|
|
|
1764
1764
|
function Na(t) {
|
|
1765
1765
|
return this.__data__.has(t);
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function Ke(t) {
|
|
1768
1768
|
var e = -1, n = t == null ? 0 : t.length;
|
|
1769
1769
|
for (this.__data__ = new fe(); ++e < n; )
|
|
1770
1770
|
this.add(t[e]);
|
|
1771
1771
|
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
function
|
|
1772
|
+
Ke.prototype.add = Ke.prototype.push = Ra;
|
|
1773
|
+
Ke.prototype.has = Na;
|
|
1774
|
+
function Ia(t, e) {
|
|
1775
1775
|
return t.has(e);
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1778
|
-
return
|
|
1777
|
+
function La(t) {
|
|
1778
|
+
return hr(t) && Ns(t);
|
|
1779
1779
|
}
|
|
1780
1780
|
var Pa = 200;
|
|
1781
1781
|
function qa(t, e, n, r) {
|
|
1782
1782
|
var i = -1, s = Cs, o = !0, a = t.length, c = [], l = e.length;
|
|
1783
1783
|
if (!a)
|
|
1784
1784
|
return c;
|
|
1785
|
-
e.length >= Pa && (s =
|
|
1785
|
+
e.length >= Pa && (s = Ia, o = !1, e = new Ke(e));
|
|
1786
1786
|
e:
|
|
1787
1787
|
for (; ++i < a; ) {
|
|
1788
1788
|
var d = t[i], u = d;
|
|
@@ -1796,35 +1796,35 @@ function qa(t, e, n, r) {
|
|
|
1796
1796
|
return c;
|
|
1797
1797
|
}
|
|
1798
1798
|
function $a(t, e) {
|
|
1799
|
-
for (var n = t.length; n-- &&
|
|
1799
|
+
for (var n = t.length; n-- && Jt(e, t[n], 0) > -1; )
|
|
1800
1800
|
;
|
|
1801
1801
|
return n;
|
|
1802
1802
|
}
|
|
1803
1803
|
function Da(t, e) {
|
|
1804
|
-
for (var n = -1, r = t.length; ++n < r &&
|
|
1804
|
+
for (var n = -1, r = t.length; ++n < r && Jt(e, t[n], 0) > -1; )
|
|
1805
1805
|
;
|
|
1806
1806
|
return n;
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function An(t, e, n) {
|
|
1809
1809
|
if (t = na(t), t && e === void 0)
|
|
1810
1810
|
return Ji(t);
|
|
1811
|
-
if (!t || !(e =
|
|
1811
|
+
if (!t || !(e = Wt(e)))
|
|
1812
1812
|
return t;
|
|
1813
1813
|
var r = En(t), i = En(e), s = Da(r, i), o = $a(r, i) + 1;
|
|
1814
1814
|
return ia(r, s, o).join("");
|
|
1815
1815
|
}
|
|
1816
|
-
var _a =
|
|
1817
|
-
return
|
|
1818
|
-
}),
|
|
1819
|
-
return
|
|
1816
|
+
var _a = Os(function(t, e) {
|
|
1817
|
+
return La(t) ? qa(t, e) : [];
|
|
1818
|
+
}), se = function() {
|
|
1819
|
+
return se = Object.assign || function(t) {
|
|
1820
1820
|
for (var e, n = 1, r = arguments.length; n < r; n++) {
|
|
1821
1821
|
e = arguments[n];
|
|
1822
1822
|
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
|
|
1823
1823
|
}
|
|
1824
1824
|
return t;
|
|
1825
|
-
},
|
|
1825
|
+
}, se.apply(this, arguments);
|
|
1826
1826
|
}, Ba = "~", Ua = "~~";
|
|
1827
|
-
function
|
|
1827
|
+
function Qt(t, e) {
|
|
1828
1828
|
for (var n = {}, r = {}, i = t.split(Ua), s = !1, o = 0; i.length > o; o++) {
|
|
1829
1829
|
for (var a = i[o].split(Ba), c = 0; c < a.length; c += 2) {
|
|
1830
1830
|
var l = a[c], d = a[c + 1], u = "&" + l + ";";
|
|
@@ -1832,16 +1832,16 @@ function Xt(t, e) {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
s = !0;
|
|
1834
1834
|
}
|
|
1835
|
-
return e ? { entities:
|
|
1835
|
+
return e ? { entities: se(se({}, n), e.entities), characters: se(se({}, r), e.characters) } : { entities: n, characters: r };
|
|
1836
1836
|
}
|
|
1837
|
-
var
|
|
1837
|
+
var gt = {
|
|
1838
1838
|
xml: /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
1839
1839
|
html4: /∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
1840
1840
|
html5: /·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g
|
|
1841
1841
|
}, he = {};
|
|
1842
|
-
he.xml =
|
|
1843
|
-
he.html4 =
|
|
1844
|
-
he.html5 = Xt('Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~~InvisibleTimes~~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~~NegativeThickSpace~~NegativeThinSpace~~NegativeVeryThinSpace~~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~ ~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~ ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~"~REG~®', he.html4);
|
|
1842
|
+
he.xml = Qt(`lt~<~gt~>~quot~"~apos~'~amp~&`);
|
|
1843
|
+
he.html4 = Qt(`apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~~zwj~~lrm~~rlm~~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~"~amp~&~lt~<~gt~>`);
|
|
1844
|
+
he.html5 = Qt('Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~~InvisibleTimes~~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~~NegativeThickSpace~~NegativeThinSpace~~NegativeVeryThinSpace~~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~ ~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~ ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~"~REG~®', he.html4);
|
|
1845
1845
|
var za = {
|
|
1846
1846
|
0: 65533,
|
|
1847
1847
|
128: 8364,
|
|
@@ -1884,23 +1884,23 @@ var za = {
|
|
|
1884
1884
|
}, Va = de(de({}, he), { all: he.html5 }), Fa = {
|
|
1885
1885
|
scope: "body",
|
|
1886
1886
|
level: "all"
|
|
1887
|
-
},
|
|
1887
|
+
}, ft = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g, pt = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g, On = {
|
|
1888
1888
|
xml: {
|
|
1889
|
-
strict:
|
|
1890
|
-
attribute:
|
|
1891
|
-
body:
|
|
1889
|
+
strict: ft,
|
|
1890
|
+
attribute: pt,
|
|
1891
|
+
body: gt.xml
|
|
1892
1892
|
},
|
|
1893
1893
|
html4: {
|
|
1894
|
-
strict:
|
|
1895
|
-
attribute:
|
|
1896
|
-
body:
|
|
1894
|
+
strict: ft,
|
|
1895
|
+
attribute: pt,
|
|
1896
|
+
body: gt.html4
|
|
1897
1897
|
},
|
|
1898
1898
|
html5: {
|
|
1899
|
-
strict:
|
|
1900
|
-
attribute:
|
|
1901
|
-
body:
|
|
1899
|
+
strict: ft,
|
|
1900
|
+
attribute: pt,
|
|
1901
|
+
body: gt.html5
|
|
1902
1902
|
}
|
|
1903
|
-
}, Ha = de(de({},
|
|
1903
|
+
}, Ha = de(de({}, On), { all: On.html5 }), Sr = String.fromCharCode, Ma = Sr(65533);
|
|
1904
1904
|
function Ga(t, e, n, r) {
|
|
1905
1905
|
var i = t, s = t[t.length - 1];
|
|
1906
1906
|
if (n && s === "=")
|
|
@@ -1913,7 +1913,7 @@ function Ga(t, e, n, r) {
|
|
|
1913
1913
|
i = o;
|
|
1914
1914
|
else if (t[0] === "&" && t[1] === "#") {
|
|
1915
1915
|
var a = t[2], c = a == "x" || a == "X" ? parseInt(t.substr(3), 16) : parseInt(t.substr(2));
|
|
1916
|
-
i = c >= 1114111 ? Ma : c > 65535 ? ja(c) :
|
|
1916
|
+
i = c >= 1114111 ? Ma : c > 65535 ? ja(c) : Sr(za[c] || c);
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
1919
|
return i;
|
|
@@ -1928,7 +1928,7 @@ function Tn(t, e) {
|
|
|
1928
1928
|
});
|
|
1929
1929
|
}
|
|
1930
1930
|
var Wa = { strictlyTwoElementsInRangeArrays: !1, progressFn: null };
|
|
1931
|
-
function
|
|
1931
|
+
function Je(t, e) {
|
|
1932
1932
|
if (!Array.isArray(t) || !t.length) return t;
|
|
1933
1933
|
let n = { ...Wa, ...e }, r, i;
|
|
1934
1934
|
if (n.strictlyTwoElementsInRangeArrays && !t.every((a, c) => !Array.isArray(a) || a.length !== 2 ? (r = c, i = a.length, !1) : !0)) throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${r}th range (${JSON.stringify(t[r], null, 4)}) has not two but ${i} elements!`);
|
|
@@ -1952,9 +1952,9 @@ function Ka(t, e) {
|
|
|
1952
1952
|
${JSON.stringify(e, null, 4)} (type ${typeof e})`);
|
|
1953
1953
|
else r = { ...Rn };
|
|
1954
1954
|
let i = t.filter((l) => Array.isArray(l)).map((l) => [...l]).filter((l) => l[2] !== void 0 || l[0] !== l[1]), s, o, a;
|
|
1955
|
-
r.progressFn ? s =
|
|
1955
|
+
r.progressFn ? s = Je(i, { progressFn: (l) => {
|
|
1956
1956
|
a = Math.floor(l / 5), a !== o && (o = a, r.progressFn(a));
|
|
1957
|
-
} }) : s =
|
|
1957
|
+
} }) : s = Je(i);
|
|
1958
1958
|
let c = s.length - 1;
|
|
1959
1959
|
for (let l = c; l > 0; l--) r.progressFn && (a = Math.floor((1 - l / c) * 78) + 21, a !== o && a > o && (o = a, r.progressFn(a))), (s[l][0] <= s[l - 1][0] || !r.joinRangesThatTouchEdges && s[l][0] < s[l - 1][1] || r.joinRangesThatTouchEdges && s[l][0] <= s[l - 1][1]) && (s[l - 1][0] = Math.min(s[l][0], s[l - 1][0]), s[l - 1][1] = Math.max(s[l][1], s[l - 1][1]), s[l][2] !== void 0 && (s[l - 1][0] >= s[l][0] || s[l - 1][1] <= s[l][1]) && s[l - 1][2] !== null && (s[l][2] === null && s[l - 1][2] !== null ? s[l - 1][2] = null : s[l - 1][2] != null ? +r.mergeType == 2 && s[l - 1][0] === s[l][0] ? s[l - 1][2] = s[l][2] : s[l - 1][2] += s[l][2] : s[l - 1][2] = s[l][2]), s.splice(l, 1), l = s.length);
|
|
1960
1960
|
return s.length ? s : null;
|
|
@@ -1998,7 +1998,7 @@ function Za(t, e, n) {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
return t;
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function mt(t, e = 1) {
|
|
2002
2002
|
let n = " ";
|
|
2003
2003
|
function r(s) {
|
|
2004
2004
|
return Array.from(s).reverse().join("");
|
|
@@ -2034,7 +2034,7 @@ function yt(t, e = 1) {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
return t;
|
|
2036
2036
|
}
|
|
2037
|
-
var
|
|
2037
|
+
var In = { mergeType: 1, progressFn: null, joinRangesThatTouchEdges: !0 };
|
|
2038
2038
|
function Ya(t, e) {
|
|
2039
2039
|
function n(l) {
|
|
2040
2040
|
return !!l && typeof l == "object" && !Array.isArray(l);
|
|
@@ -2042,17 +2042,17 @@ function Ya(t, e) {
|
|
|
2042
2042
|
if (!Array.isArray(t) || !t.length) return null;
|
|
2043
2043
|
let r;
|
|
2044
2044
|
if (e) if (n(e)) {
|
|
2045
|
-
if (r = { ...
|
|
2045
|
+
if (r = { ...In, ...e }, r.progressFn && n(r.progressFn) && !Object.keys(r.progressFn).length) r.progressFn = null;
|
|
2046
2046
|
else if (r.progressFn && typeof r.progressFn != "function") throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof r.progressFn}", equal to ${JSON.stringify(r.progressFn, null, 4)}`);
|
|
2047
2047
|
if (![1, 2, "1", "2"].includes(r.mergeType)) throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r.mergeType}", equal to ${JSON.stringify(r.mergeType, null, 4)}`);
|
|
2048
2048
|
if (typeof r.joinRangesThatTouchEdges != "boolean") throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof r.joinRangesThatTouchEdges}", equal to ${JSON.stringify(r.joinRangesThatTouchEdges, null, 4)}`);
|
|
2049
2049
|
} else throw new Error(`ranges-merge: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
2050
2050
|
${JSON.stringify(e, null, 4)} (type ${typeof e})`);
|
|
2051
|
-
else r = { ...
|
|
2051
|
+
else r = { ...In };
|
|
2052
2052
|
let i = t.filter((l) => Array.isArray(l)).map((l) => [...l]).filter((l) => l[2] !== void 0 || l[0] !== l[1]), s, o, a;
|
|
2053
|
-
r.progressFn ? s =
|
|
2053
|
+
r.progressFn ? s = Je(i, { progressFn: (l) => {
|
|
2054
2054
|
a = Math.floor(l / 5), a !== o && (o = a, r.progressFn != null && r.progressFn(a));
|
|
2055
|
-
} }) : s =
|
|
2055
|
+
} }) : s = Je(i);
|
|
2056
2056
|
let c = s.length - 1;
|
|
2057
2057
|
for (let l = c; l > 0; l--) r.progressFn && (a = Math.floor((1 - l / c) * 78) + 21, a !== o && a > o && (o = a, r.progressFn(a))), (s[l][0] <= s[l - 1][0] || !r.joinRangesThatTouchEdges && s[l][0] < s[l - 1][1] || r.joinRangesThatTouchEdges && s[l][0] <= s[l - 1][1]) && (s[l - 1][0] = Math.min(s[l][0], s[l - 1][0]), s[l - 1][1] = Math.max(s[l][1], s[l - 1][1]), s[l][2] !== void 0 && (s[l - 1][0] >= s[l][0] || s[l - 1][1] <= s[l][1]) && s[l - 1][2] !== null && (s[l][2] === null && s[l - 1][2] !== null ? s[l - 1][2] = null : s[l - 1][2] != null ? +(r || {})?.mergeType == 2 && s[l - 1][0] === s[l][0] ? s[l - 1][2] = s[l][2] : s[l - 1][2] += s[l][2] : s[l - 1][2] = s[l][2]), s.splice(l, 1), l = s.length);
|
|
2058
2058
|
return s.length ? s : null;
|
|
@@ -2060,8 +2060,8 @@ ${JSON.stringify(e, null, 4)} (type ${typeof e})`);
|
|
|
2060
2060
|
var eo = { limitToBeAddedWhitespace: !1, limitLinebreaksCount: 1, mergeType: 1 }, to = class {
|
|
2061
2061
|
constructor(e) {
|
|
2062
2062
|
let n = { ...eo, ...e };
|
|
2063
|
-
if (n.mergeType && n.mergeType !== 1 && n.mergeType !== 2) if (
|
|
2064
|
-
else if (
|
|
2063
|
+
if (n.mergeType && n.mergeType !== 1 && n.mergeType !== 2) if (ne(n.mergeType) && n.mergeType.trim() === "1") n.mergeType = 1;
|
|
2064
|
+
else if (ne(n.mergeType) && n.mergeType.trim() === "2") n.mergeType = 2;
|
|
2065
2065
|
else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType, null, 4)}`);
|
|
2066
2066
|
this.opts = n, this.ranges = [];
|
|
2067
2067
|
}
|
|
@@ -2078,39 +2078,39 @@ var eo = { limitToBeAddedWhitespace: !1, limitLinebreaksCount: 1, mergeType: 1 }
|
|
|
2078
2078
|
});
|
|
2079
2079
|
return;
|
|
2080
2080
|
}
|
|
2081
|
-
e.length &&
|
|
2081
|
+
e.length && Y(+e[0]) && Y(+e[1]) && this.add(...e);
|
|
2082
2082
|
}
|
|
2083
2083
|
return;
|
|
2084
2084
|
}
|
|
2085
2085
|
throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(e, null, 0)}) but second-one, "to" is not (${JSON.stringify(n, null, 0)})`);
|
|
2086
2086
|
} else if (!G(e) && G(n)) throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(n, null, 0)}) but first-one, "from" is not (${JSON.stringify(e, null, 0)})`);
|
|
2087
2087
|
let i = +e, s = +n;
|
|
2088
|
-
if (
|
|
2089
|
-
if (G(r) && !
|
|
2088
|
+
if (Y(i) && Y(s)) {
|
|
2089
|
+
if (G(r) && !ne(r) && !Ni(r)) throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof r}, equal to:
|
|
2090
2090
|
${JSON.stringify(r, null, 4)}`);
|
|
2091
2091
|
if (G(this.ranges) && Array.isArray(this.last()) && i === this.last()[1]) {
|
|
2092
2092
|
if (this.last()[1] = s, this.last()[2], this.last()[2] !== null && G(r)) {
|
|
2093
2093
|
let o = this.last()[2] && this.last()[2].length && (!this.opts?.mergeType || this.opts.mergeType === 1) ? `${this.last()[2]}${r}` : r;
|
|
2094
|
-
this.opts.limitToBeAddedWhitespace && (o =
|
|
2094
|
+
this.opts.limitToBeAddedWhitespace && (o = mt(o, this.opts.limitLinebreaksCount)), ne(o) && !o.length || (this.last()[2] = o);
|
|
2095
2095
|
}
|
|
2096
2096
|
} else {
|
|
2097
2097
|
this.ranges || (this.ranges = []);
|
|
2098
|
-
let o = r !== void 0 && !(
|
|
2098
|
+
let o = r !== void 0 && !(ne(r) && !r.length) ? [i, s, r && this.opts.limitToBeAddedWhitespace ? mt(r, this.opts.limitLinebreaksCount) : r] : [i, s];
|
|
2099
2099
|
this.ranges.push(o);
|
|
2100
2100
|
}
|
|
2101
|
-
} else throw
|
|
2101
|
+
} else throw Y(i) && i >= 0 ? new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof s}" equal to: ${JSON.stringify(s, null, 4)}`) : new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i, null, 4)}`);
|
|
2102
2102
|
}
|
|
2103
2103
|
push(e, n, r) {
|
|
2104
2104
|
this.add(e, n, r);
|
|
2105
2105
|
}
|
|
2106
2106
|
current() {
|
|
2107
|
-
return Array.isArray(this.ranges) && this.ranges.length ? (this.ranges = Ya(this.ranges, { mergeType: this.opts.mergeType }), this.ranges && this.opts.limitToBeAddedWhitespace ? this.ranges.map((e) => G(e[2]) ? [e[0], e[1],
|
|
2107
|
+
return Array.isArray(this.ranges) && this.ranges.length ? (this.ranges = Ya(this.ranges, { mergeType: this.opts.mergeType }), this.ranges && this.opts.limitToBeAddedWhitespace ? this.ranges.map((e) => G(e[2]) ? [e[0], e[1], mt(e[2], this.opts.limitLinebreaksCount)] : e) : this.ranges) : null;
|
|
2108
2108
|
}
|
|
2109
2109
|
wipe() {
|
|
2110
2110
|
this.ranges = [];
|
|
2111
2111
|
}
|
|
2112
2112
|
replace(e) {
|
|
2113
|
-
if (Array.isArray(e) && e.length) if (Array.isArray(e[0]) &&
|
|
2113
|
+
if (Array.isArray(e) && e.length) if (Array.isArray(e[0]) && Y(e[0][0])) this.ranges = Array.from(e);
|
|
2114
2114
|
else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(e[0], null, 4)} should be an array and its first element should be an integer, a string index.`);
|
|
2115
2115
|
else this.ranges = [];
|
|
2116
2116
|
}
|
|
@@ -2118,16 +2118,16 @@ ${JSON.stringify(r, null, 4)}`);
|
|
|
2118
2118
|
return Array.isArray(this.ranges) && this.ranges.length ? this.ranges[this.ranges.length - 1] : null;
|
|
2119
2119
|
}
|
|
2120
2120
|
};
|
|
2121
|
-
|
|
2122
|
-
var
|
|
2121
|
+
lr();
|
|
2122
|
+
var yt = " ";
|
|
2123
2123
|
function no({ str: t, idx: e = 0, stopAtNewlines: n = !1, stopAtRawNbsp: r = !1 }) {
|
|
2124
2124
|
if (typeof t != "string" || !t.length || ((!e || typeof e != "number") && (e = 0), !t[e + 1])) return null;
|
|
2125
2125
|
if (t[e + 1] && (t[e + 1].trim() || n && `
|
|
2126
|
-
\r`.includes(t[e + 1]) || r && t[e + 1] ===
|
|
2126
|
+
\r`.includes(t[e + 1]) || r && t[e + 1] === yt)) return e + 1;
|
|
2127
2127
|
if (t[e + 2] && (t[e + 2].trim() || n && `
|
|
2128
|
-
\r`.includes(t[e + 2]) || r && t[e + 2] ===
|
|
2128
|
+
\r`.includes(t[e + 2]) || r && t[e + 2] === yt)) return e + 2;
|
|
2129
2129
|
for (let i = e + 1, s = t.length; i < s; i++) if (t[i].trim() || n && `
|
|
2130
|
-
\r`.includes(t[i]) || r && t[i] ===
|
|
2130
|
+
\r`.includes(t[i]) || r && t[i] === yt) return i;
|
|
2131
2131
|
return null;
|
|
2132
2132
|
}
|
|
2133
2133
|
function B(t, e = 0) {
|
|
@@ -2136,7 +2136,7 @@ function B(t, e = 0) {
|
|
|
2136
2136
|
function ro(t) {
|
|
2137
2137
|
return /[-_A-Za-z0-9]/.test(t);
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function Ln(t, e) {
|
|
2140
2140
|
if (!t) return [];
|
|
2141
2141
|
if (Array.isArray(t)) return t.filter((n) => typeof n == "string" && n.trim());
|
|
2142
2142
|
if (typeof t == "string") return t.trim() ? [t] : [];
|
|
@@ -2155,8 +2155,8 @@ function Pn(t, e, n) {
|
|
|
2155
2155
|
function io(t, e) {
|
|
2156
2156
|
return (e.match(new RegExp(t, "g")) || []).length;
|
|
2157
2157
|
}
|
|
2158
|
-
var we = /* @__PURE__ */ new Set(["!doctype", "abbr", "address", "area", "article", "aside", "audio", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "doctype", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "param", "picture", "pre", "progress", "rb", "rp", "rt", "rtc", "ruby", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "ul", "var", "video", "wbr", "xml"]),
|
|
2159
|
-
function
|
|
2158
|
+
var we = /* @__PURE__ */ new Set(["!doctype", "abbr", "address", "area", "article", "aside", "audio", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "doctype", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "param", "picture", "pre", "progress", "rb", "rp", "rt", "rtc", "ruby", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "ul", "var", "video", "wbr", "xml"]), bt = /* @__PURE__ */ new Set(["a", "b", "i", "p", "q", "s", "u"]), vt = /* @__PURE__ */ new Set([".", ",", ";", "!", "?"]), qn = /* @__PURE__ */ new Set([".", ",", "?", ";", ")", "…", '"', "»"]), so = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "audio", "b", "bdi", "bdo", "big", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "input", "ins", "kbd", "label", "map", "mark", "meter", "noscript", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "select", "slot", "small", "span", "strong", "sub", "sup", "svg", "template", "textarea", "time", "u", "tt", "var", "video", "wbr"]), $n = { ignoreTags: [], ignoreTagsWithTheirContents: [], onlyStripTags: [], stripTogetherWithTheirContents: ["script", "style", "xml"], skipHtmlDecoding: !1, trimOnlySpaces: !1, stripRecognisedHTMLOnly: !1, dumpLinkHrefsNearby: { enabled: !1, putOnNewLine: !1, wrapHeads: "", wrapTails: "" }, ignoreIndentations: !1, cb: null, reportProgressFunc: null, reportProgressFuncFrom: 0, reportProgressFuncTo: 100 };
|
|
2159
|
+
function xr(t, e) {
|
|
2160
2160
|
let n = Date.now(), r = [], i = [], s = [], o = [], a = {};
|
|
2161
2161
|
function c() {
|
|
2162
2162
|
a = { attributes: [] };
|
|
@@ -2166,7 +2166,7 @@ function kr(t, e) {
|
|
|
2166
2166
|
function C(h, v, x) {
|
|
2167
2167
|
if (Array.isArray(v.stripTogetherWithTheirContents) && (v.stripTogetherWithTheirContents.includes(a.name) || v.stripTogetherWithTheirContents.includes("*"))) if (a.slashPresent && Array.isArray(r) && r.some((S) => S.name === a.name)) {
|
|
2168
2168
|
for (let S = r.length; S--; ) if (r[S].name === a.name) {
|
|
2169
|
-
o = o.filter(([T,
|
|
2169
|
+
o = o.filter(([T, I]) => (T < r[S].lastOpeningBracketAt || T >= h + 1) && (I <= r[S].lastOpeningBracketAt || I > h + 1));
|
|
2170
2170
|
let R = h + 1;
|
|
2171
2171
|
a.lastClosingBracketAt && (R = a.lastClosingBracketAt + 1), o.push([r[S].lastOpeningBracketAt, R]), qn.has(t[h]) && v.cb ? v.cb({ tag: a, deleteFrom: r[S].lastOpeningBracketAt, deleteTo: h + 1, insert: null, rangesArr: x, proposedReturn: [r[S].lastOpeningBracketAt, h, null] }) : v.cb && v.cb({ tag: a, deleteFrom: r[S].lastOpeningBracketAt, deleteTo: h, insert: "", rangesArr: x, proposedReturn: [r[S].lastOpeningBracketAt, h, ""] }), r.splice(S, 1);
|
|
2172
2172
|
break;
|
|
@@ -2175,17 +2175,17 @@ function kr(t, e) {
|
|
|
2175
2175
|
else Array.isArray(v.ignoreTagsWithTheirContents) && pe(h, v, a) && (E = !1);
|
|
2176
2176
|
}
|
|
2177
2177
|
function N(h, v, x, S, R, T) {
|
|
2178
|
-
if (Array.isArray(
|
|
2178
|
+
if (Array.isArray(O.current()) && typeof x == "number" && O.current()[0][0] === 0 && O.current()[0][1] >= x) return "";
|
|
2179
2179
|
if (t.length === S && T && !b?.dumpLinkHrefsNearby?.enabled) return null;
|
|
2180
|
-
let
|
|
2181
|
-
if (Number.isInteger(x) && x < R && (
|
|
2180
|
+
let I = "";
|
|
2181
|
+
if (Number.isInteger(x) && x < R && (I += h.slice(x, R)), Number.isInteger(S) && S > T + 1) {
|
|
2182
2182
|
let z = h.slice(T + 1, S);
|
|
2183
2183
|
S && !B(t, S - 1) && (z = z.trimEnd()), z.includes(`
|
|
2184
|
-
`) && P(S, h) ?
|
|
2184
|
+
`) && P(S, h) ? I += " " : I += z;
|
|
2185
2185
|
}
|
|
2186
|
-
let
|
|
2187
|
-
if ((
|
|
2188
|
-
let z =
|
|
2186
|
+
let Z = !qn.has(h[v]), un = h[S - 1] !== ">" || !h[x].trim(), hn = !['"', "("].includes(h[R - 1]), ti = ![";", ".", ":", "!"].includes(h[v]);
|
|
2187
|
+
if ((Z || un && hn && ti) && (un || hn) && h[v] !== "!" && (!so.has(a.name) || typeof x == "number" && x < R || typeof S == "number" && S > T + 1)) {
|
|
2188
|
+
let z = I.match(/\n/g);
|
|
2189
2189
|
return Array.isArray(z) && z.length ? z.length === 1 ? `
|
|
2190
2190
|
` : z.length === 2 ? `
|
|
2191
2191
|
|
|
@@ -2196,7 +2196,7 @@ function kr(t, e) {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
return "";
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function L(h, v) {
|
|
2200
2200
|
if (h.dumpLinkHrefsNearby?.enabled && y.tagName && y.tagName === a.name && a.lastOpeningBracketAt && (y.openingTagEnds && a.lastOpeningBracketAt > y.openingTagEnds || !y.openingTagEnds) && (m = !0), m) {
|
|
2201
2201
|
let x = h.dumpLinkHrefsNearby?.putOnNewLine ? `
|
|
2202
2202
|
|
|
@@ -2217,7 +2217,7 @@ function kr(t, e) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
if (typeof t != "string") throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof t).toLowerCase()}, equal to:
|
|
2219
2219
|
${JSON.stringify(t, null, 4)}`);
|
|
2220
|
-
if (e) if (
|
|
2220
|
+
if (e) if (Pt(e)) {
|
|
2221
2221
|
if (e.reportProgressFunc && typeof e.reportProgressFunc != "function") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_03] The Optional Options Object's key reportProgressFunc, callback function, should be a function but it was given as type ${typeof e.reportProgressFunc}, equal to ${JSON.stringify(e.reportProgressFunc, null, 4)}`);
|
|
2222
2222
|
if (typeof e.dumpLinkHrefsNearby == "boolean" && e.dumpLinkHrefsNearby != null) throw new Error(`string-strip-html/stripHtml(): [THROW_ID_04] The Optional Options Object's key should be a plain object but it was given as type ${typeof e.dumpLinkHrefsNearby}, equal to ${JSON.stringify(e.dumpLinkHrefsNearby, null, 4)}`);
|
|
2223
2223
|
} else throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof e).toLowerCase()}, equal to:
|
|
@@ -2226,12 +2226,12 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2226
2226
|
m && (y = { tagName: "", hrefValue: "", openingTagEnds: void 0 }, m = !1);
|
|
2227
2227
|
}
|
|
2228
2228
|
let b = { ...$n, ...e, dumpLinkHrefsNearby: Object.assign({}, $n.dumpLinkHrefsNearby, e?.dumpLinkHrefsNearby) };
|
|
2229
|
-
if (
|
|
2229
|
+
if (Ii(b, "returnRangesOnly")) throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_05] The Optional Options Object's key returnRangesOnly has been removed from the API since v.5 release.");
|
|
2230
2230
|
if (b.reportProgressFunc) {
|
|
2231
2231
|
if (typeof b.reportProgressFuncFrom != "number") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_06] The Optional Options Object's key reportProgressFuncFrom, callback function's "from" range, should be a number but it was given as type ${typeof b.reportProgressFuncFrom}, equal to ${JSON.stringify(b.reportProgressFuncFrom, null, 4)}`);
|
|
2232
2232
|
if (typeof b.reportProgressFuncTo != "number") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_07] The Optional Options Object's key reportProgressFuncTo, callback function's "to" range, should be a number but it was given as type ${typeof b.reportProgressFuncTo}, equal to ${JSON.stringify(b.reportProgressFuncTo, null, 4)}`);
|
|
2233
2233
|
}
|
|
2234
|
-
b.ignoreTags =
|
|
2234
|
+
b.ignoreTags = Ln(b.ignoreTags, "resolvedOpts.ignoreTags"), b.onlyStripTags = Ln(b.onlyStripTags, "resolvedOpts.onlyStripTags");
|
|
2235
2235
|
let ln = !!b.onlyStripTags.length;
|
|
2236
2236
|
b.onlyStripTags.length && b.ignoreTags.length && (b.onlyStripTags = _a(b.onlyStripTags, ...b.ignoreTags)), b.stripTogetherWithTheirContents ? typeof b.stripTogetherWithTheirContents == "string" && b.stripTogetherWithTheirContents.length && (b.stripTogetherWithTheirContents = [b.stripTogetherWithTheirContents]) : b.stripTogetherWithTheirContents = [];
|
|
2237
2237
|
let ye = {};
|
|
@@ -2239,7 +2239,7 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2239
2239
|
b.cb || (b.cb = ({ rangesArr: h, proposedReturn: v }) => {
|
|
2240
2240
|
v && h.push(...v);
|
|
2241
2241
|
});
|
|
2242
|
-
let
|
|
2242
|
+
let O = new to({ limitToBeAddedWhitespace: !0, limitLinebreaksCount: 2 });
|
|
2243
2243
|
if (!b.skipHtmlDecoding) for (; t !== Tn(t, { scope: "strict" }); ) t = Tn(t, { scope: "strict" });
|
|
2244
2244
|
let J = !1, H = !1, qe = 0, cn = 0, $ = t.length, ei = Math.floor($ / 2);
|
|
2245
2245
|
for (let h = 0; h < $; h++) {
|
|
@@ -2254,16 +2254,16 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2254
2254
|
if (!J && _(h) && (!a || Object.keys(a).length < 2) && h > 1) {
|
|
2255
2255
|
for (let v = h; v--; ) if (t[v - 1] === void 0 || _(v)) {
|
|
2256
2256
|
let x = t[v - 1] === void 0 ? v : v + 1, S = t.slice(x, h + 1) || "";
|
|
2257
|
-
if ((S.includes("/>") || S.includes("/ >") || S.includes('="') || S.includes("='")) && t !== `<${
|
|
2257
|
+
if ((S.includes("/>") || S.includes("/ >") || S.includes('="') || S.includes("='")) && t !== `<${An(S.trim(), "/>")}>` && [...we].some((R) => An(S.trim().split(/\s+/).filter((T) => T.trim()).filter((T, I) => I === 0), "/>").toLowerCase() === R) && xr(`<${S.trim()}>`, b).result === "") {
|
|
2258
2258
|
(!s.length || s[s.length - 1][0] !== a.lastOpeningBracketAt) && s.push([x, h + 1]), (!o.length || o[o.length - 1][0] !== a.lastOpeningBracketAt) && o.push([x, h + 1]);
|
|
2259
2259
|
let R = N(t, h, x, h + 1, x, h + 1), T = h + 1;
|
|
2260
2260
|
if (t[T] && !t[T].trim()) {
|
|
2261
|
-
for (let
|
|
2262
|
-
T =
|
|
2261
|
+
for (let I = T; I < $; I++) if (t[I].trim()) {
|
|
2262
|
+
T = I;
|
|
2263
2263
|
break;
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
|
-
b.cb({ tag: a, deleteFrom: x, deleteTo: T, insert: R, rangesArr:
|
|
2266
|
+
b.cb({ tag: a, deleteFrom: x, deleteTo: T, insert: R, rangesArr: O, proposedReturn: [x, T, R] });
|
|
2267
2267
|
}
|
|
2268
2268
|
break;
|
|
2269
2269
|
}
|
|
@@ -2283,9 +2283,9 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2283
2283
|
continue;
|
|
2284
2284
|
}
|
|
2285
2285
|
if (typeof a.name == "string" && a.name.toLowerCase() === "doctype" && (H = !0), P(h)) {
|
|
2286
|
-
|
|
2286
|
+
L(b);
|
|
2287
2287
|
let v = N(t, h, a.leftOuterWhitespace, h, a.lastOpeningBracketAt, h);
|
|
2288
|
-
(b.stripTogetherWithTheirContents.includes(a.name) || b.stripTogetherWithTheirContents.includes("*")) && (o = o.filter(([x, S]) => !(x === a.leftOuterWhitespace && S === h))), b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h, insert: `${v}${p}${v}`, rangesArr:
|
|
2288
|
+
(b.stripTogetherWithTheirContents.includes(a.name) || b.stripTogetherWithTheirContents.includes("*")) && (o = o.filter(([x, S]) => !(x === a.leftOuterWhitespace && S === h))), b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h, insert: `${v}${p}${v}`, rangesArr: O, proposedReturn: [a.leftOuterWhitespace, h, `${v}${p}${v}`] }), me(), C(h, b, O);
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
2291
2291
|
if (a.quotes?.start && a.quotes.start < h && !a.quotes.end && f.nameEnds && f.equalsAt && !f.valueStarts && (f.valueStarts = h), !a.quotes && f.nameEnds && t[h] === "=" && !f.valueStarts && !f.equalsAt && (f.equalsAt = h), !a.quotes && f.nameStarts && f.nameEnds && !f.valueStarts && t[h].trim() && t[h] !== "=" && (a.attributes.push(f), f = {}), !a.quotes && f.nameStarts && !f.nameEnds && (H && `'"`.includes(t[f.nameStarts]) ? f.nameStarts < h && t[h] === t[f.nameStarts] && (f.nameEnds = h + 1, f.name = t.slice(f.nameStarts, f.nameEnds)) : t[h].trim() ? t[h] === "=" ? f.equalsAt || (f.nameEnds = h, f.equalsAt = h, f.name = t.slice(f.nameStarts, f.nameEnds)) : t[h] === "/" || _(h) ? (f.nameEnds = h, f.name = t.slice(f.nameStarts, f.nameEnds), a.attributes.push(f), f = {}) : P(h) && (f.nameEnds = h, f.name = t.slice(f.nameStarts, f.nameEnds), a.attributes.push(f), f = {}) : (f.nameEnds = h, f.name = t.slice(f.nameStarts, f.nameEnds))), !a.quotes && a.nameEnds < h && !t[h - 1].trim() && t[h].trim() && !"<>/!".includes(t[h]) && !f.nameStarts && !a.lastClosingBracketAt && (f.nameStarts = h), a.lastOpeningBracketAt !== null && a.lastOpeningBracketAt < h && t[h] === "/" && a.onlyPlausible && (a.onlyPlausible = !1), a.lastOpeningBracketAt !== null && a.lastOpeningBracketAt < h && t[h] !== "/" && (a.onlyPlausible === void 0 && ((!t[h].trim() || P(h)) && !a.slashPresent ? a.onlyPlausible = !0 : a.onlyPlausible = !1), t[h].trim() && a.nameStarts === void 0 && !P(h) && t[h] !== "/" && !_(h) && t[h] !== "!" && (a.nameStarts = h, a.nameContainsLetters = !1)), a.nameStarts && !a.quotes && typeof t[h] == "string" && t[h].toLowerCase() !== t[h].toUpperCase() && (a.nameContainsLetters = !0), _(h) && (Pn(a, t, h) || a.quotes.value && typeof a.lastOpeningBracketAt == "number" && io(a.quotes.value, t.slice(a.lastOpeningBracketAt, h)) % 2 === 1 && !t.slice(a.lastOpeningBracketAt + 1, h).includes("<") && !t.slice(a.lastOpeningBracketAt + 1, h).includes(">")) && a.lastOpeningBracketAt !== void 0 && (a.lastClosingBracketAt = h, w = null, Object.keys(f).length && (a.attributes.push(f), f = {}), b.dumpLinkHrefsNearby?.enabled && y.tagName && !y.openingTagEnds && (y.openingTagEnds = h)), (!H || t[h] === ">") && a.lastOpeningBracketAt !== void 0) {
|
|
@@ -2295,12 +2295,12 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2295
2295
|
a = {}, f = {};
|
|
2296
2296
|
continue;
|
|
2297
2297
|
}
|
|
2298
|
-
if ((we.has(a.name) ||
|
|
2299
|
-
|
|
2298
|
+
if ((we.has(a.name) || bt.has(a.name)) && (a.onlyPlausible === !1 || a.onlyPlausible === !0 && a.attributes.length) || t[h + 1] === void 0) {
|
|
2299
|
+
L(b);
|
|
2300
2300
|
let v = N(t, h, a.leftOuterWhitespace, h + 1, a.lastOpeningBracketAt, a.lastClosingBracketAt);
|
|
2301
2301
|
J && a.name === "script" && a.slashPresent && (J = !1);
|
|
2302
2302
|
let x;
|
|
2303
|
-
v === null || p === null ? x = null : x = `${v}${p}${v}`, b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h + 1, insert: x, rangesArr:
|
|
2303
|
+
v === null || p === null ? x = null : x = `${v}${p}${v}`, b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h + 1, insert: x, rangesArr: O, proposedReturn: [a.leftOuterWhitespace, h + 1, x] }), me(), C(h, b, O);
|
|
2304
2304
|
}
|
|
2305
2305
|
if (!o.length || o[o.length - 1][0] !== a.lastOpeningBracketAt && o[o.length - 1][1] !== h + 1) if (b.stripTogetherWithTheirContents.includes(a.name) || b.stripTogetherWithTheirContents.includes("*")) {
|
|
2306
2306
|
let v;
|
|
@@ -2313,7 +2313,7 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2313
2313
|
let v = a.lastClosingBracketAt === h ? h + 1 : h;
|
|
2314
2314
|
b.trimOnlySpaces && v === $ - 1 && w !== null && w < h && (v = w), (!s.length || s[s.length - 1][0] !== a.lastOpeningBracketAt) && s.push([a.lastOpeningBracketAt, a.lastClosingBracketAt + 1]);
|
|
2315
2315
|
let x = b.ignoreTags.includes(a.name), S = pe(h, b, a);
|
|
2316
|
-
if (!E || b.stripRecognisedHTMLOnly && typeof a.name == "string" && !we.has(a.name.toLowerCase()) && !
|
|
2316
|
+
if (!E || b.stripRecognisedHTMLOnly && typeof a.name == "string" && !we.has(a.name.toLowerCase()) && !bt.has(a.name.toLowerCase()) || !ln && (x || S) || ln && !b.onlyStripTags.includes(a.name) || b.ignoreTagsWithTheirContents.includes(a.name)) {
|
|
2317
2317
|
if (S) if (a.slashPresent) {
|
|
2318
2318
|
for (let R = i.length; R--; ) if (i[R].name === a.name) {
|
|
2319
2319
|
i.splice(R, 1);
|
|
@@ -2321,24 +2321,24 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2321
2321
|
}
|
|
2322
2322
|
i.length || (E = !0);
|
|
2323
2323
|
} else E && (E = !1), i.push(a);
|
|
2324
|
-
b.cb({ tag: a, deleteFrom: null, deleteTo: null, insert: null, rangesArr:
|
|
2325
|
-
} else if (!a.onlyPlausible || a.attributes.length === 0 && a.name && (we.has(a.name.toLowerCase()) ||
|
|
2324
|
+
b.cb({ tag: a, deleteFrom: null, deleteTo: null, insert: null, rangesArr: O, proposedReturn: null }), a = {}, f = {};
|
|
2325
|
+
} else if (!a.onlyPlausible || a.attributes.length === 0 && a.name && (we.has(a.name.toLowerCase()) || bt.has(a.name.toLowerCase())) || a.attributes?.some((R) => R.equalsAt)) {
|
|
2326
2326
|
(!o.length || o[o.length - 1][0] !== a.lastOpeningBracketAt) && o.push([a.lastOpeningBracketAt, a.lastClosingBracketAt + 1]);
|
|
2327
2327
|
let R = N(t, h, a.leftOuterWhitespace, v, a.lastOpeningBracketAt, a.lastClosingBracketAt);
|
|
2328
|
-
p = "", m = !1,
|
|
2328
|
+
p = "", m = !1, L(b, v);
|
|
2329
2329
|
let T;
|
|
2330
2330
|
typeof p == "string" && p.length ? (T = `${R}${p}${R === `
|
|
2331
2331
|
|
|
2332
2332
|
` ? `
|
|
2333
|
-
` : R}`, v === a.lastClosingBracketAt + 1 && (!t[v] || !
|
|
2334
|
-
let
|
|
2335
|
-
if (m &&
|
|
2333
|
+
` : R}`, v === a.lastClosingBracketAt + 1 && (!t[v] || !vt.has(t[v])) && (T += " "), a.leftOuterWhitespace === a.lastOpeningBracketAt && O.last() && O.last()[1] < a.lastOpeningBracketAt && (!b?.dumpLinkHrefsNearby?.putOnNewLine || !vt.has(t[v])) && (T = " " + T)) : T = R, T !== null && (a.leftOuterWhitespace === 0 || !B(t, v - 1)) && (!b.dumpLinkHrefsNearby?.enabled || a.name !== "a") && (T = void 0);
|
|
2334
|
+
let I = 0;
|
|
2335
|
+
if (m && vt.has(t[v])) {
|
|
2336
2336
|
b.dumpLinkHrefsNearby?.putOnNewLine && (T = `${t[v]}${T || ""}`);
|
|
2337
|
-
let
|
|
2338
|
-
|
|
2339
|
-
`) ?
|
|
2337
|
+
let Z = B(t, v);
|
|
2338
|
+
Z && T?.endsWith(`
|
|
2339
|
+
`) ? I += Z - h : (!Z || Z > h) && I++;
|
|
2340
2340
|
}
|
|
2341
|
-
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: v +
|
|
2341
|
+
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: v + I, insert: T, rangesArr: O, proposedReturn: [a.leftOuterWhitespace, v + I, T] }), me(), C(h, b, O);
|
|
2342
2342
|
} else a = {};
|
|
2343
2343
|
_(h) || (a = {});
|
|
2344
2344
|
}
|
|
@@ -2348,7 +2348,7 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2348
2348
|
if (_(B(t, h))) continue;
|
|
2349
2349
|
if (a.nameEnds && a.nameEnds < h && !a.lastClosingBracketAt && (a.onlyPlausible === !0 && a.attributes?.length || a.onlyPlausible === !1)) {
|
|
2350
2350
|
let v = N(t, h, a.leftOuterWhitespace, h, a.lastOpeningBracketAt, h);
|
|
2351
|
-
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h, insert: v, rangesArr:
|
|
2351
|
+
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: h, insert: v, rangesArr: O, proposedReturn: [a.leftOuterWhitespace, h, v] }), C(h, b, O), a = {}, f = {};
|
|
2352
2352
|
}
|
|
2353
2353
|
if (a.lastOpeningBracketAt !== void 0 && a.onlyPlausible && a.name && !a.quotes && (a.lastOpeningBracketAt = void 0, a.name = void 0, a.onlyPlausible = !1), (a.lastOpeningBracketAt === void 0 || !a.onlyPlausible) && !a.quotes && (a.lastOpeningBracketAt = h, a.slashPresent = !1, a.attributes = [], l === null ? a.leftOuterWhitespace = h : b.trimOnlySpaces && l === 0 ? a.leftOuterWhitespace = d || h : a.leftOuterWhitespace = l, `${t[h + 1]}${t[h + 2]}${t[h + 3]}` == "!--" || `${t[h + 1]}${t[h + 2]}${t[h + 3]}${t[h + 4]}${t[h + 5]}${t[h + 6]}${t[h + 7]}${t[h + 8]}` == "![CDATA[")) {
|
|
2354
2354
|
let v = !0;
|
|
@@ -2358,32 +2358,32 @@ ${JSON.stringify(e, null, 4)}`);
|
|
|
2358
2358
|
let R = S;
|
|
2359
2359
|
(t[S + 1] === void 0 && !t[S].trim() || t[S] === ">") && (R += 1), (!s.length || s[s.length - 1][0] !== a.lastOpeningBracketAt) && s.push([a.lastOpeningBracketAt, x + 1]), (!o.length || o[o.length - 1][0] !== a.lastOpeningBracketAt) && o.push([a.lastOpeningBracketAt, x + 1]);
|
|
2360
2360
|
let T = N(t, S, a.leftOuterWhitespace, R, a.lastOpeningBracketAt, x);
|
|
2361
|
-
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: R, insert: T, rangesArr:
|
|
2361
|
+
b.cb({ tag: a, deleteFrom: a.leftOuterWhitespace, deleteTo: R, insert: T, rangesArr: O, proposedReturn: [a.leftOuterWhitespace, R, T] }), h = S - 1, t[S] === ">" && (h = S), a = {}, f = {};
|
|
2362
2362
|
break;
|
|
2363
2363
|
}
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
2366
|
!t[h].trim() || t[h].charCodeAt(0) === 847 ? (l === null && (l = h, a.lastOpeningBracketAt !== void 0 && a.lastOpeningBracketAt < h && a.nameStarts && a.nameStarts < a.lastOpeningBracketAt && h === a.lastOpeningBracketAt + 1 && !r.some((v) => v.name === a.name) && (a.onlyPlausible = !0, a.name = void 0, a.nameStarts = void 0)), (t[h] === `
|
|
2367
|
-
` || t[h] === "\r") && (u = h, g && (g = !1))) : (l !== null && (!a.quotes && f.equalsAt > l - 1 && f.nameEnds && f.equalsAt > f.nameEnds && t[h] !== '"' && t[h] !== "'" && (
|
|
2367
|
+
` || t[h] === "\r") && (u = h, g && (g = !1))) : (l !== null && (!a.quotes && f.equalsAt > l - 1 && f.nameEnds && f.equalsAt > f.nameEnds && t[h] !== '"' && t[h] !== "'" && (Pt(f) && a.attributes.push(f), f = {}, a.equalsSpottedAt = void 0), l = null), g || (g = !0, E && !J && typeof u == "number" && h && u < h - 1 && (t.slice(u + 1, h).trim() ? u = null : b.ignoreIndentations || O.push([u + 1, h])))), t[h] === " " ? d === null && (d = h) : d !== null && (d = null), a.name === "script" && (J = !a.slashPresent);
|
|
2368
2368
|
}
|
|
2369
2369
|
if (t && !b.ignoreIndentations && (b.trimOnlySpaces && t[0] === " " || !b.trimOnlySpaces && !t[0].trim())) for (let h = 0; h < $; h++) if (b.trimOnlySpaces && t[h] !== " " || !b.trimOnlySpaces && t[h].trim()) {
|
|
2370
|
-
|
|
2370
|
+
O.push([0, h]);
|
|
2371
2371
|
break;
|
|
2372
|
-
} else t[h + 1] ||
|
|
2372
|
+
} else t[h + 1] || O.push([0, h + 1]);
|
|
2373
2373
|
if (t && (b.trimOnlySpaces && t[~-t.length] === " " || !b.trimOnlySpaces && !t[~-t.length].trim())) {
|
|
2374
2374
|
for (let h = t.length; h--; ) if (b.trimOnlySpaces && t[h] !== " " || !b.trimOnlySpaces && t[h].trim()) {
|
|
2375
|
-
|
|
2375
|
+
O.push([h + 1, $]);
|
|
2376
2376
|
break;
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
|
-
let M =
|
|
2380
|
-
if (!e?.cb && M && (M[0] && !M[0][0] && (M[0][1],
|
|
2381
|
-
let h =
|
|
2379
|
+
let M = O.current();
|
|
2380
|
+
if (!e?.cb && M && (M[0] && !M[0][0] && (M[0][1], O.ranges[0] = [O.ranges[0][0], O.ranges[0][1]]), M[M.length - 1]?.[1] === t.length && (M[M.length - 1][0], O.ranges))) {
|
|
2381
|
+
let h = O.ranges[O.ranges.length - 1][0];
|
|
2382
2382
|
t[h - 1] && (b.trimOnlySpaces && t[h - 1] === " " || !b.trimOnlySpaces && !t[h - 1].trim()) && (h -= 1);
|
|
2383
|
-
let v =
|
|
2384
|
-
|
|
2383
|
+
let v = O.ranges[O.ranges.length - 1][2];
|
|
2384
|
+
O.ranges[O.ranges.length - 1] = [h, O.ranges[O.ranges.length - 1][1]], v?.trim() && O.ranges[O.ranges.length - 1].push(v.trimEnd());
|
|
2385
2385
|
}
|
|
2386
|
-
return { log: { timeTakenInMilliseconds: Date.now() - n }, result: Za(t,
|
|
2386
|
+
return { log: { timeTakenInMilliseconds: Date.now() - n }, result: Za(t, O.current()), ranges: O.current(), allTagLocations: s, filteredTagLocations: o };
|
|
2387
2387
|
}
|
|
2388
2388
|
class Dn {
|
|
2389
2389
|
speechSynthesis;
|
|
@@ -2419,7 +2419,7 @@ class Dn {
|
|
|
2419
2419
|
features;
|
|
2420
2420
|
patches;
|
|
2421
2421
|
constructor() {
|
|
2422
|
-
if (this.features = Ei(), this.patches =
|
|
2422
|
+
if (this.features = Ei(), this.patches = Ai(), !this.features.speechSynthesis || !this.features.speechSynthesisUtterance)
|
|
2423
2423
|
throw new Error("Web Speech API is not available in this environment");
|
|
2424
2424
|
this.speechSynthesis = this.features.speechSynthesis, this.speechSynthesisUtterance = this.features.speechSynthesisUtterance;
|
|
2425
2425
|
}
|
|
@@ -2526,7 +2526,7 @@ class Dn {
|
|
|
2526
2526
|
toPlainText(e) {
|
|
2527
2527
|
return e.map((n) => ({
|
|
2528
2528
|
...n,
|
|
2529
|
-
plain: n.plain ?? (n.ssml ?
|
|
2529
|
+
plain: n.plain ?? (n.ssml ? xr(n.ssml).result : "")
|
|
2530
2530
|
}));
|
|
2531
2531
|
}
|
|
2532
2532
|
// Queue Management
|
|
@@ -2719,7 +2719,7 @@ class Dn {
|
|
|
2719
2719
|
this.stop(), this.stopResumeInfinity(), this.eventListeners.clear(), this.currentUtterances = [], this.currentVoice = null, this.voices = [], this.defaultVoice = null, this.languageVoiceCache.clear(), this.warmingLanguages.clear(), this.initialized = !1;
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
|
-
class
|
|
2722
|
+
class gc {
|
|
2723
2723
|
id = "webspeech";
|
|
2724
2724
|
name = "Web Speech API";
|
|
2725
2725
|
voiceEngine = null;
|
|
@@ -2734,14 +2734,14 @@ class dc {
|
|
|
2734
2734
|
this.voiceEngine && (await this.voiceEngine.destroy(), this.voiceEngine = null);
|
|
2735
2735
|
}
|
|
2736
2736
|
}
|
|
2737
|
-
const
|
|
2738
|
-
function
|
|
2737
|
+
const oe = "\\p{Pe}\\p{Pf}.,;:!?,。、;:!?،؛؟", Dt = "\\p{Ps}\\p{Pi}¿¡", ao = new RegExp(`^[${oe}]`, "u"), oo = new RegExp(`^[${Dt}]`, "u");
|
|
2738
|
+
function ot(t) {
|
|
2739
2739
|
return ao.test(t);
|
|
2740
2740
|
}
|
|
2741
2741
|
function lo(t) {
|
|
2742
2742
|
return oo.test(t);
|
|
2743
2743
|
}
|
|
2744
|
-
function
|
|
2744
|
+
function kr(t, e) {
|
|
2745
2745
|
const n = [];
|
|
2746
2746
|
let r = -1, i = -1;
|
|
2747
2747
|
const s = () => {
|
|
@@ -2762,22 +2762,22 @@ function co(t, e, n) {
|
|
|
2762
2762
|
const r = t[e], i = t[n];
|
|
2763
2763
|
return r === i ? r.text : t.slice(e, n + 1).map((s) => s.text).join("");
|
|
2764
2764
|
}
|
|
2765
|
-
const
|
|
2766
|
-
`[^${
|
|
2765
|
+
const Cr = new RegExp(
|
|
2766
|
+
`[^${oe}]*[${oe}]+\\s*|[^${oe}]+$`,
|
|
2767
2767
|
"gu"
|
|
2768
2768
|
), uo = /\S+\s*|\s+/g;
|
|
2769
|
-
function
|
|
2769
|
+
function Xt(t, e, n) {
|
|
2770
2770
|
const r = [];
|
|
2771
2771
|
for (const i of t.matchAll(n))
|
|
2772
2772
|
i[0].length !== 0 && r.push({ text: i[0], offset: e + i.index, atomic: !1 });
|
|
2773
2773
|
return r;
|
|
2774
2774
|
}
|
|
2775
|
-
function
|
|
2775
|
+
function Zt(t, e) {
|
|
2776
2776
|
if (t.text.length <= e || t.atomic)
|
|
2777
2777
|
return [t];
|
|
2778
|
-
const n =
|
|
2778
|
+
const n = Xt(t.text, t.offset, uo);
|
|
2779
2779
|
if (n.length > 1)
|
|
2780
|
-
return n.flatMap((o) =>
|
|
2780
|
+
return n.flatMap((o) => Zt(o, e));
|
|
2781
2781
|
const r = [];
|
|
2782
2782
|
let i = t.offset, s = "";
|
|
2783
2783
|
for (const o of t.text)
|
|
@@ -2787,8 +2787,8 @@ function Yt(t, e) {
|
|
|
2787
2787
|
function ho(t, e) {
|
|
2788
2788
|
if (t.length <= e)
|
|
2789
2789
|
return [{ text: t, offset: 0 }];
|
|
2790
|
-
const r =
|
|
2791
|
-
return
|
|
2790
|
+
const r = Xt(t, 0, Cr).flatMap((i) => Zt(i, e));
|
|
2791
|
+
return kr(r, e);
|
|
2792
2792
|
}
|
|
2793
2793
|
const go = /<([a-zA-Z][\w-]*)\b[^>]*>[\s\S]*?<\/\1>|<[a-zA-Z][\w-]*\b[^>]*\/>|[^<]+/g;
|
|
2794
2794
|
function fo(t, e) {
|
|
@@ -2796,9 +2796,9 @@ function fo(t, e) {
|
|
|
2796
2796
|
return [{ text: t, offset: 0 }];
|
|
2797
2797
|
const n = [];
|
|
2798
2798
|
for (const i of t.matchAll(go))
|
|
2799
|
-
i[0][0] === "<" ? n.push({ text: i[0], offset: i.index, atomic: !0 }) : n.push(...
|
|
2800
|
-
const r = n.flatMap((i) =>
|
|
2801
|
-
return
|
|
2799
|
+
i[0][0] === "<" ? n.push({ text: i[0], offset: i.index, atomic: !0 }) : n.push(...Xt(i[0], i.index, Cr));
|
|
2800
|
+
const r = n.flatMap((i) => Zt(i, e));
|
|
2801
|
+
return kr(r, e);
|
|
2802
2802
|
}
|
|
2803
2803
|
const po = {
|
|
2804
2804
|
wav: "audio/wav",
|
|
@@ -2834,7 +2834,7 @@ const wo = /* @__PURE__ */ new Set(["wav", "flac"]), So = {
|
|
|
2834
2834
|
function xo(t, e, n) {
|
|
2835
2835
|
return wo.has(t) || !e || !n ? void 0 : n.saveData === !0 || /2g/.test(n.effectiveType ?? "") ? So[t] : void 0;
|
|
2836
2836
|
}
|
|
2837
|
-
function
|
|
2837
|
+
function Er(t, e) {
|
|
2838
2838
|
return {
|
|
2839
2839
|
source: "server",
|
|
2840
2840
|
label: t.name,
|
|
@@ -2846,10 +2846,10 @@ function Or(t) {
|
|
|
2846
2846
|
quality: t.quality,
|
|
2847
2847
|
provider: t.provider,
|
|
2848
2848
|
identifier: t.identifier,
|
|
2849
|
-
controls:
|
|
2849
|
+
controls: e
|
|
2850
2850
|
};
|
|
2851
2851
|
}
|
|
2852
|
-
class
|
|
2852
|
+
class Qe extends Error {
|
|
2853
2853
|
status;
|
|
2854
2854
|
type;
|
|
2855
2855
|
title;
|
|
@@ -2858,11 +2858,11 @@ class Xe extends Error {
|
|
|
2858
2858
|
super(e), this.name = "SpeechServerError", this.status = n.status, this.type = n.type, this.title = n.title, this.instance = n.instance;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
|
-
async function
|
|
2861
|
+
async function Ae(t) {
|
|
2862
2862
|
if ((t.headers.get("content-type") ?? "").includes("application/problem+json"))
|
|
2863
2863
|
try {
|
|
2864
2864
|
const n = await t.json();
|
|
2865
|
-
return new
|
|
2865
|
+
return new Qe(n.detail || n.title || `Request failed with status ${t.status}`, {
|
|
2866
2866
|
status: n.status ?? t.status,
|
|
2867
2867
|
type: n.type,
|
|
2868
2868
|
title: n.title,
|
|
@@ -2870,7 +2870,7 @@ async function We(t) {
|
|
|
2870
2870
|
});
|
|
2871
2871
|
} catch {
|
|
2872
2872
|
}
|
|
2873
|
-
return new
|
|
2873
|
+
return new Qe(`Request failed with status ${t.status}`, { status: t.status });
|
|
2874
2874
|
}
|
|
2875
2875
|
const ko = 3, Co = 400;
|
|
2876
2876
|
function Eo(t) {
|
|
@@ -2879,16 +2879,16 @@ function Eo(t) {
|
|
|
2879
2879
|
n[r] = e.charCodeAt(r);
|
|
2880
2880
|
return n.buffer;
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function Ao(t) {
|
|
2883
2883
|
return Math.max(0.25, Math.min(4, t));
|
|
2884
2884
|
}
|
|
2885
2885
|
function _e(t) {
|
|
2886
2886
|
return t?.plain ?? t?.ssml ?? void 0;
|
|
2887
2887
|
}
|
|
2888
2888
|
function _n(t) {
|
|
2889
|
-
return t instanceof
|
|
2889
|
+
return t instanceof Qe ? { message: t.message, status: t.status, type: t.type, title: t.title, instance: t.instance } : t instanceof Error ? { message: t.message } : { message: String(t) };
|
|
2890
2890
|
}
|
|
2891
|
-
class
|
|
2891
|
+
class Oo {
|
|
2892
2892
|
endpoints;
|
|
2893
2893
|
fetchImpl;
|
|
2894
2894
|
currentVoice = null;
|
|
@@ -2978,11 +2978,11 @@ class Ao {
|
|
|
2978
2978
|
async getAvailableVoices() {
|
|
2979
2979
|
if (this.voices.length > 0)
|
|
2980
2980
|
return this.voices;
|
|
2981
|
-
const e = await this.fetchImpl(this.endpoints.voices);
|
|
2981
|
+
const [e, n] = await Promise.all([this.fetchImpl(this.endpoints.voices), this.getServiceInfo()]);
|
|
2982
2982
|
if (!e.ok)
|
|
2983
|
-
throw await
|
|
2984
|
-
const
|
|
2985
|
-
return this.voices =
|
|
2983
|
+
throw await Ae(e);
|
|
2984
|
+
const r = await e.json(), i = new Map(n.providers.map((s) => [s.id, s.controls]));
|
|
2985
|
+
return this.voices = r.map((s) => Er(s, i.get(s.provider))), this.voices;
|
|
2986
2986
|
}
|
|
2987
2987
|
// Cached after the first successful fetch; a failed fetch isn't cached, so the next
|
|
2988
2988
|
// synthesize() call retries rather than being stuck on a transient network error.
|
|
@@ -2994,7 +2994,7 @@ class Ao {
|
|
|
2994
2994
|
async fetchServiceInfo() {
|
|
2995
2995
|
const e = await this.fetchImpl(this.endpoints.service);
|
|
2996
2996
|
if (!e.ok)
|
|
2997
|
-
throw await
|
|
2997
|
+
throw await Ae(e);
|
|
2998
2998
|
return e.json();
|
|
2999
2999
|
}
|
|
3000
3000
|
setSpeakInContentLanguage(e) {
|
|
@@ -3074,7 +3074,7 @@ class Ao {
|
|
|
3074
3074
|
if (s.length <= c.limits.maxTextLength)
|
|
3075
3075
|
return [this.synthesizeChunk(n, s, 0, r, i, o, a, l, u)];
|
|
3076
3076
|
if (this.overLengthText === "error")
|
|
3077
|
-
throw new
|
|
3077
|
+
throw new Qe(
|
|
3078
3078
|
`Text exceeds this server's maximum length of ${c.limits.maxTextLength} characters`,
|
|
3079
3079
|
{
|
|
3080
3080
|
status: 413,
|
|
@@ -3109,7 +3109,7 @@ class Ao {
|
|
|
3109
3109
|
})
|
|
3110
3110
|
});
|
|
3111
3111
|
if (!d.ok)
|
|
3112
|
-
throw await
|
|
3112
|
+
throw await Ae(d);
|
|
3113
3113
|
const u = await d.json(), g = Eo(u.audio);
|
|
3114
3114
|
let f;
|
|
3115
3115
|
try {
|
|
@@ -3130,7 +3130,7 @@ class Ao {
|
|
|
3130
3130
|
const r = await e[0];
|
|
3131
3131
|
if (n !== this.speakGeneration)
|
|
3132
3132
|
return;
|
|
3133
|
-
const i = this.ensureAudioContext(), s = this.masterGain, a = this.currentVoice?.controls?.speed === !0 ? 1 :
|
|
3133
|
+
const i = this.ensureAudioContext(), s = this.masterGain, a = this.currentVoice?.controls?.speed === !0 ? 1 : Ao(this.rate);
|
|
3134
3134
|
this.scheduledChunks = [], this.setState("playing"), this.emitEvent({ type: "start" });
|
|
3135
3135
|
let c = i.currentTime, l = null;
|
|
3136
3136
|
const d = (u) => {
|
|
@@ -3276,7 +3276,7 @@ class Ao {
|
|
|
3276
3276
|
this.stop(), await this.audioContext?.close(), this.audioContext = null, this.masterGain = null, this.eventListeners.clear(), this.currentUtterances = [], this.currentVoice = null, this.voices = [];
|
|
3277
3277
|
}
|
|
3278
3278
|
}
|
|
3279
|
-
class
|
|
3279
|
+
class fc {
|
|
3280
3280
|
id = "speech-server";
|
|
3281
3281
|
name = "Readium Speech Server";
|
|
3282
3282
|
options;
|
|
@@ -3288,14 +3288,19 @@ class gc {
|
|
|
3288
3288
|
async getVoices() {
|
|
3289
3289
|
if (this.voices.length > 0)
|
|
3290
3290
|
return this.voices;
|
|
3291
|
-
const e = await
|
|
3291
|
+
const [e, n] = await Promise.all([
|
|
3292
|
+
this.fetchImpl(this.options.endpoints.voices),
|
|
3293
|
+
this.fetchImpl(this.options.endpoints.service)
|
|
3294
|
+
]);
|
|
3292
3295
|
if (!e.ok)
|
|
3293
|
-
throw await
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
+
throw await Ae(e);
|
|
3297
|
+
if (!n.ok)
|
|
3298
|
+
throw await Ae(n);
|
|
3299
|
+
const r = await e.json(), i = await n.json(), s = new Map(i.providers.map((o) => [o.id, o.controls]));
|
|
3300
|
+
return this.voices = r.map((o) => Er(o, s.get(o.provider))), this.voices;
|
|
3296
3301
|
}
|
|
3297
3302
|
async createEngine(e) {
|
|
3298
|
-
const n = new
|
|
3303
|
+
const n = new Oo(this.options);
|
|
3299
3304
|
return this.voices.length > 0 && n.setAvailableVoices(this.voices), e && n.setVoice(e), n;
|
|
3300
3305
|
}
|
|
3301
3306
|
async destroy() {
|
|
@@ -3322,13 +3327,13 @@ function Se(t) {
|
|
|
3322
3327
|
function Bn(t, e) {
|
|
3323
3328
|
return t.document.documentElement.style.getPropertyValue(e);
|
|
3324
3329
|
}
|
|
3325
|
-
function
|
|
3330
|
+
function Io(t) {
|
|
3326
3331
|
return t && Array.isArray(t) ? t : void 0;
|
|
3327
3332
|
}
|
|
3328
|
-
function
|
|
3329
|
-
return t && typeof t == "string" ? [t] :
|
|
3333
|
+
function Lo(t) {
|
|
3334
|
+
return t && typeof t == "string" ? [t] : Io(t);
|
|
3330
3335
|
}
|
|
3331
|
-
function
|
|
3336
|
+
function wt(t) {
|
|
3332
3337
|
return isNaN(t) ? void 0 : t;
|
|
3333
3338
|
}
|
|
3334
3339
|
function Be(t) {
|
|
@@ -3340,27 +3345,27 @@ let xe = class Ar {
|
|
|
3340
3345
|
}
|
|
3341
3346
|
static deserialize(e) {
|
|
3342
3347
|
if (!e) return;
|
|
3343
|
-
const n =
|
|
3348
|
+
const n = wt(e.progression), r = wt(e.totalProgression), i = wt(e.position), s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(["fragment", "fragments", "progression", "totalProgression", "position", "otherLocations"]);
|
|
3344
3349
|
return Object.entries(e).forEach(([a, c]) => {
|
|
3345
3350
|
o.has(a) || s.set(a, c);
|
|
3346
|
-
}), e.otherLocations instanceof Map && e.otherLocations.forEach((a, c) => s.set(c, a)), new Ar({ fragments:
|
|
3351
|
+
}), e.otherLocations instanceof Map && e.otherLocations.forEach((a, c) => s.set(c, a)), new Ar({ fragments: Lo(e.fragments || e.fragment), progression: n !== void 0 && n >= 0 && n <= 1 ? n : void 0, totalProgression: r !== void 0 && r >= 0 && r <= 1 ? r : void 0, position: i !== void 0 && i > 0 ? i : void 0, otherLocations: s.size === 0 ? void 0 : s });
|
|
3347
3352
|
}
|
|
3348
3353
|
serialize() {
|
|
3349
3354
|
const e = {};
|
|
3350
3355
|
return this.fragments && (e.fragments = this.fragments), this.progression !== void 0 && (e.progression = this.progression), this.totalProgression !== void 0 && (e.totalProgression = this.totalProgression), this.position !== void 0 && (e.position = this.position), this.otherLocations && this.otherLocations.forEach((n, r) => e[r] = n), e;
|
|
3351
3356
|
}
|
|
3352
|
-
}, Po = class
|
|
3357
|
+
}, Po = class Or {
|
|
3353
3358
|
constructor(e) {
|
|
3354
3359
|
this.after = e.after, this.before = e.before, this.highlight = e.highlight;
|
|
3355
3360
|
}
|
|
3356
3361
|
static deserialize(e) {
|
|
3357
|
-
if (e) return new
|
|
3362
|
+
if (e) return new Or({ after: e.after, before: e.before, highlight: e.highlight });
|
|
3358
3363
|
}
|
|
3359
3364
|
serialize() {
|
|
3360
3365
|
const e = {};
|
|
3361
3366
|
return this.after !== void 0 && (e.after = this.after), this.before !== void 0 && (e.before = this.before), this.highlight !== void 0 && (e.highlight = this.highlight), e;
|
|
3362
3367
|
}
|
|
3363
|
-
}, qo = class
|
|
3368
|
+
}, qo = class _t {
|
|
3364
3369
|
constructor(e) {
|
|
3365
3370
|
const n = e.href.indexOf("#"), r = n >= 0 ? e.href.slice(n + 1) : void 0;
|
|
3366
3371
|
this.href = n >= 0 ? e.href.slice(0, n) : e.href, this.type = e.type, this.title = e.title;
|
|
@@ -3368,14 +3373,14 @@ let xe = class Ar {
|
|
|
3368
3373
|
this.locations = e.locations ? s ? new xe({ ...e.locations, fragments: [r] }) : e.locations : r ? new xe({ fragments: [r] }) : new xe({}), this.text = e.text;
|
|
3369
3374
|
}
|
|
3370
3375
|
static deserialize(e) {
|
|
3371
|
-
if (e && e.href && e.type) return new
|
|
3376
|
+
if (e && e.href && e.type) return new _t({ href: e.href, type: e.type, title: e.title, locations: xe.deserialize(e.locations), text: Po.deserialize(e.text) });
|
|
3372
3377
|
}
|
|
3373
3378
|
serialize() {
|
|
3374
3379
|
const e = { href: this.href, type: this.type };
|
|
3375
3380
|
return this.title !== void 0 && (e.title = this.title), this.locations && (e.locations = this.locations.serialize()), this.text && (e.text = this.text.serialize()), e;
|
|
3376
3381
|
}
|
|
3377
3382
|
copyWithLocations(e) {
|
|
3378
|
-
return new
|
|
3383
|
+
return new _t({ href: this.href, type: this.type, title: this.title, text: this.text, locations: new xe({ ...this.locations, ...e }) });
|
|
3379
3384
|
}
|
|
3380
3385
|
};
|
|
3381
3386
|
function Un(t) {
|
|
@@ -3385,20 +3390,20 @@ function $o(t, e, n) {
|
|
|
3385
3390
|
const r = Un(e);
|
|
3386
3391
|
return n.map((i) => {
|
|
3387
3392
|
const s = Math.max(0, i.end - e.length - i.errors), o = Un(t.slice(s, i.end));
|
|
3388
|
-
return { start:
|
|
3393
|
+
return { start: Tr(o, r, i.errors).reduce((a, c) => i.end - c.end < a ? i.end - c.end : a, i.end), end: i.end, errors: i.errors };
|
|
3389
3394
|
});
|
|
3390
3395
|
}
|
|
3391
|
-
function
|
|
3396
|
+
function St(t) {
|
|
3392
3397
|
return (t | -t) >> 31 & 1;
|
|
3393
3398
|
}
|
|
3394
3399
|
function zn(t, e, n, r) {
|
|
3395
3400
|
let i = t.P[n], s = t.M[n];
|
|
3396
3401
|
const o = r >>> 31, a = e[n] | o, c = a | s, l = (a & i) + i ^ i | a;
|
|
3397
3402
|
let d = s | ~(l | i), u = i & l;
|
|
3398
|
-
const g =
|
|
3399
|
-
return d <<= 1, u <<= 1, u |= o, d |=
|
|
3403
|
+
const g = St(d & t.lastRowMask[n]) - St(u & t.lastRowMask[n]);
|
|
3404
|
+
return d <<= 1, u <<= 1, u |= o, d |= St(r) - o, i = u | ~(c | d), s = d & c, t.P[n] = i, t.M[n] = s, g;
|
|
3400
3405
|
}
|
|
3401
|
-
function
|
|
3406
|
+
function Tr(t, e, n) {
|
|
3402
3407
|
if (e.length === 0) return [];
|
|
3403
3408
|
n = Math.min(n, e.length);
|
|
3404
3409
|
const r = [], i = 32, s = Math.ceil(e.length / i) - 1, o = { P: new Uint32Array(s + 1), M: new Uint32Array(s + 1), lastRowMask: new Uint32Array(s + 1) };
|
|
@@ -3443,21 +3448,21 @@ function Rr(t, e, n) {
|
|
|
3443
3448
|
return r;
|
|
3444
3449
|
}
|
|
3445
3450
|
function Do(t, e, n) {
|
|
3446
|
-
const r =
|
|
3451
|
+
const r = Tr(t, e, n);
|
|
3447
3452
|
return $o(t, e, r);
|
|
3448
3453
|
}
|
|
3449
|
-
function
|
|
3454
|
+
function Rr(t, e, n) {
|
|
3450
3455
|
let r = 0;
|
|
3451
3456
|
const i = [];
|
|
3452
3457
|
for (; r !== -1; ) r = t.indexOf(e, r), r !== -1 && (i.push({ start: r, end: r + e.length, errors: 0 }), r += 1);
|
|
3453
3458
|
return i.length > 0 ? i : Do(t, e, n);
|
|
3454
3459
|
}
|
|
3455
3460
|
function jn(t, e) {
|
|
3456
|
-
return e.length === 0 || t.length === 0 ? 0 : 1 -
|
|
3461
|
+
return e.length === 0 || t.length === 0 ? 0 : 1 - Rr(t, e, e.length)[0].errors / e.length;
|
|
3457
3462
|
}
|
|
3458
3463
|
function _o(t, e, n = {}) {
|
|
3459
3464
|
if (e.length === 0) return null;
|
|
3460
|
-
const r = Math.min(256, e.length / 2), i =
|
|
3465
|
+
const r = Math.min(256, e.length / 2), i = Rr(t, e, r);
|
|
3461
3466
|
if (i.length === 0) return null;
|
|
3462
3467
|
const s = (a) => {
|
|
3463
3468
|
const c = 1 - a.errors / e.length, l = n.prefix ? jn(t.slice(Math.max(0, a.start - n.prefix.length), a.start), n.prefix) : 1, d = n.suffix ? jn(t.slice(a.end, a.end + n.suffix.length), n.suffix) : 1;
|
|
@@ -3466,7 +3471,7 @@ function _o(t, e, n = {}) {
|
|
|
3466
3471
|
}, o = i.map((a) => ({ start: a.start, end: a.end, score: s(a) }));
|
|
3467
3472
|
return o.sort((a, c) => c.score - a.score), o[0];
|
|
3468
3473
|
}
|
|
3469
|
-
function
|
|
3474
|
+
function Bt(t, e, n) {
|
|
3470
3475
|
const r = n === 1 ? e : e - 1;
|
|
3471
3476
|
if (t.charAt(r).trim() !== "") return e;
|
|
3472
3477
|
let i, s;
|
|
@@ -3483,7 +3488,7 @@ function Vn(t, e) {
|
|
|
3483
3488
|
const a = () => {
|
|
3484
3489
|
if (s = e === 1 ? n.nextNode() : n.previousNode(), s) {
|
|
3485
3490
|
const c = s.textContent, l = e === 1 ? 0 : c.length;
|
|
3486
|
-
o =
|
|
3491
|
+
o = Bt(c, l, e);
|
|
3487
3492
|
}
|
|
3488
3493
|
};
|
|
3489
3494
|
for (; s && o === -1 && s !== i; ) a();
|
|
@@ -3496,7 +3501,7 @@ function Bo(t) {
|
|
|
3496
3501
|
if (t.endContainer.nodeType !== Node.TEXT_NODE) throw new RangeError("Range endContainer is not a text node");
|
|
3497
3502
|
const e = t.cloneRange();
|
|
3498
3503
|
let n = !1, r = !1;
|
|
3499
|
-
const i = { start:
|
|
3504
|
+
const i = { start: Bt(t.startContainer.textContent, t.startOffset, 1), end: Bt(t.endContainer.textContent, t.endOffset, 2) };
|
|
3500
3505
|
if (i.start >= 0 && (e.setStart(t.startContainer, i.start), n = !0), i.end > 0 && (e.setEnd(t.endContainer, i.end), r = !0), n && r) return e;
|
|
3501
3506
|
if (!n) {
|
|
3502
3507
|
const { node: s, offset: o } = Vn(e, 1);
|
|
@@ -3508,7 +3513,7 @@ function Bo(t) {
|
|
|
3508
3513
|
}
|
|
3509
3514
|
return e;
|
|
3510
3515
|
}
|
|
3511
|
-
function
|
|
3516
|
+
function Nr(t) {
|
|
3512
3517
|
switch (t.nodeType) {
|
|
3513
3518
|
case Node.ELEMENT_NODE:
|
|
3514
3519
|
case Node.TEXT_NODE:
|
|
@@ -3519,7 +3524,7 @@ function Lr(t) {
|
|
|
3519
3524
|
}
|
|
3520
3525
|
function Fn(t) {
|
|
3521
3526
|
let e = t.previousSibling, n = 0;
|
|
3522
|
-
for (; e; ) n +=
|
|
3527
|
+
for (; e; ) n += Nr(e), e = e.previousSibling;
|
|
3523
3528
|
return n;
|
|
3524
3529
|
}
|
|
3525
3530
|
function Ir(t, ...e) {
|
|
@@ -3531,7 +3536,7 @@ function Ir(t, ...e) {
|
|
|
3531
3536
|
if (n !== void 0) throw new RangeError("Offset exceeds text length");
|
|
3532
3537
|
return i;
|
|
3533
3538
|
}
|
|
3534
|
-
let Ue = class
|
|
3539
|
+
let Ue = class re {
|
|
3535
3540
|
constructor(e, n) {
|
|
3536
3541
|
if (n < 0) throw new Error("Offset is invalid");
|
|
3537
3542
|
this.element = e, this.offset = n;
|
|
@@ -3540,7 +3545,7 @@ let Ue = class ie {
|
|
|
3540
3545
|
if (!e.contains(this.element)) throw new Error("Parent is not an ancestor of current element");
|
|
3541
3546
|
let n = this.element, r = this.offset;
|
|
3542
3547
|
for (; n !== e; ) r += Fn(n), n = n.parentElement;
|
|
3543
|
-
return new
|
|
3548
|
+
return new re(n, r);
|
|
3544
3549
|
}
|
|
3545
3550
|
resolve(e = {}) {
|
|
3546
3551
|
try {
|
|
@@ -3558,9 +3563,9 @@ let Ue = class ie {
|
|
|
3558
3563
|
static fromCharOffset(e, n) {
|
|
3559
3564
|
switch (e.nodeType) {
|
|
3560
3565
|
case Node.TEXT_NODE:
|
|
3561
|
-
return
|
|
3566
|
+
return re.fromPoint(e, n);
|
|
3562
3567
|
case Node.ELEMENT_NODE:
|
|
3563
|
-
return new
|
|
3568
|
+
return new re(e, n);
|
|
3564
3569
|
default:
|
|
3565
3570
|
throw new Error("Node is not an element or text node");
|
|
3566
3571
|
}
|
|
@@ -3571,19 +3576,19 @@ let Ue = class ie {
|
|
|
3571
3576
|
if (n < 0 || n > e.data.length) throw new Error("Text node offset is out of range");
|
|
3572
3577
|
if (!e.parentElement) throw new Error("Text node has no parent");
|
|
3573
3578
|
const r = Fn(e) + n;
|
|
3574
|
-
return new
|
|
3579
|
+
return new re(e.parentElement, r);
|
|
3575
3580
|
}
|
|
3576
3581
|
case Node.ELEMENT_NODE: {
|
|
3577
3582
|
if (n < 0 || n > e.childNodes.length) throw new Error("Child node offset is out of range");
|
|
3578
3583
|
let r = 0;
|
|
3579
|
-
for (let i = 0; i < n; i++) r +=
|
|
3580
|
-
return new
|
|
3584
|
+
for (let i = 0; i < n; i++) r += Nr(e.childNodes[i]);
|
|
3585
|
+
return new re(e, r);
|
|
3581
3586
|
}
|
|
3582
3587
|
default:
|
|
3583
3588
|
throw new Error("Point is not in an element or text node");
|
|
3584
3589
|
}
|
|
3585
3590
|
}
|
|
3586
|
-
},
|
|
3591
|
+
}, Ut = class Ce {
|
|
3587
3592
|
constructor(e, n) {
|
|
3588
3593
|
this.start = e, this.end = n;
|
|
3589
3594
|
}
|
|
@@ -3606,34 +3611,34 @@ let Ue = class ie {
|
|
|
3606
3611
|
static trimmedRange(e) {
|
|
3607
3612
|
return Bo(Ce.fromRange(e).toRange());
|
|
3608
3613
|
}
|
|
3609
|
-
}, Uo = class
|
|
3614
|
+
}, Uo = class zt {
|
|
3610
3615
|
constructor(e, n, r) {
|
|
3611
3616
|
this.root = e, this.start = n, this.end = r;
|
|
3612
3617
|
}
|
|
3613
3618
|
static fromRange(e, n) {
|
|
3614
|
-
const r =
|
|
3615
|
-
return new
|
|
3619
|
+
const r = Ut.fromRange(n).relativeTo(e);
|
|
3620
|
+
return new zt(e, r.start.offset, r.end.offset);
|
|
3616
3621
|
}
|
|
3617
3622
|
static fromSelector(e, n) {
|
|
3618
|
-
return new
|
|
3623
|
+
return new zt(e, n.start, n.end);
|
|
3619
3624
|
}
|
|
3620
3625
|
toSelector() {
|
|
3621
3626
|
return { type: "TextPositionSelector", start: this.start, end: this.end };
|
|
3622
3627
|
}
|
|
3623
3628
|
toRange() {
|
|
3624
|
-
return
|
|
3629
|
+
return Ut.fromOffsets(this.root, this.start, this.end).toRange();
|
|
3625
3630
|
}
|
|
3626
|
-
}, zo = class
|
|
3631
|
+
}, zo = class jt {
|
|
3627
3632
|
constructor(e, n, r = {}) {
|
|
3628
3633
|
this.root = e, this.exact = n, this.context = r;
|
|
3629
3634
|
}
|
|
3630
3635
|
static fromRange(e, n) {
|
|
3631
|
-
const r = e.textContent, i =
|
|
3632
|
-
return new
|
|
3636
|
+
const r = e.textContent, i = Ut.fromRange(n).relativeTo(e), s = i.start.offset, o = i.end.offset, a = 32;
|
|
3637
|
+
return new jt(e, r.slice(s, o), { prefix: r.slice(Math.max(0, s - a), s), suffix: r.slice(o, Math.min(r.length, o + a)) });
|
|
3633
3638
|
}
|
|
3634
3639
|
static fromSelector(e, n) {
|
|
3635
3640
|
const { prefix: r, suffix: i } = n;
|
|
3636
|
-
return new
|
|
3641
|
+
return new jt(e, n.exact, { prefix: r, suffix: i });
|
|
3637
3642
|
}
|
|
3638
3643
|
toSelector() {
|
|
3639
3644
|
return { type: "TextQuoteSelector", exact: this.exact, prefix: this.context.prefix, suffix: this.context.suffix };
|
|
@@ -3711,7 +3716,7 @@ function ze(t, e, n = !1, r = 0) {
|
|
|
3711
3716
|
for (const d of l) i.push({ bottom: d.bottom, height: d.height, left: d.left, right: d.right, top: d.top, width: d.width });
|
|
3712
3717
|
}
|
|
3713
3718
|
if (r) for (const l of i) l.left -= r, l.top -= r, l.right += r, l.bottom += r, l.width += r * 2, l.height += r * 2;
|
|
3714
|
-
const s =
|
|
3719
|
+
const s = Lr(i, 1, e, n), o = Mo(s, 1), a = Pr(o), c = 4;
|
|
3715
3720
|
for (let l = a.length - 1; l >= 0; l--) {
|
|
3716
3721
|
const d = a[l];
|
|
3717
3722
|
if (!(d.width * d.height > c)) if (a.length > 1) a.splice(l, 1);
|
|
@@ -3719,14 +3724,14 @@ function ze(t, e, n = !1, r = 0) {
|
|
|
3719
3724
|
}
|
|
3720
3725
|
return a;
|
|
3721
3726
|
}
|
|
3722
|
-
function
|
|
3727
|
+
function Lr(t, e, n, r = !1) {
|
|
3723
3728
|
for (let i = 0; i < t.length; i++) for (let s = i + 1; s < t.length; s++) {
|
|
3724
3729
|
const o = t[i], a = t[s];
|
|
3725
3730
|
if (o === a) continue;
|
|
3726
3731
|
const c = q(o.top, a.top, e) && q(o.bottom, a.bottom, e), l = q(o.left, a.left, e) && q(o.right, a.right, e);
|
|
3727
|
-
if ((l && !n && !r || c && !l) &&
|
|
3732
|
+
if ((l && !n && !r || c && !l) && qr(o, a, e)) {
|
|
3728
3733
|
const d = t.filter((g) => g !== o && g !== a), u = Ho(o, a);
|
|
3729
|
-
return d.push(u),
|
|
3734
|
+
return d.push(u), Lr(d, e, n, r);
|
|
3730
3735
|
}
|
|
3731
3736
|
}
|
|
3732
3737
|
return t;
|
|
@@ -3755,10 +3760,10 @@ function Go(t, e, n) {
|
|
|
3755
3760
|
function K(t, e, n, r) {
|
|
3756
3761
|
return (t.left < e || q(t.left, e, r)) && (t.right > e || q(t.right, e, r)) && (t.top < n || q(t.top, n, r)) && (t.bottom > n || q(t.bottom, n, r));
|
|
3757
3762
|
}
|
|
3758
|
-
function
|
|
3763
|
+
function Pr(t) {
|
|
3759
3764
|
for (let e = 0; e < t.length; e++) for (let n = e + 1; n < t.length; n++) {
|
|
3760
3765
|
const r = t[e], i = t[n];
|
|
3761
|
-
if (r !== i &&
|
|
3766
|
+
if (r !== i && qr(r, i, -1)) {
|
|
3762
3767
|
let s = [], o;
|
|
3763
3768
|
const a = Hn(r, i);
|
|
3764
3769
|
if (a.length === 1) s = a, o = r;
|
|
@@ -3767,7 +3772,7 @@ function qr(t) {
|
|
|
3767
3772
|
a.length < l.length ? (s = a, o = r) : (s = l, o = i);
|
|
3768
3773
|
}
|
|
3769
3774
|
const c = t.filter((l) => l !== o);
|
|
3770
|
-
return Array.prototype.push.apply(c, s),
|
|
3775
|
+
return Array.prototype.push.apply(c, s), Pr(c);
|
|
3771
3776
|
}
|
|
3772
3777
|
}
|
|
3773
3778
|
return t;
|
|
@@ -3798,32 +3803,32 @@ function Wo(t, e) {
|
|
|
3798
3803
|
const n = Math.max(t.left, e.left), r = Math.min(t.right, e.right), i = Math.max(t.top, e.top), s = Math.min(t.bottom, e.bottom);
|
|
3799
3804
|
return { bottom: s, height: Math.max(0, s - i), left: n, right: r, top: i, width: Math.max(0, r - n) };
|
|
3800
3805
|
}
|
|
3801
|
-
function
|
|
3806
|
+
function qr(t, e, n) {
|
|
3802
3807
|
return (t.left < e.right || n >= 0 && q(t.left, e.right, n)) && (e.left < t.right || n >= 0 && q(e.left, t.right, n)) && (t.top < e.bottom || n >= 0 && q(t.top, e.bottom, n)) && (e.top < t.bottom || n >= 0 && q(e.top, t.bottom, n));
|
|
3803
3808
|
}
|
|
3804
3809
|
function q(t, e, n) {
|
|
3805
3810
|
return Math.abs(t - e) <= n;
|
|
3806
3811
|
}
|
|
3807
|
-
let je = null,
|
|
3808
|
-
const
|
|
3809
|
-
if (!je) if (typeof OffscreenCanvas < "u") je = new OffscreenCanvas(5, 5),
|
|
3812
|
+
let je = null, xt = null, ke = 0;
|
|
3813
|
+
const ie = { r: 255, g: 255, b: 255, a: 1 }, ee = /* @__PURE__ */ new Map(), Ko = () => {
|
|
3814
|
+
if (!je) if (typeof OffscreenCanvas < "u") je = new OffscreenCanvas(5, 5), xt = je.getContext("2d", { willReadFrequently: !0, desynchronized: !0 });
|
|
3810
3815
|
else {
|
|
3811
3816
|
const t = document.createElement("canvas");
|
|
3812
|
-
t.width = 5, t.height = 5, je = t,
|
|
3817
|
+
t.width = 5, t.height = 5, je = t, xt = t.getContext("2d", { willReadFrequently: !0, desynchronized: !0 });
|
|
3813
3818
|
}
|
|
3814
|
-
return
|
|
3819
|
+
return xt;
|
|
3815
3820
|
}, Jo = (t) => {
|
|
3816
3821
|
if (!t) return !0;
|
|
3817
3822
|
const e = t.trim().toLowerCase();
|
|
3818
3823
|
return e.startsWith("var(") || ["transparent", "currentcolor", "inherit", "initial", "revert", "unset", "revert-layer"].includes(e) ? !0 : ["linear-gradient", "radial-gradient", "conic-gradient", "repeating-linear-gradient", "repeating-radial-gradient", "repeating-conic-gradient"].some((n) => e.includes(n));
|
|
3819
3824
|
}, Ve = (t, e) => {
|
|
3820
|
-
console.warn(`[Decorator] Could not parse color: "${t}". ${e} Falling back to ${JSON.stringify(
|
|
3821
|
-
},
|
|
3822
|
-
const n = e ? `${t}|${e}` : t, r =
|
|
3823
|
-
if (r !== void 0) return r ??
|
|
3824
|
-
if (Jo(t)) return Ve(t, "Unsupported color format or special value."),
|
|
3825
|
+
console.warn(`[Decorator] Could not parse color: "${t}". ${e} Falling back to ${JSON.stringify(ie)} to compute contrast. Please use a CSS color value that can be computed to RGB(A).`);
|
|
3826
|
+
}, X = (t, e = null) => {
|
|
3827
|
+
const n = e ? `${t}|${e}` : t, r = ee.get(n);
|
|
3828
|
+
if (r !== void 0) return r ?? ie;
|
|
3829
|
+
if (Jo(t)) return Ve(t, "Unsupported color format or special value."), ee.set(n, null), ie;
|
|
3825
3830
|
const i = Ko();
|
|
3826
|
-
if (!i) return Ve(t, "Could not get canvas context."),
|
|
3831
|
+
if (!i) return Ve(t, "Could not get canvas context."), ee.set(n, null), ie;
|
|
3827
3832
|
try {
|
|
3828
3833
|
ke === 0 && i.clearRect(0, 0, 5, 5);
|
|
3829
3834
|
const s = ke % 5, o = Math.floor(ke / 5);
|
|
@@ -3831,40 +3836,40 @@ const se = { r: 255, g: 255, b: 255, a: 1 }, te = /* @__PURE__ */ new Map(), Ko
|
|
|
3831
3836
|
const a = i.getImageData(s, o, 1, 1);
|
|
3832
3837
|
ke = (ke + 1) % 25;
|
|
3833
3838
|
const [c, l, d, u] = a.data;
|
|
3834
|
-
if (u === 0) return Ve(t, "Fully transparent color."),
|
|
3839
|
+
if (u === 0) return Ve(t, "Fully transparent color."), ee.set(n, null), ie;
|
|
3835
3840
|
const g = { r: c, g: l, b: d, a: u / 255 };
|
|
3836
|
-
return
|
|
3841
|
+
return ee.set(n, g), g;
|
|
3837
3842
|
} catch (s) {
|
|
3838
|
-
return Ve(t, `Error: ${s instanceof Error ? s.message : String(s)}`),
|
|
3843
|
+
return Ve(t, `Error: ${s instanceof Error ? s.message : String(s)}`), ee.set(n, null), ie;
|
|
3839
3844
|
}
|
|
3840
|
-
},
|
|
3845
|
+
}, kt = (t) => {
|
|
3841
3846
|
const e = t / 255;
|
|
3842
3847
|
return e <= 0.03928 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
3843
|
-
},
|
|
3844
|
-
const e =
|
|
3848
|
+
}, Vt = (t) => {
|
|
3849
|
+
const e = kt(t.r), n = kt(t.g), r = kt(t.b);
|
|
3845
3850
|
return 0.2126 * e + 0.7152 * n + 0.0722 * r;
|
|
3846
|
-
},
|
|
3847
|
-
const n = typeof t == "string" ?
|
|
3851
|
+
}, Xe = (t, e) => {
|
|
3852
|
+
const n = typeof t == "string" ? X(t) : t, r = typeof e == "string" ? X(e) : e, i = Vt(n), s = Vt(r), o = Math.max(i, s), a = Math.min(i, s);
|
|
3848
3853
|
return (o + 0.05) / (a + 0.05);
|
|
3849
|
-
},
|
|
3850
|
-
const n =
|
|
3854
|
+
}, $r = (t, e = null) => {
|
|
3855
|
+
const n = X(t, e), r = Xe(n, { r: 255, g: 255, b: 255, a: 1 }), i = Xe(n, { r: 0, g: 0, b: 0, a: 1 });
|
|
3851
3856
|
return r > i;
|
|
3852
|
-
}, Mn = (t, e = null) =>
|
|
3857
|
+
}, Mn = (t, e = null) => $r(t, e) ? "white" : "black", Qo = (t) => {
|
|
3853
3858
|
const e = t.a !== void 0 ? t.a : 1;
|
|
3854
3859
|
return `rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${e})`;
|
|
3855
|
-
}, Xo = (t, e) => ({ r: Math.min(255, t.r + (255 - t.r) * e), g: Math.min(255, t.g + (255 - t.g) * e), b: Math.min(255, t.b + (255 - t.b) * e), a: t.a ?? 1 }), Zo = (t, e) => ({ r: Math.max(0, t.r * (1 - e)), g: Math.max(0, t.g * (1 - e)), b: Math.max(0, t.b * (1 - e)), a: t.a ?? 1 }),
|
|
3856
|
-
const r =
|
|
3857
|
-
let s =
|
|
3860
|
+
}, Xo = (t, e) => ({ r: Math.min(255, t.r + (255 - t.r) * e), g: Math.min(255, t.g + (255 - t.g) * e), b: Math.min(255, t.b + (255 - t.b) * e), a: t.a ?? 1 }), Zo = (t, e) => ({ r: Math.max(0, t.r * (1 - e)), g: Math.max(0, t.g * (1 - e)), b: Math.max(0, t.b * (1 - e)), a: t.a ?? 1 }), te = (t, e = null, n = 3) => {
|
|
3861
|
+
const r = X(t), i = e ? X(e) : { r: 255, g: 255, b: 255, a: 1 };
|
|
3862
|
+
let s = Xe(r, i);
|
|
3858
3863
|
if (s >= n) return t;
|
|
3859
|
-
const o =
|
|
3864
|
+
const o = Vt(i) < 0.5;
|
|
3860
3865
|
let a = { ...r, a: r.a ?? 1 };
|
|
3861
3866
|
const c = 20, l = 0.1;
|
|
3862
|
-
for (let d = 0; d < c && (o ? a = Xo(a, l) : a = Zo(a, l), s =
|
|
3867
|
+
for (let d = 0; d < c && (o ? a = Xo(a, l) : a = Zo(a, l), s = Xe(a, i), !(s >= n)); d++) ;
|
|
3863
3868
|
return Qo(a);
|
|
3864
|
-
},
|
|
3865
|
-
let
|
|
3869
|
+
}, Dr = () => typeof navigator > "u" ? "" : navigator.userAgent || "", _r = () => typeof navigator > "u" ? void 0 : navigator.userAgentData || void 0;
|
|
3870
|
+
let Br = class {
|
|
3866
3871
|
constructor() {
|
|
3867
|
-
const e =
|
|
3872
|
+
const e = _r(), n = Dr(), r = (s) => (typeof s == "string" || typeof s == "number") && s ? String(s).replace(/_/g, ".").split(".").map((o) => parseInt(o) || 0) : [], i = (s = "") => {
|
|
3868
3873
|
if (!s) return [];
|
|
3869
3874
|
const o = new RegExp("^.*" + s + "[ :\\/]?(\\d+([\\._]\\d+)*).*$");
|
|
3870
3875
|
return o.test(n) ? r(n.replace(o, "$1")) : [];
|
|
@@ -3895,14 +3900,14 @@ let Ur = class {
|
|
|
3895
3900
|
}, []) };
|
|
3896
3901
|
}
|
|
3897
3902
|
};
|
|
3898
|
-
class Yo extends
|
|
3903
|
+
class Yo extends Br {
|
|
3899
3904
|
get iOSRequest() {
|
|
3900
|
-
const e =
|
|
3905
|
+
const e = _r(), n = Dr();
|
|
3901
3906
|
if (this.OS.iOS && !this.OS.iPadOS) return "mobile";
|
|
3902
3907
|
if (this.OS.iPadOS) return /\(iPad;/.test(n) || e && /^iPad(OS)?$/.test(e.platform) ? "mobile" : "desktop";
|
|
3903
3908
|
}
|
|
3904
3909
|
}
|
|
3905
|
-
const el = new
|
|
3910
|
+
const el = new Br();
|
|
3906
3911
|
new Yo();
|
|
3907
3912
|
const Gn = ["div", "span", "p", "br", "hr", "b", "i", "em", "strong", "s", "u", "mark", "small", "sub", "sup", "abbr", "cite", "code", "data", "dfn", "kbd", "q", "samp", "time", "var", "blockquote", "pre", "svg", "g", "path", "circle", "ellipse", "rect", "line", "polygon", "polyline", "text", "tspan", "defs", "use"], tl = /^on/i, nl = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "xlink:href"]), rl = /^\s*(javascript|data):/i;
|
|
3908
3913
|
function il(t, e) {
|
|
@@ -3926,18 +3931,18 @@ function sl(t, e) {
|
|
|
3926
3931
|
for (const { name: i, value: s } of Array.from(r.attributes)) (tl.test(i) || nl.has(i) && rl.test(s)) && r.removeAttribute(i);
|
|
3927
3932
|
}
|
|
3928
3933
|
}
|
|
3929
|
-
function
|
|
3934
|
+
function Ct(t) {
|
|
3930
3935
|
switch (t) {
|
|
3931
|
-
case
|
|
3936
|
+
case A.Mask:
|
|
3932
3937
|
return "rgba(255, 255, 255, 0.5)";
|
|
3933
|
-
case
|
|
3934
|
-
case
|
|
3938
|
+
case A.Highlight:
|
|
3939
|
+
case A.HighlightUnderline:
|
|
3935
3940
|
return "#FFFF00";
|
|
3936
3941
|
default:
|
|
3937
3942
|
return "#FF0000";
|
|
3938
3943
|
}
|
|
3939
3944
|
}
|
|
3940
|
-
const
|
|
3945
|
+
const A = { Highlight: "highlight", HighlightUnderline: "highlightUnderline", Underline: "underline", Strikethrough: "strikethrough", Outline: "outline", TextColor: "textColor", Mask: "mask", Template: "template" };
|
|
3941
3946
|
var al = ((t) => (t.Wrap = "wrap", t.Viewport = "viewport", t.Bounds = "bounds", t.Page = "page", t))(al || {}), ol = ((t) => (t.Boxes = "boxes", t.Bounds = "bounds", t))(ol || {});
|
|
3942
3947
|
const ll = () => "Highlight" in window, Wn = ["IMG", "IMAGE", "AUDIO", "VIDEO", "SVG"];
|
|
3943
3948
|
class cl {
|
|
@@ -3978,7 +3983,7 @@ class cl {
|
|
|
3978
3983
|
}
|
|
3979
3984
|
if (this.experimentalHighlights) {
|
|
3980
3985
|
const { type: o } = e.style, { layout: a, width: c, expand: l } = e.style;
|
|
3981
|
-
o !==
|
|
3986
|
+
o !== A.TextColor && (o === A.Outline || o === A.Template || o === A.Mask || a !== void 0 && a !== "boxes" || c !== void 0 && c !== "wrap" || l) && this.notTextFlag?.set(n, !0);
|
|
3982
3987
|
}
|
|
3983
3988
|
const s = { decoration: e, id: n, range: r, hitRects: [], clickableElements: void 0, container: void 0 };
|
|
3984
3989
|
this.items.push(s), this.layout(s), s.hitRects = this.clientRectsToDocCoords(ze(s.range, !1, !1, (s.decoration.style.expand ?? 0) + this.hitGap())), this.renderLayout([s]);
|
|
@@ -3986,7 +3991,7 @@ class cl {
|
|
|
3986
3991
|
remove(e) {
|
|
3987
3992
|
const n = this.items.findIndex((s) => s.decoration.id === e);
|
|
3988
3993
|
if (n < 0) return;
|
|
3989
|
-
const r = this.items[n], i = r.decoration.style?.type ===
|
|
3994
|
+
const r = this.items[n], i = r.decoration.style?.type === A.Mask;
|
|
3990
3995
|
if (this.items.splice(n, 1), r.clickableElements = void 0, r.container && (r.container.remove(), r.container = void 0), this.experimentalHighlights && !this.notTextFlag?.has(r.id) && r.highlightSubKey) {
|
|
3991
3996
|
const s = this.wnd.CSS.highlights;
|
|
3992
3997
|
s.get(r.highlightSubKey)?.delete(r.range), this.items.some((a) => a.highlightSubKey === r.highlightSubKey) || s.delete(r.highlightSubKey);
|
|
@@ -4025,7 +4030,7 @@ class cl {
|
|
|
4025
4030
|
const { docX: n, docY: r } = this.pointerToDocCoords(e), i = this.wnd.devicePixelRatio;
|
|
4026
4031
|
for (const s of this.items) {
|
|
4027
4032
|
let o;
|
|
4028
|
-
if (s.decoration.style.type ===
|
|
4033
|
+
if (s.decoration.style.type === A.Template) for (const a of s.clickableElements ?? []) {
|
|
4029
4034
|
const c = a.getBoundingClientRect();
|
|
4030
4035
|
if (K(c, e.clientX, e.clientY, 0)) {
|
|
4031
4036
|
o = c;
|
|
@@ -4047,7 +4052,7 @@ class cl {
|
|
|
4047
4052
|
const { docX: n, docY: r } = this.pointerToDocCoords(e), i = this.wnd.devicePixelRatio;
|
|
4048
4053
|
let s, o;
|
|
4049
4054
|
for (const a of this.items) {
|
|
4050
|
-
if (a.decoration.style.type ===
|
|
4055
|
+
if (a.decoration.style.type === A.Template) for (const c of a.clickableElements ?? []) {
|
|
4051
4056
|
const l = c.getBoundingClientRect();
|
|
4052
4057
|
if (K(l, e.clientX, e.clientY, 0)) {
|
|
4053
4058
|
s = a, o = l;
|
|
@@ -4078,12 +4083,12 @@ class cl {
|
|
|
4078
4083
|
});
|
|
4079
4084
|
}
|
|
4080
4085
|
experimentalLayout(e) {
|
|
4081
|
-
const n = this.requireContainer(!0), r = this.wnd.CSS.highlights, i = e.decoration.style, s = i.type ??
|
|
4086
|
+
const n = this.requireContainer(!0), r = this.wnd.CSS.highlights, i = e.decoration.style, s = i.type ?? A.Highlight, o = i.tint ?? Ct(s), a = i.width, c = i.layout, l = this._getSubKey(s, o);
|
|
4082
4087
|
e.highlightSubKey && (r.get(e.highlightSubKey)?.delete(e.range), e.highlightSubKey !== l && !this.items.some((p) => p !== e && p.highlightSubKey === e.highlightSubKey) && r.delete(e.highlightSubKey)), e.highlightSubKey = l;
|
|
4083
4088
|
let d;
|
|
4084
4089
|
r.has(l) ? d = r.get(l) : (d = new this.wnd.Highlight(), r.set(l, d));
|
|
4085
4090
|
const u = (p, m) => this.wnd.document.caretPositionFromPoint?.(p, m) ?? null;
|
|
4086
|
-
if (s ===
|
|
4091
|
+
if (s === A.TextColor && (c === "bounds" || a === "bounds" || a === "page")) {
|
|
4087
4092
|
const p = Se(this.wnd);
|
|
4088
4093
|
if (p.isVertical) console.warn("Vertical writing detected: caretPositionFromPoint has known bugs, falling back to original range"), d.add(e.range);
|
|
4089
4094
|
else {
|
|
@@ -4092,41 +4097,41 @@ class cl {
|
|
|
4092
4097
|
a === "page" ? (w = Math.floor(p.inlineStart(m) / p.pageInlineSize) * p.pageInlineSize, E = p.pageInlineSize) : (w = p.inlineStart(m), E = p.inlineSize(m));
|
|
4093
4098
|
const C = u(w, p.blockStart(m) + 1), N = u(w + E, p.blockStart(m) + p.blockSize(m) - 1);
|
|
4094
4099
|
if (C && N) {
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4100
|
+
const L = this.wnd.document.createRange();
|
|
4101
|
+
L.setStart(C.offsetNode, C.offset), L.setEnd(N.offsetNode, N.offset), d.add(L), e.range = L;
|
|
4097
4102
|
} else d.add(e.range);
|
|
4098
4103
|
}
|
|
4099
4104
|
} else d.add(e.range);
|
|
4100
|
-
const g = this.getBackgroundColor(), f = i.enforceContrast !== !1 ?
|
|
4105
|
+
const g = this.getBackgroundColor(), f = i.enforceContrast !== !1 ? te(o, g) : o;
|
|
4101
4106
|
let y;
|
|
4102
4107
|
switch (s) {
|
|
4103
|
-
case
|
|
4108
|
+
case A.Underline:
|
|
4104
4109
|
y = `::highlight(${l}) {
|
|
4105
4110
|
text-decoration: underline;
|
|
4106
4111
|
text-decoration-color: ${f};
|
|
4107
4112
|
text-decoration-thickness: 0.1em;
|
|
4108
4113
|
}`;
|
|
4109
4114
|
break;
|
|
4110
|
-
case
|
|
4115
|
+
case A.Strikethrough:
|
|
4111
4116
|
y = `::highlight(${l}) {
|
|
4112
4117
|
text-decoration: line-through;
|
|
4113
4118
|
text-decoration-color: ${f};
|
|
4114
4119
|
text-decoration-thickness: 0.1em;
|
|
4115
4120
|
}`;
|
|
4116
4121
|
break;
|
|
4117
|
-
case
|
|
4122
|
+
case A.Outline:
|
|
4118
4123
|
y = `::highlight(${l}) {
|
|
4119
4124
|
outline: 2px solid ${f};
|
|
4120
4125
|
outline-offset: 1px;
|
|
4121
4126
|
}`;
|
|
4122
4127
|
break;
|
|
4123
|
-
case
|
|
4128
|
+
case A.TextColor:
|
|
4124
4129
|
y = `::highlight(${l}) {
|
|
4125
4130
|
color: ${f};
|
|
4126
4131
|
}`;
|
|
4127
4132
|
break;
|
|
4128
|
-
case
|
|
4129
|
-
const { r: p, g: m, b: w } =
|
|
4133
|
+
case A.HighlightUnderline: {
|
|
4134
|
+
const { r: p, g: m, b: w } = X(f), E = `rgba(${p}, ${m}, ${w}, 0.3)`;
|
|
4130
4135
|
y = `::highlight(${l}) {
|
|
4131
4136
|
color: ${Mn(f, g)};
|
|
4132
4137
|
background-color: ${E};
|
|
@@ -4136,7 +4141,7 @@ class cl {
|
|
|
4136
4141
|
}`;
|
|
4137
4142
|
break;
|
|
4138
4143
|
}
|
|
4139
|
-
case
|
|
4144
|
+
case A.Highlight:
|
|
4140
4145
|
default:
|
|
4141
4146
|
y = `::highlight(${l}) {
|
|
4142
4147
|
color: ${Mn(f, g)};
|
|
@@ -4181,12 +4186,12 @@ class cl {
|
|
|
4181
4186
|
r.applyPosition(u, r.inlineStart(m) + r.inlineScrollOffset, r.blockStart(m) + r.blockScrollOffset, r.inlineSize(m), r.blockSize(m), i);
|
|
4182
4187
|
}
|
|
4183
4188
|
}, a = e.range.getBoundingClientRect(), c = e.decoration.style, l = (() => {
|
|
4184
|
-
if (c.type !==
|
|
4189
|
+
if (c.type !== A.Outline) return 0;
|
|
4185
4190
|
const u = c.width;
|
|
4186
4191
|
return u === "page" || u === "viewport" ? 3 : 0;
|
|
4187
4192
|
})();
|
|
4188
4193
|
let d;
|
|
4189
|
-
if (c.type ===
|
|
4194
|
+
if (c.type === A.Template) {
|
|
4190
4195
|
c.stylesheet && this.injectCustomStylesheet(c.stylesheet);
|
|
4191
4196
|
const u = il(this.wnd, c.element);
|
|
4192
4197
|
if (!u) {
|
|
@@ -4195,34 +4200,34 @@ class cl {
|
|
|
4195
4200
|
}
|
|
4196
4201
|
u.style.setProperty("pointer-events", "none"), d = u;
|
|
4197
4202
|
} else {
|
|
4198
|
-
const u = c, g = u.type ??
|
|
4199
|
-
if (g ===
|
|
4203
|
+
const u = c, g = u.type ?? A.Highlight, f = u.tint ?? Ct(g);
|
|
4204
|
+
if (g === A.TextColor) {
|
|
4200
4205
|
e.container = n, e.clickableElements = [];
|
|
4201
4206
|
return;
|
|
4202
4207
|
}
|
|
4203
|
-
if (g ===
|
|
4208
|
+
if (g === A.Mask) {
|
|
4204
4209
|
e.container = n, e.clickableElements = [], this.updateSharedMask();
|
|
4205
4210
|
return;
|
|
4206
4211
|
}
|
|
4207
4212
|
const y = this.getCurrentDarkMode(), p = this.getBackgroundColor(), m = u.enforceContrast !== !1, w = (() => {
|
|
4208
4213
|
switch (g) {
|
|
4209
|
-
case
|
|
4210
|
-
const C = m ?
|
|
4211
|
-
return [N ? `${P}: 0.1em solid ${C} !important` : null, `${
|
|
4214
|
+
case A.Underline: {
|
|
4215
|
+
const C = m ? te(f, p) : f, N = u.layout === "bounds", [L, P] = r.isVertical ? ["border-right", "border-left"] : ["border-bottom", "border-top"];
|
|
4216
|
+
return [N ? `${P}: 0.1em solid ${C} !important` : null, `${L}: 0.1em solid ${C} !important`, "background-color: transparent !important", "box-sizing: border-box !important"].filter(Boolean).join("; ");
|
|
4212
4217
|
}
|
|
4213
|
-
case
|
|
4214
|
-
const C = m ?
|
|
4218
|
+
case A.Strikethrough: {
|
|
4219
|
+
const C = m ? te(f, p) : f;
|
|
4215
4220
|
return u.layout === "bounds" ? [`background: repeating-linear-gradient(-45deg, transparent, transparent 19px, ${C} 19px, ${C} 20px) !important`, "background-color: transparent !important", "box-sizing: border-box !important"].join("; ") : [`background-color: ${C} !important`, "box-sizing: border-box !important"].join("; ");
|
|
4216
4221
|
}
|
|
4217
|
-
case
|
|
4218
|
-
return [`outline: 2px solid ${m ?
|
|
4219
|
-
case
|
|
4220
|
-
const C = m ?
|
|
4222
|
+
case A.Outline:
|
|
4223
|
+
return [`outline: 2px solid ${m ? te(f, p) : f} !important`, "outline-offset: 1px !important", "background-color: transparent !important", "box-sizing: border-box !important"].join("; ");
|
|
4224
|
+
case A.HighlightUnderline: {
|
|
4225
|
+
const C = m ? te(f, p) : f, { r: N, g: L, b: P } = X(C), _ = `rgba(${N}, ${L}, ${P}, 0.3)`, pe = u.layout === "bounds", [me, b] = r.isVertical ? ["border-right", "border-left"] : ["border-bottom", "border-top"];
|
|
4221
4226
|
return [`background-color: ${_} !important`, pe ? `${b}: 0.1em solid ${C} !important` : null, `${me}: 0.1em solid ${C} !important`, "box-sizing: border-box !important"].filter(Boolean).join("; ");
|
|
4222
4227
|
}
|
|
4223
|
-
case
|
|
4228
|
+
case A.Highlight:
|
|
4224
4229
|
default:
|
|
4225
|
-
return [`background-color: ${m ?
|
|
4230
|
+
return [`background-color: ${m ? te(f, p) : f} !important`, `mix-blend-mode: ${y ? "exclusion" : "multiply"} !important`, "opacity: 1 !important", "box-sizing: border-box !important"].join("; ");
|
|
4226
4231
|
}
|
|
4227
4232
|
})(), E = this.wnd.document.createElement("template");
|
|
4228
4233
|
E.innerHTML = `<div data-readium="true" class="readium-${g}" style="${w}"></div>`.trim(), d = E.content.firstElementChild;
|
|
@@ -4233,7 +4238,7 @@ class cl {
|
|
|
4233
4238
|
const g = s ? { left: a.left - s, right: a.right + s, top: a.top - s, bottom: a.bottom + s, width: a.width + s * 2, height: a.height + s * 2 } : a;
|
|
4234
4239
|
o(u, g, a, l), n.append(u);
|
|
4235
4240
|
} else {
|
|
4236
|
-
const u = c.type, g = u ===
|
|
4241
|
+
const u = c.type, g = u === A.Underline || u === A.Strikethrough, f = u === A.Strikethrough, y = g ? Fo(e.range, ["rt", "rp"]) : e.range;
|
|
4237
4242
|
let p = ze(y, !0, r.isVertical, g ? 0 : s);
|
|
4238
4243
|
p = p.sort((m, w) => r.isVertical ? (r.isVertLR ? 1 : -1) * (m.left - w.left) : m.top - w.top);
|
|
4239
4244
|
for (let m of p) {
|
|
@@ -4262,13 +4267,13 @@ class cl {
|
|
|
4262
4267
|
return this.container || (this.shadowRoot || (this.shadowHost = this.wnd.document.createElement("div"), this.shadowHost.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none", this.wnd.document.body.appendChild(this.shadowHost), this.shadowRoot = this.shadowHost.attachShadow({ mode: "open" })), this.container = this.wnd.document.createElement("div"), this.container.setAttribute("id", this.id), this.container.dataset.group = this.name, this.container.dataset.readium = "true", this.container.style.setProperty("pointer-events", "none"), this.container.style.display = "contents", this.shadowRoot.appendChild(this.container)), this.container;
|
|
4263
4268
|
}
|
|
4264
4269
|
getCurrentDarkMode() {
|
|
4265
|
-
return Bn(this.wnd, "--USER__appearance") === "readium-night-on" ||
|
|
4270
|
+
return Bn(this.wnd, "--USER__appearance") === "readium-night-on" || $r(this.getBackgroundColor());
|
|
4266
4271
|
}
|
|
4267
4272
|
getBackgroundColor() {
|
|
4268
4273
|
return Bn(this.wnd, "--USER__backgroundColor") || this.wnd.getComputedStyle(this.wnd.document.documentElement).getPropertyValue("background-color");
|
|
4269
4274
|
}
|
|
4270
4275
|
updateSharedMask() {
|
|
4271
|
-
const e = this.items.filter((g) => g.decoration.style?.type ===
|
|
4276
|
+
const e = this.items.filter((g) => g.decoration.style?.type === A.Mask);
|
|
4272
4277
|
if (e.length === 0) {
|
|
4273
4278
|
this.maskSvg && (this.maskSvg.remove(), this.maskSvg = void 0), this.shadowRoot && (this.shadowRoot.innerHTML = "");
|
|
4274
4279
|
return;
|
|
@@ -4280,13 +4285,13 @@ class cl {
|
|
|
4280
4285
|
let N;
|
|
4281
4286
|
switch (p) {
|
|
4282
4287
|
case "viewport": {
|
|
4283
|
-
const
|
|
4284
|
-
N = n.toRect(
|
|
4288
|
+
const L = Math.floor(n.inlineStart(C) / n.viewportInlineSize) * n.viewportInlineSize;
|
|
4289
|
+
N = n.toRect(L, n.blockStart(C), n.viewportInlineSize, n.blockSize(C));
|
|
4285
4290
|
break;
|
|
4286
4291
|
}
|
|
4287
4292
|
case "page": {
|
|
4288
|
-
const
|
|
4289
|
-
N = n.toRect(
|
|
4293
|
+
const L = Math.floor(n.inlineStart(C) / n.pageInlineSize) * n.pageInlineSize;
|
|
4294
|
+
N = n.toRect(L, n.blockStart(C), n.pageInlineSize, n.blockSize(C));
|
|
4290
4295
|
break;
|
|
4291
4296
|
}
|
|
4292
4297
|
case "bounds": {
|
|
@@ -4317,7 +4322,7 @@ class cl {
|
|
|
4317
4322
|
d && d.setAttribute("d", c);
|
|
4318
4323
|
const u = this.maskSvg.querySelector("rect");
|
|
4319
4324
|
if (u) {
|
|
4320
|
-
const g = e[0].decoration.style.tint, f = g ?? this.getBackgroundColor() ??
|
|
4325
|
+
const g = e[0].decoration.style.tint, f = g ?? this.getBackgroundColor() ?? Ct(A.Mask), y = g ? "1" : "0.5";
|
|
4321
4326
|
u.setAttribute("x", "0"), u.setAttribute("y", "0"), u.setAttribute("width", String(s)), u.setAttribute("height", String(o)), u.setAttribute("fill", f), u.setAttribute("fill-opacity", y);
|
|
4322
4327
|
}
|
|
4323
4328
|
}
|
|
@@ -4335,7 +4340,7 @@ class cl {
|
|
|
4335
4340
|
this.wnd.document.getElementById(`${this.id}-custom-style`)?.remove(), this.container && (this.container.remove(), this.container = void 0);
|
|
4336
4341
|
}
|
|
4337
4342
|
}
|
|
4338
|
-
const
|
|
4343
|
+
const Ur = class Ee extends To {
|
|
4339
4344
|
constructor() {
|
|
4340
4345
|
super(...arguments), this.resizeFrame = 0, this.lastGroupId = 0, this.groups = /* @__PURE__ */ new Map(), this.handleResizer = this.handleResize.bind(this);
|
|
4341
4346
|
}
|
|
@@ -4388,21 +4393,21 @@ const zr = class Ee extends To {
|
|
|
4388
4393
|
return e.removeEventListener("orientationchange", this.handleResizer), e.removeEventListener("resize", this.handleResizer), n.unregisterAll(Ee.moduleName), this.resizeObserver.disconnect(), this.styleObserver.disconnect(), this.cleanup(), n.log("Decorator Unmounted"), !0;
|
|
4389
4394
|
}
|
|
4390
4395
|
};
|
|
4391
|
-
|
|
4392
|
-
let ul =
|
|
4393
|
-
const hl = new Set(Object.values(
|
|
4396
|
+
Ur.moduleName = "decorator";
|
|
4397
|
+
let ul = Ur;
|
|
4398
|
+
const hl = new Set(Object.values(A));
|
|
4394
4399
|
function dl(t, e) {
|
|
4395
|
-
return t ===
|
|
4400
|
+
return t === A.TextColor ? typeof window < "u" && "Highlight" in window : hl.has(t) ? !0 : !!e?.[t];
|
|
4396
4401
|
}
|
|
4397
4402
|
function Kn(t, e) {
|
|
4398
4403
|
const { style: n } = t;
|
|
4399
|
-
if (n.type ===
|
|
4404
|
+
if (n.type === A.Template) {
|
|
4400
4405
|
const r = n;
|
|
4401
4406
|
return { ...t, style: { ...r, element: Jn(r, t) } };
|
|
4402
4407
|
}
|
|
4403
4408
|
if (n.type && e?.[n.type]) {
|
|
4404
4409
|
const r = e[n.type];
|
|
4405
|
-
return { ...t, style: { type:
|
|
4410
|
+
return { ...t, style: { type: A.Template, layout: r.layout, width: r.width, stylesheet: r.stylesheet, element: Jn(r, t) } };
|
|
4406
4411
|
}
|
|
4407
4412
|
return t;
|
|
4408
4413
|
}
|
|
@@ -4411,7 +4416,7 @@ function Jn(t, e) {
|
|
|
4411
4416
|
}
|
|
4412
4417
|
function gl(t, e) {
|
|
4413
4418
|
if (t.type !== e.type) return !1;
|
|
4414
|
-
if (t.type ===
|
|
4419
|
+
if (t.type === A.Template) {
|
|
4415
4420
|
const i = t, s = e;
|
|
4416
4421
|
return i.layout === s.layout && i.width === s.width && i.stylesheet === s.stylesheet;
|
|
4417
4422
|
}
|
|
@@ -4421,7 +4426,7 @@ function gl(t, e) {
|
|
|
4421
4426
|
function fl(t, e) {
|
|
4422
4427
|
return t.locator.href === e.locator.href && JSON.stringify(t.locator.locations?.serialize?.() ?? t.locator.locations) === JSON.stringify(e.locator.locations?.serialize?.() ?? e.locator.locations) && JSON.stringify(t.locator.text ?? null) === JSON.stringify(e.locator.text ?? null) && gl(t.style, e.style) && JSON.stringify(t.extras ?? null) === JSON.stringify(e.extras ?? null);
|
|
4423
4428
|
}
|
|
4424
|
-
let
|
|
4429
|
+
let zr = class {
|
|
4425
4430
|
constructor() {
|
|
4426
4431
|
this.queue = [], this.channel = typeof MessageChannel < "u" ? new MessageChannel() : void 0, this.channel && (this.channel.port1.onmessage = () => this.flush());
|
|
4427
4432
|
}
|
|
@@ -4444,7 +4449,7 @@ class pl {
|
|
|
4444
4449
|
}
|
|
4445
4450
|
let ml = class {
|
|
4446
4451
|
constructor(e) {
|
|
4447
|
-
this.channel = e, this.registrar = /* @__PURE__ */ new Map(), this.outbox = new
|
|
4452
|
+
this.channel = e, this.registrar = /* @__PURE__ */ new Map(), this.outbox = new zr(), this.ready = !0;
|
|
4448
4453
|
}
|
|
4449
4454
|
register(e, n, r) {
|
|
4450
4455
|
(Array.isArray(e) ? e : [e]).forEach((i) => {
|
|
@@ -4484,7 +4489,7 @@ let ml = class {
|
|
|
4484
4489
|
};
|
|
4485
4490
|
class yl {
|
|
4486
4491
|
constructor(e) {
|
|
4487
|
-
this.channel = e, this.listeners = /* @__PURE__ */ new Map(), this.outbox = new
|
|
4492
|
+
this.channel = e, this.listeners = /* @__PURE__ */ new Map(), this.outbox = new zr(), this.ready = !0;
|
|
4488
4493
|
}
|
|
4489
4494
|
send(e, n, r) {
|
|
4490
4495
|
this.outbox.push(() => this.channel.frame._dispatch(e, n, r ?? (() => {
|
|
@@ -4554,7 +4559,7 @@ function vl(t) {
|
|
|
4554
4559
|
function wl(t) {
|
|
4555
4560
|
return t && typeof t == "string" ? [t] : vl(t);
|
|
4556
4561
|
}
|
|
4557
|
-
function
|
|
4562
|
+
function Et(t) {
|
|
4558
4563
|
return isNaN(t) ? void 0 : t;
|
|
4559
4564
|
}
|
|
4560
4565
|
class W {
|
|
@@ -4563,7 +4568,7 @@ class W {
|
|
|
4563
4568
|
}
|
|
4564
4569
|
static deserialize(e) {
|
|
4565
4570
|
if (!e) return;
|
|
4566
|
-
const n =
|
|
4571
|
+
const n = Et(e.progression), r = Et(e.totalProgression), i = Et(e.position), s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(["fragment", "fragments", "progression", "totalProgression", "position", "otherLocations"]);
|
|
4567
4572
|
return Object.entries(e).forEach(([a, c]) => {
|
|
4568
4573
|
o.has(a) || s.set(a, c);
|
|
4569
4574
|
}), e.otherLocations instanceof Map && e.otherLocations.forEach((a, c) => s.set(c, a)), new W({ fragments: wl(e.fragments || e.fragment), progression: n !== void 0 && n >= 0 && n <= 1 ? n : void 0, totalProgression: r !== void 0 && r >= 0 && r <= 1 ? r : void 0, position: i !== void 0 && i > 0 ? i : void 0, otherLocations: s.size === 0 ? void 0 : s });
|
|
@@ -4573,19 +4578,19 @@ class W {
|
|
|
4573
4578
|
return this.fragments && (e.fragments = this.fragments), this.progression !== void 0 && (e.progression = this.progression), this.totalProgression !== void 0 && (e.totalProgression = this.totalProgression), this.position !== void 0 && (e.position = this.position), this.otherLocations && this.otherLocations.forEach((n, r) => e[r] = n), e;
|
|
4574
4579
|
}
|
|
4575
4580
|
}
|
|
4576
|
-
class
|
|
4581
|
+
class lt {
|
|
4577
4582
|
constructor(e) {
|
|
4578
4583
|
this.after = e.after, this.before = e.before, this.highlight = e.highlight;
|
|
4579
4584
|
}
|
|
4580
4585
|
static deserialize(e) {
|
|
4581
|
-
if (e) return new
|
|
4586
|
+
if (e) return new lt({ after: e.after, before: e.before, highlight: e.highlight });
|
|
4582
4587
|
}
|
|
4583
4588
|
serialize() {
|
|
4584
4589
|
const e = {};
|
|
4585
4590
|
return this.after !== void 0 && (e.after = this.after), this.before !== void 0 && (e.before = this.before), this.highlight !== void 0 && (e.highlight = this.highlight), e;
|
|
4586
4591
|
}
|
|
4587
4592
|
}
|
|
4588
|
-
class
|
|
4593
|
+
class Ze {
|
|
4589
4594
|
constructor(e) {
|
|
4590
4595
|
const n = e.href.indexOf("#"), r = n >= 0 ? e.href.slice(n + 1) : void 0;
|
|
4591
4596
|
this.href = n >= 0 ? e.href.slice(0, n) : e.href, this.type = e.type, this.title = e.title;
|
|
@@ -4593,22 +4598,22 @@ class Ye {
|
|
|
4593
4598
|
this.locations = e.locations ? s ? new W({ ...e.locations, fragments: [r] }) : e.locations : r ? new W({ fragments: [r] }) : new W({}), this.text = e.text;
|
|
4594
4599
|
}
|
|
4595
4600
|
static deserialize(e) {
|
|
4596
|
-
if (e && e.href && e.type) return new
|
|
4601
|
+
if (e && e.href && e.type) return new Ze({ href: e.href, type: e.type, title: e.title, locations: W.deserialize(e.locations), text: lt.deserialize(e.text) });
|
|
4597
4602
|
}
|
|
4598
4603
|
serialize() {
|
|
4599
4604
|
const e = { href: this.href, type: this.type };
|
|
4600
4605
|
return this.title !== void 0 && (e.title = this.title), this.locations && (e.locations = this.locations.serialize()), this.text && (e.text = this.text.serialize()), e;
|
|
4601
4606
|
}
|
|
4602
4607
|
copyWithLocations(e) {
|
|
4603
|
-
return new
|
|
4608
|
+
return new Ze({ href: this.href, type: this.type, title: this.title, text: this.text, locations: new W({ ...this.locations, ...e }) });
|
|
4604
4609
|
}
|
|
4605
4610
|
}
|
|
4606
4611
|
function Sl(t, e = window) {
|
|
4607
|
-
const { highlight: n, before: r, after: i, selector: s, fragment: o } = t, c = n !== void 0 || r !== void 0 || i !== void 0 ? new
|
|
4612
|
+
const { highlight: n, before: r, after: i, selector: s, fragment: o } = t, c = n !== void 0 || r !== void 0 || i !== void 0 ? new lt({ highlight: n, before: r, after: i }) : void 0, l = s ? /* @__PURE__ */ new Map([["cssSelector", s]]) : void 0, u = l !== void 0 || o !== void 0 ? new W({
|
|
4608
4613
|
fragments: o ? [o] : void 0,
|
|
4609
4614
|
otherLocations: l
|
|
4610
4615
|
}) : void 0;
|
|
4611
|
-
return new
|
|
4616
|
+
return new Ze({
|
|
4612
4617
|
href: e.location.href,
|
|
4613
4618
|
type: "text/html",
|
|
4614
4619
|
text: c,
|
|
@@ -4637,11 +4642,11 @@ class xl extends bl {
|
|
|
4637
4642
|
super.destroy(), this.decorator.unmount(this.wnd, this.channel.frame), this.channel.frame.destroy();
|
|
4638
4643
|
}
|
|
4639
4644
|
}
|
|
4640
|
-
function
|
|
4645
|
+
function vc(t = window, e = {}) {
|
|
4641
4646
|
const n = new pl(), r = new ul();
|
|
4642
4647
|
return r.mount(t, n.frame), new xl(n, t, r, e);
|
|
4643
4648
|
}
|
|
4644
|
-
class
|
|
4649
|
+
class wc {
|
|
4645
4650
|
providers = /* @__PURE__ */ new Map();
|
|
4646
4651
|
register(e) {
|
|
4647
4652
|
if (this.providers.has(e.id))
|
|
@@ -4681,7 +4686,7 @@ class vc {
|
|
|
4681
4686
|
return n;
|
|
4682
4687
|
}
|
|
4683
4688
|
}
|
|
4684
|
-
const
|
|
4689
|
+
const Ye = { range: [0, 5e3], step: 100 }, et = { range: [0.1, 10], step: 0.1 }, tt = { range: [0, 2], step: 0.1 }, nt = { range: [0, 1], step: 0.05 }, Yt = ["none", "few", "some", "most", "custom"], en = ["none", "block-level", "always"], tn = ["plain", "ssml"], nn = ["none", "utterance", "block"], Qn = [
|
|
4685
4690
|
"format",
|
|
4686
4691
|
"inlineContextualization",
|
|
4687
4692
|
"verbosity",
|
|
@@ -4689,7 +4694,7 @@ const et = { range: [0, 5e3], step: 100 }, tt = { range: [0.1, 10], step: 0.1 },
|
|
|
4689
4694
|
"contextualize",
|
|
4690
4695
|
"language"
|
|
4691
4696
|
];
|
|
4692
|
-
function
|
|
4697
|
+
function rn(t) {
|
|
4693
4698
|
return t == null || typeof t == "boolean" ? t : void 0;
|
|
4694
4699
|
}
|
|
4695
4700
|
function V(t, e) {
|
|
@@ -4712,13 +4717,12 @@ class kl {
|
|
|
4712
4717
|
contextualize;
|
|
4713
4718
|
language;
|
|
4714
4719
|
pauseDuration;
|
|
4715
|
-
|
|
4716
|
-
automaticPausesAtPageOrSpreadEnd;
|
|
4720
|
+
autoPause;
|
|
4717
4721
|
rate;
|
|
4718
4722
|
pitch;
|
|
4719
4723
|
volume;
|
|
4720
4724
|
constructor(e = {}) {
|
|
4721
|
-
this.format = V(e.format,
|
|
4725
|
+
this.format = V(e.format, tn) ?? "plain", this.inlineContextualization = rn(e.inlineContextualization) ?? !1, this.verbosity = V(e.verbosity, Yt) ?? "few", this.skip = Re(e.skip) ?? [], this.contextualize = Re(e.contextualize) ?? [], this.language = V(e.language, en) ?? "block-level", this.pauseDuration = F(e.pauseDuration, Ye.range) ?? 300, this.autoPause = V(e.autoPause, nn) ?? "none", this.rate = F(e.rate, et.range) ?? 1, this.pitch = F(e.pitch, tt.range) ?? 1, this.volume = F(e.volume, nt.range) ?? 1;
|
|
4722
4726
|
}
|
|
4723
4727
|
}
|
|
4724
4728
|
class Ne {
|
|
@@ -4729,13 +4733,12 @@ class Ne {
|
|
|
4729
4733
|
contextualize;
|
|
4730
4734
|
language;
|
|
4731
4735
|
pauseDuration;
|
|
4732
|
-
|
|
4733
|
-
automaticPausesAtPageOrSpreadEnd;
|
|
4736
|
+
autoPause;
|
|
4734
4737
|
rate;
|
|
4735
4738
|
pitch;
|
|
4736
4739
|
volume;
|
|
4737
4740
|
constructor(e = {}) {
|
|
4738
|
-
this.format = V(e.format,
|
|
4741
|
+
this.format = V(e.format, tn), this.inlineContextualization = rn(e.inlineContextualization), this.verbosity = V(e.verbosity, Yt), this.skip = Re(e.skip), this.contextualize = Re(e.contextualize), this.language = V(e.language, en), this.pauseDuration = F(e.pauseDuration, Ye.range), this.autoPause = V(e.autoPause, nn), this.rate = F(e.rate, et.range), this.pitch = F(e.pitch, tt.range), this.volume = F(e.volume, nt.range);
|
|
4739
4742
|
}
|
|
4740
4743
|
merging(e) {
|
|
4741
4744
|
const n = { ...this };
|
|
@@ -4744,7 +4747,7 @@ class Ne {
|
|
|
4744
4747
|
return new Ne(n);
|
|
4745
4748
|
}
|
|
4746
4749
|
}
|
|
4747
|
-
class
|
|
4750
|
+
class ct {
|
|
4748
4751
|
_value;
|
|
4749
4752
|
_effectiveValue;
|
|
4750
4753
|
_isEffective;
|
|
@@ -4773,7 +4776,7 @@ class ut {
|
|
|
4773
4776
|
this._value = null, this._onChange(this._value);
|
|
4774
4777
|
}
|
|
4775
4778
|
}
|
|
4776
|
-
class Fe extends
|
|
4779
|
+
class Fe extends ct {
|
|
4777
4780
|
_supportedValues;
|
|
4778
4781
|
constructor({
|
|
4779
4782
|
initialValue: e = null,
|
|
@@ -4796,9 +4799,9 @@ class Fe extends ut {
|
|
|
4796
4799
|
return this._supportedValues;
|
|
4797
4800
|
}
|
|
4798
4801
|
}
|
|
4799
|
-
class
|
|
4802
|
+
class Cl extends ct {
|
|
4800
4803
|
set value(e) {
|
|
4801
|
-
if (e != null &&
|
|
4804
|
+
if (e != null && rn(e) === void 0)
|
|
4802
4805
|
throw new Error(`Value '${String(e)}' is not a boolean.`);
|
|
4803
4806
|
this._value = e, this._onChange(this._value);
|
|
4804
4807
|
}
|
|
@@ -4806,7 +4809,7 @@ class Xn extends ut {
|
|
|
4806
4809
|
return this._value;
|
|
4807
4810
|
}
|
|
4808
4811
|
}
|
|
4809
|
-
class
|
|
4812
|
+
class Xn extends ct {
|
|
4810
4813
|
set value(e) {
|
|
4811
4814
|
if (e != null && Re(e) === void 0)
|
|
4812
4815
|
throw new Error(`Value '${String(e)}' is not an array of strings.`);
|
|
@@ -4816,7 +4819,7 @@ class Zn extends ut {
|
|
|
4816
4819
|
return this._value;
|
|
4817
4820
|
}
|
|
4818
4821
|
}
|
|
4819
|
-
class He extends
|
|
4822
|
+
class He extends ct {
|
|
4820
4823
|
_supportedRange;
|
|
4821
4824
|
_step;
|
|
4822
4825
|
_decimals;
|
|
@@ -4860,7 +4863,7 @@ class He extends ut {
|
|
|
4860
4863
|
return e.toString();
|
|
4861
4864
|
}
|
|
4862
4865
|
}
|
|
4863
|
-
class
|
|
4866
|
+
class Zn {
|
|
4864
4867
|
preferences;
|
|
4865
4868
|
settings;
|
|
4866
4869
|
// Cloned rather than aliased: edits made through this editor's setters
|
|
@@ -4881,8 +4884,7 @@ class Yn {
|
|
|
4881
4884
|
contextualize: null,
|
|
4882
4885
|
language: null,
|
|
4883
4886
|
pauseDuration: null,
|
|
4884
|
-
|
|
4885
|
-
automaticPausesAtPageOrSpreadEnd: null,
|
|
4887
|
+
autoPause: null,
|
|
4886
4888
|
rate: null,
|
|
4887
4889
|
pitch: null,
|
|
4888
4890
|
volume: null
|
|
@@ -4897,11 +4899,11 @@ class Yn {
|
|
|
4897
4899
|
effectiveValue: this.settings.format,
|
|
4898
4900
|
isEffective: this.preferences.format != null,
|
|
4899
4901
|
onChange: (e) => this.updatePreference("format", e ?? null),
|
|
4900
|
-
supportedValues:
|
|
4902
|
+
supportedValues: tn
|
|
4901
4903
|
});
|
|
4902
4904
|
}
|
|
4903
4905
|
get inlineContextualization() {
|
|
4904
|
-
return new
|
|
4906
|
+
return new Cl({
|
|
4905
4907
|
initialValue: this.preferences.inlineContextualization,
|
|
4906
4908
|
effectiveValue: this.settings.inlineContextualization,
|
|
4907
4909
|
isEffective: this.preferences.inlineContextualization != null,
|
|
@@ -4914,11 +4916,11 @@ class Yn {
|
|
|
4914
4916
|
effectiveValue: this.settings.verbosity,
|
|
4915
4917
|
isEffective: this.preferences.verbosity != null,
|
|
4916
4918
|
onChange: (e) => this.updatePreference("verbosity", e ?? null),
|
|
4917
|
-
supportedValues:
|
|
4919
|
+
supportedValues: Yt
|
|
4918
4920
|
});
|
|
4919
4921
|
}
|
|
4920
4922
|
get skip() {
|
|
4921
|
-
return new
|
|
4923
|
+
return new Xn({
|
|
4922
4924
|
initialValue: this.preferences.skip,
|
|
4923
4925
|
effectiveValue: this.settings.skip,
|
|
4924
4926
|
isEffective: this.preferences.skip != null,
|
|
@@ -4926,7 +4928,7 @@ class Yn {
|
|
|
4926
4928
|
});
|
|
4927
4929
|
}
|
|
4928
4930
|
get contextualize() {
|
|
4929
|
-
return new
|
|
4931
|
+
return new Xn({
|
|
4930
4932
|
initialValue: this.preferences.contextualize,
|
|
4931
4933
|
effectiveValue: this.settings.contextualize,
|
|
4932
4934
|
isEffective: this.preferences.contextualize != null,
|
|
@@ -4939,7 +4941,7 @@ class Yn {
|
|
|
4939
4941
|
effectiveValue: this.settings.language,
|
|
4940
4942
|
isEffective: this.preferences.language != null,
|
|
4941
4943
|
onChange: (e) => this.updatePreference("language", e ?? null),
|
|
4942
|
-
supportedValues:
|
|
4944
|
+
supportedValues: en
|
|
4943
4945
|
});
|
|
4944
4946
|
}
|
|
4945
4947
|
get pauseDuration() {
|
|
@@ -4948,27 +4950,17 @@ class Yn {
|
|
|
4948
4950
|
effectiveValue: this.settings.pauseDuration,
|
|
4949
4951
|
isEffective: this.preferences.pauseDuration != null,
|
|
4950
4952
|
onChange: (e) => this.updatePreference("pauseDuration", e ?? null),
|
|
4951
|
-
supportedRange:
|
|
4952
|
-
step:
|
|
4953
|
+
supportedRange: Ye.range,
|
|
4954
|
+
step: Ye.step
|
|
4953
4955
|
});
|
|
4954
4956
|
}
|
|
4955
|
-
get
|
|
4957
|
+
get autoPause() {
|
|
4956
4958
|
return new Fe({
|
|
4957
|
-
initialValue: this.preferences.
|
|
4958
|
-
effectiveValue: this.settings.
|
|
4959
|
-
isEffective: this.preferences.
|
|
4960
|
-
onChange: (e) => this.updatePreference("
|
|
4961
|
-
supportedValues:
|
|
4962
|
-
});
|
|
4963
|
-
}
|
|
4964
|
-
// No page/spread boundary signal exists in this library yet, so this
|
|
4965
|
-
// has no effect on playback.
|
|
4966
|
-
get automaticPausesAtPageOrSpreadEnd() {
|
|
4967
|
-
return new Xn({
|
|
4968
|
-
initialValue: this.preferences.automaticPausesAtPageOrSpreadEnd,
|
|
4969
|
-
effectiveValue: this.settings.automaticPausesAtPageOrSpreadEnd,
|
|
4970
|
-
isEffective: this.preferences.automaticPausesAtPageOrSpreadEnd != null,
|
|
4971
|
-
onChange: (e) => this.updatePreference("automaticPausesAtPageOrSpreadEnd", e ?? null)
|
|
4959
|
+
initialValue: this.preferences.autoPause,
|
|
4960
|
+
effectiveValue: this.settings.autoPause,
|
|
4961
|
+
isEffective: this.preferences.autoPause != null,
|
|
4962
|
+
onChange: (e) => this.updatePreference("autoPause", e ?? null),
|
|
4963
|
+
supportedValues: nn
|
|
4972
4964
|
});
|
|
4973
4965
|
}
|
|
4974
4966
|
get rate() {
|
|
@@ -4977,8 +4969,8 @@ class Yn {
|
|
|
4977
4969
|
effectiveValue: this.settings.rate,
|
|
4978
4970
|
isEffective: this.preferences.rate != null,
|
|
4979
4971
|
onChange: (e) => this.updatePreference("rate", e ?? null),
|
|
4980
|
-
supportedRange:
|
|
4981
|
-
step:
|
|
4972
|
+
supportedRange: et.range,
|
|
4973
|
+
step: et.step
|
|
4982
4974
|
});
|
|
4983
4975
|
}
|
|
4984
4976
|
get pitch() {
|
|
@@ -4987,8 +4979,8 @@ class Yn {
|
|
|
4987
4979
|
effectiveValue: this.settings.pitch,
|
|
4988
4980
|
isEffective: this.preferences.pitch != null,
|
|
4989
4981
|
onChange: (e) => this.updatePreference("pitch", e ?? null),
|
|
4990
|
-
supportedRange:
|
|
4991
|
-
step:
|
|
4982
|
+
supportedRange: tt.range,
|
|
4983
|
+
step: tt.step
|
|
4992
4984
|
});
|
|
4993
4985
|
}
|
|
4994
4986
|
get volume() {
|
|
@@ -4997,13 +4989,13 @@ class Yn {
|
|
|
4997
4989
|
effectiveValue: this.settings.volume,
|
|
4998
4990
|
isEffective: this.preferences.volume != null,
|
|
4999
4991
|
onChange: (e) => this.updatePreference("volume", e ?? null),
|
|
5000
|
-
supportedRange:
|
|
5001
|
-
step:
|
|
4992
|
+
supportedRange: nt.range,
|
|
4993
|
+
step: nt.step
|
|
5002
4994
|
});
|
|
5003
4995
|
}
|
|
5004
4996
|
}
|
|
5005
|
-
const
|
|
5006
|
-
...
|
|
4997
|
+
const jr = ["audio", "figure", "image", "math", "table", "video"], Vr = [
|
|
4998
|
+
...jr,
|
|
5007
4999
|
"blockquote",
|
|
5008
5000
|
"cell",
|
|
5009
5001
|
"chapter",
|
|
@@ -5018,8 +5010,8 @@ const Vr = ["audio", "figure", "image", "math", "table", "video"], Fr = [
|
|
|
5018
5010
|
"rowheader",
|
|
5019
5011
|
"subtitle",
|
|
5020
5012
|
"tip"
|
|
5021
|
-
],
|
|
5022
|
-
...
|
|
5013
|
+
], El = [
|
|
5014
|
+
...Vr,
|
|
5023
5015
|
"abstract",
|
|
5024
5016
|
"acknowledgments",
|
|
5025
5017
|
"afterword",
|
|
@@ -5060,7 +5052,7 @@ const Vr = ["audio", "figure", "image", "math", "table", "video"], Fr = [
|
|
|
5060
5052
|
"separator",
|
|
5061
5053
|
"summary",
|
|
5062
5054
|
"term"
|
|
5063
|
-
],
|
|
5055
|
+
], Al = {
|
|
5064
5056
|
none: /* @__PURE__ */ new Set([
|
|
5065
5057
|
"aside",
|
|
5066
5058
|
"bibliography",
|
|
@@ -5124,11 +5116,11 @@ const Vr = ["audio", "figure", "image", "math", "table", "video"], Fr = [
|
|
|
5124
5116
|
most: /* @__PURE__ */ new Set(["landmarks", "loa", "loi", "lot", "lov", "toc"])
|
|
5125
5117
|
}, Ol = {
|
|
5126
5118
|
none: /* @__PURE__ */ new Set(),
|
|
5127
|
-
few: new Set(
|
|
5128
|
-
some: new Set(
|
|
5129
|
-
most: new Set(
|
|
5119
|
+
few: new Set(jr),
|
|
5120
|
+
some: new Set(Vr),
|
|
5121
|
+
most: new Set(El)
|
|
5130
5122
|
};
|
|
5131
|
-
class
|
|
5123
|
+
class Yn {
|
|
5132
5124
|
format;
|
|
5133
5125
|
inlineContextualization;
|
|
5134
5126
|
verbosity;
|
|
@@ -5136,37 +5128,36 @@ class er {
|
|
|
5136
5128
|
contextualize;
|
|
5137
5129
|
language;
|
|
5138
5130
|
pauseDuration;
|
|
5139
|
-
|
|
5140
|
-
automaticPausesAtPageOrSpreadEnd;
|
|
5131
|
+
autoPause;
|
|
5141
5132
|
rate;
|
|
5142
5133
|
pitch;
|
|
5143
5134
|
volume;
|
|
5144
5135
|
constructor(e, n) {
|
|
5145
|
-
this.format = e.format ?? n.format, this.inlineContextualization = e.inlineContextualization ?? n.inlineContextualization, this.verbosity = e.verbosity ?? n.verbosity, this.verbosity === "custom" ? (this.skip = e.skip ?? n.skip, this.contextualize = e.contextualize ?? n.contextualize) : (this.skip = [...
|
|
5136
|
+
this.format = e.format ?? n.format, this.inlineContextualization = e.inlineContextualization ?? n.inlineContextualization, this.verbosity = e.verbosity ?? n.verbosity, this.verbosity === "custom" ? (this.skip = e.skip ?? n.skip, this.contextualize = e.contextualize ?? n.contextualize) : (this.skip = [...Al[this.verbosity]], this.contextualize = [...Ol[this.verbosity]]), this.language = e.language ?? n.language, this.pauseDuration = e.pauseDuration ?? n.pauseDuration, this.autoPause = e.autoPause ?? n.autoPause, this.rate = e.rate ?? n.rate, this.pitch = e.pitch ?? n.pitch, this.volume = e.volume ?? n.volume;
|
|
5146
5137
|
}
|
|
5147
5138
|
}
|
|
5148
5139
|
function Pe(t) {
|
|
5149
5140
|
return t.plain === "" && t.ssml === "" && t.language === "";
|
|
5150
5141
|
}
|
|
5151
|
-
function
|
|
5142
|
+
function Tl(t) {
|
|
5152
5143
|
if (!t || Pe(t)) return;
|
|
5153
5144
|
if (t.ssml === "" && t.language === "") return t.plain;
|
|
5154
5145
|
const e = { language: t.language };
|
|
5155
5146
|
return t.plain !== "" && (e.plain = t.plain), t.ssml !== "" && (e.ssml = t.ssml), e;
|
|
5156
5147
|
}
|
|
5157
|
-
function
|
|
5148
|
+
function Rl(t, e) {
|
|
5158
5149
|
if (t.lang !== e.lang || t.tag !== e.tag) return !1;
|
|
5159
5150
|
const n = Object.entries(t.attrs ?? {}), r = Object.entries(e.attrs ?? {});
|
|
5160
5151
|
return n.length !== r.length ? !1 : n.every(([i, s]) => e.attrs?.[i] === s);
|
|
5161
5152
|
}
|
|
5162
|
-
const
|
|
5163
|
-
function
|
|
5164
|
-
return
|
|
5153
|
+
const rt = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), At = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Nl = /[\u00A0\u2007\u202F]/;
|
|
5154
|
+
function Il(t) {
|
|
5155
|
+
return Nl.test(t);
|
|
5165
5156
|
}
|
|
5166
|
-
function
|
|
5157
|
+
function Ie(t, e) {
|
|
5167
5158
|
let n = "", r = !1, i = !1;
|
|
5168
5159
|
for (const s of t)
|
|
5169
|
-
if (
|
|
5160
|
+
if (Il(s))
|
|
5170
5161
|
n += s, r = !1, i = !0;
|
|
5171
5162
|
else if (/\s/.test(s)) {
|
|
5172
5163
|
if (e && !i || r) continue;
|
|
@@ -5240,51 +5231,51 @@ const Ll = {
|
|
|
5240
5231
|
term: "Term.",
|
|
5241
5232
|
summary: "Summary.",
|
|
5242
5233
|
separator: "Separator."
|
|
5243
|
-
},
|
|
5244
|
-
function
|
|
5245
|
-
return t.replace(
|
|
5234
|
+
}, Pl = /<lang xml:lang="[^"]*">([\s\S]*?)<\/lang>/g;
|
|
5235
|
+
function Fr(t) {
|
|
5236
|
+
return t.replace(Pl, "$1");
|
|
5246
5237
|
}
|
|
5247
|
-
const
|
|
5248
|
-
function
|
|
5249
|
-
return t.replace(
|
|
5238
|
+
const ql = /\s*<readium:[a-zA-Z][\w-]*\s+id="[^"]*"\s*\/>\s*/g;
|
|
5239
|
+
function $l(t) {
|
|
5240
|
+
return t.replace(ql, (n, r, i) => {
|
|
5250
5241
|
const s = i.slice(r + n.length);
|
|
5251
|
-
return s.length === 0 ||
|
|
5242
|
+
return s.length === 0 || ot(s) ? "" : " ";
|
|
5252
5243
|
}).replace(/ {2,}/g, " ").trim();
|
|
5253
5244
|
}
|
|
5254
|
-
function
|
|
5245
|
+
function Dl(t) {
|
|
5255
5246
|
return t.includes("<");
|
|
5256
5247
|
}
|
|
5257
|
-
function
|
|
5248
|
+
function Hr(t) {
|
|
5258
5249
|
if (t === void 0) return;
|
|
5259
5250
|
if (typeof t == "string") return { plain: t };
|
|
5260
5251
|
const e = { language: t.language };
|
|
5261
5252
|
if (t.ssml) {
|
|
5262
|
-
const n =
|
|
5263
|
-
|
|
5253
|
+
const n = $l(t.ssml);
|
|
5254
|
+
Dl(n) && (e.ssml = n);
|
|
5264
5255
|
}
|
|
5265
5256
|
return t.plain && (e.plain = t.plain), e.plain || e.ssml ? e : void 0;
|
|
5266
5257
|
}
|
|
5267
5258
|
function sn(t) {
|
|
5268
5259
|
return t.replace(/<[^>]+>/g, "").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/ {2,}/g, " ").trim();
|
|
5269
5260
|
}
|
|
5270
|
-
const
|
|
5271
|
-
function
|
|
5272
|
-
return new RegExp(
|
|
5261
|
+
const Mr = /<lang xml:lang="([^"]*)">([\s\S]*?)<\/lang>/g;
|
|
5262
|
+
function Gr(t) {
|
|
5263
|
+
return new RegExp(Mr).test(t);
|
|
5273
5264
|
}
|
|
5274
|
-
function
|
|
5265
|
+
function er(t) {
|
|
5275
5266
|
return t.replace(/<[^>]+>/g, "").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/ {2,}/g, " ");
|
|
5276
5267
|
}
|
|
5277
|
-
const
|
|
5278
|
-
`\\s+|[${
|
|
5268
|
+
const _l = new RegExp(
|
|
5269
|
+
`\\s+|[${Dt}]+|[${oe}]+|[^\\s${Dt}${oe}]+`,
|
|
5279
5270
|
"gu"
|
|
5280
5271
|
);
|
|
5281
|
-
function
|
|
5272
|
+
function Ot(t) {
|
|
5282
5273
|
const e = [];
|
|
5283
|
-
for (const [n] of t.matchAll(
|
|
5284
|
-
/^\s/.test(n) ? e.push({ kind: "space" }) : lo(n) ? e.push({ kind: "open", text: n }) :
|
|
5274
|
+
for (const [n] of t.matchAll(_l))
|
|
5275
|
+
/^\s/.test(n) ? e.push({ kind: "space" }) : lo(n) ? e.push({ kind: "open", text: n }) : ot(n) ? e.push({ kind: "close", text: n }) : e.push({ kind: "word", text: n });
|
|
5285
5276
|
return e;
|
|
5286
5277
|
}
|
|
5287
|
-
function
|
|
5278
|
+
function Bl(t) {
|
|
5288
5279
|
let e = "", n = !1;
|
|
5289
5280
|
for (const r of t) {
|
|
5290
5281
|
if (r.kind === "space") {
|
|
@@ -5295,57 +5286,57 @@ function _l(t) {
|
|
|
5295
5286
|
}
|
|
5296
5287
|
return e;
|
|
5297
5288
|
}
|
|
5298
|
-
function
|
|
5289
|
+
function Ul(t) {
|
|
5299
5290
|
let e = t.length;
|
|
5300
5291
|
for (; e > 0 && (t[e - 1].kind === "space" || t[e - 1].kind === "open"); ) e--;
|
|
5301
5292
|
return t.slice(e).some((n) => n.kind === "open") ? t.splice(e) : [];
|
|
5302
5293
|
}
|
|
5303
|
-
function
|
|
5294
|
+
function zl(t) {
|
|
5304
5295
|
let e = 0;
|
|
5305
5296
|
for (; e < t.length && (t[e].kind === "space" || t[e].kind === "close"); ) e++;
|
|
5306
5297
|
return t.slice(0, e).some((n) => n.kind === "close") ? t.splice(0, e) : [];
|
|
5307
5298
|
}
|
|
5308
|
-
function
|
|
5299
|
+
function Wr(t, e) {
|
|
5309
5300
|
const n = [];
|
|
5310
5301
|
let r = 0;
|
|
5311
|
-
for (const s of t.matchAll(
|
|
5302
|
+
for (const s of t.matchAll(Mr))
|
|
5312
5303
|
n.push({
|
|
5313
|
-
tokens:
|
|
5304
|
+
tokens: Ot(er(t.slice(r, s.index))),
|
|
5314
5305
|
language: e,
|
|
5315
5306
|
tagged: !1
|
|
5316
|
-
}), n.push({ tokens:
|
|
5307
|
+
}), n.push({ tokens: Ot(sn(s[2])), language: s[1], tagged: !0 }), r = s.index + s[0].length;
|
|
5317
5308
|
n.push({
|
|
5318
|
-
tokens:
|
|
5309
|
+
tokens: Ot(er(t.slice(r))),
|
|
5319
5310
|
language: e,
|
|
5320
5311
|
tagged: !1
|
|
5321
5312
|
});
|
|
5322
5313
|
for (let s = 0; s < n.length - 1; s++)
|
|
5323
|
-
!n[s].tagged && n[s + 1].tagged ? n[s + 1].tokens.unshift(...
|
|
5314
|
+
!n[s].tagged && n[s + 1].tagged ? n[s + 1].tokens.unshift(...Ul(n[s].tokens)) : n[s].tagged && !n[s + 1].tagged && n[s].tokens.push(...zl(n[s + 1].tokens));
|
|
5324
5315
|
const i = [];
|
|
5325
5316
|
for (const s of n) {
|
|
5326
|
-
const o =
|
|
5317
|
+
const o = Bl(s.tokens);
|
|
5327
5318
|
o && i.push({ plain: o, language: s.language });
|
|
5328
5319
|
}
|
|
5329
5320
|
return i;
|
|
5330
5321
|
}
|
|
5331
|
-
const
|
|
5332
|
-
function zl(t) {
|
|
5333
|
-
return new RegExp(Jr).test(t);
|
|
5334
|
-
}
|
|
5322
|
+
const Kr = /<readium:[a-zA-Z][\w-]*\s+id="([^"]*)"\s*\/>/g;
|
|
5335
5323
|
function jl(t) {
|
|
5324
|
+
return new RegExp(Kr).test(t);
|
|
5325
|
+
}
|
|
5326
|
+
function Vl(t) {
|
|
5336
5327
|
const e = [];
|
|
5337
5328
|
let n = 0;
|
|
5338
|
-
for (const i of t.matchAll(
|
|
5329
|
+
for (const i of t.matchAll(Kr)) {
|
|
5339
5330
|
const s = t.slice(n, i.index).trim();
|
|
5340
5331
|
s && e.push({ ssml: s }), e.push({ placeholderId: i[1] }), n = i.index + i[0].length;
|
|
5341
5332
|
}
|
|
5342
5333
|
const r = t.slice(n).trim();
|
|
5343
5334
|
return r && e.push({ ssml: r }), e;
|
|
5344
5335
|
}
|
|
5345
|
-
function
|
|
5336
|
+
function it(t) {
|
|
5346
5337
|
return typeof t == "object";
|
|
5347
5338
|
}
|
|
5348
|
-
const
|
|
5339
|
+
const Sc = [
|
|
5349
5340
|
// Ancillary content
|
|
5350
5341
|
"aside",
|
|
5351
5342
|
"bibliography",
|
|
@@ -5362,7 +5353,7 @@ const wc = [
|
|
|
5362
5353
|
"lov",
|
|
5363
5354
|
"pagebreak",
|
|
5364
5355
|
"toc"
|
|
5365
|
-
],
|
|
5356
|
+
], Fl = [
|
|
5366
5357
|
// Headings
|
|
5367
5358
|
"heading1",
|
|
5368
5359
|
"heading2",
|
|
@@ -5420,30 +5411,33 @@ const wc = [
|
|
|
5420
5411
|
"section",
|
|
5421
5412
|
"summary",
|
|
5422
5413
|
"tip"
|
|
5423
|
-
],
|
|
5424
|
-
function
|
|
5414
|
+
], Hl = new Set(Fl);
|
|
5415
|
+
function Le(t, e) {
|
|
5425
5416
|
return typeof t == "function" ? t(e) : t;
|
|
5426
5417
|
}
|
|
5427
|
-
function
|
|
5428
|
-
return e === "ssml" ? { ssml:
|
|
5418
|
+
function le(t, e) {
|
|
5419
|
+
return e === "ssml" ? { ssml: rt(t) } : { plain: t };
|
|
5429
5420
|
}
|
|
5430
|
-
function
|
|
5421
|
+
function ce(t, e, n, r) {
|
|
5431
5422
|
t.push(...r);
|
|
5432
5423
|
for (let i = 0; i < r.length; i++) e.push(n);
|
|
5433
5424
|
}
|
|
5434
|
-
function
|
|
5425
|
+
function Jr(t, e, n, r, i, s, o) {
|
|
5426
|
+
o ? (i.some((a) => n.blockStarts.has(a)) && n.blockStarts.add(o), ce(t, e, s[0] ?? r, [o])) : (t.push(...i), e.push(...s));
|
|
5427
|
+
}
|
|
5428
|
+
function tr(t, e, n, r, i, s, o) {
|
|
5435
5429
|
if (!r.contextualize.has(i)) return;
|
|
5436
5430
|
const a = r.announcements[i];
|
|
5437
5431
|
if (a !== void 0) {
|
|
5438
|
-
if (
|
|
5432
|
+
if (it(a)) {
|
|
5439
5433
|
const c = s === "before" ? a.start : a.end;
|
|
5440
|
-
|
|
5434
|
+
ce(t, e, n, [le(Le(c, o), r.format)]);
|
|
5441
5435
|
return;
|
|
5442
5436
|
}
|
|
5443
|
-
s === "before" &&
|
|
5437
|
+
s === "before" && ce(t, e, n, [le(Le(a, o), r.format)]);
|
|
5444
5438
|
}
|
|
5445
5439
|
}
|
|
5446
|
-
function
|
|
5440
|
+
function nr(t, e) {
|
|
5447
5441
|
return e.size > 0 && t.some((n) => e.has(n));
|
|
5448
5442
|
}
|
|
5449
5443
|
function an(t, e) {
|
|
@@ -5459,99 +5453,99 @@ function an(t, e) {
|
|
|
5459
5453
|
if (i.length === 0) return;
|
|
5460
5454
|
let s = "";
|
|
5461
5455
|
for (const a of i)
|
|
5462
|
-
a.length === 1 && s.endsWith(a) || (s && !
|
|
5456
|
+
a.length === 1 && s.endsWith(a) || (s && !ot(a) && (s += " "), s += a);
|
|
5463
5457
|
const o = e === "ssml" ? { ssml: s } : { plain: s };
|
|
5464
5458
|
return n && (o.language = n), o;
|
|
5465
5459
|
}
|
|
5466
|
-
function
|
|
5467
|
-
const n =
|
|
5460
|
+
function Ml(t, e) {
|
|
5461
|
+
const n = Hr(t.text), r = n ? Qr(n, e.format, e.language) : [];
|
|
5468
5462
|
if (!e.contextualize.has("pagebreak")) return r;
|
|
5469
5463
|
const i = e.announcements.pagebreak;
|
|
5470
5464
|
if (i === void 0) return r;
|
|
5471
|
-
const s =
|
|
5465
|
+
const s = le(Le(it(i) ? i.start : i), e.format);
|
|
5472
5466
|
if (r.length === 0) return [s];
|
|
5473
5467
|
const o = an([s, ...r], e.format);
|
|
5474
5468
|
return o ? (o.plain !== void 0 && (o.plain += "."), o.ssml !== void 0 && (o.ssml += "."), [o]) : [s, ...r];
|
|
5475
5469
|
}
|
|
5476
5470
|
function Qr(t, e, n) {
|
|
5477
|
-
if (e === "plain" && n !== "block-level" && n !== "none" && t.ssml &&
|
|
5478
|
-
return
|
|
5471
|
+
if (e === "plain" && n !== "block-level" && n !== "none" && t.ssml && Gr(t.ssml))
|
|
5472
|
+
return Wr(t.ssml, t.language).map((i) => {
|
|
5479
5473
|
const s = { plain: i.plain };
|
|
5480
5474
|
return i.language && (s.language = i.language), s;
|
|
5481
5475
|
});
|
|
5482
5476
|
const r = {};
|
|
5483
|
-
return t.language && (r.language = t.language), e === "ssml" ? r.ssml = t.ssml ??
|
|
5477
|
+
return t.language && (r.language = t.language), e === "ssml" ? r.ssml = t.ssml ?? rt(t.plain ?? "") : r.plain = t.plain ?? sn(t.ssml ?? ""), (n === "block-level" || n === "none") && (r.ssml && (r.ssml = Fr(r.ssml)), n === "none" && delete r.language), [r];
|
|
5484
5478
|
}
|
|
5485
|
-
function
|
|
5479
|
+
function Gl(t, e, n, r, i, s) {
|
|
5486
5480
|
const o = typeof t.text == "object" ? t.text.language : void 0, a = new Map((t.children ?? []).map((u) => [u.id, u])), c = [], l = [];
|
|
5487
|
-
for (const u of
|
|
5481
|
+
for (const u of Vl(e)) {
|
|
5488
5482
|
if (u.placeholderId !== void 0) {
|
|
5489
5483
|
const f = a.get(u.placeholderId);
|
|
5490
5484
|
f && Xr(f, c, l, i, s);
|
|
5491
5485
|
continue;
|
|
5492
5486
|
}
|
|
5493
5487
|
if (!u.ssml) continue;
|
|
5494
|
-
if (i.format === "plain" && i.language !== "block-level" && i.language !== "none" &&
|
|
5495
|
-
for (const f of
|
|
5488
|
+
if (i.format === "plain" && i.language !== "block-level" && i.language !== "none" && Gr(u.ssml)) {
|
|
5489
|
+
for (const f of Wr(u.ssml, o)) {
|
|
5496
5490
|
const y = { plain: f.plain };
|
|
5497
5491
|
f.language && (y.language = f.language), c.push(y), l.push(t);
|
|
5498
5492
|
}
|
|
5499
5493
|
continue;
|
|
5500
5494
|
}
|
|
5501
5495
|
const g = {};
|
|
5502
|
-
o && (g.language = o), i.format === "ssml" ? g.ssml = u.ssml : g.plain = sn(u.ssml), (i.language === "block-level" || i.language === "none") && (g.ssml && (g.ssml =
|
|
5496
|
+
o && (g.language = o), i.format === "ssml" ? g.ssml = u.ssml : g.plain = sn(u.ssml), (i.language === "block-level" || i.language === "none") && (g.ssml && (g.ssml = Fr(g.ssml)), i.language === "none" && delete g.language), c.push(g), l.push(t);
|
|
5503
5497
|
}
|
|
5504
5498
|
const d = c.length > 1 ? an(c, i.format) : void 0;
|
|
5505
|
-
|
|
5499
|
+
Jr(n, r, i, t, c, l, d);
|
|
5506
5500
|
}
|
|
5507
5501
|
function Xr(t, e, n, r, i) {
|
|
5508
5502
|
const s = t.role ?? [];
|
|
5509
|
-
if (
|
|
5510
|
-
const o = s.some((u) =>
|
|
5503
|
+
if (nr(s, r.skip)) return;
|
|
5504
|
+
const o = s.some((u) => Hl.has(u)), a = o && !i, c = e.length, l = s.includes("footnote"), d = s.filter(
|
|
5511
5505
|
(u) => !(l && (u === "footnote" || u === "aside")) && u !== "pagebreak"
|
|
5512
5506
|
);
|
|
5513
5507
|
for (const u of d)
|
|
5514
|
-
|
|
5508
|
+
tr(e, n, t, r, u, "before");
|
|
5515
5509
|
if (s.includes("noteref"))
|
|
5516
5510
|
for (const u of t.children ?? []) {
|
|
5517
5511
|
const g = u.role ?? [];
|
|
5518
|
-
if (!
|
|
5512
|
+
if (!nr(g, r.skip))
|
|
5519
5513
|
if (g.includes("footnote")) {
|
|
5520
5514
|
const f = [], y = [];
|
|
5521
|
-
|
|
5515
|
+
ae([u], f, y, r, i);
|
|
5522
5516
|
const p = r.contextualize.has("footnote") ? r.announcements.footnote : void 0, m = [], w = [];
|
|
5523
5517
|
if (p !== void 0) {
|
|
5524
|
-
const C =
|
|
5525
|
-
m.push(
|
|
5518
|
+
const C = it(p) ? p.start : p;
|
|
5519
|
+
m.push(le(Le(C), r.format)), w.push(u);
|
|
5526
5520
|
}
|
|
5527
|
-
m.push(...f), w.push(...y), p !== void 0 &&
|
|
5521
|
+
m.push(...f), w.push(...y), p !== void 0 && it(p) && (m.push(le(Le(p.end), r.format)), w.push(u));
|
|
5528
5522
|
const E = p !== void 0 && m.length > 1 ? an(m, r.format) : void 0;
|
|
5529
|
-
|
|
5523
|
+
Jr(e, n, r, u, m, w, E);
|
|
5530
5524
|
} else
|
|
5531
|
-
|
|
5525
|
+
ae([u], e, n, r, i);
|
|
5532
5526
|
}
|
|
5533
5527
|
else {
|
|
5534
5528
|
const u = typeof t.text == "object" ? t.text.ssml : void 0;
|
|
5535
|
-
if (r.inlineContextualization && u &&
|
|
5536
|
-
|
|
5529
|
+
if (r.inlineContextualization && u && jl(u))
|
|
5530
|
+
Gl(t, u, e, n, r, i);
|
|
5537
5531
|
else if (s.includes("pagebreak")) {
|
|
5538
|
-
if (
|
|
5532
|
+
if (ce(e, n, t, Ml(t, r)), t.children) {
|
|
5539
5533
|
const g = i || o && e.length > c;
|
|
5540
|
-
|
|
5534
|
+
ae(t.children, e, n, r, g);
|
|
5541
5535
|
}
|
|
5542
5536
|
} else {
|
|
5543
|
-
const g =
|
|
5544
|
-
if (g &&
|
|
5537
|
+
const g = Hr(t.text);
|
|
5538
|
+
if (g && ce(e, n, t, Qr(g, r.format, r.language)), t.children) {
|
|
5545
5539
|
const f = i || o && e.length > c;
|
|
5546
|
-
|
|
5540
|
+
ae(t.children, e, n, r, f);
|
|
5547
5541
|
}
|
|
5548
5542
|
}
|
|
5549
5543
|
}
|
|
5550
|
-
a && e.length > c && (e[c]
|
|
5544
|
+
a && e.length > c && r.blockStarts.add(e[c]), t.description !== void 0 && ce(e, n, t, [le(t.description, r.format)]);
|
|
5551
5545
|
for (const u of d)
|
|
5552
|
-
|
|
5546
|
+
tr(e, n, t, r, u, "after");
|
|
5553
5547
|
}
|
|
5554
|
-
function
|
|
5548
|
+
function ae(t, e, n, r, i) {
|
|
5555
5549
|
t.forEach((s, o) => Xr(s, e, n, r, o === 0 ? i : !1));
|
|
5556
5550
|
}
|
|
5557
5551
|
function Zr(t) {
|
|
@@ -5561,18 +5555,21 @@ function Zr(t) {
|
|
|
5561
5555
|
contextualize: new Set(t.contextualize ?? []),
|
|
5562
5556
|
format: t.format ?? "plain",
|
|
5563
5557
|
inlineContextualization: t.inlineContextualization ?? !1,
|
|
5564
|
-
language: t.language
|
|
5558
|
+
language: t.language,
|
|
5559
|
+
blockStarts: /* @__PURE__ */ new Set()
|
|
5565
5560
|
};
|
|
5566
5561
|
}
|
|
5567
|
-
function
|
|
5562
|
+
function xc(t, e) {
|
|
5568
5563
|
const n = [];
|
|
5569
|
-
return
|
|
5564
|
+
return ae(t, n, [], Zr(e), !1), n;
|
|
5570
5565
|
}
|
|
5571
|
-
function
|
|
5572
|
-
const n = [], r = [];
|
|
5573
|
-
|
|
5566
|
+
function Wl(t, e) {
|
|
5567
|
+
const n = [], r = [], i = Zr(e);
|
|
5568
|
+
ae(t, n, r, i, !1);
|
|
5569
|
+
const s = n.map((o) => i.blockStarts.has(o));
|
|
5570
|
+
return { utterances: n, sources: r, blockStarts: s };
|
|
5574
5571
|
}
|
|
5575
|
-
class
|
|
5572
|
+
class kc {
|
|
5576
5573
|
engine;
|
|
5577
5574
|
contentQueue = [];
|
|
5578
5575
|
eventListeners = /* @__PURE__ */ new Map();
|
|
@@ -5591,19 +5588,24 @@ class xc {
|
|
|
5591
5588
|
// `loadGndContent()`. Its absence is what makes submitPreferences()'s
|
|
5592
5589
|
// extraction-affecting fields (format, verbosity, skip, contextualize,
|
|
5593
5590
|
// language) a no-op on content loaded via loadContent() — prosody
|
|
5594
|
-
// fields (rate/pitch/volume/pauseDuration/
|
|
5591
|
+
// fields (rate/pitch/volume/pauseDuration/autoPause) still apply.
|
|
5595
5592
|
source;
|
|
5596
5593
|
// Parallel to `contentQueue`, from the extraction that produced it — lets
|
|
5597
5594
|
// reextract() find where to resume after a reload (see resolveResumeIndex).
|
|
5598
5595
|
contentSources = [];
|
|
5596
|
+
// Parallel to `contentQueue`: whether each utterance begins a new
|
|
5597
|
+
// block-level element. loadContent() content has no boundaries of its own.
|
|
5598
|
+
contentBlockStarts = [];
|
|
5599
5599
|
// Set by setContentQueue() when a reload should resume mid-queue rather
|
|
5600
5600
|
// than at the start; consumed once by the engine's "ready" handler.
|
|
5601
5601
|
pendingResumeIndex = null;
|
|
5602
5602
|
pendingResumeState = null;
|
|
5603
|
+
// Index to speak() on the next play() when autoPause has stopped playback between utterances.
|
|
5604
|
+
pendingAutoPauseIndex = null;
|
|
5603
5605
|
constructor(e, n = {}) {
|
|
5604
|
-
this.engine = e, this._defaults = new kl(n.defaults), this._preferences = new Ne(n.preferences), this._settings = new
|
|
5606
|
+
this.engine = e, this._defaults = new kl(n.defaults), this._preferences = new Ne(n.preferences), this._settings = new Yn(this._preferences, this._defaults), this.setupEngineListeners(), this.applyEngineParameters(), this.initializeEngine();
|
|
5605
5607
|
}
|
|
5606
|
-
// Unlike pauseDuration/
|
|
5608
|
+
// Unlike pauseDuration/autoPause (read live off settings), the engine owns rate/pitch/volume and must be pushed.
|
|
5607
5609
|
applyEngineParameters() {
|
|
5608
5610
|
this.engine.setRate(this._settings.rate), this.engine.setPitch(this._settings.pitch), this.engine.setVolume(this._settings.volume);
|
|
5609
5611
|
}
|
|
@@ -5620,10 +5622,10 @@ class xc {
|
|
|
5620
5622
|
}), this.engine.on("end", () => {
|
|
5621
5623
|
const e = this.engine.getCurrentUtteranceIndex(), n = this.engine.getUtteranceCount();
|
|
5622
5624
|
if (e < n - 1) {
|
|
5623
|
-
const
|
|
5624
|
-
this.pendingAdvanceTimeout = setTimeout(() => {
|
|
5625
|
+
const r = this._settings.autoPause === "utterance" || this.contentBlockStarts[e + 1] === !0;
|
|
5626
|
+
this._settings.autoPause !== "none" && r ? (this.pendingAutoPauseIndex = e + 1, this.setNavigatorState("paused"), this.emitEvent({ type: "pause" })) : this.pendingAdvanceTimeout = setTimeout(() => {
|
|
5625
5627
|
this.pendingAdvanceTimeout = null, this.engine.speak(e + 1);
|
|
5626
|
-
},
|
|
5628
|
+
}, this._settings.pauseDuration);
|
|
5627
5629
|
} else
|
|
5628
5630
|
this.setNavigatorState("idle");
|
|
5629
5631
|
this.emitEvent({ type: "end" });
|
|
@@ -5689,23 +5691,23 @@ class xc {
|
|
|
5689
5691
|
this.source = e, this.reextract();
|
|
5690
5692
|
}
|
|
5691
5693
|
setContentQueue(e, n = null, r = null) {
|
|
5692
|
-
this.clearPendingAdvance(), (this.navigatorState === "playing" || this.navigatorState === "paused") && this.engine.stop();
|
|
5694
|
+
this.clearPendingAdvance(), this.pendingAutoPauseIndex = null, (this.navigatorState === "playing" || this.navigatorState === "paused") && this.engine.stop();
|
|
5693
5695
|
const i = Array.isArray(e) ? e : [e];
|
|
5694
5696
|
this.contentQueue = [...i], this.pendingResumeIndex = n, this.pendingResumeState = r, this.setNavigatorState("loading"), this.emitEvent({ type: "loading" }), this.engine.loadUtterances(i), this.emitContentChangeEvent({ content: i });
|
|
5695
5697
|
}
|
|
5696
5698
|
// Re-runs extraction from `this.source`, resuming near the old position if playback was underway.
|
|
5697
5699
|
reextract() {
|
|
5698
5700
|
if (!this.source) return;
|
|
5699
|
-
const e = this.navigatorState === "playing" || this.navigatorState === "paused" ? this.navigatorState : null, n = this.contentSources, r = this.getCurrentUtteranceIndex(), { utterances: i, sources: s } =
|
|
5701
|
+
const e = this.navigatorState === "playing" || this.navigatorState === "paused" ? this.navigatorState : null, n = this.contentSources, r = this.getCurrentUtteranceIndex(), { utterances: i, sources: s, blockStarts: o } = Wl(this.source, {
|
|
5700
5702
|
format: this._settings.format,
|
|
5701
5703
|
inlineContextualization: this._settings.inlineContextualization,
|
|
5702
5704
|
skip: this._settings.skip,
|
|
5703
5705
|
contextualize: this._settings.contextualize,
|
|
5704
5706
|
language: this._settings.language
|
|
5705
5707
|
});
|
|
5706
|
-
this.contentSources = s;
|
|
5707
|
-
const
|
|
5708
|
-
this.setContentQueue(i,
|
|
5708
|
+
this.contentSources = s, this.contentBlockStarts = o;
|
|
5709
|
+
const a = e ? this.resolveResumeIndex(n, r, s) : null;
|
|
5710
|
+
this.setContentQueue(i, a, e);
|
|
5709
5711
|
}
|
|
5710
5712
|
// Nearest node at or before oldIndex that's still present in newSources.
|
|
5711
5713
|
resolveResumeIndex(e, n, r) {
|
|
@@ -5730,29 +5732,33 @@ class xc {
|
|
|
5730
5732
|
// Playback Control - Navigator coordinates engine operations
|
|
5731
5733
|
play() {
|
|
5732
5734
|
if (this.navigatorState === "paused")
|
|
5733
|
-
this.setNavigatorState("playing"), this.
|
|
5735
|
+
if (this.setNavigatorState("playing"), this.pendingAutoPauseIndex !== null) {
|
|
5736
|
+
const e = this.pendingAutoPauseIndex;
|
|
5737
|
+
this.pendingAutoPauseIndex = null, this.engine.speak(e);
|
|
5738
|
+
} else
|
|
5739
|
+
this.engine.resume();
|
|
5734
5740
|
else if (this.navigatorState === "ready" || this.navigatorState === "idle")
|
|
5735
5741
|
this.setNavigatorState("playing"), this.engine.speak();
|
|
5736
5742
|
else if (this.navigatorState === "playing")
|
|
5737
5743
|
return;
|
|
5738
5744
|
}
|
|
5739
5745
|
pause() {
|
|
5740
|
-
this.navigatorState === "playing" && (this.clearPendingAdvance(), this.setNavigatorState("paused"), this.engine.pause());
|
|
5746
|
+
this.navigatorState === "playing" && (this.clearPendingAdvance(), this.pendingAutoPauseIndex = null, this.setNavigatorState("paused"), this.engine.pause());
|
|
5741
5747
|
}
|
|
5742
5748
|
stop() {
|
|
5743
|
-
this.clearPendingAdvance(), this.setNavigatorState("idle"), this.engine.stop(), this.emitEvent({ type: "stop" });
|
|
5749
|
+
this.clearPendingAdvance(), this.pendingAutoPauseIndex = null, this.setNavigatorState("idle"), this.engine.stop(), this.emitEvent({ type: "stop" });
|
|
5744
5750
|
}
|
|
5745
5751
|
clearPendingAdvance() {
|
|
5746
5752
|
this.pendingAdvanceTimeout !== null && (clearTimeout(this.pendingAdvanceTimeout), this.pendingAdvanceTimeout = null);
|
|
5747
5753
|
}
|
|
5748
5754
|
skipToPosition(e, n = !1) {
|
|
5749
5755
|
const r = this.getCurrentUtteranceIndex();
|
|
5750
|
-
return e < 0 || e >= this.contentQueue.length ? !1 : (e === r || (this.clearPendingAdvance(), this.navigatorState === "paused" && !n ? this.engine.setCurrentUtteranceIndex(e, (i) => {
|
|
5756
|
+
return e < 0 || e >= this.contentQueue.length ? !1 : (e === r || (this.clearPendingAdvance(), this.navigatorState === "paused" && !n ? (this.pendingAutoPauseIndex !== null && (this.pendingAutoPauseIndex = e), this.engine.setCurrentUtteranceIndex(e, (i) => {
|
|
5751
5757
|
i && this.emitEvent({
|
|
5752
5758
|
type: "skip",
|
|
5753
5759
|
detail: { position: e }
|
|
5754
5760
|
});
|
|
5755
|
-
}) : (this.setNavigatorState("playing"), this.engine.speak(e))), !0);
|
|
5761
|
+
})) : (this.pendingAutoPauseIndex = null, this.setNavigatorState("playing"), this.engine.speak(e))), !0);
|
|
5756
5762
|
}
|
|
5757
5763
|
// Navigation - Navigator coordinates with proper state management
|
|
5758
5764
|
next(e = !1) {
|
|
@@ -5793,7 +5799,7 @@ class xc {
|
|
|
5793
5799
|
return this._settings;
|
|
5794
5800
|
}
|
|
5795
5801
|
get preferencesEditor() {
|
|
5796
|
-
return this._preferencesEditor === null && (this._preferencesEditor = new
|
|
5802
|
+
return this._preferencesEditor === null && (this._preferencesEditor = new Zn(this._preferences, this.settings)), this._preferencesEditor;
|
|
5797
5803
|
}
|
|
5798
5804
|
submitPreferences(e) {
|
|
5799
5805
|
!this.source && Qn.some((n) => e[n] !== void 0) && console.warn(
|
|
@@ -5802,7 +5808,7 @@ class xc {
|
|
|
5802
5808
|
}
|
|
5803
5809
|
applyPreferences() {
|
|
5804
5810
|
const e = this._settings;
|
|
5805
|
-
this._settings = new
|
|
5811
|
+
this._settings = new Yn(this._preferences, this._defaults), this.applyEngineParameters(), this._preferencesEditor !== null && (this._preferencesEditor = new Zn(this._preferences, this._settings)), Qn.some((n) => !this.sameSettingValue(e[n], this._settings[n])) && this.reextract();
|
|
5806
5812
|
}
|
|
5807
5813
|
// Arrays (skip/contextualize) compare as sets, not by reference.
|
|
5808
5814
|
sameSettingValue(e, n) {
|
|
@@ -5812,14 +5818,14 @@ class xc {
|
|
|
5812
5818
|
this.clearPendingAdvance(), this.eventListeners.clear(), await this.engine.destroy();
|
|
5813
5819
|
}
|
|
5814
5820
|
}
|
|
5815
|
-
const
|
|
5821
|
+
const Kl = [
|
|
5816
5822
|
"heading1",
|
|
5817
5823
|
"heading2",
|
|
5818
5824
|
"heading3",
|
|
5819
5825
|
"heading4",
|
|
5820
5826
|
"heading5",
|
|
5821
5827
|
"heading6"
|
|
5822
|
-
],
|
|
5828
|
+
], rr = {
|
|
5823
5829
|
"doc-abstract": "abstract",
|
|
5824
5830
|
"doc-acknowledgments": "acknowledgments",
|
|
5825
5831
|
"doc-afterword": "afterword",
|
|
@@ -5887,7 +5893,7 @@ const Wl = [
|
|
|
5887
5893
|
term: "term",
|
|
5888
5894
|
"doc-tip": "tip",
|
|
5889
5895
|
"doc-toc": "toc"
|
|
5890
|
-
},
|
|
5896
|
+
}, Jl = {
|
|
5891
5897
|
abstract: "abstract",
|
|
5892
5898
|
acknowledgments: "acknowledgments",
|
|
5893
5899
|
afterword: "afterword",
|
|
@@ -5947,7 +5953,7 @@ const Wl = [
|
|
|
5947
5953
|
glossterm: "term",
|
|
5948
5954
|
tip: "tip",
|
|
5949
5955
|
toc: "toc"
|
|
5950
|
-
},
|
|
5956
|
+
}, Ql = {
|
|
5951
5957
|
article: "article",
|
|
5952
5958
|
aside: "aside",
|
|
5953
5959
|
audio: "audio",
|
|
@@ -5984,7 +5990,7 @@ const Wl = [
|
|
|
5984
5990
|
video: "video",
|
|
5985
5991
|
svg: "image"
|
|
5986
5992
|
};
|
|
5987
|
-
function
|
|
5993
|
+
function Tt(t) {
|
|
5988
5994
|
const e = [], n = (c) => {
|
|
5989
5995
|
e.includes(c) || e.push(c);
|
|
5990
5996
|
}, r = [];
|
|
@@ -5995,12 +6001,12 @@ function Rt(t) {
|
|
|
5995
6001
|
if ((c === "presentation" || c === "none") && (i = !0), c === "heading") {
|
|
5996
6002
|
let l = 2;
|
|
5997
6003
|
const d = parseInt(t.getAttribute("aria-level") ?? "", 10);
|
|
5998
|
-
Number.isFinite(d) && d >= 1 && (l = Math.min(d, 6)), r.push(
|
|
5999
|
-
} else
|
|
6004
|
+
Number.isFinite(d) && d >= 1 && (l = Math.min(d, 6)), r.push(Kl[l - 1]);
|
|
6005
|
+
} else rr[c] && r.push(rr[c]);
|
|
6000
6006
|
const o = t.getAttribute("epub:type");
|
|
6001
6007
|
if (o)
|
|
6002
6008
|
for (const c of o.split(/\s+/).filter(Boolean)) {
|
|
6003
|
-
const l =
|
|
6009
|
+
const l = Jl[c];
|
|
6004
6010
|
l && r.push(l);
|
|
6005
6011
|
}
|
|
6006
6012
|
if (i)
|
|
@@ -6020,16 +6026,16 @@ function Rt(t) {
|
|
|
6020
6026
|
n("cell");
|
|
6021
6027
|
}
|
|
6022
6028
|
else {
|
|
6023
|
-
const c =
|
|
6029
|
+
const c = Ql[a];
|
|
6024
6030
|
c && n(c);
|
|
6025
6031
|
}
|
|
6026
6032
|
for (const c of r) n(c);
|
|
6027
6033
|
return e;
|
|
6028
6034
|
}
|
|
6029
|
-
function
|
|
6035
|
+
function ir(t) {
|
|
6030
6036
|
return !!(t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden"));
|
|
6031
6037
|
}
|
|
6032
|
-
function
|
|
6038
|
+
function Ft(t) {
|
|
6033
6039
|
let e = "";
|
|
6034
6040
|
const n = (r) => {
|
|
6035
6041
|
r.nodeType === 3 && (e += r.nodeValue ?? "");
|
|
@@ -6037,11 +6043,11 @@ function Ht(t) {
|
|
|
6037
6043
|
};
|
|
6038
6044
|
return n(t), e;
|
|
6039
6045
|
}
|
|
6040
|
-
function
|
|
6041
|
-
return
|
|
6046
|
+
function We(t) {
|
|
6047
|
+
return Ie(Ft(t), !0).trim();
|
|
6042
6048
|
}
|
|
6043
|
-
function
|
|
6044
|
-
if (
|
|
6049
|
+
function Xl(t) {
|
|
6050
|
+
if (ir(t))
|
|
6045
6051
|
return [null, !1];
|
|
6046
6052
|
const e = (t.getAttribute("aria-labelledby") ?? "").trim();
|
|
6047
6053
|
if (e) {
|
|
@@ -6049,11 +6055,11 @@ function Ql(t) {
|
|
|
6049
6055
|
if (a.length > 0) {
|
|
6050
6056
|
let c = "";
|
|
6051
6057
|
a.forEach((d, u) => {
|
|
6052
|
-
if (
|
|
6058
|
+
if (ir(d)) return;
|
|
6053
6059
|
const g = d.getAttribute("aria-label");
|
|
6054
|
-
c += g ||
|
|
6060
|
+
c += g || Ft(d), u < a.length - 1 && (c += " ");
|
|
6055
6061
|
});
|
|
6056
|
-
const l =
|
|
6062
|
+
const l = Ie(c, !0).trim();
|
|
6057
6063
|
if (l !== "")
|
|
6058
6064
|
return [{ language: "", plain: l }, !0];
|
|
6059
6065
|
}
|
|
@@ -6065,7 +6071,7 @@ function Ql(t) {
|
|
|
6065
6071
|
if (r) {
|
|
6066
6072
|
const o = [...new Set(r.split(/\s+/).filter(Boolean))].map((a) => t.ownerDocument.getElementById(a)).filter((a) => a !== null);
|
|
6067
6073
|
if (o.length > 0) {
|
|
6068
|
-
const a = o.map((l) =>
|
|
6074
|
+
const a = o.map((l) => Ft(l)).join(" "), c = Ie(a, !0).trim();
|
|
6069
6075
|
if (c !== "")
|
|
6070
6076
|
return [{ language: "", plain: c }, !0];
|
|
6071
6077
|
}
|
|
@@ -6079,7 +6085,7 @@ function Ql(t) {
|
|
|
6079
6085
|
} else if (i === "svg") {
|
|
6080
6086
|
const s = t.querySelector(":scope > title");
|
|
6081
6087
|
if (s) {
|
|
6082
|
-
const o =
|
|
6088
|
+
const o = We(s);
|
|
6083
6089
|
if (o) return [{ language: "", plain: o }, !0];
|
|
6084
6090
|
}
|
|
6085
6091
|
} else if (i === "math") {
|
|
@@ -6088,17 +6094,17 @@ function Ql(t) {
|
|
|
6088
6094
|
}
|
|
6089
6095
|
return [null, !0];
|
|
6090
6096
|
}
|
|
6091
|
-
const
|
|
6097
|
+
const Zl = {
|
|
6092
6098
|
em: ["emphasis"],
|
|
6093
6099
|
b: ["emphasis"],
|
|
6094
6100
|
i: ["emphasis", { level: "reduced" }],
|
|
6095
6101
|
strong: ["emphasis", { level: "strong" }],
|
|
6096
6102
|
br: ["break"]
|
|
6097
6103
|
};
|
|
6098
|
-
function
|
|
6099
|
-
return
|
|
6104
|
+
function Yl(t) {
|
|
6105
|
+
return Zl[t] ?? ["", void 0];
|
|
6100
6106
|
}
|
|
6101
|
-
const
|
|
6107
|
+
const ec = /* @__PURE__ */ new Set([
|
|
6102
6108
|
"script",
|
|
6103
6109
|
"style",
|
|
6104
6110
|
"template",
|
|
@@ -6112,13 +6118,13 @@ const Yl = /* @__PURE__ */ new Set([
|
|
|
6112
6118
|
"rp",
|
|
6113
6119
|
"rtc"
|
|
6114
6120
|
]);
|
|
6115
|
-
function
|
|
6121
|
+
function Ht(t) {
|
|
6116
6122
|
return !t.audioref && !t.imgref && !t.textref && !t.videoref && (!t.text || Pe(t.text)) && !(t.children && t.children.length > 0) && !t.description;
|
|
6117
6123
|
}
|
|
6118
|
-
function
|
|
6124
|
+
function tc(t) {
|
|
6119
6125
|
return !t.audioref && !t.imgref && !t.textref && !t.videoref && (!t.text || Pe(t.text)) && !!(t.children && t.children.length > 0) && !(t.role && t.role.length > 0) && !t.id;
|
|
6120
6126
|
}
|
|
6121
|
-
function
|
|
6127
|
+
function nc(t) {
|
|
6122
6128
|
return !(t.role && t.role.length > 0) && !t.id;
|
|
6123
6129
|
}
|
|
6124
6130
|
class Me {
|
|
@@ -6130,8 +6136,8 @@ class Me {
|
|
|
6130
6136
|
const e = this.object, n = [];
|
|
6131
6137
|
for (const r of this.children) {
|
|
6132
6138
|
const i = r.finalize();
|
|
6133
|
-
if (!
|
|
6134
|
-
if (
|
|
6139
|
+
if (!Ht(i)) {
|
|
6140
|
+
if (tc(i)) {
|
|
6135
6141
|
n.push(...i.children ?? []);
|
|
6136
6142
|
continue;
|
|
6137
6143
|
}
|
|
@@ -6140,23 +6146,23 @@ class Me {
|
|
|
6140
6146
|
}
|
|
6141
6147
|
if (n.length > 0 && (e.children = n), (!e.text || Pe(e.text)) && e.children?.length === 1) {
|
|
6142
6148
|
const r = e.children[0];
|
|
6143
|
-
|
|
6149
|
+
nc(r) && (r.text && (e.text = r.text), r.textref && (e.textref = r.textref), r.imgref && (e.imgref = r.imgref), r.audioref && (e.audioref = r.audioref), r.videoref && (e.videoref = r.videoref), e.children = r.children);
|
|
6144
6150
|
}
|
|
6145
6151
|
return e;
|
|
6146
6152
|
}
|
|
6147
6153
|
}
|
|
6148
|
-
function
|
|
6154
|
+
function Mt(t) {
|
|
6149
6155
|
const e = {};
|
|
6150
6156
|
t.id && (e.id = t.id), t.textref && (e.textref = t.textref), t.imgref && (e.imgref = t.imgref), t.audioref && (e.audioref = t.audioref), t.videoref && (e.videoref = t.videoref);
|
|
6151
|
-
const n =
|
|
6152
|
-
return n !== void 0 && (e.text = n), t.role && t.role.length > 0 && (e.role = t.role), t.children && t.children.length > 0 && (e.children = t.children.map(
|
|
6157
|
+
const n = Tl(t.text);
|
|
6158
|
+
return n !== void 0 && (e.text = n), t.role && t.role.length > 0 && (e.role = t.role), t.children && t.children.length > 0 && (e.children = t.children.map(Mt)), t.description && (e.description = t.description), e;
|
|
6153
6159
|
}
|
|
6154
6160
|
function Yr(t) {
|
|
6155
6161
|
const e = {};
|
|
6156
6162
|
return t.id && (e.id = t.id), t.textref && (e.textref = t.textref), t.imgref && (e.imgref = t.imgref), t.audioref && (e.audioref = t.audioref), t.videoref && (e.videoref = t.videoref), t.role && (e.role = t.role), t.description && (e.description = t.description), typeof t.text == "string" ? e.text = { plain: t.text, ssml: "", language: "" } : t.text && (e.text = { plain: t.text.plain ?? "", ssml: t.text.ssml ?? "", language: t.text.language }), t.children && (e.children = t.children.map(Yr)), e;
|
|
6157
6163
|
}
|
|
6158
|
-
const
|
|
6159
|
-
function
|
|
6164
|
+
const rc = 1;
|
|
6165
|
+
function sr(t) {
|
|
6160
6166
|
for (let e = t; e; e = e.parentElement) {
|
|
6161
6167
|
const n = e.getAttribute("xml:lang");
|
|
6162
6168
|
if (n) return n;
|
|
@@ -6165,21 +6171,21 @@ function ar(t) {
|
|
|
6165
6171
|
}
|
|
6166
6172
|
return "";
|
|
6167
6173
|
}
|
|
6168
|
-
function
|
|
6174
|
+
function ic(t) {
|
|
6169
6175
|
for (let e = t.firstChild; e; e = e.nextSibling)
|
|
6170
|
-
if (e.nodeType ===
|
|
6176
|
+
if (e.nodeType === rc) return !0;
|
|
6171
6177
|
return !1;
|
|
6172
6178
|
}
|
|
6173
|
-
function
|
|
6179
|
+
function ar(t, e) {
|
|
6174
6180
|
for (let n = e; n; n = n.parentElement)
|
|
6175
6181
|
if (n === t) return !0;
|
|
6176
6182
|
return !1;
|
|
6177
6183
|
}
|
|
6178
|
-
function
|
|
6184
|
+
function sc(t) {
|
|
6179
6185
|
const e = t.slice(0, 500);
|
|
6180
6186
|
return /<\?xml\b/.test(e) || /xmlns:epub=/.test(e) || /DOCTYPE\s+html\s+PUBLIC\s+"-\/\/W3C\/\/DTD XHTML/i.test(e) ? "application/xhtml+xml" : "text/html";
|
|
6181
6187
|
}
|
|
6182
|
-
const
|
|
6188
|
+
const ac = 3, oc = 1, lc = /* @__PURE__ */ new Set([
|
|
6183
6189
|
"object",
|
|
6184
6190
|
"base",
|
|
6185
6191
|
"font",
|
|
@@ -6245,9 +6251,9 @@ const sc = 3, ac = 1, oc = /* @__PURE__ */ new Set([
|
|
|
6245
6251
|
"strike",
|
|
6246
6252
|
"nobr",
|
|
6247
6253
|
"rb"
|
|
6248
|
-
]),
|
|
6249
|
-
function
|
|
6250
|
-
return
|
|
6254
|
+
]), cc = /* @__PURE__ */ new Set(["summary", "dfn", "span"]);
|
|
6255
|
+
function or(t, e) {
|
|
6256
|
+
return cc.has(t) && e.length > 0 ? !0 : !lc.has(t);
|
|
6251
6257
|
}
|
|
6252
6258
|
class on {
|
|
6253
6259
|
xmlParsed;
|
|
@@ -6281,7 +6287,7 @@ class on {
|
|
|
6281
6287
|
prescan(e) {
|
|
6282
6288
|
const n = [], r = (i, s) => {
|
|
6283
6289
|
const o = i.getAttribute("id");
|
|
6284
|
-
if (o && !this.ids.has(o) && this.ids.set(o, i), s = s || i.getAttribute("aria-hidden") === "true" || i.hasAttribute("hidden"), !s && i.tagName.toLowerCase() === "a" &&
|
|
6290
|
+
if (o && !this.ids.has(o) && this.ids.set(o, i), s = s || i.getAttribute("aria-hidden") === "true" || i.hasAttribute("hidden"), !s && i.tagName.toLowerCase() === "a" && Tt(i).includes("noteref")) {
|
|
6285
6291
|
const c = i.getAttribute("href") ?? "";
|
|
6286
6292
|
c.startsWith("#") && n.push({ id: c.slice(1), ref: i });
|
|
6287
6293
|
}
|
|
@@ -6290,7 +6296,7 @@ class on {
|
|
|
6290
6296
|
r(e, !1);
|
|
6291
6297
|
for (const i of n) {
|
|
6292
6298
|
const s = this.ids.get(i.id);
|
|
6293
|
-
s && (
|
|
6299
|
+
s && (ar(s, i.ref) || this.suppressed.add(s));
|
|
6294
6300
|
}
|
|
6295
6301
|
}
|
|
6296
6302
|
// Converts root itself — used when root is meaningful content in its own
|
|
@@ -6309,7 +6315,7 @@ class on {
|
|
|
6309
6315
|
}
|
|
6310
6316
|
result() {
|
|
6311
6317
|
const e = this.root.finalize();
|
|
6312
|
-
return !e.children || e.children.length === 0 ?
|
|
6318
|
+
return !e.children || e.children.length === 0 ? Ht(e) ? [] : [Mt(e)] : e.children.map(Mt);
|
|
6313
6319
|
}
|
|
6314
6320
|
descend(e) {
|
|
6315
6321
|
const n = new Me();
|
|
@@ -6319,11 +6325,11 @@ class on {
|
|
|
6319
6325
|
e.noText = this.current.noText, this.current.children.push(e);
|
|
6320
6326
|
}
|
|
6321
6327
|
walk(e) {
|
|
6322
|
-
if (e.nodeType ===
|
|
6328
|
+
if (e.nodeType === ac) {
|
|
6323
6329
|
this.text(e);
|
|
6324
6330
|
return;
|
|
6325
6331
|
}
|
|
6326
|
-
if (e.nodeType !==
|
|
6332
|
+
if (e.nodeType !== oc) return;
|
|
6327
6333
|
const n = e, r = this.current, i = this.head(n);
|
|
6328
6334
|
if (!i)
|
|
6329
6335
|
for (let s = n.firstChild; s; s = s.nextSibling) this.walk(s);
|
|
@@ -6333,10 +6339,10 @@ class on {
|
|
|
6333
6339
|
// wholesale, invisible, or explicitly skipped).
|
|
6334
6340
|
head(e) {
|
|
6335
6341
|
const n = e.tagName.toLowerCase();
|
|
6336
|
-
if (
|
|
6337
|
-
const [r, i] =
|
|
6342
|
+
if (ec.has(n) || this.suppressed.has(e) && e !== this.allowNode) return !0;
|
|
6343
|
+
const [r, i] = Xl(e);
|
|
6338
6344
|
if (!i && e !== this.allowNode) return !0;
|
|
6339
|
-
const s =
|
|
6345
|
+
const s = Tt(e);
|
|
6340
6346
|
if ((n === "img" || n === "svg") && (s.includes("presentation") || r === null && e.hasAttribute("alt") && e.getAttribute("alt").trim() === ""))
|
|
6341
6347
|
return !0;
|
|
6342
6348
|
if (n === "br")
|
|
@@ -6364,7 +6370,7 @@ class on {
|
|
|
6364
6370
|
const c = { role: s };
|
|
6365
6371
|
return r && (c.description = r.plain), this.placeholder(e, s.includes("math") ? "math" : "image", c), !0;
|
|
6366
6372
|
}
|
|
6367
|
-
if (!
|
|
6373
|
+
if (!or(n, s))
|
|
6368
6374
|
return !1;
|
|
6369
6375
|
this.flushText(), this.descend(e);
|
|
6370
6376
|
const o = this.current.object;
|
|
@@ -6374,23 +6380,23 @@ class on {
|
|
|
6374
6380
|
}
|
|
6375
6381
|
tail(e, n, r) {
|
|
6376
6382
|
if (n) return;
|
|
6377
|
-
const i = e.tagName.toLowerCase(), s =
|
|
6378
|
-
|
|
6383
|
+
const i = e.tagName.toLowerCase(), s = Tt(e);
|
|
6384
|
+
or(i, s) && (this.flushText(), this.current = r);
|
|
6379
6385
|
}
|
|
6380
6386
|
text(e) {
|
|
6381
6387
|
if (this.current.noText) return;
|
|
6382
6388
|
const n = e.nodeValue ?? "";
|
|
6383
6389
|
if (/^\s*$/.test(n)) {
|
|
6384
|
-
(this.textAcc.length > 0 || this.segments.length > 0) && (this.textAcc +=
|
|
6390
|
+
(this.textAcc.length > 0 || this.segments.length > 0) && (this.textAcc += Ie(n, this.flowEndsWithSpace), this.updateFlowSpace());
|
|
6385
6391
|
return;
|
|
6386
6392
|
}
|
|
6387
6393
|
const r = this.textContext(e);
|
|
6388
|
-
|
|
6394
|
+
Rl(r, this.currentCtx) || (this.closeSegment(), this.currentCtx = r), this.textAcc += Ie(n, this.flowEndsWithSpace), this.updateFlowSpace();
|
|
6389
6395
|
}
|
|
6390
6396
|
textContext(e) {
|
|
6391
|
-
const n = { lang:
|
|
6397
|
+
const n = { lang: sr(e.parentElement), tag: "" };
|
|
6392
6398
|
for (let r = e.parentElement; r && r !== this.current.el; r = r.parentElement) {
|
|
6393
|
-
const [i, s] =
|
|
6399
|
+
const [i, s] = Yl(r.tagName.toLowerCase());
|
|
6394
6400
|
if (i && i !== "break") {
|
|
6395
6401
|
n.tag = i, n.attrs = s;
|
|
6396
6402
|
break;
|
|
@@ -6408,7 +6414,7 @@ class on {
|
|
|
6408
6414
|
this.segments = [], this.textAcc = "", this.currentCtx = { lang: "", tag: "" }, this.flowEndsWithSpace = !0, this.pendingChildren = [];
|
|
6409
6415
|
}
|
|
6410
6416
|
placeholder(e, n, r, i) {
|
|
6411
|
-
if (
|
|
6417
|
+
if (Ht(r)) return;
|
|
6412
6418
|
const s = new Me();
|
|
6413
6419
|
if (s.el = e, s.object = r, this.current.noText) {
|
|
6414
6420
|
this.appendChild(s);
|
|
@@ -6424,22 +6430,22 @@ class on {
|
|
|
6424
6430
|
pagebreak(e, n, r) {
|
|
6425
6431
|
const i = { role: r }, s = (e.getAttribute("title") ?? "").trim();
|
|
6426
6432
|
s ? i.text = { plain: s, ssml: "", language: "" } : n && (i.text = { plain: n.plain ?? "", ssml: n.ssml ?? "", language: n.language });
|
|
6427
|
-
const o = !!(i.text && !Pe(i.text)), a = !this.xmlParsed && (
|
|
6433
|
+
const o = !!(i.text && !Pe(i.text)), a = !this.xmlParsed && (ic(e) || o && e.firstChild !== null);
|
|
6428
6434
|
if (!o && !a) {
|
|
6429
|
-
const l =
|
|
6435
|
+
const l = We(e);
|
|
6430
6436
|
l && (i.text = { plain: l, ssml: "", language: "" });
|
|
6431
6437
|
}
|
|
6432
6438
|
const c = e.getAttribute("id");
|
|
6433
6439
|
return c && (i.textref = `#${c}`), this.placeholder(e, "pagebreak", i), a;
|
|
6434
6440
|
}
|
|
6435
6441
|
noteref(e, n) {
|
|
6436
|
-
const r = { role: n }, i =
|
|
6442
|
+
const r = { role: n }, i = We(e);
|
|
6437
6443
|
i && (r.text = { plain: i, ssml: "", language: "" });
|
|
6438
6444
|
const s = e.getAttribute("href") ?? "";
|
|
6439
6445
|
let o = e.getAttribute("id") ?? "";
|
|
6440
6446
|
if (!o && s.startsWith("#") && (o = s.slice(1)), s.startsWith("#")) {
|
|
6441
6447
|
const a = s.slice(1), c = this.ids.get(a);
|
|
6442
|
-
if (c && !
|
|
6448
|
+
if (c && !ar(c, e) && this.noterefDepth < 3) {
|
|
6443
6449
|
const l = new on(this.xmlParsed);
|
|
6444
6450
|
l.ids = this.ids, l.suppressed = this.suppressed, l.idAlloc = this.idAlloc, l.noterefDepth = this.noterefDepth + 1, l.allowNode = c, l.convert(c);
|
|
6445
6451
|
const d = l.result();
|
|
@@ -6454,7 +6460,7 @@ class on {
|
|
|
6454
6460
|
link(e, n) {
|
|
6455
6461
|
const r = {};
|
|
6456
6462
|
n.length > 0 && (r.role = n);
|
|
6457
|
-
const i =
|
|
6463
|
+
const i = We(e);
|
|
6458
6464
|
i && (r.text = { plain: i, ssml: "", language: "" });
|
|
6459
6465
|
const s = e.getAttribute("href");
|
|
6460
6466
|
s && (r.textref = s), this.placeholder(e, n[0] ?? "link", r);
|
|
@@ -6506,7 +6512,7 @@ class on {
|
|
|
6506
6512
|
const m = p.ctx.lang;
|
|
6507
6513
|
i.includes(m) || i.push(m);
|
|
6508
6514
|
}
|
|
6509
|
-
let s =
|
|
6515
|
+
let s = sr(this.current.el ?? null);
|
|
6510
6516
|
i.length === 1 && i[0] !== "" && (s = i[0]);
|
|
6511
6517
|
let o = !1;
|
|
6512
6518
|
for (const p of e)
|
|
@@ -6531,7 +6537,7 @@ class on {
|
|
|
6531
6537
|
let E = !1;
|
|
6532
6538
|
if (a.length > 0) {
|
|
6533
6539
|
const C = c || u || m;
|
|
6534
|
-
l ? E = !0 : d ? E = C && !
|
|
6540
|
+
l ? E = !0 : d ? E = C && !ot(w) : E = C;
|
|
6535
6541
|
}
|
|
6536
6542
|
E && (a += " "), a += w, c = p.text.endsWith(" "), l = !1, d = !1, u = !1;
|
|
6537
6543
|
} else p.kind === "break" ? l = !0 : p.kind === "placeholder" && (d = !0);
|
|
@@ -6549,9 +6555,9 @@ class on {
|
|
|
6549
6555
|
p += `<${w}`;
|
|
6550
6556
|
for (const [C, N] of Object.entries(E ?? {}))
|
|
6551
6557
|
p += ` ${C}="${At(N)}"`;
|
|
6552
|
-
m.ctx.lang !== s && m.ctx.lang !== "" && (p += ` xml:lang="${At(m.ctx.lang)}"`), p += `>${
|
|
6558
|
+
m.ctx.lang !== s && m.ctx.lang !== "" && (p += ` xml:lang="${At(m.ctx.lang)}"`), p += `>${rt(m.text)}</${w}>`;
|
|
6553
6559
|
} else
|
|
6554
|
-
p +=
|
|
6560
|
+
p += rt(m.text);
|
|
6555
6561
|
} else m.kind === "break" ? p += "<break/>" : m.kind === "placeholder" && (p += `<readium:${m.tag} id="${At(m.child.object.id)}" />`);
|
|
6556
6562
|
f.ssml = p;
|
|
6557
6563
|
}
|
|
@@ -6562,46 +6568,46 @@ class on {
|
|
|
6562
6568
|
this.appendChild(y);
|
|
6563
6569
|
}
|
|
6564
6570
|
}
|
|
6565
|
-
const
|
|
6566
|
-
function
|
|
6567
|
-
const n = e ??
|
|
6568
|
-
return s && !
|
|
6571
|
+
const uc = /<body[\s>]/i;
|
|
6572
|
+
function hc(t, e) {
|
|
6573
|
+
const n = e ?? sc(t), r = new DOMParser().parseFromString(t, n), i = new on(n === "application/xhtml+xml"), s = r.querySelector("body");
|
|
6574
|
+
return s && !uc.test(t) ? i.convertChildren(s) : i.convert(s ?? r.documentElement), i.result();
|
|
6569
6575
|
}
|
|
6570
|
-
function
|
|
6571
|
-
return { guided:
|
|
6576
|
+
function Cc(t, e) {
|
|
6577
|
+
return { guided: hc(t, e) };
|
|
6572
6578
|
}
|
|
6573
6579
|
export {
|
|
6574
6580
|
hl as BUILTIN_DECORATION_TYPES,
|
|
6575
|
-
|
|
6581
|
+
Cl as BooleanPreference,
|
|
6576
6582
|
bl as DecorationController,
|
|
6577
6583
|
ol as DecorationLayout,
|
|
6578
|
-
|
|
6584
|
+
A as DecorationStyleType,
|
|
6579
6585
|
al as DecorationWidth,
|
|
6580
6586
|
ul as Decorator,
|
|
6581
6587
|
pl as DirectCommsChannel,
|
|
6582
6588
|
ml as DirectCommsFrame,
|
|
6583
6589
|
yl as DirectCommsHost,
|
|
6584
6590
|
Fe as EnumPreference,
|
|
6585
|
-
|
|
6591
|
+
Ze as Locator,
|
|
6586
6592
|
W as LocatorLocations,
|
|
6587
|
-
|
|
6588
|
-
|
|
6593
|
+
lt as LocatorText,
|
|
6594
|
+
ct as Preference,
|
|
6589
6595
|
He as RangePreference,
|
|
6590
6596
|
xl as ReadiumSpeechDecorationController,
|
|
6591
|
-
|
|
6592
|
-
|
|
6597
|
+
kc as ReadiumSpeechNavigator,
|
|
6598
|
+
wc as ReadiumSpeechProviderRegistry,
|
|
6593
6599
|
kl as SpeechDefaults,
|
|
6594
6600
|
Ne as SpeechPreferences,
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
+
Zn as SpeechPreferencesEditor,
|
|
6602
|
+
Oo as SpeechServerEngine,
|
|
6603
|
+
fc as SpeechServerEngineProvider,
|
|
6604
|
+
Qe as SpeechServerError,
|
|
6605
|
+
Yn as SpeechSettings,
|
|
6606
|
+
Xn as StringArrayPreference,
|
|
6601
6607
|
Dn as WebSpeechEngine,
|
|
6602
|
-
|
|
6608
|
+
gc as WebSpeechEngineProvider,
|
|
6603
6609
|
k as WebSpeechVoiceManager,
|
|
6604
|
-
|
|
6610
|
+
Fl as blockLevelRoles,
|
|
6605
6611
|
Oe as chineseVariantMap,
|
|
6606
6612
|
ho as chunkPlainText,
|
|
6607
6613
|
fo as chunkSsmlText,
|
|
@@ -6609,17 +6615,17 @@ export {
|
|
|
6609
6615
|
Sl as createLocator,
|
|
6610
6616
|
fl as decorationsEqual,
|
|
6611
6617
|
Ll as defaultAnnouncements,
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6618
|
+
xc as extractUtterances,
|
|
6619
|
+
Cc as makeGnd,
|
|
6620
|
+
Er as mapServerVoice,
|
|
6615
6621
|
mo as mimeTypeForFormat,
|
|
6616
|
-
|
|
6622
|
+
hc as parseMarkup,
|
|
6617
6623
|
Kn as resolveDecorationForWire,
|
|
6618
6624
|
xo as selectBitrate,
|
|
6619
6625
|
vo as selectFormat,
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6626
|
+
vc as setupDecorations,
|
|
6627
|
+
Al as skippableAtVerbosity,
|
|
6628
|
+
Sc as skippableRoles,
|
|
6623
6629
|
dl as supportsDecorationStyle,
|
|
6624
|
-
|
|
6630
|
+
Ae as toSpeechServerError
|
|
6625
6631
|
};
|