@internetarchive/bookreader 5.0.0-42 → 5.0.0-43
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/node.js.yml +14 -14
- package/.github/workflows/npm-publish.yml +4 -4
- package/BookReader/BookReader.css +13 -13
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +87 -87
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/images/BRicons.svg +2 -2
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.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-1.10.1.js +1 -1
- package/BookReader/jquery-1.10.1.js.LICENSE.txt +6 -6
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.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 +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- 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/CHANGELOG.md +5 -0
- package/package.json +17 -16
- package/renovate.json +6 -0
- package/scripts/preversion.js +4 -1
- package/src/BookNavigator/search/a-search-result.js +4 -6
- package/src/plugins/search/plugin.search.js +17 -4
- package/src/plugins/search/view.js +1 -3
- package/tests/{karma → jest}/BookNavigator/search/search-provider.test.js +29 -29
- package/tests/{karma → jest}/BookNavigator/search/search-results.test.js +57 -56
- package/tests/jest/plugins/search/plugin.search.test.js +40 -23
@@ -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],{2862:function(e,t,n){"use strict";n(5666),n(4916),n(1539),n(9714),n(4723),n(9826),n(2222),n(1249),n(8309),n(4678),n(8674),n(9720),n(4747),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(7327),n(6755),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 V(e){return(V="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 k(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){k(a,o,i,r,s,"next",e)}function s(e){k(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"===V(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,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAAFRIAAAEAAAB4VKTpEDv//////////////////8kDdm9yYmlzKwAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMTIwMjAzIChPbW5pcHJlc2VudCkAAAAAAQV2b3JiaXMpQkNWAQAIAAAAMUwgxYDQkFUAABAAAGAkKQ6TZkkppZShKHmYlEhJKaWUxTCJmJSJxRhjjDHGGGOMMcYYY4wgNGQVAAAEAIAoCY6j5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QQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},C=n(7775),D=(n(3123),n(1030));function F(e,t){return new Promise((function(n){e.addEventListener(t,(function o(i){e.removeEventListener(t,o),n(i)}))}))}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<D.Z.length;n++)for(var o=0;o<t.length;o++){var i=t[o];if(-1!=D.Z[n][U[i]].split(", ").map((function(e){return e.toLowerCase()})).indexOf(e))return D.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(){return speechSynthesis.getVoices()}},{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=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),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 t._lastEvents.start=e})),this.utterance.addEventListener("boundary",(function(e){return t._lastEvents.boundary=e})),this.utterance.addEventListener("pause",(function(e){return t._lastEvents.pause=e})),this.utterance.addEventListener("start",(function(){t.started=!0,t.stopped=!1,t.paused=!1})),this.utterance.addEventListener("pause",(function(){return t.paused=!0})),this.utterance.addEventListener("resume",(function(){return t.paused=!1})),this.utterance.addEventListener("end",(function(e){t.paused||t.stopped||t.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(0,C.i7)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([F(this.utterance,"end"),F(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=F(this.utterance,"pause"),speechSynthesis.pause(),n=(0,C.vU)()&&B(),!(0,C.i7)()&&!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=(0,C.i7)()&&B()||(0,C.vU)()&&B(),n=(0,C.i7)()||t,o=F(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=F(this.utterance,"pause").then((function(){return"paused"})),o=F(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([F(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+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+rfdWCLKMhUBmZhIDqt23LQGBjyNGEjBCnI5JGjRWkU2a8b29z/+n6/9SnN7L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G2IdgAjNozJQByAMF/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",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)}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){e.empty(),t.ttsEngine.getVoices().length>1?(e.append(t.ttsEngine.getVoices().map((function(e){return re('<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>"))}))),e.val(t.ttsEngine.voice.voiceURI),e.show()):e.hide()},i=this.refs.$BRReadAloudToolbar.find("[name=playback-voice]");o(i),i.on("change",(function(e){return t.ttsEngine.setVoice(i.val())})),this.ttsEngine.events.on("pause resume start",(function(){return t.ttsUpdateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return o(i)})),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 a=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",(function(e){return t.ttsEngine.setPlaybackRate(parseFloat(a.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.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,t=(e=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)})),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)}))});return function(e){return t.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(e){var t=this.constMode2up==this.mode,n=null,o=new Promise((function(e){return n=e}));return t?e==this.twoPage.currentIndexR||e==this.twoPage.currentIndexL?n():(this.animationFinishedCallback=n,this.jumpToIndex(e)):(this.jumpToIndex(e),n()),o},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._models.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)}}},7775:function(e,t,n){"use strict";function o(){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 i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(e)}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/safari/i.test(e)&&!/chrome|chromium/i.test(e)}n.d(t,{i7:function(){return o},vU:function(){return i},G6:function(){return a}}),n(4916)},2814:function(e,t,n){var o=n(7854),i=n(1340),a=n(3111).trim,r=n(1361),s=o.parseFloat,u=1/s(r+"-0")!=-1/0;e.exports=u?function(e){var t=a(i(e)),n=s(t);return 0===n&&"-"==t.charAt(0)?-0:n}:s},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})},4723:function(e,t,n){"use strict";var o=n(7007),i=n(9670),a=n(7466),r=n(1340),s=n(4488),u=n(1530),l=n(7651);o("match",(function(e,t,n){return[function(t){var n=s(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](r(n))},function(e){var o=i(this),s=r(e),c=n(t,o,s);if(c.done)return c.value;if(!o.global)return l(o,s);var d=o.unicode;o.lastIndex=0;for(var h,f=[],p=0;null!==(h=l(o,s));){var m=r(h[0]);f[p]=m,""===m&&(o.lastIndex=u(s,a(o.lastIndex),d)),p++}return 0===p?null:f}]}))},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,V,k,_,M,S,O,P,I,x,R,E,L,q,T,C,D,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(),Ve=document,ke=[],_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,Ce=0,De=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=Ve.hasFocus!==a?Ve.hasFocus():null,et=Ze&&(Ve.hasFocus===a||!Ve.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",it=Ve.location?Ve.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(D("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"!==Ve.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)||Ve[e]||i[e]},this.createSound=function(e,t){var o,i,r,s=null;if(i=(o=ye+".createSound(): ")+D(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+D("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(): "+D(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 D("needFunction",n);return Oe&&me._wD(D("queue",n)),t||(t=i),A(n,e,t),g(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw D("needFunction",n);return Oe&&me._wD(D("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=Ve.createElement("div"),++xe%2==0&&(i.className="sm2-alt"),t=t===a?0:parseInt(t,10),i.appendChild(Ve.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)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,a=ke[n].length;o<a;o++)ke[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+D("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+D("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 Ve.body||Ve.getElementsByTagName("div")[0]},o=function(e){return Ve.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(D("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(D(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(D(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 ("+Ve.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."},D=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||"")+D("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)},C=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},V=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(D("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(D("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=Ve.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(Ve.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=Ve.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(D("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Y=this.getSoundById,d=function(e,t){return e?me._wD(D(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=D("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+": "+D("fbTimeout")+(t?" ("+D("fbLoaded")+")":""))),me.didFlashBlock=!0,g({type:"ontimeout",ignoreInit:!0,error:o}),R(o)))},A=function(e,t,n){ke[e]===a&&(ke[e]=[]),ke[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&&ke[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===De&&0===Ce&&(De=setInterval(Z,me.html5PollingInterval)),Ce++))},K=function(e){e._hasTimer&&(e._hasTimer=!1,!We&&me.html5PollingInterval&&Ce--)},Z=function(){var e;if(null!==De&&!Ce)return clearInterval(De),void(De=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 V(),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=Ve.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,V(),me.url=C(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=Ve.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=Ve.createElement("embed"),r)r.hasOwnProperty(l)&&s.setAttribute(l,r[l]);if(L(),y=B(),g=I())if(me.oMC=o(me.movieID)||Ve.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(Ve.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(Ve.createElement("div"))).className=U.swfBox,d.innerHTML=c),Se=!0}catch(e){throw new Error(D("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(D("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?" "+D("checkSWF"):""),2),!it&&e&&(d("localFail",2),me.debugFlash||d("tryDebug",2)),0===e&&me._wD(D("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))))},k=function(){function e(){ae.remove(i,"focus",k)}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})),Ve.removeEventListener&&Ve.removeEventListener("DOMContentLoaded",S,!1),M(),!0)},oe=function(){return"complete"===Ve.readyState&&(S(),Ve.detachEvent("onreadystatechange",oe)),!0},O=function(){Ie=!0,S(),ae.remove(i,"load",O)},ue(),ae.add(i,"focus",k),ae.add(i,"load",v),ae.add(i,"load",O),Ve.addEventListener?Ve.addEventListener("DOMContentLoaded",S,!1):Ve.attachEvent?Ve.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=2862)}]);
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[34],{2862:function(e,t,n){"use strict";n(5666),n(4916),n(1539),n(9714),n(4723),n(9826),n(2222),n(1249),n(8309),n(4678),n(8674),n(9720),n(4747),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(7327),n(6755),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 V(e){return(V="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 k(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){k(a,o,i,r,s,"next",e)}function s(e){k(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"===V(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,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAAFRIAAAEAAAB4VKTpEDv//////////////////8kDdm9yYmlzKwAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMTIwMjAzIChPbW5pcHJlc2VudCkAAAAAAQV2b3JiaXMpQkNWAQAIAAAAMUwgxYDQkFUAABAAAGAkKQ6TZkkppZShKHmYlEhJKaWUxTCJmJSJxRhjjDHGGGOMMcYYY4wgNGQVAAAEAIAoCY6j5klqzj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ihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},C=n(7775),D=(n(3123),n(1030));function F(e,t){return new Promise((function(n){e.addEventListener(t,(function o(i){e.removeEventListener(t,o),n(i)}))}))}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<D.Z.length;n++)for(var o=0;o<t.length;o++){var i=t[o];if(-1!=D.Z[n][U[i]].split(", ").map((function(e){return e.toLowerCase()})).indexOf(e))return D.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(){return speechSynthesis.getVoices()}},{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=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),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 t._lastEvents.start=e})),this.utterance.addEventListener("boundary",(function(e){return t._lastEvents.boundary=e})),this.utterance.addEventListener("pause",(function(e){return t._lastEvents.pause=e})),this.utterance.addEventListener("start",(function(){t.started=!0,t.stopped=!1,t.paused=!1})),this.utterance.addEventListener("pause",(function(){return t.paused=!0})),this.utterance.addEventListener("resume",(function(){return t.paused=!1})),this.utterance.addEventListener("end",(function(e){t.paused||t.stopped||t.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(0,C.i7)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([F(this.utterance,"end"),F(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=F(this.utterance,"pause"),speechSynthesis.pause(),n=(0,C.vU)()&&B(),!(0,C.i7)()&&!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=(0,C.i7)()&&B()||(0,C.vU)()&&B(),n=(0,C.i7)()||t,o=F(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=F(this.utterance,"pause").then((function(){return"paused"})),o=F(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([F(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+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+rfdWCLKMhUBmZhIDqt23LQGBjyNGEjBCnI5JGjRWkU2a8b29z/+n6/9SnN7LUfo/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gAjNozJQByAMF/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",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)}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){e.empty(),t.ttsEngine.getVoices().length>1?(e.append(t.ttsEngine.getVoices().map((function(e){return re('<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>"))}))),e.val(t.ttsEngine.voice.voiceURI),e.show()):e.hide()},i=this.refs.$BRReadAloudToolbar.find("[name=playback-voice]");o(i),i.on("change",(function(e){return t.ttsEngine.setVoice(i.val())})),this.ttsEngine.events.on("pause resume start",(function(){return t.ttsUpdateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return o(i)})),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 a=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",(function(e){return t.ttsEngine.setPlaybackRate(parseFloat(a.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.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,t=(e=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)})),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)}))});return function(e){return t.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(e){var t=this.constMode2up==this.mode,n=null,o=new Promise((function(e){return n=e}));return t?e==this.twoPage.currentIndexR||e==this.twoPage.currentIndexL?n():(this.animationFinishedCallback=n,this.jumpToIndex(e)):(this.jumpToIndex(e),n()),o},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._models.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)}}},7775:function(e,t,n){"use strict";function o(){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 i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(e)}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/safari/i.test(e)&&!/chrome|chromium/i.test(e)}n.d(t,{i7:function(){return o},vU:function(){return i},G6:function(){return a}}),n(4916)},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})},4723:function(e,t,n){"use strict";var o=n(6916),i=n(7007),a=n(9670),r=n(7466),s=n(1340),u=n(4488),l=n(8173),c=n(1530),d=n(7651);i("match",(function(e,t,n){return[function(t){var n=u(this),i=null==t?void 0:l(t,e);return i?o(i,t,n):new RegExp(t)[e](s(n))},function(e){var o=a(this),i=s(e),u=n(t,o,i);if(u.done)return u.value;if(!o.global)return d(o,i);var l=o.unicode;o.lastIndex=0;for(var h,f=[],p=0;null!==(h=d(o,i));){var m=s(h[0]);f[p]=m,""===m&&(o.lastIndex=c(i,r(o.lastIndex),l)),p++}return 0===p?null:f}]}))},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,V,k,_,M,S,O,P,I,x,R,E,L,q,T,C,D,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(),Ve=document,ke=[],_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,Ce=0,De=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=Ve.hasFocus!==a?Ve.hasFocus():null,et=Ze&&(Ve.hasFocus===a||!Ve.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",it=Ve.location?Ve.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(D("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"!==Ve.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)||Ve[e]||i[e]},this.createSound=function(e,t){var o,i,r,s=null;if(i=(o=ye+".createSound(): ")+D(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+D("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(): "+D(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 D("needFunction",n);return Oe&&me._wD(D("queue",n)),t||(t=i),A(n,e,t),g(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw D("needFunction",n);return Oe&&me._wD(D("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=Ve.createElement("div"),++xe%2==0&&(i.className="sm2-alt"),t=t===a?0:parseInt(t,10),i.appendChild(Ve.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)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,a=ke[n].length;o<a;o++)ke[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+D("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+D("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 Ve.body||Ve.getElementsByTagName("div")[0]},o=function(e){return Ve.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(D("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(D(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(D(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 ("+Ve.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."},D=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||"")+D("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)},C=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},V=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(D("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(D("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=Ve.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(Ve.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=Ve.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(D("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Y=this.getSoundById,d=function(e,t){return e?me._wD(D(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=D("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+": "+D("fbTimeout")+(t?" ("+D("fbLoaded")+")":""))),me.didFlashBlock=!0,g({type:"ontimeout",ignoreInit:!0,error:o}),R(o)))},A=function(e,t,n){ke[e]===a&&(ke[e]=[]),ke[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&&ke[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===De&&0===Ce&&(De=setInterval(Z,me.html5PollingInterval)),Ce++))},K=function(e){e._hasTimer&&(e._hasTimer=!1,!We&&me.html5PollingInterval&&Ce--)},Z=function(){var e;if(null!==De&&!Ce)return clearInterval(De),void(De=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 V(),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=Ve.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,V(),me.url=C(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=Ve.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=Ve.createElement("embed"),r)r.hasOwnProperty(l)&&s.setAttribute(l,r[l]);if(L(),y=B(),g=I())if(me.oMC=o(me.movieID)||Ve.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(Ve.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(Ve.createElement("div"))).className=U.swfBox,d.innerHTML=c),Se=!0}catch(e){throw new Error(D("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(D("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?" "+D("checkSWF"):""),2),!it&&e&&(d("localFail",2),me.debugFlash||d("tryDebug",2)),0===e&&me._wD(D("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))))},k=function(){function e(){ae.remove(i,"focus",k)}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})),Ve.removeEventListener&&Ve.removeEventListener("DOMContentLoaded",S,!1),M(),!0)},oe=function(){return"complete"===Ve.readyState&&(S(),Ve.detachEvent("onreadystatechange",oe)),!0},O=function(){Ie=!0,S(),ae.remove(i,"load",O)},ue(),ae.add(i,"focus",k),ae.add(i,"load",v),ae.add(i,"load",O),Ve.addEventListener?Ve.addEventListener("DOMContentLoaded",S,!1):Ve.attachEvent?Ve.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=2862)}]);
|
3
3
|
//# sourceMappingURL=plugin.tts.js.map
|