-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathableplayer.min.js
More file actions
3 lines (2 loc) · 215 KB
/
ableplayer.min.js
File metadata and controls
3 lines (2 loc) · 215 KB
1
2
3
/*! ableplayer V4.2.1 */
"use strict";var AblePlayerInstances=[];!function(o){o(document).ready(function(){o("video, audio").each(function(t,e){void 0!==o(e).data("able-player")&&AblePlayerInstances.push(new AblePlayer(o(this),o(e)))})}),window.onYouTubeIframeAPIReady=function(){AblePlayer.youtubeIframeAPIReady=!0,o("body").trigger("youtubeIframeAPIReady",[])},o(window).keydown(function(t){1===AblePlayer.nextIndex&&AblePlayer.lastCreated.onPlayerKeyPress(t)}),window.AblePlayer=function(t){if((AblePlayer.lastCreated=this).media=t,0!==o(t).length){if(void 0!==o(t).attr("autoplay")?(this.autoplay=!0,this.okToPlay=!0):(this.autoplay=!1,this.okToPlay=!1),void 0!==o(t).attr("loop")?this.loop=!0:this.loop=!1,void 0!==o(t).attr("playsinline")?this.playsInline="1":this.playsInline="0",o(t).attr("poster")?this.hasPoster=!0:this.hasPoster=!1,void 0!==o(t).data("start-time")&&o.isNumeric(o(t).data("start-time"))?this.startTime=o(t).data("start-time"):this.startTime=0,void 0!==o(t).data("debug")&&!1!==o(t).data("debug")?this.debug=!0:this.debug=!1,void 0!==o(t).data("root-path")?this.rootPath=o(t).data("root-path").replace(/\/?$/,"/"):this.rootPath=this.getRootPath(),this.defaultVolume=7,void 0!==o(t).data("volume")&&""!==o(t).data("volume")){var e=o(t).data("volume");0<=e&&e<=10&&(this.defaultVolume=e)}if(this.volume=this.defaultVolume,void 0!==o(t).data("use-chapters-button")&&!1===o(t).data("use-chapters-button")?this.useChaptersButton=!1:this.useChaptersButton=!0,void 0!==o(t).data("use-descriptions-button")&&!1===o(t).data("use-descriptions-button")?this.useDescriptionsButton=!1:this.useDescriptionsButton=!0,void 0!==o(t).data("descriptions-audible")&&!1===o(t).data("descriptions-audible")?this.exposeTextDescriptions=!1:void 0!==o(t).data("description-audible")&&!1===o(t).data("description-audible")?this.exposeTextDescriptions=!1:this.exposeTextDescriptions=!0,void 0!==o(t).data("heading-level")&&""!==o(t).data("heading-level")){var i=o(t).data("heading-level");/^[0-6]*$/.test(i)&&(this.playerHeadingLevel=i)}if(void 0!==o(t).data("transcript-div")&&""!==o(t).data("transcript-div")?this.transcriptDivLocation=o(t).data("transcript-div"):this.transcriptDivLocation=null,void 0!==o(t).data("include-transcript")&&!1===o(t).data("include-transcript")?this.hideTranscriptButton=!0:this.hideTranscriptButton=null,this.transcriptType=null,void 0!==o(t).data("transcript-src")?(this.transcriptSrc=o(t).data("transcript-src"),this.transcriptSrcHasRequiredParts()&&(this.transcriptType="manual")):0<o(t).find('track[kind="captions"], track[kind="subtitles"]').length&&(this.transcriptDivLocation?this.transcriptType="external":this.transcriptType="popup"),void 0!==o(t).data("lyrics-mode")&&!1!==o(t).data("lyrics-mode")?this.lyricsMode=!0:this.lyricsMode=!1,void 0!==o(t).data("transcript-title")&&""!==o(t).data("transcript-title")&&(this.transcriptTitle=o(t).data("transcript-title")),"overlay"===o(t).data("captions-position")?this.defaultCaptionsPosition="overlay":this.defaultCaptionsPosition="below",void 0!==o(t).data("chapters-div")&&""!==o(t).data("chapters-div")&&(this.chaptersDivLocation=o(t).data("chapters-div")),void 0!==o(t).data("chapters-title")&&(this.chaptersTitle=o(t).data("chapters-title")),void 0!==o(t).data("chapters-default")&&""!==o(t).data("chapters-default")?this.defaultChapter=o(t).data("chapters-default"):this.defaultChapter=null,"arrows"===o(t).data("speed-icons")?this.speedIcons="arrows":this.speedIcons="animals","chapter"===o(t).data("seekbar-scope")||"chapters"===o(t).data("seekbar-scope")?this.seekbarScope="chapter":this.seekbarScope="video",void 0!==o(t).data("youtube-id")&&""!==o(t).data("youtube-id")&&(this.youTubeId=o(t).data("youtube-id")),void 0!==o(t).data("youtube-desc-id")&&""!==o(t).data("youtube-desc-id")&&(this.youTubeDescId=o(t).data("youtube-desc-id")),void 0!==o(t).data("youtube-nocookie")&&o(t).data("youtube-nocookie")?this.youTubeNoCookie=!0:this.youTubeNoCookie=!1,void 0!==o(t).data("vimeo-id")&&""!==o(t).data("vimeo-id")&&(this.vimeoId=o(t).data("vimeo-id")),void 0!==o(t).data("vimeo-desc-id")&&""!==o(t).data("vimeo-desc-id")&&(this.vimeoDescId=o(t).data("vimeo-desc-id")),"2020"==o(t).data("skin")?this.skin="2020":this.skin="legacy",this.iconType="font",this.forceIconType=!1,void 0!==o(t).data("icon-type")&&""!==o(t).data("icon-type")){var s=o(t).data("icon-type");"font"!==s&&"image"!=s&&"svg"!=s||(this.iconType=s,this.forceIconType=!0)}if(void 0!==o(t).data("allow-fullscreen")&&!1===o(t).data("allow-fullscreen")?this.allowFullScreen=!1:this.allowFullScreen=!0,this.defaultSeekInterval=10,this.useFixedSeekInterval=!1,void 0!==o(t).data("seek-interval")&&""!==o(t).data("seek-interval")){var a=o(t).data("seek-interval");/^[1-9][0-9]*$/.test(a)&&(this.seekInterval=a,this.useFixedSeekInterval=!0)}if(void 0!==o(t).data("show-now-playing")&&!1===o(t).data("show-now-playing")?this.showNowPlaying=!1:this.showNowPlaying=!0,void 0!==o(t).data("use-ttml")?(this.useTtml=!0,this.convert=require("xml-js")):this.useTtml=!1,void 0!==o(t).data("test-fallback")&&!1!==o(t).data("test-fallback")&&(this.testFallback=!0),this.lang="en",void 0!==o(t).data("lang")&&""!==o(t).data("lang")){var n=o(t).data("lang");2==n.length&&(this.lang=n)}void 0!==o(t).data("force-lang")&&!1!==o(t).data("force-lang")?this.forceLang=!0:this.forceLang=!1,void 0!==o(t).data("meta-type")&&""!==o(t).data("meta-type")&&(this.metaType=o(t).data("meta-type")),void 0!==o(t).data("meta-div")&&""!==o(t).data("meta-div")&&(this.metaDiv=o(t).data("meta-div")),void 0!==o(t).data("search")&&""!==o(t).data("search")&&(void 0!==o(t).data("search-div")&&""!==o(t).data("search-div")&&(this.searchString=o(t).data("search"),this.searchDiv=o(t).data("search-div")),void 0!==o(t).data("search-lang")&&""!==o(t).data("search-lang")?this.searchLang=o(t).data("search-lang"):this.searchLang=null,void 0!==o(t).data("search-div")&&""!==o(t).data("search-div")&&(this.searchString=o(t).data("search"),this.searchDiv=o(t).data("search-div"))),void 0!==o(t).data("hide-controls")&&!1!==o(t).data("hide-controls")?(this.hideControls=!0,this.hideControlsOriginal=!0):(this.hideControls=!1,this.hideControlsOriginal=!1),this.setDefaults(),this.ableIndex=AblePlayer.nextIndex,AblePlayer.nextIndex+=1,this.title=o(t).attr("title"),this.tt={};var r=this;o.when(this.getTranslationText()).then(function(){50<r.countProperties(r.tt)?r.setup():r.provideFallback()})}else this.provideFallback()},AblePlayer.nextIndex=0,AblePlayer.prototype.setup=function(){var t=this;this.initializing=!0,this.reinitialize().then(function(){t.player?t.setupInstance().then(function(){t.setupInstancePlaylist(),t.hasPlaylist||t.recreatePlayer(),t.initializing=!1,t.playerCreated=!0}):t.provideFallback()})},AblePlayer.getActiveDOMElement=function(){for(var t=document.activeElement;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t},AblePlayer.localGetElementById=function(t,e){return t.getRootNode?o(t.getRootNode().querySelector("#"+e)):o(document.getElementById(e))},AblePlayer.youtubeIframeAPIReady=!1,AblePlayer.loadingYoutubeIframeAPI=!1}(jQuery),function(r){AblePlayer.prototype.setDefaults=function(){this.playerCreated=!1,this.playing=!1,this.paused=!0,this.clickedPlay=!1,this.fullscreen=!1,this.swappingSrc=!1,this.initializing=!1,this.cueingPlaylistItems=!1,this.okToPlay=!1,this.buttonWithFocus=null,this.getUserAgent(),this.setIconColor(),this.setButtonImages()},AblePlayer.prototype.getRootPath=function(){var t,e,i,s,a,n;for(t=document.getElementsByTagName("script"),e=0;e<t.length;e++)if(-1!==(i=t[e].src).substr(i.lastIndexOf("/")).indexOf("ableplayer")){s=i.split("?")[0];break}return n=(a=s.split("/").slice(0,-1).join("/")).lastIndexOf("/"),a.substring(0,n)+"/"},AblePlayer.prototype.setIconColor=function(){var t,e,i,s,a;for(t=["controller","toolbar"],e=0;e<t.length;e++)"controller"==t[e]?i=r("<div>",{class:"able-controller"}).hide():"toolbar"===t[e]&&(i=r("<div>",{class:"able-window-toolbar"}).hide()),r("body").append(i),a=.2126*(s=i.css("background-color").replace(/[^\d,]/g,"").split(","))[0]+.7152*s[1]+.0722*s[2]<125?"white":"black","controller"===t[e]?this.iconColor=a:"toolbar"===t[e]&&(this.toolbarIconColor=a),i.remove()},AblePlayer.prototype.setButtonImages=function(){this.imgPath=this.rootPath+"button-icons/"+this.iconColor+"/",this.playButtonImg=this.imgPath+"play.png",this.pauseButtonImg=this.imgPath+"pause.png",this.restartButtonImg=this.imgPath+"restart.png",this.rewindButtonImg=this.imgPath+"rewind.png",this.forwardButtonImg=this.imgPath+"forward.png",this.previousButtonImg=this.imgPath+"previous.png",this.nextButtonImg=this.imgPath+"next.png","arrows"===this.speedIcons?(this.fasterButtonImg=this.imgPath+"slower.png",this.slowerButtonImg=this.imgPath+"faster.png"):"animals"===this.speedIcons&&(this.fasterButtonImg=this.imgPath+"rabbit.png",this.slowerButtonImg=this.imgPath+"turtle.png"),this.captionsButtonImg=this.imgPath+"captions.png",this.chaptersButtonImg=this.imgPath+"chapters.png",this.signButtonImg=this.imgPath+"sign.png",this.transcriptButtonImg=this.imgPath+"transcript.png",this.descriptionsButtonImg=this.imgPath+"descriptions.png",this.fullscreenExpandButtonImg=this.imgPath+"fullscreen-expand.png",this.fullscreenCollapseButtonImg=this.imgPath+"fullscreen-collapse.png",this.prefsButtonImg=this.imgPath+"preferences.png",this.helpButtonImg=this.imgPath+"help.png"},AblePlayer.prototype.getSvgData=function(t){var e=Array();switch(t){case"play":e[0]="0 0 16 20",e[1]="M0 18.393v-16.429q0-0.29 0.184-0.402t0.441 0.033l14.821 8.237q0.257 0.145 0.257 0.346t-0.257 0.346l-14.821 8.237q-0.257 0.145-0.441 0.033t-0.184-0.402z";break;case"pause":e[0]="0 0 20 20",e[1]="M0 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502zM10 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h5.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-5.714q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"stop":e[0]="0 0 20 20",e[1]="M0 18.036v-15.714q0-0.29 0.212-0.502t0.502-0.212h15.714q0.29 0 0.502 0.212t0.212 0.502v15.714q0 0.29-0.212 0.502t-0.502 0.212h-15.714q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"restart":e[0]="0 0 20 20",e[1]="M18 8h-6l2.243-2.243c-1.133-1.133-2.64-1.757-4.243-1.757s-3.109 0.624-4.243 1.757c-1.133 1.133-1.757 2.64-1.757 4.243s0.624 3.109 1.757 4.243c1.133 1.133 2.64 1.757 4.243 1.757s3.109-0.624 4.243-1.757c0.095-0.095 0.185-0.192 0.273-0.292l1.505 1.317c-1.466 1.674-3.62 2.732-6.020 2.732-4.418 0-8-3.582-8-8s3.582-8 8-8c2.209 0 4.209 0.896 5.656 2.344l2.344-2.344v6z";break;case"rewind":e[0]="0 0 20 20",e[1]="M11.25 3.125v6.25l6.25-6.25v13.75l-6.25-6.25v6.25l-6.875-6.875z";break;case"forward":e[0]="0 0 20 20",e[1]="M10 16.875v-6.25l-6.25 6.25v-13.75l6.25 6.25v-6.25l6.875 6.875z";break;case"previous":e[0]="0 0 20 20",e[1]="M5 17.5v-15h2.5v6.875l6.25-6.25v13.75l-6.25-6.25v6.875z";break;case"next":e[0]="0 0 20 20",e[1]="M15 2.5v15h-2.5v-6.875l-6.25 6.25v-13.75l6.25 6.25v-6.875z";break;case"slower":e[0]="0 0 20 20",e[1]="M0 7.321q0-0.29 0.212-0.502t0.502-0.212h10q0.29 0 0.502 0.212t0.212 0.502-0.212 0.502l-5 5q-0.212 0.212-0.502 0.212t-0.502-0.212l-5-5q-0.212-0.212-0.212-0.502z";break;case"faster":e[0]="0 0 11 20",e[1]="M0 12.411q0-0.29 0.212-0.502l5-5q0.212-0.212 0.502-0.212t0.502 0.212l5 5q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-10q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"turtle":e[0]="0 0 20 20",e[1]="M17.212 3.846c-0.281-0.014-0.549 0.025-0.817 0.144-1.218 0.542-1.662 2.708-2.163 3.942-1.207 2.972-7.090 4.619-11.755 5.216-0.887 0.114-1.749 0.74-2.428 1.466 0.82-0.284 2.126-0.297 2.74 0.144 0.007 0.488-0.376 1.062-0.625 1.37-0.404 0.5-0.398 0.793 0.12 0.793 0.473 0 0.752 0.007 1.635 0 0.393-0.003 0.618-0.16 1.49-1.49 3.592 0.718 5.986-0.264 5.986-0.264s0.407 1.755 1.418 1.755h1.49c0.633 0 0.667-0.331 0.625-0.433-0.448-1.082-0.68-1.873-0.769-2.5-0.263-1.857 0.657-3.836 2.524-5.457 0.585 0.986 2.253 0.845 2.909-0.096s0.446-2.268-0.192-3.221c-0.49-0.732-1.345-1.327-2.188-1.37zM8.221 4.663c-0.722-0.016-1.536 0.111-2.5 0.409-4.211 1.302-4.177 4.951-3.51 5.745 0 0-0.955 0.479-0.409 1.274 0.448 0.652 3.139 0.191 5.409-0.529s4.226-1.793 5.312-2.692c0.948-0.785 0.551-2.106-0.505-1.947-0.494-0.98-1.632-2.212-3.798-2.26zM18.846 5.962c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577z";break;case"rabbit":e[0]="0 0 20 20",e[1]="M10.817 0c-2.248 0-1.586 0.525-1.154 0.505 1.551-0.072 5.199 0.044 6.851 2.428 0 0-1.022-2.933-5.697-2.933zM10.529 0.769c-2.572 0-2.837 0.51-2.837 1.106 0 0.545 1.526 0.836 2.524 0.697 2.778-0.386 4.231-0.12 5.264 0.865-1.010 0.779-0.75 1.401-1.274 1.851-1.093 0.941-2.643-0.673-4.976-0.673-2.496 0-4.712 1.92-4.712 4.76-0.157-0.537-0.769-0.913-1.442-0.913-0.974 0-1.514 0.637-1.514 1.49 0 0.769 1.13 1.791 2.861 0.938 0.499 1.208 2.265 1.364 2.452 1.418 0.538 0.154 1.875 0.098 1.875 0.865 0 0.794-1.034 1.094-1.034 1.707 0 1.070 1.758 0.873 2.284 1.034 1.683 0.517 2.103 1.214 2.788 2.212 0.771 1.122 2.572 1.408 2.572 0.625 0-3.185-4.413-4.126-4.399-4.135 0.608-0.382 2.139-1.397 2.139-3.534 0-1.295-0.703-2.256-1.755-2.861 1.256 0.094 2.572 1.205 2.572 2.74 0 1.877-0.653 2.823-0.769 2.957 1.975-1.158 3.193-3.91 3.029-6.37 0.61 0.401 1.27 0.577 1.971 0.625 0.751 0.052 1.475-0.225 1.635-0.529 0.38-0.723 0.162-2.321-0.12-2.837-0.763-1.392-2.236-1.73-3.606-1.683-1.202-1.671-3.812-2.356-5.529-2.356zM1.37 3.077l-0.553 1.538h3.726c0.521-0.576 1.541-1.207 2.284-1.538h-5.457zM18.846 5.192c0.325 0 0.577 0.252 0.577 0.577s-0.252 0.577-0.577 0.577c-0.325 0-0.577-0.252-0.577-0.577s0.252-0.577 0.577-0.577zM0.553 5.385l-0.553 1.538h3.197c0.26-0.824 0.586-1.328 0.769-1.538h-3.413z";break;case"ellipsis":e[0]="0 0 20 20",e[1]="M10.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2zM3.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.986 2.199-2.2s-0.984-2.2-2.199-2.2zM17.001 7.8c-1.215 0-2.201 0.985-2.201 2.2s0.986 2.2 2.201 2.2c1.215 0 2.199-0.985 2.199-2.2s-0.984-2.2-2.199-2.2z";break;case"pipe":e[0]="0 0 20 20",e[1]="M10.15 0.179h0.623c0.069 0 0.127 0.114 0.127 0.253v19.494c0 0.139-0.057 0.253-0.127 0.253h-1.247c-0.069 0-0.126-0.114-0.126-0.253v-19.494c0-0.139 0.057-0.253 0.126-0.253h0.623z";break;case"captions":e[0]="0 0 20 20",e[1]="M0.033 3.624h19.933v12.956h-19.933v-12.956zM18.098 10.045c-0.025-2.264-0.124-3.251-0.743-3.948-0.112-0.151-0.322-0.236-0.496-0.344-0.606-0.386-3.465-0.526-6.782-0.526s-6.313 0.14-6.907 0.526c-0.185 0.108-0.396 0.193-0.519 0.344-0.607 0.697-0.693 1.684-0.731 3.948 0.037 2.265 0.124 3.252 0.731 3.949 0.124 0.161 0.335 0.236 0.519 0.344 0.594 0.396 3.59 0.526 6.907 0.547 3.317-0.022 6.176-0.151 6.782-0.547 0.174-0.108 0.384-0.183 0.496-0.344 0.619-0.697 0.717-1.684 0.743-3.949v0 0zM9.689 9.281c-0.168-1.77-1.253-2.813-3.196-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.442-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.977zM16.607 9.281c-0.167-1.77-1.252-2.813-3.194-2.813-1.773 0-3.168 1.387-3.168 3.617 0 2.239 1.271 3.636 3.372 3.636 1.676 0 2.851-1.071 3.035-2.852h-2.003c-0.079 0.661-0.397 1.168-1.068 1.168-1.059 0-1.253-0.91-1.253-1.876 0-1.33 0.441-2.010 1.174-2.010 0.653 0 1.068 0.412 1.13 1.129h1.976z";break;case"descriptions":e[0]="0 0 20 20",e[1]="M17.623 3.57h-1.555c1.754 1.736 2.763 4.106 2.763 6.572 0 2.191-0.788 4.286-2.189 5.943h1.484c1.247-1.704 1.945-3.792 1.945-5.943-0-2.418-0.886-4.754-2.447-6.572v0zM14.449 3.57h-1.55c1.749 1.736 2.757 4.106 2.757 6.572 0 2.191-0.788 4.286-2.187 5.943h1.476c1.258-1.704 1.951-3.792 1.951-5.943-0-2.418-0.884-4.754-2.447-6.572v0zM11.269 3.57h-1.542c1.752 1.736 2.752 4.106 2.752 6.572 0 2.191-0.791 4.286-2.181 5.943h1.473c1.258-1.704 1.945-3.792 1.945-5.943 0-2.418-0.876-4.754-2.447-6.572v0zM10.24 9.857c0 3.459-2.826 6.265-6.303 6.265v0.011h-3.867v-12.555h3.896c3.477 0 6.274 2.806 6.274 6.279v0zM6.944 9.857c0-1.842-1.492-3.338-3.349-3.338h-0.876v6.686h0.876c1.858 0 3.349-1.498 3.349-3.348v0z";break;case"sign":e[0]="0 0 20 20",e[1]="M10.954 10.307c0.378 0.302 0.569 1.202 0.564 1.193 0.697 0.221 1.136 0.682 1.136 0.682 1.070-0.596 1.094-0.326 1.558-0.682 0.383-0.263 0.366-0.344 0.567-1.048 0.187-0.572-0.476-0.518-1.021-1.558-0.95 0.358-1.463 0.196-1.784 0.167-0.145-0.020-0.12 0.562-1.021 1.247zM14.409 17.196c-0.133 0.182-0.196 0.218-0.363 0.454-0.28 0.361 0.076 0.906 0.253 0.82 0.206-0.076 0.341-0.488 0.567-0.623 0.115-0.061 0.422-0.513 0.709-0.82 0.211-0.238 0.363-0.344 0.564-0.594 0.341-0.422 0.412-0.744 0.709-1.193 0.184-0.236 0.312-0.307 0.481-0.594 0.886-1.679 0.628-2.432 1.475-3.629 0.26-0.353 0.552-0.442 0.964-0.653 0.383-2.793-0.888-4.356-0.879-4.361-1.067 0.623-1.644 0.879-2.751 0.82-0.417-0.005-0.636-0.182-1.048-0.145-0.385 0.015-0.582 0.159-0.964 0.29-0.589 0.182-0.91 0.344-1.529 0.535-0.393 0.11-0.643 0.115-1.050 0.255-0.348 0.147-0.182 0.029-0.427 0.312-0.317 0.348-0.238 0.623-0.535 1.222-0.371 0.785-0.326 0.891-0.115 0.987-0.14 0.402-0.174 0.672-0.14 1.107 0.039 0.331-0.101 0.562 0.255 0.825 0.483 0.361 1.499 1.205 1.757 1.217 0.39-0.012 1.521 0.029 2.096-0.368 0.13-0.081 0.167-0.162 0.056 0.145-0.022 0.037-1.433 1.136-1.585 1.131-1.794 0.056-1.193 0.157-1.303 0.115-0.091 0-0.955-1.055-1.477-0.682-0.196 0.12-0.287 0.236-0.363 0.452 0.066 0.137 0.383 0.358 0.675 0.54 0.422 0.27 0.461 0.552 0.881 0.653 0.513 0.115 1.060 0.039 1.387 0.081 0.125 0.034 1.256-0.297 1.961-0.675 0.65-0.336-0.898 0.648-1.276 1.131-1.141 0.358-0.82 0.373-1.362 0.483-0.503 0.115-0.479 0.086-0.822 0.196-0.356 0.086-0.648 0.572-0.312 0.825 0.201 0.167 0.827-0.066 1.445-0.086 0.275-0.005 1.391-0.518 1.644-0.653 0.633-0.339 1.099-0.81 1.472-1.077 0.518-0.361-0.584 0.991-1.050 1.558zM8.855 9.799c-0.378-0.312-0.569-1.212-0.564-1.217-0.697-0.206-1.136-0.667-1.136-0.653-1.070 0.582-1.099 0.312-1.558 0.653-0.388 0.277-0.366 0.363-0.567 1.045-0.187 0.594 0.471 0.535 1.021 1.561 0.95-0.344 1.463-0.182 1.784-0.142 0.145 0.010 0.12-0.572 1.021-1.247zM5.4 2.911c0.133-0.191 0.196-0.228 0.368-0.454 0.27-0.371-0.081-0.915-0.253-0.849-0.211 0.096-0.346 0.508-0.599 0.653-0.093 0.052-0.4 0.503-0.682 0.82-0.211 0.228-0.363 0.334-0.564 0.599-0.346 0.407-0.412 0.729-0.709 1.161-0.184 0.258-0.317 0.324-0.481 0.621-0.886 1.669-0.631 2.422-1.475 3.6-0.26 0.38-0.552 0.461-0.964 0.682-0.383 2.788 0.883 4.346 0.879 4.336 1.068-0.609 1.639-0.861 2.751-0.825 0.417 0.025 0.636 0.201 1.048 0.174 0.385-0.025 0.582-0.169 0.964-0.285 0.589-0.196 0.91-0.358 1.499-0.54 0.422-0.12 0.672-0.125 1.080-0.285 0.348-0.128 0.182-0.010 0.427-0.282 0.312-0.358 0.238-0.633 0.508-1.217 0.398-0.8 0.353-0.906 0.142-0.991 0.135-0.412 0.174-0.677 0.14-1.107-0.044-0.336 0.101-0.572-0.255-0.82-0.483-0.375-1.499-1.22-1.752-1.222-0.395 0.002-1.526-0.039-2.101 0.339-0.13 0.101-0.167 0.182-0.056-0.11 0.022-0.052 1.433-1.148 1.585-1.163 1.794-0.039 1.193-0.14 1.303-0.088 0.091-0.007 0.955 1.045 1.477 0.682 0.191-0.13 0.287-0.245 0.368-0.452-0.071-0.147-0.388-0.368-0.68-0.537-0.422-0.282-0.464-0.564-0.881-0.655-0.513-0.125-1.065-0.049-1.387-0.11-0.125-0.015-1.256 0.317-1.956 0.68-0.66 0.351 0.893-0.631 1.276-1.136 1.136-0.339 0.81-0.353 1.36-0.479 0.501-0.101 0.476-0.071 0.82-0.172 0.351-0.096 0.648-0.577 0.312-0.849-0.206-0.152-0.827 0.081-1.44 0.086-0.28 0.020-1.396 0.533-1.649 0.677-0.633 0.329-1.099 0.8-1.472 1.048-0.523 0.38 0.584-0.967 1.050-1.529z";break;case"mute":case"volume-mute":e[0]="0 0 20 20",e[1]="M7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714zM18.75 12.093v1.657h-1.657l-2.093-2.093-2.093 2.093h-1.657v-1.657l2.093-2.093-2.093-2.093v-1.657h1.657l2.093 2.093 2.093-2.093h1.657v1.657l-2.093 2.093z";break;case"volume-soft":e[0]="0 0 20 20",e[1]="M10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"volume-medium":e[0]="0 0 20 20",e[1]="M14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"volume-loud":e[0]="0 0 21 20",e[1]="M17.384 18.009c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.712-1.712 2.654-3.988 2.654-6.408s-0.943-4.696-2.654-6.408c-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.066 2.066 3.204 4.813 3.204 7.734s-1.138 5.668-3.204 7.734c-0.183 0.183-0.423 0.275-0.663 0.275zM14.053 16.241c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 2.559-2.559 2.559-6.722 0-9.281-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c1.594 1.594 2.471 3.712 2.471 5.966s-0.878 4.373-2.471 5.966c-0.183 0.183-0.423 0.275-0.663 0.275zM10.723 14.473c-0.24 0-0.48-0.092-0.663-0.275-0.366-0.366-0.366-0.96 0-1.326 1.584-1.584 1.584-4.161 0-5.745-0.366-0.366-0.366-0.96 0-1.326s0.96-0.366 1.326 0c2.315 2.315 2.315 6.082 0 8.397-0.183 0.183-0.423 0.275-0.663 0.275zM7.839 1.536c0.501-0.501 0.911-0.331 0.911 0.378v16.172c0 0.709-0.41 0.879-0.911 0.378l-4.714-4.713h-3.125v-7.5h3.125l4.714-4.714z";break;case"chapters":e[0]="0 0 20 20",e[1]="M5 2.5v17.5l6.25-6.25 6.25 6.25v-17.5zM15 0h-12.5v17.5l1.25-1.25v-15h11.25z";break;case"transcript":e[0]="0 0 20 20",e[1]="M0 19.107v-17.857q0-0.446 0.313-0.759t0.759-0.313h8.929v6.071q0 0.446 0.313 0.759t0.759 0.313h6.071v11.786q0 0.446-0.313 0.759t-0.759 0.312h-15q-0.446 0-0.759-0.313t-0.313-0.759zM4.286 15.536q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 12.679q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM4.286 9.821q0 0.156 0.1 0.257t0.257 0.1h7.857q0.156 0 0.257-0.1t0.1-0.257v-0.714q0-0.156-0.1-0.257t-0.257-0.1h-7.857q-0.156 0-0.257 0.1t-0.1 0.257v0.714zM11.429 5.893v-5.268q0.246 0.156 0.402 0.313l4.554 4.554q0.156 0.156 0.313 0.402h-5.268z";break;case"preferences":e[0]="0 0 20 20",e[1]="M18.238 11.919c-1.049-1.817-0.418-4.147 1.409-5.205l-1.965-3.404c-0.562 0.329-1.214 0.518-1.911 0.518-2.1 0-3.803-1.714-3.803-3.828h-3.931c0.005 0.653-0.158 1.314-0.507 1.919-1.049 1.818-3.382 2.436-5.212 1.382l-1.965 3.404c0.566 0.322 1.056 0.793 1.404 1.396 1.048 1.815 0.42 4.139-1.401 5.2l1.965 3.404c0.56-0.326 1.209-0.513 1.902-0.513 2.094 0 3.792 1.703 3.803 3.808h3.931c-0.002-0.646 0.162-1.3 0.507-1.899 1.048-1.815 3.375-2.433 5.203-1.387l1.965-3.404c-0.562-0.322-1.049-0.791-1.395-1.391zM10 14.049c-2.236 0-4.050-1.813-4.050-4.049s1.813-4.049 4.050-4.049 4.049 1.813 4.049 4.049c-0 2.237-1.813 4.049-4.049 4.049z";break;case"close":e[0]="0 0 16 20",e[1]="M1.228 14.933q0-0.446 0.312-0.759l3.281-3.281-3.281-3.281q-0.313-0.313-0.313-0.759t0.313-0.759l1.518-1.518q0.313-0.313 0.759-0.313t0.759 0.313l3.281 3.281 3.281-3.281q0.313-0.313 0.759-0.313t0.759 0.313l1.518 1.518q0.313 0.313 0.313 0.759t-0.313 0.759l-3.281 3.281 3.281 3.281q0.313 0.313 0.313 0.759t-0.313 0.759l-1.518 1.518q-0.313 0.313-0.759 0.313t-0.759-0.313l-3.281-3.281-3.281 3.281q-0.313 0.313-0.759 0.313t-0.759-0.313l-1.518-1.518q-0.313-0.313-0.313-0.759z";break;case"fullscreen-expand":e[0]="0 0 20 20",e[1]="M0 18.036v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502zM8.717 8.393q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257z";break;case"fullscreen-collapse":e[0]="0 0 20 20",e[1]="M0.145 16.964q0-0.145 0.112-0.257l3.705-3.705-1.607-1.607q-0.212-0.212-0.212-0.502t0.212-0.502 0.502-0.212h5q0.29 0 0.502 0.212t0.212 0.502v5q0 0.29-0.212 0.502t-0.502 0.212-0.502-0.212l-1.607-1.607-3.705 3.705q-0.112 0.112-0.257 0.112t-0.257-0.112l-1.272-1.272q-0.112-0.112-0.112-0.257zM8.571 9.464v-5q0-0.29 0.212-0.502t0.502-0.212 0.502 0.212l1.607 1.607 3.705-3.705q0.112-0.112 0.257-0.112t0.257 0.112l1.272 1.272q0.112 0.112 0.112 0.257t-0.112 0.257l-3.705 3.705 1.607 1.607q0.212 0.212 0.212 0.502t-0.212 0.502-0.502 0.212h-5q-0.29 0-0.502-0.212t-0.212-0.502z";break;case"help":e[0]="0 0 11 20",e[1]="M0.577 6.317q-0.028-0.167 0.061-0.313 1.786-2.969 5.179-2.969 0.893 0 1.797 0.346t1.629 0.926 1.183 1.423 0.458 1.769q0 0.603-0.173 1.127t-0.391 0.854-0.614 0.664-0.642 0.485-0.681 0.396q-0.458 0.257-0.765 0.725t-0.307 0.748q0 0.19-0.134 0.363t-0.313 0.173h-2.679q-0.167 0-0.285-0.206t-0.117-0.419v-0.502q0-0.926 0.725-1.747t1.596-1.211q0.658-0.301 0.938-0.625t0.279-0.848q0-0.469-0.519-0.826t-1.2-0.357q-0.725 0-1.205 0.324-0.391 0.279-1.194 1.283-0.145 0.179-0.346 0.179-0.134 0-0.279-0.089l-1.83-1.395q-0.145-0.112-0.173-0.279zM3.786 16.875v-2.679q0-0.179 0.134-0.313t0.313-0.134h2.679q0.179 0 0.313 0.134t0.134 0.313v2.679q0 0.179-0.134 0.313t-0.313 0.134h-2.679q-0.179 0-0.313-0.134t-0.134-0.313z"}return e},AblePlayer.prototype.reinitialize=function(){var t,e;if(e=(t=new r.Deferred).promise(),this,window.console||(this.debug=!1),this.startedPlaying=!1,this.autoScrollTranscript=!0,this.$media=r(this.media).first(),this.media=this.$media[0],this.$media.is("audio"))this.mediaType="audio";else{if(!this.$media.is("video"))return this.provideFallback(),t.fail(),e;this.mediaType="video"}return this.$sources=this.$media.find("source"),this.player=this.getPlayer(),this.player||this.provideFallback(),this.setIconType(),this.setDimensions(),t.resolve(),e},AblePlayer.prototype.setDimensions=function(){this.$media.attr("width")&&this.$media.attr("height")?(this.playerMaxWidth=parseInt(this.$media.attr("width"),10),this.playerMaxHeight=parseInt(this.$media.attr("height"),10)):this.$media.attr("width")?this.playerMaxWidth=parseInt(this.$media.attr("width"),10):(this.playerMaxWidth=this.$media.parent().width(),this.playerMaxHeight=this.getMatchingHeight(this.playerMaxWidth)),this.$media.css({width:"100%",height:"auto"})},AblePlayer.prototype.getMatchingHeight=function(e){var t,i,s,a,n;return t=[3840,2560,1920,1280,854,640,426],i=[2160,1440,1080,720,480,360,240],a=s=null,r.each(t,function(t){(null==s||Math.abs(this-e)<Math.abs(s-e))&&(s=this,a=t)}),n=i[a],this.aspectRatio=s/n,Math.round(e/this.aspectRatio)},AblePlayer.prototype.setIconType=function(){var t,e,i;if(this.forceIconType)return!1;document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect?this.iconType="svg":(window.getComputedStyle?(e=r("span.icon-play").length?r("span.icon-play"):(t=r("<span>",{class:"icon-play able-clipped"}),r("body").append(t),t),void 0!==(i=window.getComputedStyle(e.get(0),null).getPropertyValue("font-family"))&&-1!==i.indexOf("able")?this.iconType="font":this.iconType="image"):this.iconType="image",this.debug,void 0!==t&&t.remove())},AblePlayer.prototype.setupInstance=function(){var t=new r.Deferred,e=t.promise();return this.$media.attr("id")?this.mediaId=this.$media.attr("id"):(this.mediaId="ableMediaId_"+this.ableIndex,this.$media.attr("id",this.mediaId)),t.resolve(),e},AblePlayer.prototype.setupInstancePlaylist=function(){var s=this;if(this.hasPlaylist=!1,r(".able-playlist").each(function(){if(r(this).data("player")===s.mediaId){s.hasPlaylist=!0,s.$playlist=r(this).find("li"),r(this).find("li[data-youtube-id]").each(function(){var t=r(this).attr("data-youtube-id"),e=s.getYouTubePosterUrl(t,"120"),i=r("<img>",{src:e,alt:""});r(this).find("button").prepend(i)}),r(this).find("li span").attr("aria-hidden","true"),s.playlistIndex=0;var t=r(this).data("embedded");s.playlistEmbed=void 0!==t&&!1!==t}}),this.hasPlaylist&&this.loop&&this.media.removeAttribute("loop"),this.hasPlaylist&&this.playlistEmbed){var t=this.$playlist.parent();this.$playlistDom=t.clone(),t.remove()}this.hasPlaylist&&0===this.$sources.length&&(this.cuePlaylistItem(0),this.$sources=this.$media.find("source"))},AblePlayer.prototype.recreatePlayer=function(){var t,e,i;(t=this).player?(this.playerCreated||(this.loadCurrentPreferences(),this.injectPlayerCode()),this.initSignLanguage(),this.initPlayer().then(function(){t.setupTracks().then(function(){t.setupAltCaptions().then(function(){t.setupTranscript().then(function(){for(t.setFullscreen(!1),void 0===t.volume&&(t.volume=t.defaultVolume),t.setVolume(t.volume),t.transcriptType&&(t.addTranscriptAreaEvents(),t.updateTranscript()),"video"===t.mediaType&&t.initDescription(),t.captions.length&&t.initDefaultCaption(),t.setMediaAttributes(),t.addControls(),t.addEventListeners(),e=t.getPreferencesGroups(),i=0;i<e.length;i++)t.injectPrefsForm(e[i]);t.setupPopups(),t.updateCaption(),t.injectVTS(),t.chaptersDivLocation&&t.populateChaptersDiv(),t.showSearchResults(),"html5"===t.player&&t.$media[0].load(),setTimeout(function(){t.refreshControls("init")},100)},function(){t.provideFallback()})})})})):console.log("Can't create player; no appropriate player type detected.")},AblePlayer.prototype.initPlayer=function(){var t,e=this;"html5"===this.player?t=this.initHtml5Player():"youtube"===this.player?t=this.initYouTubePlayer():"vimeo"===this.player&&(t=this.initVimeoPlayer());var i=new r.Deferred,s=i.promise();return t.done(function(){!1===e.useFixedSeekInterval&&e.setSeekInterval(),i.resolve()}).fail(function(){i.reject()}),s},AblePlayer.prototype.setSeekInterval=function(){var t;this.seekInterval=this.defaultSeekInterval,void 0===(t=this.useChapterTimes?this.chapterDuration:this.duration)||t<1?this.seekIntervalCalculated=!1:(this.seekInterval=t<=20?5:t<=30?6:t<=40?8:t<=100?10:t/10,this.seekIntervalCalculated=!0)},AblePlayer.prototype.initDefaultCaption=function(){var t,e;if(0<(t=this.captions).length){for(e=0;e<t.length;e++)!0===t[e].def&&(this.captionLang=t[e].language,this.selectedCaptions=t[e]);if(void 0===this.captionLang)for(e=0;e<t.length;e++)t[e].language===this.lang&&(this.captionLang=t[e].language,this.selectedCaptions=t[e]);void 0===this.captionLang&&(this.captionLang=t[0].language,this.selectedCaptions=t[0]),void 0!==this.captionLang&&(this.$transcriptLanguageSelect&&this.$transcriptLanguageSelect.find("option[lang="+this.captionLang+"]").prop("selected",!0),this.syncTrackLanguages("init",this.captionLang)),"vimeo"===this.player&&(this.usingVimeoCaptions&&1==this.prefCaptions?this.vimeoPlayer.enableTextTrack(this.captionLang).then(function(t){}).catch(function(t){t.name}):this.vimeoPlayer.disableTextTrack().then(function(){}).catch(function(t){}))}},AblePlayer.prototype.initHtml5Player=function(){var t=new r.Deferred,e=t.promise();return t.resolve(),e},AblePlayer.prototype.setMediaAttributes=function(){this.$media.attr("tabindex",-1);var t=this.$media.get(0).textTracks;if(t)for(var e=0;e<t.length;)t[e].mode="disabled",e+=1},AblePlayer.prototype.getPlayer=function(){return this.youTubeId?"video"!==this.mediaType?null:"youtube":this.vimeoId?"video"!==this.mediaType?null:"vimeo":this.testFallback||(this.isUserAgent("msie 7")||this.isUserAgent("msie 8")||this.isUserAgent("msie 9"))&&"video"===this.mediaType||this.isIOS()&&(this.isIOS(4)||this.isIOS(5)||this.isIOS(6))?null:this.media.canPlayType?"html5":null}}(jQuery),function(q){AblePlayer.prototype.setCookie=function(t){Cookies.set("Able-Player",t,{expires:90})},AblePlayer.prototype.getCookie=function(){var e,i={preferences:{},sign:{},transcript:{}};try{e=Cookies.getJSON("Able-Player")}catch(t){Cookies.getJSON(i),e=i}return e||i},AblePlayer.prototype.updateCookie=function(t){var e,i,s,a,n,r;if(e=this.getCookie(),"transcript"===t||"sign"===t)"transcript"===t?(s=(i=this.$transcriptArea).position(),void 0===e.transcript&&(e.transcript={}),e.transcript.position=i.css("position"),e.transcript.zindex=i.css("z-index"),e.transcript.top=s.top,e.transcript.left=s.left,e.transcript.width=i.width(),e.transcript.height=i.height()):"sign"===t&&(s=(i=this.$signWindow).position(),void 0===e.sign&&(e.sign={}),e.sign.position=i.css("position"),e.sign.zindex=i.css("z-index"),e.sign.top=s.top,e.sign.left=s.left,e.sign.width=i.width(),e.sign.height=i.height());else for(a=this.getAvailablePreferences(),n=0;n<a.length;n++)(r=a[n].name)==t&&(e.preferences[r]=this[r]);this.setCookie(e)},AblePlayer.prototype.getPreferencesGroups=function(){if("video"===this.mediaType)return["captions","descriptions","keyboard","transcript"];if("audio"===this.mediaType){var t=[];return t.push("keyboard"),this.lyricsMode&&t.push("transcript"),t}},AblePlayer.prototype.getAvailablePreferences=function(){var t=[];return t.push({name:"prefAltKey",label:this.tt.prefAltKey,group:"keyboard",default:1}),t.push({name:"prefCtrlKey",label:this.tt.prefCtrlKey,group:"keyboard",default:1}),t.push({name:"prefShiftKey",label:this.tt.prefShiftKey,group:"keyboard",default:0}),t.push({name:"prefTranscript",label:null,group:"transcript",default:0}),t.push({name:"prefHighlight",label:this.tt.prefHighlight,group:"transcript",default:1}),t.push({name:"prefAutoScrollTranscript",label:null,group:"transcript",default:1}),t.push({name:"prefTabbable",label:this.tt.prefTabbable,group:"transcript",default:0}),"video"===this.mediaType&&(t.push({name:"prefCaptions",label:null,group:"captions",default:1}),t.push({name:"prefCaptionsPosition",label:this.tt.prefCaptionsPosition,group:"captions",default:this.defaultCaptionsPosition}),t.push({name:"prefCaptionsFont",label:this.tt.prefCaptionsFont,group:"captions",default:this.tt.sans}),t.push({name:"prefCaptionsSize",label:this.tt.prefCaptionsSize,group:"captions",default:"100%"}),t.push({name:"prefCaptionsColor",label:this.tt.prefCaptionsColor,group:"captions",default:"white"}),t.push({name:"prefCaptionsBGColor",label:this.tt.prefCaptionsBGColor,group:"captions",default:"black"}),t.push({name:"prefCaptionsOpacity",label:this.tt.prefCaptionsOpacity,group:"captions",default:"100%"}),t.push({name:"prefDesc",label:null,group:"descriptions",default:0}),t.push({name:"prefDescFormat",label:null,group:"descriptions",default:"video"}),t.push({name:"prefDescPause",label:this.tt.prefDescPause,group:"descriptions",default:0}),t.push({name:"prefVisibleDesc",label:this.tt.prefVisibleDesc,group:"descriptions",default:1}),t.push({name:"prefSign",label:null,group:null,default:0})),t},AblePlayer.prototype.loadCurrentPreferences=function(){for(var t=this.getAvailablePreferences(),e=this.getCookie(),i=0;i<t.length;i++){var s=t[i].name,a=t[i].default;void 0!==e.preferences[s]?this[s]=e.preferences[s]:(e.preferences[s]=a,this[s]=a)}this.setCookie(e)},AblePlayer.prototype.injectPrefsForm=function(t){var e,i,s,a,n,r,o,l,h,p,c,u,d,g,f,m,v,y,b,w,P,C,k,T,A,$,x,D,S,N,I,M,B,F,z,O,L;e=(i=this).getAvailablePreferences();var V="able-prefs-form-"+t;if((s=q("<div>",{class:"able-prefs-form "})).addClass(V),"captions"==t)a=this.tt.prefTitleCaptions,n=this.tt.prefIntroCaptions,W=q("<p>",{text:n}),s.append(W);else if("descriptions"==t){a=this.tt.prefTitleDescriptions;var W=q("<p>",{text:this.tt.prefIntroDescription1}),H=q("<ul>"),R=q("<li>",{text:this.tt.prefDescFormatOption1}),E=q("<li>",{text:this.tt.prefDescFormatOption2});H.append(R,E),this.hasOpenDesc&&this.hasClosedDesc?(D=this.tt.prefIntroDescription2+" ",D+="<strong>"+this.tt.prefDescFormatOption1b+"</strong>",D+=" <em>"+this.tt.and+"</em> <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):this.hasOpenDesc?(D=this.tt.prefIntroDescription2,D+=" <strong>"+this.tt.prefDescFormatOption1b+"</strong>."):this.hasClosedDesc?(D=this.tt.prefIntroDescription2,D+=" <strong>"+this.tt.prefDescFormatOption2b+"</strong>."):D=this.tt.prefIntroDescriptionNone,r=q("<p>",{html:D}),o=this.tt.prefIntroDescription3,(this.hasOpenDesc||this.hasClosedDesc)&&(o+=" "+this.tt.prefIntroDescription4),l=q("<p>",{text:o}),s.append(W,H,r,l)}else"keyboard"==t?(a=this.tt.prefTitleKeyboard,n=this.tt.prefIntroKeyboard1,n+=" "+this.tt.prefIntroKeyboard2,n+=" "+this.tt.prefIntroKeyboard3,W=q("<p>",{text:n}),s.append(W)):"transcript"==t&&(a=this.tt.prefTitleTranscript,n=this.tt.prefIntroTranscript,W=q("<p>",{text:n}),s.append(W));for(c=q("<fieldset>"),u="able-prefs-"+t,d=this.mediaId+"-prefs-"+t,c.addClass(u).attr("id",d),"keyboard"===t?(g=q("<legend>"+this.tt.prefHeadingKeyboard1+"</legend>"),c.append(g)):"descriptions"===t&&(g=q("<legend>"+this.tt.prefHeadingTextDescription+"</legend>"),c.append(g)),h=0;h<e.length;h++)if(e[h].group==t&&e[h].label){if(v="able-"+(f=e[h].name),y=this.mediaId+"_"+f,m=q("<div>").addClass(v),"captions"===t){for(b=q('<label for="'+y+'"> '+e[h].label+"</label>"),w=q("<select>",{name:f,id:y}),"prefCaptions"!==f&&"prefCaptionsStyle"!==f&&w.change(function(){A=q(this).attr("name"),i.stylizeCaptions(i.$sampleCapsDiv,A)}),P=this.getCaptionsOptions(f),p=0;p<P.length;p++)"prefCaptionsPosition"===f?"overlay"===(k=P[p])?T=this.tt.captionsPositionOverlay:"below"===k&&(k=P[p],T=this.tt.captionsPositionBelow):"prefCaptionsColor"===f||"prefCaptionsBGColor"===f?(k=P[p][0],T=P[p][1]):"prefCaptionsOpacity"===f?(k=P[p],T=P[p],"0%"===k?T+=" ("+this.tt.transparent+")":"100%"===k&&(T+=" ("+this.tt.solid+")")):(k=P[p],T=P[p]),C=q("<option>",{value:k,text:T}),this[f]===k&&C.prop("selected",!0),w.append(C);m.append(b,w)}else b=q('<label for="'+y+'"> '+e[h].label+"</label>"),w=q("<input>",{type:"checkbox",name:f,id:y,value:"true"}),1===this[f]&&w.prop("checked",!0),"keyboard"===t&&w.change(function(){"prefAltKey"===(A=q(this).attr("name"))?($=".able-modkey-alt",x=i.tt.prefAltKey+" + "):"prefCtrlKey"===A?($=".able-modkey-ctrl",x=i.tt.prefCtrlKey+" + "):"prefShiftKey"===A&&($=".able-modkey-shift",x=i.tt.prefShiftKey+" + "),q(this).is(":checked")?q($).text(x):q($).text("")}),m.append(w,b);c.append(m)}if(s.append(c),"captions"===t)"video"===this.mediaType&&(this.$sampleCapsDiv=q("<div>",{class:"able-captions-sample"}).text(this.tt.sampleCaptionText),s.append(this.$sampleCapsDiv),this.stylizeCaptions(this.$sampleCapsDiv));else if("keyboard"===t){for(S=q("<h2>",{text:this.tt.prefHeadingKeyboard2}),N=q("<ul>"),I=[],M=[],h=0;h<this.controls.length;h++)"play"===this.controls[h]?(I.push(this.tt.play+"/"+this.tt.pause),M.push("p</span> <em>"+this.tt.or+'</em> <span class="able-help-modifiers"> '+this.tt.spacebar)):"restart"===this.controls[h]?(I.push(this.tt.restart),M.push("s")):"previous"===this.controls[h]?(I.push(this.tt.prevTrack),M.push("b")):"next"===this.controls[h]?(I.push(this.tt.nextTrack),M.push("n")):"rewind"===this.controls[h]?(I.push(this.tt.rewind),M.push("r")):"forward"===this.controls[h]?(I.push(this.tt.forward),M.push("f")):"volume"===this.controls[h]?(I.push(this.tt.volume),M.push("v</span> <em>"+this.tt.or+'</em> <span class="able-modkey">1-9'),I.push(this.tt.mute+"/"+this.tt.unmute),M.push("m")):"captions"===this.controls[h]?(1<this.captions.length?I.push(this.tt.captions):this.captionsOn?I.push(this.tt.hideCaptions):I.push(this.tt.showCaptions),M.push("c")):"descriptions"===this.controls[h]?(this.descOn?I.push(this.tt.turnOffDescriptions):I.push(this.tt.turnOnDescriptions),M.push("d")):"prefs"===this.controls[h]?(I.push(this.tt.preferences),M.push("e")):"help"===this.controls[h]&&(I.push(this.tt.help),M.push("h"));for(h=0;h<M.length;h++)B='<span class="able-modkey-alt">',1===this.prefAltKey&&(B+=this.tt.prefAltKey+" + "),B+="</span>",B+='<span class="able-modkey-ctrl">',1===this.prefCtrlKey&&(B+=this.tt.prefCtrlKey+" + "),B+="</span>",B+='<span class="able-modkey-shift">',1===this.prefShiftKey&&(B+=this.tt.prefShiftKey+" + "),B+="</span>",B+='<span class="able-modkey">'+M[h]+"</span>",B+=" = "+I[h],F=q("<li>",{html:B}),N.append(F);B='<span class="able-modkey">'+this.tt.escapeKey+"</span>",B+=" = "+this.tt.escapeKeyFunction,F=q("<li>",{html:B}),N.append(F),s.append(S,N)}q("body").append(s),z=new AccessibleDialog(s,this.$prefsButton,"dialog",a,W,i.tt.closeButtonLabel,"32em"),s.append("<hr>"),O=q('<button class="modal-button">'+this.tt.save+"</button>"),L=q('<button class="modal-button">'+this.tt.cancel+"</button>"),O.click(function(){z.hide(),i.savePrefsFromForm()}),L.click(function(){z.hide(),i.resetPrefsForm()}),s.append(O),s.append(L),"captions"===t?this.captionPrefsDialog=z:"descriptions"===t?this.descPrefsDialog=z:"keyboard"===t?this.keyboardPrefsDialog=z:"transcript"===t&&(this.transcriptPrefsDialog=z),q("div.able-prefs-form button.modalCloseButton").click(function(){i.resetPrefsForm()}),q("div.able-prefs-form").keydown(function(t){27===t.which&&i.resetPrefsForm()})},AblePlayer.prototype.resetPrefsForm=function(){var t,e,i,s;for(t=this.getCookie(),e=this.getAvailablePreferences(),i=0;i<e.length;i++)s=e[i].name,this.mediaId+"_"+s,-1!==s.indexOf("Captions")&&"prefCaptions"!==s?q('select[name="'+s+'"]').val(t.preferences[s]):1===this[s]?q('input[name="'+s+'"]').prop("checked",!0):q('input[name="'+s+'"]').prop("checked",!1);this.stylizeCaptions(this.$sampleCapsDiv)},AblePlayer.prototype.savePrefsFromForm=function(){var t,e,i,s,a,n,r,o,l;n=a=0,r=!1,t=this.getCookie(),e=this.getAvailablePreferences();for(var h=0;h<e.length;h++)e[h].label&&(i=e[h].name,s=this.mediaId+"_"+i,"prefDescFormat"==i?(this.prefDescFormat="video",this.prefDescFormat!==t.preferences.prefDescFormat&&(t.preferences.prefDescFormat=this.prefDescFormat,a++)):-1!==i.indexOf("Captions")&&"prefCaptions"!==i?(l=q('select[id="'+s+'"]').val(),t.preferences[i]!==l&&(t.preferences[i]=l,this[i]=l,a++,n++),"prefCaptionsSize"===i&&(r=!0,o=l)):q('input[id="'+s+'"]').is(":checked")?(t.preferences[i]=1)===this[i]||(this[i]=1,a++):(t.preferences[i]=0,1===this[i]&&(this[i]=0,a++)));if(0<a?(this.setCookie(t),this.showAlert(this.tt.prefSuccess)):this.showAlert(this.tt.prefNoChange),"youtube"===this.player&&void 0!==this.usingYouTubeCaptions&&this.usingYouTubeCaptions&&r&&this.youTubePlayer.setOption(this.ytCaptionModule,"fontSize",this.translatePrefs("size",o,"youtube")),1<AblePlayerInstances.length)for(h=0;h<AblePlayerInstances.length;h++)AblePlayerInstances[h].updatePrefs(),AblePlayerInstances[h].loadCurrentPreferences(),AblePlayerInstances[h].resetPrefsForm(),0<n&&(AblePlayerInstances[h].stylizeCaptions(AblePlayerInstances[h].$captionsDiv),void 0!==AblePlayerInstances[h].$descDiv&&AblePlayerInstances[h].stylizeCaptions(AblePlayerInstances[h].$descDiv));else this.updatePrefs(),0<n&&(this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv))},AblePlayer.prototype.updatePrefs=function(){1===this.prefTabbable?q(".able-transcript span.able-transcript-seekpoint").attr("tabindex","0"):q(".able-transcript span.able-transcript-seekpoint").removeAttr("tabindex"),0===this.prefHighlight&&q(".able-transcript span").removeClass("able-highlight"),this.updateCaption(),this.refreshingDesc=!0,this.initDescription()},AblePlayer.prototype.usingModifierKeys=function(t){return!(1===this.prefAltKey&&!t.altKey)&&(!(1===this.prefCtrlKey&&!t.ctrlKey)&&!(1===this.prefShiftKey&&!t.shiftKey))}}(jQuery),function(l){function h(t,e){for(var i=[],s=0;s<e.length;s++)i.push(p(t,e[s]));return i}function p(t,e){var i=e(t);if(null!==t.error)throw t.error;return i}function a(t,e){for(var i=0;i<e.length;i++)"\n"===e[i]?(t.column=1,t.line+=1):t.column+=1}function c(t,e){var i=t.text.substring(0,e);return a(t,i),t.text=t.text.substring(e),i}function u(t,e){var i,s=t.text.indexOf("\n");return-1===s?(a(t,i=t.text),t.text=""):(i=t.text.substring(0,s),a(t,i+"\n"),t.text=t.text.substring(s+1)),i}function d(t){var e=t.text.indexOf("\n");return-1===e?t.text:t.text.substring(0,e)}function s(t){h(t,[w,P]);var e=t.text[0];" "===e||"\t"===e||"\n"===e?h(t,[A,i,x,o]):t.error="WEBVTT signature not followed by whitespace."}function i(t){for(;;){var e=d(t);if(-1!==e.indexOf("--\x3e"))return;if(0===e.length)return;var i=p(t,n);t.metadata[i[0]]=i[1],p(t,A)}}function g(t){var e=[],i=t.indexOf(" ");0<=i&&e.push(i);var s=t.indexOf("\t");0<=s&&e.push(s);var a=t.indexOf("\n");return 0<=a&&e.push(a),Math.min.apply(null,e)}function n(t){var e=t.text.indexOf("\n"),i=c(t,e),s=i.indexOf(":");return-1===s?void(t.error="Missing colon."):[i.substring(0,s),i.substring(s+1)]}function r(t){var e=c(t,g(t.text)),i=e.indexOf(":");return-1===i?void(t.error="Missing colon."):[e.substring(0,i),e.substring(i+1)]}function o(t){for(;;){var e=d(t);if(0!==e.indexOf("NOTE")||4!==e.length&&" "!==e[4]&&"\t"!==e[4])if(0===l.trim(e).length&&0<t.text.length)p(t,$);else{if(!(0<l.trim(e).length))return;p(t,f)}else h(t,[b,$])}}function f(t){var e,i=d(t);if(-1===i.indexOf("--\x3e")&&(e=u(t),-1===(i=d(t)).indexOf("--\x3e")))return"Invalid WebVTT file: "+t.src+"\n","Line: "+t.line+", ","Column: "+t.column+"\n","Expected cue timing for cueId '"+e+"' but found: "+i+"\n",void(console.warn||console.log);var s=h(t,[D,T,C,T,D]),a=s[0],n=s[4];if(n<=a)t.error="Start time is not sooner than end time.";else{p(t,k);var r=p(t,m);c(t,1);var o=p(t,v);void 0===e&&(e=t.cues.length+1),t.cues.push({id:e,start:a,end:n,settings:r,components:o})}}function m(t){for(var e={};0<t.text.length&&"\n"!==t.text[0];){var i=p(t,r);e[i[0]]=i[1],p(t,k)}return e}function v(t){for(var e={type:"internal",tagName:"",value:"",classes:[],annotation:"",parent:null,children:[],language:""},i=e,s=[];0<t.text.length;){var a=d(t);if(-1!==a.indexOf("--\x3e")||/^\s*$/.test(a))break;if(2<=t.text.length&&"\n"===t.text[0]&&"\n"===t.text[1]){c(t,2);break}var n=y(t);if("string"===n.type)i.children.push(n);else if("startTag"===n.type)n.type=n.tagName,n.parent=i,-1!==l.inArray(n.tagName,["i","b","u","ruby"])?(0<s.length&&(i.language=s[s.length-1]),i.children.push(n),i=n):"rt"===n.tagName&&"ruby"===i.tagName?(0<s.length&&(i.language=s[s.length-1]),i.children.push(n),i=n):"c"===n.tagName?(n.value=n.annotation,0<s.length&&(i.language=s[s.length-1]),i.children.push(n),i=n):"v"===n.tagName?(n.value=n.annotation,0<s.length&&(i.language=s[s.length-1]),i.children.push(n),i=n):"lang"===n.tagName&&(s.push(n.annotation),0<s.length&&(i.language=s[s.length-1]),i.children.push(n),i=n);else if("endTag"===n.type)n.tagName===i.type&&-1!==l.inArray(n.tagName,["c","i","b","u","ruby","rt","v"])?i=i.parent:"lang"===n.tagName&&"lang"===i.type?(i=i.parent,s.pop()):"ruby"===n.tagName&&"rt"===i.type&&(i=i.parent.parent);else if("timestampTag"===n.type){var r={text:n.value,error:null,metadata:{},cues:[],line:1,column:1};try{var o=p(r,D);0===r.text.length&&(n.value=o,i.push(n))}catch(t){}}}return e}function y(t){for(var e="data",i=[],s="",a={type:"",tagName:"",value:"",classes:[],annotation:"",children:[]};;){var n;if(n=2<=t.text.length&&"\n"===t.text[0]&&"\n"===t.text[1]?"":0<t.text.length?t.text[0]:"","data"===e)if("&"===n)s="&",e="escape";else if("<"===n){if(0!==i.length)return a.type="string",a.value=i.join(""),a;e="tag"}else{if(""===n)return{type:"string",value:i.join("")};i.push(n)}else if("escape"===e)if("&"===n)i.push(s),s="&";else if(n.match(/[0-9a-z]/))s+=n;else if(";"===n)"&"===s?i.push("&"):"<"===s?i.push("<"):">"===s?i.push(">"):"&lrm"===s?i.push(""):"&rlm"===s?i.push(""):" "===s?i.push(" "):(i.push(s),i.push(";")),e="data";else{if("<"===n||""===n)return i.push(s),a.type="string",a.value=i.join(""),a;if("\t"===n||"\n"===n||"\f"===n||" "===n)return i.push(s),a.type="string",a.value=i.join(""),a;i.push(s),e="data"}else if("tag"===e)if("\t"===n||"\n"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("."===n)e="startTagClass";else if("/"===n)e="endTag";else if(n.match("[0-9]"))e="timestampTag",i.push(n);else{if(">"===n){c(t,1);break}if(""===n)return a.tagName="",a.type="startTag",a;i.push(n),e="startTag"}else if("startTag"===e)if("\t"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("\n"===n)s=n,e="startTagAnnotation";else if("."===n)e="startTagClass";else{if(">"===n)return c(t,1),a.tagName=i.join(""),a.type="startTag",a;if(""===n)return a.tagName=i.join(""),a.type="startTag",a;i.push(n)}else if("startTagClass"===e)if("\t"===n||"\f"===n||" "===n)a.classes.push(s),s="",e="startTagAnnotation";else if("\n"===n)a.classes.push(s),s=n,e="startTagAnnotation";else if("."===n)a.classes.push(s),s="";else{if(">"===n)return c(t,1),a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;if(""===n)return a.classes.push(s),a.type="startTag",a.tagName=i.join(""),a;s+="c"}else if("startTagAnnotation"===e){if(">"===n)return c(t,1),s=l.trim(s).replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;if(""===n)return s=l.trim(s).replace(/ +/," "),a.type="startTag",a.tagName=i.join(""),a.annotation=s,a;s+=n}else if("endTag"===e){if(">"===n)return c(t,1),a.type="endTag",a.tagName=i.join(""),a;if(""===n)return a.type="endTag",a.tagName=i.join(""),a;i.push(n)}else{if("timestampTag"!==e)throw"Unknown tokenState "+e;if(">"===n)return c(t,1),a.type="timestampTag",a.name=i.join(""),a;if(""===n)return a.type="timestampTag",a.name=i.join(""),a;i.push(n)}c(t,1)}}function b(t){if(-1===u(t).indexOf("--\x3e"))for(;;){var e=d(t);if(0===l.trim(e).length)return;if(-1!==e.indexOf("--\x3e"))return void(t.error="Invalid syntax: --\x3e in comment.");u(t)}else t.error="Invalid syntax: --\x3e in NOTE line."}function w(t){"\ufeff"===t.text[0]&&c(t,1)}function P(t){"WEBVTT"===t.text.substring(0,6)?c(t,6):t.error="Invalid signature."}function C(t){t.text.length<3||"--\x3e"!==t.text.substring(0,3)?t.error="Missing --\x3e":c(t,3)}function k(t){for(;"\t"===t.text[0]||" "===t.text[0];)c(t,1)}function T(t){for(var e=0;"\t"===t.text[0]||" "===t.text[0];)c(t,1),e+=1;0===e&&(t.error="Missing space.")}function A(t){var e=t.text.indexOf("\n");-1===e?t.error="Missing EOL.":c(t,e+1)}function $(t){for(;0<t.text.length;){var e=d(t);if(0!==l.trim(e).length)break;u(t)}}function x(t){for(var e=0;0<t.text.length;){var i=d(t);if(0!==l.trim(i).length)break;u(t),e+=1}0===e&&(t.error="Missing empty line.")}function D(t){var e=g(t.text);if(-1!==e){var i=c(t,e),s=/((\d\d):)?((\d\d):)(\d\d).(\d\d\d)|(\d+).(\d\d\d)/.exec(i);if(s){var a=0,n=s[2],r=s[4];if(r){if(59<parseInt(r,10))return void(t.error="Invalid minute range");n&&(a+=3600*parseInt(n,10)),a+=60*parseInt(r,10);var o=s[5];if(59<parseInt(o,10))return void(t.error="Invalid second range");a+=parseInt(o,10),a+=parseInt(s[6],10)/1e3}else a+=parseInt(s[7],10),a+=parseInt(s[8],10)/1e3;return a}t.error="Unable to parse timestamp"}else t.error("Missing timing.")}AblePlayer.prototype.parseWebVTT=function(t,e){var i={src:t,text:e=e.replace(/(\r\n|\n|\r)/g,"\n"),error:null,metadata:{},cues:[],line:1,column:1};try{p(i,s)}catch(t){"Line: "+i.line+", ","Column: "+i.column+"\n",t,console.warn||console.log}return i}}(jQuery),function(A){AblePlayer.prototype.injectPlayerCode=function(){var t;this.$mediaContainer=this.$media.wrap('<div class="able-media-container"></div>').parent(),this.$ableDiv=this.$mediaContainer.wrap('<div class="able"></div>').parent(),this.$ableWrapper=this.$ableDiv.wrap('<div class="able-wrapper"></div>').parent(),this.$ableWrapper.addClass("able-skin-"+this.skin),this.$ableWrapper.css({"max-width":this.playerMaxWidth+"px"}),this.injectOffscreenHeading(),"video"===this.mediaType&&("image"==this.iconType||"youtube"===this.player&&!this.hasPoster||this.injectBigPlayButton(),t=A("<div>",{class:"able-vidcap-container"}),this.$vidcapContainer=this.$mediaContainer.wrap(t).parent()),this.injectPlayerControlArea(),this.injectTextDescriptionArea(),this.injectAlert(),this.injectPlaylist()},AblePlayer.prototype.injectOffscreenHeading=function(){var t;"0"==this.playerHeadingLevel||(void 0===this.playerHeadingLevel&&(this.playerHeadingLevel=this.getNextHeadingLevel(this.$ableDiv)),t="h"+this.playerHeadingLevel.toString(),this.$headingDiv=A("<"+t+">"),this.$ableDiv.prepend(this.$headingDiv),this.$headingDiv.addClass("able-offscreen"),this.$headingDiv.text(this.tt.playerHeading))},AblePlayer.prototype.injectBigPlayButton=function(){this.$bigPlayButton=A("<button>",{class:"able-big-play-button icon-play","aria-hidden":!0,tabindex:-1});var t=this;this.$bigPlayButton.click(function(){t.handlePlay()}),this.$mediaContainer.append(this.$bigPlayButton)},AblePlayer.prototype.injectPlayerControlArea=function(){this.$playerDiv=A("<div>",{class:"able-player",role:"region","aria-label":this.mediaType+" player"}),this.$playerDiv.addClass("able-"+this.mediaType),this.$nowPlayingDiv=A("<div>",{class:"able-now-playing","aria-live":"assertive","aria-atomic":"true"}),this.$controllerDiv=A("<div>",{class:"able-controller"}),this.$controllerDiv.addClass("able-"+this.iconColor+"-controls"),this.$statusBarDiv=A("<div>",{class:"able-status-bar"}),this.$timer=A("<span>",{class:"able-timer"}),this.$elapsedTimeContainer=A("<span>",{class:"able-elapsedTime",text:"0:00"}),this.$durationContainer=A("<span>",{class:"able-duration"}),this.$timer.append(this.$elapsedTimeContainer).append(this.$durationContainer),this.$speed=A("<span>",{class:"able-speed","aria-live":"assertive"}).text(this.tt.speed+": 1x"),this.$status=A("<span>",{class:"able-status","aria-live":"polite"}),this.$statusBarDiv.append(this.$timer,this.$speed,this.$status),this.$playerDiv.append(this.$nowPlayingDiv,this.$controllerDiv,this.$statusBarDiv),this.$ableDiv.append(this.$playerDiv)},AblePlayer.prototype.injectTextDescriptionArea=function(){this.$descDiv=A("<div>",{class:"able-descriptions"}),this.exposeTextDescriptions&&this.$descDiv.attr({"aria-live":"assertive","aria-atomic":"true"}),this.$descDiv.hide(),this.$ableDiv.append(this.$descDiv)},AblePlayer.prototype.getDefaultWidth=function(t){return"transcript"===t?450:"sign"===t?400:void 0},AblePlayer.prototype.positionDraggableWindow=function(t,e){var i,s,a,n;i=this.getCookie(),"transcript"===t?(a=this.$transcriptArea,void 0!==i.transcript&&(s=i.transcript)):"sign"===t&&(a=this.$signWindow,void 0!==i.transcript&&(s=i.sign)),void 0===s||A.isEmptyObject(s)?(n=this.getOptimumPosition(t,e),void 0===e&&(e=this.getDefaultWidth(t)),a.css({position:n[0],width:e,"z-index":n[3]}),"absolute"===n[0]&&a.css({top:n[1]+"px",left:n[2]+"px"})):(a.css({position:s.position,width:s.width,"z-index":s.zindex}),"absolute"===s.position&&a.css({top:s.top,left:s.left}),this.updateZIndex(t))},AblePlayer.prototype.getOptimumPosition=function(t,e){var i,s,a,n,r,o;return void 0===e&&(e=this.getDefaultWidth(t)),5,i=[],s=this.$ableDiv.width(),this.$ableDiv.height(),(a=this.$ableDiv.offset()).top,n=a.left,r=A(window).width(),o=0,"transcript"===t?void 0!==this.$signWindow&&this.$signWindow.is(":visible")&&(o=this.$signWindow.width()+5):"sign"===t&&void 0!==this.$transcriptArea&&this.$transcriptArea.is(":visible")&&(o=this.$transcriptArea.width()+5),e<r-(n+s+5+o)?(i[0]="absolute",i[1]=0,i[2]=s+o+5):e+5<n?(i[0]="absolute",i[1]=0,i[2]=n-e-5):i[0]="relative",i},AblePlayer.prototype.injectPoster=function(t,e){var i,s,a;"youtube"===e?void 0!==this.ytWidth?(s=this.ytWidth,a=this.ytHeight):void 0!==this.playerMaxWidth?(s=this.playerMaxWidth,a=this.playerMaxHeight):void 0!==this.playerWidth&&(s=this.playerWidth,a=this.playerHeight):"fallback"===e&&(s="100%",a="auto"),this.hasPoster&&(i=this.$media.attr("poster"),this.$posterImg=A("<img>",{class:"able-poster",src:i,alt:"",role:"presentation",width:s,height:a}),t.append(this.$posterImg))},AblePlayer.prototype.injectAlert=function(){var t;this.$alertBox=A('<div role="alert"></div>'),this.$alertBox.addClass("able-alert"),this.$alertBox.hide(),this.$alertBox.appendTo(this.$ableDiv),t="audio"==this.mediaType?"-10":2*Math.round(this.$mediaContainer.height()/3),this.$alertBox.css({top:t+"px"}),this.$srAlertBox=A('<div role="alert"></div>'),this.$srAlertBox.addClass("able-screenreader-alert"),this.$srAlertBox.appendTo(this.$ableDiv)},AblePlayer.prototype.injectPlaylist=function(){if(!0===this.playlistEmbed){var t=this.$playlistDom.clone();t.insertBefore(this.$statusBarDiv),this.$playlist=t.find("li")}},AblePlayer.prototype.createPopup=function(e,t){var i,s,a,n,r,o,l,h,p,c,u,d;if(s=A("<ul>",{id:(i=this).mediaId+"-"+e+"-menu",class:"able-popup",role:"menu"}).hide(),"captions"===e&&s.addClass("able-popup-captions"),"prefs"===e)if(1<this.prefCats.length){for(a=0;a<this.prefCats.length;a++)n=A("<li></li>",{role:"menuitem",tabindex:"-1"}),"captions"===(r=this.prefCats[a])?n.text(this.tt.prefMenuCaptions):"descriptions"===r?n.text(this.tt.prefMenuDescriptions):"keyboard"===r?n.text(this.tt.prefMenuKeyboard):"transcript"===r&&n.text(this.tt.prefMenuTranscript),n.on("click",function(){p=A(this).text(),i.setFullscreen(!1),p===i.tt.prefMenuCaptions?i.captionPrefsDialog.show():p===i.tt.prefMenuDescriptions?i.descPrefsDialog.show():p===i.tt.prefMenuKeyboard?i.keyboardPrefsDialog.show():p===i.tt.prefMenuTranscript&&i.transcriptPrefsDialog.show(),i.closePopups()}),s.append(n);this.$prefsButton.attr("data-prefs-popup","menu")}else 1==this.prefCats.length&&this.$prefsButton.attr("data-prefs-popup",this.prefCats[0]);else if("captions"===e||"chapters"===e){for(o=!1,a=0;a<t.length;a++)l=t[a],n=A("<li></li>",{role:"menuitemradio",tabindex:"-1",lang:l.language}),l.def&&1==this.prefCaptions?(n.attr("aria-checked","true"),o=!0):n.attr("aria-checked","false"),"captions"==e?(n.text(l.label),n.on("click",this.getCaptionClickFunction(l))):"chapters"==e&&(n.text(this.flattenCueForCaption(l)+" - "+this.formatSecondsAsColonTime(l.start)),n.on("click",this.getChapterClickFunction(l.start))),s.append(n);"captions"===e&&(n=A("<li></li>",{role:"menuitemradio",tabindex:"-1"}).text(this.tt.captionsOff),0===this.prefCaptions&&(n.attr("aria-checked","true"),o=!0),n.on("click",this.getCaptionOffFunction()),s.append(n))}else if("transcript-window"===e||"sign-window"===e)for((h=[]).push({name:"move",label:this.tt.windowMove}),h.push({name:"resize",label:this.tt.windowResize}),h.push({name:"close",label:this.tt.windowClose}),a=0;a<h.length;a++)(n=A("<li></li>",{role:"menuitem",tabindex:"-1","data-choice":h[a].name})).text(h[a].label),n.on("click mousedown",function(t){if(t.stopPropagation(),void 0!==t.button&&0!==t.button)return!1;i.windowMenuClickRegistered||i.finishingDrag||(i.windowMenuClickRegistered=!0,i.handleMenuChoice(e.substr(0,e.indexOf("-")),A(this).attr("data-choice"),t))}),s.append(n);return"captions"!==e||o?"chapters"===e&&(s.find('li:contains("'+this.defaultChapter+'")')?s.find('li:contains("'+this.defaultChapter+'")').attr("aria-checked","true").addClass("able-focus"):s.find("li").first().attr("aria-checked","true").addClass("able-focus")):s.find("li[lang="+this.captionLang+"]")?s.find("li[lang="+this.captionLang+"]").attr("aria-checked","true"):s.find("li").last().attr("aria-checked","true"),s.on("keydown",function(t){A(this).attr("id").split("-")[1],c=A(this).find("li:focus"),d=c.is(":first-child")?(u=A(this).find("li").last(),c.next()):c.is(":last-child")?(u=c.prev(),A(this).find("li").first()):(u=c.prev(),c.next()),9===t.which?t.shiftKey?(c.removeClass("able-focus"),u.focus().addClass("able-focus")):(c.removeClass("able-focus"),d.focus().addClass("able-focus")):40===t.which||39===t.which?(c.removeClass("able-focus"),d.focus().addClass("able-focus")):38==t.which||37===t.which?(c.removeClass("able-focus"),u.focus().addClass("able-focus")):32===t.which||13===t.which?c.click():27===t.which&&(c.removeClass("able-focus"),i.closePopups()),t.preventDefault()}),this.$controllerDiv.append(s),s},AblePlayer.prototype.closePopups=function(){this.chaptersPopup&&this.chaptersPopup.is(":visible")&&(this.chaptersPopup.hide(),this.$chaptersButton.removeAttr("aria-expanded").focus()),this.captionsPopup&&this.captionsPopup.is(":visible")&&(this.captionsPopup.hide(),this.$ccButton.removeAttr("aria-expanded").focus()),this.prefsPopup&&this.prefsPopup.is(":visible")&&(this.prefsPopup.hide(),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$prefsButton.removeAttr("aria-expanded").focus()),this.$volumeSlider&&this.$volumeSlider.is(":visible")&&(this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeAlert.text(this.tt.volumeSliderClosed),this.$volumeButton.removeAttr("aria-expanded").focus()),this.$transcriptPopup&&this.$transcriptPopup.is(":visible")&&(this.$transcriptPopup.hide(),this.$transcriptPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$transcriptPopupButton.removeAttr("aria-expanded").focus()),this.$signPopup&&this.$signPopup.is(":visible")&&(this.$signPopup.hide(),this.$signPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$signPopupButton.removeAttr("aria-expanded").focus())},AblePlayer.prototype.setupPopups=function(t){var e,i;if(e=[],void 0===t&&e.push("prefs"),"captions"!==t&&void 0!==t||0<this.captions.length&&e.push("captions"),"chapters"!==t&&void 0!==t||0<this.chapters.length&&this.useChaptersButton&&e.push("chapters"),"transcript-window"===t&&"popup"===this.transcriptType&&e.push("transcript-window"),"sign-window"===t&&this.hasSignLanguage&&e.push("sign-window"),0<e.length){this;for(var s=0;s<e.length;s++){var a=e[s];if(!1,"prefs"==a)this.prefsPopup=this.createPopup("prefs");else if("captions"==a)void 0!==this.captionsPopup&&this.captionsPopup||(this.captionsPopup=this.createPopup("captions",this.captions));else if("chapters"==a)i=this.selectedChapters?this.selectedChapters.cues:1<=this.chapters.length?this.chapters[0].cues:[],void 0!==this.chaptersPopup&&this.chaptersPopup||(this.chaptersPopup=this.createPopup("chapters",i));else{if("transcript-window"==a)return this.createPopup("transcript-window");if("sign-window"==a)return this.createPopup("sign-window")}}}},AblePlayer.prototype.provideFallback=function(){var t,e,i,s,a,n,r,o,l,h;if(n=!1,t=A("<div>",{class:"able-fallback",role:"alert"}),e=void 0!==this.playerMaxWidth?this.playerMaxWidth+"px":this.$media.attr("width")?parseInt(this.$media.attr("width"),10)+"px":"100%",t.css("max-width",e),i=this.$media.clone(),A("source, track",i).remove(),(s=i.html().trim()).length?t.html(s):(a=this.tt.fallbackError1+" "+this.tt[this.mediaType]+". ",a+=this.tt.fallbackError2+":",s=A("<p>").text(a),t.html(s),n=!0),n){for(h=A("<ul>"),r=this.getSupportingBrowsers(),o=0;o<r.length;o++)(l=A("<li>")).text(r[o].name+" "+r[o].minVersion+" "+this.tt.orHigher),h.append(l);t.append(h)}this.injectPoster(t,"fallback"),void 0!==this.$ableWrapper?(this.$ableWrapper.before(t),this.$ableWrapper.remove()):void 0!==this.$media?(this.$media.before(t),this.$media.remove()):A("body").prepend(t)},AblePlayer.prototype.getSupportingBrowsers=function(){var t=[];return t[0]={name:"Chrome",minVersion:"31"},t[1]={name:"Firefox",minVersion:"34"},t[2]={name:"Internet Explorer",minVersion:"10"},t[3]={name:"Opera",minVersion:"26"},t[4]={name:"Safari for Mac OS X",minVersion:"7.1"},t[5]={name:"Safari for iOS",minVersion:"7.1"},t[6]={name:"Android Browser",minVersion:"4.1"},t[7]={name:"Chrome for Android",minVersion:"40"},t},AblePlayer.prototype.calculateControlLayout=function(){var t,e,i;return(t=[])[0]=[],t[1]=[],"legacy"===this.skin&&(t[2]=[],t[3]=[]),t[0].push("play"),t[0].push("restart"),t[0].push("rewind"),t[0].push("forward"),"legacy"===this.skin&&t[1].push("seek"),this.hasPlaylist&&("legacy"===this.skin?(t[0].push("previous"),t[0].push("next")):"2020"==this.skin&&(t[0].push("previous"),t[0].push("next"))),this.isPlaybackRateSupported()?(e=!0,"legacy"===this.skin&&(t[2].push("slower"),t[2].push("faster"))):e=!1,"video"===this.mediaType&&(i=0,this.hasCaptions&&(i++,"legacy"===this.skin?t[2].push("captions"):"2020"==this.skin&&t[1].push("captions")),this.hasSignLanguage&&(i++,"legacy"===this.skin?t[2].push("sign"):"2020"==this.skin&&t[1].push("sign")),(this.hasOpenDesc||this.hasClosedDesc)&&this.useDescriptionsButton&&(i++,"legacy"===this.skin?t[2].push("descriptions"):"2020"==this.skin&&t[1].push("descriptions"))),"popup"!==this.transcriptType||this.hideTranscriptButton||(i++,"legacy"===this.skin?t[2].push("transcript"):"2020"==this.skin&&t[1].push("transcript")),"video"===this.mediaType&&this.hasChapters&&this.useChaptersButton&&(i++,"legacy"===this.skin?t[2].push("chapters"):"2020"==this.skin&&t[1].push("chapters")),"2020"==this.skin&&0<i&&t[1].push("pipe"),e&&"2020"===this.skin&&(t[1].push("faster"),t[1].push("slower"),t[1].push("pipe")),"legacy"===this.skin?t[3].push("preferences"):"2020"==this.skin&&t[1].push("preferences"),"video"===this.mediaType&&this.allowFullScreen&&("legacy"===this.skin?t[3].push("fullscreen"):t[1].push("fullscreen")),this.browserSupportsVolume()?(!0,this.volumeButton="volume-"+this.getVolumeName(this.volume),"legacy"===this.skin?t[1].push("volume"):"2020"==this.skin&&t[1].push("volume")):(!1,this.volume=!1),t},AblePlayer.prototype.addControls=function(){var u,t,e,i,s,a,n,r,o,l,h,p,c,d,g,f,m,v,y,b,w,P;for(100,e=(t=(u=this).calculateControlLayout()).length,b=this.mediaId+"-tooltip",this.$tooltipDiv=A("<div>",{id:b,class:"able-tooltip"}).hide(),this.$controllerDiv.append(this.$tooltipDiv),"2020"==this.skin&&(r=A('<div class="able-seekbar"></div>'),o=this.mediaType+" "+this.tt.seekbarLabel,this.$controllerDiv.append(r),void 0!==this.duration&&0!==this.duration||(this.duration=60,this.elapsed=0),this.seekBar=new AccessibleSlider(this.mediaType,r,"horizontal",100,0,this.duration,this.seekInterval,o,"seekbar",!0,"visible")),i=0;i<e;i++){for(a=t[i],n=A("<div>",i%2==0?{class:"able-left-controls"}:{class:"able-right-controls"}),this.$controllerDiv.append(n),s=0;s<a.length;s++){if("seek"===(c=a[s]))r=A('<div class="able-seekbar"></div>'),o=this.mediaType+" "+this.tt.seekbarLabel,n.append(r),void 0!==this.duration&&0!==this.duration||(this.duration=60,this.elapsed=0),this.seekBar=new AccessibleSlider(this.mediaType,r,"horizontal",100,0,this.duration,this.seekInterval,o,"seekbar",!0,"visible");else if("pipe"===c)l=A("<span>",{tabindex:"-1","aria-hidden":"true"}),"font"===this.iconType?l.addClass("icon-pipe"):(h=A("<img>",{src:this.rootPath+"button-icons/"+this.iconColor+"/pipe.png",alt:"",role:"presentation"}),l.append(h)),n.append(l);else{if(g="volume"===c?this.rootPath+"button-icons/"+this.iconColor+"/"+this.volumeButton+".png":"fullscreen"===c?this.rootPath+"button-icons/"+this.iconColor+"/fullscreen-expand.png":"slower"===c?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/turtle.png":this.rootPath+"button-icons/"+this.iconColor+"/slower.png":"faster"===c?"animals"===this.speedIcons?this.rootPath+"button-icons/"+this.iconColor+"/rabbit.png":this.rootPath+"button-icons/"+this.iconColor+"/faster.png":this.rootPath+"button-icons/"+this.iconColor+"/"+c+".png",f=this.getButtonTitle(c),m=A("<button>",{type:"button",tabindex:"0","aria-label":f,class:"able-button-handler-"+c}),"volume"!==c&&"preferences"!==c||("preferences"==c?(this.prefCats=this.getPreferencesGroups(),1<this.prefCats.length?(P=this.mediaId+"-prefs-menu",m.attr({"aria-controls":P,"aria-haspopup":"menu"})):1===this.prefCats.length&&m.attr({"aria-haspopup":"dialog"})):"volume"===c&&(P=this.mediaId+"-volume-slider",m.attr({"aria-controls":P,"aria-expanded":"false"}))),"font"===this.iconType)v="volume"===c?"icon-"+this.volumeButton:"slower"===c?"animals"===this.speedIcons?"icon-turtle":"icon-slower":"faster"===c?"animals"===this.speedIcons?"icon-rabbit":"icon-faster":"icon-"+c,y=A("<span>",{class:v,"aria-hidden":"true"}),m.append(y);else if("svg"===this.iconType){var C;C="volume"===c?this.getSvgData(this.volumeButton):"fullscreen"===c?this.getSvgData("fullscreen-expand"):"slower"===c?"animals"===this.speedIcons?this.getSvgData("turtle"):this.getSvgData("slower"):"faster"===c?"animals"===this.speedIcons?this.getSvgData("rabbit"):this.getSvgData("faster"):this.getSvgData(c),y=A("<svg>",{focusable:"false","aria-hidden":"true",viewBox:C[0]}),p=A("<path>",{d:C[1]}),y.append(p),m.html(y),m.html(m.html())}else d=A("<img>",{src:g,alt:"",role:"presentation"}),m.append(d);var k=A("<span>",{class:"able-clipped"}).text(f);m.append(k),m.on("mouseenter focus",function(t){var e=A(this).attr("aria-label"),i=A(this).position(),s=A(this).height(),a=A(this).width(),n=u.$controllerDiv.width();i.right=n-i.left-a;var r=i.top-s-15;if(A(this).closest("div").hasClass("able-right-controls"))var o="right";else o="left";var l=AblePlayer.localGetElementById(m[0],b).text(e).width();if("left"==o){(p=i.left-l/2)<0&&(p=2);var h={left:p+"px",right:"",top:r+"px"}}else{var p;(p=i.right-l/2)<0&&(p=2);h={left:"",right:p+"px",top:r+"px"}}var c=AblePlayer.localGetElementById(m[0],b).text(e).css(h);u.showTooltip(c),A(this).on("mouseleave blur",function(){AblePlayer.localGetElementById(m[0],b).text("").hide()})}),"captions"===c?this.prefCaptions&&1===this.prefCaptions||(w=1<this.captions.length?this.tt.captions:this.tt.showCaptions,m.addClass("buttonOff").attr("title",w)):"descriptions"===c&&(this.prefDesc&&1===this.prefDesc||m.addClass("buttonOff").attr("title",this.tt.turnOnDescriptions)),n.append(m),"play"===c?this.$playpauseButton=m:"previous"==c?(this.$prevButton=m,"previous"==this.buttonWithFocus&&(this.$prevButton.focus(),this.buttonWithFocus=null)):"next"==c?(this.$nextButton=m,"next"==this.buttonWithFocus&&(this.$nextButton.focus(),this.buttonWithFocus=null)):"captions"===c?this.$ccButton=m:"sign"===c?(this.$signButton=m,this.$signWindow.is(":visible")||this.$signButton.addClass("buttonOff")):"descriptions"===c?this.$descButton=m:"mute"===c?this.$muteButton=m:"transcript"===c?(this.$transcriptButton=m,this.$transcriptDiv.is(":visible")||this.$transcriptButton.addClass("buttonOff").attr("title",this.tt.showTranscript)):"fullscreen"===c?this.$fullscreenButton=m:"chapters"===c?this.$chaptersButton=m:"preferences"===c?this.$prefsButton=m:"volume"===c&&(this.$volumeButton=m)}"volume"===c&&this.addVolumeSlider(n)}i%2==1&&this.$controllerDiv.append('<div style="clear:both;"></div>')}for(var T in"video"===this.mediaType&&(void 0!==this.$captionsDiv&&this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv)),this.controls=[],t)t.hasOwnProperty(T)&&(this.controls=this.controls.concat(t[T]));this.refreshControls("init")},AblePlayer.prototype.useSvg=function(){var t,e,g=Object.create(null),f=function(){clearTimeout(e),e=setTimeout(t,100)},m=function(){},v="http://www.w3.org/1999/xlink";t=function(){var t,e,i,s,a,n,r,o,l,h=0;if(window.XMLHttpRequest&&(a=void 0!==(a=new XMLHttpRequest).withCredentials?XMLHttpRequest:XDomainRequest||void 0),void 0!==a){for(m(),o=document.getElementsByTagName("use"),s=0;s<o.length;s+=1){try{e=o[s].getBoundingClientRect()}catch(t){e=!1}t=(r=o[s].getAttributeNS(v,"href").split("#"))[0],i=r[1],n=e&&0===e.left&&0===e.right&&0===e.top&&0===e.bottom,e&&0===e.width&&0===e.height&&!n?t.length&&(!0!==(l=g[t])&&setTimeout(c({useEl:o[s],base:t,hash:i}),0),void 0===l&&(l=new a,(g[t]=l).onload=u(l),l.onerror=d(l),l.ontimeout=d(l),l.open("GET",t),l.send(),h+=1)):n||(void 0===g[t]?g[t]=!0:g[t].onload&&(g[t].abort(),g[t].onload=void 0,g[t]=!0))}o="",h+=1,p()}function p(){0===(h-=1)&&function(){var t;window.addEventListener("resize",f,!1),window.addEventListener("orientationchange",f,!1),m=window.MutationObserver?((t=new MutationObserver(f)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),function(){try{t.disconnect(),window.removeEventListener("resize",f,!1),window.removeEventListener("orientationchange",f,!1)}catch(t){}}):(document.documentElement.addEventListener("DOMSubtreeModified",f,!1),function(){document.documentElement.removeEventListener("DOMSubtreeModified",f,!1),window.removeEventListener("resize",f,!1),window.removeEventListener("orientationchange",f,!1)})}()}function c(t){return function(){!0!==g[t.base]&&t.useEl.setAttributeNS(v,"xlink:href","#"+t.hash)}}function u(s){return function(){var t,e=document.body,i=document.createElement("x");s.onload=null,i.innerHTML=s.responseText,(t=i.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",e.insertBefore(t,e.firstChild)),p()}}function d(t){return function(){t.onerror=null,t.ontimeout=null,p()}}}},AblePlayer.prototype.cuePlaylistItem=function(t){var e,i,s,a,n,r,o=this;i=this.player,this.initializing||this.playerCreated&&this.deletePlayer(),e=this.$playlist.eq(t),"youtube"===(s=this.hasAttr(e,"data-youtube-id")?(this.youTubeId=e.attr("data-youtube-id"),"youtube"):"html5")?"html5"===i&&(this.playing&&this.pauseMedia(),this.$media.hide()):(this.youTubeId=!1,"youtube"===i&&this.$media.show()),this.player=s,this.swappingSrc=!0,this.hasAttr(e,"data-poster")&&this.$media.attr("poster",e.attr("data-poster")),this.hasAttr(e,"data-width")&&this.$media.attr("width",e.attr("data-width")),this.hasAttr(e,"data-height")&&this.$media.attr("height",e.attr("data-height")),this.hasAttr(e,"data-youtube-desc-id")&&this.$media.attr("data-youtube-desc-id",e.attr("data-youtube-desc-id")),this.youTubeId&&this.$media.attr("data-youtube-id",e.attr("data-youtube-id"));var l=e.children("span.able-source");l.length&&l.each(function(){if(o.hasAttr(A(this),"data-src")){var t=A("<source>",{src:A(this).attr("data-src")});o.hasAttr(A(this),"data-type")&&t.attr("type",A(this).attr("data-type")),o.hasAttr(A(this),"data-desc-src")&&t.attr("data-desc-src",A(this).attr("data-desc-src")),o.hasAttr(A(this),"data-sign-src")&&t.attr("data-sign-src",A(this).attr("data-sign-src")),o.$media.append(t)}});var h=e.children("span.able-track");h.length&&h.each(function(){if(o.hasAttr(A(this),"data-src")&&o.hasAttr(A(this),"data-kind")&&o.hasAttr(A(this),"data-srclang")){var t=A("<track>",{src:A(this).attr("data-src"),kind:A(this).attr("data-kind"),srclang:A(this).attr("data-srclang")});o.hasAttr(A(this),"data-label")&&t.attr("label",A(this).attr("data-label")),o.$media.append(t)}}),a=e.text(),this.hasAttr(e,"lang")&&(n=e.attr("lang")),this.$sources=this.$media.find("source"),this.recreatePlayer(),this.$playlist.removeClass("able-current"),this.$playlist.eq(t).addClass("able-current"),!0===this.showNowPlaying&&void 0!==this.$nowPlayingDiv&&(r=A("<span>"),void 0!==n&&r.attr("lang",n),r.html("<span>"+this.tt.selectedTrack+":</span>"+a),this.$nowPlayingDiv.html(r)),this.initializing?this.swappingSrc=!1:(this.swappingSrc=!0,"html5"===this.player?this.media.load():"youtube"===this.player&&(this.okToPlay=!0))},AblePlayer.prototype.deletePlayer=function(){"youtube"==this.player&&this.$mediaContainer.find("iframe").remove();this.$media.removeAttr("poster width height"),this.$media.empty(),this.$controllerDiv.empty(),this.$elapsedTimeContainer.empty().text("0:00"),this.$durationContainer.empty(),this.$signWindow&&this.$signWindow.remove(),this.$transcriptArea&&this.$transcriptArea.remove(),A(".able-modal-dialog").remove(),this.hasCaptions=!1,this.hasChapters=!1,this.captionsPopup=null,this.chaptersPopup=null},AblePlayer.prototype.getButtonTitle=function(t){return"playpause"===t?this.tt.play:"play"===t?this.tt.play:"pause"===t?this.tt.pause:"restart"===t?this.tt.restart:"previous"===t?this.tt.prevTrack:"next"===t?this.tt.nextTrack:"rewind"===t?this.tt.rewind:"forward"===t?this.tt.forward:"captions"===t?1<this.captions.length?this.tt.captions:this.captionsOn?this.tt.hideCaptions:this.tt.showCaptions:"descriptions"===t?this.descOn?this.tt.turnOffDescriptions:this.tt.turnOnDescriptions:"transcript"===t?this.$transcriptDiv.is(":visible")?this.tt.hideTranscript:this.tt.showTranscript:"chapters"===t?this.tt.chapters:"sign"===t?this.tt.sign:"volume"===t?this.tt.volume:"faster"===t?this.tt.faster:"slower"===t?this.tt.slower:"preferences"===t?this.tt.preferences:"help"!==t?(this.debug,t.charAt(0).toUpperCase()+t.slice(1)):void 0}}(jQuery),function(c){AblePlayer.prototype.setupTracks=function(){var l,a,t,n,r,o,h,p;return l=this,t=(a=new c.Deferred).promise(),n=[],this.captions=[],this.captionLabels=[],this.descriptions=[],this.chapters=[],this.meta=[],c("#able-vts").length?(this.vtsTracks=[],this.hasVts=!0):this.hasVts=!1,this.getTracks().then(function(){for(h=l.tracks,"youtube"===l.player&&h.length&&(l.usingYouTubeCaptions=!1),o=0;o<h.length;o++){var t=(p=h[o]).kind,e=p.language,i=p.label;if(p.src){var s=p.src;r=l.loadTextObject(s),n.push(r),r.then(function(a,n){a.src;var r=a.language,o=a.label;return function(t,e){var i=e,s=l.parseWebVTT(t,i).cues;l.hasVts&&l.setupVtsTracks(n,r,o,t,i),"captions"===n||"subtitles"===n?l.setupCaptions(a,r,o,s):"descriptions"===n?l.setupDescriptions(a,s,r):"chapters"===n?l.setupChapters(a,s,r):"metadata"===n&&l.setupMetadata(a,s)}}(p,t))}else(l.usingYouTubeCaptions||l.usingVimeoCaptions)&&l.setupCaptions(p,e,i)}c.when.apply(c,n).then(function(){a.resolve()})}),t},AblePlayer.prototype.getTracks=function(){var t,e,i,s,a,n;return t=this,i=(e=new c.Deferred).promise(),this.$tracks=this.$media.find("track"),this.tracks=[],this.$tracks.length&&this.$tracks.each(function(){s=c(this).attr("srclang")?c(this).attr("srclang"):t.lang,a=c(this).attr("label")?c(this).attr("label"):t.getLanguageName(s),(n=!!c(this).attr("default")||s===t.lang)&&(t.captionLang=s),t.tracks.push({kind:c(this).attr("kind"),src:c(this).attr("src"),language:s,label:a,def:n})}),this.$media.find('track[kind="captions"],track[kind="subtitles"]').length?e.resolve():"youtube"===this.player?this.getYouTubeCaptionTracks(this.youTubeId).then(function(){e.resolve()}):"vimeo"===this.player?this.getVimeoCaptionTracks().then(function(){e.resolve()}):e.resolve(),i},AblePlayer.prototype.setupCaptions=function(t,e,i,s){var a,n;if(void 0===s&&(s=null),this.hasCaptions=!0,this.$media.find("track").removeAttr("default"),"video"===this.mediaType&&(this.usingYouTubeCaptions||this.usingVimeoCaptions||this.$captionsDiv||(this.$captionsDiv=c("<div>",{class:"able-captions"}),this.$captionsWrapper=c("<div>",{class:"able-captions-wrapper","aria-hidden":"true"}).hide(),"below"===this.prefCaptionsPosition?this.$captionsWrapper.addClass("able-captions-below"):this.$captionsWrapper.addClass("able-captions-overlay"),this.$captionsWrapper.append(this.$captionsDiv),this.$vidcapContainer.append(this.$captionsWrapper))),this.currentCaption=-1,1===this.prefCaptions?this.captionsOn=!0:this.captionsOn=!1,0===this.captions.length)this.captions.push({cues:s,language:e,label:i,def:t.def}),this.captionLabels.push(i);else{for(a=!1,n=0;n<this.captions.length;n++)if(this.captionLabels[n],i.toLowerCase()<this.captionLabels[n].toLowerCase()){this.captions.splice(n,0,{cues:s,language:e,label:i,def:t.def}),this.captionLabels.splice(n,0,i),a=!0;break}a||(this.captions.push({cues:s,language:e,label:i,def:t.def}),this.captionLabels.push(i))}},AblePlayer.prototype.setupDescriptions=function(t,e,i){this.hasClosedDesc=!0,this.currentDescription=-1,this.descriptions.push({cues:e,language:i})},AblePlayer.prototype.setupChapters=function(t,e,i){this.hasChapters=!0,this.chapters.push({cues:e,language:i})},AblePlayer.prototype.setupMetadata=function(t,e){"text"===this.metaType?this.metaDiv&&c("#"+this.metaDiv)&&(this.$metaDiv=c("#"+this.metaDiv),this.hasMeta=!0,this.meta=e):"selector"===this.metaType&&(this.hasMeta=!0,this.visibleSelectors=[],this.meta=e)},AblePlayer.prototype.loadTextObject=function(s){var a,t,n,r;return t=(a=new c.Deferred).promise(),n=this,(r=c("<div>",{style:"display:none"})).load(s,function(t,e,i){"error"===e?(n.debug,a.fail()):a.resolve(s,t),r.remove()}),t},AblePlayer.prototype.setupAltCaptions=function(){var t=new c.Deferred,e=t.promise();return 0===this.captions.length?"youtube"===this.player&&this.usingYouTubeCaptions?this.setupYouTubeCaptions().done(function(){t.resolve()}):"vimeo"===this.player&&this.usingVimeoCaptions?this.setupVimeoCaptions().done(function(){t.resolve()}):t.resolve():t.resolve(),e}}(jQuery),function(u){AblePlayer.prototype.initYouTubePlayer=function(){var t,e,i,s;return t=this,i=(e=new u.Deferred).promise(),s=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,this.activeYouTubeId=s,AblePlayer.youtubeIframeAPIReady?this.finalizeYoutubeInit().then(function(){e.resolve()}):(AblePlayer.loadingYoutubeIframeAPI||u.getScript("https://www.youtube.com/iframe_api").fail(function(){e.fail()}),u("body").on("youtubeIframeAPIReady",function(){t.finalizeYoutubeInit().then(function(){e.resolve()})})),i},AblePlayer.prototype.finalizeYoutubeInit=function(){var e,t,i,s,a,n;return t=(e=new u.Deferred).promise(),s=(i=this).mediaId+"_youtube",this.$mediaContainer.prepend(u("<div>").attr("id",s)),0,(a=this.getYouTubeDimensions(this.activeYouTubeId,s))?(this.ytWidth=a[0],this.ytHeight=a[1],this.aspectRatio=i.ytWidth/i.ytHeight):(this.ytWidth=null,this.ytHeight=null),n=this.okToPlay?1:0,this.youTubePlayer=new YT.Player(s,{videoId:this.activeYouTubeId,host:this.youTubeNoCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com",width:this.ytWidth,height:this.ytHeight,playerVars:{autoplay:n,enablejsapi:1,disableKb:1,playsinline:this.playsInline,start:this.startTime,controls:0,cc_load_policy:0,hl:this.lang,modestbranding:1,rel:0,html5:1,iv_load_policy:3},events:{onReady:function(){i.swappingSrc&&(i.swappingSrc=!1,i.cueingPlaylistItem=!1,i.playing&&i.playMedia()),i.userClickedPlaylist&&(i.userClickedPlaylist=!1),void 0===i.aspectRatio&&i.resizeYouTubePlayer(i.activeYouTubeId,s),e.resolve()},onError:function(t){e.fail()},onStateChange:function(t){i.getPlayerState().then(function(t){"playing"===t?(i.playing=!0,i.startedPlaying=!0,i.paused=!1):"ended"==t?i.onMediaComplete():(i.playing=!1,i.paused=!0),i.stoppingYouTube&&"paused"===t&&(void 0!==i.$posterImg&&i.$posterImg.show(),i.stoppingYouTube=!1,i.seeking=!1,i.playing=!1,i.paused=!0)})},onPlaybackQualityChange:function(){},onApiChange:function(t){i.initYouTubeCaptionModule()}}}),this.injectPoster(this.$mediaContainer,"youtube"),this.hasPlaylist||this.$media.remove(),t},AblePlayer.prototype.getYouTubeDimensions=function(t){var e,i,s,a;return e=[],void 0!==this.playerMaxWidth?(e[0]=this.playerMaxWidth,void 0!==this.playerMaxHeight&&(e[1]=this.playerMaxHeight),e):void 0!==u("#"+t)&&(s=(i=u("#"+t)).width(),a=i.height(),0<s&&0<a)&&(e[0]=s,e[1]=a,e)},AblePlayer.prototype.resizeYouTubePlayer=function(t,e){var i,s,a;void 0!==this.aspectRatio?this.restoringAfterFullScreen?(this.youTubePlayer&&this.youTubePlayer.setSize(this.ytWidth,this.ytHeight),this.restoringAfterFullScreen=!1):(s=this.$ableWrapper.parent().width(),a=Math.round(s/this.aspectRatio),this.$ableWrapper.css({"max-width":s+"px",width:""}),this.youTubePlayer.setSize(s,a),this.fullscreen?this.youTubePlayer.setSize(s,a):this.youTubePlayer.setSize(this.ytWidth,this.ytHeight)):(i=this.getYouTubeDimensions(e))&&(s=i[0],a=i[1],0<s&&0<a&&(this.aspectRatio=s/a,this.ytWidth=s,this.ytHeight=a,s!==this.$ableWrapper.width()&&(s=this.$ableWrapper.width(),a=Math.round(s/this.aspectRatio),this.youTubePlayer&&this.youTubePlayer.setSize(s,a))))},AblePlayer.prototype.setupYouTubeCaptions=function(){var t=new u.Deferred,e=t.promise();return this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,"undefined"!=typeof youTubeDataAPIKey?u.doWhen({when:function(){return googleApiReady},interval:100,attempts:1e3}).done(function(){t.resolve()}).fail(function(){}):t.resolve(),e},AblePlayer.prototype.waitForGapi=function(){var t,e,i,s,a,n;return t=this,i=(e=new u.Deferred).promise(),5e3,100,s=0,n=Math.floor(50),a=setInterval(function(){s++,googleApiReady||100<=s?(clearInterval(a),googleApiReady?e.resolve(!0):e.resolve(!1)):t.waitForGapi()},n),i},AblePlayer.prototype.getYouTubeCaptionTracks=function(i){var s,a,n,r,o,l,h,p,c=new u.Deferred,t=c.promise();return s=this,"undefined"!=typeof youTubeDataAPIKey?this.waitForGapi().then(function(t){!0===t?(gapi.client.setApiKey(youTubeDataAPIKey),gapi.client.load("youtube","v3").then(function(){gapi.client.youtube.captions.list({part:"id, snippet",videoId:i}).then(function(t){if(t.result.items.length){for(s.hasCaptions=!0,s.usingYouTubeCaptions=!0,1===s.prefCaptions?s.captionsOn=!0:s.captionsOn=!1,a=0;a<t.result.items.length;a++){r=t.result.items[a].snippet.name,n=t.result.items[a].snippet.language,l=t.result.items[a].snippet.trackKind,h=t.result.items[a].snippet.isDraft;var e=s.getYouTubeTimedTextUrl(i,r,n);"ASR"===l||h||(o=""!==r?r:s.getLanguageName(n),p=n===s.lang,s.tracks.push({kind:"captions",src:e,language:n,label:o,def:p}))}s.setupPopups("captions"),c.resolve()}else s.hasCaptions=!1,s.usingYouTubeCaptions=!1,c.resolve()},function(t){s.hasCaptions=!1,s.usingYouTubeCaptions=!1,c.resolve()})})):this.getYouTubeCaptionTracks2(i).then(function(){c.resolve()})}):this.getYouTubeCaptionTracks2(i).then(function(){c.resolve()}),t},AblePlayer.prototype.getYouTubeCaptionTracks2=function(i){var s,a,n,r,o,l=new u.Deferred,t=l.promise();return s=this,u.ajax({type:"get",url:"https://www.youtube.com/api/timedtext?type=list&v="+i,dataType:"xml",success:function(t){var e=u(t).find("track");0<e.length?(s.hasCaptions=!0,s.usingYouTubeCaptions=!0,1===s.prefCaptions?s.captionsOn=!0:s.captionsOn=!1,e.each(function(){u(this).attr("id"),a=u(this).attr("lang_code"),""===(r=""!==u(this).attr("name")?n=u(this).attr("name"):(n="",u(this).attr("lang_translated")))&&(r=s.getLanguageName(a)),o=a===s.lang;var t=s.getYouTubeTimedTextUrl(i,n,a);s.tracks.push({kind:"captions",src:t,language:a,label:r,def:o})}),s.setupPopups("captions")):(s.hasCaptions=!1,s.usingYouTubeCaptions=!1),l.resolve()},error:function(t,e){l.resolve()}}),t},AblePlayer.prototype.getYouTubeTimedTextUrl=function(t,e,i){var s="https://www.youtube.com/api/timedtext?fmt=vtt";return s+="&v="+t,s+="&lang="+i,""!==e&&(s+="&name="+e),s},AblePlayer.prototype.getYouTubeCaptionCues=function(t){var e,i=(e=new u.Deferred).promise();return this.tracks=[],this.tracks.push({kind:"captions",src:"some_file.vtt",language:"en",label:"Fake English captions"}),e.resolve(),i},AblePlayer.prototype.initYouTubeCaptionModule=function(){var t;if((t=this.youTubePlayer.getOptions()).length){for(var e=0;e<t.length;e++){if("cc"==t[e]){this.ytCaptionModule="cc",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}if("captions"==t[e]){this.ytCaptionModule="captions",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}}void 0!==this.ytCaptionModule&&(this.usingYouTubeCaptions?(this.youTubePlayer.setOption(this.ytCaptionModule,"track",{languageCode:this.captionLang}),this.youTubePlayer.setOption(this.ytCaptionModule,"fontSize",this.translatePrefs("size",this.prefCaptionsSize,"youtube"))):this.youTubePlayer.unloadModule(this.ytCaptionModule))}else this.hasCaptions=!1,this.usingYouTubeCaptions=!1;this.refreshControls("captions")},AblePlayer.prototype.getYouTubePosterUrl=function(t,e){var i="https://img.youtube.com/vi/"+t;return"120"==e?i+"/default.jpg":"320"==e?i+"/hqdefault.jpg":"480"==e?i+"/hqdefault.jpg":"640"==e&&i+"/sddefault.jpg"}}(jQuery),function(d){window.AccessibleSlider=function(t,e,i,s,a,n,r,o,l,h,p){var c,u;(c=this).position=0,this.tracking=!1,this.trackDevice=null,this.keyTrackPosition=0,this.lastTrackPosition=0,this.nextStep=1,this.inertiaCount=0,this.bodyDiv=d(e),h&&(this.loadedDiv=d("<div></div>"),this.playedDiv=d("<div></div>")),this.seekHead=d("<div>",{orientation:i,class:"able-"+l+"-head"}),"visible"===p?this.seekHead.attr("tabindex","0"):this.seekHead.attr("tabindex","-1"),this.seekHead.attr({role:"slider","aria-label":o,"aria-valuemin":a,"aria-valuemax":n}),this.timeTooltip=d("<div>"),this.bodyDiv.append(this.timeTooltip),this.timeTooltip.attr("role","tooltip"),this.timeTooltip.addClass("able-tooltip"),this.timeTooltip.hide(),this.bodyDiv.append(this.loadedDiv),this.bodyDiv.append(this.playedDiv),this.bodyDiv.append(this.seekHead),this.bodyDiv.wrap("<div></div>"),this.wrapperDiv=this.bodyDiv.parent(),"legacy"===this.skin&&("horizontal"===i?(this.wrapperDiv.width(s),this.loadedDiv.width(0)):(this.wrapperDiv.height(s),this.loadedDiv.height(0))),this.wrapperDiv.addClass("able-"+l+"-wrapper"),h&&(this.loadedDiv.addClass("able-"+l+"-loaded"),this.playedDiv.width(0),this.playedDiv.addClass("able-"+l+"-played"),this.setDuration(n)),this.seekHead.on("mouseenter mouseleave mousemove mousedown mouseup focus blur touchstart touchmove touchend",function(t){u=c.pointerEventToXY(t),"mouseenter"===t.type||"focus"===t.type?c.overHead=!0:"mouseleave"===t.type||"blur"===t.type?(c.overHead=!1,!c.overBody&&c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x))):"mousemove"===t.type||"touchmove"===t.type?c.tracking&&"mouse"===c.trackDevice&&c.trackHeadAtPageX(u.x):"mousedown"===t.type||"touchstart"===t.type?(c.startTracking("mouse",c.pageXToPosition(c.seekHead.offset()+c.seekHead.width()/2)),c.bodyDiv.is(":focus")||c.bodyDiv.focus(),t.preventDefault()):"mouseup"!==t.type&&"touchend"!==t.type||c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x)),"mousemove"!==t.type&&"mousedown"!==t.type&&"mouseup"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&c.refreshTooltip()}),this.bodyDiv.on("mouseenter mouseleave mousemove mousedown mouseup keydown keyup touchstart touchmove touchend",function(t){if(u=c.pointerEventToXY(t),"mouseenter"===t.type)c.overBody=!0;else if("mouseleave"===t.type)c.overBody=!1,c.overBodyMousePos=null,!c.overHead&&c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x));else if("mousemove"===t.type||"touchmove"===t.type)c.overBodyMousePos={x:u.x,y:u.y},c.tracking&&"mouse"===c.trackDevice&&c.trackHeadAtPageX(u.x);else if("mousedown"===t.type||"touchstart"===t.type)c.startTracking("mouse",c.pageXToPosition(u.x)),c.trackHeadAtPageX(u.x),c.seekHead.is(":focus")||c.seekHead.focus(),t.preventDefault();else if("mouseup"===t.type||"touchend"===t.type)c.tracking&&"mouse"===c.trackDevice&&c.stopTracking(c.pageXToPosition(u.x));else if("keydown"===t.type){if(36===t.which)c.trackImmediatelyTo(0);else if(35===t.which)c.trackImmediatelyTo(c.duration);else if(37===t.which||40===t.which)c.arrowKeyDown(-1);else if(39===t.which||38===t.which)c.arrowKeyDown(1);else if(33===t.which&&0<r)c.arrowKeyDown(r);else{if(!(34===t.which&&0<r))return;c.arrowKeyDown(-r)}t.preventDefault()}else"keyup"===t.type&&33<=t.which&&t.which<=40&&(c.tracking&&"keyboard"===c.trackDevice&&c.stopTracking(c.keyTrackPosition),t.preventDefault());"mouseup"!==t.type&&"keydown"!==t.type&&"keydown"!==t.type&&c.refreshTooltip()})},AccessibleSlider.prototype.arrowKeyDown=function(t){this.tracking&&"keyboard"===this.trackDevice?(this.keyTrackPosition=this.boundPos(this.keyTrackPosition+this.nextStep*t),this.inertiaCount+=1,20===this.inertiaCount&&(this.inertiaCount=0,this.nextStep*=2)):(this.nextStep=1,this.inertiaCount=0,this.keyTrackPosition=this.boundPos(this.position+this.nextStep*t),this.startTracking("keyboard",this.keyTrackPosition)),this.trackHeadAtPosition(this.keyTrackPosition)},AccessibleSlider.prototype.pageXToPosition=function(t){var e=t-this.bodyDiv.offset().left,i=this.duration*(e/this.bodyDiv.width());return this.boundPos(i)},AccessibleSlider.prototype.boundPos=function(t){return Math.max(0,Math.min(t,this.duration))},AccessibleSlider.prototype.setDuration=function(t){t!==this.duration&&(this.duration=t,this.resetHeadLocation(),this.seekHead.attr("aria-valuemax",t))},AccessibleSlider.prototype.setWidth=function(t){this.wrapperDiv.width(t),this.resizeDivs(),this.resetHeadLocation()},AccessibleSlider.prototype.getWidth=function(){return this.wrapperDiv.width()},AccessibleSlider.prototype.resizeDivs=function(){this.playedDiv.width(this.bodyDiv.width()*(this.position/this.duration)),this.loadedDiv.width(this.bodyDiv.width()*this.buffered)},AccessibleSlider.prototype.resetHeadLocation=function(){var t=this.position/this.duration,e=this.bodyDiv.width()*t;this.seekHead.css("left",e-this.seekHead.width()/2),this.tracking&&this.stopTracking(this.position)},AccessibleSlider.prototype.setPosition=function(t,e){this.position=t,this.resetHeadLocation(),this.refreshTooltip(),this.resizeDivs(),this.updateAriaValues(t,e)},AccessibleSlider.prototype.setBuffered=function(t){isNaN(t)||(this.buffered=t,this.redrawDivs)},AccessibleSlider.prototype.startTracking=function(t,e){this.tracking||(this.trackDevice=t,this.tracking=!0,this.bodyDiv.trigger("startTracking",[e]))},AccessibleSlider.prototype.stopTracking=function(t){this.trackDevice=null,this.tracking=!1,this.bodyDiv.trigger("stopTracking",[t]),this.setPosition(t,!0)},AccessibleSlider.prototype.trackHeadAtPageX=function(t){var e=this.pageXToPosition(t),i=t-this.bodyDiv.offset().left-this.seekHead.width()/2;i=Math.max(0,Math.min(i,this.bodyDiv.width()-this.seekHead.width())),this.lastTrackPosition=e,this.seekHead.css("left",i),this.reportTrackAtPosition(e)},AccessibleSlider.prototype.trackHeadAtPosition=function(t){var e=t/this.duration,i=this.bodyDiv.width()*e;this.lastTrackPosition=t,this.seekHead.css("left",i-this.seekHead.width()/2),this.reportTrackAtPosition(t)},AccessibleSlider.prototype.reportTrackAtPosition=function(t){this.bodyDiv.trigger("tracking",[t]),this.updateAriaValues(t,!0)},AccessibleSlider.prototype.updateAriaValues=function(t,e){var i,s=Math.floor(t/3600),a=Math.floor(t%3600/60),n=Math.floor(t%60),r=1===a?"minute":"minutes",o=1===n?"second":"seconds";i=0<s?s+" "+(1===s?"hour":"hours")+", "+a+" "+r+", "+n+" "+o:0<a?a+" "+r+", "+n+" "+o:n+" "+o,this.liveAriaRegion||(this.liveAriaRegion=d("<span>",{class:"able-offscreen","aria-live":"polite"}),this.wrapperDiv.append(this.liveAriaRegion)),e&&this.liveAriaRegion.text()!==i&&this.liveAriaRegion.text(i),this.seekHead.attr("aria-valuetext",i),this.seekHead.attr("aria-valuenow",Math.floor(t).toString())},AccessibleSlider.prototype.trackImmediatelyTo=function(t){this.startTracking("keyboard",t),this.trackHeadAtPosition(t),this.keyTrackPosition=t},AccessibleSlider.prototype.refreshTooltip=function(){this.overHead?(this.timeTooltip.show(),this.tracking?this.timeTooltip.text(this.positionToStr(this.lastTrackPosition)):this.timeTooltip.text(this.positionToStr(this.position)),this.setTooltipPosition(this.seekHead.position().left+this.seekHead.width()/2)):this.overBody&&this.overBodyMousePos?(this.timeTooltip.show(),this.timeTooltip.text(this.positionToStr(this.pageXToPosition(this.overBodyMousePos.x))),this.setTooltipPosition(this.overBodyMousePos.x-this.bodyDiv.offset().left)):this.timeTooltip.hide()},AccessibleSlider.prototype.setTooltipPosition=function(t){this.timeTooltip.css({left:t-this.timeTooltip.width()/2-10,bottom:this.seekHead.height()+10})},AccessibleSlider.prototype.positionToStr=function(t){var e=Math.floor(t/3600),i=Math.floor(t/60)%60,s=Math.floor(t%60);return s<10&&(s="0"+s),0<e?(i<10&&(i="0"+i),e+":"+i+":"+s):i+":"+s},AccessibleSlider.prototype.pointerEventToXY=function(t){var e={x:0,y:0};if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];e.x=i.pageX,e.y=i.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(e.x=t.pageX,e.y=t.pageY);return e}}(jQuery),function(r){AblePlayer.prototype.addVolumeSlider=function(t){var e,i,s,a,n;i=(e=this).mediaId+"-volume-slider",s=this.mediaId+"-volume-help",this.volumeTrackHeight=50,this.volumeHeadHeight=7,this.volumeTickHeight=this.volumeTrackHeight/10,this.$volumeSlider=r("<div>",{id:i,class:"able-volume-slider","aria-hidden":"true"}).hide(),this.$volumeSliderTooltip=r("<div>",{class:"able-tooltip",role:"tooltip"}).hide(),this.$volumeSliderTrack=r("<div>",{class:"able-volume-track"}),this.$volumeSliderTrackOn=r("<div>",{class:"able-volume-track able-volume-track-on"}),this.$volumeSliderHead=r("<div>",{class:"able-volume-head",role:"slider","aria-orientation":"vertical","aria-label":this.tt.volumeUpDown,"aria-valuemin":0,"aria-valuemax":10,"aria-valuenow":this.volume,tabindex:-1}),this.$volumeSliderTrack.append(this.$volumeSliderTrackOn,this.$volumeSliderHead),this.$volumeAlert=r("<div>",{class:"able-offscreen","aria-live":"assertive","aria-atomic":"true"}),n=parseInt(e.volume)/10*100,this.$volumeHelp=r("<div>",{id:s,class:"able-volume-help"}).text(n+"%, "+this.tt.volumeHelp),this.$volumeButton.attr({"aria-describedby":s}),this.$volumeSlider.append(this.$volumeSliderTooltip,this.$volumeSliderTrack,this.$volumeAlert,this.$volumeHelp),t.append(this.$volumeSlider),this.refreshVolumeSlider(this.volume),this.$volumeSliderHead.on("mousedown",function(t){t.preventDefault(),e.draggingVolume=!0,e.volumeHeadPositionTop=r(this).offset().top}),this.$mediaContainer.on("mouseover",function(t){"youtube"==e.player&&(e.draggingVolume=!1)}),r(document).on("mouseup",function(t){e.draggingVolume=!1}),r(document).on("mousemove",function(t){e.draggingVolume&&(t.pageX,a=t.pageY,e.moveVolumeHead(a))}),this.$volumeSliderHead.on("keydown",function(t){if(37===t.which||40===t.which)e.handleVolume("down");else if(39===t.which||38===t.which)e.handleVolume("up");else{if(27!==t.which&&13!==t.which&&9!==t.which)return;e.$volumeSlider.is(":visible")?e.hideVolumePopup():e.showVolumePopup()}t.preventDefault()})},AblePlayer.prototype.refreshVolumeSlider=function(t){var e,i,s,a,n;i=(e=t/10*100)+"%",s=t*this.volumeTickHeight,n=(a=this.volumeTrackHeight-s)-this.volumeHeadHeight,this.$volumeSliderTrackOn&&this.$volumeSliderTrackOn.css({height:s+"px",top:a+"px"}),this.$volumeSliderHead&&(this.$volumeSliderHead.attr({"aria-valuenow":t,"aria-valuetext":i}),this.$volumeSliderHead.css({top:n+"px"})),this.$volumeAlert&&this.$volumeAlert.text(e+"%")},AblePlayer.prototype.refreshVolumeButton=function(t){var e,i,s,a,n,r;e=this.getVolumeName(t),i=t/10*100,s=this.tt.volume+" "+i+"%","font"===this.iconType?(a="icon-volume-"+e,this.$volumeButton.find("span").first().removeClass().addClass(a),this.$volumeButton.find("span.able-clipped").text(s)):"image"===this.iconType?(n=this.imgPath+"volume-"+e+".png",this.$volumeButton.find("img").attr("src",n)):"svg"===this.iconType&&("mute"!==e&&(e="volume-"+e),r=this.getSvgData(e),this.$volumeButton.find("svg").attr("viewBox",r[0]),this.$volumeButton.find("path").attr("d",r[1]))},AblePlayer.prototype.moveVolumeHead=function(t){var e,i,s,a=this.volumeHeadPositionTop-t;if(Math.abs(a)>this.volumeTickHeight){if("up"==(e=0<a?"up":"down")&&10==this.volume)return;if("down"==e&&0==this.volume)return;i=Math.round(Math.abs(a)/this.volumeTickHeight),"up"==e?10<(s=this.volume+i)&&(s=10):(s=this.volume-i)<0&&(s=0),this.setVolume(s),this.refreshVolumeSlider(s),this.refreshVolumeButton(s),this.volumeHeadPositionTop=t}},AblePlayer.prototype.handleVolume=function(t){var e;void 0!==t?(49<=t&&t<=57?e=t-48:(e=this.getVolume(),"up"===t&&e<10?e+=1:"down"===t&&0<e&&(e-=1)),this.isMuted()&&0<e?this.setMute(!1):0===e?this.setMute(!0):(this.setVolume(e),this.refreshVolumeSlider(e),this.refreshVolumeButton(e))):this.$volumeSlider.is(":visible")?this.hideVolumePopup():this.showVolumePopup()},AblePlayer.prototype.handleMute=function(){this.isMuted()?this.setMute(!1):this.setMute(!0)},AblePlayer.prototype.showVolumePopup=function(){this.closePopups(),this.$tooltipDiv.hide(),this.$volumeSlider.show().attr("aria-hidden","false"),this.$volumeButton.attr("aria-expanded","true"),this.$volumeSliderHead.attr("tabindex","0").focus()},AblePlayer.prototype.hideVolumePopup=function(){this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeSliderHead.attr("tabindex","-1"),this.$volumeButton.attr("aria-expanded","false").focus()},AblePlayer.prototype.isMuted=function(){return"html5"===this.player?this.media.muted:"jw"===this.player&&this.jwPlayer?this.jwPlayer.getMute():"youtube"===this.player?this.youTubePlayer.isMuted():void 0},AblePlayer.prototype.setMute=function(t){t?(this.lastVolume=this.volume,this.volume=0):void 0!==this.lastVolume&&(this.volume=this.lastVolume),"html5"===this.player?this.media.muted=t:"jw"===this.player&&this.jwPlayer?this.jwPlayer.setMute(t):"youtube"===this.player&&(t?this.youTubePlayer.mute():this.youTubePlayer.unMute()),this.refreshVolumeSlider(this.volume),this.refreshVolumeButton(this.volume)},AblePlayer.prototype.setVolume=function(t){"html5"===this.player?(this.media.volume=t/10,this.hasSignLanguage&&this.signVideo&&(this.signVideo.volume=0)):"youtube"===this.player?(this.youTubePlayer.setVolume(10*t),this.volume=t):"vimeo"===this.player?this.vimeoPlayer.setVolume(t/10).then(function(){}):"jw"===this.player&&this.jwPlayer&&this.jwPlayer.setVolume(10*t),this.lastVolume=t},AblePlayer.prototype.getVolume=function(t){return"html5"===this.player?10*this.media.volume:"youtube"===this.player?this.youTubePlayer.getVolume()/10:"vimeo"===this.player?this.volume:"jw"===this.player&&this.jwPlayer?this.jwPlayer.getVolume()/10:void 0},AblePlayer.prototype.getVolumeName=function(t){return 0==t?"mute":10==t?"loud":t<5?"soft":"medium"}}(jQuery),function(d){var g="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";window.AccessibleDialog=function(t,e,i,s,a,n,r,o,l){this.title=s,this.closeButtonLabel=n,this.focusedElementBeforeModal=e,this.escapeHook=l,this.baseId=d(t).attr("id")||Math.floor(1e9*Math.random()).toString();var h=this,p=t;if((this.modal=p).css({width:r||"50%",top:o?"0":"5%"}),p.addClass("able-modal-dialog"),!o){var c=d("<button>",{class:"modalCloseButton",title:h.closeButtonLabel,"aria-label":h.closeButtonLabel}).text("X");c.keydown(function(t){32===t.which&&h.hide()}).click(function(){h.hide()});var u=d("<h1></h1>");u.attr("id","modalTitle-"+this.baseId),u.css("text-align","center"),u.text(s),a.attr("id","modalDesc-"+this.baseId),p.attr({"aria-labelledby":"modalTitle-"+this.baseId,"aria-describedby":"modalDesc-"+this.baseId}),p.prepend(u),p.prepend(c)}p.attr({"aria-hidden":"true",role:i}),p.keydown(function(t){if(27===t.which)h.escapeHook?h.escapeHook(t,this):(h.hide(),t.preventDefault());else if(9===t.which){var e=p.find("*").filter(g).filter(":visible");if(0===e.length)return;var i=d(":focus"),s=e.index(i);t.shiftKey?0===s&&(e.get(e.length-1).focus(),t.preventDefault()):s===e.length-1&&(e.get(0).focus(),t.preventDefault())}t.stopPropagation()}),d("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("aria-hidden")},AccessibleDialog.prototype.show=function(){if(!this.overlay){var t=d("<div></div>").attr({class:"able-modal-overlay",tabindex:"-1"});this.overlay=t,d("body").append(t),t.on("mousedown.accessibleModal",function(t){t.preventDefault()})}d("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("aria-hidden","true"),this.overlay.css("display","block"),this.modal.css("display","block"),this.modal.attr({"aria-hidden":"false",tabindex:"-1"}),0===this.modal.find("*").filter(g).filter(":visible").length&&this.focusedElementBeforeModal.blur();var e=this;setTimeout(function(){e.modal.focus()},300)},AccessibleDialog.prototype.hide=function(){this.overlay&&this.overlay.css("display","none"),this.modal.css("display","none"),this.modal.attr("aria-hidden","true"),d("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("aria-hidden"),this.focusedElementBeforeModal.focus()}}(jQuery),function(n){AblePlayer.prototype.getNextHeadingLevel=function(t){var e,i,s,a;return t.parents().each(function(){if(e=n(this).children(":header"),i=e.length)return s=e.eq(i-1).prop("tagName"),!1}),void 0===s?a=1:(a=parseInt(s[1]),6<(a+=1)&&(a=6)),a},AblePlayer.prototype.countProperties=function(t){var e,i;for(i in e=0,t)t.hasOwnProperty(i)&&++e;return e},AblePlayer.prototype.formatSecondsAsColonTime=function(t,e){var i,s,a,n,r,o,l;if(e)if(2===(n=t.toString().split(".")).length){if((r=n[1]).length<3)for(o=3-r.length,l=1;l<=o;l++)r+="0"}else r="000";return i=Math.floor(t/3600),s=Math.floor(t/60)%60,(a=Math.floor(t%60))<10&&(a="0"+a),0<i?(s<10&&(s="0"+s),e?i+":"+s+":"+a+"."+r:i+":"+s+":"+a):e?(i<1?i="00":i<10&&(i="0"+i),s<1?s="00":s<10&&(s="0"+s),i+":"+s+":"+a+"."+r):s+":"+a},AblePlayer.prototype.getSecondsFromColonTime=function(t){var e;return 3===(e=t.split(":")).length?3600*parseInt(e[0])+60*parseInt(e[1])+parseFloat(e[2]):2===e.length?60*parseInt(e[0])+parseFloat(e[1]):1===e.length?parseFloat(e[0]):void 0},AblePlayer.prototype.capitalizeFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},AblePlayer.prototype.roundDown=function(t,e){return Number(Math.floor(t+"e"+e)+"e-"+e)},AblePlayer.prototype.hasAttr=function(t,e){var i=t.attr(e);return void 0!==i&&!1!==i},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}}(jQuery),jQuery,AblePlayer.prototype.initDescription=function(){if(this.refreshingDesc?this.prevDescFormat=this.useDescFormat:(this.descFile=this.$sources.first().attr("data-desc-src"),void 0!==this.descFile?this.hasOpenDesc=!0:this.youTubeDescId||this.vimeoDescId?this.hasOpenDesc=!0:this.hasOpenDesc=!1),this.prefDesc?this.hasOpenDesc&&this.hasClosedDesc?(this.useDescFormat=this.prefDescFormat,this.descOn=!0,this.prefDescPause=!1):this.hasOpenDesc?(this.useDescFormat="video",this.descOn=!0):this.hasClosedDesc&&(this.useDescFormat="text",this.descOn=!0):(this.useDescFormat=!1,this.descOn=!1),"text"===this.useDescFormat&&window.speechSynthesis){this.synth=window.speechSynthesis,this.descVoices=this.synth.getVoices();for(var t=this.descVoiceIndex=0;t<this.descVoices.length;t++)if(2===this.captionLang.length){if(this.descVoices[t].lang.substr(0,2).toLowerCase()===this.captionLang.toLowerCase()){this.descVoiceIndex=t;break}}else if(this.descVoices[t].lang.toLowerCase()===this.captionLang.toLowerCase()){this.descVoiceIndex=t;break}}this.descOn?("video"===this.useDescFormat&&(this.usingAudioDescription()||this.swapDescription()),this.hasClosedDesc&&(this.prefVisibleDesc?(this.$descDiv.show(),this.$descDiv.removeClass("able-clipped")):this.$descDiv.addClass("able-clipped"),this.swappingSrc||this.showDescription(this.elapsed))):"video"===this.prevDescFormat?this.usingAudioDescription()&&this.swapDescription():"text"===this.prevDescFormat&&(this.$descDiv.hide(),this.$descDiv.removeClass("able-clipped")),this.refreshingDesc=!1},AblePlayer.prototype.usingAudioDescription=function(){return"youtube"===this.player?this.activeYouTubeId===this.youTubeDescId:"vimeo"===this.player?this.activeVimeoId===this.vimeoDescId:this.$sources.first().attr("data-desc-src")===this.$sources.first().attr("src")},AblePlayer.prototype.swapDescription=function(){var t,e,i,s;if((t=this).swapTime=this.elapsed,this.descOn?this.showAlert(this.tt.alertDescribedVersion):this.showAlert(this.tt.alertNonDescribedVersion),"html5"===this.player){if(this.usingAudioDescription()){for(e=0;e<this.$sources.length;e++)i=this.$sources[e].getAttribute("data-orig-src"),this.$sources[e].getAttribute("type"),i&&this.$sources[e].setAttribute("src",i);this.swappingSrc=!0}else{for(e=0;e<this.$sources.length;e++)i=this.$sources[e].getAttribute("src"),s=this.$sources[e].getAttribute("data-desc-src"),this.$sources[e].getAttribute("type"),s&&(this.$sources[e].setAttribute("src",s),this.$sources[e].setAttribute("data-orig-src",i));this.swappingSrc=!0}"html5"===this.player&&this.media.load()}else"youtube"===this.player?(this.usingAudioDescription()?(this.activeYouTubeId=this.youTubeId,this.showAlert(this.tt.alertNonDescribedVersion)):(this.activeYouTubeId=this.youTubeDescId,this.showAlert(this.tt.alertDescribedVersion)),void 0!==this.youTubePlayer&&this.setupAltCaptions().then(function(){t.playing?t.youTubePlayer.loadVideoById(t.activeYouTubeId,t.swapTime):t.youTubePlayer.cueVideoById(t.activeYouTubeId,t.swapTime)})):"vimeo"===this.player&&(this.usingAudioDescription()?(this.activeVimeoId=this.vimeoId,this.showAlert(this.tt.alertNonDescribedVersion)):(this.activeVimeoId=this.vimeoDescId,this.showAlert(this.tt.alertDescribedVersion)),this.vimeoPlayer.loadVideo(this.activeVimeoId).then(function(){t.playing?t.vimeoPlayer.setCurrentTime(t.swapTime):t.vimeoPlayer.pause()}))},AblePlayer.prototype.showDescription=function(t){if(!this.swappingSrc&&this.descOn){var e,i,s,a,n,r,o=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e.push(o(t.children[i]));return e.join("")};for(i=(e=this).selectedDescriptions?this.selectedDescriptions.cues:1<=this.descriptions.length?this.descriptions[0].cues:[],s=0;s<i.length;s++)if(i[s].start<=t&&i[s].end>t){a=s;break}void 0!==a?this.currentDescription!==a&&(this.$status.removeAttr("aria-live"),n=o(i[a].components),this.exposeTextDescriptions&&void 0!==this.synth&&void 0!==this.descVoiceIndex?((r=new SpeechSynthesisUtterance).voice=this.descVoices[this.descVoiceIndex],r.voiceURI="native",r.volume=1,r.rate=1.5,r.pitch=1,r.text=n,r.lang=this.captionLang,r.onend=function(t){e.pausedForDescription&&e.playMedia()},this.synth.speak(r),this.prefVisibleDesc&&this.$descDiv.html(n).removeAttr("aria-live aria-atomic")):this.$descDiv.html(n),this.prefDescPause&&this.exposeTextDescriptions&&(this.pauseMedia(),this.pausedForDescription=!0),this.currentDescription=a):(this.$descDiv.html(""),this.currentDescription=-1,this.$status.attr("aria-live","polite"))}},jQuery,AblePlayer.prototype.getUserAgent=function(){this.userAgent={},this.userAgent.browser={},/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Firefox",this.userAgent.browser.version=RegExp.$1):/MSIE (\d+\.\d+);/.test(navigator.userAgent)?(this.userAgent.browser.name="Internet Explorer",this.userAgent.browser.version=RegExp.$1):/Trident.*rv[ :]*(\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Internet Explorer",this.userAgent.browser.version=RegExp.$1):/Edge[\/\s](\d+\.\d+)/.test(navigator.userAgent)?(this.userAgent.browser.name="Edge",this.userAgent.browser.version=RegExp.$1):/OPR\/(\d+\.\d+)/i.test(navigator.userAgent)?(this.userAgent.browser.name="Opera",this.userAgent.browser.version=RegExp.$1):/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)?(this.userAgent.browser.name="Chrome",/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&(this.userAgent.browser.version=RegExp.$1)):/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)?(this.userAgent.browser.name="Safari",/Version[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&(this.userAgent.browser.version=RegExp.$1)):(this.userAgent.browser.name="Unknown",this.userAgent.browser.version="Unknown"),-1!=window.navigator.userAgent.indexOf("Windows NT 6.2")?this.userAgent.os="Windows 8":-1!=window.navigator.userAgent.indexOf("Windows NT 6.1")?this.userAgent.os="Windows 7":-1!=window.navigator.userAgent.indexOf("Windows NT 6.0")?this.userAgent.os="Windows Vista":-1!=window.navigator.userAgent.indexOf("Windows NT 5.1")?this.userAgent.os="Windows XP":-1!=window.navigator.userAgent.indexOf("Windows NT 5.0")?this.userAgent.os="Windows 2000":-1!=window.navigator.userAgent.indexOf("Mac")?this.userAgent.os="Mac/iOS":-1!=window.navigator.userAgent.indexOf("X11")?this.userAgent.os="UNIX":-1!=window.navigator.userAgent.indexOf("Linux")&&(this.userAgent.os="Linux"),this.debug},AblePlayer.prototype.isUserAgent=function(t){var e=navigator.userAgent.toLowerCase();return this.debug,-1!==e.indexOf(t.toLowerCase())},AblePlayer.prototype.isIOS=function(t){var e;return e=navigator.userAgent.toLowerCase(),!!/ipad|iphone|ipod/.exec(e)&&(void 0===t||-1!==e.indexOf("os "+t))},AblePlayer.prototype.browserSupportsVolume=function(){var t,e;return t=navigator.userAgent.toLowerCase(),!(e=/ipad|iphone|ipod|android|blackberry|windows ce|windows phone|webos|playbook/.exec(t))||!("android"!==e[0]||!/firefox/.test(t))},AblePlayer.prototype.nativeFullscreenSupported=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},function(v){AblePlayer.prototype.seekTo=function(t){var e;(this.seekFromTime=this.media.currentTime,this.seekToTime=t,this.seeking=!0,this.liveUpdatePending=!0,"html5"===this.player)?(this.startTime=t,0<(e=this.media.seekable).length&&this.startTime>=e.start(0)&&this.startTime<=e.end(0)&&(this.media.currentTime=this.startTime,this.hasSignLanguage&&this.signVideo&&(this.signVideo.currentTime=this.startTime))):"youtube"===this.player?(this.youTubePlayer.seekTo(t,!0),0<t&&void 0!==this.$posterImg&&this.$posterImg.hide()):"vimeo"===this.player&&this.vimeoPlayer.setCurrentTime(t).then(function(){});this.refreshControls("timeline")},AblePlayer.prototype.getMediaTimes=function(t,e){var i,s,a,n;return n={},s=(i=new v.Deferred).promise(),a=this,void 0!==t&&void 0!==e?(n.duration=t,n.elapsed=e,i.resolve(n)):this.getDuration().then(function(t){n.duration=a.roundDown(t,6),a.getElapsed().then(function(t){n.elapsed=a.roundDown(t,6),i.resolve(n)})}),s},AblePlayer.prototype.getDuration=function(){var e,t,i;(t=(e=new v.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getDuration().then(function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)}):e.resolve(0):("html5"===this.player?i=this.media.duration:"youtube"===this.player&&(i=this.youTubePlayer?this.youTubePlayer.getDuration():0),void 0===i||isNaN(i)||-1===i?e.resolve(0):e.resolve(i));return t},AblePlayer.prototype.getElapsed=function(){var e,t,i;(t=(e=new v.Deferred).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getCurrentTime().then(function(t){void 0===t||isNaN(t)||-1===t?e.resolve(0):e.resolve(t)}):e.resolve(0):("html5"===this.player?i=this.media.currentTime:"youtube"===this.player&&(i=this.youTubePlayer?this.youTubePlayer.getCurrentTime():0),void 0===i||isNaN(i)||-1===i?e.resolve(0):e.resolve(i));return t},AblePlayer.prototype.getPlayerState=function(){var e,t,i;if(t=(e=new v.Deferred).promise(),"html5"===(i=this).player)this.media.ended?e.resolve("ended"):this.media.paused?e.resolve("paused"):4!==this.media.readyState?e.resolve("buffering"):e.resolve("playing");else if("youtube"===this.player&&this.youTubePlayer){var s=this.youTubePlayer.getPlayerState();-1===s||5===s?e.resolve("stopped"):0===s?e.resolve("ended"):1===s?e.resolve("playing"):2===s?e.resolve("paused"):3===s&&e.resolve("buffering")}else"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.getPaused().then(function(t){t?e.resolve("paused"):i.vimeoPlayer.getEnded().then(function(t){t?e.resolve("ended"):e.resolve("playing")})});return t},AblePlayer.prototype.isPlaybackRateSupported=function(){return"html5"===this.player?!!this.media.playbackRate:"youtube"===this.player?1<this.youTubePlayer.getAvailablePlaybackRates().length:"vimeo"===this.player?this.vimeoSupportsPlaybackRateChange:void 0},AblePlayer.prototype.setPlaybackRate=function(t){t=Math.max(.5,t),"html5"===this.player?this.media.playbackRate=t:"youtube"===this.player?this.youTubePlayer.setPlaybackRate(t):"vimeo"===this.player&&this.vimeoPlayer.setPlaybackRate(t),this.hasSignLanguage&&this.signVideo&&(this.signVideo.playbackRate=t),this.$speed.text(this.tt.speed+": "+t.toFixed(2).toString()+"x")},AblePlayer.prototype.getPlaybackRate=function(){return"html5"===this.player?this.media.playbackRate:"youtube"===this.player?this.youTubePlayer.getPlaybackRate():void 0},AblePlayer.prototype.isPaused=function(){if("vimeo"===this.player)return!this.playing;this.getPlayerState().then(function(t){return"paused"===t||"stopped"===t||"ended"===t})},AblePlayer.prototype.pauseMedia=function(){"html5"===this.player?(this.media.pause(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.pause(!0)):"youtube"===this.player?this.youTubePlayer.pauseVideo():"vimeo"===this.player&&this.vimeoPlayer.pause()},AblePlayer.prototype.playMedia=function(){"html5"===this.player?(this.media.play(!0),this.hasSignLanguage&&this.signVideo&&this.signVideo.play(!0)):"youtube"===this.player?(this.youTubePlayer.playVideo(),void 0!==this.$posterImg&&this.$posterImg.hide(),this.stoppingYouTube=!1):"vimeo"===this.player&&this.vimeoPlayer.play(),this.startedPlaying=!0,this.hideControls&&(this.hidingControls=!0,this.invokeHideControlsTimeout())},AblePlayer.prototype.fadeControls=function(t){"out"==t?(this.$mediaContainer.height(),this.$playerDiv.height(),this.$playerDiv.fadeTo(2e3,0,function(){})):"in"==t&&this.$playerDiv.fadeTo(100,1)},AblePlayer.prototype.invokeHideControlsTimeout=function(){var t=this;this.hideControlsTimeout=window.setTimeout(function(){void 0!==t.playing&&!0===t.playing&&t.hideControls&&(t.fadeControls("out"),t.controlsHidden=!0)},5e3),this.hideControlsTimeoutStatus="active"},AblePlayer.prototype.refreshControls=function(e,t,i){var s,a,n,r,o,l,h,p,c,u,d,g,f,m;e="init",(s=this).swappingSrc||void 0!==this.duration&&(this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.chapterElapsed=this.getChapterElapsed()),!1===this.useFixedSeekInterval&&!1===this.seekIntervalCalculated&&0<this.duration&&this.setSeekInterval(),this.seekBar&&(this.useChapterTimes?(a=this.selectedChapters.cues.length-1,this.selectedChapters.cues[a]==this.currentChapter&&this.currentChapter.end!==this.duration?this.seekBar.setDuration(this.duration-this.currentChapter.start):this.seekBar.setDuration(this.chapterDuration)):void 0===this.duration||isNaN(this.duration)||-1===this.duration||this.seekBar.setDuration(this.duration),this.seekBar.tracking||(r=this.liveUpdatePending||this.seekBar.seekHead.is(v(document.activeElement)),this.liveUpdatePending=!1,this.useChapterTimes?this.seekBar.setPosition(this.chapterElapsed,r):this.seekBar.setPosition(this.elapsed,r)),n=this.seekBar.tracking?this.seekBar.lastTrackPosition:this.useChapterTimes?this.chapterElapsed:this.elapsed),void 0!==this.$durationContainer&&(this.useChapterTimes?this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.chapterDuration)):this.$durationContainer.text(" / "+this.formatSecondsAsColonTime(this.duration))),void 0!==this.$elapsedTimeContainer&&this.$elapsedTimeContainer.text(this.formatSecondsAsColonTime(n)),"legacy"===this.skin&&this.seekBar&&(h=0,c=(p=this.seekBar.wrapperDiv.parent().prev("div.able-left-controls")).next("div.able-right-controls"),p.children().each(function(){"BUTTON"==v(this).prop("tagName")&&(h+=v(this).outerWidth(!0))}),c.children().each(function(){"BUTTON"==v(this).prop("tagName")&&(h+=v(this).outerWidth(!0))}),u=this.fullscreen?v(window).width()-h:this.$ableWrapper.width()-h,5<Math.abs(u-this.seekBar.getWidth())&&this.seekBar.setWidth(u)),"html5"===this.player?0<this.media.buffered.length&&(g=this.media.buffered.end(0),this.useChapterTimes?(g>this.chapterDuration&&(g=this.chapterDuration),this.seekBar&&this.seekBar.setBuffered(g/this.chapterDuration)):this.seekBar&&(isNaN(g)||this.seekBar.setBuffered(g/t))):"youtube"===this.player?this.seekBar&&this.seekBar.setBuffered(this.youTubePlayer.getVideoLoadedFraction()):this.player,this.$descButton&&(this.descOn?(this.$descButton.removeClass("buttonOff").attr("aria-label",this.tt.turnOffDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOffDescriptions)):(this.$descButton.addClass("buttonOff").attr("aria-label",this.tt.turnOnDescriptions),this.$descButton.find("span.able-clipped").text(this.tt.turnOnDescriptions))),this.$ccButton&&(d=this.captions.length,this.captionsOn?(this.$ccButton.removeClass("buttonOff"),1===d&&(this.$ccButton.attr("aria-label",this.tt.hideCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.hideCaptions))):(this.$ccButton.addClass("buttonOff"),1===d&&(this.$ccButton.attr("aria-label",this.tt.showCaptions),this.$ccButton.find("span.able-clipped").text(this.tt.showCaptions))),1<d&&(this.$ccButton.attr({"aria-label":this.tt.captions,"aria-haspopup":"true","aria-controls":this.mediaId+"-captions-menu"}),this.$ccButton.find("span.able-clipped").text(this.tt.captions))),this.$fullscreenButton&&(this.fullscreen?(this.$fullscreenButton.attr("aria-label",this.tt.exitFullScreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-expand").addClass("icon-fullscreen-collapse"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.exitFullScreen)):"svg"===this.iconType?(m=this.getSvgData("fullscreen-collapse"),this.$fullscreenButton.find("svg").attr("viewBox",m[0]),this.$fullscreenButton.find("path").attr("d",m[1])):this.$fullscreenButton.find("img").attr("src",this.fullscreenCollapseButtonImg)):(this.$fullscreenButton.attr("aria-label",this.tt.enterFullScreen),"font"===this.iconType?(this.$fullscreenButton.find("span").first().removeClass("icon-fullscreen-collapse").addClass("icon-fullscreen-expand"),this.$fullscreenButton.find("span.able-clipped").text(this.tt.enterFullScreen)):"svg"===this.iconType?(m=this.getSvgData("fullscreen-expand"),this.$fullscreenButton.find("svg").attr("viewBox",m[0]),this.$fullscreenButton.find("path").attr("d",m[1])):this.$fullscreenButton.find("img").attr("src",this.fullscreenExpandButtonImg))),void 0!==this.$bigPlayButton&&void 0!==this.seekBar&&(this.paused&&!this.seekBar.tracking?(this.hideBigPlayButton||this.$bigPlayButton.show(),this.fullscreen?(this.$bigPlayButton.width(v(window).width()),this.$bigPlayButton.height(v(window).height())):(this.$bigPlayButton.width(this.$mediaContainer.width()),this.$bigPlayButton.height(this.$mediaContainer.height()))):this.$bigPlayButton.hide()),this.transcriptType&&(1===this.prefAutoScrollTranscript?(this.autoScrollTranscript=!0,this.$autoScrollTranscriptCheckbox.prop("checked",!0)):(this.autoScrollTranscript=!1,this.$autoScrollTranscriptCheckbox.prop("checked",!1)),this.autoScrollTranscript&&this.currentHighlight&&(f=Math.floor(v(".able-transcript").scrollTop()+v(this.currentHighlight).position().top-v(".able-transcript").height()/2+v(this.currentHighlight).height()/2))!==Math.floor(v(".able-transcript").scrollTop())&&(this.scrollingTranscript=!0,this.movingHighlight&&(v(".able-transcript").scrollTop(f),this.movingHighlight=!1))),this.$chaptersButton&&this.$chaptersButton.attr({"aria-label":this.tt.chapters,"aria-haspopup":"true","aria-controls":this.mediaId+"-chapters-menu"}),o={stopped:this.tt.statusStopped,paused:this.tt.statusPaused,playing:this.tt.statusPlaying,buffering:this.tt.statusBuffering,ended:this.tt.statusEnd},this.stoppingYouTube?(this.$status.text()!==this.tt.statusStopped&&this.$status.text(this.tt.statusStopped),this.$playpauseButton.find("span").first().hasClass("icon-pause")&&("font"===this.iconType?(this.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),this.$playpauseButton.find("span.able-clipped").text(this.tt.play)):"svg"===this.iconType?(m=this.getSvgData("play"),this.$playpauseButton.find("svg").attr("viewBox",m[0]),this.$playpauseButton.find("path").attr("d",m[1])):this.$playpauseButton.find("img").attr("src",this.playButtonImg))):void 0!==this.$status&&void 0!==this.seekBar&&this.getPlayerState().then(function(t){s.$status.text()===o[t]||s.seekBar.tracking?(s.statusDebounceStart=null,s.debouncingStatus=!1,clearTimeout(s.statusTimeout),s.statusTimeout=null):(s.swappingSrc?s.debouncingStatus||(s.statusMessageThreshold=2e3):s.debouncingStatus||(s.statusMessageThreshold=250),l=(new Date).getTime(),s.statusDebounceStart?l-s.statusDebounceStart>s.statusMessageThreshold&&(s.$status.text(o[t]),s.statusDebounceStart=null,clearTimeout(s.statusTimeout),s.statusTimeout=null):(s.statusDebounceStart=l,s.debouncingStatus=!0,s.statusTimeout=setTimeout(function(){s.debouncingStatus=!1,s.refreshControls(e)},s.statusMessageThreshold))),s.seekBar.tracking||s.stoppingYouTube||("paused"===t||"stopped"===t||"ended"===t?(s.$playpauseButton.attr("aria-label",s.tt.play),"font"===s.iconType?(s.$playpauseButton.find("span").first().removeClass("icon-pause").addClass("icon-play"),s.$playpauseButton.find("span.able-clipped").text(s.tt.play)):"svg"===s.iconType?(m=s.getSvgData("play"),s.$playpauseButton.find("svg").attr("viewBox",m[0]),s.$playpauseButton.find("path").attr("d",m[1])):s.$playpauseButton.find("img").attr("src",s.playButtonImg)):(s.$playpauseButton.attr("aria-label",s.tt.pause),"font"===s.iconType?(s.$playpauseButton.find("span").first().removeClass("icon-play").addClass("icon-pause"),s.$playpauseButton.find("span.able-clipped").text(s.tt.pause)):"svg"===s.iconType?(m=s.getSvgData("pause"),s.$playpauseButton.find("svg").attr("viewBox",m[0]),s.$playpauseButton.find("path").attr("d",m[1])):s.$playpauseButton.find("img").attr("src",s.pauseButtonImg)))}),this.fullscreen||(this.$statusBarDiv.height()+5<this.$statusBarDiv.find("span.able-speed").height()?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):(this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1),this.$statusBarDiv.width()<300?(this.$statusBarDiv.find("span.able-speed").hide(),this.hidingSpeed=!0):this.hidingSpeed&&(this.$statusBarDiv.find("span.able-speed").show(),this.hidingSpeed=!1))))},AblePlayer.prototype.getHiddenWidth=function(t){var e=t.clone().appendTo("body"),i=e.outerWidth();return e.remove(),i},AblePlayer.prototype.handlePlay=function(t){this.paused?this.playMedia():this.pauseMedia()},AblePlayer.prototype.handleRestart=function(){this.seekTo(0)},AblePlayer.prototype.handlePrevTrack=function(){0===this.playlistIndex?this.playlistIndex=this.$playlist.length-1:this.playlistIndex--,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleNextTrack=function(){this.playlistIndex===this.$playlist.length-1?this.playlistIndex=0:this.playlistIndex++,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleRewind=function(){var t;t=this.elapsed-this.seekInterval,this.useChapterTimes?t<this.currentChapter.start&&(t=this.currentChapter.start):t<0&&(t=0),this.seekTo(t)},AblePlayer.prototype.handleFastForward=function(){var t,e;e=this.chapters.length-1,t=this.elapsed+this.seekInterval,this.useChapterTimes?this.chapters[e]==this.currentChapter?t>this.duration||t>this.currentChapter.end?t=Math.min(this.duration,this.currentChapter.end):this.duration%t<this.seekInterval&&(t=Math.min(this.duration,this.currentChapter.end)):t>this.currentChapter.end&&(t=this.currentChapter.end):t>this.duration&&(t=this.duration),this.seekTo(t)},AblePlayer.prototype.handleRateIncrease=function(){this.changeRate(1)},AblePlayer.prototype.handleRateDecrease=function(){this.changeRate(-1)},AblePlayer.prototype.changeRate=function(t){var e,i,s,a;"html5"===this.player?this.setPlaybackRate(this.getPlaybackRate()+.25*t):"youtube"===this.player?(e=this.youTubePlayer.getAvailablePlaybackRates(),i=this.getPlaybackRate(),-1===(s=e.indexOf(i))||(s+=t)<e.length&&0<=s&&this.setPlaybackRate(e[s])):"vimeo"===this.player&&(1===t?a=this.vimeoPlaybackRate+.5<=2?this.vimeoPlaybackRate+.5:2:-1===t&&(a=.5<=this.vimeoPlaybackRate-.5?this.vimeoPlaybackRate-.5:.5),this.setPlaybackRate(a))},AblePlayer.prototype.handleCaptionToggle=function(){var t;if(this.hidingPopup)return this.hidingPopup=!1;if(1===(t=this.captions.length?this.captions:[]).length){if(!0===this.captionsOn)this.captionsOn=!1,this.prefCaptions=0,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.unloadModule(this.ytCaptionModule):this.$captionsWrapper.hide();else{this.captionsOn=!0,this.prefCaptions=1,this.updateCookie("prefCaptions"),this.usingYouTubeCaptions?void 0!==this.ytCaptionModule&&this.youTubePlayer.loadModule(this.ytCaptionModule):this.$captionsWrapper.show();for(var e=0;e<t.length;e++)!0===t[e].def&&(this.selectedCaptions=t[e]);this.selectedCaptions=this.captions[0],0<=this.descriptions.length&&(this.selectedDescriptions=this.descriptions[0])}this.refreshControls("captions")}else this.captionsPopup&&this.captionsPopup.is(":visible")?(this.captionsPopup.hide(),this.hidingPopup=!1,this.$ccButton.removeAttr("aria-expanded").focus()):(this.closePopups(),this.captionsPopup&&(this.captionsPopup.show(),this.$ccButton.attr("aria-expanded","true"),this.captionsPopup.css("top",this.$ccButton.position().top-this.captionsPopup.outerHeight()),this.captionsPopup.css("left",this.$ccButton.position().left),this.captionsPopup.find("li").removeClass("able-focus"),this.captionsPopup.find("li").first().focus().addClass("able-focus")))},AblePlayer.prototype.handleChapters=function(){if(this.hidingPopup)return this.hidingPopup=!1;this.chaptersPopup.is(":visible")?(this.chaptersPopup.hide(),this.hidingPopup=!1,this.$chaptersButton.removeAttr("aria-expanded").focus()):(this.closePopups(),this.chaptersPopup.show(),this.$chaptersButton.attr("aria-expanded","true"),this.chaptersPopup.css("top",this.$chaptersButton.position().top-this.chaptersPopup.outerHeight()),this.chaptersPopup.css("left",this.$chaptersButton.position().left),this.chaptersPopup.find("li").removeClass("able-focus"),this.chaptersPopup.find('li[aria-checked="true"]').length?this.chaptersPopup.find('li[aria-checked="true"]').focus().addClass("able-focus"):this.chaptersPopup.find("li").first().addClass("able-focus").attr("aria-checked","true").focus())},AblePlayer.prototype.handleDescriptionToggle=function(){this.descOn=!this.descOn,this.prefDesc=+this.descOn,this.updateCookie("prefDesc"),this.$descDiv.is(":hidden")||this.$descDiv.hide(),this.refreshingDesc=!0,this.initDescription(),this.refreshControls("descriptions")},AblePlayer.prototype.handlePrefsClick=function(t){var e,i;if(this.hidingPopup)return this.hidingPopup=!1;this.prefsPopup.is(":visible")?(this.prefsPopup.hide(),this.hidingPopup=!1,this.$prefsButton.removeAttr("aria-expanded").focus(),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1")):(this.closePopups(),this.prefsPopup.show(),this.$prefsButton.attr("aria-expanded","true"),e=this.$prefsButton.position(),i=this.$ableDiv.width()-5-this.prefsPopup.width(),this.prefsPopup.css("top",e.top-this.prefsPopup.outerHeight()),this.prefsPopup.css("left",i),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","0"),this.prefsPopup.find("li").first().focus().addClass("able-focus"))},AblePlayer.prototype.handleHelpClick=function(){this.setFullscreen(!1),this.helpDialog.show()},AblePlayer.prototype.handleTranscriptToggle=function(){this.$transcriptDiv.is(":visible")?(this.$transcriptArea.hide(),this.$transcriptButton.addClass("buttonOff").attr("aria-label",this.tt.showTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.showTranscript),this.prefTranscript=0,this.$transcriptButton.focus().addClass("able-focus")):(this.positionDraggableWindow("transcript"),this.$transcriptArea.show(),this.$transcriptButton.removeClass("buttonOff").attr("aria-label",this.tt.hideTranscript),this.$transcriptButton.find("span.able-clipped").text(this.tt.hideTranscript),this.prefTranscript=1),this.updateCookie("prefTranscript")},AblePlayer.prototype.handleSignToggle=function(){this.$signWindow.is(":visible")?(this.$signWindow.hide(),this.$signButton.addClass("buttonOff").attr("aria-label",this.tt.showSign),this.$signButton.find("span.able-clipped").text(this.tt.showSign),this.prefSign=0,this.$signButton.focus().addClass("able-focus")):(this.positionDraggableWindow("sign"),this.$signWindow.show(),this.$signButton.removeClass("buttonOff").attr("aria-label",this.tt.hideSign),this.$signButton.find("span.able-clipped").text(this.tt.hideSign),this.prefSign=1),this.updateCookie("prefSign")},AblePlayer.prototype.isFullscreen=function(){return this.nativeFullscreenSupported()?!!(document.fullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.msFullscreenElement):!!this.modalFullscreenActive},AblePlayer.prototype.setFullscreen=function(t){if(this.fullscreen!=t){var e=this,i=this.$ableWrapper,s=i[0];if(this.nativeFullscreenSupported())t?(this.preFullScreenWidth=this.$ableWrapper.width(),this.preFullScreenHeight=this.$ableWrapper.height(),s.requestFullscreen?s.requestFullscreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.msRequestFullscreen&&s.msRequestFullscreen(),this.fullscreen=!0):(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),this.fullscreen=!1),v(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",function(t){e.fullscreen?e.clickedFullscreenButton||(e.fullscreen=!1,e.restoringAfterFullScreen=!0,e.resizePlayer(e.preFullScreenWidth,e.preFullScreenHeight)):(e.restoringAfterFullScreen=!0,e.resizePlayer(e.preFullScreenWidth,e.preFullScreenHeight)),setTimeout(function(){e.clickedFullscreenButton=!1},1e3)});else{if(!this.fullscreenDialog){var a=v("<div>"),n=v("<p>",{class:"able-screenreader-alert"}).text(this.tt.fullscreen);a.append(n),this.fullscreenDialog=new AccessibleDialog(a,this.$fullscreenButton,"dialog","Fullscreen video player",n,this.tt.exitFullScreen,"100%",!0,function(){e.handleFullscreenToggle()}),v("body").append(a)}var r=this.paused;if(t){this.modalFullscreenActive=!0,this.fullscreenDialog.show(),this.$modalFullscreenPlaceholder=v('<div class="placeholder">'),this.$modalFullscreenPlaceholder.insertAfter(i),i.appendTo(this.fullscreenDialog.modal),i===this.$ableColumnLeft&&i.width("100%");var o=v(window).height()-this.$playerDiv.height();this.$descDiv.is(":hidden")||(o-=this.$descDiv.height()),this.resizePlayer(v(window).width(),o)}else this.modalFullscreenActive=!1,i===this.$ableColumnLeft&&i.width("50%"),i.insertAfter(this.$modalFullscreenPlaceholder),this.$modalFullscreenPlaceholder.remove(),this.fullscreenDialog.hide(),this.resizePlayer(this.$ableWrapper.width(),this.$ableWrapper.height());!r&&this.paused&&this.playMedia()}this.refreshControls("fullscreen")}},AblePlayer.prototype.handleFullscreenToggle=function(){var t=this.paused;this.setFullscreen(!this.fullscreen),t?this.pauseMedia():t||this.playMedia(),this.fullscreen?(this.hideControls=!0,this.playing&&(this.fadeControls("out"),this.controlsHidden=!0)):(this.hideControls=this.hideControlsOriginal,this.hideControls||(this.controlsHidden&&(this.fadeControls("in"),this.controlsHidden=!1),"active"===this.hideControlsTimeoutStatus&&(window.clearTimeout(this.hideControlsTimeout),this.hideControlsTimeoutStatus="clear")))},AblePlayer.prototype.handleTranscriptLockToggle=function(t){this.autoScrollTranscript=t,this.prefAutoScrollTranscript=+t,this.updateCookie("prefAutoScrollTranscript"),this.refreshControls("transcript")},AblePlayer.prototype.showTooltip=function(t){t.is(":animated")?t.stop(!0,!0).show().delay(4e3).fadeOut(1e3):t.stop().show().delay(4e3).fadeOut(1e3)},AblePlayer.prototype.showAlert=function(t,e){var i,s,a,n;"transcript"===e?(i=this.$transcriptAlert,s=this.$transcriptArea):"sign"===e?(i=this.$signAlert,s=this.$signWindow):i="screenreader"===e?this.$srAlertBox:this.$alertBox,i.text(t).show(),"transcript"==e||"sign"===e?(a=s.width()>i.width()?s.width()/2-i.width()/2:10,"sign"===e?n=s.height()/3*2:"transcript"===e&&(n=this.$transcriptToolbar.height()+30),i.css({top:n+"px",left:a+"px"})):"screenreader"!==e&&i.css({left:this.$playerDiv.width()/2-i.width()/2}),"screenreader"!==e&&setTimeout(function(){i.fadeOut(300)},3e3)},AblePlayer.prototype.showedAlert=function(t){return"transcript"===t?!!this.showedTranscriptAlert:"sign"===t&&!!this.showedSignAlert},AblePlayer.prototype.resizePlayer=function(t,e){var i,s,a;this.fullscreen?(void 0!==this.$vidcapContainer&&(this.$ableWrapper.css({width:t+"px","max-width":""}),this.$vidcapContainer.css({height:e+"px",width:t}),this.$media.css({height:e+"px",width:t})),void 0!==this.$transcriptArea&&this.retrieveOffscreenWindow("transcript",t,e),void 0!==this.$signWindow&&this.retrieveOffscreenWindow("sign",t,e)):this.restoringAfterFullScreen&&(t=this.preFullScreenWidth,e=this.preFullScreenHeight,this.restoringAfterFullScreen=!1,this.$ableWrapper.css({"max-width":t+"px",width:""}),void 0!==this.$vidcapContainer&&this.$vidcapContainer.css({height:"",width:""}),this.$media.css({width:"100%",height:"auto"})),"youtube"===this.player&&this.youTubePlayer&&this.youTubePlayer.setSize(t,e),void 0!==this.$captionsDiv&&(i=parseInt(this.prefCaptionsSize,10),a=(s=1e3<t?1.5*i:t<400?i/1.5:i)+25,this.$captionsDiv.css("font-size",s+"%"),this.$captionsWrapper.css("line-height",a+"%")),this.refreshControls("captions")},AblePlayer.prototype.retrieveOffscreenWindow=function(t,e,i){var s,a,n,r,o,l,h,p;"transcript"==t?s=this.$transcriptArea:"sign"==t&&(s=this.$signWindow),l=s.width(),p=s.height(),n=(a=s.position()).top,o=(r=a.left)+l,h=n+p,n<0&&(n=10,s.css("top",n)),r<0&&(r=10,s.css("left",r)),e<o&&(r=e-20-l,s.css("left",r)),i<h&&(n=i-10-p,s.css("top",n))},AblePlayer.prototype.getHighestZIndex=function(){var t,e;return t=0,v("body *").not(".able-modal-dialog,.able-modal-dialog *,.able-modal-overlay,.able-modal-overlay *,.able-sign-window,.able-transcript-area").each(function(){e=v(this).css("z-index"),Number.isInteger(+e)&&parseInt(e)>t&&(t=parseInt(e))}),t},AblePlayer.prototype.updateZIndex=function(t){var e,i,s,a;if(8e3,7e3,this.getHighestZIndex(),void 0===this.$transcriptArea||void 0===this.$signWindow)return void 0!==this.$transcriptArea?7e3<(e=parseInt(this.$transcriptArea.css("z-index")))&&this.$transcriptArea.css("z-index",7e3):void 0!==this.$signWindow&&8e3<(i=parseInt(this.$signWindow.css("z-index")))&&this.$signWindow.css("z-index",8e3),!1;if((e=parseInt(this.$transcriptArea.css("z-index")))===(i=parseInt(this.$signWindow.css("z-index"))))s=8e3,a=7e3;else if(i<e){if("transcript"===t)return!1;s=e,a=i}else{if("sign"===t)return!1;s=i,a=e}"transcript"===t?(this.$transcriptArea.css("z-index",s),this.$signWindow.css("z-index",a)):"sign"===t&&(this.$signWindow.css("z-index",s),this.$transcriptArea.css("z-index",a))},AblePlayer.prototype.syncTrackLanguages=function(t,e){var i,s,a,n,r;for(i=0;i<this.captions.length;i++)this.captions[i].language===e&&(s=this.captions[i]);for(i=0;i<this.chapters.length;i++)this.chapters[i].language===e&&(n=this.chapters[i]);for(i=0;i<this.descriptions.length;i++)this.descriptions[i].language===e&&(a=this.descriptions[i]);for(i=0;i<this.meta.length;i++)this.meta[i].language===e&&(r=this.meta[i]);this.transcriptLang=e,"init"===t||"captions"===t?(this.captionLang=e,this.selectedCaptions=s,this.selectedChapters=n,this.selectedDescriptions=a,this.selectedMeta=r,this.transcriptCaptions=s,this.transcriptChapters=n,this.transcriptDescriptions=a,this.updateChaptersList()):"transcript"===t&&(this.transcriptCaptions=s,this.transcriptChapters=n,this.transcriptDescriptions=a),this.updateTranscript()}}(jQuery),function(r){AblePlayer.prototype.updateCaption=function(t){this.usingYouTubeCaptions||void 0===this.$captionsWrapper||(this.captionsOn?(this.$captionsWrapper.show(),void 0!==t&&this.showCaptions(t)):this.$captionsWrapper&&(this.$captionsWrapper.hide(),this.prefCaptions=0))},AblePlayer.prototype.updateCaptionsMenu=function(t){this.captionsPopup.find("li").attr("aria-checked","false"),void 0===t?this.captionsPopup.find("li").last().attr("aria-checked","true"):this.captionsPopup.find("li[lang="+t+"]").attr("aria-checked","true")},AblePlayer.prototype.getCaptionClickFunction=function(t){var e=this;return function(){e.selectedCaptions=t,e.captionLang=t.language,e.currentCaption=-1,e.usingYouTubeCaptions?e.captionsOn?void 0!==e.ytCaptionModule&&e.youTubePlayer.setOption(e.ytCaptionModule,"track",{languageCode:e.captionLang}):(e.resettingYouTubeCaptions=!0,e.youTubePlayer.loadModule(e.ytCaptionModule)):e.usingVimeoCaptions?e.vimeoPlayer.enableTextTrack(e.captionLang).then(function(t){}).catch(function(t){t.name}):(e.syncTrackLanguages("captions",e.captionLang),e.swappingSrc||(e.updateCaption(e.elapsed),e.showDescription(e.elapsed))),e.captionsOn=!0,e.hidingPopup=!0,e.captionsPopup.hide(),setTimeout(function(){e.hidingPopup=!1},100),e.updateCaptionsMenu(e.captionLang),e.$ccButton.focus(),e.prefCaptions=1,e.updateCookie("prefCaptions"),e.refreshControls("captions")}},AblePlayer.prototype.getCaptionOffFunction=function(){var t=this;return function(){"youtube"==t.player?t.youTubePlayer.unloadModule(t.ytCaptionModule):t.usingVimeoCaptions&&t.vimeoPlayer.disableTextTrack(),t.captionsOn=!1,t.currentCaption=-1,t.hidingPopup=!0,t.captionsPopup.hide(),setTimeout(function(){t.hidingPopup=!1},100),t.updateCaptionsMenu(),t.$ccButton.focus(),t.prefCaptions=0,t.updateCookie("prefCaptions"),this.swappingSrc||(t.refreshControls("captions"),t.updateCaption())}},AblePlayer.prototype.showCaptions=function(t){var e,i,s,a;for(a=this.selectedCaptions?this.selectedCaptions.cues:1<=this.captions.length?this.captions[0].cues:[],e=0;e<a.length;e++)if(a[e].start<=t&&a[e].end>t){i=e;break}void 0!==i?this.currentCaption!==i&&(s=this.flattenCueForCaption(a[i]).replace("\n","<br>"),this.$captionsDiv.html(s),this.currentCaption=i,0===s.length?this.$captionsDiv.css("display","none"):this.$captionsDiv.css("display","inline-block")):(this.$captionsDiv.html(""),this.currentCaption=-1)},AblePlayer.prototype.flattenCueForCaption=function(t){var e=[],s=function(t){var e,i=[];if("string"===t.type)i.push(t.value);else if("v"===t.type)for(i.push("("+t.value+")"),e=0;e<t.children.length;e++)i.push(s(t.children[e]));else if("i"===t.type){for(i.push("<em>"),e=0;e<t.children.length;e++)i.push(s(t.children[e]));i.push("</em>")}else if("b"===t.type){for(i.push("<strong>"),e=0;e<t.children.length;e++)i.push(s(t.children[e]));i.push("</strong>")}else for(e=0;e<t.children.length;e++)i.push(s(t.children[e]));return i.join("")};if(void 0!==t.components)for(var i=0;i<t.components.children.length;i++)e.push(s(t.components.children[i]));return e.join("")},AblePlayer.prototype.getCaptionsOptions=function(t){var e=[];switch(t){case"prefCaptionsFont":e[0]=this.tt.serif,e[1]=this.tt.sans,e[3]=this.tt.cursive,e[4]=this.tt.fantasy,e[2]=this.tt.monospace;break;case"prefCaptionsColor":case"prefCaptionsBGColor":e[0]=["white",this.tt.white],e[1]=["yellow",this.tt.yellow],e[2]=["green",this.tt.green],e[3]=["cyan",this.tt.cyan],e[4]=["blue",this.tt.blue],e[5]=["magenta",this.tt.magenta],e[6]=["red",this.tt.red],e[7]=["black",this.tt.black];break;case"prefCaptionsSize":e[0]="75%",e[1]="100%",e[2]="125%",e[3]="150%",e[4]="200%";break;case"prefCaptionsOpacity":e[0]="0%",e[1]="25%",e[2]="50%",e[3]="75%",e[4]="100%";break;case"prefCaptionsStyle":e[0]=this.tt.captionsStylePopOn,e[1]=this.tt.captionsStyleRollUp;break;case"prefCaptionsPosition":e[0]="overlay",e[1]="below"}return e},AblePlayer.prototype.translatePrefs=function(t,e,i){if("youtube"==i&&"size"===t)switch(e){case"75%":return-1;case"100%":return 0;case"125%":return 1;case"150%":return 2;case"200%":return 3}return!1},AblePlayer.prototype.stylizeCaptions=function(t,e){var i,s,a,n;void 0!==t&&("prefCaptionsPosition"==e?this.positionCaptions():void 0!==e?("prefCaptionsFont"===e?i="font-family":"prefCaptionsSize"===e?i="font-size":"prefCaptionsColor"===e?i="color":"prefCaptionsBGColor"===e?i="background-color":"prefCaptionsOpacity"===e&&(i="opacity"),s="prefCaptionsOpacity"===e?parseFloat(r("#"+this.mediaId+"_"+e).val())/100:r("#"+this.mediaId+"_"+e).val(),t.css(i,s)):(a=parseFloat(this.prefCaptionsOpacity)/100,t.css({"font-family":this.prefCaptionsFont,"font-size":this.prefCaptionsSize,color:this.prefCaptionsColor,"background-color":this.prefCaptionsBGColor,opacity:a}),t===this.$captionsDiv&&void 0!==this.$captionsWrapper&&(n=parseInt(this.prefCaptionsSize,10)+25,this.$captionsWrapper.css("line-height",n+"%")),"below"===this.prefCaptionsPosition?void 0!==this.$captionsWrapper&&this.$captionsWrapper.css({"background-color":this.prefCaptionsBGColor,opacity:"1"}):"overlay"===this.prefCaptionsPosition&&void 0!==this.$captionsWrapper&&this.$captionsWrapper.css({"background-color":"transparent",opacity:""}),this.positionCaptions()))},AblePlayer.prototype.positionCaptions=function(t){void 0===t&&(t=this.prefCaptionsPosition),void 0!==this.$captionsWrapper&&("below"==t?(this.$captionsWrapper.removeClass("able-captions-overlay").addClass("able-captions-below"),this.$captionsWrapper.css({"background-color":this.prefCaptionsBGColor,opacity:"1"})):(this.$captionsWrapper.removeClass("able-captions-below").addClass("able-captions-overlay"),this.$captionsWrapper.css({"background-color":"transparent",opacity:""})))}}(jQuery),function(p){AblePlayer.prototype.populateChaptersDiv=function(){var t,e,i;p("#"+this.chaptersDivLocation)&&(this.$chaptersDiv=p("#"+this.chaptersDivLocation),this.$chaptersDiv.addClass("able-chapters-div"),this.chaptersTitle&&(t="h"+this.getNextHeadingLevel(this.$chaptersDiv).toString(),e=this.mediaId+"-chapters-heading",i=p("<"+t+">",{class:"able-chapters-heading",id:e}).text(this.chaptersTitle),this.$chaptersDiv.append(i)),this.$chaptersNav=p("<nav>"),this.chaptersTitle?this.$chaptersNav.attr("aria-labelledby",e):this.$chaptersNav.attr("aria-label",this.tt.chapters),this.$chaptersDiv.append(this.$chaptersNav),this.updateChaptersList())},AblePlayer.prototype.updateChaptersList=function(){var e,t,i,s,a,n,r,o,l,h;if(!(e=this).$chaptersNav)return!1;if(void 0===this.useChapterTimes&&("chapter"===this.seekbarScope&&this.selectedChapters.cues.length?this.useChapterTimes=!0:this.useChapterTimes=!1),0<(t=this.useChapterTimes?this.selectedChapters.cues:1<=this.chapters.length?this.chapters[0].cues:[]).length){for(h=p("<ul>"),i=0;i<t.length;i++)s=i,a=p("<li></li>"),o=function(t){return function(){e.seekTrigger="chapter",l=p(this).closest("li"),h=p(this).closest("ul").find("li"),h.index(l),h.removeClass("able-current-chapter").attr("aria-selected",""),l.addClass("able-current-chapter").attr("aria-selected","true"),e.updateChapter(t),e.seekTo(t)}},(n=p("<button>",{type:"button",val:s}).text(this.flattenCueForCaption(t[s]))).on("click",o(t[s].start)),n.on("focus",function(){p(this).closest("ul").find("li").removeClass("able-focus"),p(this).closest("li").addClass("able-focus")}),a.on("hover",function(){p(this).closest("ul").find("li").removeClass("able-focus"),p(this).addClass("able-focus")}),a.on("mouseleave",function(){p(this).removeClass("able-focus")}),n.on("blur",function(){p(this).closest("li").removeClass("able-focus")}),a.append(n),h.append(a),this.defaultChapter===t[s].id&&(n.attr("aria-selected","true").parent("li").addClass("able-current-chapter"),this.currentChapter=t[s],r=!0);r||(this.currentChapter=t[0],h.find("button").first().attr("aria-selected","true").parent("li").addClass("able-current-chapter")),this.$chaptersNav.html(h)}return!1},AblePlayer.prototype.seekToChapter=function(t){for(var e=0;e<this.selectedChapters.cues.length;){if(this.selectedChapters.cues[e].id==t){this.seekTo(this.selectedChapters.cues[e].start),this.updateChapter(this.selectedChapters.cues[e].start);break}e++}},AblePlayer.prototype.updateChapter=function(t){if(void 0!==this.selectedChapters){var e,i,s;for(e=this.selectedChapters.cues,i=0;i<e.length;i++)if(e[i].start<=t&&e[i].end>t){s=i;break}void 0!==s&&this.currentChapter!==e[s]&&(this.currentChapter=e[s],this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.seekIntervalCalculated=!1),void 0!==this.$chaptersDiv&&(this.$chaptersDiv.find("ul").find("li").removeClass("able-current-chapter").attr("aria-selected",""),this.$chaptersDiv.find("ul").find("li").eq(s).addClass("able-current-chapter").attr("aria-selected","true")))}},AblePlayer.prototype.getChapterDuration=function(){var t,e;return void 0===this.currentChapter?0:void 0===this.duration?0:(t=this.selectedChapters.cues.length-1,this.selectedChapters.cues[t]==this.currentChapter&&this.currentChapter.end!==this.duration?(e=this.duration,this.currentChapter.end=this.duration):e=this.currentChapter.end,e-this.currentChapter.start)},AblePlayer.prototype.getChapterElapsed=function(){return void 0===this.currentChapter?0:this.elapsed>this.currentChapter.start?this.elapsed-this.currentChapter.start:0},AblePlayer.prototype.convertChapterTimeToVideoTime=function(t){if(void 0===this.currentChapter)return t;var e=this.currentChapter.start+t;return e>this.currentChapter.end?this.currentChapter.end:e},AblePlayer.prototype.getChapterClickFunction=function(t){var e=this;return function(){e.seekTrigger="chapter",e.seekTo(t),e.hidingPopup=!0,e.chaptersPopup.hide(),setTimeout(function(){e.hidingPopup=!1},100),e.$chaptersButton.focus()}}}(jQuery),function(p){AblePlayer.prototype.updateMeta=function(t){this.hasMeta&&("text"===this.metaType&&this.$metaDiv.show(),this.showMeta(t||this.elapsed))},AblePlayer.prototype.showMeta=function(t){var e,i,s,a,n,r,o,l,h;for(e=[],a=1<=this.meta.length?this.meta:[],i=0;i<a.length;i++)if(a[i].start<=t&&a[i].end>t){s=i;break}if(void 0!==s){if(this.currentMeta!==s)if("text"===this.metaType)this.$metaDiv.html(this.flattenCueForMeta(a[s]).replace("\n","<br>"));else if("selector"===this.metaType){for(n=this.flattenCueForMeta(a[s]).split("\n"),r=0;r<n.length;r++)"pause"===(o=p.trim(n[r])).toLowerCase().trim()?(this.hideBigPlayButton=!0,this.pauseMedia()):"focus:"==o.toLowerCase().substring(0,6)?(h=o.substring(6).trim(),p(h).length&&p(h).focus()):p(o).length&&(this.currentMeta=s,void 0===(l=parseInt(p(o).attr("data-duration")))||isNaN(l)?p(o).show():p(o).show().delay(l).fadeOut(),this.visibleSelectors.push(o),e.push(o));if(this.visibleSelectors&&this.visibleSelectors.length&&this.visibleSelectors.length!==e.length)for(r=this.visibleSelectors.length-1;0<=r;r--)-1==p.inArray(this.visibleSelectors[r],e)&&(p(this.visibleSelectors[r]).hide(),this.visibleSelectors.splice(r,1))}}else{if(void 0!==this.$metaDiv&&this.$metaDiv.html(""),this.visibleSelectors&&this.visibleSelectors.length){for(r=0;r<this.visibleSelectors.length;r++)p(this.visibleSelectors[r]).hide();this.visibleSelectors=[]}this.currentMeta=-1}},AblePlayer.prototype.flattenCueForMeta=function(t){for(var e=[],s=function(t){var e,i=[];if("string"===t.type)i.push(t.value);else if("v"===t.type)for(i.push("["+t.value+"]"),e=0;e<t.children.length;e++)i.push(s(t.children[e]));else for(e=0;e<t.children.length;e++)i.push(s(t.children[e]));return i.join("")},i=0;i<t.components.children.length;i++)e.push(s(t.components.children[i]));return e.join("")}}(jQuery),function(b){AblePlayer.prototype.setupTranscript=function(){var t=new b.Deferred,e=t.promise();return this.transcriptType||!this.captions.length||this.usingYouTubeCaptions||this.usingVimeoCaptions||(this.transcriptType="popup"),this.transcriptType?"popup"===this.transcriptType||"external"===this.transcriptType?(this.injectTranscriptArea(),t.resolve()):"manual"===this.transcriptType&&(this.setupManualTranscript(),t.resolve()):t.resolve(),e},AblePlayer.prototype.injectTranscriptArea=function(){var t,e,i,s,a;if(this.$transcriptArea=b("<div>",{class:"able-transcript-area",tabindex:"-1"}),this.$transcriptToolbar=b("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$transcriptDiv=b("<div>",{class:"able-transcript"}),this.$autoScrollTranscriptCheckbox=b("<input>",{id:"autoscroll-transcript-checkbox",type:"checkbox"}),t=b("<label>",{for:"autoscroll-transcript-checkbox"}).text(this.tt.autoScroll),this.$transcriptToolbar.append(t,this.$autoScrollTranscriptCheckbox),1<this.captions.length)for(e=b("<div>",{class:"transcript-language-select-wrapper"}),i=b("<label>",{for:"transcript-language-select"}).text(this.tt.language),this.$transcriptLanguageSelect=b("<select>",{id:"transcript-language-select"}),s=0;s<this.captions.length;s++)a=b("<option></option>",{value:this.captions[s].language,lang:this.captions[s].language}).text(this.captions[s].label),this.captions[s].def&&a.prop("selected",!0),this.$transcriptLanguageSelect.append(a);e&&(e.append(i,this.$transcriptLanguageSelect),this.$transcriptToolbar.append(e)),this.$transcriptArea.append(this.$transcriptToolbar,this.$transcriptDiv),this.transcriptDivLocation?b("#"+this.transcriptDivLocation).append(this.$transcriptArea):this.$ableWrapper.append(this.$transcriptArea),this.transcriptDivLocation||(this.initDragDrop("transcript"),1===this.prefTranscript&&this.positionDraggableWindow("transcript",this.getDefaultWidth("transcript"))),this.prefTranscript||this.transcriptDivLocation||this.$transcriptArea.hide()},AblePlayer.prototype.addTranscriptAreaEvents=function(){var e=this;this.$autoScrollTranscriptCheckbox.click(function(){e.handleTranscriptLockToggle(e.$autoScrollTranscriptCheckbox.prop("checked"))}),this.$transcriptDiv.on("mousewheel DOMMouseScroll click scroll",function(t){e.scrollingTranscript||(e.autoScrollTranscript=!1,e.refreshControls("transcript")),e.scrollingTranscript=!1}),void 0!==this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.on("click mousedown",function(t){t.stopPropagation()}),this.$transcriptLanguageSelect.on("change",function(){var t=e.$transcriptLanguageSelect.val();e.syncTrackLanguages("transcript",t)}))},AblePlayer.prototype.transcriptSrcHasRequiredParts=function(){return!!(b("#"+this.transcriptSrc).length&&(this.$transcriptArea=b("#"+this.transcriptSrc),this.$transcriptArea.find(".able-window-toolbar").length&&(this.$transcriptToolbar=this.$transcriptArea.find(".able-window-toolbar").eq(0),this.$transcriptArea.find(".able-transcript").length&&(this.$transcriptDiv=this.$transcriptArea.find(".able-transcript").eq(0),this.$transcriptArea.find(".able-transcript-seekpoint").length))))&&(this.$transcriptSeekpoints=this.$transcriptArea.find(".able-transcript-seekpoint"),!0)},AblePlayer.prototype.setupManualTranscript=function(){this.$autoScrollTranscriptCheckbox=b('<input id="autoscroll-transcript-checkbox" type="checkbox">'),this.$transcriptToolbar.append(b('<label for="autoscroll-transcript-checkbox">'+this.tt.autoScroll+": </label>"),this.$autoScrollTranscriptCheckbox)},AblePlayer.prototype.updateTranscript=function(){if(this.transcriptType){if("external"===this.transcriptType||"popup"===this.transcriptType){var t,e,i;if(this.transcriptLang?e=this.transcriptCaptions.cues:this.transcriptCaptions?(this.transcriptLang=this.transcriptCaptions.language,e=this.transcriptCaptions.cues):this.selectedCaptions&&(this.transcriptLang=this.captionLang,e=this.selectedCaptions.cues),this.transcriptChapters)t=this.transcriptChapters.cues;else if(0<this.chapters.length){if(this.transcriptLang)for(var s=0;s<this.chapters.length;s++)this.chapters[s].language===this.transcriptLang&&(t=this.chapters[s].cues);void 0===t&&(t=this.chapters[0].cues||[])}if(this.transcriptDescriptions)i=this.transcriptDescriptions.cues;else if(0<this.descriptions.length){if(this.transcriptLang)for(s=0;s<this.descriptions.length;s++)this.descriptions[s].language===this.transcriptLang&&(i=this.descriptions[s].cues);i||(i=this.descriptions[0].cues||[])}var a=this.generateTranscript(t||[],e||[],i||[]);this.$transcriptDiv.html(a),this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.find("option:selected").prop("selected",!1),this.$transcriptLanguageSelect.find("option[lang="+this.transcriptLang+"]").prop("selected",!0))}var n=this;1===this.prefTabbable&&b(".able-transcript span.able-transcript-seekpoint").attr("tabindex","0"),0<this.$transcriptArea.length&&this.$transcriptArea.find("span.able-transcript-seekpoint").click(function(t){n.seekTrigger="transcript";var e=parseFloat(b(this).attr("data-start"));e+=.01,n.seekingFromTranscript?n.seekingFromTranscript=!1:(n.seekingFromTranscript=!0,n.seekTo(e))})}},AblePlayer.prototype.highlightTranscript=function(t){if(this.transcriptType){var e,i,s,a=this;t=parseFloat(t),this.$transcriptArea.find("span.able-transcript-seekpoint").each(function(){if(e=parseFloat(b(this).attr("data-start")),i=parseFloat(b(this).attr("data-end")),s=!!b(this).parent().hasClass("able-transcript-chapter-heading"),e<=t&&t<=i&&!s)return b(this).hasClass("able-highlight")||(a.$transcriptArea.find(".able-highlight").removeClass("able-highlight"),b(this).addClass("able-highlight"),a.movingHighlight=!0),!1}),a.currentHighlight=b(".able-highlight"),0===a.currentHighlight.length&&(a.currentHighlight=null)}},AblePlayer.prototype.generateTranscript=function(t,e,i){var s,h=this,a=b('<div class="able-transcript-container"></div>');if(a.attr("lang",this.transcriptLang),s=void 0!==this.transcriptTitle?this.transcriptTitle:this.lyricsMode?this.tt.lyricsTitle:this.tt.transcriptTitle,void 0===this.transcriptDivLocation){var n=this.playerHeadingLevel,p=(n+=1)+1;if(n<=6)var r="h"+n.toString();else r="div";var o=b("<"+r+">");o.addClass("able-transcript-heading"),6<n&&o.attr({role:"heading","aria-level":n}),o.text(s),o.attr("lang",this.lang),a.append(o)}for(var l=0,c=0,u=0,d=function(t,e){if(p<=6)var i="h"+p.toString();else i="div";var s=b("<"+i+">",{class:"able-transcript-chapter-heading"});6<p&&s.attr({role:"heading","aria-level":p});for(var a=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e=e.concat(a(t.children[i]));return e},n=b("<span>",{class:"able-transcript-seekpoint"}),r=0;r<e.components.children.length;r++)for(var o=a(e.components.children[r]),l=0;l<o.length;l++)n.append(o[l]);n.attr("data-start",e.start.toString()),n.attr("data-end",e.end.toString()),s.append(n),t.append(s)},g=function(t,e){var i=b("<div>",{class:"able-transcript-desc"}),s=b("<span>",{class:"able-hidden"});s.attr("lang",h.lang),s.text(h.tt.prefHeadingDescription+": "),i.append(s);for(var a=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e=e.concat(a(t.children[i]));return e},n=b("<span>",{class:"able-transcript-seekpoint"}),r=0;r<e.components.children.length;r++)for(var o=a(e.components.children[r]),l=0;l<o.length;l++)n.append(o[l]);n.attr("data-start",e.start.toString()),n.attr("data-end",e.end.toString()),i.append(n),t.append(i)},f=function(t,e){for(var i=b("<span>",{class:"able-transcript-seekpoint able-transcript-caption"}),o=function(t){var e=[],u=0,d=function(t){var e;u++;var i=[];if(""===t)return i;var s=t.indexOf("["),a=t.indexOf("]"),n=t.indexOf("("),r=t.indexOf(")"),o=-1!==s&&-1!==a,l=-1!==n&&-1!==r;if(l||o){if(1<u)var h="<br/>";else h="";var p=h+'<span class="able-unspoken">',c="</span>";l&&o&&(s<n?l=!1:o=!1)}return l?(e=t.substring(0,n),e+=p,e+=t.substring(n,r+1),e+=c,e+=d(t.substring(r+1)),i.push(e)):o?(e=t.substring(0,s),e+=p,e+=t.substring(s,a+1),e+=c,e+=d(t.substring(a+1)),i.push(e)):i.push(t),i};if("string"===t.type)e=e.concat(d(t.value));else if("v"===t.type){var i=b("<span>",{class:"able-unspoken"});i.text("("+t.value+")"),e.push(i);for(var s=0;s<t.children.length;s++)for(var a=o(t.children[s]),n=0;n<a.length;n++)e.push(a[n])}else if("b"===t.type||"i"===t.type){if("b"===t.type)var r=b("<strong>");else if("i"===t.type)r=b("<em>");for(s=0;s<t.children.length;s++)for(a=o(t.children[s]),n=0;n<a.length;n++)r.append(a[n]);"b"!==t.type&&"i"!=t.type||e.push(r," ")}else for(s=0;s<t.children.length;s++)e=e.concat(o(t.children[s]));return e},s=0;s<e.components.children.length;s++)for(var a=o(e.components.children[s]),n=0;n<a.length;n++){var r=a[n];"string"==typeof r&&(h.lyricsMode?r=r.replace("\n","<br>")+"<br>":r+=" "),i.append(r)}i.attr("data-start",e.start.toString()),i.attr("data-end",e.end.toString()),t.append(i),t.append(" \n")};l<t.length||u<i.length||c<e.length;){if(l<t.length&&u<i.length&&c<e.length)var m=Math.min(t[l].start,i[u].start,e[c].start);else if(l<t.length&&u<i.length)m=Math.min(t[l].start,i[u].start);else if(l<t.length&&c<e.length)m=Math.min(t[l].start,e[c].start);else if(u<i.length&&c<e.length)m=Math.min(i[u].start,e[c].start);else m=null;null!==m?void 0!==t[l]&&t[l].start===m?(d(a,t[l]),l+=1):void 0!==i[u]&&i[u].start===m?(g(a,i[u]),u+=1):(f(a,e[c]),c+=1):l<t.length?(d(a,t[l]),l+=1):u<i.length?(g(a,i[u]),u+=1):c<e.length&&(f(a,e[c]),c+=1)}var v=a.children(),y=0;return v.each(function(){b(this).hasClass("able-transcript-caption")?(-1===b(this).text().indexOf("[")&&-1===b(this).text().indexOf("(")||0<y&&(a.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),y=0),b(this).addClass("able-block-temp"),y++):0<y&&(a.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),y=0)}),a}}(jQuery),function(c){AblePlayer.prototype.showSearchResults=function(){var i=this;if(this.searchDiv&&this.searchString&&c("#"+this.SearchDiv)){var t=this.searchFor(this.searchString);if(0<t.length){var e=c("<p>",{class:"able-search-results-summary"}),s="Found <strong>"+t.length+"</strong> matching items. ";s+="Click the time associated with any item ",s+="to play the video from that point.",e.html(s);for(var a=c("<ul>"),n=0;n<t.length;n++){var r=c("<li>",{}),o=this.secondsToTime(t[n].start),l=c("<span>",{class:"able-search-results-time","data-start":t[n].start,title:o.title,tabindex:"0"});l.text(o.value),l.click(function(t){var e=parseFloat(c(this).attr("data-start"));e+=.01,i.seeking=!0,i.seekTo(e)});var h=c("<span>",{class:"able-search-result-text"});h.html("..."+t[n].caption+"..."),r.append(l,h),a.append(r)}c("#"+this.searchDiv).append(e,a)}else{var p=c("<p>").text("No results found.");c("#"+this.searchDiv).append(p)}}},AblePlayer.prototype.searchFor=function(t){var e,i,s,a,n,r,o;s=[];var l=t.split(" ");if(0<this.captions.length){for(r=0;r<this.captions.length;r++)this.captions[r].language===this.searchLang&&(e=this.searchLang,i=this.captions[r].cues);if(0<i.length)for(r=n=0;r<i.length;r++)if(-1!==c.inArray(i[r].components.children[0].type,["string","i","b","u","v","c"]))for(a=this.flattenCueForCaption(i[r]),o=0;o<l.length;o++)if(-1!==a.indexOf(l[o])){s[n]=[],s[n].start=i[r].start,s[n].lang=e,s[n].caption=this.highlightSearchTerm(l,o,a),n++;break}}return s},AblePlayer.prototype.highlightSearchTerm=function(t,e,i){var s,a,n,r;for(s=e;s<t.length;s++)a=t[s],-1!==(n=i.indexOf(a))&&(i=0<(r=a.length)?i.substring(0,n)+('<span class="able-search-term">'+a+"</span>")+i.substring(n+r):'<span class="able-search-term">'+a+"</span>"+i.substring(n+r));return i},AblePlayer.prototype.secondsToTime=function(t){t=Math.floor(t);var e=parseInt(t/3600,10)%24,i=parseInt(t/60,10)%60,s=t%60,a="",n="";0<e&&(a+=e+":"),i<10?(a+="0"+i+":",0<i&&(n+=i+" minutes ")):(a+=i+":",n+=i+" minutes "),s<10?(a+="0"+s,0<s&&(n+=s+" seconds ")):(a+=s,n+=s+" seconds ");var r=[];return r.value=a,r.title=n,r}}(jQuery),function(s){AblePlayer.prototype.onMediaUpdateTime=function(t,e){var i=this;this.getMediaTimes(t,e).then(function(t){i.duration=t.duration,i.elapsed=t.elapsed,i.swappingSrc&&void 0!==i.swapTime?i.swapTime===i.elapsed&&i.playing&&(i.playMedia(),i.swappingSrc=!1,i.swapTime=null):i.startedPlaying&&(1===i.prefHighlight&&i.highlightTranscript(i.elapsed),i.updateCaption(i.elapsed),i.showDescription(i.elapsed),i.updateChapter(i.elapsed),i.updateMeta(i.elapsed),i.refreshControls("timeline",i.duration,i.elapsed))})},AblePlayer.prototype.onMediaPause=function(){this.controlsHidden&&(this.fadeControls("in"),this.controlsHidden=!1),"active"===this.hideControlsTimeoutStatus&&(window.clearTimeout(this.hideControlsTimeout),this.hideControlsTimeoutStatus="clear"),this.refreshControls("playpause")},AblePlayer.prototype.onMediaComplete=function(){this.hasPlaylist&&!this.cueingPlaylistItem&&(this.playlistIndex===this.$playlist.length-1?this.loop?(this.playlistIndex=0,this.cueingPlaylistItem=!0,this.cuePlaylistItem(0)):(this.playing=!1,this.paused=!0):(this.playlistIndex++,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex))),this.refreshControls("init")},AblePlayer.prototype.onMediaNewSourceLoad=function(){this.cueingPlaylistItem&&(this.cueingPlaylistItem=!1),!0===this.swappingSrc&&(0<this.swapTime?this.seekTo(this.swapTime):(this.playing&&this.playMedia(),this.swappingSrc=!1)),this.refreshControls("init")},AblePlayer.prototype.onWindowResize=function(){var t,e;this.fullscreen?(t=s(window).width(),e=this.isUserAgent("Firefox")||this.isUserAgent("Trident")||this.isUserAgent("Edge")?window.innerHeight-this.$playerDiv.outerHeight()-20:window.outerHeight>=window.innerHeight?window.innerHeight-this.$playerDiv.outerHeight():window.outerHeight,this.$descDiv.is(":hidden")||(e-=this.$descDiv.height()),this.positionCaptions("overlay")):this.restoringAfterFullScreen?(t=this.preFullScreenWidth,e=this.preFullScreenHeight):(t=this.$ableWrapper.width(),e=void 0!==this.aspectRatio?Math.round(t/this.aspectRatio):this.$ableWrapper.height(),this.positionCaptions());this.resizePlayer(t,e)},AblePlayer.prototype.addSeekbarListeners=function(){var i=this;this.seekBar.bodyDiv.on("startTracking",function(t){i.pausedBeforeTracking=i.paused,i.pauseMedia()}).on("tracking",function(t,e){i.highlightTranscript(e),i.updateCaption(e),i.showDescription(e),i.updateChapter(i.convertChapterTimeToVideoTime(e)),i.updateMeta(e),i.refreshControls("init")}).on("stopTracking",function(t,e){i.useChapterTimes?i.seekTo(i.convertChapterTimeToVideoTime(e)):i.seekTo(e),i.pausedBeforeTracking||setTimeout(function(){i.playMedia()},200)})},AblePlayer.prototype.onClickPlayerButton=function(t){var e,i;"play"===(e=s(t).attr("class").split(" ")[0].substr(20))?(this.clickedPlay=!0,this.handlePlay()):"restart"===e?(this.seekTrigger="restart",this.handleRestart()):"previous"===e?(this.seekTrigger="previous",this.buttonWithFocus="previous",this.handlePrevTrack()):"next"===e?(this.seekTrigger="next",this.buttonWithFocus="next",this.handleNextTrack()):"rewind"===e?(this.seekTrigger="rewind",this.handleRewind()):"forward"===e?(this.seekTrigger="forward",this.handleFastForward()):"mute"===e?this.handleMute():"volume"===e?this.handleVolume():"faster"===e?this.handleRateIncrease():"slower"===e?this.handleRateDecrease():"captions"===e?this.handleCaptionToggle():"chapters"===e?this.handleChapters():"descriptions"===e?this.handleDescriptionToggle():"sign"===e?this.handleSignToggle():"preferences"===e?"menu"===s(t).attr("data-prefs-popup")?this.handlePrefsClick():(this.closePopups(),"keyboard"===(i=s(t).attr("data-prefs-popup"))?this.keyboardPrefsDialog.show():"captions"===i?this.captionPrefsDialog.show():"descriptions"===i?this.descPrefsDialog.show():"transcript"===i&&this.transcriptPrefsDialog.show()):"help"===e?this.handleHelpClick():"transcript"===e?this.handleTranscriptToggle():"fullscreen"===e&&(this.clickedFullscreenButton=!0,this.handleFullscreenToggle())},AblePlayer.prototype.okToHandleKeyPress=function(){var t=AblePlayer.getActiveDOMElement();return"INPUT"!==s(t).prop("tagName")},AblePlayer.prototype.onPlayerKeyPress=function(t){if(!this.okToHandleKeyPress())return!1;var e=t.which;if(65<=e&&e<=90&&(e+=32),!(s(":focus").is("[contenteditable]")||s(":focus").is("input")||s(":focus").is("textarea")||s(":focus").is("select")||t.target.hasAttribute("contenteditable")||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName))if(27===e)this.closePopups();else if(32===e)0===this.$ableWrapper.find(".able-controller button:focus").length&&(this.clickedPlay=!0,this.handlePlay());else if(112===e)this.usingModifierKeys(t)&&this.handlePlay();else if(115===e)this.usingModifierKeys(t)&&this.handleRestart();else if(109===e)this.usingModifierKeys(t)&&this.handleMute();else if(118===e)this.usingModifierKeys(t)&&this.handleVolume();else if(49<=e&&e<=57)this.usingModifierKeys(t)&&this.handleVolume(e);else if(99===e)this.usingModifierKeys(t)&&this.handleCaptionToggle();else if(100===e)this.usingModifierKeys(t)&&this.handleDescriptionToggle();else if(102===e)this.usingModifierKeys(t)&&this.handleFastForward();else if(114===e)this.usingModifierKeys(t)&&this.handleRewind();else if(98===e)this.usingModifierKeys(t)&&this.handlePrevTrack();else if(110===e)this.usingModifierKeys(t)&&this.handleNextTrack();else if(101===e)this.usingModifierKeys(t)&&this.handlePrefsClick();else if(13===e){var i=s(document.activeElement);"SPAN"===i.prop("tagName")?i.click():"LI"===i.prop("tagName")&&i.click()}},AblePlayer.prototype.addHtml5MediaListeners=function(){var e=this;this.$media.on("emptied",function(){}).on("loadedmetadata",function(){e.duration=e.media.duration,e.onMediaNewSourceLoad()}).on("canplay",function(){}).on("canplaythrough",function(){e.userClickedPlaylist&&(e.startedPlaying||e.playMedia(),e.userClickedPlaylist=!1),"restart"==e.seekTrigger||"chapter"==e.seekTrigger||"transcript"==e.seekTrigger?e.playMedia():e.startedPlaying?e.hasPlaylist?(e.playlistIndex!==e.$playlist.length||e.loop)&&e.playMedia():e.getPlayerState().then(function(t){!e.swappingSrc||"stopped"!==t&&"paused"!==t||(e.startedPlaying=!1,0<e.swapTime?e.seekTo(e.swapTime):e.playMedia())}):0<e.startTime?e.seeking?(e.seeking=!1,(e.autoplay||e.okToPlay)&&e.playMedia()):e.seekTo(e.startTime):e.defaultChapter&&void 0!==e.selectedChapters?e.seekToChapter(e.defaultChapter):(e.autoplay||e.okToPlay)&&e.playMedia()}).on("play",function(){e.refreshControls("playpause")}).on("playing",function(){e.playing=!0,e.paused=!1,e.refreshControls("playpause")}).on("ended",function(){e.playing=!1,e.paused=!0,e.onMediaComplete()}).on("progress",function(){e.refreshControls("timeline")}).on("waiting",function(){}).on("durationchange",function(){e.refreshControls("timeline")}).on("timeupdate",function(){e.onMediaUpdateTime()}).on("pause",function(){e.clickedPlay?(e.playing=!1,e.paused=!0):e.hasPlaylist||e.swappingSrc||(e.playing=!1,e.paused=!0),e.clickedPlay=!1,e.onMediaPause()}).on("ratechange",function(){}).on("volumechange",function(){e.volume=e.getVolume(),e.debug}).on("error",function(){e.debug&&e.media.error.code})},AblePlayer.prototype.addVimeoListeners=function(){var e=this;this.vimeoPlayer.on("loaded",function(t){e.onMediaNewSourceLoad()}),this.vimeoPlayer.on("play",function(t){e.playing=!0,e.startedPlaying=!0,e.paused=!1,e.refreshControls("playpause")}),this.vimeoPlayer.on("ended",function(t){e.playing=!1,e.paused=!0,e.onMediaComplete()}),this.vimeoPlayer.on("bufferstart",function(){}),this.vimeoPlayer.on("bufferend",function(){}),this.vimeoPlayer.on("progress",function(t){}),this.vimeoPlayer.on("seeking",function(t){}),this.vimeoPlayer.on("seeked",function(t){}),this.vimeoPlayer.on("timeupdate",function(t){e.onMediaUpdateTime(t.duration,t.seconds)}),this.vimeoPlayer.on("pause",function(t){e.clickedPlay?(e.playing=!1,e.paused=!0):e.hasPlaylist||e.swappingSrc||(e.playing=!1,e.paused=!0),e.clickedPlay=!1,e.onMediaPause(),e.refreshControls("playpause")}),this.vimeoPlayer.on("playbackratechange",function(t){e.vimeoPlaybackRate=t.playbackRate}),this.vimeoPlayer.on("texttrackchange",function(t){}),this.vimeoPlayer.on("volumechange",function(t){e.volume=10*t.volume}),this.vimeoPlayer.on("error",function(t){})},AblePlayer.prototype.addEventListeners=function(){var e;if(e=this,s(window).resize(function(){e.onWindowResize()}),window.MutationObserver){var t=this.$ableDiv[0];new MutationObserver(function(t){t.forEach(function(t){"attributes"===t.type&&"style"===t.attributeName&&e.$ableDiv.is(":visible")&&e.refreshControls("init")})}).observe(t,{attributes:!0,childList:!0,characterData:!0})}void 0!==this.seekBar?this.addSeekbarListeners():setTimeout(function(){void 0!==e.seekBar&&e.addSeekbarListeners()},2e3),this.$controllerDiv.find("button").on("click",function(t){t.stopPropagation(),e.onClickPlayerButton(this)}),s(document).on("click",function(t){if(0!==t.button)return!1;(s(".able-popup:visible").length||s(".able-volume-popup:visible"))&&e.closePopups()}),this.$ableDiv.on("mousemove",function(){e.controlsHidden?(e.fadeControls("in"),e.controlsHidden=!1,"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear"),e.hideControls&&e.invokeHideControlsTimeout()):"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear",e.hideControls&&e.invokeHideControlsTimeout())}),s(document).keydown(function(){e.controlsHidden?(e.fadeControls("in"),e.controlsHidden=!1,"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear"),e.hideControls&&e.invokeHideControlsTimeout()):"active"===e.hideControlsTimeoutStatus&&(window.clearTimeout(e.hideControlsTimeout),e.hideControlsTimeoutStatus="clear",e.hideControls&&e.invokeHideControlsTimeout())}),this.$ableDiv.keydown(function(t){1<AblePlayer.nextIndex&&e.onPlayerKeyPress(t)}),this.$transcriptArea&&this.$transcriptArea.keydown(function(t){1<AblePlayer.nextIndex&&e.onPlayerKeyPress(t)}),this.$playlist&&this.$playlist.click(function(t){e.userClickedPlaylist||(e.userClickedPlaylist=!0,e.playlistIndex=s(this).index(),e.cuePlaylistItem(e.playlistIndex))}),this.$media.click(function(){e.handlePlay()}),"html5"===this.player?this.addHtml5MediaListeners():"vimeo"===this.player?this.addVimeoListeners():"youtube"===this.player&&setInterval(function(){e.onMediaUpdateTime()},300)}}(jQuery),function(A){AblePlayer.prototype.initDragDrop=function(e){var i,s,t,a,n,r;i=this,"transcript"===e?(s=this.$transcriptArea,a="transcript-window",t=this.$transcriptToolbar):"sign"===e&&(s=this.$signWindow,a="sign-window",t=this.$signToolbar),t.addClass("able-draggable"),n=A("<div>",{class:"able-resizable"}),r=parseInt(s.css("z-index"))+100,n.css("z-index",r),s.append(n),t.on("mousedown mouseup touchstart touchend",function(t){return t.stopPropagation(),"mousedown"===t.type||"touchstart"===t.type?i.windowMenuClickRegistered||(i.windowMenuClickRegistered=!0,i.startMouseX=t.pageX,i.startMouseY=t.pageY,i.dragDevice="mouse",i.startDrag(e,s)):"mouseup"!==t.type&&"touchend"!==t.type||i.dragging&&"mouse"===i.dragDevice&&i.endDrag(e),!1}),n.on("mousedown mouseup touchstart touchend",function(t){return t.stopPropagation(),"mousedown"===t.type||"touchstart"===t.type?i.windowMenuClickRegistered||(i.windowMenuClickRegistered=!0,i.startMouseX=t.pageX,i.startMouseY=t.pageY,i.startResize(e,s)):"mouseup"!==t.type&&"touchend"!==t.type||i.resizing&&i.endResize(e),!1}),s.on("click",function(){i.windowMenuClickRegistered||i.finishingDrag||i.updateZIndex(e),i.finishingDrag=!1}),this.addWindowMenu(e,s,a)},AblePlayer.prototype.addWindowMenu=function(e,t,i){var r,s,o,a,n,l,h,p,c,u,d;(r=this).windowMenuClickRegistered=!1,this.finishingDrag=!1,(s=A('<div role="alert"></div>')).addClass("able-alert"),s.hide(),s.appendTo(this.$activeWindow),s.css({top:t.offset().top}),d=this.mediaId+"-"+i+"-menu",o=A("<button>",{type:"button",tabindex:"0","aria-label":this.tt.windowButtonLabel,"aria-haspopup":"true","aria-controls":d,class:"able-button-handler-preferences"}),"font"===this.iconType?(a=A("<span>",{class:"icon-preferences","aria-hidden":"true"}),o.append(a)):(n=this.rootPath+"button-icons/"+this.toolbarIconColor+"/preferences.png",l=A("<img>",{src:n,alt:"",role:"presentation"}),o.append(l)),h=A("<span>",{class:"able-clipped"}).text(this.tt.windowButtonLabel),o.append(h),p=this.mediaId+"-"+i+"-tooltip",c=A("<div>",{class:"able-tooltip",id:p}).hide(),o.on("mouseenter focus",function(t){var e=A(this).attr("aria-label"),i=A(this).position(),s=A(this).height(),a=(A(this).width(),{left:"",right:"0px",top:i.top-s-5+"px"}),n=AblePlayer.localGetElementById(o[0],p).text(e).css(a);r.showTooltip(n),A(this).on("mouseleave blur",function(){AblePlayer.localGetElementById(o[0],p).text("").hide()})}),u=this.setupPopups(i),"transcript"===e?(this.$transcriptAlert=s,this.$transcriptPopupButton=o,this.$transcriptPopup=u,this.$transcriptToolbar.append(s,o,c,u)):"sign"===e&&(this.$signAlert=s,this.$signPopupButton=o,this.$signPopup=u,this.$signToolbar.append(s,o,c,u)),o.on("click mousedown keydown",function(t){t.stopPropagation(),r.windowMenuClickRegistered||r.finishingDrag||r.handleWindowButtonClick(e,t),r.finishingDrag=!1}),this.addResizeDialog(e,t)},AblePlayer.prototype.addResizeDialog=function(t,e){var i,s,a,n,r,o,l,h,p,c,u,d,g,f,m,v,y,b,w,P,C,k,T;i=this,"transcript"===t?(s=this.$transcriptPopup,a=this.$transcriptPopupButton):"sign"===t&&(s=this.$signPopup,a=this.$signPopupButton),n=this.mediaId+"-resize-"+t+"-width",r=this.mediaId+"-resize-"+t+"-height",o=e.width(),l=e.height(),h=o/l,p=A("<div></div>",{class:"able-resize-form"}),c=A("<div></div>"),u=A("<div></div>"),d=A("<input>",{type:"text",id:n,value:o}),g=A("<label>",{for:n}).text(this.tt.width),f=A("<div></div>"),m=A("<input>",{type:"text",id:r,value:l}),v=A("<label>",{for:r}).text(this.tt.height),"sign"===t&&(m.prop("readonly",!0),d.on("input",function(){y=A(this).val(),b=Math.round(y/h,0),m.val(b)})),w=A('<button class="modal-button">'+this.tt.save+"</button>"),P=A('<button class="modal-button">'+this.tt.cancel+"</button>"),w.on("click",function(){C=A("#"+n).val(),k=A("#"+r).val(),C===o&&k===l||(i.resizeObject(t,C,k),i.updateCookie(t)),T.hide(),s.hide(),a.focus()}),P.on("click",function(){T.hide(),s.hide(),a.focus()}),u.append(g,d),f.append(v,m),c.append(u,f),p.append(c,"<hr>",w,P),A("body").append(p),T=new AccessibleDialog(p,a,"alert",this.tt.windowResizeHeading,c,this.tt.closeButtonLabel,"20em"),"transcript"===t?this.transcriptResizeDialog=T:"sign"===t&&(this.signResizeDialog=T)},AblePlayer.prototype.handleWindowButtonClick=function(t,e){var i,s,a,n;if(i=this,"transcript"===t?(s=this.$transcriptPopup,a=this.$transcriptPopupButton,this.$transcriptToolbar):"sign"===t&&(s=this.$signPopup,a=this.$signPopupButton,this.$signToolbar),"keydown"===e.type)if(32===e.which||13===e.which)this.windowMenuClickRegistered=!0;else{if(27!==e.which)return!1;s.hide("fast",function(){i.windowMenuClickRegistered=!1,s.find("li").removeClass("able-focus").attr("tabindex","-1"),a.focus()})}else this.windowMenuClickRegistered=!0;s.is(":visible")?(s.hide(200,"",function(){i.windowMenuClickRegistered=!1}),s.find("li").removeClass("able-focus"),a.attr("aria-expanded","false").focus()):(this.updateZIndex(t),n=a.position().top+a.outerHeight(),s.css("top",n),s.show(200,"",function(){a.attr("aria-expanded","true"),A(this).find("li").first().focus().addClass("able-focus"),i.windowMenuClickRegistered=!1}))},AblePlayer.prototype.handleMenuChoice=function(t,e,i){var s,a,n,r,o;if(s=this,"transcript"===t?(a=this.$transcriptArea,n=this.$transcriptPopup,r=this.$transcriptPopupButton,o=this.transcriptResizeDialog):"sign"===t&&(a=this.$signWindow,n=this.$signPopup,r=this.$signPopupButton,o=this.signResizeDialog),"keydown"===i.type)return 27===i.which?n.hide("fast",function(){s.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1"),r.focus()}):"close"!==e&&(this.$activeWindow=a),!1;n.hide("fast",function(){s.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1")}),"close"!==e&&r.focus(),"move"===e?(this.showedAlert(t)||(this.showAlert(this.tt.windowMoveAlert,t),"transcript"===t?this.showedTranscriptAlert=!0:"sign"===t&&(this.showedSignAlert=!0)),"keydown"===i.type?this.dragDevice="keyboard":this.dragDevice="mouse",this.startDrag(t,a),n.hide().parent().focus()):"resize"==e?o.show():"close"==e&&("transcript"===t?this.handleTranscriptToggle():"sign"===t&&this.handleSignToggle())},AblePlayer.prototype.startDrag=function(e,t){var i,s,a,n,r;return(i=this).$activeWindow||(this.$activeWindow=t),this.dragging=!0,"transcript"===e?s=this.$transcriptPopup:"sign"===e&&(s=this.$signPopup),this.showedAlert(e)||(this.showAlert(this.tt.windowMoveAlert,e),"transcript"===e?this.showedTranscriptAlert=!0:"sign"===e&&(this.showedSignAlert=!0)),s.is(":visible")&&s.hide(),this.updateZIndex(e),a=this.$activeWindow.position(),this.dragStartX=a.left,this.dragStartY=a.top,void 0===this.startMouseX?(this.dragDevice="keyboard",this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.startingDrag=!0):(this.dragDevice="mouse",this.dragOffsetX=this.startMouseX-this.dragStartX,this.dragOffsetY=this.startMouseY-this.dragStartY),this.$activeWindow.addClass("able-drag").css({position:"absolute",top:this.dragStartY+"px",left:this.dragStartX+"px"}).focus(),"mouse"===this.dragDevice?A(document).on("mousemove touchmove",function(t){i.dragging&&(n=t.pageX-i.dragOffsetX,r=t.pageY-i.dragOffsetY,i.resetDraggedObject(n,r))}):"keyboard"===this.dragDevice&&this.$activeWindow.on("keydown",function(t){i.dragging&&i.dragKeys(e,t)}),!1},AblePlayer.prototype.dragKeys=function(t,e){if(this.startingDrag)return this.startingDrag=!1;switch(10,e.which){case 37:case 63234:this.dragKeyX-=10;break;case 38:case 63232:this.dragKeyY-=10;break;case 39:case 63235:this.dragKeyX+=10;break;case 40:case 63233:this.dragKeyY+=10;break;case 13:case 27:return this.endDrag(t),!1;default:return!1}return this.resetDraggedObject(this.dragKeyX,this.dragKeyY),e.preventDefault&&e.preventDefault(),!1},AblePlayer.prototype.resetDraggedObject=function(t,e){this.$activeWindow.css({left:t+"px",top:e+"px"})},AblePlayer.prototype.resizeObject=function(t,e,i){var s;this.$activeWindow.css({width:e+"px",height:i+"px"}),"transcript"===t&&(s=i-50,this.$transcriptDiv.css("height",s+"px"))},AblePlayer.prototype.endDrag=function(t){var e;"transcript"===t?(this.$transcriptPopup,e=this.$transcriptPopupButton):"sign"===t&&(this.$signPopup,e=this.$signPopupButton),A(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown").removeClass("able-drag"),"keyboard"===this.dragDevice&&e.focus(),this.dragging=!1,this.updateCookie(t),this.startMouseX=void 0,this.startMouseY=void 0,this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){this.finishingDrag=!1},100)},AblePlayer.prototype.isCloseToCorner=function(t,e,i){var s,a,n,r,o,l;return 10,a=(s=t.offset()).top,n=s.left,r=t.width(),o=a+t.height(),l=n+r,Math.abs(o-i)<=10&&Math.abs(l-e)<=10},AblePlayer.prototype.startResize=function(e,t){var i,s,a,n;return(i=this).$activeWindow=t,this.resizing=!0,"transcript"===e?s=this.$transcriptPopup:"sign"===e&&(s=this.$signPopup),s.is(":visible")&&s.hide().parent().focus(),this.$activeWindow.position(),this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.dragStartWidth=this.$activeWindow.width(),this.dragStartHeight=this.$activeWindow.height(),A(document).on("mousemove touchmove",function(t){i.resizing&&(a=i.dragStartWidth+(t.pageX-i.startMouseX),n=i.dragStartHeight+(t.pageY-i.startMouseY),i.resizeObject(e,a,n))}),!1},AblePlayer.prototype.endResize=function(t){var e;"transcript"===t?(this.$transcriptPopup,e=this.$transcriptPopupButton):"sign"===t&&(this.$signPopup,e=this.$signPopupButton),A(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown"),e.show().focus(),this.resizing=!1,this.$activeWindow.removeClass("able-resize"),this.updateCookie(t),this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){this.finishingDrag=!1},100)}}(jQuery),function(n){AblePlayer.prototype.initSignLanguage=function(){"html5"===this.player?(this.signFile=this.$sources.first().attr("data-sign-src"),this.signFile?this.isIOS()?(this.hasSignLanguage=!1,this.debug):(this.debug,this.hasSignLanguage=!0,this.injectSignPlayerCode()):this.hasSignLanguage=!1):this.hasSignLanguage=!1},AblePlayer.prototype.injectSignPlayerCode=function(){var t,e,i,s,a;for(this.getDefaultWidth("sign"),t=this.mediaId+"-sign",this.$signVideo=n("<video>",{id:t,tabindex:"-1"}),this.signVideo=this.$signVideo[0],e=0;e<this.$sources.length;e++){if(i=this.$sources[e].getAttribute("data-sign-src"),s=this.$sources[e].getAttribute("type"),!i){this.hasSignLanguage=!1;break}a=n("<source>",{src:i,type:s}),this.$signVideo.append(a)}this.$signWindow=n("<div>",{class:"able-sign-window",tabindex:"-1"}),this.$signToolbar=n("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$signWindow.append(this.$signToolbar,this.$signVideo),this.$ableWrapper.append(this.$signWindow),this.initDragDrop("sign"),1===this.prefSign?this.positionDraggableWindow("sign",this.getDefaultWidth("sign")):this.$signWindow.hide()}}(jQuery),function(t){var i={ab:{name:"Abkhaz",nativeName:"аҧсуа"},aa:{name:"Afar",nativeName:"Afaraf"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},sq:{name:"Albanian",nativeName:"Shqip"},am:{name:"Amharic",nativeName:"አማርኛ"},ar:{name:"Arabic",nativeName:"العربية"},an:{name:"Aragonese",nativeName:"Aragonés"},hy:{name:"Armenian",nativeName:"Հայերեն"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ, магӀарул мацӀ"},ae:{name:"Avestan",nativeName:"avesta"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},bm:{name:"Bambara",nativeName:"bamanankan"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},eu:{name:"Basque",nativeName:"euskara, euskera"},be:{name:"Belarusian",nativeName:"Беларуская"},bn:{name:"Bengali",nativeName:"বাংলা"},bh:{name:"Bihari",nativeName:"भोजपुरी"},bi:{name:"Bislama",nativeName:"Bislama"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},br:{name:"Breton",nativeName:"brezhoneg"},bg:{name:"Bulgarian",nativeName:"български език"},my:{name:"Burmese",nativeName:"ဗမာစာ"},ca:{name:"Catalan",nativeName:"Català"},ch:{name:"Chamorro",nativeName:"Chamoru"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ny:{name:"Chichewa",nativeName:"chiCheŵa, chinyanja"},zh:{name:"Chinese",nativeName:"中文 (Zhōngwén), 汉语, 漢語"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},kw:{name:"Cornish",nativeName:"Kernewek"},co:{name:"Corsican",nativeName:"corsu, lingua corsa"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},hr:{name:"Croatian",nativeName:"hrvatski"},cs:{name:"Czech",nativeName:"česky, čeština"},da:{name:"Danish",nativeName:"dansk"},dv:{name:"Divehi",nativeName:"ދިވެހި"},nl:{name:"Dutch",nativeName:"Nederlands, Vlaams"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},et:{name:"Estonian",nativeName:"eesti, eesti keel"},ee:{name:"Ewe",nativeName:"Eʋegbe"},fo:{name:"Faroese",nativeName:"føroyskt"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fi:{name:"Finnish",nativeName:"suomi, suomen kieli"},fr:{name:"French",nativeName:"français, langue française"},ff:{name:"Fula",nativeName:"Fulfulde, Pulaar, Pular"},gl:{name:"Galician",nativeName:"Galego"},ka:{name:"Georgian",nativeName:"ქართული"},de:{name:"German",nativeName:"Deutsch"},el:{name:"Greek",nativeName:"Ελληνικά"},gn:{name:"Guaraní",nativeName:"Avañeẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},ha:{name:"Hausa",nativeName:"Hausa, هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hz:{name:"Herero",nativeName:"Otjiherero"},hi:{name:"Hindi",nativeName:"हिन्दी, हिंदी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hu:{name:"Hungarian",nativeName:"Magyar"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Originally called Occidental; then Interlingue after WWII"},ga:{name:"Irish",nativeName:"Gaeilge"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ik:{name:"Inupiaq",nativeName:"Iñupiaq, Iñupiatun"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語 (にほんご/にっぽんご)"},jv:{name:"Javanese",nativeName:"basa Jawa"},kl:{name:"Kalaallisut",nativeName:"kalaallisut, kalaallit oqaasii"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी, كشميري"},kk:{name:"Kazakh",nativeName:"Қазақ тілі"},km:{name:"Khmer",nativeName:"ភាសាខ្មែរ"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},ky:{name:"Kyrgyz",nativeName:"кыргыз тили"},kv:{name:"Komi",nativeName:"коми кыв"},kg:{name:"Kongo",nativeName:"KiKongo"},ko:{name:"Korean",nativeName:"한국어 (韓國語), 조선말 (朝鮮語)"},ku:{name:"Kurdish",nativeName:"Kurdî, كوردی"},kj:{name:"Kuanyama",nativeName:"Kuanyama"},la:{name:"Latin",nativeName:"latine, lingua latina"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Luganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:""},lv:{name:"Latvian",nativeName:"latviešu valoda"},gv:{name:"Manx",nativeName:"Gaelg, Gailck"},mk:{name:"Macedonian",nativeName:"македонски јазик"},mg:{name:"Malagasy",nativeName:"Malagasy fiteny"},ms:{name:"Malay",nativeName:"bahasa Melayu, بهاس ملايو"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mt:{name:"Maltese",nativeName:"Malti"},mi:{name:"Māori",nativeName:"te reo Māori"},mr:{name:"Marathi",nativeName:"मराठी"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mn:{name:"Mongolian",nativeName:"монгол"},na:{name:"Nauru",nativeName:"Ekakairũ Naoero"},nv:{name:"Navajo",nativeName:"Diné bizaad, Dinékʼehǰí"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"North Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},nr:{name:"South Ndebele",nativeName:"isiNdebele"},oc:{name:"Occitan",nativeName:"Occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},cu:{name:"Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Punjabi",nativeName:"ਪੰਜਾਬੀ, پنجابی"},pi:{name:"Pāli",nativeName:"पाऴि"},fa:{name:"Persian",nativeName:"فارسی"},pl:{name:"Polish",nativeName:"polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi, Kichwa"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"kiRundi"},ro:{name:"Romanian",nativeName:"română"},ru:{name:"Russian",nativeName:"русский язык"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी, سنڌي، سندھی"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sm:{name:"Samoan",nativeName:"gagana faa Samoa"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},sr:{name:"Serbian",nativeName:"српски језик"},gd:{name:"Gaelic",nativeName:"Gàidhlig"},sn:{name:"Shona",nativeName:"chiShona"},si:{name:"Sinhalese",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovene",nativeName:"slovenščina"},so:{name:"Somali",nativeName:"Soomaaliga, af Soomaali"},st:{name:"Southern Sotho",nativeName:"Sesotho"},es:{name:"Spanish",nativeName:"español, castellano"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sw:{name:"Swahili",nativeName:"Kiswahili"},ss:{name:"Swati",nativeName:"SiSwati"},sv:{name:"Swedish",nativeName:"svenska"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ, toğikī, تاجیکی"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},tk:{name:"Turkmen",nativeName:"Türkmen, Түркмен"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татарча, tatarça, تاتارچا"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"Uyƣurqə, ئۇيغۇرچە"},uk:{name:"Ukrainian",nativeName:"українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"zbek, Ўзбек, أۇزبېك"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"Walon"},cy:{name:"Welsh",nativeName:"Cymraeg"},wo:{name:"Wolof",nativeName:"Wollof"},fy:{name:"Western Frisian",nativeName:"Frysk"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ, Saw cuengh"},"ar-dz":{name:"Arabic (Algeria)",nativeName:"العربية (الجزائر)"},"ar-bh":{name:"Arabic (Bahrain)",nativeName:"العربية (البحرين)"},"ar-eg":{name:"Arabic (Egypt)",nativeName:"العربية (مصر)"},"ar-iq":{name:"Arabic (Iraq)",nativeName:"العربية (العراق)"},"ar-jo":{name:"Arabic (Jordan)",nativeName:"العربية (الأردن)"},"ar-kw":{name:"Arabic (Kuwait)",nativeName:"العربية (الكويت)"},"ar-lb":{name:"Arabic (Lebanon)",nativeName:"العربية (لبنان)"},"ar-ly":{name:"Arabic (Libya)",nativeName:"العربية (ليبيا)"},"ar-ma":{name:"Arabic (Morocco)",nativeName:"العربية (المملكة المغربية)"},"ar-om":{name:"Arabic (Oman)",nativeName:"العربية (عمان)"},"ar-qa":{name:"Arabic (Qatar)",nativeName:"العربية (قطر)"},"ar-sa":{name:"Arabic (Saudi Arabia)",nativeName:"العربية (المملكة العربية السعودية)"},"ar-sy":{name:"Arabic (Syria)",nativeName:"العربية (سوريا)"},"ar-tn":{name:"Arabic (Tunisia)",nativeName:"العربية (تونس)"},"ar-ae":{name:"Arabic (U.A.E.)",nativeName:"العربية (الإمارات العربية المتحدة)"},"ar-ye":{name:"Arabic (Yemen)",nativeName:"العربية (اليمن)"},"de-at":{name:"German (Austria)",nativeName:"Deutsch (Österreich)"},"de-li":{name:"German (Liechtenstein)",nativeName:"Deutsch (Liechtenstein)"},"de-lu":{name:"German (Luxembourg)",nativeName:"Deutsch (Luxemburg)"},"de-ch":{name:"German (Switzerland)",nativeName:"Deutsch (Schweiz)"},"en-au":{name:"English (Australia)",nativeName:"English (Australia)"},"en-bz":{name:"English (Belize)",nativeName:"English (Belize)"},"en-ca":{name:"English (Canada)",nativeName:"English (Canada)"},"en-ie":{name:"English (Ireland)",nativeName:"English (Ireland)"},"en-jm":{name:"English (Jamaica)",nativeName:"English (Jamaica)"},"en-nz":{name:"English (New Zealand)",nativeName:""},"en-za":{name:"English (South Africa)",nativeName:"English (South Africa)"},"en-tt":{name:"English (Trinidad)",nativeName:"English (Trinidad y Tobago)"},"en-gb":{name:"English (United Kingdom)",nativeName:"English (United Kingdom)"},"en-us":{name:"English (United States)",nativeName:"English (United States)"},"es-ar":{name:"Spanish (Argentina)",nativeName:"Español (Argentina)"},"es-bo":{name:"Spanish (Bolivia)",nativeName:"Español (Bolivia)"},"es-cl":{name:"Spanish (Chile)",nativeName:"Español (Chile)"},"es-co":{name:"Spanish (Colombia)",nativeName:"Español (Colombia)"},"es-cr":{name:"Spanish (Costa Rica)",nativeName:"Español (Costa Rica)"},"es-do":{name:"Spanish (Dominican Republic)",nativeName:"Español (República Dominicana)"},"es-ec":{name:"Spanish (Ecuador)",nativeName:"Español (Ecuador)"},"es-sv":{name:"Spanish (El Salvador)",nativeName:"Español (El Salvador)"},"es-gt":{name:"Spanish (Guatemala)",nativeName:"Español (Guatemala)"},"es-hn":{name:"Spanish (Honduras)",nativeName:"Español (Honduras)"},"es-mx":{name:"Spanish (Mexico)",nativeName:"Español (México)"},"es-ni":{name:"Spanish (Nicaragua)",nativeName:"Español (Nicaragua)"},"es-pa":{name:"Spanish (Panama)",nativeName:"Español (Panamá)"},"es-py":{name:"Spanish (Paraguay)",nativeName:"Español (Paraguay)"},"es-pe":{name:"Spanish (Peru)",nativeName:"Español (Perú)"},"es-pr":{name:"Spanish (Puerto Rico)",nativeName:"Español (Puerto Rico)"},"es-uy":{name:"Spanish (Uruguay)",nativeName:"Español (Uruguay)"},"es-ve":{name:"Spanish (Venezuela)",nativeName:"Español (Venezuela)"},"fr-be":{name:"French (Belgium)",nativeName:"français (Belgique)"},"fr-ca":{name:"French (Canada)",nativeName:"français (Canada)"},"fr-lu":{name:"French (Luxembourg)",nativeName:"français (Luxembourg)"},"fr-ch":{name:"French (Switzerland)",nativeName:"français (Suisse)"},"it-ch":{name:"Italian (Switzerland)",nativeName:"italiano (Svizzera)"},"nl-be":{name:"Dutch (Belgium)",nativeName:"Nederlands (België)"},"pt-br":{name:"Portuguese (Brazil)",nativeName:"Português (Brasil)"},"sv-fi":{name:"Swedish (Finland)",nativeName:"svenska (Finland)"},"zh-hk":{name:"Chinese (Hong Kong)",nativeName:"中文(香港特别行政區)"},"zh-cn":{name:"Chinese (PRC)",nativeName:"中文(中华人民共和国)"},"zh-sg":{name:"Chinese (Singapore)",nativeName:"中文(新加坡)"},"zh-tw":{name:"Chinese Traditional (Taiwan)",nativeName:"中文(台灣)"}};AblePlayer.prototype.getLanguageName=function(t){var e=i[t];return e?e.name:void 0},AblePlayer.prototype.getLanguageNativeName=function(t){var e=i[t];return e?e.nativeName:void 0}}(jQuery),function($){AblePlayer.prototype.getSupportedLangs=function(){return["ca","de","en","es","fr","he","it","ja","nb","nl","pt-br","tr","zh-tw"]},AblePlayer.prototype.getTranslationText=function(){var deferred,thisObj,lang,thisObj,msg,translationFile,collapsedLang;return deferred=$.Deferred(),thisObj=this,lang=$("body").attr("lang")?$("body").attr("lang").toLowerCase():$("html").attr("lang")?$("html").attr("lang").toLowerCase():null,this.forceLang||lang&&lang!==this.lang&&(-1!==$.inArray(lang,this.getSupportedLangs())?this.lang=lang:(msg=lang+" is not currently supported. Using default language ("+this.lang+")",this.debug)),this.searchLang||(this.searchLang=this.lang),translationFile=this.rootPath+"translations/"+this.lang+".js",this.importTranslationFile(translationFile).then(function(result){collapsedLang=thisObj.lang.replace("-",""),thisObj.tt=eval(collapsedLang),deferred.resolve()}),deferred.promise()},AblePlayer.prototype.importTranslationFile=function(t){var s=$.Deferred();return $.getScript(t).done(function(t,e){s.resolve(t)}).fail(function(t,e,i){s.fail()}),s.promise()}}(jQuery),jQuery,AblePlayer.prototype.computeEndTime=function(t,e){var i=t.split(":").reverse().map(function(t){return parseFloat(t)}),a=e.split(":").reverse().map(function(t){return parseFloat(t)});return i.reduce(function(t,e,i){var s=e+a[i];return 0===i&&(60<s&&(a[i+1]+=1,s-=60),s=s.toFixed(3)),1===i&&60<s&&(a[i+1]+=1,s-=60),s<10&&(s="0"+s),t.push(s),t},[]).reverse().join(":")},AblePlayer.prototype.ttml2webvtt=function(t){var r=this,e=r.convert.xml2json(t,{ignoreComment:!0,alwaysChildren:!0,compact:!0,spaces:2});return JSON.parse(e).tt.body.div.p.reduce(function(t,e,i){var s=e._text,a=Array.isArray(s),n=e._attributes;return r.computeEndTime(n.begin,n.dur),t+(r.computeEndTime(n.begin,"00:00:0")+" --\x3e ")+r.computeEndTime(n.begin,n.dur)+"\n"+(a?s.join("\n"):s)+"\n\n"},"WEBVTT\n\n\n")},function(a){a.doWhen=function(s){return a.Deferred(function(t){var e=a.extend({},{when:null,exec:function(){},interval:100,attempts:100,delayed:0},s,{checkId:null}),i=function(){if(!0===e.when())return e.exec.call(t.promise()),void t.resolve();e.checkId=setInterval(function(){0===e.attempts?(clearInterval(e.checkId),t.reject()):(--e.attempts,!0===e.when()&&(e.attempts=0,clearInterval(e.checkId),e.exec.call(t.promise()),t.resolve()))},e.interval)};0<e.delayed?setTimeout(i,Number(e.delayed)):i()}).promise()}}(jQuery),function(C){AblePlayer.prototype.injectVTS=function(){var e,t,i,s,a,n,r,o,l,h,p,c,u,d,g,f,m;if(e=this,C("#able-vts").length&&this.vtsTracks.length){for(P in this.langs=[],this.getAllLangs(this.vtsTracks),this.vtsLang=this.lang,t=C("<h2>").text("Video Transcript Sorter"),C("#able-vts").append(t),this.$vtsAlert=C("<div>",{id:"able-vts-alert","aria-live":"polite","aria-atomic":"true"}),C("#able-vts").append(this.$vtsAlert),i=C("<div>",{id:"able-vts-instructions"}),s=C("<p>").text("Use the Video Transcript Sorter to perform any of the following tasks:"),n=C("<ul>"),r=C("<li>").text("Reorder chapters, descriptions, captions, and/or subtitles so they appear in the proper sequence in Able Player's auto-generated transcript."),o=C("<li>").text("Modify content or start/end times (all are directly editable within the table)."),l=C("<li>").text("Insert new content, such as chapters or descriptions."),a=C("<p>").text('When finished editing, click the "Save Changes" button. This will auto-generate new content for all relevant timed text files (chapters, descriptions, captions, and/or subtitles), which can be copied and pasted into separate WebVTT files for use by Able Player.'),n.append(r,o,l),i.append(s,n,a),C("#able-vts").append(i),h=C("<fieldset>"),p=C("<legend>").text("Select a language"),h.append(p),this.langs)u="vts-lang-radio-"+this.langs[P],c=C("<div>",{}),g=C("<input>",{type:"radio",name:"vts-lang",id:u,value:this.langs[P]}).on("click",function(){e.vtsLang=C(this).val(),e.showVtsAlert("Loading "+e.getLanguageName(e.vtsLang)+" tracks"),e.injectVtsTable("update",e.vtsLang)}),this.langs[P]==this.lang&&g.prop("checked",!0),d=C("<label>",{for:u}).text(this.getLanguageName(this.langs[P])),c.append(g,d),h.append(c);var v,y,b,w,P;C("#able-vts").append(h),f=C("<button>",{type:"button",id:"able-vts-save",value:"save"}).text("Save Changes"),C("#able-vts").append(f),this.injectVtsTable("add",this.vtsLang),v=["captions","chapters","descriptions","subtitles"],C('td[contenteditable="true"]').on("focus",function(){y=C(this).text()}).on("blur",function(){y!=C(this).text()&&(b=C(this).index(),w=C(this).text(),1===b?-1===C.inArray(w,v)&&("s"===w.substr(0,1)?C(this).text("subtitles"):"d"===w.substr(0,1)?C(this).text("descriptions"):"ch"===w.substr(0,2)?C(this).text("chapters"):C(this).text("captions")):2!==b&&3!==b||C(this).text(e.formatTimestamp(w)))}).on("keydown",function(t){t.stopPropagation()}),C("#able-vts-save").on("click",function(t){t.stopPropagation(),"save"==C(this).attr("value")?(C(this).attr("value","cancel").text("Return to Editor"),m=C("#able-vts table"),C("#able-vts-instructions").hide(),C("#able-vts > fieldset").hide(),C("#able-vts table").remove(),C("#able-vts-icon-credit").remove(),e.parseVtsOutput(m)):(C(this).attr("value","save").text("Save Changes"),C("#able-vts-output").remove(),C("#able-vts-instructions").show(),C("#able-vts > fieldset").show(),C("#able-vts").append(m),C("#able-vts").append(e.getIconCredit()),e.showVtsAlert("Cancelling saving. Any edits you made have been restored in the VTS table."))})}},AblePlayer.prototype.setupVtsTracks=function(t,e,i,s,a){var n,r;n=this.getFilenameFromPath(s),r=this.parseVtsTracks(a),this.vtsTracks.push({kind:t,language:e,label:i,srcFile:n,cues:r})},AblePlayer.prototype.getFilenameFromPath=function(t){var e;return-1===(e=t.lastIndexOf("/"))?t:t.substr(e+1)},AblePlayer.prototype.getFilenameFromTracks=function(t,e){for(var i=0;i<this.vtsTracks.length;i++)if(this.vtsTracks[i].kind===t&&this.vtsTracks[i].language===e)return this.vtsTracks[i].srcFile;return!1},AblePlayer.prototype.parseVtsTracks=function(t){var e,i,s,a,n,r,o,l,h;for(e=t.split("\n"),s=[],a=0;a<e.length;)if(-1!==(r=e[a]).indexOf(" --\x3e ")){if(i=r.trim().split(" "),this.isValidTimestamp(i[0])&&this.isValidTimestamp(i[2])){for(l="",n=a+1,h=!1;n<e.length&&!h;)0<(o=e[n].trim()).length?0<l.length?l+="\n"+o:l+=o:h=!0,n++;s.push({start:i[0],end:i[2],content:l}),a=n}}else a++;return s},AblePlayer.prototype.isValidTimestamp=function(t){return!!/^[0-9:,.]*$/.test(t)},AblePlayer.prototype.formatTimestamp=function(t){var e,i=t.substr(0,t.lastIndexOf(".")+1);if(3<(e=t.substr(t.lastIndexOf(".")+1)).length)e=e.substr(0,3);else if(e.length<3)for(;e.length<3;)e+="0";return i+e},AblePlayer.prototype.injectVtsTable=function(t,e){var i,s,a,n,r,o,l,h;for("update"===t&&(C("#able-vts table").remove(),C("#able-vts-icon-credit").remove()),i=C("<table>",{lang:e}),n=C("<tr>",{lang:"en"}),s=["Row #","Kind","Start","End","Content","Actions"],a=0;a<s.length;a++)r=C("<th>",{scope:"col"}).text(s[a]),"Actions"===s[a]&&r.addClass("actions"),n.append(r);for(i.append(n),l=this.getAllRows(e),a=0;a<l.length;a++)n=C("<tr>",{id:"able-vts-row-"+(h=a+1),class:"kind-"+l[a].kind}),o=C("<td>").text(h),n.append(o),o=C("<td>",{contenteditable:"true"}).text(l[a].kind),n.append(o),o=C("<td>",{contenteditable:"true"}).text(l[a].start),n.append(o),o=C("<td>",{contenteditable:"true"}).text(l[a].end),n.append(o),o=C("<td>",{contenteditable:"true"}).text(l[a].content),n.append(o),o=this.addVtsActionButtons(h,l.length),n.append(o),i.append(n);C("#able-vts").append(i),C("#able-vts").append(this.getIconCredit())},AblePlayer.prototype.addVtsActionButtons=function(t,e){var i,s,a,n,r,o,l,h,p,c;for(i=this,s=C("<td>"),a=["up","down","insert","delete"],n=0;n<a.length;n++)"up"===(r=a[n])?1<t&&(o=C("<button>",{id:"able-vts-button-up-"+t,title:"Move up","aria-label":"Move Row "+t+" up"}).on("click",function(t){i.onClickVtsActionButton(t.currentTarget)}),l=C("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"254.296px",height:"254.296px",viewBox:"0 0 254.296 254.296",style:"enable-background:new 0 0 254.296 254.296"}),p=C("<path>",{d:"M249.628,176.101L138.421,52.88c-6.198-6.929-16.241-6.929-22.407,0l-0.381,0.636L4.648,176.101c-6.198,6.897-6.198,18.052,0,24.981l0.191,0.159c2.892,3.305,6.865,5.371,11.346,5.371h221.937c4.577,0,8.613-2.161,11.41-5.594l0.064,0.064C255.857,194.153,255.857,182.998,249.628,176.101z"}),h=C("<g>").append(p),l.append(h),o.append(l),o.html(o.html()),s.append(o)):"down"===r?t<e&&(o=C("<button>",{id:"able-vts-button-down-"+t,title:"Move down","aria-label":"Move Row "+t+" down"}).on("click",function(t){i.onClickVtsActionButton(t.currentTarget)}),l=C("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"292.362px",height:"292.362px",viewBox:"0 0 292.362 292.362",style:"enable-background:new 0 0 292.362 292.362"}),p=C("<path>",{d:"M286.935,69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952,0-9.233,1.807-12.85,5.424C1.807,72.998,0,77.279,0,82.228c0,4.948,1.807,9.229,5.424,12.847l127.907,127.907c3.621,3.617,7.902,5.428,12.85,5.428s9.233-1.811,12.847-5.428L286.935,95.074c3.613-3.617,5.427-7.898,5.427-12.847C292.362,77.279,290.548,72.998,286.935,69.377z"}),h=C("<g>").append(p),l.append(h),o.append(l),o.html(o.html()),s.append(o)):"insert"===r?(o=C("<button>",{id:"able-vts-button-insert-"+t,title:"Insert row below","aria-label":"Insert row before Row "+t}).on("click",function(t){i.onClickVtsActionButton(t.currentTarget)}),l=C("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"401.994px",height:"401.994px",viewBox:"0 0 401.994 401.994",style:"enable-background:new 0 0 401.994 401.994"}),p=C("<path>",{d:"M394,154.175c-5.331-5.33-11.806-7.994-19.417-7.994H255.811V27.406c0-7.611-2.666-14.084-7.994-19.414C242.488,2.666,236.02,0,228.398,0h-54.812c-7.612,0-14.084,2.663-19.414,7.993c-5.33,5.33-7.994,11.803-7.994,19.414v118.775H27.407c-7.611,0-14.084,2.664-19.414,7.994S0,165.973,0,173.589v54.819c0,7.618,2.662,14.086,7.992,19.411c5.33,5.332,11.803,7.994,19.414,7.994h118.771V374.59c0,7.611,2.664,14.089,7.994,19.417c5.33,5.325,11.802,7.987,19.414,7.987h54.816c7.617,0,14.086-2.662,19.417-7.987c5.332-5.331,7.994-11.806,7.994-19.417V255.813h118.77c7.618,0,14.089-2.662,19.417-7.994c5.329-5.325,7.994-11.793,7.994-19.411v-54.819C401.991,165.973,399.332,159.502,394,154.175z"}),h=C("<g>").append(p),l.append(h),o.append(l),o.html(o.html()),s.append(o)):"delete"===r&&(o=C("<button>",{id:"able-vts-button-delete-"+t,title:"Delete row ","aria-label":"Delete Row "+t}).on("click",function(t){i.onClickVtsActionButton(t.currentTarget)}),l=C("<svg>",{focusable:"false","aria-hidden":"true",x:"0px",y:"0px",width:"508.52px",height:"508.52px",viewBox:"0 0 508.52 508.52",style:"enable-background:new 0 0 508.52 508.52"}),p=C("<path>",{d:"M397.281,31.782h-63.565C333.716,14.239,319.478,0,301.934,0h-95.347c-17.544,0-31.782,14.239-31.782,31.782h-63.565c-17.544,0-31.782,14.239-31.782,31.782h349.607C429.063,46.021,414.825,31.782,397.281,31.782z"}),c=C("<path>",{d:"M79.456,476.737c0,17.544,14.239,31.782,31.782,31.782h286.042c17.544,0,31.782-14.239,31.782-31.782V95.347H79.456V476.737z M333.716,174.804c0-8.772,7.151-15.891,15.891-15.891c8.74,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.151,15.891-15.891,15.891c-8.74,0-15.891-7.151-15.891-15.891V174.804zM238.369,174.804c0-8.772,7.119-15.891,15.891-15.891c8.74,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.151,15.891-15.891,15.891c-8.772,0-15.891-7.151-15.891-15.891V174.804z M143.021,174.804c0-8.772,7.119-15.891,15.891-15.891c8.772,0,15.891,7.119,15.891,15.891v254.26c0,8.74-7.119,15.891-15.891,15.891c-8.772,0-15.891-7.151-15.891-15.891V174.804z"}),h=C("<g>").append(p,c),l.append(h),o.append(l),o.html(o.html()),s.append(o));return s},AblePlayer.prototype.updateVtsActionButtons=function(t,e){var i,s,a,n,r,o;for(i=0;i<t.length;i++)a=(s=t.eq(i)).attr("id"),n=s.attr("aria-label"),r=a.replace(/[0-9]+/g,e),o=n.replace(/[0-9]+/g,e),s.attr("id",r),s.attr("aria-label",o)},AblePlayer.prototype.getIconCredit=function(){return'<div id="able-vts-icon-credit">Action buttons made by <a href="https://www.flaticon.com/authors/elegant-themes">Elegant Themes</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> are licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>'},AblePlayer.prototype.getAllLangs=function(t){var e;for(e in t)t[e].hasOwnProperty("language")&&-1===C.inArray(t[e].language,this.langs)&&(this.langs[this.langs.length]=t[e].language)},AblePlayer.prototype.getAllRows=function(t){var e,i,s,a;for(a=[],e=0;e<this.vtsTracks.length;e++)if((i=this.vtsTracks[e]).language==t)for(s in i.cues)a.push({kind:i.kind,lang:t,id:i.cues[s].id,start:i.cues[s].start,end:i.cues[s].end,content:i.cues[s].content});return a.sort(function(t,e){return t.start>e.start?1:-1}),a},AblePlayer.prototype.onClickVtsActionButton=function(t){var e,i,s;i=(e=C(t).attr("id").split("-"))[3],s=e[4],"up"==i?this.moveRow(s,"up"):"down"==i?this.moveRow(s,"down"):"insert"==i?this.insertRow(s):"delete"==i&&this.deleteRow(s)},AblePlayer.prototype.insertRow=function(t){var e,i,s,a,n,r,o,l,h,p,c,u,d,g,f;for(s=(i=(e=C("#able-vts table")).find("tr")).length-1,a=parseInt(t)+1,n=C("<tr>",{id:"able-vts-row-"+a}),r=C("<td>").text(a),n.append(r),p=null,o=C("<select>",{id:"able-vts-kind-"+a,"aria-label":"What kind of track is this?",placeholder:"Select a kind"}).on("change",function(){p=C(this).val(),c="kind-"+p,u=C(this).closest("tr"),C(this).parent().text(p),u.addClass(c)}),l=["","captions","chapters","descriptions","subtitles"],d=0;d<l.length;d++)h=C("<option>",{value:l[d]}).text(l[d]),o.append(h);for(r=C("<td>").append(o),n.append(r),r=C("<td>",{contenteditable:"true"}),n.append(r),r=C("<td>",{contenteditable:"true"}),n.append(r),r=C("<td>",{contenteditable:"true"}),n.append(r),r=this.addVtsActionButtons(a,s),n.append(r),e.find("tr").eq(t).after(n),d=a;d<=s;d++)g=d+1,i.eq(d).attr("id","able-vts-row-"+g),i.eq(d).find("td").eq(0).text(g),f=i.eq(d).find("button"),this.updateVtsActionButtons(f,g);this.adjustTimes(a),this.showVtsAlert("A new row "+a+" has been inserted"),o.focus()},AblePlayer.prototype.deleteRow=function(t){var e,i,s,a,n,r;for((e=C("#able-vts table"))[0].deleteRow(t),s=(i=e.find("tr")).length-1,a=t;a<=s;a++)n=a,i.eq(a).attr("id","able-vts-row-"+n),i.eq(a).find("td").eq(0).text(n),r=i.eq(a).find("button"),this.updateVtsActionButtons(r,n);this.showVtsAlert("Row "+t+" has been deleted")},AblePlayer.prototype.moveRow=function(t,e){var i,s,a,n;C("#able-vts table").find("tr"),i=C("#able-vts table").find("tr").eq(t),"up"==e?(s=parseInt(t)-1,(a=C("#able-vts table").find("tr").eq(s)).before(i)):"down"==e&&(s=parseInt(t)+1,(a=C("#able-vts table").find("tr").eq(s)).after(i)),i.attr("id","able-vts-row-"+s),i.find("td").eq(0).text(s),this.updateVtsActionButtons(i.find("button"),s),a.attr("id","able-vts-row-"+t),a.find("td").eq(0).text(t),this.updateVtsActionButtons(a.find("button"),t),this.adjustTimes(s),n="Row "+t+" has been moved "+e,n+=" and is now Row "+s,this.showVtsAlert(n)},AblePlayer.prototype.adjustTimes=function(t){var e,i,s,a,n,r,o,l,h,p,c,u,d,g,f,m;(e=[]).captions=.001,e.descriptions=.001,e.chapters=.001,l=(n=(i=C("#able-vts table").find("tr")).eq(t)).is('[class^="kind-"]')?this.getKindFromClass(n.attr("class")):"captions",c=this.getSecondsFromColonTime(n.find("td").eq(2).text()),g=this.getSecondsFromColonTime(n.find("td").eq(3).text()),f=1<t?(s=t-1,h=(r=i.eq(s)).is('[class^="kind-"]')?this.getKindFromClass(r.attr("class")):null,u=this.getSecondsFromColonTime(r.find("td").eq(2).text()),this.getSecondsFromColonTime(r.find("td").eq(3).text())):u=h=r=s=null,m=t<i.length-1?(a=t+1,p=(o=i.eq(a)).is('[class^="kind-"]')?this.getKindFromClass(o.attr("class")):null,d=this.getSecondsFromColonTime(o.find("td").eq(2).text()),this.getSecondsFromColonTime(o.find("td").eq(3).text())):d=p=o=a=null,isNaN(c)?(null==h&&(h="captions",r.attr("class","kind-captions"),r.find("td").eq(1).html("captions")),"captions"===h?(c=(parseFloat(f)+.001).toFixed(3),g=d?(parseFloat(d)-.001).toFixed(3):(parseFloat(c)+e[l]).toFixed(3)):"chapters"===h?(c=(parseFloat(u)+.001).toFixed(3),g=d?(parseFloat(d)-.001).toFixed(3):(parseFloat(c)+minDurartion[l]).toFixed(3)):"descriptions"===h&&(c=(parseFloat(u)+e.descriptions).toFixed(3),g=(parseFloat(c)+e.descriptions).toFixed(3))):u?u<c?c<d||(d=(parseFloat(c)+e[l]).toFixed(3),m=(parseFloat(d)+e[p]).toFixed(3)):(c=(parseFloat(u)+e[h]).toFixed(3),g=(parseFloat(c)+e[l]).toFixed(3)):c<d||(d=(parseFloat(c)+e[l]).toFixed(3),m=(parseFloat(d)+e[p]).toFixed(3)),g-c<e[l]&&(g=(parseFloat(c)+e[l]).toFixed(3),d&&(d=(parseFloat(g)+.001).toFixed(3))),n.find("td").eq(2).text(this.formatSecondsAsColonTime(c,!0)),n.find("td").eq(3).text(this.formatSecondsAsColonTime(g,!0)),r&&(r.find("td").eq(2).text(this.formatSecondsAsColonTime(u,!0)),r.find("td").eq(3).text(this.formatSecondsAsColonTime(f,!0))),o&&(o.find("td").eq(2).text(this.formatSecondsAsColonTime(d,!0)),o.find("td").eq(3).text(this.formatSecondsAsColonTime(m,!0)))},AblePlayer.prototype.getKindFromClass=function(t){var e,i,s;return e=t.indexOf("kind-")+5,s=-1==(i=t.indexOf(" ",e))?t.length-e:i-e,t.substr(e,s)},AblePlayer.prototype.showVtsAlert=function(t){this.$vtsAlert.text(t).show().delay(3e3).fadeOut("slow")},AblePlayer.prototype.parseVtsOutput=function(t){var e,i,s,a,n,r,o,l,h,p;for(e=t.attr("lang"),s=["captions","chapters","descriptions","subtitles"],n={},i=0;i<s.length;i++)n[a=s[i]]="WEBVTT\n\n";if(0<(r=t.find("tr")).length)for(i=0;i<r.length;i++)a=r.eq(i).find("td").eq(1).text(),-1!==C.inArray(a,s)&&(o=r.eq(i).find("td").eq(2).text(),l=r.eq(i).find("td").eq(3).text(),h=r.eq(i).find("td").eq(4).text(),void 0!==o&&void 0!==l&&(n[a]+=o+" --\x3e "+l+"\n","undefined"!==h&&(n[a]+=h),n[a]+="\n\n"));for(p=C("<div>",{id:"able-vts-output"}),C("#able-vts").append(p),i=0;i<s.length;i++)8<n[a=s[i]].length&&this.showWebVttOutput(a,n[a],e)},AblePlayer.prototype.showWebVttOutput=function(t,e,i){var s,a,n,r,o;s=C("<h3>").text(t.charAt(0).toUpperCase()+t.slice(1)),r="If you made changes, copy/paste the following content ",(a=this.getFilenameFromTracks(t,i))?(r+="to replace the original content of your "+this.getLanguageName(i)+" ",r+="<em>"+t+"</em> WebVTT file (<strong>"+a+"</strong>)."):r+="into a new "+this.getLanguageName(i)+" <em>"+t+"</em> WebVTT file.",n=C("<p>",{class:"able-vts-output-instructions"}).html(r),o=C("<textarea>").text(e),C("#able-vts-output").append(s,n,o)}}(jQuery),function(o){AblePlayer.prototype.initVimeoPlayer=function(){var e,t,i,s,a,n,r;return e=this,i=(t=new o.Deferred).promise(),s=this.mediaId+"_vimeo",this.$mediaContainer.prepend(o("<div>").attr("id",s)),a=this.vimeoDescId&&this.prefDesc?this.vimeoDescId:this.vimeoId,this.activeVimeoId=a,this.autoplay&&this.okToPlay?"true":"false",(n=this.getVimeoDimensions(this.activeVimeoId,s))?(this.vimeoWidth=n[0],this.vimeoHeight=n[1],this.aspectRatio=e.ytWidth/e.ytHeight):(this.vimeoWidth=null,this.vimeoHeight=null),r={id:a,width:this.vimeoWidth,controls:!1},this.vimeoPlayer=new Vimeo.Player(s,r),this.vimeoPlayer.ready().then(function(){e.hasPlaylist||(e.$media.remove(),e.vimeoPlaybackRate=1,e.vimeoPlayer.setPlaybackRate(e.vimeoPlaybackRate).then(function(t){e.vimeoSupportsPlaybackRateChange=!0}).catch(function(t){e.vimeoSupportsPlaybackRateChange=!1}),t.resolve())}),i},AblePlayer.prototype.getVimeoPaused=function(){var e,t;return t=(e=new o.Deferred).promise(),this.vimeoPlayer.getPaused().then(function(t){e.resolve(t)}),t},AblePlayer.prototype.getVimeoEnded=function(){var e,t;return t=(e=new o.Deferred).promise(),this.vimeoPlayer.getEnded().then(function(t){e.resolve(t)}),t},AblePlayer.prototype.getVimeoState=function(){var e,t,i,s,a;return this,t=(e=new o.Deferred).promise(),i=[],s=this.vimeoPlayer.getPaused(),a=this.vimeoPlayer.getEnded(),i.push(s),i.push(a),s.then(function(t){e.resolve(t)}),a.then(function(t){e.resolve(t)}),o.when.apply(o,i).then(function(){e.resolve()}),t},AblePlayer.prototype.getVimeoDimensions=function(t){var e,i,s,a;return e=[],void 0!==this.playerMaxWidth?(e[0]=this.playerMaxWidth,void 0!==this.playerMaxHeight&&(e[1]=this.playerMaxHeight),e):void 0!==o("#"+t)&&(s=(i=o("#"+t)).width(),a=i.height(),0<s&&0<a)&&(e[0]=s,e[1]=a,e)},AblePlayer.prototype.resizeVimeoPlayer=function(t,e){var i,s,a;void 0!==this.aspectRatio?this.restoringAfterFullScreen?(this.youTubePlayer&&this.youTubePlayer.setSize(this.ytWidth,this.ytHeight),this.restoringAfterFullScreen=!1):(s=this.$ableWrapper.parent().width(),a=Math.round(s/this.aspectRatio),this.$ableWrapper.css({"max-width":s+"px",width:""}),this.youTubePlayer.setSize(s,a),this.fullscreen?this.youTubePlayer.setSize(s,a):this.youTubePlayer.setSize(this.ytWidth,this.ytHeight)):(i=this.getYouTubeDimensions(t,e))&&(s=i[0],a=i[1],0<s&&0<a&&(this.aspectRatio=s/a,this.ytWidth=s,this.ytHeight=a,s!==this.$ableWrapper.width()&&(s=this.$ableWrapper.width(),a=Math.round(s/this.aspectRatio),this.youTubePlayer&&this.youTubePlayer.setSize(s,a))))},AblePlayer.prototype.setupVimeoCaptions=function(){var t=new o.Deferred,e=t.promise();return this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,"undefined"!=typeof youTubeDataAPIKey?o.doWhen({when:function(){return googleApiReady},interval:100,attempts:1e3}).done(function(){t.resolve()}).fail(function(){}):t.resolve(),e},AblePlayer.prototype.getVimeoCaptionTracks=function(){var e,i,s,a=new o.Deferred,t=a.promise();return(e=this).vimeoPlayer.getTextTracks().then(function(t){if(t.length){for(i=0;i<t.length;i++)e.hasCaptions=!0,e.usingVimeoCaptions=!0,1===e.prefCaptions?e.captionsOn=!0:e.captionsOn=!1,s=t[i].language===e.lang,e.tracks.push({kind:t[i].kind,language:t[i].language,label:t[i].label,def:s});e.setupPopups("captions"),a.resolve()}else e.hasCaptions=!1,e.usingVimeoCaptions=!1,a.resolve()}),t},AblePlayer.prototype.initVimeoCaptionModule=function(){var t;if((t=this.youTubePlayer.getOptions()).length){for(var e=0;e<t.length;e++){if("cc"==t[e]){this.ytCaptionModule="cc",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}if("captions"==t[e]){this.ytCaptionModule="captions",this.hasCaptions||(this.hasCaptions=!0,this.usingYouTubeCaptions=!0);break}}void 0!==this.ytCaptionModule&&(this.usingYouTubeCaptions?(this.youTubePlayer.setOption(this.ytCaptionModule,"track",{languageCode:this.captionLang}),this.youTubePlayer.setOption(this.ytCaptionModule,"fontSize",this.translatePrefs("size",this.prefCaptionsSize,"youtube"))):this.youTubePlayer.unloadModule(this.ytCaptionModule))}else this.hasCaptions=!1,this.usingYouTubeCaptions=!1;this.refreshControls("captions")},AblePlayer.prototype.getVimeoPosterUrl=function(t,e){var i="https://img.youtube.com/vi/"+t;return"120"==e?i+"/default.jpg":"320"==e?i+"/hqdefault.jpg":"480"==e?i+"/hqdefault.jpg":"640"==e&&i+"/sddefault.jpg"}}(jQuery);