@internetarchive/bookreader 5.0.0-63 → 5.0.0-64
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/node.js.yml +1 -0
- package/BookReader/BookReader.css +45 -58
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +2 -0
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +95 -95
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +2 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/1up.svg +1 -1
- package/BookReader/icons/2up.svg +1 -1
- package/BookReader/icons/advance.svg +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -1
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -1
- package/BookReader/icons/fullscreen_exit.svg +1 -1
- package/BookReader/icons/hamburger.svg +1 -1
- package/BookReader/icons/left-arrow.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/magnify.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/play.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/review.svg +1 -1
- package/BookReader/icons/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +3 -3
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_bookmark.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_hamburger.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_one_page.svg +1 -1
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_skip-ahead.svg +1 -1
- package/BookReader/images/icon_skip-back.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_thumbnails.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/icon_two_pages.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +2 -1
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +2 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +2 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +2 -0
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/CHANGELOG.md +5 -0
- package/babel.config.js +5 -4
- package/netlify.toml +4 -0
- package/package.json +15 -15
- package/src/BookNavigator/search/search-results.js +1 -7
- package/src/BookReader/utils.js +10 -0
- package/src/css/_BRnav.scss +2 -2
- package/src/css/_BRsearch.scss +38 -10
- package/src/plugins/search/plugin.search.js +14 -21
- package/src/plugins/search/utils.js +43 -0
- package/src/plugins/search/view.js +11 -24
- package/tests/e2e/helpers/desktopSearch.js +3 -3
- package/tests/jest/BookNavigator/search/search-results.test.js +6 -1
- package/tests/jest/BookReader/utils.test.js +12 -0
- package/tests/jest/plugins/search/plugin.search.test.js +2 -39
- package/tests/jest/plugins/search/plugin.search.view.test.js +5 -0
- package/tests/jest/plugins/search/utils.js +25 -0
- package/tests/jest/plugins/search/utils.test.js +29 -0
@@ -1,3 +1,3 @@
|
|
1
1
|
/*! For license information please see plugin.tts.js.LICENSE.txt */
|
2
|
-
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[34],{4025:function(e,t,n){"use strict";n(5666),n(4916),n(1539),n(9714),n(4723),n(9826),n(2222),n(9600),n(1249),n(8309),n(2707),n(7327),n(6755),n(4678),n(9720),n(4747),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(7042),n(1038),n(489),n(2419),n(4819),n(5003),n(5306),n(9601);var o=n(3609);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,a=[],r=!0,s=!1;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var u=function(){function e(t,n,o,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.leafIndex=t,this.chunkIndex=n,this.text=o,this.lineRects=i}var t,n,a,u;return t=e,null,(n=[{key:"fetch",value:(a=regeneratorRuntime.mark((function t(n,i,a){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.ajax({type:"GET",url:"https://".concat(n,"/BookReader/BookReaderGetTextWrapper.php"),dataType:"jsonp",cache:!0,data:{path:"".concat(i,"_djvu.xml"),page:a}});case 2:return r=t.sent,t.abrupt("return",e._fromTextWrapperResponse(a,r));case 4:case"end":return t.stop()}}),t)})),u=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=a.apply(e,t);function s(e){r(i,n,o,s,u,"next",e)}function u(e){r(i,n,o,s,u,"throw",e)}s(void 0)}))},function(e,t,n){return u.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(t,n){return n.map((function(n,o){var i=e._fixChunkRects(n.slice(1)),a=e._removeDanglingHyphens(n[0]);return new e(t,o,a,i)}))}},{key:"_fixChunkRects",value:function(e){if(e.length<2)return e;var t=i(e,2),n=t[0],o=t[1],a=i(n,3),r=a[0],s=a[1],u=a[2]-r,l=o[1]-o[3],c=o[2]-o[0],d=o[2];return u>30*c&&(n[2]=d,n[3]=s-l),e}},{key:"_removeDanglingHyphens",value:function(e){return e.replace(/[-¬]\s+/g,"")}}])&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function l(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var d=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pageCount=t,this.opts=Object.assign({},h,o),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}var t,n,o,i;return t=e,(n=[{key:"next",value:function(){var e=this;return this._cursorLock=this._cursorLock.then((function(){return e._nextUncontrolled()}))}},{key:"decrement",value:function(){var e=this;return this._cursorLock=this._cursorLock.then((function(){return e._decrementUncontrolled()}))}},{key:"_nextUncontrolled",value:(o=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._cursor.page!=this.pageCount){t.next=2;break}return t.abrupt("return",Promise.resolve(e.AT_END));case 2:return this._recenterBuffer(this._cursor.page),t.next=5,this._fetchPageChunks(this._cursor.page);case 5:if(n=t.sent,this._cursor.chunk!=n.length){t.next=10;break}return this._cursor.page++,this._cursor.chunk=0,t.abrupt("return",this._nextUncontrolled());case 10:return t.abrupt("return",n[this._cursor.chunk++]);case 11:case"end":return t.stop()}}),t,this)})),i=function(){var e=this,t=arguments;return new Promise((function(n,i){var a=o.apply(e,t);function r(e){l(a,n,i,r,s,"next",e)}function s(e){l(a,n,i,r,s,"throw",e)}r(void 0)}))},function(){return i.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var e=this,t=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,t=this._fetchPageChunks(this._cursor.page).then((function(t){if(0==t.length)return e._decrementUncontrolled();e._cursor.chunk=t.length-1}))),t.then((function(){return e._fetchPageChunks(e._cursor.page)}))}},{key:"_recenterBuffer",value:function(e){for(var t=Math.max(0,e-this.opts.pageBufferSize),n=Math.min(this.pageCount,e+this.opts.pageBufferSize+1),o=t;o<n;o++)this._fetchPageChunks(o);this._removePageFromBuffer(t-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(e){delete this._bufferingPages[e],delete this._bufferedPages[e]}},{key:"_fetchPageChunks",value:function(e){var t=this;return e in this._bufferingPages?this._bufferingPages[e]:e in this._bufferedPages?Promise.resolve(this._bufferedPages[e]):(this._bufferingPages[e]=this._fetchPageChunksDirect(e).then((function(n){return delete t._bufferingPages[e],t._bufferedPages[e]=n,n})),this._bufferingPages[e])}},{key:"_fetchPageChunksDirect",value:function(e){return u.fetch(this.opts.server,this.opts.bookPath,e)}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();d.AT_END="__PageChunkIterator.AT_END__";var h={server:null,bookPath:null,pageBufferSize:2},f=n(3609);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function A(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function r(e){A(a,o,i,r,s,"next",e)}function s(e){A(a,o,i,r,s,"throw",e)}r(void 0)}))}}function y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var v=function(){function e(t){var n,o,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o=function(){i.voice=e.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(n="updateBestVoice")in this?Object.defineProperty(this,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):this[n]=o,this.playing=!1,this.paused=!1,this.opts=t,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=f({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}var t,n,o,i,a;return t=e,o=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,i=t.filter((function(e){return e.lang.startsWith(n)})),a=(o=o||(navigator.language?[navigator.language]:[])).filter((function(e){return e.startsWith(n)}));return e.getMatchingVoice(a,i)||i.find((function(e){return e.default}))||i[0]||e.getMatchingVoice(o,t)||t.find((function(e){return e.default}))||t[0]}},{key:"getMatchingVoice",value:function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{var i=function(){var e=n.value,o=t.filter((function(t){return t.lang.replace("_","-").startsWith(e)}));if(o.length)return{v:o.find((function(e){return e.default}))||o[0]}};for(o.s();!(n=o.n()).done;){var a=i();if("object"===p(a))return a.v}}catch(e){o.e(e)}finally{o.f()}}}],(n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(e,t){this.playing=!0,this.opts.onLoadingStart(),this._chunkIterator=new d(t,e,{server:this.opts.server,bookPath:this.opts.bookPath,pageBufferSize:5}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var e=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),e&&this.events.trigger("pause")}},{key:"resume",value:function(){var e=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),e&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(a=g(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then((function(){return t._chunkIterator.decrement()}))]);case 2:this.step();case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"setVoice",value:function(e){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find((function(t){return t.voiceURI===e})),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e,this.activeSound&&this.activeSound.setPlaybackRate(e)}},{key:"step",value:(i=g(regeneratorRuntime.mark((function e(){var t,n,o,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._chunkIterator.next();case 2:if((t=e.sent)!=d.AT_END){e.next=7;break}return this.stop(),this.opts.onDone(),e.abrupt("return");case 7:return this.opts.onLoadingStart(),(n=this.createSound(t)).chunk=t,n.rate=this.playbackRate,n.voice=this.voice,n.load((function(){return i.opts.onLoadingComplete()})),this.opts.onLoadingComplete(),e.next=16,this.opts.beforeChunkPlay(t);case 16:if(this.playing){e.next=18;break}return e.abrupt("return");case 18:return e.next=20,this.playSound(n).then((function(){return i.opts.afterChunkPlay(n.chunk)}));case 20:return o=e.sent,this.paused&&this.pause(),e.next=24,o;case 24:if(!this.playing){e.next=26;break}return e.abrupt("return",this.step());case 26:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"createSound",value:function(e){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(e){return this.activeSound=e,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(){return e.getBestBookVoice(this.getVoices(),this.opts.bookLanguage)}}])&&y(t.prototype,n),o&&y(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(),b=n(5685),w=(n(5529),n(4371),n(3609));function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function r(e){V(a,o,i,r,s,"next",e)}function s(e){V(a,o,i,r,s,"throw",e)}r(void 0)}))}}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function O(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function P(){return(P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=I(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function I(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E(e)););return e}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(n);if(o){var i=E(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return R(this,e)});function a(e){var t,n;return M(this,a),(n=i.call(this,e)).audioFormat=null!==(t=w.browser)&&void 0!==t&&t.mozilla?"ogg":"mp3",n}return O(a,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(e,t){var n=this,o=null;navigator.userAgent.match(/mobile/i)&&(o=this.iOSCaptureUserIntentHack()),(o=o||Promise.resolve()).then((function(){return P(E(a.prototype),"start",n).call(n,e,t)}))}},{key:"createSound",value:function(e){return new q(this.getSoundUrl(e.text))}},{key:"getSoundUrl",value:function(e){return"https://"+this.opts.server+"/BookReader/BookReaderGetTTS.php?string="+encodeURIComponent(e)+"&format=."+this.audioFormat}},{key:"iOSCaptureUserIntentHack",value:(t=_(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=soundManager.createSound({url:T[this.audioFormat]}),e.next=3,new Promise((function(e){return t.play({onfinish:e})}));case 3:t.destruct();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]),a}(v),q=function(){function e(t){M(this,e),this.soundUrl=t,this.sound=null,this.rate=1,this._finishResolver=null}var t;return O(e,[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(e){var t,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),e()},onresume:(t=_(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.sleep)(25);case 2:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(t=_(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){t._finishResolver=e,t.sound.play({onfinish:e})}));case 2:this.sound.destruct();case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(e){this.rate=e,this.sound.setPlaybackRate(e)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]),e}(),T={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAA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pJRaSplzUlIqJaWWUuogpNRaSi211loHJaXWUmqttdY6CKW01FprrbXYQUgppdZaiy3GUEpKrbXYYow1hlJSaq3F2GKsMaTSUmwtxhhjrKGU1lprMcYYay0ptdZijLXGWmtJqbXWYos11loLAOBucACASLBxhpWks8LR4EJDVgIAIQEABEKMOeeccxBCCCFSijHnoIMQQgghREox5hx0EEIIIYSMMeeggxBCCCGEkDHmHHQQQgghhBA65xyEEEIIoYRSSuccdBBCCCGUUELpIIQQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="};function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(e)&&/google inc/i.test(t)}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(e)}n(3123);var F=n(1030);function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var U={Name:0,Endonym:1,"ISO 639-1":2,"ISO 639-2/T":3,"ISO 639-2/B":4};function H(e,t){for(var n=0;n<F.Z.length;n++)for(var o=0;o<t.length;o++){var i=t[o];if(-1!=F.Z[n][U[i]].split(", ").map((function(e){return e.toLowerCase()})).indexOf(e))return F.Z[n][U["ISO 639-1"]]}return null}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function N(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function r(e){Q(a,o,i,r,s,"next",e)}function s(e){Q(a,o,i,r,s,"throw",e)}r(void 0)}))}}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z(){return(Z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=G(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function G(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=J(e)););return e}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $,ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=J(t);if(n){var i=J(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return X(this,e)});function i(e){var t;return Y(this,i),t=o.call(this,e),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",(function(){return t.events.trigger("voiceschanged")})),t}return K(i,[{key:"start",value:function(e,t){var n=this;if("mediaSession"in navigator){var o=new Audio(ne);o.loop=!0,this.events.on("pause",(function(){return o.pause()})),this.events.on("resume",(function(){return o.play()})),this.events.on("stop",(function(){return o.src=""})),o.play().then((function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter((function(e){return"Author"==e.label})).map((function(e){return e.value}))[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setActionHandler("play",(function(){o.play(),n.resume()})),navigator.mediaSession.setActionHandler("pause",(function(){o.pause(),n.pause()})),navigator.mediaSession.setActionHandler("previoustrack",(function(){return n.jumpBackward()})),navigator.mediaSession.setActionHandler("nexttrack",(function(){return n.jumpForward()}))}))}return Z(J(i.prototype),"start",this).call(this,e,t)}},{key:"getVoices",value:function(){var e=speechSynthesis.getVoices();return 1!=e.filter((function(e){return e.default})).length&&e.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),e}},{key:"createSound",value:function(e){return new te(e.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis&&!/samsungbrowser/i.test(navigator.userAgent)}}]),i}(v),te=function(){function e(t){Y(this,e),this.text=t,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null}var t,n,o,i,a;return K(e,[{key:"load",value:function(e){var t,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(t=this.voice)||void 0===t?void 0:t.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,-1!=location.toString().indexOf("_debugReadAloud=true")&&(this.utterance.addEventListener("pause",(function(){return console.log("pause")})),this.utterance.addEventListener("resume",(function(){return console.log("resume")})),this.utterance.addEventListener("start",(function(){return console.log("start")})),this.utterance.addEventListener("end",(function(){return console.log("end")})),this.utterance.addEventListener("error",(function(){return console.log("error")})),this.utterance.addEventListener("boundary",(function(){return console.log("boundary")})),this.utterance.addEventListener("mark",(function(){return console.log("mark")})),this.utterance.addEventListener("finish",(function(){return console.log("finish")}))),this.utterance.addEventListener("start",(function(e){return n._lastEvents.start=e})),this.utterance.addEventListener("boundary",(function(e){return n._lastEvents.boundary=e})),this.utterance.addEventListener("pause",(function(e){return n._lastEvents.pause=e})),this.utterance.addEventListener("start",(function(){n.started=!0,n.stopped=!1,n.paused=!1})),this.utterance.addEventListener("pause",(function(){return n.paused=!0})),this.utterance.addEventListener("resume",(function(){return n.paused=!1})),this.utterance.addEventListener("end",(function(e){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",e))})),this.loaded=!0,e&&e()}},{key:"reload",value:(a=N(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),e.next=5,this.stop();case 5:this.load(),t||this.play();case 7:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"play",value:function(){var e=this;this._finishPromise=this._finishPromise||new Promise((function(t){return e._finishResolver=t})),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var t=this.utterance.voice&&this.utterance.voice.localService;return D()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([(0,b.promisifyEvent)(this.utterance,"end"),(0,b.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),e}},{key:"finish",value:(i=N(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stop();case 2:this.utterance.dispatchEvent(new Event("finish"));case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"pause",value:(o=N(regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.paused){e.next=2;break}return e.abrupt("return");case 2:if(t=(0,b.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=C()&&B(),!D()&&!n){e.next=15;break}return o=(0,b.sleep)(100).then((function(){return"timeout"})),e.next=10,Promise.race([t,o]);case 10:if("timeout"==e.sent){e.next=13;break}return e.abrupt("return");case 13:this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 15:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"resume",value:(n=N(regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.started){e.next=3;break}return this.play(),e.abrupt("return");case 3:if(this.paused){e.next=5;break}return e.abrupt("return");case 5:if(t=D()&&B()||C()&&B(),n=D()||t,o=(0,b.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),!n){e.next=20;break}return e.next=12,Promise.race([o,(0,b.sleep)(100).then((function(){return"timeout"}))]);case 12:if("timeout"==e.sent){e.next=15;break}return e.abrupt("return");case 15:if(this.utterance.dispatchEvent(new CustomEvent("resume",{})),!t){e.next=20;break}return e.next=19,this.reload();case 19:this.play();case 20:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"setPlaybackRate",value:function(e){this.rate=e,this.reload()}},{key:"setVoice",value:function(e){this.voice=e,this.reload()}},{key:"_chromePausingBugFix",value:(t=N(regeneratorRuntime.mark((function e(){var t,n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,b.sleep)(14e3).then((function(){return"timeout"})),n=(0,b.promisifyEvent)(this.utterance,"pause").then((function(){return"paused"})),o=(0,b.promisifyEvent)(this.utterance,"end").then((function(){return"ended"})),e.next=5,Promise.race([t,n,o]);case 5:i=e.sent,-1!=location.toString().indexOf("_debugReadAloud=true")&&console.log("CHROME-PAUSE-HACK: ".concat(i)),e.t0=i,e.next="ended"===e.t0?10:"paused"===e.t0?11:"timeout"===e.t0?15:21;break;case 10:return e.abrupt("break",21);case 11:return e.next=13,Promise.race([(0,b.promisifyEvent)(this.utterance,"resume"),(0,b.sleep)(14e3).then((function(){return"timeout"}))]);case 13:return"timeout"==i?this.reload():this._chromePausingBugFix(),e.abrupt("break",21);case 15:return speechSynthesis.pause(),e.next=18,(0,b.sleep)(25);case 18:return speechSynthesis.resume(),this._chromePausingBugFix(),e.abrupt("break",21);case 21:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ne="data:audio/mp3;base64,/+MYxAAMEAISSAhElhIpJYzz1vz9mUdlHvJwTP/n3FJesPxB9/8mp0oGaz9+7+T//8oCDhJqOMqLh4o4uhUAUUDaf//3r+///+MYxAoKy2ImKAgEqbfr/t///27/+n3s32/////+b5qMsq7vnXCKh2By3ZcIqyrUYbbRH0fp+ljtf+n2Uo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VVVVVVVVVVVVVVVVVVV/+MYxOwOwz4hqAiHo1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxOwOG1oOIAgEqFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxO4L6AVtkAhEAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",oe="Read this book aloud",ie=n(9860),ae=n(3609),re=n(3609);function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,a=[],r=!0,s=!1;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function le(e,t,n,o,i,a,r){try{var s=e[a](r),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,i)}function ce(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function r(e){le(a,o,i,r,s,"next",e)}function s(e){le(a,o,i,r,s,"throw",e)}r(void 0)}))}}ae.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookPath:"",enableTtsPlugin:!0}),BookReader.prototype.setup=($=BookReader.prototype.setup,function(e){if($.call(this,e),this.options.enableTtsPlugin){this._ttsBoxesByIndex={};var t=ee.isSupported()?ee:L.isSupported()?L:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var n=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];t={festival:L,web:ee}[n]}t&&(this.ttsEngine=new t({server:e.server,bookPath:e.bookPath,bookLanguage:(o=e.bookLanguage,o?H(o=o.toLowerCase(),["ISO 639-1"])||H(o,["ISO 639-2/B"])||H(o,["ISO 639-2/T","Endonym","Name"]):null),onLoadingStart:this.showProgressPopup.bind(this,"Loading audio..."),onLoadingComplete:this.removeProgressPopup.bind(this),onDone:this.ttsStop.bind(this),beforeChunkPlay:this.ttsBeforeChunkPlay.bind(this),afterChunkPlay:this.ttsSendChunkFinishedAnalyticsEvent.bind(this)}))}var o}),BookReader.prototype.init=function(e){return function(){var t=this;this.options.enableTtsPlugin&&this.bind(BookReader.eventNames.PostInit,(function(){t.$(".BRicon.read").click((function(){return t.ttsToggle(),!1})),t.ttsEngine&&(t.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&t.ttsStart(!1))})),e.call(this)}}(BookReader.prototype.init),BookReader.prototype._createPageContainer=function(e){return function(t){var n=e.call(this,t);if(this.options.enableTtsPlugin&&n.page&&t in this._ttsBoxesByIndex){var o=n.page.index;(0,ie.Tm)("ttsHiliteLayer",this._ttsBoxesByIndex[o],n.page,n.$container[0])}return n}}(BookReader.prototype._createPageContainer),BookReader.prototype.buildMobileDrawerElement=function(e){return function(){var t=e.call(this);return this.options.enableTtsPlugin&&this.ttsEngine&&t.find(".BRmobileMenu__moreInfoRow").after(re('\n <li>\n <span>\n <span class="DrawerIconWrapper"><img class="DrawerIcon" src="'.concat(this.imagesBaseURL,'icon_speaker_open.svg" alt="info-speaker"/></span>\n Read Aloud\n </span>\n <div>\n <span class="larger">Press to toggle read aloud</span>\n <br/>\n <button class="BRicon read"></button>\n </div>\n </li>'))),t}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.initNavbar=function(e){return function(){var t=this,n=e.call(this);if(this.options.enableTtsPlugin&&this.ttsEngine){this.refs.$BRReadAloudToolbar=re('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),n.find(".BRcontrols").prepend(this.refs.$BRReadAloudToolbar);var o=function(e){return e.map((function(e){return'<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>")})).join("")},i=function(e,t){return"".concat(e.lang," - ").concat(e.name).localeCompare("".concat(t.lang," - ").concat(t.name))},a=function(e){e.empty();var n=t.ttsEngine.opts.bookLanguage,a=t.ttsEngine.getVoices().filter((function(e){return e.lang.startsWith(n)})).sort(i),r=t.ttsEngine.getVoices().filter((function(e){return!e.lang.startsWith(n)})).sort(i);t.ttsEngine.getVoices().length>1?(e.append(re('<optgroup label="Book Language ('.concat(n,')"> ').concat(o(a)," </optgroup>"))),e.append(re('<optgroup label="Other Languages"> '.concat(o(r)," </optgroup>"))),e.val(t.ttsEngine.voice.voiceURI),e.show()):e.hide()},r=this.refs.$BRReadAloudToolbar.find("[name=playback-voice]");a(r),r.on("change",(function(e){return t.ttsEngine.setVoice(r.val())})),this.ttsEngine.events.on("pause resume start",(function(){return t.ttsUpdateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return a(r)})),this.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.ttsPlayPause.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.ttsJumpForward.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.ttsJumpBackward.bind(this));var s=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');s.on("change",(function(e){return t.ttsEngine.setPlaybackRate(parseFloat(s.val()))})),re('<li>\n <button class="BRicon read js-tooltip" title="'.concat(oe,'">\n <div class="icon icon-read-aloud"></div>\n <span class="tooltip">').concat(oe,"</span>\n </button>\n </li>")).insertBefore(n.find(".BRcontrols .BRicon.zoom_out").closest("li"))}return n}}(BookReader.prototype.initNavbar),BookReader.prototype.ttsToggle=function(){this.autoStop&&this.autoStop(),this.ttsEngine.playing?this.ttsStop():this.ttsStart()},BookReader.prototype.ttsStart=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.constModeThumb==this.mode&&this.switchMode(this.constMode1up),this.refs.$BRReadAloudToolbar.addClass("visible"),this.$(".BRicon.read").addClass("unread active"),this.ttsSendAnalyticsEvent("Start"),e&&this.ttsEngine.start(this.currentIndex(),this.book.getNumLeafs())},BookReader.prototype.ttsJumpForward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()},BookReader.prototype.ttsJumpBackward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()},BookReader.prototype.ttsUpdateState=function(){var e=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.$(".read-aloud [name=play]").toggleClass("playing",e)},BookReader.prototype.ttsPlayPause=function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.ttsUpdateState(this.ttsEngine.paused)):this.ttsToggle()},BookReader.prototype.ttsStop=function(){this.refs.$BRReadAloudToolbar.removeClass("visible"),this.$(".BRicon.read").removeClass("unread active"),this.ttsSendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.ttsRemoveHilites(),this.removeProgressPopup()},BookReader.prototype.ttsBeforeChunkPlay=function(){var e=ce(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ttsMaybeFlipToIndex(t.leafIndex);case 2:this.ttsHighlightChunk(t),this.ttsScrollToChunk(t);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.ttsSendChunkFinishedAnalyticsEvent=function(e){var t;this.ttsSendAnalyticsEvent("ChunkFinished-Words",(t=e.text.match(/\S+/g))?t.length:0)},BookReader.prototype.ttsMaybeFlipToIndex=function(){var e=ce(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.constMode2up==this.mode){e.next=4;break}this.jumpToIndex(t),e.next=6;break;case 4:return e.next=6,this._modes.mode2Up.mode2UpLit.jumpToIndex(t);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.ttsHighlightChunk=function(e){var t,n,o,i=this,a=e.leafIndex;this.ttsRemoveHilites(),this._ttsBoxesByIndex=(t={},n=a,o=e.lineRects.map((function(e){var t=se(e,4),n=t[0],o=t[1];return{l:n,r:t[2],b:o,t:t[3]}})),n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t);for(var r=function(){var e=se(u[s],2),t=e[0],n=e[1],o=parseFloat(t),a=i.book.getPage(o);i.getActivePageContainerElementsForIndex(o).forEach((function(e){return(0,ie.Tm)("ttsHiliteLayer",n,a,e)}))},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)r()},BookReader.prototype.ttsScrollToChunk=function(e){var t,n;this.constModeThumb!=this.mode&&(null===(t=re(".pagediv".concat(e.leafIndex," .ttsHiliteLayer rect")).last())||void 0===t||null===(n=t[0])||void 0===n||n.scrollIntoView({block:this.constMode1up==this.mode||this.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))},BookReader.prototype.ttsRemoveHilites=function(){re(this.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}},BookReader.prototype.ttsSendAnalyticsEvent=function(e,t){if(this.archiveAnalyticsSendEvent){var n={},o=this.ttsEngine.opts.bookLanguage;o&&(n.mediaLanguage=o),this.archiveAnalyticsSendEvent("BRReadAloud",e,t,n)}}},2814:function(e,t,n){var o=n(7854),i=n(7293),a=n(1702),r=n(1340),s=n(3111).trim,u=n(1361),l=a("".charAt),c=o.parseFloat,d=o.Symbol,h=d&&d.iterator,f=1/c(u+"-0")!=-1/0||h&&!i((function(){c(Object(h))}));e.exports=f?function(e){var t=s(r(e)),n=c(t);return 0===n&&"-"==l(t,0)?-0:n}:c},9720:function(e,t,n){var o=n(2109),i=n(4699).entries;o({target:"Object",stat:!0},{entries:function(e){return i(e)}})},4678:function(e,t,n){var o=n(2109),i=n(2814);o({global:!0,forced:parseFloat!=i},{parseFloat:i})},1030:function(e,t){"use strict";t.Z=void 0,t.Z=[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, کوردی","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, أۇزبېك","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]]},4371:function(e,t,n){var o,i;o=[n(3609)],void 0===(i=function(e){return function(e){"use strict";function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],o={},i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(i.browser&&(o[i.browser]=!0,o.version=i.version,o.versionNumber=parseInt(i.versionNumber,10)),i.platform&&(o[i.platform]=!0),(o.android||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"])&&(o.mobile=!0),(o.cros||o.mac||o.linux||o.win)&&(o.desktop=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),o.rv||o.iemobile){var a="msie";i.browser=a,o[a]=!0}if(o.edge){delete o.edge;var r="msedge";i.browser=r,o.msedge=!0}if(o.safari&&o.blackberry){var s="blackberry";i.browser=s,o.blackberry=!0}if(o.safari&&o.playbook){var u="playbook";i.browser=u,o.playbook=!0}if(o.bb){var l="blackberry";i.browser=l,o[l]=!0}if(o.opr){var c="opera";i.browser=c,o.opera=!0}if(o.safari&&o.android){var d="android";i.browser=d,o.android=!0}if(o.safari&&o.kindle){var h="kindle";i.browser=h,o.kindle=!0}if(o.safari&&o.silk){var f="silk";i.browser=f,o.silk=!0}return o.name=i.browser,o.platform=i.platform,o}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,o))||(e.exports=i)},5529:function(e,t,n){var o;e=n.nmd(e),function(i,a){"use strict";if(!i||!i.document)throw new Error("SoundManager requires a browser with window and document objects.");var r=null;function s(e,t){this.setupOptions={url:e||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=t||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,o,r,s,u,l,c,d,h,f,p,m,A,g,y,v,b,w,k,V,_,M,S,O,P,I,x,R,E,L,q,T,D,C,F,B,U,H,j,Q,N,Y,z,K,Z,G,W,X,J,$,ee,te,ne,oe,ie,ae,re,se,ue,le,ce,de,he,fe,pe,me=this,Ae=null,ge=null,ye="soundManager",ve=ye+": ",be=navigator.userAgent,we=i.location.href.toString(),ke=document,Ve=[],_e=!0,Me=!1,Se=!1,Oe=!1,Pe=!1,Ie=!1,xe=0,Re=["log","info","warn","error"],Ee=null,Le=null,qe=!1,Te=!1,De=0,Ce=null,Fe=[],Be=null,Ue=Array.prototype.slice,He=!1,je=0,Qe=1e3,Ne=be.match(/(ipad|iphone|ipod)/i),Ye=be.match(/android/i),ze=be.match(/msie|trident/i),Ke=be.match(/webkit/i),Ze=be.match(/safari/i)&&!be.match(/chrome/i),Ge=be.match(/opera/i),We=be.match(/(mobile|pre\/|xoom)/i)||Ne||Ye,Xe=!we.match(/usehtml5audio/i)&&!we.match(/sm2-ignorebadua/i)&&Ze&&!be.match(/silk/i)&&be.match(/OS\sX\s10_6_([3-7])/i),Je=i.console!==a&&console.log!==a,$e=ke.hasFocus!==a?ke.hasFocus():null,et=Ze&&(ke.hasFocus===a||!ke.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",it=ke.location?ke.location.protocol.match(/http/i):null,at=it?"":"//",rt=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,st=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ut=new RegExp("\\.("+st.join("|")+")(\\?.*)?$","i");function lt(e){return me.preferFlash&&se&&!me.ignoreFlash&&me.flash[e]!==a&&me.flash[e]}function ct(e){return function(t){var n,o=this._s;return o&&o._a?n=e.call(this,t):(o&&o.id?me._wD(o.id+": Ignoring "+t.type):me._wD("HTML5::Ignoring "+t.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!it,U={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},ee=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==a&&(Ge&&opera!==a&&opera.version()<10?new Audio(null):new Audio).canPlayType!==a}catch(e){return!1}}(),this.setup=function(e){var t=!me.url;return e!==a&&Oe&&Be&&me.ok()&&(e.flashVersion!==a||e.url!==a||e.html5Test!==a)&&N(C("setupLate")),p(e),He||(We?me.setupOptions.ignoreMobileRestrictions&&!me.setupOptions.forceUseGlobalHTML5Audio||(Fe.push(_.globalHTML5),He=!0):me.setupOptions.forceUseGlobalHTML5Audio&&(Fe.push(_.globalHTML5),He=!0)),!pe&&We&&(me.setupOptions.ignoreMobileRestrictions?Fe.push(_.ignoreMobile):(me.setupOptions.useHTML5Audio&&!me.setupOptions.preferFlash||me._wD(_.mobileUA),me.setupOptions.useHTML5Audio=!0,me.setupOptions.preferFlash=!1,Ne?me.ignoreFlash=!0:(Ye&&!be.match(/android\s2\.3/i)||!Ye)&&(me._wD(_.globalHTML5),He=!0))),e&&(t&&P&&e.url!==a&&me.beginDelayedInit(),P||e.url===a||"complete"!==ke.readyState||setTimeout(S,1)),pe=!0,me},this.ok=function(){return Be?Oe&&!Pe:me.useHTML5Audio&&me.hasHTML5},this.supported=this.ok,this.getMovie=function(e){return o(e)||ke[e]||i[e]},this.createSound=function(e,t){var o,i,r,s=null;if(i=(o=ye+".createSound(): ")+C(Oe?"notOK":"notReady"),!Oe||!me.ok())return N(i),!1;if(t!==a&&(e={id:e,url:t}),(r=f(e)).url=G(r.url),r.id===a&&(r.id=me.setupOptions.idPrefix+je++),r.id.toString().charAt(0).match(/^[0-9]$/)&&me._wD(o+C("badID",r.id),2),me._wD(o+r.id+(r.url?" ("+r.url+")":""),1),Y(r.id,!0))return me._wD(o+r.id+" exists",1),me.sounds[r.id];function u(){return r=j(r),me.sounds[r.id]=new n(r),me.soundIDs.push(r.id),me.sounds[r.id]}if(J(r))s=u(),me.html5Only||me._wD(r.id+": Using HTML5"),s._setup_html5(r);else{if(me.html5Only)return me._wD(r.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(me.html5.usingFlash&&r.url&&r.url.match(/data:/i))return me._wD(r.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===r.isMovieStar&&(r.isMovieStar=!!(r.serverURL||r.type&&r.type.match(rt)||r.url&&r.url.match(ut))),r.isMovieStar&&(me._wD(o+"using MovieStar handling"),r.loops>1&&d("noNSLoop"))),r=Q(r,o),s=u(),8===l?ge._createSound(r.id,r.loops||1,r.usePolicyFile):(ge._createSound(r.id,r.url,r.usePeakData,r.useWaveformData,r.useEQData,r.isMovieStar,!!r.isMovieStar&&r.bufferTime,r.loops||1,r.serverURL,r.duration||null,r.autoPlay,!0,r.autoLoad,r.usePolicyFile),r.serverURL||(s.connected=!0,r.onconnect&&r.onconnect.apply(s))),r.serverURL||!r.autoLoad&&!r.autoPlay||s.load(r)}return!r.serverURL&&r.autoPlay&&s.play(),s},this.destroySound=function(e,t){if(!Y(e))return!1;var n,o=me.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<me.soundIDs.length;n++)if(me.soundIDs[n]===e){me.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete me.sounds[e],!0},this.load=function(e,t){return!!Y(e)&&me.sounds[e].load(t)},this.unload=function(e){return!!Y(e)&&me.sounds[e].unload()},this.onPosition=function(e,t,n,o){return!!Y(e)&&me.sounds[e].onposition(t,n,o)},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return!!Y(e)&&me.sounds[e].clearOnPosition(t,n)},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Oe||!me.ok())return N(ye+".play(): "+C(Oe?"notOK":"notReady")),!1;if(Y(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(me._wD(ye+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=me.createSound(t).play())}return null===n&&(n=me.sounds[e].play(t)),n},this.start=this.play,this.setPlaybackRate=function(e,t,n){return!!Y(e)&&me.sounds[e].setPlaybackRate(t,n)},this.setPosition=function(e,t){return!!Y(e)&&me.sounds[e].setPosition(t)},this.stop=function(e){return!!Y(e)&&(me._wD(ye+".stop("+e+")",1),me.sounds[e].stop())},this.stopAll=function(){var e;for(e in me._wD(ye+".stopAll()",1),me.sounds)me.sounds.hasOwnProperty(e)&&me.sounds[e].stop()},this.pause=function(e){return!!Y(e)&&me.sounds[e].pause()},this.pauseAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].pause()},this.resume=function(e){return!!Y(e)&&me.sounds[e].resume()},this.resumeAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].resume()},this.togglePause=function(e){return!!Y(e)&&me.sounds[e].togglePause()},this.setPan=function(e,t){return!!Y(e)&&me.sounds[e].setPan(t)},this.setVolume=function(e,t){var n,o;if(e!==a&&!isNaN(e)&&t===a){for(n=0,o=me.soundIDs.length;n<o;n++)me.sounds[me.soundIDs[n]].setVolume(e);return!1}return!!Y(e)&&me.sounds[e].setVolume(t)},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return!!Y(e)&&(me._wD(ye+'.mute(): Muting "'+e+'"'),me.sounds[e].mute());for(me._wD(ye+".mute(): Muting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].mute();return me.muted=!0,!0},this.muteAll=function(){me.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return!!Y(e)&&(me._wD(ye+'.unmute(): Unmuting "'+e+'"'),me.sounds[e].unmute());for(me._wD(ye+".unmute(): Unmuting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].unmute();return me.muted=!1,!0},this.unmuteAll=function(){me.unmute()},this.toggleMute=function(e){return!!Y(e)&&me.sounds[e].toggleMute()},this.getMemoryUse=function(){var e=0;return ge&&8!==l&&(e=parseInt(ge._getMemoryUse(),10)),e},this.disable=function(e){var t;if(e===a&&(e=!1),Pe)return!1;for(Pe=!0,d("shutdown",1),t=me.soundIDs.length-1;t>=0;t--)q(me.sounds[me.soundIDs[t]]);return q(me),h(e),ae.remove(i,"load",y),!0},this.canPlayMIME=function(e){var t;return me.hasHTML5&&(t=$({type:e})),!t&&Be&&(t=e&&me.ok()?!!(l>8&&e.match(rt)||e.match(me.mimePattern)):null),t},this.canPlayURL=function(e){var t;return me.hasHTML5&&(t=$({url:e})),!t&&Be&&(t=e&&me.ok()?!!e.match(me.filePattern):null),t},this.canPlayLink=function(e){return!(e.type===a||!e.type||!me.canPlayMIME(e.type))||me.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=me.sounds[e];return n||t||me._wD(ye+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(e,t){var n="onready";if("function"!=typeof e)throw C("needFunction",n);return Oe&&me._wD(C("queue",n)),t||(t=i),A(n,e,t),g(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw C("needFunction",n);return Oe&&me._wD(C("queue",n)),t||(t=i),A(n,e,t),g({type:n}),!0},this._writeDebug=function(e,t){var n,i;return!(!me.setupOptions.debugMode||!(Je&&me.useConsole&&(t&&"object"==typeof t?console.log(e,t):Re[t]!==a?console[Re[t]](e):console.log(e),me.consoleOnly))&&(!(n=o("soundmanager-debug"))||(i=ke.createElement("div"),++xe%2==0&&(i.className="sm2-alt"),t=t===a?0:parseInt(t,10),i.appendChild(ke.createTextNode(e)),t&&(t>=2&&(i.style.fontWeight="bold"),3===t&&(i.style.color="#ff3333")),n.insertBefore(i,n.firstChild),n=null,0)))},-1!==we.indexOf("sm2-debug=alert")&&(this._writeDebug=function(e){i.alert(e)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(d("currentObj",1),e=0,t=me.soundIDs.length;e<t;e++)me.sounds[me.soundIDs[e]]._debug()},this.reboot=function(e,t){var n,o,a;for(me.soundIDs.length&&me._wD("Destroying "+me.soundIDs.length+" SMSound object"+(1!==me.soundIDs.length?"s":"")+"..."),n=me.soundIDs.length-1;n>=0;n--)me.sounds[me.soundIDs[n]].destruct();if(ge)try{ze&&(Le=ge.innerHTML),Ee=ge.parentNode.removeChild(ge)}catch(e){d("badRemove",2)}if(Le=Ee=Be=ge=null,me.enabled=P=Oe=qe=Te=Me=Se=Pe=He=me.swfLoaded=!1,me.soundIDs=[],me.sounds={},je=0,pe=!1,e)Ve=[];else for(n in Ve)if(Ve.hasOwnProperty(n))for(o=0,a=Ve[n].length;o<a;o++)Ve[n][o].fired=!1;return t||me._wD(ye+": Rebooting..."),me.html5={usingFlash:null},me.flash={},me.html5Only=!1,me.ignoreFlash=!1,i.setTimeout((function(){t||me.beginDelayedInit()}),20),me},this.reset=function(){return d("reset"),me.reboot(!0,!0)},this.getMoviePercent=function(){return ge&&"PercentLoaded"in ge?ge.PercentLoaded():null},this.beginDelayedInit=function(){Ie=!0,S(),setTimeout((function(){return!Te&&(x(),M(),Te=!0,!0)}),20),v()},this.destruct=function(){me._wD(ye+".destruct()"),me.disable(!0)},n=function(e){var t,n,o,i,r,s,u,h,p,m,A=this,g=!1,y=[],v=0,b=null;p={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=f(e),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,m=!this.url,this.id3={},this._debug=function(){me._wD(A.id+": Merged options:",A.options)},this.load=function(e){var t;if(e!==a?A._iO=f(e,A.options):(e=A.options,A._iO=e,b&&b!==A.url&&(d("manURL"),A._iO.url=A.url,A.url=null)),A._iO.url||(A._iO.url=A.url),A._iO.url=G(A._iO.url),A.instanceOptions=A._iO,t=A._iO,me._wD(A.id+": load ("+t.url+")"),!t.url&&!A.url)return me._wD(A.id+": load(): url is unassigned. Exiting.",2),A;if(A.isHTML5||8!==l||A.url||t.autoPlay||me._wD(A.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),t.url===A.url&&0!==A.readyState&&2!==A.readyState)return d("onURL",1),3===A.readyState&&t.onload&&fe(A,(function(){t.onload.apply(A,[!!A.duration])})),A;if(A.loaded=!1,A.readyState=1,A.playState=0,A.id3={},J(t))A._setup_html5(t)._called_load?me._wD(A.id+": Ignoring request to load again"):(A._html5_canplay=!1,A.url!==t.url&&(me._wD(d("manURL")+": "+t.url),A._a.src=t.url,A.setPosition(0)),A._a.autobuffer="auto",A._a.preload="auto",A._a._called_load=!0);else{if(me.html5Only)return me._wD(A.id+": No flash support. Exiting."),A;if(A._iO.url&&A._iO.url.match(/data:/i))return me._wD(A.id+": data: URIs not supported via Flash. Exiting."),A;try{A.isHTML5=!1,A._iO=Q(j(t)),A._iO.autoPlay&&(A._iO.position||A._iO.from)&&(me._wD(A.id+": Disabling autoPlay because of non-zero offset case"),A._iO.autoPlay=!1),t=A._iO,8===l?ge._load(A.id,t.url,t.stream,t.autoPlay,t.usePolicyFile):ge._load(A.id,t.url,!!t.stream,!!t.autoPlay,t.loops||1,!!t.autoLoad,t.usePolicyFile)}catch(e){d("smError",2),c("onload",!1),R({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return A.url=t.url,A},this.unload=function(){return 0!==A.readyState&&(me._wD(A.id+": unload()"),A.isHTML5?(i(),A._a&&(A._a.pause(),b=ne(A._a))):8===l?ge._unload(A.id,ot):ge._unload(A.id),t()),A},this.destruct=function(e){me._wD(A.id+": Destruct"),A.isHTML5?(i(),A._a&&(A._a.pause(),ne(A._a),He||o(),A._a._s=null,A._a=null)):(A._iO.onfailure=null,ge._destroySound(A.id)),e||me.destroySound(A.id,!0)},this.play=function(e,t){var n,o,i,u,c,d,p=!0;if(n=A.id+": play(): ",t=t===a||t,e||(e={}),A.url&&(A._iO.url=A.url),A._iO=f(A._iO,A.options),A._iO=f(e,A._iO),A._iO.url=G(A._iO.url),A.instanceOptions=A._iO,!A.isHTML5&&A._iO.serverURL&&!A.connected)return A.getAutoPlay()||(me._wD(n+" Netstream not connected yet - setting autoPlay"),A.setAutoPlay(!0)),A;if(J(A._iO)&&(A._setup_html5(A._iO),r()),1===A.playState&&!A.paused){if(!A._iO.multiShot)return me._wD(n+"Already playing (one-shot)",1),A.isHTML5&&A.setPosition(A._iO.position),A;me._wD(n+"Already playing (multi-shot)",1)}if(e.url&&e.url!==A.url&&(A.readyState||A.isHTML5||8!==l||!m?A.load(A._iO):m=!1),A.loaded)me._wD(n.substr(0,n.lastIndexOf(":")));else if(0===A.readyState){if(me._wD(n+"Attempting to load"),A.isHTML5||me.html5Only){if(!A.isHTML5)return me._wD(n+"Unsupported type. Exiting."),A;A.load(A._iO)}else A._iO.autoPlay=!0,A.load(A._iO);A.instanceOptions=A._iO}else{if(2===A.readyState)return me._wD(n+"Could not load - exiting",2),A;me._wD(n+"Loading - attempting to play...")}return!A.isHTML5&&9===l&&A.position>0&&A.position===A.duration&&(me._wD(n+"Sound at end, resetting to position: 0"),e.position=0),A.paused&&A.position>=0&&(!A._iO.serverURL||A.position>0)?(me._wD(n+"Resuming from paused state",1),A.resume()):(A._iO=f(e,A._iO),(!A.isHTML5&&null!==A._iO.position&&A._iO.position>0||null!==A._iO.from&&A._iO.from>0||null!==A._iO.to)&&0===A.instanceCount&&0===A.playState&&!A._iO.serverURL&&(i=function(){A._iO=f(e,A._iO),A.play(A._iO)},A.isHTML5&&!A._html5_canplay?(me._wD(n+"Beginning load for non-zero offset case"),A.load({_oncanplay:i})):A.isHTML5||A.loaded||A.readyState&&2===A.readyState||(me._wD(n+"Preloading for non-zero offset case"),A.load({onload:i})),A._iO=h()),(!A.instanceCount||A._iO.multiShotEvents||A.isHTML5&&A._iO.multiShot&&!He||!A.isHTML5&&l>8&&!A.getAutoPlay())&&A.instanceCount++,A._iO.onposition&&0===A.playState&&s(A),A.playState=1,A.paused=!1,A.position=A._iO.position===a||isNaN(A._iO.position)?0:A._iO.position,A.isHTML5||(A._iO=Q(j(A._iO))),A._iO.onplay&&t&&(A._iO.onplay.apply(A),g=!0),A.setVolume(A._iO.volume,!0),A.setPan(A._iO.pan,!0),1!==A._iO.playbackRate&&A.setPlaybackRate(A._iO.playbackRate),A.isHTML5?A.instanceCount<2?(r(),o=A._setup_html5(),A.setPosition(A._iO.position),o.play()):(me._wD(A.id+": Cloning Audio() for instance #"+A.instanceCount+"..."),u=new Audio(A._iO.url),c=function(){ae.remove(u,"ended",c),A._onfinish(A),ne(u),u=null},d=function(){ae.remove(u,"canplay",d);try{u.currentTime=A._iO.position/Qe}catch(e){N(A.id+": multiShot play() failed to apply position of "+A._iO.position/Qe)}u.play()},ae.add(u,"ended",c),A._iO.volume!==a&&(u.volume=Math.max(0,Math.min(1,A._iO.volume/100))),A.muted&&(u.muted=!0),A._iO.position?ae.add(u,"canplay",d):u.play()):(p=ge._start(A.id,A._iO.loops||1,9===l?A.position:A.position/Qe,A._iO.multiShot||!1),9!==l||p||(me._wD(n+"No sound hardware, or 32-sound ceiling hit",2),A._iO.onplayerror&&A._iO.onplayerror.apply(A)))),A},this.start=this.play,this.stop=function(e){var t,n=A._iO;return 1===A.playState&&(me._wD(A.id+": stop()"),A._onbufferchange(0),A._resetOnPosition(0),A.paused=!1,A.isHTML5||(A.playState=0),u(),n.to&&A.clearOnPosition(n.to),A.isHTML5?A._a&&(t=A.position,A.setPosition(0),A.position=t,A._a.pause(),A.playState=0,A._onTimer(),i()):(ge._stop(A.id,e),n.serverURL&&A.unload()),A.instanceCount=0,A._iO={},n.onstop&&n.onstop.apply(A)),A},this.setAutoPlay=function(e){me._wD(A.id+": Autoplay turned "+(e?"on":"off")),A._iO.autoPlay=e,A.isHTML5||(ge._setAutoPlay(A.id,e),e&&(A.instanceCount||1!==A.readyState||(A.instanceCount++,me._wD(A.id+": Incremented instance count to "+A.instanceCount))))},this.getAutoPlay=function(){return A._iO.autoPlay},this.setPlaybackRate=function(e){var t=Math.max(.5,Math.min(4,e));if(t!==e&&me._wD(A.id+": setPlaybackRate("+e+"): limiting rate to "+t,2),A.isHTML5)try{A._iO.playbackRate=t,A._a.playbackRate=t}catch(e){me._wD(A.id+": setPlaybackRate("+t+") failed: "+e.message,2)}return A},this.setPosition=function(e){e===a&&(e=0);var t,n,o=A.isHTML5?Math.max(e,0):Math.min(A.duration||A._iO.duration,Math.max(e,0));if(A.position=o,n=A.position/Qe,A._resetOnPosition(A.position),A._iO.position=o,A.isHTML5){if(A._a){if(A._html5_canplay){if(A._a.currentTime.toFixed(3)!==n.toFixed(3)){me._wD(A.id+": setPosition("+n+")");try{A._a.currentTime=n,(0===A.playState||A.paused)&&A._a.pause()}catch(e){me._wD(A.id+": setPosition("+n+") failed: "+e.message,2)}}}else if(n)return me._wD(A.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),A;A.paused&&A._onTimer(!0)}}else t=9===l?A.position:n,A.readyState&&2!==A.readyState&&ge._setPosition(A.id,t,A.paused||!A.playState,A._iO.multiShot);return A},this.pause=function(e){return A.paused||0===A.playState&&1!==A.readyState||(me._wD(A.id+": pause()"),A.paused=!0,A.isHTML5?(A._setup_html5().pause(),i()):(e||e===a)&&ge._pause(A.id,A._iO.multiShot),A._iO.onpause&&A._iO.onpause.apply(A)),A},this.resume=function(){var e=A._iO;return A.paused?(me._wD(A.id+": resume()"),A.paused=!1,A.playState=1,A.isHTML5?(A._setup_html5().play(),r()):(e.isMovieStar&&!e.serverURL&&A.setPosition(A.position),ge._pause(A.id,e.multiShot)),!g&&e.onplay?(e.onplay.apply(A),g=!0):e.onresume&&e.onresume.apply(A),A):A},this.togglePause=function(){return me._wD(A.id+": togglePause()"),0===A.playState?(A.play({position:9!==l||A.isHTML5?A.position/Qe:A.position}),A):(A.paused?A.resume():A.pause(),A)},this.setPan=function(e,t){return e===a&&(e=0),t===a&&(t=!1),A.isHTML5||ge._setPan(A.id,e),A._iO.pan=e,t||(A.pan=e,A.options.pan=e),A},this.setVolume=function(e,t){return e===a&&(e=100),t===a&&(t=!1),A.isHTML5?A._a&&(me.muted&&!A.muted&&(A.muted=!0,A._a.muted=!0),A._a.volume=Math.max(0,Math.min(1,e/100))):ge._setVolume(A.id,me.muted&&!A.muted||A.muted?0:e),A._iO.volume=e,t||(A.volume=e,A.options.volume=e),A},this.mute=function(){return A.muted=!0,A.isHTML5?A._a&&(A._a.muted=!0):ge._setVolume(A.id,0),A},this.unmute=function(){A.muted=!1;var e=A._iO.volume!==a;return A.isHTML5?A._a&&(A._a.muted=!1):ge._setVolume(A.id,e?A._iO.volume:A.options.volume),A},this.toggleMute=function(){return A.muted?A.unmute():A.mute()},this.onPosition=function(e,t,n){return y.push({position:parseInt(e,10),method:t,scope:n!==a?n:A,fired:!1}),A},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),!isNaN(e))for(n=0;n<y.length;n++)e===y[n].position&&(t&&t!==y[n].method||(y[n].fired&&v--,y.splice(n,1)))},this._processOnPosition=function(){var e,t,n=y.length;if(!n||!A.playState||v>=n)return!1;for(e=n-1;e>=0;e--)!(t=y[e]).fired&&A.position>=t.position&&(t.fired=!0,v++,t.method.apply(t.scope,[t.position]),n=y.length);return!0},this._resetOnPosition=function(e){var t,n,o=y.length;if(!o)return!1;for(t=o-1;t>=0;t--)(n=y[t]).fired&&e<=n.position&&(n.fired=!1,v--);return!0},h=function(){var e,t,n=A._iO,o=n.from,i=n.to;return t=function(){me._wD(A.id+': "To" time of '+i+" reached."),A.clearOnPosition(i,t),A.stop()},e=function(){me._wD(A.id+': Playing "from" '+o),null===i||isNaN(i)||A.onPosition(i,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},s=function(){var e,t=A._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&A.onPosition(parseInt(e,10),t[e])},u=function(){var e,t=A._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&A.clearOnPosition(parseInt(e,10))},r=function(){A.isHTML5&&z(A)},i=function(){A.isHTML5&&K(A)},(t=function(e){e||(y=[],v=0),g=!1,A._hasTimer=null,A._a=null,A._html5_canplay=!1,A.bytesLoaded=null,A.bytesTotal=null,A.duration=A._iO&&A._iO.duration?A._iO.duration:null,A.durationEstimate=null,A.buffered=[],A.eqData=[],A.eqData.left=[],A.eqData.right=[],A.failures=0,A.isBuffering=!1,A.instanceOptions={},A.instanceCount=0,A.loaded=!1,A.metadata={},A.readyState=0,A.muted=!1,A.paused=!1,A.peakData={left:0,right:0},A.waveformData={left:[],right:[]},A.playState=0,A.position=null,A.id3={}})(),this._onTimer=function(e){var t,n,o=!1,i={};return(A._hasTimer||e)&&A._a&&(e||(A.playState>0||1===A.readyState)&&!A.paused)&&((t=A._get_html5_duration())!==p.duration&&(p.duration=t,A.duration=t,o=!0),A.durationEstimate=A.duration,(n=A._a.currentTime*Qe||0)!==p.time&&(p.time=n,o=!0),(o||e)&&A._whileplaying(n,i,i,i,i)),o},this._get_html5_duration=function(){var e=A._iO,t=A._a&&A._a.duration?A._a.duration*Qe:e&&e.duration?e.duration:null;return t&&!isNaN(t)&&t!==1/0?t:null},this._apply_loop=function(e,t){!e.loop&&t>1&&me._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var o,i=f(A._iO,e),a=He?Ae:A._a,r=decodeURI(i.url);if(He?r===decodeURI(re)&&(o=!0):r===decodeURI(b)&&(o=!0),a){if(a._s)if(He)a._s&&a._s.playState&&!o&&a._s.stop();else if(!He&&r===decodeURI(b))return A._apply_loop(a,i.loops),a;o||(b&&t(!1),a.src=i.url,A.url=i.url,b=i.url,re=i.url,a._called_load=!1)}else i.autoLoad||i.autoPlay?(A._a=new Audio(i.url),A._a.load()):A._a=Ge&&opera.version()<10?new Audio(null):new Audio,(a=A._a)._called_load=!1,He&&(Ae=a);return A.isHTML5=!0,A._a=a,a._s=A,n(),A._apply_loop(a,i.loops),i.autoLoad||i.autoPlay?A.load():(a.autobuffer=!1,a.preload="auto"),a},n=function(){if(A._a._added_events)return!1;var e,t,n;for(e in A._a._added_events=!0,ce)ce.hasOwnProperty(e)&&(t=e,n=ce[e],void 0,A._a&&A._a.addEventListener(t,n,!1));return!0},o=function(){var e,t,n;for(e in me._wD(A.id+": Removing event listeners"),A._a._added_events=!1,ce)ce.hasOwnProperty(e)&&(t=e,n=ce[e],void 0,A._a&&A._a.removeEventListener(t,n,!1))},this._onload=function(e){var t,n=!!e||!A.isHTML5&&8===l&&A.duration;return t=A.id+": ",me._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(A.duration?" -":" Zero-length duration reported.")+" ("+A.url+")"),n?1:2),n||A.isHTML5||(!0===me.sandbox.noRemote&&me._wD(t+C("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+C("noLocal"),1)),A.loaded=n,A.readyState=n?3:2,A._onbufferchange(0),n||A.isHTML5||A._onerror(),A._iO.onload&&fe(A,(function(){A._iO.onload.apply(A,[n])})),!0},this._onerror=function(e,t){A._iO.onerror&&fe(A,(function(){A._iO.onerror.apply(A,[e,t])}))},this._onbufferchange=function(e){return!(0===A.playState||e&&A.isBuffering||!e&&!A.isBuffering||(A.isBuffering=1===e,A._iO.onbufferchange&&(me._wD(A.id+": Buffer state change: "+e),A._iO.onbufferchange.apply(A,[e])),0))},this._onsuspend=function(){return A._iO.onsuspend&&(me._wD(A.id+": Playback suspended"),A._iO.onsuspend.apply(A)),!0},this._onfailure=function(e,t,n){A.failures++,me._wD(A.id+": Failure ("+A.failures+"): "+e),A._iO.onfailure&&1===A.failures?A._iO.onfailure(e,t,n):me._wD(A.id+": Ignoring failure")},this._onwarning=function(e,t,n){A._iO.onwarning&&A._iO.onwarning(e,t,n)},this._onfinish=function(){var e=A._iO.onfinish;A._onbufferchange(0),A._resetOnPosition(0),A.instanceCount&&(A.instanceCount--,A.instanceCount||(u(),A.playState=0,A.paused=!1,A.instanceCount=0,A.instanceOptions={},A._iO={},i(),A.isHTML5&&(A.position=0)),A.instanceCount&&!A._iO.multiShotEvents||e&&(me._wD(A.id+": onfinish()"),fe(A,(function(){e.apply(A)}))))},this._whileloading=function(e,t,n,o){var i=A._iO;A.bytesLoaded=e,A.bytesTotal=t,A.duration=Math.floor(n),A.bufferLength=o,A.isHTML5||i.isMovieStar?A.durationEstimate=A.duration:i.duration?A.durationEstimate=A.duration>i.duration?A.duration:i.duration:A.durationEstimate=parseInt(A.bytesTotal/A.bytesLoaded*A.duration,10),A.isHTML5||(A.buffered=[{start:0,end:A.duration}]),(3!==A.readyState||A.isHTML5)&&i.whileloading&&i.whileloading.apply(A)},this._whileplaying=function(e,t,n,o,i){var r,s=A._iO;return!isNaN(e)&&null!==e&&(A.position=Math.max(0,e),A._processOnPosition(),!A.isHTML5&&l>8&&(s.usePeakData&&t!==a&&t&&(A.peakData={left:t.leftPeak,right:t.rightPeak}),s.useWaveformData&&n!==a&&n&&(A.waveformData={left:n.split(","),right:o.split(",")}),s.useEQData&&i!==a&&i&&i.leftEQ&&(r=i.leftEQ.split(","),A.eqData=r,A.eqData.left=r,i.rightEQ!==a&&i.rightEQ&&(A.eqData.right=i.rightEQ.split(",")))),1===A.playState&&(A.isHTML5||8!==l||A.position||!A.isBuffering||A._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(A)),!0)},this._oncaptiondata=function(e){me._wD(A.id+": Caption data received."),A.captiondata=e,A._iO.oncaptiondata&&A._iO.oncaptiondata.apply(A,[e])},this._onmetadata=function(e,t){me._wD(A.id+": Metadata received.");var n,o,i={};for(n=0,o=e.length;n<o;n++)i[e[n]]=t[n];A.metadata=i,A._iO.onmetadata&&A._iO.onmetadata.call(A,A.metadata)},this._onid3=function(e,t){me._wD(A.id+": ID3 data received.");var n,o,i=[];for(n=0,o=e.length;n<o;n++)i[e[n]]=t[n];A.id3=f(A.id3,i),A._iO.onid3&&A._iO.onid3.apply(A)},this._onconnect=function(e){e=1===e,me._wD(A.id+": "+(e?"Connected.":"Failed to connect? - "+A.url),e?1:2),A.connected=e,e&&(A.failures=0,Y(A.id)&&(A.getAutoPlay()?A.play(a,A.getAutoPlay()):A._iO.autoLoad&&A.load()),A._iO.onconnect&&A._iO.onconnect.apply(A,[e]))},this._ondataerror=function(e){A.playState>0&&(me._wD(A.id+": Data error: "+e),A._iO.ondataerror&&A._iO.ondataerror.apply(A))},this._debug()},I=function(){return ke.body||ke.getElementsByTagName("div")[0]},o=function(e){return ke.getElementById(e)},f=function(e,t){var n,o,i=e||{};for(o in n=t===a?me.defaultOptions:t)n.hasOwnProperty(o)&&i[o]===a&&("object"!=typeof n[o]||null===n[o]?i[o]=n[o]:i[o]=f(i[o],n[o]));return i},fe=function(e,t){e.isHTML5||8!==l?t():i.setTimeout(t,0)},m={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(e,t){var n,o=!0,i=t!==a,r=me.setupOptions,s=m;if(e===a){for(n in o=[],r)r.hasOwnProperty(n)&&o.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof me[n]?o.push(n+": {...}"):me[n]instanceof Function?o.push(n+": function() {...}"):o.push(n));return me._wD(C("setup",o.join(", "))),!1}for(n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||e[n]instanceof Array||e[n]instanceof RegExp)i&&s[t]!==a?me[t][n]=e[n]:r[n]!==a?(me.setupOptions[n]=e[n],me[n]=e[n]):s[n]===a?(N(C(me[n]===a?"setupUndef":"setupError",n),2),o=!1):me[n]instanceof Function?me[n].apply(me,e[n]instanceof Array?e[n]:[e[n]]):me[n]=e[n];else{if(s[n]!==a)return p(e[n],n);N(C(me[n]===a?"setupUndef":"setupError",n),2),o=!1}return o},ae=function(){var e=i.attachEvent,t={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};function n(t){var n=Ue.call(t),o=n.length;return e?(n[1]="on"+n[1],o>3&&n.pop()):3===o&&n.push(!1),n}function o(n,o){var i=n.shift(),a=[t[o]];e?i[a](n[0],n[1]):i[a].apply(i,n)}return{add:function(){o(n(arguments),"add")},remove:function(){o(n(arguments),"remove")}}}(),ce={abort:ct((function(){me._wD(this._s.id+": abort")})),canplay:ct((function(){var e,t=this._s;if(!t._html5_canplay){if(t._html5_canplay=!0,me._wD(t.id+": canplay"),t._onbufferchange(0),e=t._iO.position===a||isNaN(t._iO.position)?null:t._iO.position/Qe,this.currentTime!==e){me._wD(t.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(n){me._wD(t.id+": canplay: Setting position of "+e+" failed: "+n.message,2)}}t._iO._oncanplay&&t._iO._oncanplay()}})),canplaythrough:ct((function(){var e=this._s;e.loaded||(e._onbufferchange(0),e._whileloading(e.bytesLoaded,e.bytesTotal,e._get_html5_duration()),e._onload(!0))})),durationchange:ct((function(){var e,t=this._s;e=t._get_html5_duration(),isNaN(e)||e===t.duration||(me._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)})),ended:ct((function(){var e=this._s;me._wD(e.id+": ended"),e._onfinish()})),error:ct((function(){var e=ee[this.error.code]||null;me._wD(this._s.id+": HTML5 error, code "+this.error.code+(e?" ("+e+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,e)})),loadeddata:ct((function(){var e=this._s;me._wD(e.id+": loadeddata"),e._loaded||Ze||(e.duration=e._get_html5_duration())})),loadedmetadata:ct((function(){me._wD(this._s.id+": loadedmetadata")})),loadstart:ct((function(){me._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)})),play:ct((function(){this._s._onbufferchange(0)})),playing:ct((function(){me._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)})),progress:ct((function(e){var t,n,o,i=this._s,a=0,r="progress"===e.type,s=e.target.buffered,u=e.loaded||0,l=e.total||1;if(i.buffered=[],s&&s.length){for(t=0,n=s.length;t<n;t++)i.buffered.push({start:s.start(t)*Qe,end:s.end(t)*Qe});if(a=(s.end(0)-s.start(0))*Qe,u=Math.min(1,a/(e.target.duration*Qe)),r&&s.length>1){for(o=[],n=s.length,t=0;t<n;t++)o.push(e.target.buffered.start(t)*Qe+"-"+e.target.buffered.end(t)*Qe);me._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}r&&!isNaN(u)&&me._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(i._whileloading(u,l,i._get_html5_duration()),u&&l&&u===l&&ce.canplaythrough.call(this,e))})),ratechange:ct((function(){me._wD(this._s.id+": ratechange")})),suspend:ct((function(e){var t=this._s;me._wD(this._s.id+": suspend"),ce.progress.call(this,e),t._onsuspend()})),stalled:ct((function(){me._wD(this._s.id+": stalled")})),timeupdate:ct((function(){this._s._onTimer()})),waiting:ct((function(){var e=this._s;me._wD(this._s.id+": waiting"),e._onbufferchange(1)}))},J=function(e){return!(!e||!(e.type||e.url||e.serverURL))&&!(e.serverURL||e.type&<(e.type))&&(e.type?$({type:e.type}):$({url:e.url})||me.html5Only||e.url.match(/data:/i))},ne=function(e){var t;return e&&(t=Ze?ot:me.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":ot,e.src=t,e._called_unload!==a&&(e._called_load=!1)),He&&(re=null),t},$=function(e){if(!me.useHTML5Audio||!me.hasHTML5)return!1;var t,n,o,i,r=e.url||null,s=e.type||null,u=me.audioFormats;if(s&&me.html5[s]!==a)return me.html5[s]&&!lt(s);if(!te){for(i in te=[],u)u.hasOwnProperty(i)&&(te.push(i),u[i].related&&(te=te.concat(u[i].related)));te=new RegExp("\\.("+te.join("|")+")(\\?.*)?$","i")}return(o=r?r.toLowerCase().match(te):null)&&o.length?o=o[1]:s?o=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):t=!1,o&&me.html5[o]!==a?t=me.html5[o]&&!lt(o):(s="audio/"+o,t=me.html5.canPlayType({type:s}),me.html5[o]=t,t=t&&me.html5[s]&&!lt(s)),t},ie=function(){if(!me.useHTML5Audio||!me.hasHTML5)return me.html5.usingFlash=!0,Be=!0,!1;var e,t,n,o,i=Audio!==a?Ge&&opera.version()<10?new Audio(null):new Audio:null,r={};function s(e){var t,n,a=!1,r=!1;if(!i||"function"!=typeof i.canPlayType)return a;if(e instanceof Array){for(o=0,n=e.length;o<n;o++)(me.html5[e[o]]||i.canPlayType(e[o]).match(me.html5Test))&&(r=!0,me.html5[e[o]]=!0,me.flash[e[o]]=!!e[o].match(nt));a=r}else a=!(!(t=!(!i||"function"!=typeof i.canPlayType)&&i.canPlayType(e))||!t.match(me.html5Test));return a}for(e in n=me.audioFormats)if(n.hasOwnProperty(e)&&(t="audio/"+e,r[e]=s(n[e].type),r[t]=r[e],e.match(nt)?(me.flash[e]=!0,me.flash[t]=!0):(me.flash[e]=!1,me.flash[t]=!1),n[e]&&n[e].related))for(o=n[e].related.length-1;o>=0;o--)r["audio/"+n[e].related[o]]=r[e],me.html5[n[e].related[o]]=r[e],me.flash[n[e].related[o]]=r[e];return r.canPlayType=i?s:null,me.html5=f(me.html5,r),me.html5.usingFlash=X(),Be=me.html5.usingFlash,!0},_={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ye+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:ve+"Verify that %s is a valid path.",tryDebug:"Try "+ye+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:ve+"Non-HTTP page ("+ke.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:ve+"Special case: Waiting for SWF to load with window focus...",waitForever:ve+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:ve+"Waiting for 100% SWF load...",needFunction:ve+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:ve+"_debug(): Current sound objects",waitOnload:ve+"Waiting for window.onload()",docLoaded:ve+"Document already loaded",onload:ve+"initComplete(): calling soundManager.onload()",onloadOK:ye+".onload() complete",didInit:ve+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:ve+"Failed to remove Flash node.",shutdown:ye+".disable(): Shutting down",queue:ve+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+U.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:ve+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ye+".load(): current URL already assigned.",badFV:ye+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:ve+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:ve+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ye+".setup(): allowed parameters: %s",setupError:ye+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ye+'.setup(): Could not find option "%s"',setupLate:ye+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:ve+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ye+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},C=function(){var e,t,n,o,i;if(o=(e=Ue.call(arguments)).shift(),(i=_&&_[o]?_[o]:"")&&e&&e.length)for(t=0,n=e.length;t<n;t++)i=i.replace("%s",e[t]);return i},j=function(e){return 8===l&&e.loops>1&&e.stream&&(d("as2loop"),e.stream=!1),e},Q=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(me._wD((t||"")+C("policy")),e.usePolicyFile=!0),e},N=function(e){Je&&console.warn!==a?console.warn(e):me._wD(e)},r=function(){return!1},q=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=r);t=null},T=function(e){e===a&&(e=!1),(Pe||e)&&me.disable(e)},D=function(e){var t;if(e)if(e.match(/\.swf(\?.*)?$/i)){if(e.substr(e.toLowerCase().lastIndexOf(".swf?")+4))return e}else e.lastIndexOf("/")!==e.length-1&&(e+="/");return t=(e&&-1!==e.lastIndexOf("/")?e.substr(0,e.lastIndexOf("/")+1):"./")+me.movieURL,me.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},k=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(C("badFV",l,8)),me.flashVersion=l=8);var e=me.debugMode||me.debugFlash?"_debug.swf":".swf";me.useHTML5Audio&&!me.html5Only&&me.audioFormats.mp4.required&&l<9&&(me._wD(C("needfl9")),me.flashVersion=l=9),me.version=me.versionNumber+(me.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(me.defaultOptions=f(me.defaultOptions,me.flash9Options),me.features.buffering=!0,me.defaultOptions=f(me.defaultOptions,me.movieStarOptions),me.filePatterns.flash9=new RegExp("\\.(mp3|"+st.join("|")+")(\\?.*)?$","i"),me.features.movieStar=!0):me.features.movieStar=!1,me.filePattern=me.filePatterns[8!==l?"flash9":"flash8"],me.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),me.features.peakData=me.features.waveformData=me.features.eqData=l>8},E=function(e,t){ge&&ge._setPolling(e,t)},L=function(){if(me.debugURLParam.test(we)&&(me.setupOptions.debugMode=me.debugMode=!0),!o(me.debugID)){var e,t,n,i,a;if(me.debugMode&&!o(me.debugID)&&(!Je||!me.useConsole||!me.consoleOnly)){for(a in(e=ke.createElement("div")).id=me.debugID+"-toggle",i={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},e.appendChild(ke.createTextNode("-")),e.onclick=H,e.title="Toggle SM2 debug console",be.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand"),i)i.hasOwnProperty(a)&&(e.style[a]=i[a]);if((t=ke.createElement("div")).id=me.debugID,t.style.display=me.debugMode?"block":"none",me.debugMode&&!o(e.id)){try{(n=I()).appendChild(e)}catch(e){throw new Error(C("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Y=this.getSoundById,d=function(e,t){return e?me._wD(C(e),t):""},H=function(){var e=o(me.debugID),t=o(me.debugID+"-toggle");e&&(_e?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),_e=!_e)},c=function(e,t,n){if(i.sm2Debugger!==a)try{sm2Debugger.handleEvent(e,t,n)}catch(e){return!1}return!0},B=function(){var e=[];return me.debugMode&&e.push(U.sm2Debug),me.debugFlash&&e.push(U.flashDebug),me.useHighPerformance&&e.push(U.highPerf),e.join(" ")},F=function(){var e=C("fbHandler"),t=me.getMoviePercent(),n=U,o={type:"FLASHBLOCK"};me.html5Only||(me.ok()?(me.didFlashBlock&&me._wD(e+": Unblocked"),me.oMC&&(me.oMC.className=[B(),n.swfDefault,n.swfLoaded+(me.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Be&&(me.oMC.className=B()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),me._wD(e+": "+C("fbTimeout")+(t?" ("+C("fbLoaded")+")":""))),me.didFlashBlock=!0,g({type:"ontimeout",ignoreInit:!0,error:o}),R(o)))},A=function(e,t,n){Ve[e]===a&&(Ve[e]=[]),Ve[e].push({method:t,scope:n||null,fired:!1})},g=function(e){if(e||(e={type:me.ok()?"onready":"ontimeout"}),!Oe&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(me.ok()||Pe&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?me.ok():!Pe},i=e&&e.type&&Ve[e.type]||[],a=[],r=[o],s=Be&&!me.ok();for(e.error&&(r[0].error=e.error),t=0,n=i.length;t<n;t++)!0!==i[t].fired&&a.push(i[t]);if(a.length)for(t=0,n=a.length;t<n;t++)a[t].scope?a[t].method.apply(a[t].scope,r):a[t].method.apply(this,r),s||(a[t].fired=!0);return!0},y=function(){i.setTimeout((function(){me.useFlashBlock&&F(),g(),"function"==typeof me.onload&&(d("onload",1),me.onload.apply(i),d("onloadOK",1)),me.waitForWindowLoad&&ae.add(i,"load",y)}),1)},ue=function(){if(se!==a)return se;var e,t,n,o,r=!1,s=navigator,u=i.ActiveXObject;try{o=s.plugins}catch(e){o=void 0}if(o&&o.length)t="application/x-shockwave-flash",(n=s.mimeTypes)&&n[t]&&n[t].enabledPlugin&&n[t].enabledPlugin.description&&(r=!0);else if(u!==a&&!be.match(/MSAppHost/i)){try{e=new u("ShockwaveFlash.ShockwaveFlash")}catch(t){e=null}r=!!e,e=null}return se=r,r},X=function(){var e,t,n=me.audioFormats;if(Ne&&be.match(/os (1|2|3_0|3_1)\s/i)?(me.hasHTML5=!1,me.html5Only=!0,me.oMC&&(me.oMC.style.display="none")):me.useHTML5Audio&&(me.html5&&me.html5.canPlayType||(me._wD("SoundManager: No HTML5 Audio() support detected."),me.hasHTML5=!1),Xe&&me._wD(ve+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(se?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),me.useHTML5Audio&&me.hasHTML5)for(t in W=!0,n)n.hasOwnProperty(t)&&n[t].required&&(me.html5.canPlayType(n[t].type)?me.preferFlash&&(me.flash[t]||me.flash[n[t].type])&&(e=!0):(W=!1,e=!0));return me.ignoreFlash&&(e=!1,W=!0),me.html5Only=me.hasHTML5&&me.useHTML5Audio&&!e,!me.html5Only},G=function(e){var t,n,o,i=0;if(e instanceof Array){for(t=0,n=e.length;t<n;t++)if(e[t]instanceof Object){if(me.canPlayMIME(e[t].type)){i=t;break}}else if(me.canPlayURL(e[t])){i=t;break}e[i].url&&(e[i]=e[i].url),o=e[i]}else o=e;return o},z=function(e){e._hasTimer||(e._hasTimer=!0,!We&&me.html5PollingInterval&&(null===Ce&&0===De&&(Ce=setInterval(Z,me.html5PollingInterval)),De++))},K=function(e){e._hasTimer&&(e._hasTimer=!1,!We&&me.html5PollingInterval&&De--)},Z=function(){var e;if(null!==Ce&&!De)return clearInterval(Ce),void(Ce=null);for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].isHTML5&&me.sounds[me.soundIDs[e]]._hasTimer&&me.sounds[me.soundIDs[e]]._onTimer()},R=function(e){e=e!==a?e:{},"function"==typeof me.onerror&&me.onerror.apply(i,[{type:e.type!==a?e.type:null}]),e.fatal!==a&&e.fatal&&me.disable()},le=function(){if(Xe&&ue()){var e,t,n=me.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(me._wD(ye+": Using flash fallback for "+t+" format"),me.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)me.html5[n[t].related[e]]=!1}},this._setSandboxType=function(e){var t=me.sandbox;t.type=e,t.description=t.types[t.types[e]!==a?e:"unknown"],"localWithFile"===t.type?(t.noRemote=!0,t.noLocal=!1,d("secNote",2)):"localWithNetwork"===t.type?(t.noRemote=!1,t.noLocal=!0):"localTrusted"===t.type&&(t.noRemote=!1,t.noLocal=!1)},this._externalInterfaceOK=function(e){if(!me.swfLoaded){var t;if(c("swf",!0),c("flashtojs",!0),me.swfLoaded=!0,et=!1,Xe&&le(),!e||e.replace(/\+dev/i,"")!==me.versionNumber.replace(/\+dev/i,""))return t=ye+': Fatal: JavaScript file build "'+me.versionNumber+'" does not match Flash SWF build "'+e+'" at '+me.url+". Ensure both are up-to-date.",void setTimeout((function(){throw new Error(t)}),0);setTimeout(u,ze?100:1)}},x=function(e,t){if(Me&&Se)return!1;function n(){var e,t=[],n=[];e="SoundManager "+me.version+(!me.html5Only&&me.useHTML5Audio?me.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),me.html5Only?me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"):(me.preferFlash&&t.push("preferFlash"),me.useHighPerformance&&t.push("useHighPerformance"),me.flashPollingInterval&&t.push("flashPollingInterval ("+me.flashPollingInterval+"ms)"),me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"),me.wmode&&t.push("wmode ("+me.wmode+")"),me.debugFlash&&t.push("debugFlash"),me.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(" + ")])),me._wD(e+(n.length?" + "+n.join(", "):""),1),de()}if(me.html5Only)return k(),n(),me.oMC=o(me.movieID),u(),Me=!0,Se=!0,!1;var i,r,s,l,c,d,h,f,p,m=t||me.url,A=me.altURL||m,g=I(),y=B(),v=ke.getElementsByTagName("html")[0];function b(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(i=v&&v.dir&&v.dir.match(/rtl/i),e=e===a?me.id:e,k(),me.url=D(it?m:A),t=me.url,me.wmode=!me.wmode&&me.useHighPerformance?"transparent":me.wmode,null!==me.wmode&&(be.match(/msie 8/i)||!ze&&!me.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Fe.push(_.spcWmode),me.wmode=null),r={name:e,id:e,src:t,quality:"high",allowScriptAccess:me.allowScriptAccess,bgcolor:me.bgColor,pluginspage:at+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:me.wmode,hasPriority:"true"},me.debugFlash&&(r.FlashVars="debug=1"),me.wmode||delete r.wmode,ze)s=ke.createElement("div"),c=['<object id="'+e+'" data="'+t+'" type="'+r.type+'" title="'+r.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",t),b("AllowScriptAccess",me.allowScriptAccess),b("quality",r.quality),me.wmode?b("wmode",me.wmode):"",b("bgcolor",me.bgColor),b("hasPriority","true"),me.debugFlash?b("FlashVars",r.FlashVars):"","</object>"].join("");else for(l in s=ke.createElement("embed"),r)r.hasOwnProperty(l)&&s.setAttribute(l,r[l]);if(L(),y=B(),g=I())if(me.oMC=o(me.movieID)||ke.createElement("div"),me.oMC.id)p=me.oMC.className,me.oMC.className=(p?p+" ":U.swfDefault)+(y?" "+y:""),me.oMC.appendChild(s),ze&&((d=me.oMC.appendChild(ke.createElement("div"))).className=U.swfBox,d.innerHTML=c),Se=!0;else{if(me.oMC.id=me.movieID,me.oMC.className=U.swfDefault+" "+y,h=null,d=null,me.useFlashBlock||(me.useHighPerformance?h={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(h={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},i&&(h.left=Math.abs(parseInt(h.left,10))+"px"))),Ke&&(me.oMC.style.zIndex=1e4),!me.debugFlash)for(f in h)h.hasOwnProperty(f)&&(me.oMC.style[f]=h[f]);try{ze||me.oMC.appendChild(s),g.appendChild(me.oMC),ze&&((d=me.oMC.appendChild(ke.createElement("div"))).className=U.swfBox,d.innerHTML=c),Se=!0}catch(e){throw new Error(C("domError")+" \n"+e.toString())}}return Me=!0,n(),!0},M=function(){return me.html5Only?(x(),!1):!ge&&(me.url?((ge=me.getMovie(me.id))||(Ee?(ze?me.oMC.innerHTML=Le:me.oMC.appendChild(Ee),Ee=null,Me=!0):x(me.id,me.url),ge=me.getMovie(me.id)),"function"==typeof me.oninitmovie&&setTimeout(me.oninitmovie,1),he(),!0):(d("noURL"),!1))},v=function(){setTimeout(b,1e3)},w=function(){i.setTimeout((function(){N(ve+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),me.setup({preferFlash:!1}).reboot(),me.didFlashBlock=!0,me.beginDelayedInit()}),1)},b=function(){var e,t=!1;me.url&&(qe||(qe=!0,ae.remove(i,"load",v),se&&et&&!$e?d("waitFocus"):(Oe||(e=me.getMoviePercent())>0&&e<100&&(t=!0),setTimeout((function(){if(e=me.getMoviePercent(),t)return qe=!1,me._wD(C("waitSWF")),void i.setTimeout(v,1);Oe||(me._wD(ye+": No Flash response within expected time. Likely causes: "+(0===e?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(me.debugFlash?" "+C("checkSWF"):""),2),!it&&e&&(d("localFail",2),me.debugFlash||d("tryDebug",2)),0===e&&me._wD(C("swf404",me.url),1),c("flashtojs",!1,": Timed out"+(it?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Oe&&tt&&(null===e?me.useFlashBlock||0===me.flashLoadTimeout?(me.useFlashBlock&&F(),d("waitForever")):!me.useFlashBlock&&W?w():(d("waitForever"),g({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===me.flashLoadTimeout?d("waitForever"):!me.useFlashBlock&&W?w():T(!0))}),me.flashLoadTimeout))))},V=function(){function e(){ae.remove(i,"focus",V)}return $e||!et?(e(),!0):(tt=!0,$e=!0,d("gotFocus"),qe=!1,v(),e(),!0)},he=function(){Fe.length&&(me._wD("SoundManager 2: "+Fe.join(" "),1),Fe=[])},de=function(){he();var e,t=[];if(me.useHTML5Audio&&me.hasHTML5){for(e in me.audioFormats)me.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+me.html5[e]+(!me.html5[e]&&Be&&me.flash[e]?" (using flash)":me.preferFlash&&me.flash[e]&&Be?" (preferring flash)":me.html5[e]?"":" ("+(me.audioFormats[e].required?"required, ":"")+"and no flash support)"));me._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},h=function(e){if(Oe)return!1;if(me.html5Only)return d("sm2Loaded",1),Oe=!0,y(),c("onload",!0),!0;var t,n=!0;return me.useFlashBlock&&me.flashLoadTimeout&&!me.getMoviePercent()||(Oe=!0),t={type:!se&&Be?"NO_FLASH":"INIT_TIMEOUT"},me._wD("SoundManager 2 "+(Pe?"failed to load":"loaded")+" ("+(Pe?"Flash security/load error":"OK")+") "+String.fromCharCode(Pe?10006:10003),Pe?2:1),Pe||e?(me.useFlashBlock&&me.oMC&&(me.oMC.className=B()+" "+(null===me.getMoviePercent()?U.swfTimedout:U.swfError)),g({type:"ontimeout",error:t,ignoreInit:!0}),c("onload",!1),R(t),n=!1):c("onload",!0),Pe||(me.waitForWindowLoad&&!Ie?(d("waitOnload"),ae.add(i,"load",y)):(me.waitForWindowLoad&&Ie&&d("docLoaded"),y())),n},s=function(){var e,t=me.setupOptions;for(e in t)t.hasOwnProperty(e)&&(me[e]===a?me[e]=t[e]:me[e]!==t[e]&&(me.setupOptions[e]=me[e]))},u=function(){if(Oe)return d("didInit"),!1;function e(){ae.remove(i,"load",me.beginDelayedInit)}if(me.html5Only)return Oe||(e(),me.enabled=!0,h()),!0;M();try{ge._externalInterfaceTest(!1),E(!0,me.flashPollingInterval||(me.useHighPerformance?10:50)),me.debugMode||ge._disableDebug(),me.enabled=!0,c("jstoflash",!0),me.html5Only||ae.add(i,"unload",r)}catch(e){return me._wD("js/flash exception: "+e.toString()),c("jstoflash",!1),R({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),T(!0),h(),!1}return h(),e(),!0},S=function(){return!P&&(P=!0,s(),L(),!se&&me.hasHTML5&&(me._wD("SoundManager 2: No Flash detected"+(me.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),me.setup({useHTML5Audio:!0,preferFlash:!1})),ie(),!se&&Be&&(Fe.push(_.needFlash),me.setup({flashLoadTimeout:1})),ke.removeEventListener&&ke.removeEventListener("DOMContentLoaded",S,!1),M(),!0)},oe=function(){return"complete"===ke.readyState&&(S(),ke.detachEvent("onreadystatechange",oe)),!0},O=function(){Ie=!0,S(),ae.remove(i,"load",O)},ue(),ae.add(i,"focus",V),ae.add(i,"load",v),ae.add(i,"load",O),ke.addEventListener?ke.addEventListener("DOMContentLoaded",S,!1):ke.attachEvent?ke.attachEvent("onreadystatechange",oe):(c("onload",!1),R({type:"NO_DOM2_EVENTS",fatal:!0}))}i.SM2_DEFER!==a&&SM2_DEFER||(r=new s),e&&"object"==typeof e.exports?(e.exports.SoundManager=s,e.exports.soundManager=r):void 0===(o=function(){return{constructor:s,getInstance:function(e){if(!i.soundManager&&e instanceof Function){var t=e(s);t instanceof s&&(i.soundManager=t)}return i.soundManager}}}.call(t,n,t,e))||(e.exports=o),i.SoundManager=s,i.soundManager=r}(window)}},function(e){e(e.s=4025)}]);
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[34],{4025:function(t,e,n){"use strict";n(4916),n(1539),n(9714),n(4723),n(9826),n(2222),n(9600),n(1249),n(8309),n(2707),n(7327),n(6755),n(4678),n(9720),n(4747),n(8674),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(2443),n(3680),n(3706),n(2703),n(489),n(5069),n(7042),n(1038),n(6649),n(6078),n(9653),n(2419),n(4819),n(5003),n(5306),n(9601);var r=n(5311);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function h(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new x(o||[]);return r(a,"_invoke",{value:k(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var d={};function p(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,A=g&&g(g(L([])));A&&A!==e&&n.call(A,a)&&(m=A);var b=v.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function i(r,a,s,u){var l=f(t[r],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return i("throw",t,s,u)}))}u(l.arg)}var a;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return a=a?a.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=V(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function V(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,V(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:M}}function M(){return{value:void 0,done:!0}}return y.prototype=v,r(b,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(_.prototype),c(_.prototype,u,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(h(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function u(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}var c=function(){function t(e,n,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.leafIndex=e,this.chunkIndex=n,this.text=r,this.lineRects=o}var e,n,o,a;return e=t,null,n=[{key:"fetch",value:(o=s().mark((function e(n,o,i){var a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.ajax({type:"GET",url:"https://".concat(n,"/BookReader/BookReaderGetTextWrapper.php"),dataType:"jsonp",cache:!0,data:{path:"".concat(o,"_djvu.xml"),page:i}});case 2:return a=e.sent,e.abrupt("return",t._fromTextWrapperResponse(i,a));case 4:case"end":return e.stop()}}),e)})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){u(i,n,r,a,s,"next",t)}function s(t){u(i,n,r,a,s,"throw",t)}a(void 0)}))},function(t,e,n){return a.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(e,n){return n.map((function(n,r){var o=t._fixChunkRects(n.slice(1)),i=t._removeDanglingHyphens(n[0]);return new t(e,r,i,o)}))}},{key:"_fixChunkRects",value:function(t){if(t.length<2)return t;var e=i(t,2),n=e[0],r=e[1],o=i(n,3),a=o[0],s=o[1],u=o[2]-a,l=r[1]-r[3],c=r[2]-r[0],h=r[2];return u>30*c&&(n[2]=h,n[3]=s-l),t}},{key:"_removeDanglingHyphens",value:function(t){return t.replace(/[-¬]\s+/g,"")}}],n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new x(o||[]);return r(a,"_invoke",{value:k(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function p(){}function y(){}function v(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,A=g&&g(g(L([])));A&&A!==e&&n.call(A,i)&&(m=A);var b=v.prototype=p.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function o(r,i,a,s){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==h(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=V(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function V(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,V(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:M}}function M(){return{value:void 0,done:!0}}return y.prototype=v,r(b,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),u(b,s,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function d(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==h(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===h(o)?o:String(o)),r)}var o}var y=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pageCount=e,this.opts=Object.assign({},v,r),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}var e,n,r,o;return e=t,n=[{key:"next",value:function(){var t=this;return this._cursorLock=this._cursorLock.then((function(){return t._nextUncontrolled()}))}},{key:"decrement",value:function(){var t=this;return this._cursorLock=this._cursorLock.then((function(){return t._decrementUncontrolled()}))}},{key:"_nextUncontrolled",value:(r=f().mark((function e(){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursor.page!=this.pageCount){e.next=2;break}return e.abrupt("return",Promise.resolve(t.AT_END));case 2:return this._recenterBuffer(this._cursor.page),e.next=5,this._fetchPageChunks(this._cursor.page);case 5:if(n=e.sent,this._cursor.chunk!=n.length){e.next=10;break}return this._cursor.page++,this._cursor.chunk=0,e.abrupt("return",this._nextUncontrolled());case 10:return e.abrupt("return",n[this._cursor.chunk++]);case 11:case"end":return e.stop()}}),e,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){d(i,n,o,a,s,"next",t)}function s(t){d(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var t=this,e=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,e=this._fetchPageChunks(this._cursor.page).then((function(e){if(0==e.length)return t._decrementUncontrolled();t._cursor.chunk=e.length-1}))),e.then((function(){return t._fetchPageChunks(t._cursor.page)}))}},{key:"_recenterBuffer",value:function(t){for(var e=Math.max(0,t-this.opts.pageBufferSize),n=Math.min(this.pageCount,t+this.opts.pageBufferSize+1),r=e;r<n;r++)this._fetchPageChunks(r);this._removePageFromBuffer(e-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(t){delete this._bufferingPages[t],delete this._bufferedPages[t]}},{key:"_fetchPageChunks",value:function(t){var e=this;return t in this._bufferingPages?this._bufferingPages[t]:t in this._bufferedPages?Promise.resolve(this._bufferedPages[t]):(this._bufferingPages[t]=this._fetchPageChunksDirect(t).then((function(n){return delete e._bufferingPages[t],e._bufferedPages[t]=n,n})),this._bufferingPages[t])}},{key:"_fetchPageChunksDirect",value:function(t){return c.fetch(this.opts.server,this.opts.bookPath,t)}}],n&&p(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();y.AT_END="__PageChunkIterator.AT_END__";var v={server:null,bookPath:null,pageBufferSize:2},m=n(5311);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function b(){b=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new x(o||[]);return r(a,"_invoke",{value:k(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function p(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(L([])));m&&m!==e&&n.call(m,i)&&(y=m);var A=p.prototype=f.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function o(r,i,a,s){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==g(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=V(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function V(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,V(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:M}}function M(){return{value:void 0,done:!0}}return d.prototype=p,r(A,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},w(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(A),u(A,s,"Generator"),u(A,i,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function w(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function _(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){w(i,r,o,a,s,"next",t)}function s(t){w(i,r,o,a,s,"throw",t)}a(void 0)}))}}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,V(r.key),r)}}function V(t){var e=function(t,e){if("object"!==g(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===g(e)?e:String(e)}var O=function(){function t(e){var n,r,o,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=function(){i.voice=t.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(r=V(r="updateBestVoice"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,this.playing=!1,this.paused=!1,this.opts=e,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=m({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}var e,n,r,o,i;return e=t,n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(t,e){this.playing=!0,this.opts.onLoadingStart(),this._chunkIterator=new y(e,t,{server:this.opts.server,bookPath:this.opts.bookPath,pageBufferSize:5}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var t=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),t&&this.events.trigger("pause")}},{key:"resume",value:function(){var t=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),t&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(i=_(b().mark((function t(){var e=this;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then((function(){return e._chunkIterator.decrement()}))]);case 2:this.step();case 3:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setVoice",value:function(t){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find((function(e){return e.voiceURI===t})),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(t){this.playbackRate=t,this.activeSound&&this.activeSound.setPlaybackRate(t)}},{key:"step",value:(o=_(b().mark((function t(){var e,n,r,o=this;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._chunkIterator.next();case 2:if((e=t.sent)!=y.AT_END){t.next=7;break}return this.stop(),this.opts.onDone(),t.abrupt("return");case 7:return this.opts.onLoadingStart(),(n=this.createSound(e)).chunk=e,n.rate=this.playbackRate,n.voice=this.voice,n.load((function(){return o.opts.onLoadingComplete()})),this.opts.onLoadingComplete(),t.next=16,this.opts.beforeChunkPlay(e);case 16:if(this.playing){t.next=18;break}return t.abrupt("return");case 18:return t.next=20,this.playSound(n).then((function(){return o.opts.afterChunkPlay(n.chunk)}));case 20:return r=t.sent,this.paused&&this.pause(),t.next=24,r;case 24:if(!this.playing){t.next=26;break}return t.abrupt("return",this.step());case 26:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"createSound",value:function(t){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(t){return this.activeSound=t,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(){return t.getBestBookVoice(this.getVoices(),this.opts.bookLanguage)}}],r=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,o=e.filter((function(t){return t.lang.startsWith(n)})),i=(r=r||(navigator.language?[navigator.language]:[])).filter((function(t){return t.startsWith(n)}));return t.getMatchingVoice(i,o)||o.find((function(t){return t.default}))||o[0]||t.getMatchingVoice(r,e)||e.find((function(t){return t.default}))||e[0]}},{key:"getMatchingVoice",value:function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{var o=function(){var t=n.value,r=e.filter((function(e){return e.lang.replace("_","-").startsWith(t)}));if(r.length)return{v:r.find((function(t){return t.default}))||r[0]}};for(r.s();!(n=r.n()).done;){var i=o();if("object"===g(i))return i.v}}catch(t){r.e(t)}finally{r.f()}}}],n&&k(e.prototype,n),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),S=n(5685),x=(n(5529),n(4371),n(5311));function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function M(){M=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new O(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function p(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(y=m);var g=p.prototype=f.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==L(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function V(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},A(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(g),u(g,s,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),V(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function P(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){P(i,r,o,a,s,"next",t)}function s(t){P(i,r,o,a,s,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==L(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===L(o)?o:String(o)),r)}var o}function q(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=F(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},R.apply(this,arguments)}function D(t,e){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},D(t,e)}function F(t){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F(t)}var C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&D(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=F(n);if(r){var o=F(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===L(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t){var e,n;return I(this,i),(n=o.call(this,t)).audioFormat=null!==(e=x.browser)&&void 0!==e&&e.mozilla?"ogg":"mp3",n}return q(i,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(t,e){var n=this,r=null;navigator.userAgent.match(/mobile/i)&&(r=this.iOSCaptureUserIntentHack()),(r=r||Promise.resolve()).then((function(){return R(F(i.prototype),"start",n).call(n,t,e)}))}},{key:"createSound",value:function(t){return new j(this.getSoundUrl(t.text))}},{key:"getSoundUrl",value:function(t){return"https://"+this.opts.server+"/BookReader/BookReaderGetTTS.php?string="+encodeURIComponent(t)+"&format=."+this.audioFormat}},{key:"iOSCaptureUserIntentHack",value:(e=E(M().mark((function t(){var e;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=soundManager.createSound({url:B[this.audioFormat]}),t.next=3,new Promise((function(t){return e.play({onfinish:t})}));case 3:e.destruct();case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]),i}(O),j=function(){function t(e){I(this,t),this.soundUrl=e,this.sound=null,this.rate=1,this._finishResolver=null}var e;return q(t,[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(t){var e,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),t()},onresume:(e=E(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,S.sleep)(25);case 2:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 3:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(e=E(M().mark((function t(){var e=this;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t){e._finishResolver=t,e.sound.play({onfinish:t})}));case 2:this.sound.destruct();case 3:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(t){this.rate=t,this.sound.setPlaybackRate(t)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]),t}(),B={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq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McYYY4wxxhhjjDHGGGOMMcYYW2uttdZaa6211lprrbXWWmutAEC/CgcA/wcbVkc4KRoLLDRkJQAQDgAAGMOYc445Bh2EhinopIQOQgihQ0o5KCWEUEopKXNOSkqlpJRaSplzUlIqJaWWUuogpNRaSi211loHJaXWUmqttdY6CKW01FprrbXYQUgppdZaiy3GUEpKrbXYYow1hlJSaq3F2GKsMaTSUmwtxhhjrKGU1lprMcYYay0ptdZijLXGWmtJqbXWYos11loLAOBucACASLBxhpWks8LR4EJDVgIAIQEABEKMOeeccxBCCCFSijHnoIMQQgghREox5hx0EEIIIYSMMeeggxBCCCGEkDHmHHQQQgghhBA65xyEEEIIoYRSSuccdBBCCCGUUELpIIQQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="};function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(t)&&/google inc/i.test(e)}function U(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}var H=n(1030);function Y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(t)}var Q={Name:0,Endonym:1,"ISO 639-1":2,"ISO 639-2/T":3,"ISO 639-2/B":4};function G(t,e){for(var n=0;n<H.Z.length;n++)for(var r=0;r<e.length;r++){var o=e[r];if(-1!=H.Z[n][Q[o]].split(", ").map((function(t){return t.toLowerCase()})).indexOf(t))return H.Z[n][Q["ISO 639-1"]]}return null}function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function K(){K=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new O(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function p(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(y=m);var g=p.prototype=f.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==z(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function V(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},A(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(g),u(g,s,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),V(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function Z(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function W(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Z(i,r,o,a,s,"next",t)}function s(t){Z(i,r,o,a,s,"throw",t)}a(void 0)}))}}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==z(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===z(o)?o:String(o)),r)}var o}function $(t,e,n){return e&&J(t.prototype,e),n&&J(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tt(){return tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},tt.apply(this,arguments)}function et(t,e){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},et(t,e)}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}var rt,ot=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&et(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=nt(e);if(n){var o=nt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return function(t,e){if(e&&("object"===z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(t){var e;return X(this,o),e=r.call(this,t),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",(function(){return e.events.trigger("voiceschanged")})),e}return $(o,[{key:"start",value:function(t,e){var n=this;if("mediaSession"in navigator){var r=new Audio(at);r.loop=!0,this.events.on("pause",(function(){return r.pause()})),this.events.on("resume",(function(){return r.play()})),this.events.on("stop",(function(){return r.src=""})),r.play().then((function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter((function(t){return"Author"==t.label})).map((function(t){return t.value}))[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setActionHandler("play",(function(){r.play(),n.resume()})),navigator.mediaSession.setActionHandler("pause",(function(){r.pause(),n.pause()})),navigator.mediaSession.setActionHandler("previoustrack",(function(){return n.jumpBackward()})),navigator.mediaSession.setActionHandler("nexttrack",(function(){return n.jumpForward()}))}))}return tt(nt(o.prototype),"start",this).call(this,t,e)}},{key:"getVoices",value:function(){var t=speechSynthesis.getVoices();return 1!=t.filter((function(t){return t.default})).length&&t.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),t}},{key:"createSound",value:function(t){return new it(t.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis&&!/samsungbrowser/i.test(navigator.userAgent)}}]),o}(O),it=function(){function t(e){X(this,t),this.text=e,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null}var e,n,r,o,i;return $(t,[{key:"load",value:function(t){var e,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(e=this.voice)||void 0===e?void 0:e.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,-1!=location.toString().indexOf("_debugReadAloud=true")&&(this.utterance.addEventListener("pause",(function(){return console.log("pause")})),this.utterance.addEventListener("resume",(function(){return console.log("resume")})),this.utterance.addEventListener("start",(function(){return console.log("start")})),this.utterance.addEventListener("end",(function(){return console.log("end")})),this.utterance.addEventListener("error",(function(){return console.log("error")})),this.utterance.addEventListener("boundary",(function(){return console.log("boundary")})),this.utterance.addEventListener("mark",(function(){return console.log("mark")})),this.utterance.addEventListener("finish",(function(){return console.log("finish")}))),this.utterance.addEventListener("start",(function(t){return n._lastEvents.start=t})),this.utterance.addEventListener("boundary",(function(t){return n._lastEvents.boundary=t})),this.utterance.addEventListener("pause",(function(t){return n._lastEvents.pause=t})),this.utterance.addEventListener("start",(function(){n.started=!0,n.stopped=!1,n.paused=!1})),this.utterance.addEventListener("pause",(function(){return n.paused=!0})),this.utterance.addEventListener("resume",(function(){return n.paused=!1})),this.utterance.addEventListener("end",(function(t){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",t))})),this.loaded=!0,t&&t()}},{key:"reload",value:(i=W(K().mark((function t(){var e,n;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),t.next=5,this.stop();case 5:this.load(),e||this.play();case 7:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"play",value:function(){var t=this;this._finishPromise=this._finishPromise||new Promise((function(e){return t._finishResolver=e})),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var e=this.utterance.voice&&this.utterance.voice.localService;return N()&&!e&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var t=Promise.resolve();return this.stopped||(t=Promise.race([(0,S.promisifyEvent)(this.utterance,"end"),(0,S.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),t}},{key:"finish",value:(o=W(K().mark((function t(){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:this.utterance.dispatchEvent(new Event("finish"));case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"pause",value:(r=W(K().mark((function t(){var e,n,r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.paused){t.next=2;break}return t.abrupt("return");case 2:if(e=(0,S.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=U()&&Y(),!N()&&!n){t.next=15;break}return r=(0,S.sleep)(100).then((function(){return"timeout"})),t.next=10,Promise.race([e,r]);case 10:if("timeout"==t.sent){t.next=13;break}return t.abrupt("return");case 13:this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 15:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"resume",value:(n=W(K().mark((function t(){var e,n,r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.started){t.next=3;break}return this.play(),t.abrupt("return");case 3:if(this.paused){t.next=5;break}return t.abrupt("return");case 5:if(e=N()&&Y()||U()&&Y(),n=N()||e,r=(0,S.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),!n){t.next=20;break}return t.next=12,Promise.race([r,(0,S.sleep)(100).then((function(){return"timeout"}))]);case 12:if("timeout"==t.sent){t.next=15;break}return t.abrupt("return");case 15:if(this.utterance.dispatchEvent(new CustomEvent("resume",{})),!e){t.next=20;break}return t.next=19,this.reload();case 19:this.play();case 20:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"setPlaybackRate",value:function(t){this.rate=t,this.reload()}},{key:"setVoice",value:function(t){this.voice=t,this.reload()}},{key:"_chromePausingBugFix",value:(e=W(K().mark((function t(){var e,n,r,o;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,S.sleep)(14e3).then((function(){return"timeout"})),n=(0,S.promisifyEvent)(this.utterance,"pause").then((function(){return"paused"})),r=(0,S.promisifyEvent)(this.utterance,"end").then((function(){return"ended"})),t.next=5,Promise.race([e,n,r]);case 5:o=t.sent,-1!=location.toString().indexOf("_debugReadAloud=true")&&console.log("CHROME-PAUSE-HACK: ".concat(o)),t.t0=o,t.next="ended"===t.t0?10:"paused"===t.t0?11:"timeout"===t.t0?15:21;break;case 10:return t.abrupt("break",21);case 11:return t.next=13,Promise.race([(0,S.promisifyEvent)(this.utterance,"resume"),(0,S.sleep)(14e3).then((function(){return"timeout"}))]);case 13:return"timeout"==o?this.reload():this._chromePausingBugFix(),t.abrupt("break",21);case 15:return speechSynthesis.pause(),t.next=18,(0,S.sleep)(25);case 18:return speechSynthesis.resume(),this._chromePausingBugFix(),t.abrupt("break",21);case 21:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}(),at="data:audio/mp3;base64,/+MYxAAMEAISSAhElhIpJYzz1vz9mUdlHvJwTP/n3FJesPxB9/8mp0oGaz9+7+T//8oCDhJqOMqLh4o4uhUAUUDaf//3r+///+MYxAoKy2ImKAgEqbfr/t///27/+n3s32/////+b5qMsq7vnXCKh2By3ZcIqyrUYbbRH0fp+ljtf+n2Uo72PHX/03f0df///+MYxBkKUAYmQAhEAL+2l44oKFjZMwJAOJnhguMqokFAqBKl/5f1/+f+3/v////9GT//r+//v+//////b1VvucaRChqnMqsY/+MYxCoLo2IiSAgEpRrgIRVq//p////25nlpVFbQ9kuXtrpt+n//3ZUZNKHVTHdJk3Q6h961DAU8loFlsfTnTZYLLQ1xiIYC/+MYxDYLa2YYAACNFAKKv5swEnqSccBoi//xVP9R/q/370r02////7VpaiWWLrDaF//X8+Rf/6ys2irmURCrI/Lr7///+m1t/+MYxEMKqAI2SAhElh7vNPmHrKdmMPFMimBI5xYQEiIRxh1gk0pKvfo7nezMyH6P67uKW+z/7NusoS/4//STUtCUiwASccAQ/+MYxFMKs2IcIABFEFRhEOUCgACs//l3/6df///+qZf6V9X2t69f/p////+v97UOY7UyyIxZWPa1inCgyCDq//pXpSia2v23/+MYxGMK6AYqSABEAl70RfX2+nu6///v+rfdWCLKMhUBmZhIDqt23LQGBjyNGEj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hHOGxIRbHk8nkkYP+EQKl/+MYxPUPG2IdgAjNozJQByAMF/6//le/y////8/rVl/v5/d/5U98kU2tzl5SITKXk///7Pt5VWhZSMOQqIHZwB0LymkzFFnA/+MYxPMOw2oQAABNEL0pKo025GgSbCS9H7lzLlV58mRTv//3+W8WT//f/7zz5//l/9ki/6////WXFkRjlygC4US7JYQwCIg1/+MYxPMPk1YaQAjNof+3GgQj8XKu+pz/PNeX2//81+BMxLX//nz8/5vXovznf9GZ8kZy//J/t1dPqqsZWQIqK2lF4LBUIAJn/+MYxO8Pq2YdoAlNopA5QImv5P/i4cqmi/y///9DP/mplLdWL/8rZS/qX////m+pfVpWM5jBgJysYxQpTGMYUcygIwYU6qqq/+MYxOsPE14aQAiNoYAwNmLCuoX4szULsxZmoXZiwr/FhX//gIWFSJmtiVCwr3f7P/ioqLCwsLC4qK1MQU1FMy45OS4zVVVV/+MYxOkN614mSAhE31VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxOwOwz4hqAiHo1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxOwOG1oOIAgEqFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxO4L6AVtkAhEAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",st="Read this book aloud",ut=n(9860),lt=n(5311),ct=n(5311);function ht(t){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return dt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pt(){pt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new O(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function p(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(y=m);var g=p.prototype=f.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==ht(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function V(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},A(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(g),u(g,s,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),V(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function yt(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function vt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){yt(i,r,o,a,s,"next",t)}function s(t){yt(i,r,o,a,s,"throw",t)}a(void 0)}))}}lt.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookPath:"",enableTtsPlugin:!0}),BookReader.prototype.setup=(rt=BookReader.prototype.setup,function(t){if(rt.call(this,t),this.options.enableTtsPlugin){this._ttsBoxesByIndex={};var e=ot.isSupported()?ot:C.isSupported()?C:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var n=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];e={festival:C,web:ot}[n]}e&&(this.ttsEngine=new e({server:t.server,bookPath:t.bookPath,bookLanguage:(r=t.bookLanguage,r?G(r=r.toLowerCase(),["ISO 639-1"])||G(r,["ISO 639-2/B"])||G(r,["ISO 639-2/T","Endonym","Name"]):null),onLoadingStart:this.showProgressPopup.bind(this,"Loading audio..."),onLoadingComplete:this.removeProgressPopup.bind(this),onDone:this.ttsStop.bind(this),beforeChunkPlay:this.ttsBeforeChunkPlay.bind(this),afterChunkPlay:this.ttsSendChunkFinishedAnalyticsEvent.bind(this)}))}var r}),BookReader.prototype.init=function(t){return function(){var e=this;this.options.enableTtsPlugin&&this.bind(BookReader.eventNames.PostInit,(function(){e.$(".BRicon.read").click((function(){return e.ttsToggle(),!1})),e.ttsEngine&&(e.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&e.ttsStart(!1))})),t.call(this)}}(BookReader.prototype.init),BookReader.prototype._createPageContainer=function(t){return function(e){var n=t.call(this,e);if(this.options.enableTtsPlugin&&n.page&&e in this._ttsBoxesByIndex){var r=n.page.index;(0,ut.Tm)("ttsHiliteLayer",this._ttsBoxesByIndex[r],n.page,n.$container[0])}return n}}(BookReader.prototype._createPageContainer),BookReader.prototype.buildMobileDrawerElement=function(t){return function(){var e=t.call(this);return this.options.enableTtsPlugin&&this.ttsEngine&&e.find(".BRmobileMenu__moreInfoRow").after(ct('\n <li>\n <span>\n <span class="DrawerIconWrapper"><img class="DrawerIcon" src="'.concat(this.imagesBaseURL,'icon_speaker_open.svg" alt="info-speaker"/></span>\n Read Aloud\n </span>\n <div>\n <span class="larger">Press to toggle read aloud</span>\n <br/>\n <button class="BRicon read"></button>\n </div>\n </li>'))),e}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.initNavbar=function(t){return function(){var e=this,n=t.call(this);if(this.options.enableTtsPlugin&&this.ttsEngine){this.refs.$BRReadAloudToolbar=ct('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),n.find(".BRcontrols").prepend(this.refs.$BRReadAloudToolbar);var r=function(t){return t.map((function(t){return'<option value="'.concat(t.voiceURI,'">').concat(t.lang," - ").concat(t.name,"</option>")})).join("")},o=function(t,e){return"".concat(t.lang," - ").concat(t.name).localeCompare("".concat(e.lang," - ").concat(e.name))},i=function(t){t.empty();var n=e.ttsEngine.opts.bookLanguage,i=e.ttsEngine.getVoices().filter((function(t){return t.lang.startsWith(n)})).sort(o),a=e.ttsEngine.getVoices().filter((function(t){return!t.lang.startsWith(n)})).sort(o);e.ttsEngine.getVoices().length>1?(t.append(ct('<optgroup label="Book Language ('.concat(n,')"> ').concat(r(i)," </optgroup>"))),t.append(ct('<optgroup label="Other Languages"> '.concat(r(a)," </optgroup>"))),t.val(e.ttsEngine.voice.voiceURI),t.show()):t.hide()},a=this.refs.$BRReadAloudToolbar.find("[name=playback-voice]");i(a),a.on("change",(function(t){return e.ttsEngine.setVoice(a.val())})),this.ttsEngine.events.on("pause resume start",(function(){return e.ttsUpdateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return i(a)})),this.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.ttsPlayPause.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.ttsJumpForward.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.ttsJumpBackward.bind(this));var s=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');s.on("change",(function(t){return e.ttsEngine.setPlaybackRate(parseFloat(s.val()))})),ct('<li>\n <button class="BRicon read js-tooltip" title="'.concat(st,'">\n <div class="icon icon-read-aloud"></div>\n <span class="tooltip">').concat(st,"</span>\n </button>\n </li>")).insertBefore(n.find(".BRcontrols .BRicon.zoom_out").closest("li"))}return n}}(BookReader.prototype.initNavbar),BookReader.prototype.ttsToggle=function(){this.autoStop&&this.autoStop(),this.ttsEngine.playing?this.ttsStop():this.ttsStart()},BookReader.prototype.ttsStart=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.constModeThumb==this.mode&&this.switchMode(this.constMode1up),this.refs.$BRReadAloudToolbar.addClass("visible"),this.$(".BRicon.read").addClass("unread active"),this.ttsSendAnalyticsEvent("Start"),t&&this.ttsEngine.start(this.currentIndex(),this.book.getNumLeafs())},BookReader.prototype.ttsJumpForward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()},BookReader.prototype.ttsJumpBackward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()},BookReader.prototype.ttsUpdateState=function(){var t=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.$(".read-aloud [name=play]").toggleClass("playing",t)},BookReader.prototype.ttsPlayPause=function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.ttsUpdateState(this.ttsEngine.paused)):this.ttsToggle()},BookReader.prototype.ttsStop=function(){this.refs.$BRReadAloudToolbar.removeClass("visible"),this.$(".BRicon.read").removeClass("unread active"),this.ttsSendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.ttsRemoveHilites(),this.removeProgressPopup()},BookReader.prototype.ttsBeforeChunkPlay=function(){var t=vt(pt().mark((function t(e){return pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.ttsMaybeFlipToIndex(e.leafIndex);case 2:this.ttsHighlightChunk(e),this.ttsScrollToChunk(e);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.ttsSendChunkFinishedAnalyticsEvent=function(t){var e;this.ttsSendAnalyticsEvent("ChunkFinished-Words",(e=t.text.match(/\S+/g))?e.length:0)},BookReader.prototype.ttsMaybeFlipToIndex=function(){var t=vt(pt().mark((function t(e){return pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.constMode2up==this.mode){t.next=4;break}this.jumpToIndex(e),t.next=6;break;case 4:return t.next=6,this._modes.mode2Up.mode2UpLit.jumpToIndex(e);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.ttsHighlightChunk=function(t){var e,n,r,o=this,i=t.leafIndex;this.ttsRemoveHilites(),this._ttsBoxesByIndex=(e={},n=i,r=t.lineRects.map((function(t){var e=ft(t,4),n=e[0],r=e[1];return{l:n,r:e[2],b:r,t:e[3]}})),(n=function(t){var e=function(t,e){if("object"!==ht(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ht(e)?e:String(e)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);for(var a=function(){var t=ft(u[s],2),e=t[0],n=t[1],r=parseFloat(e),i=o.book.getPage(r);o.getActivePageContainerElementsForIndex(r).forEach((function(t){return(0,ut.Tm)("ttsHiliteLayer",n,i,t)}))},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()},BookReader.prototype.ttsScrollToChunk=function(t){var e,n;this.constModeThumb!=this.mode&&(null===(e=ct(".pagediv".concat(t.leafIndex," .ttsHiliteLayer rect")).last())||void 0===e||null===(n=e[0])||void 0===n||n.scrollIntoView({block:this.constMode1up==this.mode||this.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))},BookReader.prototype.ttsRemoveHilites=function(){ct(this.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}},BookReader.prototype.ttsSendAnalyticsEvent=function(t,e){if(this.archiveAnalyticsSendEvent){var n={},r=this.ttsEngine.opts.bookLanguage;r&&(n.mediaLanguage=r),this.archiveAnalyticsSendEvent("BRReadAloud",t,e,n)}}},2814:function(t,e,n){var r=n(7854),o=n(7293),i=n(1702),a=n(1340),s=n(3111).trim,u=n(1361),l=i("".charAt),c=r.parseFloat,h=r.Symbol,f=h&&h.iterator,d=1/c(u+"-0")!=-1/0||f&&!o((function(){c(Object(f))}));t.exports=d?function(t){var e=s(a(t)),n=c(e);return 0===n&&"-"==l(e,0)?-0:n}:c},9720:function(t,e,n){var r=n(2109),o=n(4699).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},4678:function(t,e,n){var r=n(2109),o=n(2814);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},1030:function(t,e){"use strict";e.Z=void 0,e.Z=[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, کوردی","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, أۇزبېك","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]]},4371:function(t,e,n){var r,o;r=[n(5311)],void 0===(o=function(t){return function(t){"use strict";function e(t){void 0===t&&(t=window.navigator.userAgent),t=t.toLowerCase();var e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(silk)/.exec(t)||/(android)/.exec(t)||/(win)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||/(playbook)/.exec(t)||/(bb)/.exec(t)||/(blackberry)/.exec(t)||[],r={},o={browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",versionNumber:e[4]||e[2]||"0",platform:n[0]||""};if(o.browser&&(r[o.browser]=!0,r.version=o.version,r.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(r[o.platform]=!0),(r.android||r.bb||r.blackberry||r.ipad||r.iphone||r.ipod||r.kindle||r.playbook||r.silk||r["windows phone"])&&(r.mobile=!0),(r.cros||r.mac||r.linux||r.win)&&(r.desktop=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){var i="msie";o.browser=i,r[i]=!0}if(r.edge){delete r.edge;var a="msedge";o.browser=a,r[a]=!0}if(r.safari&&r.blackberry){var s="blackberry";o.browser=s,r[s]=!0}if(r.safari&&r.playbook){var u="playbook";o.browser=u,r[u]=!0}if(r.bb){var l="blackberry";o.browser=l,r[l]=!0}if(r.opr){var c="opera";o.browser=c,r[c]=!0}if(r.safari&&r.android){var h="android";o.browser=h,r[h]=!0}if(r.safari&&r.kindle){var f="kindle";o.browser=f,r[f]=!0}if(r.safari&&r.silk){var d="silk";o.browser=d,r[d]=!0}return r.name=o.browser,r.platform=o.platform,r}return window.jQBrowser=e(window.navigator.userAgent),window.jQBrowser.uaMatch=e,t&&(t.browser=window.jQBrowser),window.jQBrowser}(t)}.apply(e,r))||(t.exports=o)},5529:function(t,e,n){var r;t=n.nmd(t),function(o,i){"use strict";if(!o||!o.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;function s(t,e){this.setupOptions={url:t||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=e||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,r,a,s,u,l,c,h,f,d,p,y,v,m,g,A,b,w,_,k,V,O,S,x,L,M,P,E,I,T,q,R,D,F,C,j,B,N,U,H,Y,Q,G,z,K,Z,W,X,J,$,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ht,ft,dt,pt,yt=this,vt=null,mt=null,gt="soundManager",At=gt+": ",bt=navigator.userAgent,wt=o.location.href.toString(),_t=document,kt=[],Vt=!0,Ot=!1,St=!1,xt=!1,Lt=!1,Mt=!1,Pt=0,Et=["log","info","warn","error"],It=null,Tt=null,qt=!1,Rt=!1,Dt=0,Ft=null,Ct=[],jt=null,Bt=Array.prototype.slice,Nt=!1,Ut=0,Ht=1e3,Yt=bt.match(/(ipad|iphone|ipod)/i),Qt=bt.match(/android/i),Gt=bt.match(/msie|trident/i),zt=bt.match(/webkit/i),Kt=bt.match(/safari/i)&&!bt.match(/chrome/i),Zt=bt.match(/opera/i),Wt=bt.match(/(mobile|pre\/|xoom)/i)||Yt||Qt,Xt=!wt.match(/usehtml5audio/i)&&!wt.match(/sm2-ignorebadua/i)&&Kt&&!bt.match(/silk/i)&&bt.match(/OS\sX\s10_6_([3-7])/i),Jt=o.console!==i&&console.log!==i,$t=_t.hasFocus!==i?_t.hasFocus():null,te=Kt&&(_t.hasFocus===i||!_t.hasFocus()),ee=!te,ne=/(mp3|mp4|mpa|m4a|m4b)/i,re="about:blank",oe=_t.location?_t.location.protocol.match(/http/i):null,ie=oe?"":"//",ae=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,se=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ue=new RegExp("\\.("+se.join("|")+")(\\?.*)?$","i");function le(t){return yt.preferFlash&&st&&!yt.ignoreFlash&&yt.flash[t]!==i&&yt.flash[t]}function ce(t){return function(e){var n,r=this._s;return r&&r._a?n=t.call(this,e):(r&&r.id?yt._wD(r.id+": Ignoring "+e.type):yt._wD("HTML5::Ignoring "+e.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!oe,B={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},tt=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==i&&(Zt&&opera!==i&&opera.version()<10?new Audio(null):new Audio).canPlayType!==i}catch(t){return!1}}(),this.setup=function(t){var e=!yt.url;return t!==i&&xt&&jt&&yt.ok()&&(t.flashVersion!==i||t.url!==i||t.html5Test!==i)&&Y(F("setupLate")),p(t),Nt||(Wt?yt.setupOptions.ignoreMobileRestrictions&&!yt.setupOptions.forceUseGlobalHTML5Audio||(Ct.push(V.globalHTML5),Nt=!0):yt.setupOptions.forceUseGlobalHTML5Audio&&(Ct.push(V.globalHTML5),Nt=!0)),!pt&&Wt&&(yt.setupOptions.ignoreMobileRestrictions?Ct.push(V.ignoreMobile):(yt.setupOptions.useHTML5Audio&&!yt.setupOptions.preferFlash||yt._wD(V.mobileUA),yt.setupOptions.useHTML5Audio=!0,yt.setupOptions.preferFlash=!1,Yt?yt.ignoreFlash=!0:(Qt&&!bt.match(/android\s2\.3/i)||!Qt)&&(yt._wD(V.globalHTML5),Nt=!0))),t&&(e&&L&&t.url!==i&&yt.beginDelayedInit(),L||t.url===i||"complete"!==_t.readyState||setTimeout(S,1)),pt=!0,yt},this.ok=function(){return jt?xt&&!Lt:yt.useHTML5Audio&&yt.hasHTML5},this.supported=this.ok,this.getMovie=function(t){return r(t)||_t[t]||o[t]},this.createSound=function(t,e){var r,o,a,s=null;if(o=(r=gt+".createSound(): ")+F(xt?"notOK":"notReady"),!xt||!yt.ok())return Y(o),!1;if(e!==i&&(t={id:t,url:e}),(a=d(t)).url=Z(a.url),a.id===i&&(a.id=yt.setupOptions.idPrefix+Ut++),a.id.toString().charAt(0).match(/^[0-9]$/)&&yt._wD(r+F("badID",a.id),2),yt._wD(r+a.id+(a.url?" ("+a.url+")":""),1),Q(a.id,!0))return yt._wD(r+a.id+" exists",1),yt.sounds[a.id];function u(){return a=U(a),yt.sounds[a.id]=new n(a),yt.soundIDs.push(a.id),yt.sounds[a.id]}if(J(a))s=u(),yt.html5Only||yt._wD(a.id+": Using HTML5"),s._setup_html5(a);else{if(yt.html5Only)return yt._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(yt.html5.usingFlash&&a.url&&a.url.match(/data:/i))return yt._wD(a.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(ae)||a.url&&a.url.match(ue))),a.isMovieStar&&(yt._wD(r+"using MovieStar handling"),a.loops>1&&h("noNSLoop"))),a=H(a,r),s=u(),8===l?mt._createSound(a.id,a.loops||1,a.usePolicyFile):(mt._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,!!a.isMovieStar&&a.bufferTime,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(s.connected=!0,a.onconnect&&a.onconnect.apply(s))),a.serverURL||!a.autoLoad&&!a.autoPlay||s.load(a)}return!a.serverURL&&a.autoPlay&&s.play(),s},this.destroySound=function(t,e){if(!Q(t))return!1;var n,r=yt.sounds[t];for(r.stop(),r._iO={},r.unload(),n=0;n<yt.soundIDs.length;n++)if(yt.soundIDs[n]===t){yt.soundIDs.splice(n,1);break}return e||r.destruct(!0),r=null,delete yt.sounds[t],!0},this.load=function(t,e){return!!Q(t)&&yt.sounds[t].load(e)},this.unload=function(t){return!!Q(t)&&yt.sounds[t].unload()},this.onPosition=function(t,e,n,r){return!!Q(t)&&yt.sounds[t].onposition(e,n,r)},this.onposition=this.onPosition,this.clearOnPosition=function(t,e,n){return!!Q(t)&&yt.sounds[t].clearOnPosition(e,n)},this.play=function(t,e){var n=null,r=e&&!(e instanceof Object);if(!xt||!yt.ok())return Y(gt+".play(): "+F(xt?"notOK":"notReady")),!1;if(Q(t,r))r&&(e={url:e});else{if(!r)return!1;r&&(e={url:e}),e&&e.url&&(yt._wD(gt+'.play(): Attempting to create "'+t+'"',1),e.id=t,n=yt.createSound(e).play())}return null===n&&(n=yt.sounds[t].play(e)),n},this.start=this.play,this.setPlaybackRate=function(t,e,n){return!!Q(t)&&yt.sounds[t].setPlaybackRate(e,n)},this.setPosition=function(t,e){return!!Q(t)&&yt.sounds[t].setPosition(e)},this.stop=function(t){return!!Q(t)&&(yt._wD(gt+".stop("+t+")",1),yt.sounds[t].stop())},this.stopAll=function(){var t;for(t in yt._wD(gt+".stopAll()",1),yt.sounds)yt.sounds.hasOwnProperty(t)&&yt.sounds[t].stop()},this.pause=function(t){return!!Q(t)&&yt.sounds[t].pause()},this.pauseAll=function(){var t;for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].pause()},this.resume=function(t){return!!Q(t)&&yt.sounds[t].resume()},this.resumeAll=function(){var t;for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].resume()},this.togglePause=function(t){return!!Q(t)&&yt.sounds[t].togglePause()},this.setPan=function(t,e){return!!Q(t)&&yt.sounds[t].setPan(e)},this.setVolume=function(t,e){var n,r;if(t!==i&&!isNaN(t)&&e===i){for(n=0,r=yt.soundIDs.length;n<r;n++)yt.sounds[yt.soundIDs[n]].setVolume(t);return!1}return!!Q(t)&&yt.sounds[t].setVolume(e)},this.mute=function(t){var e=0;if(t instanceof String&&(t=null),t)return!!Q(t)&&(yt._wD(gt+'.mute(): Muting "'+t+'"'),yt.sounds[t].mute());for(yt._wD(gt+".mute(): Muting all sounds"),e=yt.soundIDs.length-1;e>=0;e--)yt.sounds[yt.soundIDs[e]].mute();return yt.muted=!0,!0},this.muteAll=function(){yt.mute()},this.unmute=function(t){var e;if(t instanceof String&&(t=null),t)return!!Q(t)&&(yt._wD(gt+'.unmute(): Unmuting "'+t+'"'),yt.sounds[t].unmute());for(yt._wD(gt+".unmute(): Unmuting all sounds"),e=yt.soundIDs.length-1;e>=0;e--)yt.sounds[yt.soundIDs[e]].unmute();return yt.muted=!1,!0},this.unmuteAll=function(){yt.unmute()},this.toggleMute=function(t){return!!Q(t)&&yt.sounds[t].toggleMute()},this.getMemoryUse=function(){var t=0;return mt&&8!==l&&(t=parseInt(mt._getMemoryUse(),10)),t},this.disable=function(t){var e;if(t===i&&(t=!1),Lt)return!1;for(Lt=!0,h("shutdown",1),e=yt.soundIDs.length-1;e>=0;e--)q(yt.sounds[yt.soundIDs[e]]);return q(yt),f(t),it.remove(o,"load",g),!0},this.canPlayMIME=function(t){var e;return yt.hasHTML5&&(e=$({type:t})),!e&&jt&&(e=t&&yt.ok()?!!(l>8&&t.match(ae)||t.match(yt.mimePattern)):null),e},this.canPlayURL=function(t){var e;return yt.hasHTML5&&(e=$({url:t})),!e&&jt&&(e=t&&yt.ok()?!!t.match(yt.filePattern):null),e},this.canPlayLink=function(t){return!(t.type===i||!t.type||!yt.canPlayMIME(t.type))||yt.canPlayURL(t.href)},this.getSoundById=function(t,e){if(!t)return null;var n=yt.sounds[t];return n||e||yt._wD(gt+'.getSoundById(): Sound "'+t+'" not found.',2),n},this.onready=function(t,e){var n="onready";if("function"!=typeof t)throw F("needFunction",n);return xt&&yt._wD(F("queue",n)),e||(e=o),v(n,t,e),m(),!0},this.ontimeout=function(t,e){var n="ontimeout";if("function"!=typeof t)throw F("needFunction",n);return xt&&yt._wD(F("queue",n)),e||(e=o),v(n,t,e),m({type:n}),!0},this._writeDebug=function(t,e){var n,o;return!(!yt.setupOptions.debugMode||!(Jt&&yt.useConsole&&(e&&"object"==typeof e?console.log(t,e):Et[e]!==i?console[Et[e]](t):console.log(t),yt.consoleOnly))&&(!(n=r("soundmanager-debug"))||(o=_t.createElement("div"),++Pt%2==0&&(o.className="sm2-alt"),e=e===i?0:parseInt(e,10),o.appendChild(_t.createTextNode(t)),e&&(e>=2&&(o.style.fontWeight="bold"),3===e&&(o.style.color="#ff3333")),n.insertBefore(o,n.firstChild),n=null,0)))},-1!==wt.indexOf("sm2-debug=alert")&&(this._writeDebug=function(t){o.alert(t)}),this._wD=this._writeDebug,this._debug=function(){var t,e;for(h("currentObj",1),t=0,e=yt.soundIDs.length;t<e;t++)yt.sounds[yt.soundIDs[t]]._debug()},this.reboot=function(t,e){var n,r,i;for(yt.soundIDs.length&&yt._wD("Destroying "+yt.soundIDs.length+" SMSound object"+(1!==yt.soundIDs.length?"s":"")+"..."),n=yt.soundIDs.length-1;n>=0;n--)yt.sounds[yt.soundIDs[n]].destruct();if(mt)try{Gt&&(Tt=mt.innerHTML),It=mt.parentNode.removeChild(mt)}catch(t){h("badRemove",2)}if(Tt=It=jt=mt=null,yt.enabled=L=xt=qt=Rt=Ot=St=Lt=Nt=yt.swfLoaded=!1,yt.soundIDs=[],yt.sounds={},Ut=0,pt=!1,t)kt=[];else for(n in kt)if(kt.hasOwnProperty(n))for(r=0,i=kt[n].length;r<i;r++)kt[n][r].fired=!1;return e||yt._wD(gt+": Rebooting..."),yt.html5={usingFlash:null},yt.flash={},yt.html5Only=!1,yt.ignoreFlash=!1,o.setTimeout((function(){e||yt.beginDelayedInit()}),20),yt},this.reset=function(){return h("reset"),yt.reboot(!0,!0)},this.getMoviePercent=function(){return mt&&"PercentLoaded"in mt?mt.PercentLoaded():null},this.beginDelayedInit=function(){Mt=!0,S(),setTimeout((function(){return!Rt&&(P(),O(),Rt=!0,!0)}),20),A()},this.destruct=function(){yt._wD(gt+".destruct()"),yt.disable(!0)},n=function(t){var e,n,r,o,a,s,u,f,p,y,v=this,m=!1,g=[],A=0,b=null;p={duration:null,time:null},this.id=t.id,this.sID=this.id,this.url=t.url,this.options=d(t),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,y=!this.url,this.id3={},this._debug=function(){yt._wD(v.id+": Merged options:",v.options)},this.load=function(t){var e;if(t!==i?v._iO=d(t,v.options):(t=v.options,v._iO=t,b&&b!==v.url&&(h("manURL"),v._iO.url=v.url,v.url=null)),v._iO.url||(v._iO.url=v.url),v._iO.url=Z(v._iO.url),v.instanceOptions=v._iO,e=v._iO,yt._wD(v.id+": load ("+e.url+")"),!e.url&&!v.url)return yt._wD(v.id+": load(): url is unassigned. Exiting.",2),v;if(v.isHTML5||8!==l||v.url||e.autoPlay||yt._wD(v.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),e.url===v.url&&0!==v.readyState&&2!==v.readyState)return h("onURL",1),3===v.readyState&&e.onload&&dt(v,(function(){e.onload.apply(v,[!!v.duration])})),v;if(v.loaded=!1,v.readyState=1,v.playState=0,v.id3={},J(e))v._setup_html5(e)._called_load?yt._wD(v.id+": Ignoring request to load again"):(v._html5_canplay=!1,v.url!==e.url&&(yt._wD(h("manURL")+": "+e.url),v._a.src=e.url,v.setPosition(0)),v._a.autobuffer="auto",v._a.preload="auto",v._a._called_load=!0);else{if(yt.html5Only)return yt._wD(v.id+": No flash support. Exiting."),v;if(v._iO.url&&v._iO.url.match(/data:/i))return yt._wD(v.id+": data: URIs not supported via Flash. Exiting."),v;try{v.isHTML5=!1,v._iO=H(U(e)),v._iO.autoPlay&&(v._iO.position||v._iO.from)&&(yt._wD(v.id+": Disabling autoPlay because of non-zero offset case"),v._iO.autoPlay=!1),e=v._iO,8===l?mt._load(v.id,e.url,e.stream,e.autoPlay,e.usePolicyFile):mt._load(v.id,e.url,!!e.stream,!!e.autoPlay,e.loops||1,!!e.autoLoad,e.usePolicyFile)}catch(t){h("smError",2),c("onload",!1),E({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return v.url=e.url,v},this.unload=function(){return 0!==v.readyState&&(yt._wD(v.id+": unload()"),v.isHTML5?(o(),v._a&&(v._a.pause(),b=nt(v._a))):8===l?mt._unload(v.id,re):mt._unload(v.id),e()),v},this.destruct=function(t){yt._wD(v.id+": Destruct"),v.isHTML5?(o(),v._a&&(v._a.pause(),nt(v._a),Nt||r(),v._a._s=null,v._a=null)):(v._iO.onfailure=null,mt._destroySound(v.id)),t||yt.destroySound(v.id,!0)},this.play=function(t,e){var n,r,o,u,c,h,p=!0;if(n=v.id+": play(): ",e=e===i||e,t||(t={}),v.url&&(v._iO.url=v.url),v._iO=d(v._iO,v.options),v._iO=d(t,v._iO),v._iO.url=Z(v._iO.url),v.instanceOptions=v._iO,!v.isHTML5&&v._iO.serverURL&&!v.connected)return v.getAutoPlay()||(yt._wD(n+" Netstream not connected yet - setting autoPlay"),v.setAutoPlay(!0)),v;if(J(v._iO)&&(v._setup_html5(v._iO),a()),1===v.playState&&!v.paused){if(!v._iO.multiShot)return yt._wD(n+"Already playing (one-shot)",1),v.isHTML5&&v.setPosition(v._iO.position),v;yt._wD(n+"Already playing (multi-shot)",1)}if(t.url&&t.url!==v.url&&(v.readyState||v.isHTML5||8!==l||!y?v.load(v._iO):y=!1),v.loaded)yt._wD(n.substr(0,n.lastIndexOf(":")));else if(0===v.readyState){if(yt._wD(n+"Attempting to load"),v.isHTML5||yt.html5Only){if(!v.isHTML5)return yt._wD(n+"Unsupported type. Exiting."),v;v.load(v._iO)}else v._iO.autoPlay=!0,v.load(v._iO);v.instanceOptions=v._iO}else{if(2===v.readyState)return yt._wD(n+"Could not load - exiting",2),v;yt._wD(n+"Loading - attempting to play...")}return!v.isHTML5&&9===l&&v.position>0&&v.position===v.duration&&(yt._wD(n+"Sound at end, resetting to position: 0"),t.position=0),v.paused&&v.position>=0&&(!v._iO.serverURL||v.position>0)?(yt._wD(n+"Resuming from paused state",1),v.resume()):(v._iO=d(t,v._iO),(!v.isHTML5&&null!==v._iO.position&&v._iO.position>0||null!==v._iO.from&&v._iO.from>0||null!==v._iO.to)&&0===v.instanceCount&&0===v.playState&&!v._iO.serverURL&&(o=function(){v._iO=d(t,v._iO),v.play(v._iO)},v.isHTML5&&!v._html5_canplay?(yt._wD(n+"Beginning load for non-zero offset case"),v.load({_oncanplay:o})):v.isHTML5||v.loaded||v.readyState&&2===v.readyState||(yt._wD(n+"Preloading for non-zero offset case"),v.load({onload:o})),v._iO=f()),(!v.instanceCount||v._iO.multiShotEvents||v.isHTML5&&v._iO.multiShot&&!Nt||!v.isHTML5&&l>8&&!v.getAutoPlay())&&v.instanceCount++,v._iO.onposition&&0===v.playState&&s(v),v.playState=1,v.paused=!1,v.position=v._iO.position===i||isNaN(v._iO.position)?0:v._iO.position,v.isHTML5||(v._iO=H(U(v._iO))),v._iO.onplay&&e&&(v._iO.onplay.apply(v),m=!0),v.setVolume(v._iO.volume,!0),v.setPan(v._iO.pan,!0),1!==v._iO.playbackRate&&v.setPlaybackRate(v._iO.playbackRate),v.isHTML5?v.instanceCount<2?(a(),r=v._setup_html5(),v.setPosition(v._iO.position),r.play()):(yt._wD(v.id+": Cloning Audio() for instance #"+v.instanceCount+"..."),u=new Audio(v._iO.url),c=function(){it.remove(u,"ended",c),v._onfinish(v),nt(u),u=null},h=function(){it.remove(u,"canplay",h);try{u.currentTime=v._iO.position/Ht}catch(t){Y(v.id+": multiShot play() failed to apply position of "+v._iO.position/Ht)}u.play()},it.add(u,"ended",c),v._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,v._iO.volume/100))),v.muted&&(u.muted=!0),v._iO.position?it.add(u,"canplay",h):u.play()):(p=mt._start(v.id,v._iO.loops||1,9===l?v.position:v.position/Ht,v._iO.multiShot||!1),9!==l||p||(yt._wD(n+"No sound hardware, or 32-sound ceiling hit",2),v._iO.onplayerror&&v._iO.onplayerror.apply(v)))),v},this.start=this.play,this.stop=function(t){var e,n=v._iO;return 1===v.playState&&(yt._wD(v.id+": stop()"),v._onbufferchange(0),v._resetOnPosition(0),v.paused=!1,v.isHTML5||(v.playState=0),u(),n.to&&v.clearOnPosition(n.to),v.isHTML5?v._a&&(e=v.position,v.setPosition(0),v.position=e,v._a.pause(),v.playState=0,v._onTimer(),o()):(mt._stop(v.id,t),n.serverURL&&v.unload()),v.instanceCount=0,v._iO={},n.onstop&&n.onstop.apply(v)),v},this.setAutoPlay=function(t){yt._wD(v.id+": Autoplay turned "+(t?"on":"off")),v._iO.autoPlay=t,v.isHTML5||(mt._setAutoPlay(v.id,t),t&&(v.instanceCount||1!==v.readyState||(v.instanceCount++,yt._wD(v.id+": Incremented instance count to "+v.instanceCount))))},this.getAutoPlay=function(){return v._iO.autoPlay},this.setPlaybackRate=function(t){var e=Math.max(.5,Math.min(4,t));if(e!==t&&yt._wD(v.id+": setPlaybackRate("+t+"): limiting rate to "+e,2),v.isHTML5)try{v._iO.playbackRate=e,v._a.playbackRate=e}catch(t){yt._wD(v.id+": setPlaybackRate("+e+") failed: "+t.message,2)}return v},this.setPosition=function(t){t===i&&(t=0);var e,n,r=v.isHTML5?Math.max(t,0):Math.min(v.duration||v._iO.duration,Math.max(t,0));if(v.position=r,n=v.position/Ht,v._resetOnPosition(v.position),v._iO.position=r,v.isHTML5){if(v._a){if(v._html5_canplay){if(v._a.currentTime.toFixed(3)!==n.toFixed(3)){yt._wD(v.id+": setPosition("+n+")");try{v._a.currentTime=n,(0===v.playState||v.paused)&&v._a.pause()}catch(t){yt._wD(v.id+": setPosition("+n+") failed: "+t.message,2)}}}else if(n)return yt._wD(v.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),v;v.paused&&v._onTimer(!0)}}else e=9===l?v.position:n,v.readyState&&2!==v.readyState&&mt._setPosition(v.id,e,v.paused||!v.playState,v._iO.multiShot);return v},this.pause=function(t){return v.paused||0===v.playState&&1!==v.readyState||(yt._wD(v.id+": pause()"),v.paused=!0,v.isHTML5?(v._setup_html5().pause(),o()):(t||t===i)&&mt._pause(v.id,v._iO.multiShot),v._iO.onpause&&v._iO.onpause.apply(v)),v},this.resume=function(){var t=v._iO;return v.paused?(yt._wD(v.id+": resume()"),v.paused=!1,v.playState=1,v.isHTML5?(v._setup_html5().play(),a()):(t.isMovieStar&&!t.serverURL&&v.setPosition(v.position),mt._pause(v.id,t.multiShot)),!m&&t.onplay?(t.onplay.apply(v),m=!0):t.onresume&&t.onresume.apply(v),v):v},this.togglePause=function(){return yt._wD(v.id+": togglePause()"),0===v.playState?(v.play({position:9!==l||v.isHTML5?v.position/Ht:v.position}),v):(v.paused?v.resume():v.pause(),v)},this.setPan=function(t,e){return t===i&&(t=0),e===i&&(e=!1),v.isHTML5||mt._setPan(v.id,t),v._iO.pan=t,e||(v.pan=t,v.options.pan=t),v},this.setVolume=function(t,e){return t===i&&(t=100),e===i&&(e=!1),v.isHTML5?v._a&&(yt.muted&&!v.muted&&(v.muted=!0,v._a.muted=!0),v._a.volume=Math.max(0,Math.min(1,t/100))):mt._setVolume(v.id,yt.muted&&!v.muted||v.muted?0:t),v._iO.volume=t,e||(v.volume=t,v.options.volume=t),v},this.mute=function(){return v.muted=!0,v.isHTML5?v._a&&(v._a.muted=!0):mt._setVolume(v.id,0),v},this.unmute=function(){v.muted=!1;var t=v._iO.volume!==i;return v.isHTML5?v._a&&(v._a.muted=!1):mt._setVolume(v.id,t?v._iO.volume:v.options.volume),v},this.toggleMute=function(){return v.muted?v.unmute():v.mute()},this.onPosition=function(t,e,n){return g.push({position:parseInt(t,10),method:e,scope:n!==i?n:v,fired:!1}),v},this.onposition=this.onPosition,this.clearOnPosition=function(t,e){var n;if(t=parseInt(t,10),!isNaN(t))for(n=0;n<g.length;n++)t===g[n].position&&(e&&e!==g[n].method||(g[n].fired&&A--,g.splice(n,1)))},this._processOnPosition=function(){var t,e,n=g.length;if(!n||!v.playState||A>=n)return!1;for(t=n-1;t>=0;t--)!(e=g[t]).fired&&v.position>=e.position&&(e.fired=!0,A++,e.method.apply(e.scope,[e.position]),n=g.length);return!0},this._resetOnPosition=function(t){var e,n,r=g.length;if(!r)return!1;for(e=r-1;e>=0;e--)(n=g[e]).fired&&t<=n.position&&(n.fired=!1,A--);return!0},f=function(){var t,e,n=v._iO,r=n.from,o=n.to;return e=function(){yt._wD(v.id+': "To" time of '+o+" reached."),v.clearOnPosition(o,e),v.stop()},t=function(){yt._wD(v.id+': Playing "from" '+r),null===o||isNaN(o)||v.onPosition(o,e)},null===r||isNaN(r)||(n.position=r,n.multiShot=!1,t()),n},s=function(){var t,e=v._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&v.onPosition(parseInt(t,10),e[t])},u=function(){var t,e=v._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&v.clearOnPosition(parseInt(t,10))},a=function(){v.isHTML5&&G(v)},o=function(){v.isHTML5&&z(v)},(e=function(t){t||(g=[],A=0),m=!1,v._hasTimer=null,v._a=null,v._html5_canplay=!1,v.bytesLoaded=null,v.bytesTotal=null,v.duration=v._iO&&v._iO.duration?v._iO.duration:null,v.durationEstimate=null,v.buffered=[],v.eqData=[],v.eqData.left=[],v.eqData.right=[],v.failures=0,v.isBuffering=!1,v.instanceOptions={},v.instanceCount=0,v.loaded=!1,v.metadata={},v.readyState=0,v.muted=!1,v.paused=!1,v.peakData={left:0,right:0},v.waveformData={left:[],right:[]},v.playState=0,v.position=null,v.id3={}})(),this._onTimer=function(t){var e,n,r=!1,o={};return(v._hasTimer||t)&&v._a&&(t||(v.playState>0||1===v.readyState)&&!v.paused)&&((e=v._get_html5_duration())!==p.duration&&(p.duration=e,v.duration=e,r=!0),v.durationEstimate=v.duration,(n=v._a.currentTime*Ht||0)!==p.time&&(p.time=n,r=!0),(r||t)&&v._whileplaying(n,o,o,o,o)),r},this._get_html5_duration=function(){var t=v._iO,e=v._a&&v._a.duration?v._a.duration*Ht:t&&t.duration?t.duration:null;return e&&!isNaN(e)&&e!==1/0?e:null},this._apply_loop=function(t,e){!t.loop&&e>1&&yt._wD("Note: Native HTML5 looping is infinite.",1),t.loop=e>1?"loop":""},this._setup_html5=function(t){var r,o=d(v._iO,t),i=Nt?vt:v._a,a=decodeURI(o.url);if(Nt?a===decodeURI(at)&&(r=!0):a===decodeURI(b)&&(r=!0),i){if(i._s)if(Nt)i._s&&i._s.playState&&!r&&i._s.stop();else if(!Nt&&a===decodeURI(b))return v._apply_loop(i,o.loops),i;r||(b&&e(!1),i.src=o.url,v.url=o.url,b=o.url,at=o.url,i._called_load=!1)}else o.autoLoad||o.autoPlay?(v._a=new Audio(o.url),v._a.load()):v._a=Zt&&opera.version()<10?new Audio(null):new Audio,(i=v._a)._called_load=!1,Nt&&(vt=i);return v.isHTML5=!0,v._a=i,i._s=v,n(),v._apply_loop(i,o.loops),o.autoLoad||o.autoPlay?v.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(v._a._added_events)return!1;var t,e,n;for(t in v._a._added_events=!0,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],void 0,v._a&&v._a.addEventListener(e,n,!1));return!0},r=function(){var t,e,n;for(t in yt._wD(v.id+": Removing event listeners"),v._a._added_events=!1,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],void 0,v._a&&v._a.removeEventListener(e,n,!1))},this._onload=function(t){var e,n=!!t||!v.isHTML5&&8===l&&v.duration;return e=v.id+": ",yt._wD(e+(n?"onload()":"Failed to load / invalid sound?"+(v.duration?" -":" Zero-length duration reported.")+" ("+v.url+")"),n?1:2),n||v.isHTML5||(!0===yt.sandbox.noRemote&&yt._wD(e+F("noNet"),1),!0===yt.sandbox.noLocal&&yt._wD(e+F("noLocal"),1)),v.loaded=n,v.readyState=n?3:2,v._onbufferchange(0),n||v.isHTML5||v._onerror(),v._iO.onload&&dt(v,(function(){v._iO.onload.apply(v,[n])})),!0},this._onerror=function(t,e){v._iO.onerror&&dt(v,(function(){v._iO.onerror.apply(v,[t,e])}))},this._onbufferchange=function(t){return!(0===v.playState||t&&v.isBuffering||!t&&!v.isBuffering||(v.isBuffering=1===t,v._iO.onbufferchange&&(yt._wD(v.id+": Buffer state change: "+t),v._iO.onbufferchange.apply(v,[t])),0))},this._onsuspend=function(){return v._iO.onsuspend&&(yt._wD(v.id+": Playback suspended"),v._iO.onsuspend.apply(v)),!0},this._onfailure=function(t,e,n){v.failures++,yt._wD(v.id+": Failure ("+v.failures+"): "+t),v._iO.onfailure&&1===v.failures?v._iO.onfailure(t,e,n):yt._wD(v.id+": Ignoring failure")},this._onwarning=function(t,e,n){v._iO.onwarning&&v._iO.onwarning(t,e,n)},this._onfinish=function(){var t=v._iO.onfinish;v._onbufferchange(0),v._resetOnPosition(0),v.instanceCount&&(v.instanceCount--,v.instanceCount||(u(),v.playState=0,v.paused=!1,v.instanceCount=0,v.instanceOptions={},v._iO={},o(),v.isHTML5&&(v.position=0)),v.instanceCount&&!v._iO.multiShotEvents||t&&(yt._wD(v.id+": onfinish()"),dt(v,(function(){t.apply(v)}))))},this._whileloading=function(t,e,n,r){var o=v._iO;v.bytesLoaded=t,v.bytesTotal=e,v.duration=Math.floor(n),v.bufferLength=r,v.isHTML5||o.isMovieStar?v.durationEstimate=v.duration:o.duration?v.durationEstimate=v.duration>o.duration?v.duration:o.duration:v.durationEstimate=parseInt(v.bytesTotal/v.bytesLoaded*v.duration,10),v.isHTML5||(v.buffered=[{start:0,end:v.duration}]),(3!==v.readyState||v.isHTML5)&&o.whileloading&&o.whileloading.apply(v)},this._whileplaying=function(t,e,n,r,o){var a,s=v._iO;return!isNaN(t)&&null!==t&&(v.position=Math.max(0,t),v._processOnPosition(),!v.isHTML5&&l>8&&(s.usePeakData&&e!==i&&e&&(v.peakData={left:e.leftPeak,right:e.rightPeak}),s.useWaveformData&&n!==i&&n&&(v.waveformData={left:n.split(","),right:r.split(",")}),s.useEQData&&o!==i&&o&&o.leftEQ&&(a=o.leftEQ.split(","),v.eqData=a,v.eqData.left=a,o.rightEQ!==i&&o.rightEQ&&(v.eqData.right=o.rightEQ.split(",")))),1===v.playState&&(v.isHTML5||8!==l||v.position||!v.isBuffering||v._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(v)),!0)},this._oncaptiondata=function(t){yt._wD(v.id+": Caption data received."),v.captiondata=t,v._iO.oncaptiondata&&v._iO.oncaptiondata.apply(v,[t])},this._onmetadata=function(t,e){yt._wD(v.id+": Metadata received.");var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];v.metadata=o,v._iO.onmetadata&&v._iO.onmetadata.call(v,v.metadata)},this._onid3=function(t,e){yt._wD(v.id+": ID3 data received.");var n,r,o=[];for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];v.id3=d(v.id3,o),v._iO.onid3&&v._iO.onid3.apply(v)},this._onconnect=function(t){t=1===t,yt._wD(v.id+": "+(t?"Connected.":"Failed to connect? - "+v.url),t?1:2),v.connected=t,t&&(v.failures=0,Q(v.id)&&(v.getAutoPlay()?v.play(i,v.getAutoPlay()):v._iO.autoLoad&&v.load()),v._iO.onconnect&&v._iO.onconnect.apply(v,[t]))},this._ondataerror=function(t){v.playState>0&&(yt._wD(v.id+": Data error: "+t),v._iO.ondataerror&&v._iO.ondataerror.apply(v))},this._debug()},M=function(){return _t.body||_t.getElementsByTagName("div")[0]},r=function(t){return _t.getElementById(t)},d=function(t,e){var n,r,o=t||{};for(r in n=e===i?yt.defaultOptions:e)n.hasOwnProperty(r)&&o[r]===i&&("object"!=typeof n[r]||null===n[r]?o[r]=n[r]:o[r]=d(o[r],n[r]));return o},dt=function(t,e){t.isHTML5||8!==l?e():o.setTimeout(e,0)},y={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(t,e){var n,r=!0,o=e!==i,a=yt.setupOptions,s=y;if(t===i){for(n in r=[],a)a.hasOwnProperty(n)&&r.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof yt[n]?r.push(n+": {...}"):yt[n]instanceof Function?r.push(n+": function() {...}"):r.push(n));return yt._wD(F("setup",r.join(", "))),!1}for(n in t)if(t.hasOwnProperty(n))if("object"!=typeof t[n]||null===t[n]||t[n]instanceof Array||t[n]instanceof RegExp)o&&s[e]!==i?yt[e][n]=t[n]:a[n]!==i?(yt.setupOptions[n]=t[n],yt[n]=t[n]):s[n]===i?(Y(F(yt[n]===i?"setupUndef":"setupError",n),2),r=!1):yt[n]instanceof Function?yt[n].apply(yt,t[n]instanceof Array?t[n]:[t[n]]):yt[n]=t[n];else{if(s[n]!==i)return p(t[n],n);Y(F(yt[n]===i?"setupUndef":"setupError",n),2),r=!1}return r},it=function(){var t=o.attachEvent,e={add:t?"attachEvent":"addEventListener",remove:t?"detachEvent":"removeEventListener"};function n(e){var n=Bt.call(e),r=n.length;return t?(n[1]="on"+n[1],r>3&&n.pop()):3===r&&n.push(!1),n}function r(n,r){var o=n.shift(),i=[e[r]];t?o[i](n[0],n[1]):o[i].apply(o,n)}return{add:function(){r(n(arguments),"add")},remove:function(){r(n(arguments),"remove")}}}(),ct={abort:ce((function(){yt._wD(this._s.id+": abort")})),canplay:ce((function(){var t,e=this._s;if(!e._html5_canplay){if(e._html5_canplay=!0,yt._wD(e.id+": canplay"),e._onbufferchange(0),t=e._iO.position===i||isNaN(e._iO.position)?null:e._iO.position/Ht,this.currentTime!==t){yt._wD(e.id+": canplay: Setting position to "+t);try{this.currentTime=t}catch(n){yt._wD(e.id+": canplay: Setting position of "+t+" failed: "+n.message,2)}}e._iO._oncanplay&&e._iO._oncanplay()}})),canplaythrough:ce((function(){var t=this._s;t.loaded||(t._onbufferchange(0),t._whileloading(t.bytesLoaded,t.bytesTotal,t._get_html5_duration()),t._onload(!0))})),durationchange:ce((function(){var t,e=this._s;t=e._get_html5_duration(),isNaN(t)||t===e.duration||(yt._wD(this._s.id+": durationchange ("+t+")"+(e.duration?", previously "+e.duration:"")),e.durationEstimate=e.duration=t)})),ended:ce((function(){var t=this._s;yt._wD(t.id+": ended"),t._onfinish()})),error:ce((function(){var t=tt[this.error.code]||null;yt._wD(this._s.id+": HTML5 error, code "+this.error.code+(t?" ("+t+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,t)})),loadeddata:ce((function(){var t=this._s;yt._wD(t.id+": loadeddata"),t._loaded||Kt||(t.duration=t._get_html5_duration())})),loadedmetadata:ce((function(){yt._wD(this._s.id+": loadedmetadata")})),loadstart:ce((function(){yt._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)})),play:ce((function(){this._s._onbufferchange(0)})),playing:ce((function(){yt._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)})),progress:ce((function(t){var e,n,r,o=this._s,i=0,a="progress"===t.type,s=t.target.buffered,u=t.loaded||0,l=t.total||1;if(o.buffered=[],s&&s.length){for(e=0,n=s.length;e<n;e++)o.buffered.push({start:s.start(e)*Ht,end:s.end(e)*Ht});if(i=(s.end(0)-s.start(0))*Ht,u=Math.min(1,i/(t.target.duration*Ht)),a&&s.length>1){for(r=[],n=s.length,e=0;e<n;e++)r.push(t.target.buffered.start(e)*Ht+"-"+t.target.buffered.end(e)*Ht);yt._wD(this._s.id+": progress, timeRanges: "+r.join(", "))}a&&!isNaN(u)&&yt._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(o._whileloading(u,l,o._get_html5_duration()),u&&l&&u===l&&ct.canplaythrough.call(this,t))})),ratechange:ce((function(){yt._wD(this._s.id+": ratechange")})),suspend:ce((function(t){var e=this._s;yt._wD(this._s.id+": suspend"),ct.progress.call(this,t),e._onsuspend()})),stalled:ce((function(){yt._wD(this._s.id+": stalled")})),timeupdate:ce((function(){this._s._onTimer()})),waiting:ce((function(){var t=this._s;yt._wD(this._s.id+": waiting"),t._onbufferchange(1)}))},J=function(t){return!(!t||!(t.type||t.url||t.serverURL))&&!(t.serverURL||t.type&&le(t.type))&&(t.type?$({type:t.type}):$({url:t.url})||yt.html5Only||t.url.match(/data:/i))},nt=function(t){var e;return t&&(e=Kt?re:yt.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":re,t.src=e,t._called_unload!==i&&(t._called_load=!1)),Nt&&(at=null),e},$=function(t){if(!yt.useHTML5Audio||!yt.hasHTML5)return!1;var e,n,r,o,a=t.url||null,s=t.type||null,u=yt.audioFormats;if(s&&yt.html5[s]!==i)return yt.html5[s]&&!le(s);if(!et){for(o in et=[],u)u.hasOwnProperty(o)&&(et.push(o),u[o].related&&(et=et.concat(u[o].related)));et=new RegExp("\\.("+et.join("|")+")(\\?.*)?$","i")}return(r=a?a.toLowerCase().match(et):null)&&r.length?r=r[1]:s?r=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):e=!1,r&&yt.html5[r]!==i?e=yt.html5[r]&&!le(r):(s="audio/"+r,e=yt.html5.canPlayType({type:s}),yt.html5[r]=e,e=e&&yt.html5[s]&&!le(s)),e},ot=function(){if(!yt.useHTML5Audio||!yt.hasHTML5)return yt.html5.usingFlash=!0,jt=!0,!1;var t,e,n,r,o=Audio!==i?Zt&&opera.version()<10?new Audio(null):new Audio:null,a={};function s(t){var e,n,i=!1,a=!1;if(!o||"function"!=typeof o.canPlayType)return i;if(t instanceof Array){for(r=0,n=t.length;r<n;r++)(yt.html5[t[r]]||o.canPlayType(t[r]).match(yt.html5Test))&&(a=!0,yt.html5[t[r]]=!0,yt.flash[t[r]]=!!t[r].match(ne));i=a}else i=!(!(e=!(!o||"function"!=typeof o.canPlayType)&&o.canPlayType(t))||!e.match(yt.html5Test));return i}for(t in n=yt.audioFormats)if(n.hasOwnProperty(t)&&(e="audio/"+t,a[t]=s(n[t].type),a[e]=a[t],t.match(ne)?(yt.flash[t]=!0,yt.flash[e]=!0):(yt.flash[t]=!1,yt.flash[e]=!1),n[t]&&n[t].related))for(r=n[t].related.length-1;r>=0;r--)a["audio/"+n[t].related[r]]=a[t],yt.html5[n[t].related[r]]=a[t],yt.flash[n[t].related[r]]=a[t];return a.canPlayType=o?s:null,yt.html5=d(yt.html5,a),yt.html5.usingFlash=X(),jt=yt.html5.usingFlash,!0},V={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:gt+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:At+"Verify that %s is a valid path.",tryDebug:"Try "+gt+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:At+"Non-HTTP page ("+_t.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:At+"Special case: Waiting for SWF to load with window focus...",waitForever:At+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:At+"Waiting for 100% SWF load...",needFunction:At+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:At+"_debug(): Current sound objects",waitOnload:At+"Waiting for window.onload()",docLoaded:At+"Document already loaded",onload:At+"initComplete(): calling soundManager.onload()",onloadOK:gt+".onload() complete",didInit:At+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:At+"Failed to remove Flash node.",shutdown:gt+".disable(): Shutting down",queue:At+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+B.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:At+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:gt+".load(): current URL already assigned.",badFV:gt+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:At+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:At+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:gt+".setup(): allowed parameters: %s",setupError:gt+'.setup(): "%s" cannot be assigned with this method.',setupUndef:gt+'.setup(): Could not find option "%s"',setupLate:gt+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:At+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:gt+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},F=function(){var t,e,n,r,o;if(r=(t=Bt.call(arguments)).shift(),(o=V&&V[r]?V[r]:"")&&t&&t.length)for(e=0,n=t.length;e<n;e++)o=o.replace("%s",t[e]);return o},U=function(t){return 8===l&&t.loops>1&&t.stream&&(h("as2loop"),t.stream=!1),t},H=function(t,e){return t&&!t.usePolicyFile&&(t.onid3||t.usePeakData||t.useWaveformData||t.useEQData)&&(yt._wD((e||"")+F("policy")),t.usePolicyFile=!0),t},Y=function(t){Jt&&console.warn!==i?console.warn(t):yt._wD(t)},a=function(){return!1},q=function(t){var e;for(e in t)t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t[e]=a);e=null},R=function(t){t===i&&(t=!1),(Lt||t)&&yt.disable(t)},D=function(t){var e;if(t)if(t.match(/\.swf(\?.*)?$/i)){if(t.substr(t.toLowerCase().lastIndexOf(".swf?")+4))return t}else t.lastIndexOf("/")!==t.length-1&&(t+="/");return e=(t&&-1!==t.lastIndexOf("/")?t.substr(0,t.lastIndexOf("/")+1):"./")+yt.movieURL,yt.noSWFCache&&(e+="?ts="+(new Date).getTime()),e},_=function(){8!==(l=parseInt(yt.flashVersion,10))&&9!==l&&(yt._wD(F("badFV",l,8)),yt.flashVersion=l=8);var t=yt.debugMode||yt.debugFlash?"_debug.swf":".swf";yt.useHTML5Audio&&!yt.html5Only&&yt.audioFormats.mp4.required&&l<9&&(yt._wD(F("needfl9")),yt.flashVersion=l=9),yt.version=yt.versionNumber+(yt.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(yt.defaultOptions=d(yt.defaultOptions,yt.flash9Options),yt.features.buffering=!0,yt.defaultOptions=d(yt.defaultOptions,yt.movieStarOptions),yt.filePatterns.flash9=new RegExp("\\.(mp3|"+se.join("|")+")(\\?.*)?$","i"),yt.features.movieStar=!0):yt.features.movieStar=!1,yt.filePattern=yt.filePatterns[8!==l?"flash9":"flash8"],yt.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",t),yt.features.peakData=yt.features.waveformData=yt.features.eqData=l>8},I=function(t,e){mt&&mt._setPolling(t,e)},T=function(){if(yt.debugURLParam.test(wt)&&(yt.setupOptions.debugMode=yt.debugMode=!0),!r(yt.debugID)){var t,e,n,o,i;if(yt.debugMode&&!r(yt.debugID)&&(!Jt||!yt.useConsole||!yt.consoleOnly)){for(i in(t=_t.createElement("div")).id=yt.debugID+"-toggle",o={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},t.appendChild(_t.createTextNode("-")),t.onclick=N,t.title="Toggle SM2 debug console",bt.match(/msie 6/i)&&(t.style.position="absolute",t.style.cursor="hand"),o)o.hasOwnProperty(i)&&(t.style[i]=o[i]);if((e=_t.createElement("div")).id=yt.debugID,e.style.display=yt.debugMode?"block":"none",yt.debugMode&&!r(t.id)){try{(n=M()).appendChild(t)}catch(t){throw new Error(F("domError")+" \n"+t.toString())}n.appendChild(e)}}n=null}},Q=this.getSoundById,h=function(t,e){return t?yt._wD(F(t),e):""},N=function(){var t=r(yt.debugID),e=r(yt.debugID+"-toggle");t&&(Vt?(e.innerHTML="+",t.style.display="none"):(e.innerHTML="-",t.style.display="block"),Vt=!Vt)},c=function(t,e,n){if(o.sm2Debugger!==i)try{sm2Debugger.handleEvent(t,e,n)}catch(t){return!1}return!0},j=function(){var t=[];return yt.debugMode&&t.push(B.sm2Debug),yt.debugFlash&&t.push(B.flashDebug),yt.useHighPerformance&&t.push(B.highPerf),t.join(" ")},C=function(){var t=F("fbHandler"),e=yt.getMoviePercent(),n=B,r={type:"FLASHBLOCK"};yt.html5Only||(yt.ok()?(yt.didFlashBlock&&yt._wD(t+": Unblocked"),yt.oMC&&(yt.oMC.className=[j(),n.swfDefault,n.swfLoaded+(yt.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(jt&&(yt.oMC.className=j()+" "+n.swfDefault+" "+(null===e?n.swfTimedout:n.swfError),yt._wD(t+": "+F("fbTimeout")+(e?" ("+F("fbLoaded")+")":""))),yt.didFlashBlock=!0,m({type:"ontimeout",ignoreInit:!0,error:r}),E(r)))},v=function(t,e,n){kt[t]===i&&(kt[t]=[]),kt[t].push({method:e,scope:n||null,fired:!1})},m=function(t){if(t||(t={type:yt.ok()?"onready":"ontimeout"}),!xt&&t&&!t.ignoreInit)return!1;if("ontimeout"===t.type&&(yt.ok()||Lt&&!t.ignoreInit))return!1;var e,n,r={success:t&&t.ignoreInit?yt.ok():!Lt},o=t&&t.type&&kt[t.type]||[],i=[],a=[r],s=jt&&!yt.ok();for(t.error&&(a[0].error=t.error),e=0,n=o.length;e<n;e++)!0!==o[e].fired&&i.push(o[e]);if(i.length)for(e=0,n=i.length;e<n;e++)i[e].scope?i[e].method.apply(i[e].scope,a):i[e].method.apply(this,a),s||(i[e].fired=!0);return!0},g=function(){o.setTimeout((function(){yt.useFlashBlock&&C(),m(),"function"==typeof yt.onload&&(h("onload",1),yt.onload.apply(o),h("onloadOK",1)),yt.waitForWindowLoad&&it.add(o,"load",g)}),1)},ut=function(){if(st!==i)return st;var t,e,n,r,a=!1,s=navigator,u=o.ActiveXObject;try{r=s.plugins}catch(t){r=void 0}if(r&&r.length)e="application/x-shockwave-flash",(n=s.mimeTypes)&&n[e]&&n[e].enabledPlugin&&n[e].enabledPlugin.description&&(a=!0);else if(u!==i&&!bt.match(/MSAppHost/i)){try{t=new u("ShockwaveFlash.ShockwaveFlash")}catch(e){t=null}a=!!t,t=null}return st=a,a},X=function(){var t,e,n=yt.audioFormats;if(Yt&&bt.match(/os (1|2|3_0|3_1)\s/i)?(yt.hasHTML5=!1,yt.html5Only=!0,yt.oMC&&(yt.oMC.style.display="none")):yt.useHTML5Audio&&(yt.html5&&yt.html5.canPlayType||(yt._wD("SoundManager: No HTML5 Audio() support detected."),yt.hasHTML5=!1),Xt&&yt._wD(At+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(st?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),yt.useHTML5Audio&&yt.hasHTML5)for(e in W=!0,n)n.hasOwnProperty(e)&&n[e].required&&(yt.html5.canPlayType(n[e].type)?yt.preferFlash&&(yt.flash[e]||yt.flash[n[e].type])&&(t=!0):(W=!1,t=!0));return yt.ignoreFlash&&(t=!1,W=!0),yt.html5Only=yt.hasHTML5&&yt.useHTML5Audio&&!t,!yt.html5Only},Z=function(t){var e,n,r,o=0;if(t instanceof Array){for(e=0,n=t.length;e<n;e++)if(t[e]instanceof Object){if(yt.canPlayMIME(t[e].type)){o=e;break}}else if(yt.canPlayURL(t[e])){o=e;break}t[o].url&&(t[o]=t[o].url),r=t[o]}else r=t;return r},G=function(t){t._hasTimer||(t._hasTimer=!0,!Wt&&yt.html5PollingInterval&&(null===Ft&&0===Dt&&(Ft=setInterval(K,yt.html5PollingInterval)),Dt++))},z=function(t){t._hasTimer&&(t._hasTimer=!1,!Wt&&yt.html5PollingInterval&&Dt--)},K=function(){var t;if(null!==Ft&&!Dt)return clearInterval(Ft),void(Ft=null);for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].isHTML5&&yt.sounds[yt.soundIDs[t]]._hasTimer&&yt.sounds[yt.soundIDs[t]]._onTimer()},E=function(t){t=t!==i?t:{},"function"==typeof yt.onerror&&yt.onerror.apply(o,[{type:t.type!==i?t.type:null}]),t.fatal!==i&&t.fatal&&yt.disable()},lt=function(){if(Xt&&ut()){var t,e,n=yt.audioFormats;for(e in n)if(n.hasOwnProperty(e)&&("mp3"===e||"mp4"===e)&&(yt._wD(gt+": Using flash fallback for "+e+" format"),yt.html5[e]=!1,n[e]&&n[e].related))for(t=n[e].related.length-1;t>=0;t--)yt.html5[n[e].related[t]]=!1}},this._setSandboxType=function(t){var e=yt.sandbox;e.type=t,e.description=e.types[e.types[t]!==i?t:"unknown"],"localWithFile"===e.type?(e.noRemote=!0,e.noLocal=!1,h("secNote",2)):"localWithNetwork"===e.type?(e.noRemote=!1,e.noLocal=!0):"localTrusted"===e.type&&(e.noRemote=!1,e.noLocal=!1)},this._externalInterfaceOK=function(t){if(!yt.swfLoaded){var e;if(c("swf",!0),c("flashtojs",!0),yt.swfLoaded=!0,te=!1,Xt&<(),!t||t.replace(/\+dev/i,"")!==yt.versionNumber.replace(/\+dev/i,""))return e=gt+': Fatal: JavaScript file build "'+yt.versionNumber+'" does not match Flash SWF build "'+t+'" at '+yt.url+". Ensure both are up-to-date.",void setTimeout((function(){throw new Error(e)}),0);setTimeout(u,Gt?100:1)}},P=function(t,e){if(Ot&&St)return!1;function n(){var t,e=[],n=[];t="SoundManager "+yt.version+(!yt.html5Only&&yt.useHTML5Audio?yt.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),yt.html5Only?yt.html5PollingInterval&&e.push("html5PollingInterval ("+yt.html5PollingInterval+"ms)"):(yt.preferFlash&&e.push("preferFlash"),yt.useHighPerformance&&e.push("useHighPerformance"),yt.flashPollingInterval&&e.push("flashPollingInterval ("+yt.flashPollingInterval+"ms)"),yt.html5PollingInterval&&e.push("html5PollingInterval ("+yt.html5PollingInterval+"ms)"),yt.wmode&&e.push("wmode ("+yt.wmode+")"),yt.debugFlash&&e.push("debugFlash"),yt.useFlashBlock&&e.push("flashBlock")),e.length&&(n=n.concat([e.join(" + ")])),yt._wD(t+(n.length?" + "+n.join(", "):""),1),ht()}if(yt.html5Only)return _(),n(),yt.oMC=r(yt.movieID),u(),Ot=!0,St=!0,!1;var o,a,s,l,c,h,f,d,p,y=e||yt.url,v=yt.altURL||y,m=M(),g=j(),A=_t.getElementsByTagName("html")[0];function b(t,e){return'<param name="'+t+'" value="'+e+'" />'}if(o=A&&A.dir&&A.dir.match(/rtl/i),t=t===i?yt.id:t,_(),yt.url=D(oe?y:v),e=yt.url,yt.wmode=!yt.wmode&&yt.useHighPerformance?"transparent":yt.wmode,null!==yt.wmode&&(bt.match(/msie 8/i)||!Gt&&!yt.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Ct.push(V.spcWmode),yt.wmode=null),a={name:t,id:t,src:e,quality:"high",allowScriptAccess:yt.allowScriptAccess,bgcolor:yt.bgColor,pluginspage:ie+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:yt.wmode,hasPriority:"true"},yt.debugFlash&&(a.FlashVars="debug=1"),yt.wmode||delete a.wmode,Gt)s=_t.createElement("div"),c=['<object id="'+t+'" data="'+e+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",e),b("AllowScriptAccess",yt.allowScriptAccess),b("quality",a.quality),yt.wmode?b("wmode",yt.wmode):"",b("bgcolor",yt.bgColor),b("hasPriority","true"),yt.debugFlash?b("FlashVars",a.FlashVars):"","</object>"].join("");else for(l in s=_t.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(T(),g=j(),m=M())if(yt.oMC=r(yt.movieID)||_t.createElement("div"),yt.oMC.id)p=yt.oMC.className,yt.oMC.className=(p?p+" ":B.swfDefault)+(g?" "+g:""),yt.oMC.appendChild(s),Gt&&((h=yt.oMC.appendChild(_t.createElement("div"))).className=B.swfBox,h.innerHTML=c),St=!0;else{if(yt.oMC.id=yt.movieID,yt.oMC.className=B.swfDefault+" "+g,f=null,h=null,yt.useFlashBlock||(yt.useHighPerformance?f={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(f={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},o&&(f.left=Math.abs(parseInt(f.left,10))+"px"))),zt&&(yt.oMC.style.zIndex=1e4),!yt.debugFlash)for(d in f)f.hasOwnProperty(d)&&(yt.oMC.style[d]=f[d]);try{Gt||yt.oMC.appendChild(s),m.appendChild(yt.oMC),Gt&&((h=yt.oMC.appendChild(_t.createElement("div"))).className=B.swfBox,h.innerHTML=c),St=!0}catch(t){throw new Error(F("domError")+" \n"+t.toString())}}return Ot=!0,n(),!0},O=function(){return yt.html5Only?(P(),!1):!mt&&(yt.url?((mt=yt.getMovie(yt.id))||(It?(Gt?yt.oMC.innerHTML=Tt:yt.oMC.appendChild(It),It=null,Ot=!0):P(yt.id,yt.url),mt=yt.getMovie(yt.id)),"function"==typeof yt.oninitmovie&&setTimeout(yt.oninitmovie,1),ft(),!0):(h("noURL"),!1))},A=function(){setTimeout(b,1e3)},w=function(){o.setTimeout((function(){Y(At+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),yt.setup({preferFlash:!1}).reboot(),yt.didFlashBlock=!0,yt.beginDelayedInit()}),1)},b=function(){var t,e=!1;yt.url&&(qt||(qt=!0,it.remove(o,"load",A),st&&te&&!$t?h("waitFocus"):(xt||(t=yt.getMoviePercent())>0&&t<100&&(e=!0),setTimeout((function(){if(t=yt.getMoviePercent(),e)return qt=!1,yt._wD(F("waitSWF")),void o.setTimeout(A,1);xt||(yt._wD(gt+": No Flash response within expected time. Likely causes: "+(0===t?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(yt.debugFlash?" "+F("checkSWF"):""),2),!oe&&t&&(h("localFail",2),yt.debugFlash||h("tryDebug",2)),0===t&&yt._wD(F("swf404",yt.url),1),c("flashtojs",!1,": Timed out"+(oe?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!xt&&ee&&(null===t?yt.useFlashBlock||0===yt.flashLoadTimeout?(yt.useFlashBlock&&C(),h("waitForever")):!yt.useFlashBlock&&W?w():(h("waitForever"),m({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===yt.flashLoadTimeout?h("waitForever"):!yt.useFlashBlock&&W?w():R(!0))}),yt.flashLoadTimeout))))},k=function(){function t(){it.remove(o,"focus",k)}return $t||!te?(t(),!0):(ee=!0,$t=!0,h("gotFocus"),qt=!1,A(),t(),!0)},ft=function(){Ct.length&&(yt._wD("SoundManager 2: "+Ct.join(" "),1),Ct=[])},ht=function(){ft();var t,e=[];if(yt.useHTML5Audio&&yt.hasHTML5){for(t in yt.audioFormats)yt.audioFormats.hasOwnProperty(t)&&e.push(t+" = "+yt.html5[t]+(!yt.html5[t]&&jt&&yt.flash[t]?" (using flash)":yt.preferFlash&&yt.flash[t]&&jt?" (preferring flash)":yt.html5[t]?"":" ("+(yt.audioFormats[t].required?"required, ":"")+"and no flash support)"));yt._wD("SoundManager 2 HTML5 support: "+e.join(", "),1)}},f=function(t){if(xt)return!1;if(yt.html5Only)return h("sm2Loaded",1),xt=!0,g(),c("onload",!0),!0;var e,n=!0;return yt.useFlashBlock&&yt.flashLoadTimeout&&!yt.getMoviePercent()||(xt=!0),e={type:!st&&jt?"NO_FLASH":"INIT_TIMEOUT"},yt._wD("SoundManager 2 "+(Lt?"failed to load":"loaded")+" ("+(Lt?"Flash security/load error":"OK")+") "+String.fromCharCode(Lt?10006:10003),Lt?2:1),Lt||t?(yt.useFlashBlock&&yt.oMC&&(yt.oMC.className=j()+" "+(null===yt.getMoviePercent()?B.swfTimedout:B.swfError)),m({type:"ontimeout",error:e,ignoreInit:!0}),c("onload",!1),E(e),n=!1):c("onload",!0),Lt||(yt.waitForWindowLoad&&!Mt?(h("waitOnload"),it.add(o,"load",g)):(yt.waitForWindowLoad&&Mt&&h("docLoaded"),g())),n},s=function(){var t,e=yt.setupOptions;for(t in e)e.hasOwnProperty(t)&&(yt[t]===i?yt[t]=e[t]:yt[t]!==e[t]&&(yt.setupOptions[t]=yt[t]))},u=function(){if(xt)return h("didInit"),!1;function t(){it.remove(o,"load",yt.beginDelayedInit)}if(yt.html5Only)return xt||(t(),yt.enabled=!0,f()),!0;O();try{mt._externalInterfaceTest(!1),I(!0,yt.flashPollingInterval||(yt.useHighPerformance?10:50)),yt.debugMode||mt._disableDebug(),yt.enabled=!0,c("jstoflash",!0),yt.html5Only||it.add(o,"unload",a)}catch(t){return yt._wD("js/flash exception: "+t.toString()),c("jstoflash",!1),E({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),R(!0),f(),!1}return f(),t(),!0},S=function(){return!L&&(L=!0,s(),T(),!st&&yt.hasHTML5&&(yt._wD("SoundManager 2: No Flash detected"+(yt.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),yt.setup({useHTML5Audio:!0,preferFlash:!1})),ot(),!st&&jt&&(Ct.push(V.needFlash),yt.setup({flashLoadTimeout:1})),_t.removeEventListener&&_t.removeEventListener("DOMContentLoaded",S,!1),O(),!0)},rt=function(){return"complete"===_t.readyState&&(S(),_t.detachEvent("onreadystatechange",rt)),!0},x=function(){Mt=!0,S(),it.remove(o,"load",x)},ut(),it.add(o,"focus",k),it.add(o,"load",A),it.add(o,"load",x),_t.addEventListener?_t.addEventListener("DOMContentLoaded",S,!1):_t.attachEvent?_t.attachEvent("onreadystatechange",rt):(c("onload",!1),E({type:"NO_DOM2_EVENTS",fatal:!0}))}o.SM2_DEFER!==i&&SM2_DEFER||(a=new s),t&&"object"==typeof t.exports?(t.exports.SoundManager=s,t.exports.soundManager=a):void 0===(r=function(){return{constructor:s,getInstance:function(t){if(!o.soundManager&&t instanceof Function){var e=t(s);e instanceof s&&(o.soundManager=e)}return o.soundManager}}}.call(e,n,e,t))||(t.exports=r),o.SoundManager=s,o.soundManager=a}(window)}},function(t){t(t.s=4025)}]);
|
3
3
|
//# sourceMappingURL=plugin.tts.js.map
|