1for (var attr in !function(he) { 2 var e; 3 he.ReadSpeaker && he.ReadSpeaker.uId && "wR_script" === he.ReadSpeaker.uId ? console.warn("[webReader] Object window.ReadSpeaker already exists! Aborting initialization.") : (e = function() { 4 function r(e) { 5 e = e.replace("_", "."); 6 var t, e = !1 === y[e] ? [e] : y[e]; 7 v++; 8 for (t of e) { 9 var r = K(t); 10 if ("function" == typeof r.init) 11 if (r.dependency) { 12 if (!X(r.dependency)) { 13 ce("[rspkr.setCoreLoaded] Dependencies for " + t + " (" + r.dependency + ") are not yet loaded. Putting it on hold."), 14 _[t] = r.dependency.constructor === Array ? r.dependency : [r.dependency]; 15 for (var n, o = _[t].length - 1; n = _[t][o]; o--) 16 X(n) && _[t].splice(o, 1); 17 continue 18 } 19 r.init.apply(r, []) 20 } else 21 r.init.apply(r, []); 22 !function(e) { 23 for (var t in ce("[rspkr.setCoreLoaded] Done loading module " + e), 24 E.push(e), 25 _) 26 if (_[t].length) 27 for (var r, n = _[t].length - 1; r = _[t][n]; n--) 28 r !== e && !X(r) || _[t].splice(n, 1), 29 0 === _[t].length && (ce("[rspkr.setCoreLoaded] All dependencies for " + t + " have been loaded. Resuming its initiation."), 30 E.push(t), 31 (r = K(t)).init.apply(r, [])) 32 }(t) 33 } 34 v === Object.size(y) && (rspkr.Common.addEvent("onModsLoaded", function() { 35 rspkr.ds.unload(), 36 rspkr.c.Detect.init(), 37 rspkr.Popup.init() 38 }), 39 $ = !0, 40 W("rsmod_lib.RSLib")) 41 } 42 function i() { 43 return "string" == typeof T.forceAdapter && T.forceAdapter.length && "ioshtml5" !== T.forceAdapter ? T.forceAdapter : he.AudioContext || he.webkitAudioContext ? "webAudio" : "html5" 44 } 45 function a() { 46 for (var e = J(), t = 0, r = e.length; t < r; t++) 47 $rs.addClass(e[t], U.join(" ")) 48 } 49 function l() { 50 if (!$ && !B) 51 if (B = !0, 52 (q || T.mobile) && "1" !== T.noDefaultSkin && ne.load({ 53 id: "rsmod_Styles", 54 type: "text/css", 55 src: k + b + ".Styles" + (H.length ? H : "") + ".css", 56 cb: null 57 }), 58 /combined/i.test(T.pids)) 59 for (var e in y) 60 y.hasOwnProperty(e) && r(e); 61 else 62 for (var t in y) 63 y.hasOwnProperty(t) && (t = t, 64 ne.load({ 65 id: "req_" + t, 66 type: "text/javascript", 67 src: ("pub.Config" === t ? b : k + b) + "." + t + ".js", 68 cb: function(e) { 69 e = he.event && he.event.srcElement && he.event.srcElement.id ? he.event.srcElement.id : e; 70 e && r(e.replace("req_", "")) 71 }, 72 async: !0 73 })) 74 } 75 function c() { 76 rspkr.log("[rspkr.updateBaseClass] Attempting to update.."); 77 for (var e = document.getElementsByTagName("div"), t = /\brsbtn\b/, r = 0, n = e.length; r < n; r++) 78 t.test(e[r].className) && (e[r].className = e[r].className.replace(t, "rsbtn " + P.toLowerCase())); 79 rspkr.log("[rspkr.updateBaseClass] Update successful!") 80 } 81 function e(e, t) { 82 if (t = t || {}, 83 !e && rspkr.item && rspkr.item("general.popupHref")) 84 return rspkr.item("general.popupHref"); 85 if (!e && he.rsConf && he.rsConf.general && he.rsConf.general.popupHref) 86 return he.rsConf.general.popupHref; 87 var r, n, o, s, i = e && t.scopedSearch ? [] : Array.prototype.slice.call(rspkr.getRSBtns()); 88 if (e && e.querySelector) { 89 for (var a = 0; a < i.length; a++) 90 i[a] === e && i.splice(a, 1); 91 i.unshift(e) 92 } 93 for (n of i) { 94 var l = n.querySelector(".rsbtn_play") 95 , c = l?.getAttribute("href"); 96 if (c && t.prioritizeVisible && !$rs.isVisible(l)) 97 r = r || c; 98 else if (c) 99 return c 100 } 101 if (!t.scopedSearch) { 102 if (r) 103 return r; 104 if (document.querySelectorAll) { 105 for (o of (e || document).querySelectorAll(".rs_href")) { 106 if ($rs.getAttr(o, "href")) 107 return $rs.getAttr(o, "href"); 108 if ($rs.getAttr(o, "data-href")) 109 return $rs.getAttr(o, "data-href") 110 } 111 for (s of (e || document).querySelectorAll('[href*="readspeaker.com"]')) 112 if (/rsent?/gi.test($rs.getAttr(s, "href"))) 113 return $rs.getAttr(s, "href") 114 } 115 } 116 } 117 function t() { 118 var e = rspkr.item("general.selectionPlayer"); 119 if (e) { 120 var t = document.querySelector(e); 121 if (t) 122 return t 123 } 124 return (t = document.querySelector(".rs_exp")) || null 125 } 126 function n(e) { 127 return e = e ? "." : "",
128 rspkr.skin && "default" !== rspkr.skin ? e + rspkr.skin.toLowerCase() : e + (rspkr.item("ui.rsbtnClass") || "rsbtn") 129 } 130 function o(e) { 131 N = /^,[0-9,]*,$/.test(e) ? e : "," + e + "," 132 } 133 var u, s, p, d, f, g, h, m = { 134 major: "3", 135 minor: "8", 136 update: "7", 137 revision: "2728", 138 prod: "wr" 139 }, b = "ReadSpeaker", k = "", y = [], v = 0, w = 0, S = !1, E = [], _ = {}, A = 0, C = [], D = [], L = !1, R = 0, x = !1, T = null, P = "default", O = [], $ = !1, B = !1, N = "", I = {}, M = "", z = null, q = !1, j = !1, F = [], H = "", U = [], K = function(e) { 140 if ("string" == typeof e) { 141 for (var t = (e = "ReadSpeaker." + e.replace("_", ".")).split("."), r = he, n = 0, o = t.length; n < o; n++) { 142 if (!r) 143 return !1; 144 if (!r[t[n]]) 145 return !1; 146 if (n === o - 1) 147 return r[t[n]]; 148 r = r[t[n]] 149 } 150 return !1 151 } 152 }, W = function(e) { 153 E.push(e); 154 e = K(e); 155 "function" == typeof e.init && e.init.apply(e, []), 156 function() { 157 if ($ && he.ReadSpeaker.modmap) { 158 var e = he.ReadSpeaker.modmap 159 , t = [] 160 , r = 0 161 , n = "|" 162 , o = []; 163 for (var s of O) 164 if (t = e.products && typeof e.products[s] === "function" ? e.products[s]() : null) { 165 r = 0; 166 for (var i = 0, a = t.length; i < a; i++) 167 if (n.indexOf("|" + t[i][0] + t[i][1] + "|") === -1) { 168 if (t[i][0].length) { 169 o[t[i][0]] = t[i][2]; 170 ne.load({ 171 id: "rsmod_" + t[i][0], 172 type: t[i][1], 173 src: (t[i][2] && t[i][2] === true ? b : k + b) + "." + t[i][0] + (t[i][1] === "text/css" ? ".css" : ".js"), 174 cb: function() { 175 var e = (he.event && he.event.srcElement && he.event.srcElement.id ? he.event.srcElement.id : this.id).replace("rsmod_", ""); 176 V(e, o[e]) 177 }, 178 async: true 179 }) 180 } 181 if (typeof t[i][1] !== "undefined" && /text\/javascript/.test(t[i][1])) 182 r++; 183 n += t[i][0] + t[i][1] + "|" 184 } 185 w += r 186 } 187 S = true; 188 if (t.length === 0) 189 V(null, null, true) 190 } 191 }() 192 }, V = function(e, t, r) { 193 if (!(r = void 0 !== r)) { 194 E.push(e), 195 A++; 196 for (var n = 0, o = (t = t || [e]).length; n < o; n++) 197 try { 198 var s = K(t[n]); 199 "function" == typeof s.init && s.init.apply(s, []) 200 } catch (e) { 201 rspkr.error("[rspkr] Could not load: " + t[n] + " | " + e) 202 } 203 } 204 A === w && !0 === S && (ce("[rspkr] All prod mods loaded. _domready = " + x, 4), 205 q && he.ReadSpeaker.loadInit(), 206 he.ReadSpeaker.Common.addEvent("onReady", function() { 207 rspkr.devt("onBeforeQueueExecuted", he), 208 re.executeCode(), 209 re.flush(), 210 rspkr.devt("onAfterQueueExecuted", he), 211 z && function() { 212 rspkr.log("[rspkr.startAutoplay] Id: " + z); 213 var e = $rs.get(z); 214 if ($rs.isArray(e) && e.length) 215 e = e[0]; 216 else if ($rs.isArray(e) && !e.length) 217 return; 218 var t = $rs.findIn(e, "a"); 219 if ($rs.isArray(t) && t.length) 220 t = t[0]; 221 else if ($rs.isArray(t) && !t.length) 222 return; 223 he.readpage(t) 224 }() 225 }), 226 e = function() { 227 rspkr.Common.createShortcuts(), 228 rspkr.devt("onModsLoaded", he), 229 rspkr.devt("onAfterModsLoaded", he), 230 rspkr.devt("onReady", he), 231 he.ReadSpeaker.ui.viewport = { 232 width: $rs.width(he), 233 height: $rs.height(he) 234 } 235 } 236 , 237 x ? e() : he.ReadSpeaker.Common.addEvent("onDOMReady", e)) 238 }, X = function(e) { 239 e.constructor === Array || (e = [e]); 240 var t, r = 0; 241 for (t of E) 242 for (var n of e) 243 if (t === n) { 244 r++; 245 break 246 } 247 return r === e.length 248 }, Y = { 249 isLoaded: !1, 250 isTogglerAdded: !1, 251 toggler: { 252 add: function() { 253 if (!(document.documentMode && document.documentMode <= 9 || rspkr.nofeatures() || rspkr.notools() || rspkr.mobile())) { 254 for (var e, t, r = J("rs_addtools"), n = rspkr.item("ui.tooltoggler.big"), o = !1, s = 0, i = r.length; s < i; s++) 255 r[s] && r[s].className && -1 === r[s].className.indexOf("rs_notools") && (n && $rs.addClass(r[s], "mega_toggle"), 256 r[s].querySelectorAll(".rsbtn_tooltoggle").length || (e = document.createElement("div"), 257 t = rspkr.getPhrase("menu", rspkr.uiLang()), 258 e.innerHTML = '<button type="button" class="rsbtn_tooltoggle" data-rsshortcut="menu" data-rslang="title/arialabel:menu" title="%tgl%" aria-label="%tgl%" aria-expanded="false" data-rs-tooltip="." data-rs-direction="u"><span class="rsicn rsicn-arrow-down" aria-hidden="true"></span></button>'.replace(/%tgl%/g, t), 259 t || (o = !0), 260 e.childNodes[0].style.display = "none", 261 r[s].insertBefore && (e = r[s].insertBefore(e.childNodes[0], r[s].firstChild), 262 r[s].id && r[s].id.length || (r[s].id = rspkr.getID()), 263 $rs.setAttr(e, "data-rs-container", r[s].id), 264 $rs.regEvent(e, "mouseover focus", Y.toggler.events.over), 265 $rs.regEvent(e, "mouseout blur", Y.toggler.events.out), 266 $rs.regEvent(e, "click", Y.toggler.events.click), 267 Y.isTogglerAdded = !0))); 268 o && rspkr.Lang && he.rspkr.evt("onLangLoaded", function() {
269 rspkr.getRSBtns().forEach(function(e) { 270 he.rspkr.Lang.updateUi(e) 271 }) 272 }) 273 } 274 }, 275 events: { 276 over: function(e) { 277 rspkr.preventDefault(e), 278 Y.zoomTogglerIn(document.getElementById($rs.getAttr(this, "data-rs-container"))) 279 }, 280 out: function(e) { 281 rspkr.preventDefault(e), 282 Y.zoomTogglerOut(document.getElementById($rs.getAttr(this, "data-rs-container"))) 283 }, 284 click: function(e) { 285 if (rspkr.preventDefault(e), 286 !rspkr.pl && rspkr.conf("general.confirmPolicy") && !confirm(rspkr.conf("general.confirmPolicy"))) 287 return !1; 288 Y.load.apply(this, [e]) 289 } 290 } 291 }, 292 load: function(e) { 293 var t = this; 294 e && e.type && -1 < e.type.indexOf("mouse") ? F[$rs.getAttr(t, "data-rsevent-id")] = he.setTimeout(function() { 295 Y.dispatch(t) 296 }, 500) : Y.dispatch(t) 297 }, 298 loadCancel: function() { 299 F[$rs.getAttr(this, "data-rsevent-id")] && he.clearTimeout(F[$rs.getAttr(this, "data-rsevent-id")]) 300 }, 301 dispatch: function(e) { 302 L ? (Y.afterLoad.apply(e, [!0]), 303 Y.open.apply(e, [])) : (l(), 304 C.push(function() { 305 Y.afterLoad.apply(e, [!0]), 306 rspkr.ui.addTools(), 307 Y.open.apply(e, []) 308 })) 309 }, 310 afterLoad: function() { 311 function e(e) { 312 e.parentElement.querySelector(".rs-contextmenu") || ($rs.unregEvent(this, "mouseleave"), 313 $rs.regEvent($rs.closest(e, ".rsbtn_tools"), "mouseleave", function() { 314 $rs.unregEvent(this, "mouseleave"), 315 Y.close.apply(this, []) 316 })) 317 } 318 for (var t, r = J("rs_addtools"), n = 0, o = r.length; n < o; n++) 319 (t = r[n].querySelector(".rsbtn_tooltoggle")) && (Y.isLoaded = !0, 320 Y.loadCancel(), 321 $rs.unregEvent(t, "click"), 322 $rs.regEvent(t, "click", Y.toggle), 323 rspkr.Common.addEvent("onToolClicked", e), 324 rspkr.Common.addEvent("onLangLoaded", function(e) { 325 e === rspkr.uiLang() && (e = $rs.arr(".rsbtn_tooltoggle"), 326 rspkr.Lang.updateUi(e)) 327 })), 328 rspkr.Lang.updateUi(t) 329 }, 330 open: function(e) { 331 rspkr.ui.Tools.accessibility.isAccessKey(e) && (rspkr.ui.Tools.accessibility.storeSelection(), 332 rspkr.c.addEvent("onAfterToolsOpen", function() { 333 rspkr.ui.Tools.accessibility.restoreSelection(), 334 rspkr.c.clearEvent("onAfterToolsOpen", rspkr.ui.Tools.accessibility.restoreSelection) 335 })); 336 var t, r = Y.getPlayerContainer(this), e = $rs.findIn(r, ".rsbtn_toolpanel"); 337 if (rspkr.ui && rspkr.ui.Accessibility.escapes.menu(e), 338 rspkr.ui && rspkr.ui.Accessibility.escapes.dropdowns(), 339 ($rs.isArray(e) && !e.length || void 0 === e) && rspkr.ui.addTools(), 340 e = $rs.findIn(r, ".rsbtn_toolpanel"), 341 rspkr.ui.utils.setZIndex(r, !0), 342 !e) 343 throw "Could not find menu!"; 344 rspkr.item("ui.toolbar.horizontal") && !$rs.getAttr(e, "data-full-width") && ($rs.hasClass(r, "rsdetached") && (r.style.width = "1000px"), 345 e.style.display = "block", 346 t = $rs.width($rs.findIn(e, ".rsbtn_tools")) + 5, 347 e.style.display = "", 348 $rs.hasClass(r, "rsdetached") && (r.style.width = ""), 349 $rs.setAttr(e, "data-full-width", t), 350 e.style.width = t + "px", 351 e.style.minWidth = t + "px"), 352 rspkr.item("ui.toolbar.inverted") ? (e.style.display = "block", 353 t = e.querySelector(".rsbtn_tools").clientHeight, 354 e.style.removeProperty("display"), 355 n = r.clientHeight, 356 e.style.top = -1 * (t + n + 3) + "px") : e.style.removeProperty("top"), 357 Y.zoomTogglerIn.apply(this, [r]), 358 $rs.hasClass(r, "toolsopen") || (rspkr.devt("onBeforeToolsOpe
358n", "__self__", [r]), 359 $rs.addClass(r, "toolsopen"), 360 rspkr.devt("onAfterToolsOpen", "__self__", [r])), 361 $rs.setAttr($rs.findIn(r, ".rsbtn_tooltoggle"), "aria-expanded", "true"); 362 var n = $rs.findIn(r, ".rsbtn_tooltoggle"); 363 $rs.isArray(e) && (e = e[0]), 364 he.getComputedStyle && (r = document.defaultView.getComputedStyle(e).getPropertyValue("z-index"), 365 $rs.css(n, "z-index", parseInt(r) + 1)); 366 function o() { 367 var e = this.querySelector(".rsbtn_tools"); 368 e.style.width = "auto", 369 this.style.width = "700px", 370 e = $rs.width(e) + 10, 371 this.style.minWidth = e + "px", 372 this.style.width = "auto" 373 } 374 rspkr.c.addEvent("onUiUpdated", o.bind(e)), 375 o.bind(e)(), 376 e.parentElement.querySelector(".rsbtn_tooltoggle").focus(), 377 document.removeEventListener("click", Y.close), 378 document.addEventListener("click", Y.close) 379 }, 380 close: function(e) { 381 rspkr.ui.Tools.accessibility.isAccessKey(e) && (rspkr.ui.Tools.accessibility.storeSelection(), 382 rspkr.c.addEvent("onAfterToolsClose", function() { 383 rspkr.ui.Tools.accessibility.restoreSelection(), 384 rspkr.c.clearEvent("onAfterToolsClose", rspkr.ui.Tools.accessibility.restoreSelection) 385 })); 386 var t = Y.getPlayerContainer(this) || document.querySelector("div.toolsopen") 387 , e = $rs.findIn(t, ".rsbtn_toolpanel"); 388 rspkr.devt("onBeforeToolsClose", "__self__", [t]), 389 $rs.removeClass(t, "toolsopen"), 390 rspkr.devt("onAfterToolsClose", "__self__", [t]), 391 $rs.setAttr($rs.findIn(t, ".rsbtn_tooltoggle"), "aria-expanded", "false"), 392 rspkr.ui.Accessibility.escapes.menu(e), 393 rspkr.ui.Accessibility.escapes.langpicker(), 394 document.removeEventListener("click", Y.close) 395 }, 396 toggle: function(e) { 397 rspkr.preventDefault(e), 398 Y.isLoaded && ($rs.hasClass(Y.getPlayerContainer(this), "toolsopen") ? Y.close : Y.open).apply(this, [e]) 399 }, 400 getPlayerContainer: function(e) { 401 return $rs.closest(e, rspkr.rsbtnClass(!0) + ",.rs_addtools") 402 }, 403 zoomTogglerIn: function(e) { 404 $rs.addClass(e, "zoom-tooltoggler") 405 }, 406 zoomTogglerOut: function(e) { 407 $rs.removeClass(e, "zoom-tooltoggler") 408 } 409 }, G = (d = 39, 410 g = f = 30, 411 { 412 init: function() { 413 if (rspkr.c.addEvent("onSelectedText", de), 414 rspkr.c.addEvent("onSelectedText", ge.bind(void 0, !0)), 415 rspkr.c.addEvent("onDeselectedText", ge.bind(void 0, !1)), 416 "complete" === document.readyState || "loaded" === document.readyState) 417 for (var e = $rs.getReadingFrames(), t = 0; t < e.length; t++) 418 try { 419 e[t].document.body.addEventListener("click", h) 420 } catch (e) {} 421 else 422 document.addEventListener("readystatechange", function() { 423 if ("complete" === document.readyState || "loaded" === document.readyState) 424 for (var e = $rs.getReadingFrames(), t = 0; t < e.length; t++) 425 try { 426 e[t].document.addEventListener("click", h) 427 } catch (e) {} 428 }); 429 rspkr.log("[rspkr.Popup] Heartbeat!") 430 }, 431 container: { 432 popup: u, 433 langpicker: void 0 434 }, 435 lastSelectedText: void 0, 436 newTextSelected: function() { 437 return s 438 }, 439 closePopup: h = function(e, t) { 440 u && "none" !== u.style.display && (!t && (s || !u || e && e.target && function(e) { 441 var t = document; 442 for (e && (t = (t = e.ownerDocument) || (e.body ? e : document)); e && e !== t.body; ) { 443 if (/rspopup_translation/gi.test(e.className)) 444 return 1; 445 e = e.parentElement 446 } 447 }(e.target)) || ($rs.css(u, "display", "none"), 448 pe(), 449 rspkr.Translation.hideMenu(u), 450 rspkr.api.callback.execute(rspkr.api.callback.enums.UI.POPUP.CLOSE, u))) 451 } 452 , 453 showPopup: de 454 }), J = function(e, t) { 455 var r = []; 456 if ((t = !t || !t.querySelectorAll ? document : t).querySelectorAll) 457 r = t.querySelectorAll(".rsbtn" + (e = e ? ",." + e : "") + ":not(.rs_splitbutton-container)"); 458 else { 459 e = e ? "|" + e + "\\b" : ""; 460 for (var n = t.getElementsByTagName("div"), o = new RegExp("rsbtn\\b" + e,"i"), s = 0, i = n.length; s < i; s++) 461 n[s] && n[s].className && o.test(n[s].className) && r.push(n[s]) 462 } 463 return r 464 }, Z = function(e) { 465 if ("string" != typeof e) 466 return {}; 467 for (var t, r = {}, n = e.split(/[;&]/), o = 0; o < n.length; o++) 468 (t = n[o].split("=")) && 2 === t.length && (r[decodeURIComponent(t[0])] = decodeURIComponent(t[1]).replace(/\+/g, " ")); 469 return r 470 }, Q = function(e, t, r) { 471 var n = new RegExp("([\\?&|&]" + e + "=)[^&$]*","gi"); 472 return n.test(r) ? r.replace(n, "$1" + t) : r + "&" + e + "=" + t 473 }, ee = function(e, t) { 474 var r; 475 if (t) 476 for (r of ((t = t.split("?"))[1] || t[0]).split(/&|&/)) 477 if (r = r.split("="), 478 r[0] === e && r[1]) 479 return r[1] 480 }, te = function(e, t) { 481 if (t) { 482 e = new RegExp(e + "=[^&]+","i"), 483 e = t.match(e); 484 return e && e.length && e.forEach(function(e) { 485 t = t.replace(e, "") 486 }), 487 t = "&" === (t = t.replace("&&", "&").replace("?&", "?")).substr(-1) ? t.substring(0, t.length - 1) : t 488 } 489 }, re = { 490 isok: !0, 491 executeCode: function(e) { 492 var t, r = "jit" === e ? D : C; 493 if (this.isok = !0, 494 !r.length) 495 return !0; 496 for (t in r) 497 if (r.hasOwnProperty(t) && "function" == typeof r[t]) 498 try { 499 r[t].apply(he, []) 500 } catch (e) { 501 this.isok = !1, 502 rspkr.error("[rspkr.q] " + e) 503 } 504 }, 505 flush: function(e) {} 506 }, ne = { 507 loadCss: function(n, o) { 508 function r(e) { 509 var t = document.createElement("link"); 510 t.id = n.id.replace(".", "_"), 511 t.type = n.type, 512 t.rel = "stylesheet", 513 t.href = n.src + "?v=" + o; 514 var r = e.getElementById(n.id); 515 r && r.parentElement.removeChild(r), 516 document.createStyleSheet && document.documentMode && document.documentMode <= 8 ? document.createStyleSheet(t.href) : (e.head || e.body).appendChild(t) 517 } 518 if (r(document), 519 "complete" === document.readyState || "loaded" === document.readyState) { 520 if (he.rspkr && he.rspkr.item && rspkr.item("general.iframeReading") && he.$rs) 521 for (var e = $rs.getReadingFrames(), t = 0; t < e.length; t++) 522 try { 523 r(e[t].document) 524 } catch (e) {} 525 } else 526 document.addEventListener("readystatechange", function() { 527 if (("complete" === document.readyState || "loaded" === document.readyState) && he.rspkr && he.rspkr.item && rspkr.item("general.iframeReading") && he.$rs) 528 for (var e = $rs.getReadingFrames(), t = 0; t < e.length; t++) 529 try { 530 r(e[t].document) 531 } catch (e) {} 532 }) 533 }, 534 load: function(e) { 535 var t, r, n, o = "text/javascript", s = "text/css"; 536 e.type !== o && e.type !== s || (e.src = T.path + e.src, 537 t = document.getElementsByTagName("head")[0], 538 n = e.type === o ? "script" : "link", 539 r = document.createElement(n), 540 n = [m.major, m.minor, m.update, m.revision].join("."), 541 "function" == typeof e.cb && (void 0 !== r.onreadystatechange ? r.onreadystatechange = function() { 542 "complete" !== this.readyState && "loaded" !== this.readyState || e.cb.apply(he, [e.id]) 543 } 544 : r.onload = function() { 545 e.cb.apply(he, [e.id]) 546 } 547 ), 548 r.id = e.id.replace(".", "_"), 549 r.type = e.type, 550 e.type === o ? (r.src = e.src + "?v=" + n, 551 e.async && (r.async = !0), 552 t.appendChild(r)) : e.type === s && this.loadCss(e, n)) 553 }, 554 jsonpLoad: function(e) { 555 var t = document.createElement("script"); 556 t.id = e.id || "rsjsonploaded_" + oe(), 557 t.src = e.src, 558 t.async = !0, 559 document.body.appendChild(t) 560 } 561 }, oe = function() { 562 return "readspeaker" + R++ 563 }, se = 0, ie = { 564 1: [], 565 2: [], 566 3: [], 567 4: [], 568 5: [], 569 6: [] 570 }, ae = function(e, t) { 571 t = parseInt(t) || 3; 572 var r = le[t].lbl; 573 console.groupCollapsed && console.groupCollapsed(r); 574 for (var n = 0; n < e.length; n++) 575 try { 576 console[le[t].method] && console[le[t].method](e[n]) 577 } catch (e) {} 578 console.groupCollapsed && console.groupEnd() 579 }, le = { 580 1: { 581 lbl: "Info", 582 method: "log" 583 }, 584 2: { 585 lbl: "Warn", 586 method: "warn" 587 }, 588 3: { 589 lbl: "Err", 590 method: "error" 591 }, 592 4: { 593 lbl: "AS", 594 method: "log" 595 }, 596 5: { 597 lbl: "SW", 598 method: "log" 599 } 600 }, ce = function(e, t) { 601 var r = N; 602 if (ie[t = t || 1].push(e), 603 r && "string" == typeof r && -1 < r.indexOf("," + t + ",")) { 604 r = le[t].lbl; 605 try { 606 console[le[t].method] && console[le[t].method](se++ + ". " + r + ": " + e) 607 } catch (e) {} 608 } 609 }; 610 function ue(e) {
611 if (!rspkr.st || "popupcloseoff" !== rspkr.st.get("popupclose")) { 612 var t = rspkr.st && rspkr.st.get && rspkr.st.get("popupclosetime"); 613 if ("-1" === String(t) || !t && "-1" === String(rspkr.item("general.popupCloseTime"))) 614 return !1; 615 e = e || he, 616 p || "function" != typeof e.setTimeout || (t = rspkr.st && rspkr.st.get("popupclosetime") || rspkr.item("general.popupCloseTime") || 1e4, 617 p = e.setTimeout(function() { 618 h(void 0, !0) 619 }, t)) 620 } 621 } 622 function pe(e) { 623 e = e && e.window ? e : he, 624 p && (e.clearTimeout(p), 625 p = null) 626 } 627 function de(e, t) { 628 if (!rspkr.nofeatures()) { 629 var r = rspkr.features; 630 if ((r.popupplayback || r.dictionary || r.translation) && !(rspkr.mobile() || rspkr.st && "iconon" !== rspkr.st.get("hlicon")) && (rspkr.st || "iconoff" !== rspkr.item("settings.hlicon"))) 631 if (rspkr.findHref() && (rspkr.getRSBtns().length || rspkr.findExpContainer())) { 632 var n, o, s = document, i = he, a = e.originalEvent || e; 633 for (n of ["rslightbox_contentcontainer", "rs_overlay", "rsmask-top"]) { 634 var l = s.getElementById(n); 635 if (l && $rs.isVisible(l)) 636 return 637 } 638 a.srcElement.closest(rspkr.selector.skipalways) || a.srcElement.closest(rspkr.selector.secret) || (e = (rspkr.c?.data.selectedDocument || he).getSelection(), 639 (t = t || e.toString()).length && ($rs.isContentEditable(e.anchorNode) || $rs.isContentEditable(e.focusNode) || t === rspkr.Popup.lastSelectedText && $rs.isVisible(u) || (rspkr.Popup.lastSelectedText = t, 640 u && ((t = u.ownerDocument).isSameNode(s) || (o = t.defaultView || t.parentWindow, 641 pe(o), 642 u.parentNode && u.parentNode.removeChild(u), 643 u = void 0, 644 o.getSelection().empty())), 645 u && u.parentNode || ((u = s.createElement("div")).className = "rspopup", 646 u.id = "rsbtn_popup", 647 "default" !== P && u.classList.add(P), 648 rspkr.item("ui.logo.bw") && u.classList.add("bw-logo"), 649 o = "", 650 r.popupplayback && (o += '<div class="rspopup_play rspopup_btn" role="button" tabindex="0" aria-label="%" data-rslang="title/arialabel:listen"><span class="rspopup_label" data-rslang="content:listen">%</span></div>'.replace(/%/g, rspkr.getPhrase("b", rspkr.uiLang()))), 651 rspkr.notools() || (r.dictionary && (o += '<div class="rspopup_dictionary rspopup_btn" role="button" tabindex="0" aria-label="%" data-rslang="title/arialabel:dictionary"><span class="rspopup_label" data-rslang="content:dictionary">%</span></div>'.replace(/%/g, rspkr.getPhrase("a", rspkr.uiLang()))),
652 r.translation && (o += '<div class="rspopup_translation rspopup_btn" role="button" tabindex="0" aria-label="%" data-rslang="title/arialabel:translation"><span class="rspopup_label" data-rslang="content:translation">%</span></div>'.replace(/%/g, rspkr.getPhrase("e", rspkr.uiLang()))), 653 r.dictionary && (o += '<button tabindex="-1" class="rsbtn_dictionary_focusforward" data-rsshortcut="dictionary" aria-hidden="true"><span class=""></span></button>'), 654 r.translation && (o += '<button tabindex="-1" class="rsbtn_translation_focusforward" data-rsshortcut="translation" aria-hidden="true"><span class=""></span></button>')), 655 u.innerHTML = o, 656 rspkr.notools() || (r.dictionary && (u.querySelector(".rsbtn_dictionary_focusforward").style = "position: absolute; top: -10000px;"), 657 r.translation && (u.querySelector(".rsbtn_translation_focusforward").style = "position: absolute; top: -10000px;")), 658 s.body.appendChild(u), 659 d = $rs.outerWidth(u), 660 f = $rs.outerHeight(u), 661 document.querySelectorAll(".rspopup_btn").forEach(function(e) { 662 $rs.regEvent(e, "mousedown", function(e) { 663 rspkr.preventDefault(e) 664 }) 665 }), 666 r.popupplayback && $rs.regEvent(u.querySelector(".rspopup_play"), "mouseup", function(e) { 667 fe(e, 1) 668 }), 669 rspkr.notools() || (r.dictionary && $rs.regEvent(u.querySelector(".rspopup_dictionary"), "mouseup", function(e) { 670 fe(e, 3) 671 }), 672 r.translation && $rs.regEvent(u.querySelector(".rspopup_translation"), "mouseup", function(e) { 673 fe(e, 2) 674 }), 675 r.dictionary && $rs.regEvent(u.querySelector(".rsbtn_dictionary_focusforward"), "click", function(e) { 676 u.querySelector(".rspopup_dictionary").focus(), 677 fe(e, 3) 678 }), 679 r.translation && $rs.regEvent(u.querySelector(".rsbtn_translation_focusforward"), "click", function() { 680 var e = document.createEvent("MouseEvents"); 681 e.initEvent("mouseup", !0, !0), 682 u.querySelector(".rspopup_translation").dispatchEvent(e), 683 u.querySelector(".rspopup_translation .rs-contextmenu a").focus() 684 })), 685 document.querySelectorAll(".rspopup_btn").forEach(function(e) { 686 e.addEventListener("keydown", function(e) { 687 e.stopPropagation(), 688 13 !== e.which && 32 !== e.which || (rspkr.preventDefault(e), 689 (e = document.createEvent("MouseEvents")).initEvent("mouseup", !0, !0), 690 this.dispatchEvent(e)) 691 }) 692 }), 693 rspkr.Lang && rspkr.Lang.updateUi(u), 694 rspkr.Popup.container.popup = u), 695 e = rspkr.Dialog?.getDialog() || e?.anchorNode?.parentElement?.closest("dialog"), 696 u.classList.toggle("dialog-popup", e), 697 (e ?? document.body).appendChild(u), 698 rspkr.ui ? rspkr.ui.utils.setZIndex(u, !0) : u.style.zIndex = 1e3, 699 rspkr.Popup.container.langpicker && rspkr.Popup.container.langpicker.close(), 700 $rs.css(u, "display", "block"), 701 a = e ? function(e) { 702 var t = {} 703 , r = rspkr.Dialog.getDialog().getBoundingClientRect() 704 , n = u.getBoundingClientRect(); 705 t.left = e.clientX || rspkr.ui.pointerX, 706 t.top = e.clientY || rspkr.ui.pointerY; 707 e = rspkr.ui.pointerY <= t.top; 708 return t.left -= r.left, 709 t.top -= r.top, 710 t.left + n.width + 10 > r.width && (t.left = r.width - n.width - 10), 711 e ? t.top += 20 : t.top -= 50, 712 t 713 }(a) : function(e, t) { 714 t = t || document; 715 var r = {} 716 , n = (rspkr.ui || he.ReadSpeaker.ds).pointerX 717 , o = (rspkr.ui || he.ReadSpeaker.ds).pointerY 718 , s = (e.target === t ? t : t = e.target.ownerDocument).defaultView 719 , i = e.clientX || e.pageX || n 720 , n = e.clientY || e.pageY || o 721 , a = { 722 x: 0, 723 y: 0 724 }; 725 if (s.rspkr)
726 a.x = $rs.scrollLeft(document), 727 a.y = $rs.scrollTop(document); 728 else 729 for (i = e.pageX, 730 n = e.pageY; !s.rspkr; ) { 731 var l = $rs.offset(s.frameElement, !1); 732 a.x += l.left - $rs.scrollLeft(s.document), 733 a.y += l.top - $rs.scrollTop(s.document), 734 s = s.parent 735 } 736 return i += a.x, 737 o < (n += a.y) || /OPR\//gi.test(navigator.userAgent) ? n - $rs.scrollTop(t) + f > $rs.height(he) - (f + 10) ? r.top = n - (f + g) : r.top = n + g : n - $rs.scrollTop(document) - (f + g) < 10 ? r.top = n + g : r.top = n - (f + g / 2), 738 i - $rs.scrollLeft(t) < 10 ? r.left = i + 10 : i - $rs.scrollLeft(t) > $rs.width(he) - (d + 10) ? r.left = $rs.width(he) + $rs.scrollLeft(t) - (d + 10) : r.left = i + 0, 739 r 740 }(a, s), 741 u.style.top = a.top + "px", 742 u.style.left = a.left + "px", 743 pe(i), 744 ue(i), 745 $rs.regEvent(u, "mouseover", pe.bind(void 0, i)), 746 $rs.regEvent(u, "mouseout", ue.bind(void 0, i)), 747 i = Array.prototype.slice.call(u.querySelectorAll(".rspopup_btn")), 748 $rs.regEvent(i, "focus", pe), 749 $rs.regEvent(i, "blur", ue), 750 !rspkr.with.firefox() && !rspkr.with.safari() && $rs.isVisible(u) && $rs.isWithinViewport(u) && ((i = $rs.createElm("div", { 751 attributes: { 752 tabindex: "0", 753 style: "position:absolute;width:0;height:0;outline:0;" 754 } 755 })).addEventListener("blur", function() { 756 this.parentElement.removeChild(this) 757 }), 758 u.insertBefore(i, u.firstChild), 759 i.focus()), 760 rspkr.api.callback.execute(rspkr.api.callback.enums.UI.POPUP.OPEN, u)))) 761 } else 762 rspkr.error("[showPopup] No href. Aborting popup.") 763 } 764 } 765 function fe(e, t) { 766 if (rspkr.preventDefault(e), 767 rspkr.pl) 768 rspkr.Popup.runPopup(e, u, t); 769 else { 770 if (rspkr.item("general.confirmPolicy") && !confirm(rspkr.item("general.confirmPolicy"))) 771 return h(), 772 0; 773 rspkr.loadCore(), 774 C.push(function() { 775 rspkr.Popup.runPopup(e, u, t) 776 }) 777 } 778 } 779 function ge(e) { 780 s = !!e || void 0 781 } 782 return Object.size = function(e) { 783 var t, r = 0; 784 for (t in e) 785 e.hasOwnProperty(t) && r++; 786 return r 787 } 788 , 789 function() { 790 var e; 791 1 === (e = (o = he.rsConf && he.rsConf.params && "string" == typeof he.rsConf.params ? he.rsConf.params : (n = !(n = document.getElementById("rs_req_Init") || document.currentScript) ? (e = document.getElementsByTagName("script"))[e.length - 1] : n).getAttribute("src")).split("?")).length && e.push("pids=wr"), 792 M = o.replace(/[^\/]*$/, ""), 793 N = function() { 794 var t; 795 if (/rsdebug=rsdebug/i.test(document.location.href)) 796 try { 797 t = "," + document.location.href.split("?").pop().match(/rsdebug=rsdebug([^$|&]*)/i).pop() + "," 798 } catch (e) { 799 t = ",3," 800 } 801 else 802 t = ""; 803 return t 804 }(); 805 var t, r, n = Z(e[1]), o = Z(e[1]); 806 if (P = (T = n).skin || "default", 807 O = n.pids.split(","), 808 T.path = e[0].replace(/webReader\.js|ReadSpeaker\.js/i, ""), 809 T.mobile = !(!T.mobile || "1" !== T.mobile), 810 T.forceAdapter = T.forceAdapter || !1, 811 "wr30skin" === P && (T.forceAdapter = "html5"), 812 "0" !== o.mobile && /ios|iphone|ipad|ipod|android/i.test(navigator.userAgent) && (!T.mmax || he.innerWidth < (T.mmax || 768)) && (T.mobile = !0), 813 "0" !== o.mobile && ("MacIntel" === navigator.platform && "ontouchend"in document || "iPad" === navigator.platform) && (T.mobile = !0), 814 T.mobile ? (H = "-Mobile", 815 U.push("rs_mobile"), 816 y["Mobile-" + i().toLowerCase()] = ["lib.Facade", "Common", "modmap", "PlayerAPI", "Lang", "HL", "HL.css", "Common.Settings", "ui", "ui.AutoScroll", "ui.Slider", "ui.Tools", "Mobile.Common", "pub.Config"]) : y.Core = ["lib.Facade", "Common", "modmap", "PlayerAPI", "Lang", "HL", "HL.css", "Common.Settings", "ui", "ui.AutoScroll", "ui.Slider", "Dialog", "ui.DragDrop", "ui.Tools", "ui.Detach", "ui.ControlPanel", "ui.Accessibility", "ui.LoadIndicator", "pub.Config"], 817 z = T.autoplay, 818 q = he.ReadSpeakerJIT = "0" !== T.jit, 819 T.notools && "1" === T.notools || T.nofeatures && "1" === T.nofeatures || D.push(Y.toggler.add), 820 "1" !== T.noDefaultSkin && ne.load({ 821 id: "rsmod_Styles", 822 type: "text/css", 823 src: k + b + ".Styles" + (q ? "-Button" : "") + ".css", 824 cb: null 825 }),
826 "default" !== P && (D.push(c), 827 ne.load({ 828 id: "rsskin_" + P + "_style", 829 type: "text/css", 830 src: "skins/" + P + "/" + P + ".css", 831 cb: null 832 }), 833 ne.load({ 834 id: "rsskin_" + P + "_js", 835 type: "text/javascript", 836 src: "skins/" + P + "/" + P + ".js", 837 cb: null, 838 async: !0 839 })), 840 T.dload && T.dload.length) 841 for (t of T.dload.split(",")) { 842 var s = "customCss" === t; 843 ne.load({ 844 id: "rsdloaded_" + oe(), 845 type: s ? "text/css" : "text/javascript", 846 src: b + "." + (s ? "Custom.css" : t + ".js"), 847 cb: null 848 }) 849 } 850 if (T.revdload && T.revdload.length) 851 for (r of T.revdload.split(",")) 852 ne.load({ 853 id: "rsdloaded_" + oe(), 854 type: "text/javascript", 855 src: k + b + "." + r + ".js", 856 cb: null 857 }); 858 U.length && D.push(a), 859 q && "1" !== function(e) { 860 var t, r = e + "="; 861 try { 862 t = document.cookie.split(";") 863 } catch (e) { 864 return 865 } 866 for (var n = 0; n < t.length; n++) { 867 for (var o = t[n]; " " === o.charAt(0); ) 868 o = o.substring(1, o.length); 869 if (0 === o.indexOf(r)) 870 return o.substring(r.length, o.length) 871 } 872 return 873 }("_rspkrLoadCore") || /combined/i.test(T.pids) || l() 874 }(), 875 new function() { 876 this.uId = "wR_script", 877 this.meta = { 878 obj: m, 879 version: [m.major, m.minor, m.update].join(".") + "_rev" + m.revision + "-" + m.prod 880 }, 881 this.q = function(e) { 882 "function" == typeof e && (I.onReady ? e.apply(he, []) : C.push(e)) 883 } 884 , 885 this.p = function(e) { 886 "function" == typeof e && (j ? e.apply(he, []) : D.push(e)) 887 } 888 , 889 this.loadInit = function() { 890 document.readyState && "loading" === document.readyState ? setTimeout(function() { 891 rspkr.log("[rspkr.loadInit] Postponing myself for 100 ms, DOM is not ready yet."), 892 rspkr.loadInit() 893 }, 100) : L || (L = !0, 894 document.addEventListener && document.removeEventListener("DOMContentLoaded", he.ReadSpeaker.init, !1), 895 x = !0, 896 he.ReadSpeaker.Common && he.ReadSpeaker.Common.dispatchEvent("onDOMReady"), 897 ce("[rspkr] DOM Ready!"), 898 this.q(function() { 899 rspkr.Common.data.setRegion(), 900 rspkr.Common.data.setWrapiUrl(), 901 Y.afterLoad() 902 })) 903 } 904 , 905 this.init = function() { 906 rspkr.p(function() { 907 rspkr.noTTS() && document.body.classList.add("rs-noTTS") 908 }), 909 rspkr.pub.Config.init(), 910 rspkr.disp.executeCode("jit"), 911 rspkr.disp.flush("jit"), 912 he.ReadSpeakerJIT || rspkr.loadInit(), 913 rspkr.DeferSelection.init(), 914 rspkr.addToggler(), 915 rspkr.Keyboard.init(); 916 for (var e = rspkr.getRSBtns(), t = 0; t < e.length; t++) { 917 rspkr.item("ui.logo.bw") && e[t].classList.add("bw-logo"), 918 rspkr.item("ui.logo.none") && e[t].classList.add("no-logo"); 919 var r, n, o = e[t].querySelector(".rsbtn_play"); 920 o && (o.setAttribute("role", "button"), 921 n = o.querySelector(".rsbtn_text")?.textContent?.trim() || o.textContent?.trim() || "ReadSpeaker webReader: " + rspkr.getPhrase("c", rspkr.uiLang()), 922 o.hasAttribute("aria-label") || o.hasAttribute("aria-describedby") || o.setAttribute("aria-label", n), 923 o.hasAttribute("title") || o.setAttribute("title", n), 924 o.addEventListener("keydown", function(e) { 925 32 === e.which && (this.click(), 926 e.preventDefault()) 927 }), 928 (r = rspkr.item("ui.zIndexPlayer")) && 1 !== r && (e[t].style.zIndex = r), 929 (n = e[t].querySelector(".rsbtn_text")) && n.setAttribute("aria-hidden", !0), 930 o.setAttribute("data-rs-tooltip", "."), 931 o.setAttribute("data-rs-direction", "u"), 932 e[t].classList.add(rspkr.rsbtnClass()), 933 o.setAttribute("aria-haspopup", "menu"), 934 o.removeAttribute("accesskey"), 935 o.setAttribute("data-rsshortcut", "play"), 936 o.href && (r = o.href.match(/lang=[^&]+/gi), 937 n = o.href.match(/voice=[^&]+/gi), 938 r && o.setAttribute("data-rs-lang", r[0].split("=")[1]), 939 n && o.setAttribute("data-rs-voice", n[0].split("=")[1])), 940 rspkr.notools() && e[t].classList.add("no-menu")) 941 } 942 var s = rspkr.item("ui.zIndexCustom.selector"); 943 s && "." !== s && document.querySelectorAll(s).forEac
943h(function(e) { 944 e.style.zIndex = rspkr.item("ui.zIndexCustom.value") 945 }), 946 rspkr.with.explorer() && (document.body.className += " rs-ie"), 947 setTimeout(function() { 948 rspkr.Lang && document.querySelectorAll("[data-rslang-untranslated]").length && rspkr.Lang.updateUi() 949 }, 3e3), 950 j = !0 951 } 952 , 953 this.createAudio = function() { 954 if (he.rspkr.audio || !rspkr.mobile()) 955 return !1; 956 if ("html5" === i()) 957 this.createHTML5Audio(); 958 else { 959 if ("webAudio" !== i()) 960 return !1; 961 this.createWebAudio() 962 } 963 return !0 964 } 965 , 966 this.createHTML5Audio = function() { 967 return /safari/i.test(he.navigator.userAgent) && rspkr.mobile() || (he.rspkr.audio = new Audio, 968 he.rspkr.audio.muted = !0, 969 he.rspkr.audio.load()), 970 !0 971 } 972 , 973 this.createWebAudio = function() { 974 he.rspkr.audio = new (he.AudioContext || he.webkitAudioContext), 975 he.rspkr.audio.resume().then(function() { 976 he.rspkr.audio.suspend().then(function() {}) 977 }) 978 } 979 , 980 this.addToggler = Y.toggler.add, 981 this.getLoadedMods = function() { 982 return E 983 } 984 , 985 this.rsidCount = 1e3, 986 this.logcount = 0, 987 this.log = function(e, t) { 988 ce(e, t || 1) 989 } 990 , 991 this.warn = function(e) { 992 ce(e, 2) 993 } 994 , 995 this.error = function(e) { 996 ce(e, 3) 997 } 998 , 999 this.showLog = function(e) { 1000 !function(e) { 1001 rspkr.log("[rspkr.printErrorLog]", 1); 1002 for (var t = (e = e || "3").split(","), r = 0; r < t.length; r++) 1003 ie.hasOwnProperty(t[r]) && ae(ie[t[r]], t[r]) 1004 }(e || "1") 1005 } 1006 , 1007 this.getID = function() { 1008 return oe() 1009 } 1010 , 1011 this.getVersion = function() { 1012 return this.meta.version 1013 } 1014 , 1015 this.skin = P, 1016 this.disp = re, 1017 this.displog = I, 1018 this.params = T, 1019 this.extractParams = Z, 1020 this.setParam = Q, 1021 this.getParam = ee, 1022 this.deleteParam = te, 1023 this.setDebugLevel = o, 1024 this.baseUrl = M, 1025 this.loadCore = l, 1026 this.audio = null, 1027 this.getRSBtns = J, 1028 this.findHref = e, 1029 this.findExpContainer = t, 1030 this.rsbtnClass = n, 1031 this.rsload = ne, 1032 this.rootNS = b, 1033 this.revPath = k, 1034 this.tools = Y, 1035 this.Popup = this.popup = G, 1036 this.requestBlocker = new function() { 1037 var t = !1 1038 , r = ""; 1039 this.isEnabled = function() { 1040 return t 1041 } 1042 , 1043 this.blockRequests = function(e) { 1044 t = !0, 1045 r = e || "" 1046 } 1047 , 1048 this.reset = function() { 1049 r = "", 1050 t = !1 1051 } 1052 , 1053 this.getReason = function() { 1054 return r 1055 } 1056 } 1057 , 1058 this.notools = function() { 1059 return rspkr.nofeatures() || T.notools && "1" === T.notools 1060 } 1061 , 1062 this.nofeatures = function() { 1063 return T.nofeatures && "1" === T.nofeatures 1064 } 1065 , 1066 this.noTTS = function() { 1067 return "true" === T?.noTTS || he.rsConf?.general?.noTTS || rspkr.conf?.("general.noTTS") 1068 } 1069 , 1070 this.mobile = function() { 1071 return T.mobile && !0 === T.mobile 1072 } 1073 , 1074 this.preventDefault = function(e) { 1075 (e = e || he.event) && ((e = e.originalEvent ? e.originalEvent : e).cancelBubble = !0, 1076 e.returnValue = !1, 1077 e.preventDefault && e.preventDefault(), 1078 e.stopPropagation && e.stopPropagation()) 1079 } 1080 , 1081 this.runtime = { 1082 revert: {} 1083 } 1084 } 1085 }(), 1086 he.ReadSpeaker = he.rs = he.rspkr = e) 1087}(window), 1088ReadSpeaker.enums = { 1089 mime: { 1090 tjs: "text/javascript", 1091 tcss: "text/css", 1092 thtml: "text/html" 1093 } 1094}, 1095window.ReadSpeakerDefer || (window.ReadSpeakerDefer = { 1096 deferred: null, 1097 clickhandler: function(e) { 1098 if (!window.ReadSpeakerDefer.deferred && rspkr.getRSBtns().length) { 1099 var t = (e = e || window.event).target || e.srcElement; 1100 if ((t = 3 === t.nodeType ? t.parentNode : t) !== document && window.ReadSpeakerDefer.isRSLink(t)) 1101 return rspkr.preventDefault(e), 1102 (rspkr.pl || !rspkr.conf("general.confirmPolicy") || confirm(rspkr.conf("general.confirmPolicy"))) && (window.ReadSpeakerDefer.deferred = t, 1103 !rspkr.ui && window.ReadSpeakerJIT ? (window.rspkr.createAudio(), 1104 window.rspkr.loadCore()) : rspkr.ui.processDeferred()), 1105 !1 1106 } 1107 }, 1108 init: function() { 1109 this.addEvents() 1110 }, 1111 isRSLink: function(e) { 1112 return !e.closest(".rsbtn_tools, #rs-controlpanel, .rs-dialog-esque, #rsbtn_popup, #rs_enlargeHL_box") && (!!this.isRSButton(e.parentNode) || !(!e.href || !/readspeaker\.(com|team)\/cgi-bin\/rsent/.test(e.href))) 1113 }, 1114 isRSButton: function(e) { 1115 return !(!e || e === document) && (e.classList && e.classList.contains("rsbtn") || e.id && -1 < e.id.indexOf("readspeaker_button") || this.isRSButton(e.parentNode)) 1116 }, 1117 addEvents: function() { 1118 window.ReadSpeakerDefer.initialized || (window.ReadSpeakerDefer.initialized = !0, 1119 document.addEventListener ? document.addEventListener("click", this.clickhandler) : document.attachEvent ? document.attachEvent("onclick", this.clickhandler) : document.onclick = this.clickhandler) 1120 } 1121}), 1122window.readpage = function(e, t, r) { 1123 return rspkr.item("general.confirmPolicy") && !confirm(rspkr.item("general.confirmPolicy")) || (window.ReadSpeakerDefer.deferred = { 1124 href: e, 1125 target: t, 1126 options: r 1127 }, 1128 window.ReadSpeakerJIT && (window.rspkr.createAudio(), 1129 window.rspkr.loadCore())), 1130 !1 1131} 1132, 1133window.ReadSpeakerDefer.init(), 1134ReadSpeaker.Util = { 1135 addLeadingZero: function(e) { 1136 return e < 10 ? "0" + e : e.toString() 1137 }, 1138 convertTime: function(e) { 1139 e /= 1e3; 1140 var t = parseInt(e % 60) 1141 , r = parseInt(e / 60 % 60) 1142 , e = parseInt(e / 60 / 60 % 60); 1143 return this.addLeadingZero(e) + ":" + this.addLeadingZero(r) + ":" + this.addLeadingZero(t) 1144 }, 1145 explodeTitle: function(e, t, r) { 1146 e = $rs.createElm("div", { 1147 content: e.nodeName ? e.outerHTML : e 1148 }); 1149 $rs.isArray(r) || (r = r.split(",")); 1150 for (var n, o = e.querySelectorAll(t), s = 0; n = o[s]; s++) 1151 if (n && n.parentElement) 1152 for (var i = 0; a = r[i]; i++) 1153 if (n.hasAttribute(a)) { 1154 var a = document.createTextNode(n.getAttribute(a)); 1155 n.parentNode.replaceChild(a, n); 1156 break 1157 } 1158 return e.innerHTML 1159 }, 1160 fitText: function(e, t) { 1161 t = t || e.parentElement, 1162 e.style.transform = null; 1163 var r = e.getBoundingClientRect().width + 20 1164 , t = t.getBoundingClientRect().width; 1165 t < r && (e.style.transform = "scale(%s)".replace("%s", t / r)) 1166 }, 1167 legacyPhrase: function(e) { 1168 if (e) 1169 return e = "ph_" === e.substring(0, 3) ? e.substr(3) : e 1170 }, 1171 randomString: function() { 1172 return "rs-" + (Number(new Date) * Math.random()).toString(36).replace(".", "").substring(0, 8) 1173 }, 1174 xhtml: { 1175 detect: function(e) { 1176 var t = e.ownerDocument || document 1177 , e = t.doctype; 1178 if (e && (/xhtml/gi.test(e.systemId) || /xhtml/gi.test(e.publicId)) || !0 === rspkr.item("general.xhtmlMode")) 1179 return !0; 1180 t = t.querySelector("html"); 1181 return !(!t || !/xhtml/gi.test(t.getAttribute("xmlns"))) 1182 }, 1183 innerHTML: function(e) { 1184 var t; 1185 "string" == typeof e ? ((t = document.implementation.createHTMLDocument()).body.innerHTML = "<div>" + e + "</div>", 1186 e = t.body.firstElementChild) : e.tagName && (e = e.cloneNode(!0)); 1187 var r = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null) 1188 , n = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); 1189 r.documentElement.appendChild(n); 1190 for (var o = 0, s = e.childNodes; o < s.length; o++) { 1191 var i = s[o].cloneNode(!0); 1192 r.importNode(i), 1193 n.appendChild(i) 1194 } 1195 return n.innerHTML 1196 } 1197 } 1198}, 1199"function" != typeof Element.prototype.matches && (Element.prototype.matches = Element.prototype.msMatchesSelector), 1200"NodeList"in window && !NodeList.prototype.forEach && (NodeList.prototype.forEach = function(e, t) { 1201 t = t || window; 1202 for (var r = 0; r < this.length; r++) 1203 e.call(t, this[r], r, this) 1204} 1205), 1206rspkr.cls = { 1207 content: "rs_content", 1208 nosync: "rs_no_sync", 1209 preserve: "rs_preserve", 1210 secret: "rs_do_not_process", 1211 skip: "rs_skip", 1212 skipalways: "rs_skip_always", 1213 textnode: "rs_textnode", 1214 title: "rs_title" 1215}, 1216rspkr.selector = { 1217 ...rspkr.cls 1218}, 1219rspkr.selector) 1220 rspkr.selector[attr] = "." + rspkr.selector[attr]; 1221ReadSpeaker.phrases = ["0a%D8%A7%D9%84%D9%82%D8%A7%D9%85%D9%88%D8%B3", "0b%D8%A7%D8%B3%D8%AA%D9%85%D8%B9", "0c%D8%A7%D9%84%D8%A5%D8%B3%D8%AA%D9%85%D8%A7%D8%B9%20%D9%85%D8%B9%20%D9%88%D9%8A%D8%A8%D8%B1%D9%8A%D8%AF%D8%B1", "0d%D9%82%D8%A7%D8%A6%D9%85%D8%A9%20webReader", "0e%D8%A7%D9%84%D8%AA%D8%B1%D8%AC%D9%85%D8%A9", "1aDiccionari", "1bEscoltar", "1cEscoltar%20amb%20webReader", "1dMen%C3%BA%20webReader", "1eTraducci%C3%B3", "2aOrdbog", "2bAflyt", "2cAflyt%20med%20webReader", "2dwebReader%20menu", "2eOvers%C3%A6t", "3aW%C3%B6rterbuch", "3bVorlesen", "3cMit%20webReader%20vorlesen%20lassen", "3dwebReader-Men%C3%BC", "3e%C3%9Cbersetzung", "4a@6a", "4b@6b", "4c@6c", "4d@6d", "4e@6e", "5a@6a", "5b@6b", "5c@6c", "5d@6d", "5e@6e", "6aDictionary", "6bListen", "6cListen%20with%20webReader", "6dwebReader%20menu", "6eTranslate", "7a@9a", "7b@9b", "7c@9c", "7d@9d", "7e@9e", "8a@9a", "8b@9b", "8c@9c", "8d@9d", "8e@9e", "9aDiccionario", "9bEscuchar", "9cEscuchar%20con%20webReader", "9dMen%C3%BA%20de%20webReader", "9eTraducci%C3%B3n", "10a@9a", "10b@9b", "10c@9c", "10d@9d", "10e@9e", "11a@9a", "11b@9b", "11c@9c", "11d@9d", "11e@9e", "12aHiztegia", "12bEntzun", "12cEntzun%20webReader-ekin", "12dwebReader%20menua", "12eItzulpena", "13aSanakirja", "13bKuuntele", "13cKuuntele%20WebReaderill%C3%A4", "13dwebReader-valikko", "13eK%C3%A4%C3%A4nn%C3%B6s", "14aOr%C3%B0ab%C3%B3k", "14bLurta", "14cLurta%20vi%C3%B0%20webReader", "14dmeni%20webReader", "14eUmseting", "15a@17a", "15b@17b", "15c@17c", "15d@17d", "15e@17e", "16a@17a", "16b@17b", "16c@17c", "16d@17d", "16e@17e", "17aDictionnaire", "17b%C3%89couter", "17c%C3%89couter%20avec%20webReader", "17dMenu%20webReader", "17eTraduire", "18aDicionario", "18bEscoitar", "18cEscoitar%20con%20webReader", "18dmen%C3%BA%20webReader", "18eTraduci%C3%B3n", "19aOr%C3%B0ab%C3%B3k", "19bHlusta", "19cHlusta%20me%C3%B0%20webReader", "19dwebReader%20valmynd", "19e%C3%9E%C3%BD%C3%B0ing", "20aDizionario", "20bAscolta", "20cAscolta%20con%20webReader", "20dMenu%20webReader", "20eTraduzione", "21a%E8%BE%9E%E6%9B%B8", "21b%E8%AA%AD%E3%81%BF%E4%B8%8A%E3%81%92%E3%82%8B", "21cwebReader%E3%81%A7%E8%81%B4%E3%81%8F", "21dwebReader%20%E3%83%A1%E3%83%8B%E3%83%A5%E3%83%BC", "21e%E7%BF%BB%E8%A8%B3", "22a%EC%82%AC%EC%A0%84", "22b%EC%9D%BD%EA%B8%B0", "22cwebReader%EB%A1%9C%20%EB%93%A3%EA%B8%B0", "22dwebReader%20%EB%A9%94%EB%89%B4", "22e%EB%B2%88%EC%97%AD", "23aV%C4%81rdn%C4%ABca", "23bKlaus%C4%ABties", "23cKlaus%C4%ABties%20ar%20webReader", "23dwebReader%20izv%C4%93lne", "23eTulkojums", "24a@25a", "24b@25b", "24c@25c", "24d@25d", "24e@25e", "25aWoordenboek", "25bLees voor", "25cLuister met webReader", "25dwebReader menu", "25eVertalen", "26aOrdbok", "26bLytt", "26cLytt%20med%20webReader", "26dwebReader-menyen", "26eOversettelse", "27aS%C5%82ownik", "27bPos%C5%82uchaj", "27cPos%C5%82uchaj%20z%20webReaderem", "27dMenu%20webReader", "27eT%C5%82umaczenie", "28a@29a", "28b@29b", "28c@29c", "28d@29d", "28e@29e", "29aDicion%C3%A1rio", "29bOuvir", "29cOuvir%20com%20o%20webReader", "29dMenu%20webReader", "29eTraduzir", "30a@31a", "30b@31b", "30c@31c", "30d@31d", "30e@31e", "31aOrdbok", "31bLyssna", "31cLyssna%20med%20webReader", "31dwebReaders%20meny", "31e%C3%96vers%C3%A4ttning", "32a%E8%AF%8D%E5%85%B8", "32b%E6%9C%97%E8%AF%BB", "32c%E4%BD%BF%E7%94%A8%20webReader%20%E6%9C%97%E8%AF%BB", "32dwebReader%20menu", "32e%E7%BF%BB%E8%AF%91", "33a%E5%AD%97%E5%85%B8", "33b%E8%AA%9E%E9%9F%B3%E7%80%8F%E8%A6%BD", "33c%E9%80%8F%E9%81%8E%20webReader%20%E8%AA%9E%E9%9F%B3%E7%80%8F%E8%A6%BD", "33dwebReader%20menu", "33e%E7%BF%BB%E8%AD%AF", "34a@6a", "34b@6b", "34c@6c", "34d@6d", "34e@6e", "35a%D0%A1%D0%BB%D0%BE%D0%B2%D0%BD%D0%B8%D0%BA", "35b%D0%A1%D0%BB%D1%83%D1%85%D0%B0%D1%82%D0%B8", "35c%D0%A1%D0%BB%D1%83%D1%85%D0%B0%D1%82%D0%B8%20%D0%B7%D0%B0%20%D0%B4%D0%BE%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D0%BE%D1%8E%20webReader", "35d%D0%9C%D0%B5%D0%BD%D1%8E%20webReader", "35e%D0%9F%D0%B5%D1%80%D0%B5%D0%BA%D0%BB%D0%B0%D0%B4", "36aGeiriadur", "36bGwrando", "36cGwrando%20gyda%20WebReader", "36dDewislen%20webReader", "36eCyfieithu", "37aDikshonario", "37bSkucha", "37cSkucha%20ku%20webReader", "37dE%20kontenido%20ak%C3%AD%20tin%20un%20k%C3%B3digo%20di%20webReader.%20Ora%20kambia%20un%20tradukshon%2C%20mester%20notifik%C3%A1%20dev%20pa%20por%20hasi%20kambio%20den%20e%20k%C3%B3digo.", "37eTradus%C3%AD"], 1222ReadSpeaker.uiLang = function() { 1223 return rspkr.Lang ? (delete rspkr.preloadUiLang,
1224 rspkr.Lang.getUiLang()) : rspkr.preloadUiLang || (rspkr.preloadUiLang = rspkr.item("general.uiLang") || rspkr.getParam("uilang", rspkr.findHref()) || rspkr.getParam("lang", rspkr.findHref()) || rspkr.item("general.fallbacklang") || "en_us", 1225 rspkr.preloadUiLang) 1226} 1227, 1228ReadSpeaker.mapLang = function(e) { 1229 var t = "ar_ar,ca_es,da_dk,de_de,en_au,en_uk,en_us,es_419,es_co,es_es,es_mx,es_us,eu_es,fi_fi,fo_fo,fr_be,fr_ca,fr_fr,gl_es,is_is,it_it,ja_jp,ko_kr,lv_lv,nl_be,nl_nl,no_nb,pl_pl,pt_br,pt_pt,sv_fi,sv_se,zh_cn,zh_tw,en_sc,uk_ua,cy_gb,pap_bq".split(","); 1230 if (isNaN(e)) { 1231 e = e.replace("-", "_").toLowerCase(); 1232 for (var r, n = 0; r = t[n]; n++) 1233 if (e === r || 2 === e.length && r.substring(0, 2) === e) 1234 return n; 1235 return this.mapLang(rspkr.item("general.fallbacklang") || "en_us") 1236 } 1237 return t[e] 1238} 1239, 1240ReadSpeaker.mapPhrase = function(e) { 1241 for (var t, r = ["dictionary", "listen", "listenwebreader", "menu", "translation"], n = ["a", "b", "c", "d", "e"], o = 1 < e.length ? r : n, s = 0; t = o[s]; s++) 1242 if (t === e) 1243 return (1 < e.length ? n : r)[s] 1244} 1245, 1246ReadSpeaker.getPhrase = function(e, t, r) { 1247 if (e) { 1248 if (ReadSpeaker.Lang && !r) 1249 return isNaN(t) || (t = this.mapLang(t)), 1250 1 === e.length && "*" !== e && (e = this.mapPhrase(e)), 1251 ReadSpeaker.Lang.getPhrase(e); 1252 t = t || rspkr.item("general.fallbacklang") || "en_us"; 1253 for (var n, o = (t = isNaN(t) ? this.mapLang(t) : t) + (e = 1 < e.length ? this.mapPhrase(e) : e), s = 0; n = rspkr.phrases[s]; s++) { 1254 if (n.substring(0, o.length + 1) === o + "@") { 1255 var i = n.substring(o.length + 1) 1256 , a = String(parseInt(i)) 1257 , i = i.substring(a.length); 1258 return rspkr.getPhrase(i, a, r) 1259 } 1260 if (n.substring(0, o.length) === o) 1261 return decodeURIComponent(n.substring(o.length)) 1262 } 1263 } else 1264 ; 1265} 1266, 1267rspkr.Translation = function() { 1268 function i(n) { 1269 var o = rspkr.conf("general.transLangs") 1270 , e = rspkr.conf("general.customTransLangs") || rspkr.conf("general.transLangs") 1271 , t = rspkr.conf("general.translationProvider") || "google" 1272 , r = [] 1273 , s = [] 1274 , i = ["ar_ar", "da_dk", "de_de", "el_gr", "en", "es_es", "fi_fi", "fr_fr", "he_il", "hi_in", "hu_hu", "id_id", "it_it", "ja_jp", "ko_kr", "lv_lv", "nl_nl", "no_nb", "pl_pl", "pt_br", "pt_pt", "ro_ro", "ru_ru", "sv_se", "th_th", "tr_tr", "uk_ua", "vi_vn", "zh_cn"] 1275 , a = ["af_za", "nso", "st_za", "ts_za", "xh_za", "zu_za"]; 1276 for ((e = e instanceof Object ? Object.keys(e) : e)instanceof Array || (e = e.split(",")), 1277 ix = 0; ix < e.length; ix++) { 1278 var l = e[ix].trim().toLowerCase(); 1279 if ("-" === l.charAt(0)) 1280 s.push(l.substr(1)); 1281 else if ("default" === l || "." === l) 1282 r = r.concat(i); 1283 else if ("all" === l) 1284 r = r.concat(i).concat(a); 1285 else if ("african" === l || "all" === l) 1286 r = r.concat(a); 1287 else if ("en_" === l.substr(0, 3)) 1288 r.push("en"); 1289 else if (2 === l.length) { 1290 var c = !1 1291 , u = i.concat(a); 1292 for (lIx = 0; lIx < u.length; lIx++) 1293 if (u[lIx].substr(0, 2) === l) { 1294 c = !0, 1295 r.push(u[lIx]); 1296 break 1297 } 1298 c || r.push(l) 1299 } else 1300 r.push(l) 1301 } 1302 for (r = [...new Set(r)]; s.length; ) { 1303 var p = s.pop(); 1304 r.indexOf(p) && r.splice(r.indexOf(p), 1) 1305 } 1306 return (r = r.filter(e => rspkr.ui.Tools.Translation.supportedLang(e, t))).map(function(e) { 1307 var t = rspkr.Lang.flag(e) 1308 , r = { 1309 flag: t 1310 }; 1311 rspkr.conf("general.nativeLanguages") && (r["data-rslang-native"] = !0); 1312 r = { 1313 params: o[e] ? [e, o[e]] : [e], 1314 value: e, 1315 key: e, 1316 classes: ["lang-picker-item", "rs-flag", "rs-flag-" + t], 1317 attributes: r 1318 }; 1319 return n?.callback && (r.action = n.callback), 1320 r 1321 }) 1322 } 1323 function t(e) { 1324 var t, r, n = document.querySelector(".lang-picker"); 1325 n || (n = $rs.createElm("div", { 1326 cls: "lang-picker" 1327 }), 1328 o = $rs.createElm("div", { 1329 cls: ["lang-picker-item"], 1330 attributes: { 1331 "data-type": "search" 1332 }, 1333 content: $rs.createElm("input", { 1334 attributes: { 1335 type: "search", 1336 "data-rslang": "title/arialabel:search", 1337 "data-rslangfilter": "searchfield", 1338 name: "langsearch" 1339 } 1340 }), 1341 mouseup: function(e) { 1342 rspkr.preventDefault(e) 1343 }, 1344 parent: n 1345 }), 1346 t = $rs.createElm("ul", { 1347 parent: n 1348 }), 1349 o.querySelector("input").addEventListener("mouseup", function(e) { 1350 rspkr.preventDefault(e) 1351 }), 1352 o.querySelector("input").addEventListener("keyup", function(e) { 1353 e.stopPropagation() 1354 }), 1355 o.querySelector("input").addEventListener("input", function() { 1356 t.querySelectorAll("li").forEach(function(e) { 1357 var t = (e.closest(".lang-picker").querySelector("input").value || "").toLowerCase(); 1358 e.style.display = 0 <= e.textContent.toLowerCase().indexOf(t) ? "block" : "none" 1359 }) 1360 }),
1361 i().forEach(function(e) { 1362 e.attributes || (e.attributes = {}), 1363 e.attributes["data-rslang"] = "content/title/arialabel:" + e.key, 1364 e.attributes["data-rslangfilter"] = "langCode", 1365 e.attributes["data-type"] = "language", 1366 e.attributes["data-rs-itemval"] = e.params[0], 1367 e.attributes["data-tts-supported"] = String(a(e.params[0])), 1368 e.attributes.tabindex = "0", 1369 $rs.createElm("li", { 1370 cls: e.classes, 1371 attributes: e.attributes, 1372 parent: t, 1373 buttonesque: !0, 1374 click: function() { 1375 l(this.getAttribute("data-rs-itemval")) 1376 }, 1377 keyup: function(e) { 1378 e.stopPropagation() 1379 } 1380 }) 1381 }), 1382 r = function() { 1383 var e = Array.from(n.querySelectorAll('[data-type="language"]')); 1384 e[0].textContent && (rspkr.cevt("onUiUpdated", r), 1385 e.sort(function(e, t) { 1386 return e.textContent < t.textContent ? -1 : 1 1387 }), 1388 e.forEach(function(e) { 1389 e.parentElement.appendChild(e) 1390 })) 1391 } 1392 , 1393 rspkr.evt("onUiUpdated", r), 1394 rspkr.Lang.updateUi(n), 1395 n.addEventListener("mousedown", function(e) { 1396 n.setAttribute("data-langpicker-scroll", n.querySelector("ul")?.scrollTop) 1397 }), 1398 n.addEventListener("mouseup", function(e) { 1399 parseInt(n.getAttribute("data-langpicker-scroll")) !== n.querySelector("ul")?.scrollTop && rspkr.preventDefault(e), 1400 n.removeAttribute("data-langpicker-scroll") 1401 })), 1402 e.contains(n) || e.appendChild(n), 1403 n.style.display = "flex", 1404 n.querySelector('[type="search"]')?.focus(); 1405 var o, s = n.closest(".rspopup"); 1406 s && (o = s.getBoundingClientRect(), 1407 s = (e = n.getBoundingClientRect()).width < window.innerWidth - o.left ? "left" : "right", 1408 o = e.height < window.innerHeight - o.bottom ? "bottom" : "top", 1409 n.setAttribute("data-position", s + " " + o)) 1410 } 1411 function r(e) { 1412 (e = e.querySelector(".lang-picker")) && (e.style.display = "none") 1413 } 1414 function a(e) { 1415 return -1 < Object.keys(rspkr.conf("general.transLangs")).indexOf(e) 1416 } 1417 function l(e, t, r) { 1418 rspkr.preventDefault(), 1419 rspkr.ui.LoadIndicator?.show(), 1420 rspkr.Popup?.closePopup(void 0, !0), 1421 rspkr.ui.Tools.Translation.translate(e, t, r) 1422 } 1423 return { 1424 do: l, 1425 options: i, 1426 hideMenu: r, 1427 showMenu: t, 1428 toggleMenu: function(e) { 1429 ($rs.isVisible(e.querySelector(".lang-picker")) ? r : t)(e) 1430 }, 1431 ttsSupported: a 1432 } 1433}(), 1434ReadSpeaker.pub = { 1435 Config: function() { 1436 function r() { 1437 function e(e) { 1438 return e = "scrollcontrols" === (e = "simpleview" === (e = "lookup" === e ? "dictionary" : e) ? "textmode" : e) ? "controlpanel" : e 1439 } 1440 var t = rspkr.params && "1" === rspkr.params.notools; 1441 rspkr.features = { 1442 banner: !0, 1443 clicklisten: !0, 1444 controlpanel: !0, 1445 controlpanel_pause: !0, 1446 controlpanel_skip: !0, 1447 controlpanel_scroll: !0, 1448 controlpanel_close: !0, 1449 detachment: !1, 1450 dictionary: !t, 1451 dictionary_toolbar: !1, 1452 download: !0, 1453 download_player: !1, 1454 enlarge: !0, 1455 ESC: !0, 1456 help: !0, 1457 loaderplayer: !0, 1458 loaderscreen: !0, 1459 pagemask: !0, 1460 popupplayback: !0, 1461 progressbar: !0, 1462 seekbar: !1, 1463 settings: !0, 1464 skipbuttons: !0, 1465 speedbutton: !0, 1466 textmode: !0, 1467 tooltips: !0, 1468 translation: !t, 1469 translationHelp: !1, 1470 translationMobile: !1, 1471 translation_toolbar: !1, 1472 voicesettings: !1, 1473 volumebutton: !0 1474 }; 1475 for (var r = [], n = rspkr.params.disable ? rspkr.params.disable.split(",") : [], o = 0; o < n.length; o++) { 1476 var s = e(n[o]); 1477 rspkr.features[s] = !1, 1478 r.push(s) 1479 } 1480 if (rspkr.params.enable) 1481 for (var i = rspkr.params.enable.split(","), a = 0; a < i.length; a++) { 1482 var l = e(i[a]); 1483 rspkr.features[l] = !0, 1484 r.push(l) 1485 } 1486 var c, u, p = window.rsConf && window.rsConf.ui && window.rsConf.ui.tools ? window.rsConf.ui.tools : {}; 1487 for (c in p) 1488 p.hasOwnProperty(c) && (u = e(c), 1489 rspkr.features[u] = p[c], 1490 r.push(u)); 1491 rspkr.features.dictionary && (rspkr.features.dictionary_toolbar = !1), 1492 rspkr.features.translation && (rspkr.features.translation_toolbar = !1), 1493 rspkr.features.download && (rspkr.features.download_player = !1), 1494 !1 === d("ui.displayDownload") && (rspkr.features.download = !1) && (rspkr.features.download_player = !1), 1495 !0 === d("ui.enableDetachment") && (rspkr.features.detachment = !0), 1496 !0 === d("ui.disableDetachment") && (rspkr.features.detachment = !1), 1497 rspkr.features.overriden = r 1498 } 1499 function e() { 1500 rspkr.pub && rspkr.pub.Config && (rspkr.pub.c = rspkr.pub.Config), 1501 rspkr.pub.c && (rspkr.cfg = rspkr.pub.c), 1502 rspkr.conf = rspkr.item = rspkr.cfg.item, 1503 "object" == typeof window.rsConf && f(c(window.rsConf)), 1504 rspkr.params.mode && rspkr.item("mode." + rspkr.params.mode) && f(rspkr.item("mode." + rspkr.params.mode)), 1505 !0 === d("general.iframeReading") && $rs.iframesPresent(document) && n("general.usePost", !0), 1506 r(); 1507 var e, t = rspkr.item("ui.tools"); 1508 for (e in t) 1509 t.hasOwnProperty(e) && -1 === rspkr.features.overriden.indexOf(e) && (rspkr.features[e] = t[e]); 1510 rspkr.noTTS() && (rspkr.features.popupplayback = !1, 1511 rspkr.features.voicesettings = !1, 1512 rspkr.features.clicklisten = !1, 1513 rspkr.features.enlarge = !1, 1514 rspkr.features.pagemask = !1, 1515 rspkr.features.download = !1) 1516 } 1517 var t = !1 1518 , a = {} 1519 , l = { 1520 extraMods: {}, 1521 mode: {}, 1522 general: { 1523 chunkLimit: 1000, 1524 cookieDomain: null, 1525 cookieLifetime: 360000000, 1526 cookieName: "ReadSpeakerSettings", 1527 cookiePath: "/", 1528 customTransLangs: ".", 1529 defaultSpeedValue: 100, 1530 directDownload: false, 1531 disableJSON: false, 1532 disableTextNodeHL: false, 1533 domain: "readspeaker.com", 1534 enableMathReading: false, 1535 enableSkipAlways: false, 1536 fontSizes: { 1537 min: .8, 1538 max: 2.4, 1539 increment: .2 1540 }, 1541 iframeReading: false, 1542 inclAdult: false, 1543 labels: { 1544 ignoreSelector: " " 1545 }, 1546 nativeLanguages: false, 1547 noCookie: false, 1548 popupCloseTime: 10000, 1549 popupHref: "", 1550 preserveElements: ".rs_preserve, .rs_audio, .blog-post__thumbnail, .hero-background, .wp-post-image, .carousel, .js-learning-library-slider, #partner-testimonial, .rll-youtube-player", 1551 protocol: "https:", 1552 proxyVersion: "2", 1553 readidOrder: false, 1554 readingLangs: { 1555 "es_us": [{ 1556 "voice": "Carlos", 1557 "phrase": "ph_es_us", 1558 "customlang": "es_us", 1559 "customgender": "male", 1560 "lang": "es_us", 1561 "gender": "male", 1562 "attributes": [] 1563 }], 1564 "ar_ar": [{ 1565 "voice": "Amir", 1566 "phrase": "ph_ar_ar", 1567 "customlang": "ar_ar", 1568 "customgender": "male", 1569 "lang": "ar_ar", 1570 "gender": "male", 1571 "attributes": [] 1572 }], 1573 "en_au": [{ 1574 "voice": "Jack", 1575 "phrase": "ph_en_au", 1576 "customlang": "en_au", 1577 "customgender": "male", 1578 "lang": "en_au", 1579 "gender": "male", 1580 "attributes": [] 1581 }], 1582 "pt_pt": [{ 1583 "voice": "Julia", 1584 "phrase": "ph_pt_pt", 1585 "customlang": "pt_pt", 1586 "customgender": "female", 1587 "lang": "pt_br", 1588 "gender": "female", 1589 "attributes": [] 1590 }], 1591 "da_dk": [{ 1592 "voice": "Lene", 1593 "phrase": "ph_da_dk", 1594 "customlang": "da_dk", 1595 "customgender": "female", 1596 "lang": "da_dk", 1597 "gender": "female", 1598 "attributes": [] 1599 }], 1600 "nl_nl": [{ 1601 "voice": "Ilse", 1602 "phrase": "ph_nl_nl", 1603 "customlang": "nl_nl", 1604 "customgender": "female", 1605 "lang": "nl_nl", 1606 "gender": "female", 1607 "attributes": [] 1608 }], 1609 "fi_fi": [{ 1610 "voice": "Elina", 1611 "phrase": "ph_fi_fi", 1612 "customlang": "fi_fi", 1613 "customgender": "female", 1614 "lang": "fi_fi", 1615 "gender": "female", 1616 "attributes": [] 1617 }], 1618 "fr_fr": [{ 1619 "voice": "Roxane", 1620 "phrase": "ph_fr_fr", 1621 "customlang": "fr_fr", 1622 "customgender": "female", 1623 "lang": "fr_fr", 1624 "gender": "female", 1625 "attributes": [] 1626 }], 1627 "de_de": [{ 1628 "voice": "Max", 1629 "phrase": "ph_de_de", 1630 "customlang": "de_de", 1631 "customgender": "male", 1632 "lang": "de_de", 1633 "gender": "male", 1634 "attributes": [] 1635 }, { 1636 "voice": "Klara", 1637 "phrase": "ph_de_de", 1638 "customlang": "de_de", 1639 "customgender": "female", 1640 "lang": "de_de", 1641 "gender": "female", 1642 "attributes": [] 1643 }], 1644 "el_gr": [{ 1645 "voice": "Irini", 1646 "phrase": "ph_el_gr", 1647 "customlang": "el_gr", 1648 "customgender": "female", 1649 "lang": "el_gr", 1650 "gender": "female", 1651 "attributes": [] 1652 }], 1653 "hi_in": [{ 1654 "voice": "Diya", 1655 "phrase": "ph_hi_in", 1656 "customlang": "hi_in", 1657 "customgender": "female", 1658 "lang": "hi_in", 1659 "gender": "female", 1660 "attributes": [] 1661 }], 1662 "it_it": [{ 1663 "voice": "Gaia", 1664 "phrase": "ph_it_it", 1665 "customlang": "it_it", 1666 "customgender": "female", 1667 "lang": "it_it", 1668 "gender": "female", 1669 "attributes": [] 1670 }], 1671 "lv_lv": [{ 1672 "voice": "Oskars", 1673 "phrase": "ph_lv_lv", 1674 "customlang": "lv_lv", 1675 "customgender": "male", 1676 "lang": "lv_lv", 1677 "gender": "male", 1678 "attributes": [] 1679 }], 1680 "zh_cn": [{ 1681 "voice": "Hui", 1682 "phrase": "ph_zh_cn", 1683 "customlang": "zh_cn", 1684 "customgender": "female", 1685 "lang": "zh_cn", 1686 "gender": "female", 1687 "attributes": [] 1688 }], 1689 "no_nb": [{ 1690 "voice": "Lykke", 1691 "phrase": "ph_no_nb", 1692 "customlang": "no_nb", 1693 "customgender": "female", 1694 "lang": "no_nb", 1695 "gender": "female", 1696 "attributes": [] 1697 }], 1698 "pl_pl": [{ 1699 "voice": "Aneta", 1700 "phrase": "ph_pl_pl", 1701 "customlang": "pl_pl", 1702 "customgender": "female", 1703 "lang": "pl_pl", 1704 "gender": "female", 1705 "attributes": [] 1706 }], 1707 "es_es": [{ 1708 "voice": "Pilar", 1709 "phrase": "ph_es_es", 1710 "customlang": "es_es", 1711 "customgender": "female", 1712 "lang": "es_es", 1713 "gender": "female", 1714 "attributes": [] 1715 }], 1716 "sv_se": [{ 1717 "voice": "Maja", 1718 "phrase": "ph_sv_se", 1719 "customlang": "sv_se", 1720 "customgender": "female", 1721 "lang": "sv_se", 1722 "gender": "female", 1723 "attributes": [] 1724 }], 1725 "zh_tw": [{ 1726 "voice": "Yafang", 1727 "phrase": "ph_zh_tw",
1728 "customlang": "zh_tw", 1729 "customgender": "female", 1730 "lang": "zh_tw", 1731 "gender": "female", 1732 "attributes": [] 1733 }], 1734 "en_uk": [{ 1735 "voice": "Alice", 1736 "phrase": "ph_en_uk", 1737 "customlang": "en_uk", 1738 "customgender": "female", 1739 "lang": "en_uk", 1740 "gender": "female", 1741 "attributes": [] 1742 }], 1743 "uk_ua": [{ 1744 "voice": "Lesya", 1745 "phrase": "ph_uk_ua", 1746 "customlang": "uk_ua", 1747 "customgender": "female", 1748 "lang": "uk_ua", 1749 "gender": "female", 1750 "attributes": [] 1751 }], 1752 "en_us": [{ 1753 "voice": "Kayla", 1754 "phrase": "ph_en_us", 1755 "customlang": "en_us", 1756 "customgender": "female", 1757 "lang": "en_us", 1758 "gender": "female", 1759 "attributes": [] 1760 }], 1761 "cy_cy": [{ 1762 "voice": "Anwen", 1763 "phrase": "ph_cy_cy", 1764 "customlang": "cy_cy", 1765 "customgender": "female", 1766 "lang": "cy_cy", 1767 "gender": "female", 1768 "attributes": [] 1769 }] 1770 }, 1771 region: "eu", 1772 rsent: "rsent", 1773 saveLangVoice: false, 1774 searchLang: true, 1775 sentOnlyLang: ["ja_jp", "zh_cn"], 1776 shadowDomSelector: " ", 1777 skipHiddenContent: true, 1778 subdomain: "app", 1779 syncContainer: "default", 1780 transLangs: { 1781 af_za: "trans_af_za", 1782 ar_ar: "trans_ar_ar", 1783 da_dk: "trans_da_dk", 1784 de_de: "trans_de_de", 1785 el_gr: "trans_el_gr", 1786 en: "trans_en", 1787 es_es: "trans_es_es", 1788 fi_fi: "trans_fi_fi", 1789 fr_fr: "trans_fr_fr", 1790 he_il: "trans_he_il", 1791 hi_in: "trans_hi_in", 1792 hu_hu: "trans_hu_hu", 1793 id_id: "trans_id_id", 1794 it_it: "trans_it_it", 1795 ja_jp: "trans_ja_jp", 1796 ko_kr: "trans_ko_kr", 1797 lv_lv: "trans_lv_lv", 1798 nl_nl: "trans_nl_nl", 1799 no_nb: "trans_no_nb", 1800 nso: "trans_nso", 1801 pl_pl: "trans_pl_pl", 1802 pt_br: "trans_pt_br", 1803 pt_pt: "trans_pt_pt", 1804 ro_ro: "trans_ro_ro", 1805 ru_ru: "trans_ru_ru", 1806 st_za: "trans_st_za", 1807 sv_se: "trans_sv_se", 1808 th_th: "trans_th_th", 1809 tr_tr: "trans_tr_tr", 1810 ts_za: "trans_ts_za", 1811 uk_ua: "trans_uk_ua", 1812 vi_vn: "trans_vi_vn", 1813 xh_za: "trans_xh_za", 1814 zh_cn: "trans_zh_cn", 1815 zu_za: "trans_zu_za" 1816 }, 1817 translatedDisclaimer: false, 1818 translationCleanup: "true", 1819 translationLimit: 5e3, 1820 translationProvider: "google", 1821 usePost: true, 1822 voiceTemplate: "{{flag}}{{lang}} - {{voice}}{{ - attr}}", 1823 voiceAttributes: "slow" 1824 }, 1825 settings: { 1826 clicklisten: "off", 1827 controlpanel: "on", 1828 controlpanelPos: "bottom-right", 1829 enlarge: "enlargeoff", 1830 enlargebghl: "bghlon", 1831 fontface: "sansserif", 1832 fr: "froff", 1833 hl: "wordsent", 1834 hlicon: "iconon", 1835 hlscroll: "scrollon", 1836 hlsent: "#beffd6", 1837 hlspeed: 100, 1838 hltext: "#000000", 1839 hltoggle: "hlon", 1840 hlword: "#a4cbff", 1841 kb: { 1842 clicklisten: "shift+ctrl+alt+KeyH", 1843 controlpanel: "shift+ctrl+alt+KeyC", 1844 dictionary: "shift+ctrl+alt+KeyW", 1845 download: "shift+ctrl+alt+KeyD", 1846 enlarge: "shift+ctrl+alt+KeyE", 1847 fontsizeminus: "shift+ctrl+alt+Slash", 1848 fontsizeplus: "shift+ctrl+alt+Minus", 1849 formreading: "shift+ctrl+alt+KeyF", 1850 help: "shift+ctrl+alt+KeyI", 1851 menu: "shift+ctrl+alt+Digit1", 1852 pagemask: "shift+ctrl+alt+KeyM", 1853 pause: "shift+ctrl+alt+KeyP", 1854 play: "shift+ctrl+alt+KeyL",
1855 playerfocus: "shift+ctrl+alt+KeyK", 1856 settings: "shift+ctrl+alt+KeyS", 1857 stop: "shift+ctrl+alt+KeyX", 1858 textmode: "shift+ctrl+alt+KeyV", 1859 translation: "shift+ctrl+alt+KeyT", 1860 readingvoice: "shift+ctrl+alt+KeyR", 1861 detachfocus: "shift+ctrl+alt+KeyU" 1862 }, 1863 langvoice: "", 1864 lbfontsize: "1.0", 1865 pagemask_focusColor: "#ffffff", 1866 pagemask_focusTransparency: "100", 1867 pagemask_maskColor: "#000000", 1868 pagemask_maskTransparency: "50", 1869 popupclose: "popupcloseon", 1870 popupclosetime: 10000, 1871 shortcuts: "on", 1872 textspacing: "0", 1873 textstyle: "blackwhite" 1874 }, 1875 fontmap: { 1876 serif: '"Times New Roman", Times, serif', 1877 sansserif: "Arial, Helvetica, sans-serif", 1878 opensans: "Arial, Helvetica, sans-serif", 1879 cursive: '"Comic Sans", "Comic Sans MS", cursive', 1880 monospace: '"Courier New", Courier, monospace', 1881 dyslexic: '"Open Dyslexic"' 1882 }, 1883 textstyles: { 1884 blackyellow: "#000000,#ffffcc", 1885 blackwhite: "#000000,#ffffff", 1886 blackblue: "#000000,#a4cbff", 1887 blackpink: "#000000,#fbd0e4", 1888 redyellow: "#ff0000,#ffffcc", 1889 redwhite: "#ff0000,#ffffff", 1890 redblue: "#ff0000,#a4cbff", 1891 blueyellow: "#0000ff,#ffffcc", 1892 bluewhite: "#0000ff,#ffffff", 1893 bluepink: "#0000ff,#fbd0e4", 1894 yellowblack: "#ffff00,#000000", 1895 blueblack: "#a4cbff,#000000" 1896 }, 1897 textspacings: { 1898 s0: { 1899 letterspacing: "0em", 1900 wordspacing: "0em", 1901 lineheight: "1.44" 1902 }, 1903 s1: { 1904 letterspacing: "0.06em", 1905 wordspacing: "0.08em", 1906 lineheight: "1.6" 1907 }, 1908 s2: { 1909 letterspacing: "0.12em", 1910 wordspacing: "0.16em", 1911 lineheight: "1.8" 1912 }, 1913 s3: { 1914 letterspacing: "0.18em", 1915 wordspacing: "0.24em", 1916 lineheight: "2" 1917 }, 1918 s4: { 1919 letterspacing: "0.24em", 1920 wordspacing: "0.32em", 1921 lineheight: "2.15" 1922 } 1923 }, 1924 ui: { 1925 autoscrollOffset: 0, 1926 clickListenExclude: ".rs_clicklistenexclude", 1927 disableShortcutSelector: ".", 1928 preventLightboxResize: false, 1929 logo: { 1930 bw: false, 1931 none: false 1932 }, 1933 menu: { 1934 inlineDropdown: false 1935 }, 1936 toolbar: { 1937 horizontal: false, 1938 inverted: false 1939 }, 1940 tools: { 1941 banner: true, 1942 clicklisten: true, 1943 controlpanel: true, 1944 detachment: false, 1945 dictionary: true, 1946 download: true, 1947 enlarge: true, 1948 help: true, 1949 pagemask: true, 1950 popupplayback: true, 1951 progressbar: true, 1952 settings: true, 1953 skipbuttons: true, 1954 speedbutton: true, 1955 textmode: true, 1956 translation: true, 1957 translationHelp: true, 1958 translationMobile: true, 1959 voicesettings: false, 1960 volumebutton: true 1961 }, 1962 tooltoggler: { 1963 big: true 1964 }, 1965 zIndexCustom: { 1966 selector: ".", 1967 value: 1 1968 }, 1969 zIndexPlayer: 1, 1970 zIndexToolPanel: 1 1971 }, 1972 cb: { 1973 ui: { 1974 open: function() { 1975 rspkr.log("conf.cb.ui.open: " + this) 1976 }, 1977 play: function() { 1978 rspkr.log("conf.cb.ui.play") 1979 }, 1980 pause: function() { 1981 rspkr.log("conf.cb.ui.pause") 1982 }, 1983 stop: function() { 1984 rspkr.log("conf.cb.ui.stop") 1985 }, 1986 beforeclose: function() { 1987 rspkr.log("conf.cb.ui.beforeclose") 1988 }, 1989 close: function() { 1990 rspkr.log("conf.cb.ui.close") 1991 }, 1992 settingsopened: function() { 1993 rspkr.log(this) 1994 }, 1995 volumechanged: function(e) { 1996 rspkr.log("conf.cb.ui.volumechanged: " + e + "%") 1997 }, 1998 timeupdated: function(e, t) { 1999 rspkr.log("conf.cb.ui.timeupdated: " + e + " | " + t) 2000 }, 2001 progresschanged: function(e) { 2002 0 < e && e % 10 == 0 && rspkr.log("conf.cb.ui.progresschanged: " + e + "%") 2003 } 2004 }, 2005 chunking: { 2006 pause: void 0 2007 } 2008 }, 2009 mobile: { 2010 ignoreMute: true, 2011 moodleEnabled: false 2012 } 2013 } 2014 , c = function(e) { 2015 var t, r = JSON.parse(JSON.stringify(e)); 2016 for (t in e) 2017 e.hasOwnProperty(t) && ("object" == typeof e[t] && 0 < Object.size(e[t]) && !$rs.isArray(e[t]) ? r[t] = c(e[t]) : "function" == typeof e[t] && (r[t] = e[t])); 2018 return r 2019 } 2020 , d = function(e, t) { 2021 var r, n = []; 2022 if ("." !== e && (n = e.split(".")), 2023 "object" == typeof (r = void 0 === (r = u(e, a)) ? u(e, l) : r) && 0 < Object.size(r) && !$rs.isArray(r)) { 2024 e = p(l, n, 0); 2025 if (e) { 2026 e = c(e); 2027 return f(r, e), 2028 e 2029 } 2030 return r 2031 } 2032 if ("function" != typeof r || t) 2033 return r; 2034 t = c(l); 2035 f(a, t); 2036 var o = t; 2037 if (n.length) { 2038 n.splice(n.length - 1, 1); 2039 for (var s = 0, i = n.length; s < i && o[n[s]]; s++) 2040 o = o[n[s]]; 2041 t = o 2042 } 2043 return r.apply(t) 2044 } 2045 , n = function(e, t) { 2046 e = e.split("."); 2047 return p(a, e, 0, t) 2048 } 2049 , u = function(e, t) { 2050 var r = []; 2051 return "." !== e && (r = e.split(".")), 2052 p(t, r, 0) 2053 } 2054 , p = function(e, t, r, n) { 2055 if (0 === t.length) 2056 return e; 2057 if (void 0 !== e[t[r]]) 2058 return r < t.length - 1 ? p(e[t[r]], t, r + 1, n) : void 0 === n ? e[t[r]] : e[t[r]] = n; 2059 if (void 0 !== n) { 2060 var o, s; 2061 if (r < t.length - 1) 2062 for (o = r, 2063 s = t.length; o < s - 1; o++) 2064 e[t[o]] = {}, 2065 e = e[t[o]]; 2066 else 2067 o = r; 2068 return e[t[o]] = n 2069 } 2070 } 2071 , f = function(e, t) { 2072 for (var r in t = t || a, 2073 e) 2074 e.hasOwnProperty(r) && (void 0 !== t[r] && !$rs.isArray(t[r]) && "object" == typeof e[r] && 0 < Object.size(e[r]) && !$rs.isArray(e[r]) ? !0 === e[r].replace_obj ? (delete e[r].replace_obj, 2075 t[r] = e[r]) : f(e[r], t[r]) : t[r] = e[r]) 2076 }; 2077 return { 2078 init: function() { 2079 return !t && (e(), 2080 t = !0, 2081 rspkr.log("[rspkr.cfg] Initialized!"), 2082 !0) 2083 }, 2084 item: function(e, t, r) { 2085 return void 0 === t ? d(e, r) : n(e, t) 2086 }, 2087 default: function(e, t) { 2088 return void 0 === t ? u(e, l) : function(e, t) { 2089 e = e.split("."); 2090 return p(l, e, 0, t) 2091 }(e, t) 2092 }, 2093 customerDefault: function(e) { 2094 for (var t = e.split("."), r = window.rsConf; r && t.length && (r = r[t.shift()]); ) 2095 if (!t.length) 2096 return r; 2097 return rspkr.cfg.default(e) 2098 }, 2099 getSettingsConf: function() { 2100 return rspkr.st ? rspkr.st.getSettingsConf() : {} 2101 }, 2102 c: l, 2103 mergeObj: f, 2104 mergeDefault: function(e) { 2105 f(e, l) 2106 }, 2107 setup: e 2108 } 2109 }() 2110}, 2111window.ReadSpeaker.API = window.ReadSpeaker.api = { 2112 callback: { 2113 enums: { 2114 UI: { 2115 BEFORECLOSE: "cb.ui.beforeclose", 2116 CLOSE: "cb.ui.close", 2117 OPEN: "cb.ui.open", 2118 PAUSE: "cb.ui.pause", 2119 PLAY: "cb.ui.play", 2120 PROGRESSCHANGED: "cb.ui.progresschanged", 2121 SETTINGSOPENED: "cb.ui.settingsopened", 2122 STOP: "cb.ui.stop", 2123 TIMEUPDATED: "cb.ui.timeupdated", 2124 VOLUMECHANGED: "cb.ui.volumechanged", 2125 DIALOG: { 2126 BEFOREOPEN: "cb.ui.dialog.beforeopen", 2127 OPEN: "cb.ui.dialog.open", 2128 CLOSE: "cb.ui.dialog.close" 2129 }, 2130 POPUP: { 2131 OPEN: "cb.ui.popup.open", 2132 CLOSE: "cb.ui.popup.close" 2133 } 2134 }, 2135 AUDIO: { 2136 DOWNLOAD: "cb.audio.download", 2137 ENDED: "cb.audio.ended", 2138 LOADED: "cb.audio.loaded", 2139 LOADERROR: "cb.audio.loaderror", 2140 NOSOUND: "cb.audio.nosound" 2141 } 2142 }, 2143 execute: function(e, t, r) { 2144 if (!e) 2145 throw "[rspkr.API.callback.execute] No callback name provided."; 2146 (r = r || []) && !$rs.isArray(r) && (r = [r]), 2147 "function" == typeof rspkr.conf(e, void 0, !0) && rspkr.conf(e, void 0, !0).apply(t, r) 2148 } 2149 }, 2150 tools: { 2151 Dictionary: { 2152 dictionary: function(e, t) { 2153 if (!rspkr.ui) 2154 return rspkr.loadCore(), 2155 void rspkr.q(function() { 2156 rspkr.API.tools.dictionary(e, t) 2157 }); 2158 rspkr.ui.Tools.Dictionary.dictionary(e, t) 2159 }, 2160 supportedLanguages: function() { 2161 return ["ar_ar", "da_dk", "de_de", "en", "ca_es", "es", "eu_es", "gl_es", "fi_fi", "fr_fr", "he_il", "is_is", "it_it", "ja_jp", "ko_kr", "lv_lv", "nl_nl", "no_nb", "pt", "sv_se", "zh_cn"].sort() 2162 } 2163 }, 2164 Translation: { 2165 translate: function(e) { 2166 if (!rspkr.ui) 2167 return rspkr.loadCore(), 2168 void rspkr.q(function() { 2169 rspkr.API.tools.translate(e) 2170 }); 2171 rspkr.ui.Tools.Translation.translate(e) 2172 }, 2173 supportedLanguages: function() { 2174 return Object.keys(rspkr.conf("general.transLangs")).sort() 2175 }, 2176 help: function() { 2177 var e = $rs.createElm("div", { 2178 content: '<img src="[[baseurl]]/translation-anim.gif"><p data-rslang="content:translate-msg-help"></p>'.replace("[[baseurl]]", rspkr.baseUrl + rspkr.revPath + "media") 2179 }); 2180 rspkr.Dialog.open({ 2181 icon: "translate", 2182 titleKey: "translate-help", 2183 content: e, 2184 mode: "translationhelp", 2185 trigger: this, 2186 ariaExpand: !0 2187 }) 2188 } 2189 } 2190 } 2191}, 2192rspkr.lib || (rspkr.lib = {}), 2193rspkr.lib.Facade = function(t) { 2194 var a = { 2195 store: [], 2196 push: function(e, t, r) { 2197 return this.store[e] || (this.store[e] = []), 2198 this.store[e][t] || (this.store[e][t] = []), 2199 this.store[e][t].push(r), 2200 this.store.length 2201 }, 2202 pop: function(e, t, r) { 2203 var n; 2204 if (this.store[e] && this.store[e][t]) { 2205 if (n = this.store[e][t], 2206 !r) 2207 return this.store[e][t].splice(0, this.store[e][t].length), 2208 0; 2209 for (var o = n.length - 1; -1 < o; o--) 2210 n[o] && n[o].toString() === r.toString() && this.store[e][t].splice(o, 1); 2211 return this.store[e][t].length 2212 } 2213 return 0 2214 }, 2215 dispatch: function(e, t) { 2216 var r = $rs.convertEvent(e, t); 2217 if (rsid = $rs.getAttr(r.target, "data-rsevent-id"), 2218 rsid) { 2219 for (var n = !0, o = a.store[rsid][r.type], s = 0, i = o.length; s < i; s++) 2220 "function" == typeof o[s] && (o[s].apply(r.target, [r]) || (n = !1)); 2221 return n 2222 } 2223 } 2224 }; 2225 return { 2226 eq: a, 2227 adapterInit: function(e) { 2228 t.$rs = e 2229 } 2230 } 2231}(window), 2232ReadSpeaker.lib.Facade.RSEvent = function() {} 2233, 2234ReadSpeaker.lib || (ReadSpeaker.lib = {}), 2235ReadSpeaker.lib.RSLib = function() { 2236 var t = function() { 2237 return /^-ms-/ 2238 } 2239 , r = function() { 2240 return /-([\da-z])/gi 2241 } 2242 , o = { 2243 _formatRet: function(e) { 2244 return (e = "[object NodeList]" === Object.prototype.toString.call(e) ? Array.prototype.slice.call(e) : e).length ? 1 === e.length ? (e[0].length && "object" == typeof e[0] && !e[0].tagName ? e[0] : e)[0] : e : [] 2245 }, 2246 get: function(t, e) { 2247 if (t === document) { 2248 var r = [document]; 2249 return rspkr.shadowDOM && rspkr.shadowDOM.active() && rspkr.shadowDOM.getShadows().forEac
2249h(function(e) { 2250 r.push(e.shadowRoot) 2251 }), 2252 this._formatRet(r) 2253 } 2254 if (!t || "#" === t) 2255 return []; 2256 if ("object" == typeof t) 2257 return t; 2258 if ((e || document).getElementById(t)) 2259 return (e || document).getElementById(t); 2260 (t.match(/(#[0-9][^\s:,]*)/g) || []).forEach(function(e) { 2261 t = t.replace(e, '[id="' + e.replace("#", "") + '"]') 2262 }), 2263 (t.match(/(\.[0-9][^\s:,]*)/g) || []).forEach(function(e) { 2264 t = t.replace(e, '[class="' + e.substr(1) + '"]') 2265 }); 2266 var n = Array.prototype.slice.call((e || document).querySelectorAll(t)); 2267 return rspkr.shadowDOM && rspkr.shadowDOM.active() && rspkr.shadowDOM.getShadows().forEach(function(e) { 2268 n = n.concat(Array.prototype.slice.call(e.shadowRoot.querySelectorAll(t))) 2269 }), 2270 this._formatRet(n) 2271 }, 2272 arr: function(e, t) { 2273 t = this.get(e, t); 2274 return this.isArray(t) ? t : [t] 2275 }, 2276 getReadingFrames: function(e) { 2277 var t = (e = e || window) ? [e] : []; 2278 return rspkr.cfg && !rspkr.cfg.item("general.iframeReading") || !rspkr.cfg && window.rsConf && window.rsConf.general && !window.rsConf.general.iframeReading ? t : o.getFrames(e) 2279 }, 2280 getFrames: function(e) { 2281 var t = e ? [e] : [] 2282 , r = []; 2283 e = e || window; 2284 try { 2285 r = $rs.findIn(e.document, "iframe, frame") 2286 } catch (e) { 2287 rspkr.log("Error accessing document " + e, "3") 2288 } 2289 for (var r = $rs.isArray(r) ? r : [r], n = 0; n < r.length; n++) 2290 try { 2291 r[n].contentWindow.location.href && (t = t.concat(o.getFrames(r[n].contentWindow))) 2292 } catch (e) { 2293 rspkr.log("Error accessing document " + e, "3") 2294 } 2295 return t 2296 }, 2297 iframesPresent: function(e) { 2298 return !!(e || document).querySelector("iframe") 2299 }, 2300 findIn: function(e, t) { 2301 if (!e || this.isArray(e) && !e.length) 2302 return []; 2303 "string" == typeof (e = this.isArray(e) ? e[0] : e) && (e = this.get(e)); 2304 var r = Array.prototype.slice.call(e.querySelectorAll(t)); 2305 return rspkr.shadowDOM && rspkr.shadowDOM.active() && rspkr.shadowDOM.getShadows(e).forEach(function(e) { 2306 r = r.concat(Array.prototype.slice.call(e.shadowRoot.querySelectorAll(t))) 2307 }), 2308 this._formatRet(r) 2309 }, 2310 closest: function(e, t) { 2311 if (e) { 2312 if ((e = "string" == typeof e ? this.get(e) : e).matches && e.matches(t)) 2313 return e; 2314 for (; e.parentElement; ) { 2315 if (e.parentElement.matches(t)) 2316 return e.parentElement; 2317 e = e.parentElement 2318 } 2319 } 2320 }, 2321 parent: function(e) { 2322 if (e) 2323 return e.parentElement || ("#document-fragment" === e.getRootNode?.().nodeName && e.getRootNode?.().host ? e.getRootNode().host : void 0) 2324 }, 2325 isChildOfParent: function(e, t) { 2326 if (e && t) { 2327 if ("string" == typeof t && !(t = document.querySelector(t))) 2328 return !1; 2329 var r = e.ownerDocument; 2330 if (!r) { 2331 if (/document$/i.test(e.nodeName)) 2332 return !1; 2333 r = document 2334 } 2335 for (; e && e !== r.parentNode; ) { 2336 if (e.isSameNode(t)) 2337 return !0; 2338 e = e.parentNode 2339 } 2340 } 2341 return !1 2342 }, 2343 getAttr: function(e, t) { 2344 return "string" == typeof e && (e = this.get(e)), 2345 "style" === t ? e.style.cssText.toLowerCase() || void 0 : e.getAttribute ? e.getAttribute(t) : e[t] || void 0 2346 }, 2347 setAttr: function(e, t, r) { 2348 "string" == typeof e && (e = this.get(e)); 2349 for (var n = 0, o = (e = !this.isArray(e) ? [e] : e).length; n < o; n++) 2350 "style" === t ? e[n].style.cssText = r : e[n].setAttribute ? e[n].setAttribute(t, r) : e[n][t] = r; 2351 return r 2352 }, 2353 regEvent: function(e, t, r) { 2354 var n, o, s, i, a = t.split(" "); 2355 "string" == typeof e && (e = this.get(e)); 2356 for (var l = 0, c = (e = !this.isArray(e) ? [e] : e).length; l < c; l++) 2357 for (s = 0, 2358 i = a.length; s < i; s++) 2359 t = a[s], 2360 o = e[l], 2361 n = this.getAttr(o, "data-rsevent-id") || "rs_" + Math.round(1e6 * Math.random()), 2362 this.setAttr(o, "data-rsevent-id", n), 2363 u.push(n, t, r), 2364 u.store[n] && u.store[n][t] && 1 < u.store[n][t].length || e[l].addEventListener && e[l].addEventListener(t, u.dispatch, !1) 2365 }, 2366 unregEvent: function(e, t, r) { 2367 if (e) { 2368 var n, o, s, i = t.split(" "); 2369 "string" == typeof e && (e = this.get(e)); 2370 for (var a = 0, l = (e = !this.isArray(e) ? [e] : e).length; a < l; a++) 2371 for (o = 0, 2372 s = i.length; o < s; o++) 2373 if (t = i[o], 2374 n = e[a], 2375 n = this.getAttr(n, "data-rsevent-id"), 2376 r) 2377 u.pop(n, t, r) || e[a].removeEventListener(t, u.dispatch, !1); 2378 else if (e[a].removeEventListener(t, u.dispatch, !1), 2379 n && t && u.store[n]) { 2380 u.store[n][t] = void 0; 2381 try { 2382 delete u.store[n][t] 2383 } catch (e) {} 2384 } 2385 } 2386 }, 2387 width: function(e) { 2388 return "string" == typeof e && (e = this.get(e)), 2389 s(e, "width") 2390 }, 2391 height: function(e) { 2392 return "string" == typeof e && (e = this.get(e)), 2393 s(e, "height") 2394 }, 2395 outerWidth: function(e, t) { 2396 if ((e = "string" == typeof e ? this.get(e) : e) && e.style) { 2397 t = t ? parseFloat(l(e, "margin-left")) + parseFloat(l(e, "margin-right")) : 0; 2398 return s(e, "width") + t 2399 } 2400 return null 2401 }, 2402 outerHeight: function(e, t) { 2403 if ((e = "string" == typeof e ? this.get(e) : e) && e.style) { 2404 t = t ? parseFloat(l(e, "margin-top")) + parseFloat(l(e, "margin-bottom")) : 0; 2405 return s(e, "height") + t 2406 } 2407 return null 2408 }, 2409 offsetParent: function(e) { 2410 for (var t = /absolute|relative|fixed/i, r = e = "string" == typeof e ? this.get(e) : e; !(r === document.body || (r = r.parentNode).style && t.test(l(r, "position"))); ) 2411 ; 2412 return r || document.body 2413 }, 2414 offset: function(e) { 2415 var t = (e = "string" == typeof e ? this.get(e) : e).ownerDocument 2416 , r = t.body 2417 , n = t.defaultView || window 2418 , o = t.documentElement 2419 , s = t.createElement("div"); 2420 if (e === t.body) { 2421 var i = r.offsetTop 2422 , a = r.offsetLeft; 2423 return { 2424 top: i += parseFloat(l(r, "marginTop")) || 0, 2425 left: a += parseFloat(l(r, "marginLeft")) || 0 2426 } 2427 } 2428 s.style.paddingLeft = s.style.width = "1px", 2429 r.appendChild(s); 2430 t = 2 === s.offsetWidth; 2431 r.removeChild(s); 2432 s = e.getBoundingClientRect(), 2433 i = o.clientTop || r.clientTop || 0, 2434 a = o.clientLeft || r.clientLeft || 0, 2435 e = n.pageYOffset || t && o.scrollTop || r.scrollTop, 2436 r = n.pageXOffset || t && o.scrollLeft || r.scrollLeft; 2437 return { 2438 top: s.top + e - i, 2439 left: s.left + r - a 2440 } 2441 }, 2442 scrollLeft: function(e, t) { 2443 return "string" == typeof e && (e = this.get(e)), 2444 a("scrollLeft", "pageXOffset", e, t) 2445 }, 2446 scrollTop: function(e, t) { 2447 return "string" == typeof e && (e = this.get(e)), 2448 a("scrollTop", "pageYOffset", e, t) 2449 }, 2450 addClass: function(e, t) { 2451 var r; 2452 "string" == typeof e && (e = this.arr(e)), 2453 this.isArray(e) || (e = [e]), 2454 "." === t.charAt(0) && (t = t.substr(1)); 2455 for (var n = 0, o = e.length; n < o; n++) 2456 e[n] && !new RegExp("\\b" + t + "( |$)").test(e[n].className) && (r = (e[n].className + " " + t).trim().replace(/ {2,}/g, " ").split(" "), 2457 e[n].className = r.join(" ")) 2458 }, 2459 removeClass: function(e, t) { 2460 if (e) { 2461 "string" == typeof e && (e = this.get(e)); 2462 for (var r = 0, n = (e = !this.isArray(e) ? [e] : e).length; r < n; r++) { 2463 for (var o = t.trim().replace(/ {2,}/g, " "), s = e[r].className.trim(), i = 0, a = (o = !this.isArray(o) ? o.split(" ") : o).length; i < a; i++) 2464 "." === o[i].charAt(0) && (o[i] = o[i].substr(1)), 2465 s = s.replace(new RegExp("\\b" + o[i] + "\\b","gi"), ""); 2466 e[r].className = s.trim().replace(/ {2,}/g, " ") 2467 } 2468 } 2469 }, 2470 hasClass: function(e, t) { 2471 if (!(e = "string" == typeof e ? this.get(e) : e) || this.isArray(e) && !e.length || !e.hasAttribute || !e.hasAttribute("class")) 2472 return !1; 2473 for (var r = e.className.split(" "), n = 0, o = r.length; n < o; n++) 2474 if ("." === r[n].charAt(0) && (r[n] = r[n].substr(1)), 2475 r[n] === t) 2476 return !0; 2477 return !1 2478 }, 2479 css: function(e, t, r) { 2480 if (e && (!this.isArray(e) || e.length)) { 2481 if ("string" == typeof e && (e = this.arr(e)), 2482 this.isArray(e) || (e = [e]), 2483 "object" != typeof t && void 0 === r) 2484 return l(e[0], i(t)); 2485 var n = {}; 2486 "string" == typeof t ? n[t] = r : n = t; 2487 for (var o = 0; o < e.length; o++) { 2488 for (var s in n) 2489 n.hasOwnProperty(s) && (e[o].style[i(s)] = n[s]); 2490 e[o].hasAttribute("style") && !e[o].getAttribute("style").length && e[o].removeAttribute("style") 2491 } 2492 } 2493 }, 2494 isVisible: function(e) { 2495 if (!e) 2496 return !1; 2497 for (; e !== document.body && (e.nodeType === Node.ELEMENT_NODE || e.nodeType === Node.TEXT_NODE); ) { 2498 if ("none" === this.css(e, "display")) 2499 return !1; 2500 if ("hidden" === this.css(e, "visibility")) 2501 return !1; 2502 if (!(e = e.parentNode)) 2503 return !1 2504 } 2505 return !0 2506 }, 2507 isWithinViewport: function(e) { 2508 e = e.getBoundingClientRect(); 2509 return 0 <= e.top && e.bottom <= (window.innerHeight || document.documentElement.clientHeight) && 0 <= e.left && e.right <= (window.innerWidth || document.documentElement.clientWidth) 2510 }, 2511 isContentEditable: function(e) { 2512 if (!e) 2513 return !1; 2514 e = this.closest(e, "[contenteditable]"); 2515 return !(!e || "" !== e.contentEditable && "true" !== e.contentEditable) 2516 }, 2517 isArray: function(e) { 2518 return "[object Array]" === Object.prototype.toString.call(e) 2519 }, 2520 arraySearch: function(e, t) { 2521 for (var r = 0; r < t.length; r++) 2522 if (-1 !== e.indexOf(t[r])) 2523 return !0; 2524 return !1 2525 }, 2526 rsid: function(e) { 2527 var t; 2528 return this.getAttr(e, "data-rsid") || (t = ReadSpeaker.rsidCount++, 2529 this.setAttr(e, "data-rsid", t)), 2530 this.getAttr(e, "data-rsid") 2531 }, 2532 convertEvent: function(e, t) { 2533 e = e || window.event; 2534 var r = new ReadSpeaker.lib.Facade.RSEvent; 2535 return r.pageX = e.pageX || e.clientX + $rs.scrollLeft(d
2535ocument), 2536 r.pageY = e.pageY || e.clientY + $rs.scrollTop(document), 2537 r.screenX = e.screenX, 2538 r.screenY = e.screenY, 2539 r.clientX = e.clientX, 2540 r.clientY = e.clientY, 2541 r.target = e.currentTarget || t, 2542 r.type = e.type, 2543 r.keyCode = e.keyCode, 2544 r.targetTouches = e.targetTouches, 2545 r.originalEvent = e, 2546 r 2547 }, 2548 clone: function(e, t, r) { 2549 return e.cloneNode(r = r || !1) 2550 }, 2551 camel: function(e) { 2552 return i(e) 2553 }, 2554 remove: function(e) { 2555 for (var t = this.arr(e), r = [], n = 0, o = t.length; n < o; n++) 2556 t[n].parentElement && t[n].parentElement.removeChild && r.push(t[n].parentElement.removeChild(t[n])); 2557 return r || [] 2558 }, 2559 focus: function(e) { 2560 e = this.get(e), 2561 (e = this.isArray(e) && e.length ? e[0] : e).setActive && e.setActive(), 2562 e.focus && e.focus() 2563 }, 2564 createElm: function(e, t) { 2565 if (t = t || {}, 2566 e && "string" == typeof e) { 2567 var n = document.createElement(e); 2568 if (t.cls && "string" == typeof t.cls && (n.className = t.cls), 2569 t.cls && t.cls instanceof Array && (n.className = t.cls.sort().join(" ").trim()), 2570 t.id && this.setAttr(n, "id", t.id), 2571 t.content && "string" == typeof t.content && (n.innerHTML = t.content), 2572 t.content && t.content.nodeType && n.appendChild(t.content), 2573 t.content && t.content.forEach && t.content.forEach(function(e) { 2574 n.appendChild(e) 2575 }), 2576 t.href && "string" == typeof t.href && (n.href = t.href), 2577 t.click && "function" == typeof t.click && n.addEventListener("click", t.click), 2578 t.mouseup && "function" == typeof t.mouseup && n.addEventListener("mouseup", t.mouseup), 2579 t.change && "function" == typeof t.change && n.addEventListener("change", t.change), 2580 t.input && "function" == typeof t.input && n.addEventListener("input", t.input), 2581 t.keyup && "function" == typeof t.keyup && n.addEventListener("keyup", t.keyup), 2582 t.attributes && "object" == typeof t.attributes) 2583 for (var r in t.attributes) 2584 t.attributes.hasOwnProperty(r) && t.attributes[r] && this.setAttr(n, r, t.attributes[r]); 2585 return t.buttonesque && n.addEventListener("keydown", function(e) { 2586 13 !== e.which && 32 !== e.which || (rspkr.preventDefault(e), 2587 t.click ? t.click.call(this, e) : this.click()) 2588 }), 2589 t.keyboard && t.keyboard.forEach(function(r) { 2590 r.code.forEach(function(t) { 2591 n.addEventListener("keydown", function(e) { 2592 e.which === t && r.callback.bind(this).call() 2593 }) 2594 }) 2595 }), 2596 t.parent && t.parent.appendChild && t.parent.appendChild(n), 2597 n 2598 } 2599 }, 2600 flatten: function(e, t) { 2601 t = t || []; 2602 for (var r, n = 0; r = e[n]; n++) 2603 $rs.isArray(r) ? $rs.flatten(r, t) : t.push(r); 2604 return t 2605 } 2606 } 2607 , u = null 2608 , i = function(e) { 2609 return e.replace(t(), "ms-").replace(r(), n) 2610 } 2611 , n = function(e, t) { 2612 return (t + "").toUpperCase() 2613 } 2614 , l = function(e, t) { 2615 return window.getComputedStyle(e, null)[i(t)] || !1 2616 } 2617 , s = function(e, t) { 2618 var r = "width" === t ? "Width" : "Height"; 2619 if (e !== window && e !== document) { 2620 var n = e["offset" + r]; 2621 return !isNaN(n) && n || (n = l(e, t)), 2622 isNaN(n), 2623 parseInt(n) 2624 } 2625 try { 2626 if (e === window) 2627 return window["inner" + r] || document.documentElement["client" + r] || document.body["client" + r]; 2628 if (e === document) 2629 return document.body["client" + r] 2630 } catch (e) { 2631 return rspkr.error("[RSLib._getSize] Error: " + e.message), 2632 0 2633 } 2634 } 2635 , a = function(e, t, r, n) { 2636 var o = /X/.test(t) 2637 , s = (s = r) && s === s.window ? s : 9 === s.nodeType && (s.defaultView || s.parentWindow); 2638 if (void 0 === n) 2639 return s ? t in s ? s[t] : s.document.documentElement[e] || document && document.body && document.body[e] : r[e]; 2640 s ? s.scrollTo(o ? $rs.scrollLeft(s) : n, o ? n : $rs.scrollTop(s)) : r[e] = n 2641 }; 2642 return { 2643 meta: { 2644 revision: "2728" 2645 }, 2646 init: function() { 2647 u = ReadSpeaker.lib.Facade.eq, 2648 window.$rs = o, 2649 ReadSpeaker.log("[rspkr.l.RSLib] Initialized.") 2650 } 2651 } 2652}(),
2653ReadSpeaker.lib.RSLib.init(), 2654function(e) { 2655 var o, s, i, a, l, t = (o = { 2656 browser: { 2657 name: "", 2658 version: "", 2659 OS: "", 2660 html5AudioFormat: "", 2661 html5Support: !1, 2662 html5Priority: !1, 2663 syncContainer: "", 2664 webAudioSupport: !1, 2665 fetchSupport: !1 2666 }, 2667 dataBrowser: [{ 2668 string: navigator.userAgent, 2669 subString: "Edge", 2670 identity: "Edge" 2671 }, { 2672 string: navigator.userAgent, 2673 subString: "Chromium", 2674 identity: "Chromium" 2675 }, { 2676 string: navigator.userAgent, 2677 subString: "Chrome", 2678 identity: "Chrome" 2679 }, { 2680 string: navigator.userAgent, 2681 subString: "OmniWeb", 2682 versionSearch: "OmniWeb/", 2683 identity: "OmniWeb" 2684 }, { 2685 string: navigator.vendor, 2686 subString: "Apple", 2687 versionSearch: "Version", 2688 identity: "Safari" 2689 }, { 2690 prop: e.opera, 2691 versionSearch: "Version", 2692 identity: "Opera" 2693 }, { 2694 string: navigator.vendor, 2695 subString: "iCab", 2696 identity: "iCab" 2697 }, { 2698 string: navigator.vendor, 2699 subString: "KDE", 2700 identity: "Konqueror" 2701 }, { 2702 string: navigator.userAgent, 2703 subString: "Firefox", 2704 identity: "Firefox" 2705 }, { 2706 string: navigator.vendor, 2707 subString: "Camino", 2708 identity: "Camino" 2709 }, { 2710 string: navigator.userAgent, 2711 subString: "MSIE", 2712 versionSearch: "MSIE", 2713 identity: "Explorer" 2714 }, { 2715 test: function() { 2716 return /trident\//i.test(navigator.userAgent) && !(!document.uniqueID && !e.MSInputMethodContext) 2717 }, 2718 versionSearch: "rv", 2719 identity: "Explorer" 2720 }, { 2721 string: navigator.userAgent, 2722 subString: "Netscape", 2723 identity: "Netscape" 2724 }, { 2725 string: navigator.userAgent, 2726 subString: "Android", 2727 identity: "Android" 2728 }, { 2729 string: navigator.userAgent, 2730 subString: "Gecko", 2731 versionSearch: "rv", 2732 identity: "Mozilla" 2733 }, { 2734 string: navigator.userAgent, 2735 subString: "Mozilla", 2736 versionSearch: "Mozilla", 2737 identity: "Netscape" 2738 }], 2739 dataOS: [{ 2740 string: navigator.platform, 2741 subString: "Win", 2742 identity: "Windows" 2743 }, { 2744 string: navigator.platform, 2745 subString: "Mac", 2746 identity: "Mac" 2747 }, { 2748 string: navigator.userAgent, 2749 subString: "iPhone", 2750 identity: "iOS" 2751 }, { 2752 string: navigator.userAgent, 2753 subString: "iPad", 2754 identity: "iOS" 2755 }, { 2756 string: navigator.userAgent, 2757 subString: "Android", 2758 identity: "Android" 2759 }, { 2760 string: navigator.platform, 2761 subString: "Linux", 2762 identity: "Linux" 2763 }], 2764 browserSettings: { 2765 Android: { 2766 minver: 4 2767 }, 2768 Explorer: { 2769 syncContainer: "font" 2770 }, 2771 Firefox: { 2772 minver: 6 2773 }, 2774 Opera: { 2775 html5Support: !1 2776 }, 2777 Edge: { 2778 audioFormat: "mp3" 2779 } 2780 } 2781 }, 2782 s = function(e) { 2783 for (var t = 0; t < e.length; t++) { 2784 if (this.versionSearchString = e[t].versionSearch || e[t].identity, 2785 e[t].test && e[t].test()) 2786 return e[t].identity; 2787 var r = e[t].string 2788 , n = e[t].prop; 2789 if (r) { 2790 if (-1 !== r.indexOf(e[t].subString)) 2791 return e[t].identity 2792 } else if (n) 2793 return e[t].identity 2794 } 2795 } 2796 , 2797 i = function(e) { 2798 var t = e.indexOf(this.versionSearchString); 2799 if (-1 !== t) 2800 return parseFloat(e.substring(t + this.versionSearchString.length + 1)) 2801 } 2802 , 2803 a = function() { 2804 return "function" == typeof e.fetch 2805 } 2806 , 2807 l = function() { 2808 return !(!e.AudioContext && !e.webkitAudioContext) 2809 } 2810 , 2811 new function() { 2812 this.init = r, 2813 this.info = o.browser 2814 } 2815 ); 2816 function r() { 2817 rspkr.log("[rspkr.br] Initialized!"); 2818 var e = navigator.userAgent; 2819 o.browser.name = s(o.dataBrowser) || "Unknown", 2820 o.browser.version = i(e) || i(navigator.appVersion) || "Unknown", 2821 o.browser.OS = s(o.dataOS) || "Unknown"; 2822 var t = o.browser.name; 2823 o.browserSettings.hasOwnProperty(o.browser.name) || (o.browserSettings[t] = {}); 2824 var r, n = rspkr.item("general.syncContainer");
2825 n && n.length && "default" !== n ? o.browser.syncContainer = rspkr.pub.Config.item("general.syncContainer") : o.browserSettings[t].hasOwnProperty("syncContainer") ? o.browser.syncContainer = o.browserSettings[t].syncContainer : o.browser.syncContainer = "rs:span", 2826 o.browserSettings[t].hasOwnProperty("html5Support") ? o.browser.html5Support = o.browserSettings[t].html5Support : document.createElement("audio").canPlayType && (o.browser.html5Support = !0), 2827 !0 === o.browser.html5Support && (e = r = !1, 2828 (n = document.createElement("audio")).canPlayType && (r = n.canPlayType("audio/mpeg"), 2829 e = n.canPlayType('audio/ogg; codecs="vorbis"')), 2830 rspkr.log("mp3 support? " + r, 1), 2831 rspkr.log("ogg support? " + e, 1), 2832 /android/i.test(o.browser.OS) && r ? o.browser.html5AudioFormat = "mp3" : /android/i.test(o.browser.OS) ? o.browser.html5AudioFormat = "ogg" : "" !== r ? o.browser.html5AudioFormat = "mp3" : "" !== e ? o.browser.html5AudioFormat = "ogg" : o.browser.html5Support = !1, 2833 o.browserSettings[t].hasOwnProperty("html5Priority") ? o.browser.html5Priority = o.browserSettings[t].priority : o.browser.html5Priority = !0, 2834 o.browserSettings[t].hasOwnProperty("audioFormat") && (o.browser.html5AudioFormat = o.browserSettings[t].audioFormat)), 2835 o.browserSettings[t].hasOwnProperty("minver") && parseFloat(o.browser.version) <= parseFloat(o.browserSettings[t].minver) && (o.browser.html5Priority = !1), 2836 o.browser.webAudioSupport = l(), 2837 o.browser.fetchSupport = a() 2838 } 2839 e.ReadSpeaker.Browser = e.ReadSpeaker.br = t 2840}(window), 2841function(e) { 2842 e.ReadSpeaker.with = { 2843 explorer: function() { 2844 return !!e.document.documentMode 2845 }, 2846 edge: function() { 2847 return navigator.userAgentData && navigator.userAgentData.brands.some(function(e) { 2848 return "Microsoft Edge" === e.brand 2849 }) || -1 < e.navigator.userAgent.indexOf("Edg") 2850 }, 2851 firefox: function() { 2852 return "netscape"in e && /rv:/.test(navigator.userAgent) 2853 }, 2854 safari: function() { 2855 return !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/) 2856 }, 2857 chrome: function() { 2858 return navigator.userAgentData && navigator.userAgentData.brands.some(function(e) { 2859 return "Google Chrome" === e.brand 2860 }) || /CriOS/i.test(navigator.userAgent) || !(!navigator.vendor || !navigator.vendor.match(/google/i) || this.edge() || this.opera()) 2861 }, 2862 opera: function() { 2863 return !(!navigator.userAgentData || !navigator.userAgentData.brands.some(function(e) { 2864 return "Opera" === e.brand 2865 })) 2866 }, 2867 iphone: function() { 2868 return "iPhone" === navigator.platform 2869 }, 2870 ipad: function() { 2871 return "MacIntel" === navigator.platform && "ontouchend"in document || "iPad" === navigator.platform 2872 }, 2873 android: function() { 2874 return /Android/i.test(navigator.userAgent) 2875 }, 2876 OS: function() { 2877 return this.macOS() ? "macOS" : this.windows() ? "Windows" : "other" 2878 }, 2879 macOS: function() { 2880 return navigator.userAgentData && "macOS" === navigator.userAgentData.platform || /mac/.test(navigator.platform.toLowerCase()) 2881 }, 2882 windows: function() { 2883 return /(win32|win64|windows|wince)/i.test(e.navigator.userAgent.toLowerCase()) 2884 }, 2885 what: function(e) { 2886 var t, r = "color:#cb3c3c", n = ["%cwebReader state overview%c"], o = ["font-size:1.2em;font-weight:800;color:#F67C4D;text-decoration:underline", "font-size:1em;font-weight:normal;color:inherit;text-decoration:none"]; 2887 n.push("- webReader version: " + rspkr.meta.version); 2888 var s = rspkr.c ? rspkr.c.data.params.customerid : rspkr.getParam("customerid", rspkr.findHref()); 2889 if (n.push("- Customer ID: " + s), 2890 -1 !== rspkr.baseUrl.indexOf("/" + s + "/") ? n.push("- Base URL: " + rspkr.baseUrl) : (n.push("- Base URL: %c" + rspkr.baseUrl + "%c"), 2891 o.push(r), 2892 o.push("color:inherit")), 2893 (rspkr.with.explorer() ? t = "Explorer" : rspkr.with.edge() && (t = "Microsoft Edge")) || rspkr.with.chrome() && (t = "Chrome") || rspkr.with.safari() && (t = "Safari") || rspkr.with.firefox() && (t = "Firefox") || rspkr.with.opera() && (t = "Opera") || o.push(r) && o.push("color:inherit") && (t = "%cnone%c"), 2894 n.push("- Detected browser: " + t), 2895 n.push("- Operating System: " + rspkr.with.OS()), 2896 n.push("- Mobile: " + rspkr.mobile()), 2897 n.push("- Method: " + (!0 === rspkr.cfg.item("general.usePost") ? "POST" : "GET")),
2898 rspkr.pl ? n.push("- Audio Adapter: " + rspkr.pl.adapter) : (n.push("- Audio Adapter: %cNot yet available%c"), 2899 o.push(r), 2900 o.push("color:inherit")), 2901 rspkr.hl ? n.push("- HL Engine: " + (rspkr.hl.engine.useTextNodeMarkup ? "Text Node HL engine" : "Gecko HL engine")) : (n.push("- HL Engine: %cNot yet available%c"), 2902 o.push(r), 2903 o.push("color:inherit")), 2904 n = n.join("\n"), 2905 o.splice(0, 0, n), 2906 e) 2907 return o[0].replace(/%c/gi, ""); 2908 console.log.apply(null, o) 2909 } 2910 } 2911}(window), 2912function(o) { 2913 var i, t, r, e = (t = function(e) { 2914 var t = e.document 2915 , r = navigator.userAgent 2916 , n = o.ReadSpeaker.DeferSelection; 2917 r && (/iphone|ipad|ios|android/i.test(r.OS) || r.toLowerCase().match("android")) ? ($rs.regEvent(t.body, "touchend", n.saveSelection), 2918 $rs.regEvent(t.body, "selectionchange", n.saveSelection)) : (r.toLowerCase().match("opera") ? ($rs.regEvent(t.body, "mouseup", n.saveSelectionOpera), 2919 $rs.regEvent(e, "mouseup", n.saveSelectionOpera)) : $rs.regEvent(t.body, "mouseup", n.saveSelection), 2920 $rs.regEvent(t.body, "keyup", n.saveSelection)), 2921 $rs.regEvent(t.body, "mousedown", n.saveMousePosition) 2922 } 2923 , 2924 r = function(e) { 2925 var t = o.ReadSpeaker.DeferSelection 2926 , r = e.document; 2927 $rs.unregEvent(r.body, "touchend", t.saveSelection), 2928 $rs.unregEvent(r, "selectionchange", t.saveSelection), 2929 $rs.unregEvent(r.body, "mouseup", t.saveSelectionOpera), 2930 $rs.unregEvent(e, "mouseup", t.saveSelectionOpera), 2931 $rs.unregEvent(r.body, "mouseup", t.saveSelection), 2932 $rs.unregEvent(e, "mouseup", t.saveSelection), 2933 $rs.unregEvent(r.body, "keyup", t.saveSelection), 2934 $rs.unregEvent(r.body, "mousedown", t.saveMousePosition) 2935 } 2936 , 2937 new function() { 2938 this.saveSelectionOpera = this.sso = s, 2939 this.saveSelection = this.ss = n, 2940 this.saveMousePosition = this.smp = l,
2941 this.getSelection = this.gs = a, 2942 this.unload = u, 2943 this.init = c 2944 } 2945 ); 2946 function n(e) { 2947 for (var t = (i = e).originalEvent.srcElement, r = ["input", "textarea"], n = 0; n < r.length; n++) 2948 if (t && t.matches(r[n])) 2949 return; 2950 if (!$rs.isContentEditable(t)) { 2951 var o, s, e = t.ownerDocument || document; 2952 if ($rs.isChildOfParent(t, rspkr.getRSBtns()[0]) || $rs.isChildOfParent(t, "#rsbtn_popup")) 2953 return !1; 2954 try { 2955 if (o = e.getSelection(), 2956 $rs.isContentEditable(o.anchorNode) || $rs.isContentEditable(o.focusNode)) 2957 return; 2958 s = o.toString() 2959 } catch (e) {} 2960 return s.length && !o.isCollapsed ? ReadSpeaker.popup.showPopup(i, s) : ReadSpeaker.popup.closePopup(i), 2961 !0 2962 } 2963 } 2964 function s(e) { 2965 return setTimeout(function() { 2966 o.ReadSpeaker.DeferSelection.saveSelection(e) 2967 }, 50), 2968 !0 2969 } 2970 function a() { 2971 return i 2972 } 2973 function l(e) { 2974 o.ReadSpeaker.ds.pointerX = e.pageX, 2975 o.ReadSpeaker.ds.pointerY = e.pageY 2976 } 2977 function c() { 2978 "complete" === document.readyState || "loaded" === document.readyState ? $rs.getReadingFrames().forEach(function(e) { 2979 try { 2980 t(e) 2981 } catch (e) {} 2982 }) : document.addEventListener("readystatechange", function() { 2983 "complete" !== document.readyState && "loaded" !== document.readyState || $rs.getReadingFrames().forEach(function(e) { 2984 try { 2985 t(e) 2986 } catch (e) {} 2987 }) 2988 }) 2989 } 2990 function u() { 2991 "complete" === document.readyState || "loaded" === document.readyState ? $rs.getReadingFrames().forEach(function(e) { 2992 try { 2993 r(e) 2994 } catch (e) {} 2995 }) : document.addEventListener("readystatechange", function() { 2996 "complete" !== document.readyState && "loaded" !== document.readyState || $rs.getReadingFrames().forEach(function(e) { 2997 try { 2998 r(e) 2999 } catch (e) {} 3000 }) 3001 }), 3002 rspkr && rspkr.c.data.setSelectedText && i && rspkr.c.data.setSelectedText(i) 3003 } 3004 o.ReadSpeaker.DeferSelection = o.ReadSpeaker.ds = e 3005}(window), 3006window.ReadSpeaker.Keyboard = function() { 3007 function e() { 3008 var e, t = rspkr.item("settings.kb"), r = ["shift", "alt", "ctrl"]; 3009 for (e in t) 3010 if (t.hasOwnProperty(e)) { 3011 var n = {} 3012 , o = rspkr.st && rspkr.st.get("kb." + e) || t[e]; 3013 if ("0" !== o) { 3014 for (var s, i = 0, a = o.split("+"); s = a[i]; i++) 3015 0 <= r.indexOf(s) ? n[s] = !0 : n.key = s; 3016 l[e] = n 3017 } else 3018 l[e] = "0" 3019 } 3020 } 3021 function r(t) { 3022 if ("object" == typeof t) { 3023 var r = []; 3024 return Object.keys(t).forEach(function(e) { 3025 "key" === e && r.push(t[e]), 3026 "key" !== e && !0 === t[e] && r.push(e) 3027 }), 3028 r.sort().join("+") 3029 } 3030 } 3031 function n(t, r, e) { 3032 if (!navigator.keyboard || e) 3033 return "Digit" === (t = "Key" === t.substr(0, 3) ? t.substr(3) : t).substr(0, 5) && (t = t.substr(5)), 3034 r && (r.innerText = t), 3035 t; 3036 navigator.keyboard.getLayoutMap().then(function(e) { 3037 r.innerText = e.get(t) 3038 }) 3039 } 3040 function t(e) { 3041 var t = e.composedPath ? e.composedPath()[0] : e.target; 3042 if (t && t.closest) { 3043 if ($rs.isContentEditable(t)) 3044 return; 3045 for (var r = ["textarea", "input"], n = 0; n < r.length; n++) 3046 if (t.closest(r[n])) 3047 return; 3048 if (t.closest(".rs-noshortcut")) 3049 return; 3050 var o = rspkr.conf("ui.disableShortcutSelector"); 3051 if (o && "." !== o && t.closest(o)) 3052 return 3053 } 3054 rspkr.st && "off" === rspkr.st.get("shortcuts") || e.repeat || rspkr.Keyboard.blocked || 1 === e.key.length && (e.shiftKey || e.altKey || e.ctrlKey) && (e = { 3055 shift: e.shiftKey, 3056 alt: e.altKey, 3057 ctrl: e.ctrlKey, 3058 key: e.code 3059 }, 3060 (e = s(e)) && i(e)) 3061 } 3062 var l = {} 3063 , s = function(e) { 3064 for (var t in e = r(e), 3065 l) 3066 if (l.hasOwnProperty(t) && e === r(l[t])) 3067 return t 3068 } 3069 , o = {
3070 playerfocus: function() { 3071 var e; 3072 rspkr.ui && rspkr.ui.getActivePlayerElm() && rspkr.ui.getActivePlayerElm().querySelector(".rsbtn_play") ? rspkr.ui.getActivePlayerElm().querySelector(".rsbtn_play").focus() : (e = 0, 3073 (e = rspkr.getRSBtns()[e]) && $rs.isVisible(e) && e.querySelector(".rsbtn_play") && e.querySelector(".rsbtn_play").focus()) 3074 }, 3075 textmode: function() { 3076 rspkr.ui && rspkr.ui.Tools.TextMode.start() 3077 }, 3078 settings: function() { 3079 rspkr.Preferences && rspkr.Preferences.open() 3080 }, 3081 clicklisten: function() { 3082 rspkr.ui && rspkr.ui.Tools.ClickListen.toggle() 3083 }, 3084 enlarge: function() { 3085 rspkr.ui && rspkr.ui.Tools.Enlarge.toggle() 3086 }, 3087 pagemask: function() { 3088 rspkr.ui && rspkr.ui.Tools.PageMask.start("mask") 3089 }, 3090 download: function() { 3091 rspkr.ui && rspkr.ui.Tools.Download.download() 3092 }, 3093 help: function() { 3094 rspkr.ui && rspkr.ui.Tools.Help.open() 3095 } 3096 } 3097 , i = function(e) { 3098 if (o[e]) 3099 o[e](); 3100 else { 3101 var t = Array.from(document.querySelectorAll('[data-rsshortcut~="%s"]:not([style="display:none"])'.replace("%s", e))); 3102 t.sort(function(e, t) { 3103 e = parseInt(e.getAttribute("data-rsshortcut-prioritize")) || 0; 3104 return (parseInt(t.getAttribute("data-rsshortcut-prioritize")) || 0) - e 3105 }); 3106 for (var r, n = 0; r = t[n]; n++) 3107 if ($rs.isVisible(r)) 3108 return r.focus(), 3109 r.click(), 3110 void rspkr.log("[rspkr.Keyboard.triggerAction] Shortcut triggered for action '" + e + "'"); 3111 rspkr.log("[rspkr.Keyboard.triggerAction] Could not find action listener for action '" + e + "'") 3112 } 3113 }; 3114 return { 3115 insertMappedKey: n, 3116 getAction: s, 3117 getShortcut: function(e, t) { 3118 if (t) { 3119 var r = l[e] 3120 , t = []; 3121 return r.shift && t.push(rspkr.Lang.getPhrase("shortcuts-shift") || "Shift"), 3122 r.ctrl && t.push(rspkr.Lang.getPhrase("shortcuts-ctrl") || "Ctrl"), 3123 r.alt && t.push(rspkr.Lang.getPhrase("shortcuts-alt") || "Alt"), 3124 r.key && t.push(n(r.key, void 0, !0)), 3125 t.join(" + ") 3126 } 3127 return l[e] 3128 }, 3129 init: function() { 3130 rspkr.log("[rspkr.Keyboard] Heartbeat!"), 3131 rspkr.q(e), 3132 e(), 3133 document.addEventListener("keydown", t) 3134 }, 3135 restoreShortcuts: e, 3136 setShortcut: function(e, t) { 3137 l[e] = t, 3138 rspkr.st.set("kb." + e, Object.keys(t).length ? r(t) : "0") 3139 } 3140 } 3141}(), 3142function() { 3143 function e() { 3144 t = !0, 3145 rspkr.init() 3146 } 3147 var t = !1; 3148 "complete" === document.readyState ? e() : document.addEventListener("readystatechange", function() { 3149 t || "complete" === document.readyState && e() 3150 }) 3151}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.