-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy pathableplayer.min.js
More file actions
3 lines (3 loc) · 256 KB
/
ableplayer.min.js
File metadata and controls
3 lines (3 loc) · 256 KB
1
2
3
/*! ableplayer V4.8.0 with DOMPurify included */
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).DOMPurify=e()}(this,function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:s}=Object;let{freeze:n,seal:r,create:o}=Object,{apply:l,construct:h}="undefined"!=typeof Reflect&&Reflect;n||(n=function freeze(t){return t}),r||(r=function seal(t){return t}),l||(l=function apply(t,e){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(e,a)}),h||(h=function construct(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return new t(...i)});const p=unapply(Array.prototype.forEach),c=unapply(Array.prototype.lastIndexOf),u=unapply(Array.prototype.pop),d=unapply(Array.prototype.push),f=unapply(Array.prototype.splice),g=unapply(String.prototype.toLowerCase),m=unapply(String.prototype.toString),v=unapply(String.prototype.match),y=unapply(String.prototype.replace),b=unapply(String.prototype.indexOf),P=unapply(String.prototype.trim),T=unapply(Object.prototype.hasOwnProperty),k=unapply(RegExp.prototype.test),w=function unconstruct(t){return function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return h(t,i)}}(TypeError);function unapply(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return l(t,e,a)}}function addToSet(t,a){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;e&&e(t,null);let n=a.length;for(;n--;){let e=a[n];if("string"==typeof e){const t=s(e);t!==e&&(i(a)||(a[n]=t),e=t)}t[e]=!0}return t}function cleanArray(t){for(let e=0;e<t.length;e++){T(t,e)||(t[e]=null)}return t}function clone(e){const i=o(null);for(const[a,s]of t(e)){T(e,a)&&(Array.isArray(s)?i[a]=cleanArray(s):s&&"object"==typeof s&&s.constructor===Object?i[a]=clone(s):i[a]=s)}return i}function lookupGetter(t,e){for(;null!==t;){const i=s(t,e);if(i){if(i.get)return unapply(i.get);if("function"==typeof i.value)return unapply(i.value)}t=a(t)}return function fallbackValue(){return null}}const C=n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),A=n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),S=n(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$=n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=n(["#text"]),I=n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),M=n(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=n(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),L=n(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),E=r(/\{\{[\w\W]*|[\w\W]*\}\}/gm),O=r(/<%[\w\W]*|[\w\W]*%>/gm),R=r(/\$\{[\w\W]*/gm),F=r(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=r(/^aria-[\-\w]+$/),z=r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=r(/^(?:\w+script|data):/i),W=r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_=r(/^html$/i),j=r(/^[a-z][.\w]*(-[.\w]+)+$/i);var q=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:j,DATA_ATTR:F,DOCTYPE_NAME:_,ERB_EXPR:O,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:H,MUSTACHE_EXPR:E,TMPLIT_EXPR:R});const K=1,Y=3,U=7,G=8,X=9,Q=function getGlobal(){return"undefined"==typeof window?null:window};var J=function createDOMPurify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const DOMPurify=t=>createDOMPurify(t);if(DOMPurify.version="3.3.1",DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==X||!e.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:i}=e;const a=i,s=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:h,Element:E,NodeFilter:O,NamedNodeMap:R=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:F,DOMParser:V,trustedTypes:H}=e,W=E.prototype,j=lookupGetter(W,"cloneNode"),J=lookupGetter(W,"remove"),Z=lookupGetter(W,"nextSibling"),tt=lookupGetter(W,"childNodes"),et=lookupGetter(W,"parentNode");if("function"==typeof l){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let it,at="";const{implementation:st,createNodeIterator:nt,createDocumentFragment:rt,getElementsByTagName:ot}=i,{importNode:lt}=a;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported="function"==typeof t&&"function"==typeof et&&st&&void 0!==st.createHTMLDocument;const{MUSTACHE_EXPR:pt,ERB_EXPR:ct,TMPLIT_EXPR:ut,DATA_ATTR:dt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:vt}=q;let{IS_ALLOWED_URI:yt}=q,bt=null;const Pt=addToSet({},[...C,...A,...D,...x,...N]);let Tt=null;const kt=addToSet({},[...I,...M,...B,...L]);let wt=Object.seal(o(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,At=null;const Dt=Object.seal(o(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let St=!0,xt=!0,$t=!1,Nt=!0,It=!1,Mt=!0,Bt=!1,Lt=!1,Et=!1,Ot=!1,Rt=!1,Ft=!1,Vt=!0,zt=!1,Ht=!0,Wt=!1,_t={},jt=null;const qt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Kt=null;const Yt=addToSet({},["audio","video","img","source","image","track"]);let Ut=null;const Gt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let Zt=Jt,te=!1,ee=null;const ie=addToSet({},[Xt,Qt,Jt],m);let ae=addToSet({},["mi","mo","mn","ms","mtext"]),se=addToSet({},["annotation-xml"]);const ne=addToSet({},["title","style","font","a","script"]);let re=null;const oe=["application/xhtml+xml","text/html"];let le=null,he=null;const pe=i.createElement("form"),ce=function isRegexOrFunction(t){return t instanceof RegExp||t instanceof Function},ue=function _parseConfig(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!he||he!==t){if(t&&"object"==typeof t||(t={}),t=clone(t),re=-1===oe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,le="application/xhtml+xml"===re?m:g,bt=T(t,"ALLOWED_TAGS")?addToSet({},t.ALLOWED_TAGS,le):Pt,Tt=T(t,"ALLOWED_ATTR")?addToSet({},t.ALLOWED_ATTR,le):kt,ee=T(t,"ALLOWED_NAMESPACES")?addToSet({},t.ALLOWED_NAMESPACES,m):ie,Ut=T(t,"ADD_URI_SAFE_ATTR")?addToSet(clone(Gt),t.ADD_URI_SAFE_ATTR,le):Gt,Kt=T(t,"ADD_DATA_URI_TAGS")?addToSet(clone(Yt),t.ADD_DATA_URI_TAGS,le):Yt,jt=T(t,"FORBID_CONTENTS")?addToSet({},t.FORBID_CONTENTS,le):qt,Ct=T(t,"FORBID_TAGS")?addToSet({},t.FORBID_TAGS,le):clone({}),At=T(t,"FORBID_ATTR")?addToSet({},t.FORBID_ATTR,le):clone({}),_t=!!T(t,"USE_PROFILES")&&t.USE_PROFILES,St=!1!==t.ALLOW_ARIA_ATTR,xt=!1!==t.ALLOW_DATA_ATTR,$t=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Mt=!1!==t.SAFE_FOR_XML,Bt=t.WHOLE_DOCUMENT||!1,Ot=t.RETURN_DOM||!1,Rt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Et=t.FORCE_BODY||!1,Vt=!1!==t.SANITIZE_DOM,zt=t.SANITIZE_NAMED_PROPS||!1,Ht=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||z,Zt=t.NAMESPACE||Jt,ae=t.MATHML_TEXT_INTEGRATION_POINTS||ae,se=t.HTML_INTEGRATION_POINTS||se,wt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(wt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(wt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(wt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(xt=!1),Rt&&(Ot=!0),_t&&(bt=addToSet({},N),Tt=[],!0===_t.html&&(addToSet(bt,C),addToSet(Tt,I)),!0===_t.svg&&(addToSet(bt,A),addToSet(Tt,M),addToSet(Tt,L)),!0===_t.svgFilters&&(addToSet(bt,D),addToSet(Tt,M),addToSet(Tt,L)),!0===_t.mathMl&&(addToSet(bt,x),addToSet(Tt,B),addToSet(Tt,L))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Dt.tagCheck=t.ADD_TAGS:(bt===Pt&&(bt=clone(bt)),addToSet(bt,t.ADD_TAGS,le))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Dt.attributeCheck=t.ADD_ATTR:(Tt===kt&&(Tt=clone(Tt)),addToSet(Tt,t.ADD_ATTR,le))),t.ADD_URI_SAFE_ATTR&&addToSet(Ut,t.ADD_URI_SAFE_ATTR,le),t.FORBID_CONTENTS&&(jt===qt&&(jt=clone(jt)),addToSet(jt,t.FORBID_CONTENTS,le)),t.ADD_FORBID_CONTENTS&&(jt===qt&&(jt=clone(jt)),addToSet(jt,t.ADD_FORBID_CONTENTS,le)),Ht&&(bt["#text"]=!0),Bt&&addToSet(bt,["html","head","body"]),bt.table&&(addToSet(bt,["tbody"]),delete Ct.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');it=t.TRUSTED_TYPES_POLICY,at=it.createHTML("")}else void 0===it&&(it=function _createTrustedTypesPolicy(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const a="data-tt-policy-suffix";e&&e.hasAttribute(a)&&(i=e.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return null}}(H,s)),null!==it&&"string"==typeof at&&(at=it.createHTML(""));n&&n(t),he=t}},de=addToSet({},[...A,...D,...S]),fe=addToSet({},[...x,...$]),ge=function _forceRemove(t){d(DOMPurify.removed,{element:t});try{et(t).removeChild(t)}catch(e){J(t)}},me=function _removeAttribute(t,e){try{d(DOMPurify.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(DOMPurify.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Ot||Rt)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ve=function _initDocument(t){let e=null,a=null;if(Et)t="<remove></remove>"+t;else{const e=v(t,/^[\r\n\t ]+/);a=e&&e[0]}"application/xhtml+xml"===re&&Zt===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const s=it?it.createHTML(t):t;if(Zt===Jt)try{e=(new V).parseFromString(s,re)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(Zt,"template",null);try{e.documentElement.innerHTML=te?at:s}catch(t){}}const n=e.body||e.documentElement;return t&&a&&n.insertBefore(i.createTextNode(a),n.childNodes[0]||null),Zt===Jt?ot.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:n},ye=function _createNodeIterator(t){return nt.call(t.ownerDocument||t,t,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},be=function _isClobbered(t){return t instanceof F&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof R)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pe=function _isNode(t){return"function"==typeof h&&t instanceof h};function _executeHooks(t,e,i){p(t,t=>{t.call(DOMPurify,e,i,he)})}const Te=function _sanitizeElements(t){let e=null;if(_executeHooks(ht.beforeSanitizeElements,t,null),be(t))return ge(t),!0;const i=le(t.nodeName);if(_executeHooks(ht.uponSanitizeElement,t,{tagName:i,allowedTags:bt}),Mt&&t.hasChildNodes()&&!Pe(t.firstElementChild)&&k(/<[/\w!]/g,t.innerHTML)&&k(/<[/\w!]/g,t.textContent))return ge(t),!0;if(t.nodeType===U)return ge(t),!0;if(Mt&&t.nodeType===G&&k(/<[/\w]/g,t.data))return ge(t),!0;if(!(Dt.tagCheck instanceof Function&&Dt.tagCheck(i))&&(!bt[i]||Ct[i])){if(!Ct[i]&&we(i)){if(wt.tagNameCheck instanceof RegExp&&k(wt.tagNameCheck,i))return!1;if(wt.tagNameCheck instanceof Function&&wt.tagNameCheck(i))return!1}if(Ht&&!jt[i]){const e=et(t)||t.parentNode,i=tt(t)||t.childNodes;if(i&&e){for(let a=i.length-1;a>=0;--a){const s=j(i[a],!0);s.__removalCount=(t.__removalCount||0)+1,e.insertBefore(s,Z(t))}}}return ge(t),!0}return t instanceof E&&!function _checkValidNamespace(t){let e=et(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});const i=g(t.tagName),a=g(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===Jt?"svg"===i:e.namespaceURI===Xt?"svg"===i&&("annotation-xml"===a||ae[a]):Boolean(de[i]):t.namespaceURI===Xt?e.namespaceURI===Jt?"math"===i:e.namespaceURI===Qt?"math"===i&&se[a]:Boolean(fe[i]):t.namespaceURI===Jt?!(e.namespaceURI===Qt&&!se[a])&&!(e.namespaceURI===Xt&&!ae[a])&&!fe[i]&&(ne[i]||!de[i]):!("application/xhtml+xml"!==re||!ee[t.namespaceURI]))}(t)?(ge(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!k(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===Y&&(e=t.textContent,p([pt,ct,ut],t=>{e=y(e,t," ")}),t.textContent!==e&&(d(DOMPurify.removed,{element:t.cloneNode()}),t.textContent=e)),_executeHooks(ht.afterSanitizeElements,t,null),!1):(ge(t),!0)},ke=function _isValidAttribute(t,e,a){if(Vt&&("id"===e||"name"===e)&&(a in i||a in pe))return!1;if(xt&&!At[e]&&k(dt,e));else if(St&&k(ft,e));else if(Dt.attributeCheck instanceof Function&&Dt.attributeCheck(e,t));else if(!Tt[e]||At[e]){if(!(we(t)&&(wt.tagNameCheck instanceof RegExp&&k(wt.tagNameCheck,t)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(t))&&(wt.attributeNameCheck instanceof RegExp&&k(wt.attributeNameCheck,e)||wt.attributeNameCheck instanceof Function&&wt.attributeNameCheck(e,t))||"is"===e&&wt.allowCustomizedBuiltInElements&&(wt.tagNameCheck instanceof RegExp&&k(wt.tagNameCheck,a)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(a))))return!1}else if(Ut[e]);else if(k(yt,y(a,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(a,"data:")||!Kt[t]){if($t&&!k(gt,y(a,mt,"")));else if(a)return!1}else;return!0},we=function _isBasicCustomElement(t){return"annotation-xml"!==t&&v(t,vt)},Ce=function _sanitizeAttributes(t){_executeHooks(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||be(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let a=e.length;for(;a--;){const s=e[a],{name:n,namespaceURI:r,value:o}=s,l=le(n),h=o;let c="value"===n?h:P(h);if(i.attrName=l,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,_executeHooks(ht.uponSanitizeAttribute,t,i),c=i.attrValue,!zt||"id"!==l&&"name"!==l||(me(n,t),c="user-content-"+c),Mt&&k(/((--!?|])>)|<\/(style|title|textarea)/i,c)){me(n,t);continue}if("attributename"===l&&v(c,"href")){me(n,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){me(n,t);continue}if(!Nt&&k(/\/>/i,c)){me(n,t);continue}It&&p([pt,ct,ut],t=>{c=y(c,t," ")});const d=le(t.nodeName);if(ke(d,l,c)){if(it&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(r);else switch(H.getAttributeType(d,l)){case"TrustedHTML":c=it.createHTML(c);break;case"TrustedScriptURL":c=it.createScriptURL(c)}if(c!==h)try{r?t.setAttributeNS(r,n,c):t.setAttribute(n,c),be(t)?ge(t):u(DOMPurify.removed)}catch(e){me(n,t)}}else me(n,t)}_executeHooks(ht.afterSanitizeAttributes,t,null)},Ae=function _sanitizeShadowDOM(t){let e=null;const i=ye(t);for(_executeHooks(ht.beforeSanitizeShadowDOM,t,null);e=i.nextNode();)_executeHooks(ht.uponSanitizeShadowNode,e,null),Te(e),Ce(e),e.content instanceof r&&_sanitizeShadowDOM(e.content);_executeHooks(ht.afterSanitizeShadowDOM,t,null)};return DOMPurify.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,n=null,o=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pe(t)){if("function"!=typeof t.toString)throw w("toString is not a function");if("string"!=typeof(t=t.toString()))throw w("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return t;if(Lt||ue(e),DOMPurify.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=le(t.nodeName);if(!bt[e]||Ct[e])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof h)i=ve("\x3c!----\x3e"),s=i.ownerDocument.importNode(t,!0),s.nodeType===K&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!Ot&&!It&&!Bt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(i=ve(t),!i)return Ot?null:Ft?at:""}i&&Et&&ge(i.firstChild);const l=ye(Wt?t:i);for(;n=l.nextNode();)Te(n),Ce(n),n.content instanceof r&&Ae(n.content);if(Wt)return t;if(Ot){if(Rt)for(o=rt.call(i.ownerDocument);i.firstChild;)o.appendChild(i.firstChild);else o=i;return(Tt.shadowroot||Tt.shadowrootmode)&&(o=lt.call(a,o,!0)),o}let c=Bt?i.outerHTML:i.innerHTML;return Bt&&bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&k(_,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),It&&p([pt,ct,ut],t=>{c=y(c,t," ")}),it&&Ft?it.createHTML(c):c},DOMPurify.setConfig=function(){ue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},DOMPurify.clearConfig=function(){he=null,Lt=!1},DOMPurify.isValidAttribute=function(t,e,i){he||ue({});const a=le(t),s=le(e);return ke(a,s,i)},DOMPurify.addHook=function(t,e){"function"==typeof e&&d(ht[t],e)},DOMPurify.removeHook=function(t,e){if(void 0!==e){const i=c(ht[t],e);return-1===i?void 0:f(ht[t],i,1)[0]}return u(ht[t])},DOMPurify.removeHooks=function(t){ht[t]=[]},DOMPurify.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();return J});var AblePlayerInstances=[];!function(t){t(function(){t("video, audio").each(function(e,i){void 0!==t(i).data("able-player")&&AblePlayerInstances.push(new AblePlayer(t(this),t(i)))})}),window.onYouTubeIframeAPIReady=function(){AblePlayer.youTubeIframeAPIReady=!0,t("body").trigger("youTubeIframeAPIReady",[])},t(window).on("keydown",function(t){1===AblePlayer.nextIndex&&AblePlayer.lastCreated.onPlayerKeyPress(t)}),window.AblePlayer=function(e){var i=this;if(AblePlayer.lastCreated=this,this.media=e,0!==t(e).length){void 0!==t(e).attr("autoplay")?(this.autoplay=!0,this.okToPlay=!0):(this.autoplay=!1,this.okToPlay=!1),this.loop=void 0!==t(e).attr("loop"),this.playsInline=void 0!==t(e).attr("playsinline")?"1":"0",this.hasPoster=!(!t(e).attr("poster")&&!t(e).data("poster")),this.audioPoster=t(e).data("poster"),this.audioPosterAlt=t(e).data("poster-alt"),this.width=t(e).attr("width")??0,this.height=t(e).attr("height")??0;var a=t(e).data("start-time"),s=!("number"!=typeof a&&("string"!=typeof a||""===value.trim()||isNaN(value)||!isFinite(Number(value))));if(this.startTime=void 0!==a&&s?a:0,this.debug=void 0!==t(e).data("debug")&&!1!==t(e).data("debug"),void 0!==t(e).data("root-path")?this.rootPath=t(e).data("root-path").replace(/\/?$/,"/"):this.rootPath=this.getRootPath(),this.defaultVolume=7,void 0!==t(e).data("volume")&&""!==t(e).data("volume")){var n=t(e).data("volume");n>=0&&n<=10&&(this.defaultVolume=n)}if(this.volume=this.defaultVolume,void 0!==t(e).data("use-chapters-button")&&!1===t(e).data("use-chapters-button")?this.useChaptersButton=!1:this.useChaptersButton=!0,void 0!==t(e).data("descriptions-audible")&&!1===t(e).data("descriptions-audible")||void 0!==t(e).data("description-audible")&&!1===t(e).data("description-audible")?this.readDescriptionsAloud=!1:this.readDescriptionsAloud=!0,this.descVoices=[],this.descReader="screenreader"==t(e).data("desc-reader")?"screenreader":"browser",this.defaultStateCaptions="off"==t(e).data("state-captions")?0:1,this.defaultStateDescriptions="on"==t(e).data("state-descriptions")?1:0,this.defaultDescPause="off"==t(e).data("desc-pause-default")?0:1,void 0!==t(e).data("heading-level")&&""!==t(e).data("heading-level")){var r=t(e).data("heading-level");/^[0-6]*$/.test(r)&&(this.playerHeadingLevel=r)}var o=t(e).data("transcript-div");void 0!==o&&""!==o&&null!==document.getElementById(o)?this.transcriptDivLocation=o:this.transcriptDivLocation=null;var l=t(e).data("include-transcript");this.hideTranscriptButton=void 0!==l&&!1===l,this.transcriptType=null,void 0!==t(e).data("transcript-src")?(this.transcriptSrc=t(e).data("transcript-src"),this.transcriptSrcHasRequiredParts()&&(this.transcriptType="manual")):t(e).find('track[kind="captions"],track[kind="subtitles"],track:not([kind])').length>0&&(this.transcriptType=this.transcriptDivLocation?"external":"popup"),this.lyricsMode=void 0!==t(e).data("lyrics-mode")&&!1!==t(e).data("lyrics-mode"),void 0!==t(e).data("transcript-title")&&""!==t(e).data("transcript-title")&&(this.transcriptTitle=t(e).data("transcript-title"));var h=t(e).data("sign-div");void 0!==h&&""!==h&&null!==document.getElementById(h)?this.$signDivLocation=t("#"+h):this.$signDivLocation=null,this.defaultCaptionsPosition="overlay"===t(e).data("captions-position")?"overlay":"below";var p=t(e).data("chapters-div");void 0!==p&&""!==p&&(this.chaptersDivLocation=p),void 0!==t(e).data("chapters-title")&&(this.chaptersTitle=t(e).data("chapters-title"));var c=t(e).data("chapters-default");this.defaultChapter=void 0!==c&&""!==c?c:null,this.speedIcons="arrows"===t(e).data("speed-icons")?"arrows":"animals";var u=t(e).data("seekbar-scope");this.seekbarScope="chapter"===u||"chapters"===u?"chapter":"video";var d=t(e).data("youtube-id");if(void 0!==d&&""!==d&&(this.youTubeId=this.getYouTubeId(d),!this.hasPoster)){let i=this.getYouTubePosterUrl(this.youTubeId,"640");t(e).attr("poster",i)}var f=t(e).data("youtube-desc-id");void 0!==f&&""!==f&&(this.youTubeDescId=this.getYouTubeId(f));var g=t(e).data("youtube-sign-src");void 0!==g&&""!==g&&(this.youTubeSignId=this.getYouTubeId(g));var m=t(e).data("youtube-nocookie");this.youTubeNoCookie=!(void 0===m||!m);var v=t(e).data("vimeo-id");if(void 0!==v&&""!==v&&(this.vimeoId=this.getVimeoId(v),!this.hasPoster)){let a=i.getVimeoPosterUrl(this.vimeoId,"1200");t(e).attr("poster",a)}var y=t(e).data("vimeo-desc-id");if(void 0!==y&&""!==y&&(this.vimeoDescId=this.getVimeoId(y)),this.skin="legacy"==t(e).data("skin")?"legacy":"2020",void 0!==t(e).data("width")?this.playerWidth=parseInt(t(e).data("width")):t(e)[0].getAttribute("width")?this.playerWidth=parseInt(t(e)[0].getAttribute("width")):this.playerWidth=null,this.iconType="font",this.forceIconType=!1,void 0!==t(e).data("icon-type")&&""!==t(e).data("icon-type")){var b=t(e).data("icon-type");"font"!==b&&"image"!==b&&"svg"!==b||(this.iconType=b,this.forceIconType=!0)}var P=t(e).data("allow-fullscreen");if(this.allowFullscreen=void 0===P||!1!==P,this.clickedFullscreenButton=!1,this.restoringAfterFullscreen=!1,this.defaultSeekInterval=10,this.useFixedSeekInterval=!1,void 0!==t(e).data("seek-interval")&&""!==t(e).data("seek-interval")){var T=t(e).data("seek-interval");/^[1-9][0-9]*$/.test(T)&&(this.seekInterval=T,this.useFixedSeekInterval=!0)}var k=t(e).data("show-now-playing");this.showNowPlaying=void 0===k||!1!==k,void 0!==t(e).data("use-ttml")?(this.useTtml=!0,this.convert=require("xml-js")):this.useTtml=!1;var w=t(e).data("test-fallback");this.testFallback=void 0!==w&&!1!==w&&("2"==w?2:1);var C=t(e).data("lang");this.lang=void 0!==C&&""!==C?C.toLowerCase():null;var A=t(e).data("meta-type");void 0!==A&&""!==A&&(this.metaType=A);var D=t(e).data("meta-div");void 0!==D&&""!==D&&(this.metaDiv=D);var S=t(e).data("search-div");if(void 0!==S&&""!==S){this.searchDiv=S;var x=t(e).data("search");void 0!==x&&""!==x&&(this.searchString=x);var $=t(e).data("search-lang");this.searchLang=void 0!==$&&""!==$?$:null;var N=t(e).data("search-ignore-caps");this.searchIgnoreCaps=void 0!==N&&!1!==N}void 0!==t(e).data("hide-controls")&&!1!==t(e).data("hide-controls")?(this.hideControls=!0,this.hideControlsOriginal=!0):(this.hideControls=!1,this.hideControlsOriginal=!1),void 0!==t(e).data("steno-mode")&&!1!==t(e).data("steno-mode")?(this.stenoMode=!0,void 0!==t(e).data("steno-iframe-id")&&""!==t(e).data("steno-iframe-id")?(this.stenoFrameId=t(e).data("steno-iframe-id"),this.$stenoFrame=t("#"+this.stenoFrameId),this.$stenoFrame.length||(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoFrameId=null,this.$stenoFrame=null)):(this.stenoMode=!1,this.stenoFrameId=null,this.$stenoFrame=null),this.setDefaults(),this.ableIndex=AblePlayer.nextIndex,AblePlayer.nextIndex+=1,this.title=t(e).attr("title"),this.tt={},async function fetchTranslations(t){try{await t.getTranslationText(),t.setup()}catch{t.provideFallback()}}(i=this)}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().then(function(){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(e,i){return e.getRootNode?t(e.getRootNode().querySelector("#"+i)):t(document.getElementById(i))},AblePlayer.youTubeIframeAPIReady=!1,AblePlayer.loadingYouTubeIframeAPI=!1}(jQuery),function(t){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.buttonWithFocus=null,this.speechEnabled=null,this.setIconColor(),this.setButtonImages()},AblePlayer.prototype.getRootPath=function(){var t,e,i,a,s,n;for(t=document.getElementsByTagName("script"),e=0;e<t.length;e++)if(-1!==(i=t[e].src).substring(i.lastIndexOf("/")).indexOf("ableplayer")){a=i.split("?")[0];break}return n=(s=a.split("/").slice(0,-1).join("/")).lastIndexOf("/"),s.substring(0,n)+"/"},AblePlayer.prototype.setIconColor=function(){var e,i,a,s,n;for(e=["controller","toolbar"],i=0;i<e.length;i++)"controller"==e[i]?a=t("<div>",{class:"able-controller"}).hide():"toolbar"===e[i]&&(a=t("<div>",{class:"able-window-toolbar"}).hide()),t("body").append(a),n=.2126*(s=a.css("background-color").replace(/[^\d,]/g,"").split(","))[0]+.7152*s[1]+.0722*s[2]<125?"white":"black","controller"===e[i]?this.iconColor=n:"toolbar"===e[i]&&(this.toolbarIconColor=n),a.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.getIconData=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",e[2]="icon-play",e[3]=this.playButtonImg;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",e[2]="icon-pause",e[3]=this.pauseButtonImg;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",e[2]="icon-restart",e[3]=this.restartButtonImg;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",e[2]="icon-rewind",e[3]=this.rewindButtonImg;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",e[2]="icon-forward",e[3]=this.forwardButtonImg;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",e[2]="icon-previous",e[3]=this.previousButtonImg;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",e[2]="icon-next",e[3]=this.nextButtonImg;break;case"slower":e[0]="0 0 11 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",e[2]="icon-slower",e[3]=this.slowerButtonImg;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",e[2]="icon-faster",e[3]=this.fasterButtonImg;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",e[2]="icon-turtle",e[3]=this.slowerButtonImg;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",e[2]="icon-rabbit",e[3]=this.fasterButtonImg;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",e[2]="icon-ellipsis",e[3]=!1;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",e[2]="icon-pipe",e[3]=!1;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",e[2]="icon-captions",e[3]=this.captionsButtonImg;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",e[2]="icon-descriptions",e[3]=this.descriptionsButtonImg;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",e[2]="icon-sign",e[3]=this.signButtonImg;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",e[2]="icon-volume-mute",e[3]=this.imgPath+"volume-mute.png";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",e[2]="icon-volume-soft",e[3]=this.imgPath+"volume-soft.png";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",e[2]="icon-volume-medium",e[3]=this.imgPath+"volume-medium.png";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",e[2]="icon-volume-loud",e[3]=this.imgPath+"volume-loud.png";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",e[2]="icon-chapters",e[3]=this.chaptersButtonImg;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",e[2]="icon-transcript",e[3]=this.transcriptButtonImg;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",e[2]="icon-preferences",e[3]=this.prefsButtonImg;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",e[2]="icon-close",e[3]=null;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",e[2]="icon-fullscreen-expand",e[3]=this.fullscreenExpandButtonImg;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",e[2]="icon-fullscreen-collapse",e[3]=this.fullscreenCollapseButtonImg}return e},AblePlayer.prototype.reinitialize=function(){var e,i;if(i=(e=new this.defer).promise(),this.startedPlaying=!1,this.autoScrollTranscript=!0,this.$media=t(this.media).first(),this.media=this.$media[0],this.$media.is("audio"))this.mediaType="audio";else{if(!this.$media.is("video"))return this.provideFallback(),e.reject(),i;this.mediaType="video"}return this.$sources=this.$media.find("source"),this.player=this.getPlayer(),this.player||this.provideFallback(),this.setIconType(),e.resolve(),i},AblePlayer.prototype.setPlayerSize=function(t,e){"audio"!==this.mediaType&&t>0&&e>0&&(this.playerWidth=t,this.playerHeight=e,this.aspectRatio=e/t)},AblePlayer.prototype.setIconType=function(){if(this.forceIconType)return!1;this.iconType="svg"},AblePlayer.prototype.setupInstance=function(){var t=new this.defer,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 e=this;if(this.hasPlaylist=!1,t(".able-playlist").each(function(){if(t(this).data("player")===e.mediaId){e.hasPlaylist=!0,e.$playlist=t(this).find("li"),t(this).find("li[data-youtube-id]").each(function(){var i=DOMPurify.sanitize(t(this).attr("data-youtube-id")),a=e.getYouTubePosterUrl(i,"120"),s=t("<img>",{src:a,alt:""});t(this).find("button").prepend(s)}),t(this).find("li[data-vimeo-id]").each(function(){var i=t(this).attr("data-vimeo-id"),a=e.getVimeoPosterUrl(i,"120"),s=t("<img>",{src:a,alt:""});t(this).find("button").prepend(s)}),t(this).find("li span").attr("aria-hidden","true"),e.playlistIndex=0;var i=t(this).data("embedded");e.playlistEmbed=void 0!==i&&!1!==i}}),this.hasPlaylist&&this.loop&&this.media.removeAttribute("loop"),this.hasPlaylist&&this.playlistEmbed){var i=this.$playlist.parent();this.$playlistDom=i.clone(),i.remove()}this.hasPlaylist&&0===this.$sources.length&&(this.cuePlaylistItem(0),this.$sources=this.$media.find("source"))},AblePlayer.prototype.recreatePlayer=function(){var e,i,a,s,n;if(this.player)return i=(e=new this.defer).promise(),a=this,this.playerDeleted=!1,this.recreatingPlayer=!0,this.playerCreated||(this.loadCurrentPreferences(),this.injectPlayerCode(),this.resizePlayer(this.media.videoWidth,this.media.videoHeight)),this.getSampleDescriptionText(),this.initSignLanguage(),this.initPlayer().then(function(){a.getTracks().then(function(){a.initDescription().then(function(){a.setupTracks().then(function(){a.hasClosedDesc&&(!a.$descDiv||a.$descDiv&&!t.contains(a.$ableDiv[0],a.$descDiv[0]))&&a.injectTextDescriptionArea(),a.initSpeech("init"),a.setupTranscript().then(function(){a.initStenoFrame().then(function(){a.stenoMode&&a.$stenoFrame&&(a.stenoFrameContents=a.$stenoFrame.contents()),a.getMediaTimes().then(function(t){for(a.duration=t.duration,a.elapsed=t.elapsed,void 0===a.volume&&(a.volume=a.defaultVolume),a.volume&&a.setVolume(a.volume),a.transcriptType&&(a.addTranscriptAreaEvents(),a.updateTranscript()),a.captions.length&&a.initDefaultCaption(),a.setMediaAttributes(),a.addControls(),a.addEventListeners(),s=a.getPreferencesGroups(),n=0;n<s.length;n++)a.injectPrefsForm(s[n]);a.setupPopups(),a.updateCaption(),a.injectVTS(),a.populateChaptersDiv(),a.showSearchResults(),"html5"===a.player&&(a.loadingMedia||(a.$media[0].load(),a.loadingMedia=!0)),setTimeout(function(){a.refreshControls(),e.resolve()},100)})})})})})})},function(){a.provideFallback()}),i;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 this.defer,a=i.promise();return t.then(function(){e.useFixedSeekInterval?(e.seekInterval||(e.seekInterval=e.defaultSeekInterval),e.seekIntervalCalculated=!0):e.setSeekInterval(),i.resolve()}).finally(function(){i.reject()}),a},AblePlayer.prototype.initStenoFrame=function(){var t,e;return e=(t=new this.defer).promise(),this.stenoMode&&this.$stenoFrame?(this.$stenoFrame[0].contentWindow,"complete"==document.readyState?t.resolve():this.$stenoFrame.on("load",function(){t.resolve()})):t.resolve(),e},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:Math.round(t/10,0),this.seekIntervalCalculated=!0)},AblePlayer.prototype.initDefaultCaption=function(){var t,e;if((t=this.captions).length>0){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 this.defer,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.testFallback?null:this.youTubeId?"video"!==this.mediaType?null:"youtube":this.vimeoId?"video"!==this.mediaType?null:"vimeo":this.media.canPlayType?"html5":null}}(jQuery),function(t){AblePlayer.prototype.setPrefs=function(t){"undefined"!=typeof Cookies?Cookies.set("Able-Player",JSON.stringify(t),{expires:90,sameSite:"strict"}):localStorage.setItem("Able-Player",JSON.stringify(t))},AblePlayer.prototype.getPref=function(){var t,e={preferences:{},sign:{},transcript:{},voices:[]};try{t="undefined"!=typeof Cookies?JSON.parse(Cookies.get("Able-Player")):JSON.parse(localStorage.getItem("Able-Player"))}catch(i){this.setPrefs(e),t=e}return t||e},AblePlayer.prototype.updatePreferences=function(t){var e,i,a,s,n,r,o,l;if(e=this.getPref(),"transcript"===t||"sign"===t)"transcript"===t?(a=(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=a.top,e.transcript.left=a.left,e.transcript.width=i.width(),e.transcript.height=i.height()):"sign"===t&&(a=(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=a.top,e.sign.left=a.left,e.sign.width=i.width(),e.sign.height=i.height());else if("voice"===t){void 0===e.voices&&(e.voices=[]),o=!1;for(var h=0;h<e.voices.length;h++)e.voices[h].lang===this.prefDescVoiceLang&&(o=!0,e.voices[h].name=this.prefDescVoice);o||(l={name:this.prefDescVoice,lang:this.prefDescVoiceLang},e.voices.push(l))}else for(s=this.getAvailablePreferences(),n=0;n<s.length;n++)(r=s[n].name)==t&&(e.preferences[r]=this[r]);this.setPrefs(e)},AblePlayer.prototype.getPreferencesGroups=function(){return this.usingYouTubeCaptions?["captions","descriptions","keyboard"]:this.usingVimeoCaptions?["descriptions","keyboard"]:["captions","descriptions","keyboard","transcript"]},AblePlayer.prototype.getAvailablePreferences=function(){var t=[];return t.push({name:"prefAltKey",label:this.translate("prefAltKey","Alt"),group:"keyboard",default:1}),t.push({name:"prefCtrlKey",label:this.translate("prefCtrlKey","Control"),group:"keyboard",default:1}),t.push({name:"prefShiftKey",label:this.translate("prefShiftKey","Shift"),group:"keyboard",default:0}),t.push({name:"prefNoKeyShortcuts",label:this.translate("prefNoKeyShortcuts","Disable Keyboard Shortcuts"),group:"keyboard",default:0}),t.push({name:"prefTranscript",label:null,group:"transcript",default:0}),t.push({name:"prefHighlight",label:this.translate("prefHighlight","Highlight transcript as media plays"),group:"transcript",default:1}),t.push({name:"prefAutoScrollTranscript",label:null,group:"transcript",default:1}),t.push({name:"prefTabbable",label:this.translate("prefTabbable","Keyboard-enable transcript"),group:"transcript",default:0}),t.push({name:"prefCaptions",label:null,group:"captions",default:this.defaultStateCaptions}),this.usingYouTubeCaptions||("video"===this.mediaType&&t.push({name:"prefCaptionsPosition",label:this.translate("prefCaptionsPosition","Position"),group:"captions",default:this.defaultCaptionsPosition}),t.push({name:"prefCaptionsFont",label:this.translate("prefCaptionsFont","Font"),group:"captions",default:"sans-serif"})),t.push({name:"prefCaptionsSize",label:this.translate("prefCaptionsSize","Font size"),group:"captions",default:"100%"}),this.usingYouTubeCaptions||(t.push({name:"prefCaptionsColor",label:this.translate("prefCaptionsColor","Text Color"),group:"captions",default:"white"}),t.push({name:"prefCaptionsBGColor",label:this.translate("prefCaptionsBGColor","Background"),group:"captions",default:"black"}),t.push({name:"prefCaptionsOpacity",label:this.translate("prefCaptionsOpacity","Opacity"),group:"captions",default:"100%"})),"video"===this.mediaType&&(t.push({name:"prefDesc",label:null,group:"descriptions",default:this.defaultStateDescriptions}),t.push({name:"prefDescMethod",label:null,group:"descriptions",default:"video"}),t.push({name:"prefDescVoice",label:this.translate("prefDescVoice","Voice"),group:"descriptions",default:null}),t.push({name:"prefDescPitch",label:this.translate("prefDescPitch","Pitch"),group:"descriptions",default:1}),t.push({name:"prefDescRate",label:this.translate("prefDescRate","Rate"),group:"descriptions",default:1}),t.push({name:"prefDescVolume",label:this.translate("volume","Volume"),group:"descriptions",default:1}),"video"!==this.descMethod&&t.push({name:"prefDescPause",label:this.translate("prefDescPause","Automatically pause video when description starts"),group:"descriptions",default:this.defaultDescPause}),t.push({name:"prefDescVisible",label:this.translate("prefDescVisible","Make description visible"),group:"descriptions",default:0})),t.push({name:"prefSign",label:null,group:null,default:0}),t},AblePlayer.prototype.loadCurrentPreferences=function(){for(var t=this.getAvailablePreferences(),e=this.getPref(),i=0;i<t.length;i++){var a=t[i].name,s=t[i].default;void 0!==e.preferences[a]?this[a]=e.preferences[a]:(e.preferences[a]=s,this[a]=s)}void 0!==e.voices&&(this.prefVoices=e.voices),this.setPrefs(e)},AblePlayer.prototype.injectPrefsForm=function(e){var i,a,s,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,P,T,k,w,C,A,D,S,x,$,N,I,M,B,L,E,O,R,F,V,z,H,W;i=this,a=this.getAvailablePreferences();var _="able-prefs-form-"+e;if((s=t("<div>",{class:"able-prefs-form "})).addClass(_),"captions"==e)n=this.translate("prefTitleCaptions","Captions Preferences");else if("descriptions"==e){n=this.translate("prefTitleDescriptions","Audio Description Preferences");var j=t("<p>",{text:this.translate("prefIntroDescription1","This media player supports audio description in two ways: ")}),q=t("<ul>"),K=t("<li>",{text:this.translate("prefDescFormatOption1","alternative described version of video")}),Y=t("<li>",{text:this.translate("prefDescFormatOption2","text-based description, announced by screen reader")});q.append(K,Y),this.hasOpenDesc&&this.hasClosedDesc?(I=this.translate("prefIntroDescription2","The current video has ")+" ",I+="<strong>"+this.translate("prefDescFormatOption1b","an alternative described version")+"</strong>",I+=" <em>"+this.translate("and","and")+"</em> <strong>"+this.translate("prefDescFormatOption2b","text-based description, announced by screen reader")+"</strong>."):this.hasOpenDesc?(I=this.translate("prefIntroDescription2","The current video has "),I+=" <strong>"+this.translate("prefDescFormatOption1b","an alternative described version")+"</strong>."):this.hasClosedDesc?(I=this.translate("prefIntroDescription2","The current video has "),I+=" <strong>"+this.translate("prefDescFormatOption2b","text-based description, announced by screen reader")+"</strong>."):I=this.translate("prefIntroDescriptionNone","The current video has no audio description in either format."),o=t("<p>",{html:I}),l=this.translate("prefIntroDescription3","Use the following form to set your preferences related to text-based audio description."),(this.hasOpenDesc||this.hasClosedDesc)&&(l+=" "+this.translate("prefIntroDescription4","After you save your settings, audio description can be toggled on/off using the Description button.")),h=t("<p>",{text:l}),s.append(j,q,o,h)}else"keyboard"==e?(n=this.translate("prefTitleKeyboard","Keyboard Preferences"),r=this.translate("prefIntroKeyboard1","The media player on this web page can be operated from anywhere on the page using keyboard shortcuts (see below for a list)."),r+=" "+this.translate("prefIntroKeyboard2","Modifier keys (Shift, Alt, and Control) can be assigned below."),r+=" "+this.translate("prefIntroKeyboard3","NOTE: Some key combinations might conflict with keys used by your browser and/or other software applications. Try various combinations of modifier keys to find one that works for you."),j=t("<p>",{text:r}),s.append(j)):"transcript"==e&&(n=this.translate("prefTitleTranscript","Transcript Preferences"));for(u=t("<div>").attr("role","group"),d="able-prefs-"+e,m=(f=this.mediaId+"-prefs-"+e)+"-legend",u.addClass(d).attr("id",f),"keyboard"===e?((g=t("<h2>"+this.translate("prefHeadingKeyboard1","Modifier keys used for shortcuts")+"</h2>")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)):"descriptions"===e&&((g=t("<h2>"+this.translate("prefHeadingTextDescription","Text-based audio description")+"</h2>")).attr("id",m),u.attr("aria-labelledby",m),u.append(g)),p=0;p<a.length;p++)if(a[p].group==e&&a[p].label){if(b="able-"+(v=a[p].name),P=this.mediaId+"_"+v,y=t("<div>").addClass(b),"captions"===e){for(T=t('<label for="'+P+'"> '+a[p].label+"</label>"),k=t("<select>",{name:v,id:P}),"prefCaptions"!==v&&"prefCaptionsStyle"!==v&&k.on("change",function(){x=t(this).attr("name"),i.stylizeCaptions(i.$sampleCapsDiv,x)}),w=this.getCaptionsOptions(v),c=0;c<w.length;c++)"prefCaptionsPosition"===v?"overlay"===(A=w[c])?S=this.translate("captionsPositionOverlay","Overlay"):"below"===A&&(A=w[c],S=this.translate("captionsPositionBelow","Below video")):"prefCaptionsFont"===v||"prefCaptionsColor"===v||"prefCaptionsBGColor"===v?(A=w[c][0],S=w[c][1]):"prefCaptionsOpacity"===v?(A=w[c],S=w[c],S+="0%"===A?" ("+this.translate("transparent","transparent")+")":" ("+this.translate("solid","solid")+")"):(A=w[c],S=w[c]),C=t("<option>",{value:A,text:S}),this[v]===A&&C.prop("selected",!0),k.append(C);y.append(T,k)}else if("descriptions"===e){if(T=t('<label for="'+P+'"> '+a[p].label+"</label>"),"prefDescPause"===v||"prefDescVisible"===v)y.addClass("able-prefs-checkbox"),k=t("<input>",{type:"checkbox",name:v,id:P,value:"true"}),1===this[v]&&k.prop("checked",!0),y.append(k,T);else if(this.synth){if(y.addClass("able-prefs-select"),k=t("<select>",{name:v,id:P}),"prefDescVoice"===v&&this.descVoices.length){for(M=this.getPrefDescVoice(),c=0;c<this.descVoices.length;c++)A=this.descVoices[c].name,D=this.descVoices[c].lang.substring(0,2).toLowerCase(),S=A+" ("+this.descVoices[c].lang+")",C=t("<option>",{value:A,"data-lang":D,text:S}),M===A&&C.prop("selected",!0),k.append(C);this.$voiceSelectField=k}else if("prefDescPitch"==v?w=[0,.5,1,1.5,2]:"prefDescRate"==v?w=[.7,.8,.9,1,1.1,1.2,1.5,2,2.5,3]:"prefDescVolume"==v&&(w=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]),void 0!==w)for(c=0;c<w.length;c++)A=w[c],S=this.makePrefsValueReadable(v,A),C=t("<option>",{value:A,text:S}),this[v]==A&&C.prop("selected",!0),k.append(C),y.append(T,k);k.on("change",function(){i.announceDescriptionText("sample",i.currentSampleText)}),y.append(T,k)}}else T=t('<label for="'+P+'"> '+a[p].label+"</label>"),k=t("<input>",{type:"checkbox",name:v,id:P,value:"true"}),1===this[v]&&k.prop("checked",!0),"keyboard"===e&&k.on("change",function(){"prefAltKey"===(x=t(this).attr("name"))?($=".able-modkey-alt",N=i.tt.prefAltKey+" + "):"prefCtrlKey"===x?($=".able-modkey-ctrl",N=i.tt.prefCtrlKey+" + "):"prefShiftKey"===x&&($=".able-modkey-shift",N=i.tt.prefShiftKey+" + "),"prefNoKeyShortcuts"!==x?t(this).is(":checked")?t($).text(N):t($).text(""):t(this).is(":checked")?t(".able-modkey-item").addClass("hidden"):t(".able-modkey-item").removeClass("hidden")}),y.append(k,T);("prefDescVoice"!==v||this.descVoices.length)&&u.append(y)}if(s.append(u),"captions"===e)this.usingYouTubeCaptions||(this.$sampleCapsDiv=t("<div>",{class:"able-captions-sample"}).text(this.translate("sampleCaptionText","Sample caption text")),s.append(this.$sampleCapsDiv),this.stylizeCaptions(this.$sampleCapsDiv));else if("descriptions"===e)this.synth&&(this.$sampleDescDiv=t("<div>",{class:"able-desc-sample"}).text(this.translate("sampleDescriptionText","Adjust settings to hear this sample text.")),s.append(this.$sampleDescDiv),this.currentSampleText=this.translate("sampleDescriptionText","Adjust settings to hear this sample text."));else if("keyboard"===e){let e=1===this.prefNoKeyShortcuts?"able-modkey-item hidden":"able-modkey-item";for(B=t("<h2>",{text:this.translate("prefHeadingKeyboard2","Current keyboard shortcuts")}),L=t("<ul>"),E=[],O=[],p=0;p<this.controls.length;p++)"play"===this.controls[p]?(E.push(this.translate("play","Play")+"/"+this.translate("pause","Pause")),O.push("p</span> <em>"+this.translate("or","or")+'</em> <span class="able-help-modifiers"> '+this.translate("spacebar","spacebar"))):"restart"===this.controls[p]?(E.push(this.translate("restart","Restart")),O.push("s")):"previous"===this.controls[p]?(E.push(this.translate("prevTrack","Previous track")),O.push("b")):"next"===this.controls[p]?(E.push(this.translate("nextTrack","Next track")),O.push("n")):"rewind"===this.controls[p]?(E.push(this.translate("rewind","Rewind")),O.push("r")):"forward"===this.controls[p]?(E.push(this.translate("forward","Forward")),O.push("f")):"volume"===this.controls[p]?(E.push(this.translate("volume","Volume")),O.push("v</span> <em>"+this.translate("or","or")+'</em> <span class="able-modkey">1-9'),E.push(this.translate("mute","Mute")+"/"+this.translate("unmute","Unmute")),O.push("m")):"captions"===this.controls[p]?(this.captions.length>1?E.push(this.translate("captions","Captions")):this.captionsOn?E.push(this.translate("hideCaptions","Hide captions")):E.push(this.translate("showCaptions","Show captions")),O.push("c")):"descriptions"===this.controls[p]?(this.descOn?E.push(this.translate("turnOffDescriptions","Turn off descriptions")):E.push(this.translate("turnOnDescriptions","Turn on descriptions")),O.push("d")):"prefs"===this.controls[p]&&(E.push(this.translate("preferences","Preferences")),O.push("e"));for(p=0;p<O.length;p++)R='<span class="able-modkey-alt">',1===this.prefAltKey&&(R+=this.translate("prefAltKey","Alt")+" + "),R+="</span>",R+='<span class="able-modkey-ctrl">',1===this.prefCtrlKey&&(R+=this.translate("prefCtrlKey","Control")+" + "),R+="</span>",R+='<span class="able-modkey-shift">',1===this.prefShiftKey&&(R+=this.translate("prefShiftKey","Shift")+" + "),R+="</span>",R+='<span class="able-modkey">'+O[p]+"</span>",R+=" = "+E[p],F=t("<li>",{class:e,html:R}),L.append(F);R='<span class="able-modkey">'+this.translate("escapeKey","Escape")+"</span>",R+=" = "+this.translate("escapeKeyFunction","Close current dialog or popup menu"),F=t("<li>",{html:R}),L.append(F),s.append(B,L)}t("body").append(s),V=new AccessibleDialog(s,this.$prefsButton,n,i.tt.closeButtonLabel),W=t('<div class="able-prefs-buttons"></div>'),z=t('<button class="modal-button">'+this.translate("save","Save")+"</button>"),H=t('<button class="modal-button">'+this.translate("cancel","Cancel")+"</button>"),z.on("click",function(){V.hide(),i.savePrefsFromForm()}),H.on("click",function(){V.hide(),i.resetPrefsForm()}),W.append(z,H),s.append(W),"captions"!==e&&"transcript"!==e||u.attr("aria-labelledby",V.titleH1.attr("id")),"captions"===e?this.captionPrefsDialog=V:"descriptions"===e?this.descPrefsDialog=V:"keyboard"===e?this.keyboardPrefsDialog=V:"transcript"===e&&(this.transcriptPrefsDialog=V),t("div.able-prefs-form button.modalCloseButton").on("click",function(){i.resetPrefsForm()}),t("div.able-prefs-form").on("keydown",function(t){"Escape"===t.key&&i.resetPrefsForm()})},AblePlayer.prototype.getPrefDescVoice=function(){var t,e,i;if(t=this.selectedDescriptions?this.selectedDescriptions.language:this.captionLang?this.captionLang:this.lang,(e=this.getPref()).voices)for(i=0;i<e.voices.length;i++)if(e.voices[i].lang===t)return e.voices[i].name;return null},AblePlayer.prototype.rebuildDescPrefsForm=function(){var e,i,a,s;for(this.$voiceSelectField=t("#"+this.mediaId+"_prefDescVoice"),this.$voiceSelectField.empty(),e=0;e<this.descVoices.length;e++)a=(i=this.descVoices[e].name)+" ("+this.descVoices[e].lang+")",s=t("<option>",{value:i,"data-lang":this.descVoices[e].lang.substring(0,2).toLowerCase(),text:a}),this.prefDescVoice==i&&s.prop("selected",!0),this.$voiceSelectField.append(s)},AblePlayer.prototype.makePrefsValueReadable=function(t,e){if("prefDescPitch"===t){if(0===e)return this.translate("prefDescPitch1","Very low");if(.5===e)return this.translate("prefDescPitch2","Low");if(1===e)return this.translate("prefDescPitch3","Default");if(1.5===e)return this.translate("prefDescPitch4","High");if(2===e)return this.translate("prefDescPitch5","Very high")}else if("prefDescRate"===t){if(.7===e)return 1;if(.8===e)return 2;if(.9===e)return 3;if(1===e)return 4;if(1.1===e)return 5;if(1.2===e)return 6;if(1.5===e)return 7;if(2===e)return 8;if(2.5===e)return 9;if(3===e)return 10}else if("prefDescVolume"===t)return 10*e;return e},AblePlayer.prototype.resetPrefsForm=function(){var e,i,a,s;for(e=this.getPref(),i=this.getAvailablePreferences(),a=0;a<i.length;a++)-1!==(s=i[a].name).indexOf("Captions")&&"prefCaptions"!==s?t('select[name="'+s+'"]').val(e.preferences[s]):1===this[s]?t('input[name="'+s+'"]').prop("checked",!0):t('input[name="'+s+'"]').prop("checked",!1);this.stylizeCaptions(this.$sampleCapsDiv)},AblePlayer.prototype.savePrefsFromForm=function(){var e,i,a,s,n,r,o,l,h,p,c,u;o=0,h=0,p=!1,e=this.getPref(),i=this.getAvailablePreferences();for(var d=0;d<i.length;d++)if(i[d].label)if(a=i[d].name,s=this.mediaId+"_"+a,"prefDescVoice"===a){void 0===e.voices&&(e.voices=[]),n=this.mediaId+"_prefDescVoice",this.prefDescVoice=t("select#"+n).find(":selected").val(),this.prefDescVoiceLang=t("select#"+n).find(":selected").attr("data-lang"),l=!1;for(var f=0;f<e.voices.length;f++)e.voices[f].lang===this.prefDescVoiceLang&&(l=!0,e.voices[f].name=this.prefDescVoice);l||(r={name:this.prefDescVoice,lang:this.prefDescVoiceLang},e.voices.push(r)),o++}else"prefDescMethod"==a?(this.prefDescMethod="video",this.prefDescMethod!==e.preferences.prefDescMethod&&(e.preferences.prefDescMethod=this.prefDescMethod,o++)):-1!==a.indexOf("Captions")&&"prefCaptions"!==a?(u=t('select[id="'+s+'"]').val(),e.preferences[a]!==u&&(e.preferences[a]=u,this[a]=u,o++,h++),"prefCaptionsSize"===a&&(p=!0,c=u)):-1!==a.indexOf("Desc")&&"prefDescPause"!==a&&"prefDescVisible"!==a?(u=t('select[id="'+s+'"]').val(),e.preferences[a]!==u&&(e.preferences[a]=u,this[a]=u,o++)):t('input[id="'+s+'"]').is(":checked")?(e.preferences[a]=1,1===this[a]||(this[a]=1,o++)):(e.preferences[a]=0,1===this[a]&&(this[a]=0,o++));if(o>0?(this.setPrefs(e),this.showAlert(this.translate("prefSuccess","Your changes have been saved."))):this.showAlert(this.translate("prefNoChange","You didn't make any changes")),"youtube"===this.player&&void 0!==this.usingYouTubeCaptions&&this.usingYouTubeCaptions&&p&&this.youTubePlayer.setOption("captions","fontSize",this.translatePrefs("size",c,"youtube")),AblePlayerInstances.length>1)for(d=0;d<AblePlayerInstances.length;d++)AblePlayerInstances[d].updatePlayerPrefs(),AblePlayerInstances[d].loadCurrentPreferences(),AblePlayerInstances[d].resetPrefsForm(),h>0&&(AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$captionsDiv),void 0!==AblePlayerInstances[d].$descDiv&&AblePlayerInstances[d].stylizeCaptions(AblePlayerInstances[d].$descDiv));else this.updatePlayerPrefs(),h>0&&(this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv))},AblePlayer.prototype.updatePlayerPrefs=function(){this.$transcriptDiv&&(1===this.prefTabbable?this.$transcriptDiv.find("span.able-transcript-seekpoint").attr("tabindex","0"):this.$transcriptDiv.find("span.able-transcript-seekpoint").removeAttr("tabindex"),0===this.prefHighlight&&this.$transcriptDiv.find("span").removeClass("able-highlight")),this.updateCaption(),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(t){function actList(t,e){for(var i=[],a=0;a<e.length;a++)i.push(act(t,e[a]));return i}function act(t,e){var i=e(t);if(null!==t.error)throw t.error;return i}function updatePosition(t,e){for(var i=0;i<e.length;i++)"\n"===e[i]?(t.column=1,t.line+=1):t.column+=1}function cut(t,e){var i=t.text.substring(0,e);return updatePosition(t,i),t.text=t.text.substring(e),i}function cutLine(t,e){var i,a=t.text.indexOf("\n");return-1===a?(updatePosition(t,i=t.text),t.text=""):(i=t.text.substring(0,a),updatePosition(t,i+"\n"),t.text=t.text.substring(a+1)),i}function peekLine(t){var e=t.text.indexOf("\n");return-1===e?t.text:t.text.substring(0,e)}function parseFileBody(t){actList(t,[eatOptionalBOM,eatSignature]);var e=t.text[0];" "===e||"\t"===e||"\n"===e?actList(t,[eatUntilEOLInclusive,parseMetadataHeaders,eatAtLeast1EmptyLines,parseCuesAndComments]):t.error="WEBVTT signature not followed by whitespace."}function parseMetadataHeaders(t){for(;;){var e=peekLine(t);if(-1!==e.indexOf("--\x3e"))return;if(0===e.length)return;var i=act(t,getMetadataKeyValue);t.metadata[i[0]]=i[1],act(t,eatUntilEOLInclusive)}}function nextSpaceOrNewline(t){var e=[],i=t.indexOf(" ");i>=0&&e.push(i);var a=t.indexOf("\t");a>=0&&e.push(a);var s=t.indexOf("\n");return s>=0&&e.push(s),Math.min.apply(null,e)}function getMetadataKeyValue(t){var e=t.text.indexOf("\n"),i=cut(t,e),a=i.indexOf(":");return-1===a?void(t.error="Missing colon."):[i.substring(0,a),i.substring(a+1)]}function getSettingsKeyValue(t){var e=cut(t,nextSpaceOrNewline(t.text)),i=e.indexOf(":");return-1===i?void(t.error="Missing colon."):[e.substring(0,i),e.substring(i+1)]}function parseCuesAndComments(t){for(;;){var e=peekLine(t);if(0!==e.indexOf("NOTE")||4!==e.length&&" "!==e[4]&&"\t"!==e[4])if(0===e.trim().length&&t.text.length>0)act(t,eatEmptyLines);else{if(!(e.trim().length>0))return;act(t,parseCue)}else actList(t,[eatComment,eatEmptyLines])}}function parseCue(t){var e,i=peekLine(t);if(-1===i.indexOf("--\x3e")&&(e=cutLine(t),-1===(i=peekLine(t)).indexOf("--\x3e")))return"Invalid WebVTT file: "+t.src+"\n","Line: "+t.line+", ","Column: "+t.column+"\n",void(console.warn||console.log);var a=actList(t,[getTiming,eatAtLeast1SpacesOrTabs,eatArrow,eatAtLeast1SpacesOrTabs,getTiming]),s=a[0],n=a[4];if(s>=n)t.error="Start time is not sooner than end time.";else{act(t,eatSpacesOrTabs);var r=act(t,getCueSettings);cut(t,1);var o=act(t,getCuePayload);void 0===e&&(e=t.cues.length+1),t.cues.push({id:e,start:s,end:n,settings:r,components:o})}}function getCueSettings(t){for(var e={};t.text.length>0&&"\n"!==t.text[0];){var i=act(t,getSettingsKeyValue);e[i[0]]=i[1],act(t,eatSpacesOrTabs)}return e}function getCuePayload(e){for(var i={type:"internal",tagName:"",value:"",classes:[],annotation:"",parent:null,children:[],language:""},a=i,s=[];e.text.length>0;){var n=peekLine(e);if(-1!==n.indexOf("--\x3e")||/^\s+$/.test(n))break;if(e.text.length>=2&&"\n"===e.text[0]&&"\n"===e.text[1]){cut(e,2);break}var r=getCueToken(e);if("string"===r.type)a.children.push(r);else if("startTag"===r.type)r.type=r.tagName,r.parent=a,-1!==t.inArray(r.tagName,["i","b","u","ruby"])||"rt"===r.tagName&&"ruby"===a.tagName?(s.length>0&&(a.language=s[s.length-1]),a.children.push(r),a=r):"c"===r.tagName||"v"===r.tagName?(r.value=r.annotation,s.length>0&&(a.language=s[s.length-1]),a.children.push(r),a=r):"lang"===r.tagName&&(s.push(r.annotation),s.length>0&&(a.language=s[s.length-1]),a.children.push(r),a=r);else if("endTag"===r.type)r.tagName===a.type&&-1!==t.inArray(r.tagName,["c","i","b","u","ruby","rt","v"])?a=a.parent:"lang"===r.tagName&&"lang"===a.type?(a=a.parent,s.pop()):"ruby"===r.tagName&&"rt"===a.type&&(a=a.parent.parent);else if("timestampTag"===r.type){var o={text:r.value,error:null,metadata:{},cues:[],line:1,column:1};try{var l=act(o,getTiming);0===o.text.length&&(r.value=l,a.push(r))}catch(t){}}}return i}function getCueToken(t){for(var e="data",i=[],a="",s={type:"",tagName:"",value:"",classes:[],annotation:"",children:[]};;){var n;if(n=t.text.length>=2&&"\n"===t.text[0]&&"\n"===t.text[1]?"":t.text.length>0?t.text[0]:"","data"===e)if("&"===n)a="&",e="escape";else if("<"===n){if(0!==i.length)return s.type="string",s.value=i.join(""),s;e="tag"}else{if(""===n)return{type:"string",value:i.join("")};i.push(n)}else if("escape"===e)if("&"===n)i.push(a),a="&";else if(n.match(/[0-9a-z]/))a+=n;else if(";"===n)"&"===a?i.push("&"):"<"===a?i.push("<"):">"===a?i.push(">"):"&lrm"===a?i.push(""):"&rlm"===a?i.push(""):" "===a?i.push(" "):(i.push(a),i.push(";")),e="data";else{if("<"===n||""===n)return i.push(a),s.type="string",s.value=i.join(""),s;if("\t"===n||"\n"===n||"\f"===n||" "===n)return i.push(a),s.type="string",s.value=i.join(""),s;i.push(a),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){cut(t,1);break}if(""===n)return s.tagName="",s.type="startTag",s;i.push(n),e="startTag"}else if("startTag"===e)if("\t"===n||"\f"===n||" "===n)e="startTagAnnotation";else if("\n"===n)a=n,e="startTagAnnotation";else if("."===n)e="startTagClass";else{if(">"===n)return cut(t,1),s.tagName=i.join(""),s.type="startTag",s;if(""===n)return s.tagName=i.join(""),s.type="startTag",s;i.push(n)}else if("startTagClass"===e)if("\t"===n||"\f"===n||" "===n)s.classes.push(a),a="",e="startTagAnnotation";else if("\n"===n)s.classes.push(a),a=n,e="startTagAnnotation";else if("."===n)s.classes.push(a),a="";else{if(">"===n)return cut(t,1),s.classes.push(a),s.type="startTag",s.tagName=i.join(""),s;if(""===n)return s.classes.push(a),s.type="startTag",s.tagName=i.join(""),s;a+="c"}else if("startTagAnnotation"===e){if(">"===n)return cut(t,1),a=a.trim().replace(/ +/," "),s.type="startTag",s.tagName=i.join(""),s.annotation=a,s;if(""===n)return a=a.trim().replace(/ +/," "),s.type="startTag",s.tagName=i.join(""),s.annotation=a,s;a+=n}else if("endTag"===e){if(">"===n)return cut(t,1),s.type="endTag",s.tagName=i.join(""),s;if(""===n)return s.type="endTag",s.tagName=i.join(""),s;i.push(n)}else{if("timestampTag"!==e)throw"Unknown tokenState "+e;if(">"===n)return cut(t,1),s.type="timestampTag",s.name=i.join(""),s;if(""===n)return s.type="timestampTag",s.name=i.join(""),s;i.push(n)}cut(t,1)}}function eatComment(t){if(-1===cutLine(t).indexOf("--\x3e"))for(;;){var e=peekLine(t);if(0===e.trim().length)return;if(-1!==e.indexOf("--\x3e"))return void(t.error="Invalid syntax: --\x3e in comment.");cutLine(t)}else t.error="Invalid syntax: --\x3e in NOTE line."}function eatOptionalBOM(t){"\ufeff"===t.text[0]&&cut(t,1)}function eatSignature(t){"WEBVTT"===t.text.substring(0,6)?cut(t,6):t.error="Invalid signature."}function eatArrow(t){t.text.length<3||"--\x3e"!==t.text.substring(0,3)?t.error="Missing --\x3e":cut(t,3)}function eatSpacesOrTabs(t){for(;"\t"===t.text[0]||" "===t.text[0];)cut(t,1)}function eatAtLeast1SpacesOrTabs(t){for(var e=0;"\t"===t.text[0]||" "===t.text[0];)cut(t,1),e+=1;0===e&&(t.error="Missing space.")}function eatUntilEOLInclusive(t){var e=t.text.indexOf("\n");-1===e?t.error="Missing EOL.":cut(t,e+1)}function eatEmptyLines(t){for(;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t)}}function eatAtLeast1EmptyLines(t){for(var e=0;t.text.length>0;){if(0!==peekLine(t).trim().length)break;cutLine(t),e+=1}0===e&&(t.error="Missing empty line.")}function getTiming(t){var e=nextSpaceOrNewline(t.text);if(-1!==e){var i=cut(t,e),a=/((\d+):)?((\d\d):)(\d\d).(\d\d\d)|(\d+).(\d\d\d)/.exec(i);if(a){var s=0,n=a[2],r=a[4];if(r){if(parseInt(r,10)>59)return void(t.error="Invalid minute range");n&&(s+=3600*parseInt(n,10)),s+=60*parseInt(r,10);var o=a[5];if(parseInt(o,10)>59)return void(t.error="Invalid second range");s+=parseInt(o,10),s+=parseInt(a[6],10)/1e3}else s+=parseInt(a[7],10),s+=parseInt(a[8],10)/1e3;return s}t.error="Unable to parse timestamp"}else t.error("Missing timing.")}AblePlayer.prototype.parseWebVTT=function(t){let e=t.src,i=t.text;i=i.replace(/(\r\n|\n|\r)/g,"\n");var a={src:e,text:i,error:null,metadata:{},cues:[],line:1,column:1};try{act(a,parseFileBody)}catch(t){console.warn||console.log}return a}}(jQuery),function(t){AblePlayer.prototype.injectPlayerCode=function(){var e;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),"video"===this.mediaType&&("image"==this.iconType||"youtube"===this.player&&!this.hasPoster||this.injectBigPlayButton()),e=t("<div>"),"video"===this.mediaType?e.addClass("able-vidcap-container"):"audio"===this.mediaType&&(e.addClass("able-audcap-container"),e.addClass("captions-off")),this.injectPlayerControlArea(),this.$captionsContainer=this.$mediaContainer.wrap(e).parent(),this.injectAlert(this.$ableDiv),this.injectPlaylist(),this.injectAudioPoster(),this.injectOffscreenHeading()},AblePlayer.prototype.injectAudioPoster=function(){if("audio"===this.mediaType&&this.hasPoster){audioPoster=DOMPurify.sanitize(this.audioPoster),audioPosterAlt=DOMPurify.sanitize(this.audioPosterAlt);let t=document.createElement("img");t.setAttribute("src",audioPoster),t.setAttribute("alt",audioPosterAlt),this.$audioWrapper=this.$playerDiv.wrap('<div class="able-audio-wrapper">').parent(),this.$audioWrapper.prepend(t)}},AblePlayer.prototype.injectOffscreenHeading=function(){var e;"0"==this.playerHeadingLevel||(void 0===this.playerHeadingLevel&&(this.playerHeadingLevel=this.getNextHeadingLevel(this.$ableDiv)),e="h"+this.playerHeadingLevel.toString(),this.$headingDiv=t("<"+e+">"),this.$ableDiv.prepend(this.$headingDiv),this.$headingDiv.addClass("able-offscreen"),this.$headingDiv.text(this.translate("playerHeading","Media player")))},AblePlayer.prototype.injectBigPlayButton=function(){var e=this;this.$bigPlayButton=t("<button>",{class:"able-big-play-button","aria-hidden":!1,"aria-label":this.translate("play","Play"),type:"button",tabindex:0}),this.getIcon(this.$bigPlayButton,"play"),this.$bigPlayButton.on("click",function(){e.handlePlay()}),this.$mediaContainer.append(this.$bigPlayButton)},AblePlayer.prototype.injectPlayerControlArea=function(){this.$playerDiv=t("<div>",{class:"able-player",role:"region","aria-label":"audio"===this.mediaType?this.translate("audioPlayer","audio player"):this.translate("videoPlayer","video player")}),this.$playerDiv.addClass("able-"+this.mediaType),this.hasPlaylist&&this.showNowPlaying&&(this.$nowPlayingDiv=t("<div>",{class:"able-now-playing","aria-live":"assertive","aria-atomic":"true"})),this.$controllerDiv=t("<div>",{class:"able-controller"}),this.$controllerDiv.addClass("able-"+this.iconColor+"-controls"),this.$statusBarDiv=t("<div>",{class:"able-status-bar"}),this.$timer=t("<span>",{class:"able-timer"}),this.$elapsedTimeContainer=t("<span>",{class:"able-elapsedTime",text:"0:00"}),this.$durationContainer=t("<span>",{class:"able-duration"}),this.$timer.append(this.$elapsedTimeContainer).append(this.$durationContainer),this.$speed=t("<span>",{class:"able-speed","aria-live":"assertive","aria-atomic":"true"}).text(this.translate("speed","Speed")+": 1x"),this.$status=t("<span>",{class:"able-status","aria-live":"polite"}),this.$statusBarDiv.append(this.$timer,this.$speed,this.$status),this.showNowPlaying?this.$playerDiv.append(this.$nowPlayingDiv,this.$controllerDiv,this.$statusBarDiv):this.$playerDiv.append(this.$controllerDiv,this.$statusBarDiv),"video"===this.mediaType?this.$ableDiv.append(this.$playerDiv):this.$ableDiv.prepend(this.$playerDiv)},AblePlayer.prototype.injectTextDescriptionArea=function(){this.$descDiv=t("<div>",{class:"able-descriptions"}),this.$descDiv.attr({"aria-live":"assertive","aria-atomic":"true"}),this.$descDiv.hide(),this.$ableDiv.append(this.$descDiv)},AblePlayer.prototype.getDefaultWidth=function(t){let e=window.innerWidth;return"transcript"===t?e<=450?e:450:"sign"===t?e<=400?e:400:void 0},AblePlayer.prototype.rePositionDraggableWindow=function(t){let e,i;e=this.getPref(),i="transcript"===t?this.$transcriptArea:this.$signWindow,"transcript"===t&&i?(void 0!==e.transcript&&(this.prevTranscriptPosition=e.transcript),i.css({top:0,left:0})):"sign"===t&&i&&(void 0!==e.sign&&(this.prevSignPosition=e.sign),i.css({top:0,right:0,left:"auto"}))},AblePlayer.prototype.positionDraggableWindow=function(e,i){var a,s,n,r,o,l;a=this.getPref(),(n="transcript"===e?this.$transcriptArea:this.$signWindow)&&("transcript"===e?(void 0!==a.transcript&&(s=a.transcript),this.prevTranscriptPosition&&(s=this.prevTranscriptPosition,this.prevTranscriptPosition=!1)):"sign"===e&&(void 0!==a.sign&&(s=a.sign),this.prevSignPosition&&(s=this.prevSignPosition,this.prevSignPosition=!1)),void 0===s||t.isEmptyObject(s)?(r=this.getOptimumPosition(e,i),void 0===i&&(i=this.getDefaultWidth(e)),n.css({position:r[0],width:i,"z-index":r[3]}),"absolute"===r[0]&&n.css({top:r[1]+"px",left:r[2]+"px"})):(n.css({position:s.position,width:s.width,"z-index":s.zindex}),"absolute"===s.position&&(n.css({top:s.top,left:s.left}),topPosition=n.offset().top,leftPosition=n.offset().left,o=window.innerWidth,l=n.width(),topPosition<0&&n.css({top:s.top-topPosition}),leftPosition<0&&!this.restoringAfterFullscreen&&n.css({left:s.left-leftPosition}),o-leftPosition<30&&n.css({left:o-l})),this.updateZIndex(e)))},AblePlayer.prototype.getOptimumPosition=function(e,i){var a,s,n,r,o;return void 0===i&&(i=this.getDefaultWidth(e)),a=[],s=this.$ableDiv.width(),n=this.$ableDiv.offset().left,r=t(window).width(),o=0,"transcript"===e?void 0!==this.$signWindow&&this.$signWindow.is(":visible")&&(o=this.$signWindow.width()+5):"sign"===e&&void 0!==this.$transcriptArea&&this.$transcriptArea.is(":visible")&&(o=this.$transcriptArea.width()+5),i<r-(n+s+5+o)?(a[0]="absolute",a[1]=0,a[2]=s+o+5):i+5<n?(a[0]="absolute",a[1]=0,a[2]=n-i-5):a[0]="relative",a},AblePlayer.prototype.injectAlert=function(e){this.$alertBox=t('<div role="alert"></div>'),this.$alertBox.addClass("able-alert"),this.$alertBox.hide(),t("<span></span>").appendTo(this.$alertBox);var i=t('<button type="button"></button>');i.attr("aria-label",this.translate("dismissButton","Dismiss")),i.text("×"),i.appendTo(this.$alertBox),i.on("click",function(e){t(this).parent("div").hide()}),this.$alertBox.appendTo(e),this.$srAlertBox||(this.$srAlertBox=t('<div role="alert"></div>'),this.$srAlertBox.addClass("able-screenreader-alert"),this.$srAlertBox.appendTo(e))},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,i){var a,s,n,r,o,l,h,p,c,u,d,f,g,m;if(a=this,s=t("<ul>",{id:this.mediaId+"-"+e+"-menu",class:"able-popup",role:"menu"}).hide(),"captions"===e&&s.addClass("able-popup-captions"),"prefs"===e)if(this.prefCats.length>1){for(n=0;n<this.prefCats.length;n++)o=this.prefCats[n],g=!!(a.hasDescTracks||a.hasOpenDesc||a.hasClosedDesc),m=null!==a.transcriptType,"descriptions"===o&&!g||"transcript"===o&&!m||(r=t("<li></li>",{role:"menuitem",tabindex:"-1"}),"captions"===o?r.text(this.translate("prefMenuCaptions","Captions")):"descriptions"===o?r.text(this.translate("prefMenuDescriptions","Descriptions")):"keyboard"===o?r.text(this.translate("prefMenuKeyboard","Keyboard")):"transcript"===o&&r.text(this.translate("prefMenuTranscript","Transcript")),r.on("click",function(){l=t(this).text(),a.showingPrefsDialog=!0,a.setFullscreen(!1),l===a.tt.prefMenuCaptions?a.captionPrefsDialog.show():l===a.tt.prefMenuDescriptions?a.descPrefsDialog.show():l===a.tt.prefMenuKeyboard?a.keyboardPrefsDialog.show():l===a.tt.prefMenuTranscript&&a.transcriptPrefsDialog.show(),a.closePopups(),a.showingPrefsDialog=!1}),s.append(r));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(h=!1,n=0;n<i.length;n++)p=i[n],("captions"!==e||"html5"!==this.player||void 0!==p.cues)&&(r=t("<li></li>",{role:"menuitemradio",tabindex:"-1",lang:p.language}),p.def&&1==this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),"captions"==e?(r.text(p.label),r.on("click",this.getCaptionClickFunction(p))):"chapters"==e&&(r.text(this.flattenCueForCaption(p)+" - "+this.formatSecondsAsColonTime(p.start)),r.on("click",this.getChapterClickFunction(p.start))),s.append(r));"captions"===e&&(r=t("<li></li>",{role:"menuitemradio",tabindex:"-1"}).text(this.translate("captionsOff","Captions off")),0===this.prefCaptions?(r.attr("aria-checked","true"),h=!0):r.attr("aria-checked","false"),r.on("click",this.getCaptionOffFunction()),s.append(r))}else if("transcript-window"===e||"sign-window"===e)for((c=[]).push({name:"move",label:this.translate("windowMove","Move")}),c.push({name:"resize",label:this.translate("windowResize","Resize")}),c.push({name:"close",label:this.translate("windowClose","Close")}),n=0;n<c.length;n++)(r=t("<li></li>",{role:"menuitem",tabindex:"-1","data-choice":c[n].name})).text(c[n].label),r.on("click",function(i){if(i.stopPropagation(),void 0!==i.button&&0!==i.button)return!1;a.windowMenuClickRegistered||a.finishingDrag||(a.windowMenuClickRegistered=!0,a.handleMenuChoice(e.substring(0,e.indexOf("-")),t(this).attr("data-choice"),i))}),s.append(r);return"captions"!==e||h?"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(e){(u=t(this).find("li:focus")).is(":first-child")?(d=t(this).find("li").last(),f=u.next()):u.is(":last-child")?(d=u.prev(),f=t(this).find("li").first()):(d=u.prev(),f=u.next()),"Tab"===e.key?e.shiftKey?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):"ArrowDown"===e.key||"ArrowRight"===e.key?(u.removeClass("able-focus"),f.trigger("focus").addClass("able-focus")):"ArrowUp"==e.key||"ArrowLeft"===e.key?(u.removeClass("able-focus"),d.trigger("focus").addClass("able-focus")):" "===e.key||"Enter"===e.key?u.trigger("click"):"Escape"===e.key&&(u.removeClass("able-focus"),a.closePopups(),e.stopPropagation),e.preventDefault()}),this.$controllerDiv.append(s),s},AblePlayer.prototype.closePopups=function(){var t=this;this.chaptersPopup&&this.chaptersPopup.is(":visible")&&(this.chaptersPopup.hide(),this.$chaptersButton.attr("aria-expanded","false").trigger("focus")),this.captionsPopup&&this.captionsPopup.is(":visible")&&(this.captionsPopup.hide(),this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)),this.prefsPopup&&this.prefsPopup.is(":visible")&&!this.hidingPopup&&(this.hidingPopup=!0,this.prefsPopup.hide(),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$prefsButton.attr("aria-expanded","false"),this.showingPrefsDialog||this.waitThenFocus(t.$prefsButton),setTimeout(function(){t.hidingPopup=!1},100)),this.$volumeSlider&&this.$volumeSlider.is(":visible")&&(this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").trigger("focus")),this.$transcriptPopup&&this.$transcriptPopup.is(":visible")&&(this.hidingPopup=!0,this.$transcriptPopup.hide(),this.$transcriptPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$transcriptPopupButton.attr("aria-expanded","false").trigger("focus"),setTimeout(function(){t.hidingPopup=!1},100)),this.$signPopup&&this.$signPopup.is(":visible")&&(this.$signPopup.hide(),this.$signPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.$signPopupButton.attr("aria-expanded","false").trigger("focus"))},AblePlayer.prototype.setupPopups=function(t){var e,i;if(e=[],void 0===t&&e.push("prefs"),"captions"!==t&&void 0!==t||this.captions.length>0&&e.push("captions"),"chapters"!==t&&void 0!==t||this.chapters.length>0&&this.useChaptersButton&&e.push("chapters"),"transcript-window"===t&&"popup"===this.transcriptType&&e.push("transcript-window"),"sign-window"===t&&this.hasSignLanguage&&e.push("sign-window"),e.length>0){0;for(var a=0;a<e.length;a++){var s=e[a];if("prefs"==s)this.prefsPopup=this.createPopup("prefs");else if("captions"==s)void 0!==this.captionsPopup&&this.captionsPopup||(this.captionsPopup=this.createPopup("captions",this.captions));else if("chapters"==s)i=this.selectedChapters?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[],void 0!==this.chaptersPopup&&this.chaptersPopup||(this.chaptersPopup=this.createPopup("chapters",i));else{if("transcript-window"==s)return this.createPopup("transcript-window");if("sign-window"==s)return this.createPopup("sign-window")}}}},AblePlayer.prototype.provideFallback=function(){var e,i;if(!this.usingFallback){if(this.usingFallback=!0,this.testFallback||(this.testFallback=1),void 0===this.$media&&(this.$media=t(this.media)),this.$media.attr("id")?this.mediaId=this.$media.attr("id"):this.mediaId="media"+Math.floor(1e9*Math.random()).toString(),this.hasFallback=!1,this.$media.children().length)for(e=0;e<this.$media.children().length&&!this.hasFallback;)"SOURCE"!==this.$media.children()[e].tagName&&"TRACK"!==this.$media.children()[e].tagName&&(this.hasFallback=!0),e++;if(this.hasFallback||(i=t("<p>").text("Media player unavailable."),this.$media.append(i)),this.$media.attr("width")&&this.$media.css("width",this.$media.attr("width")+"px"),this.$media.attr("height")&&this.$media.css("height",this.$media.attr("height")+"px"),this.$media.removeAttr("data-able-player"),this.$media.prop("controls",!0),2==this.testFallback){if(t(this.$media).replaceWith(t('<foobar id="foobar-'+this.mediaId+'">')),this.$newFallbackElement=t("#foobar-"+this.mediaId),this.$media.children().length)for(e=this.$media.children().length-1;e>=0;)this.$newFallbackElement.prepend(t(this.$media.children()[e])),e--;this.hasFallback||this.$newFallbackElement.append(i)}}},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&&(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,i=0,this.hasCaptions&&(i++,"legacy"===this.skin?t[2].push("captions"):t[1].push("captions")),this.hasSignLanguage&&(i++,"legacy"===this.skin?t[2].push("sign"):t[1].push("sign")),"video"===this.mediaType&&(this.hasOpenDesc||this.hasClosedDesc)&&(i++,"legacy"===this.skin?t[2].push("descriptions"):t[1].push("descriptions")),null===this.transcriptType||this.hideTranscriptButton||(i++,"legacy"===this.skin?t[2].push("transcript"):t[1].push("transcript")),this.hasChapters&&this.useChaptersButton&&(i++,"legacy"===this.skin?t[2].push("chapters"):t[1].push("chapters")),"2020"==this.skin&&i>0&&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"):t[1].push("preferences"),"video"===this.mediaType&&this.allowFullscreen&&this.nativeFullscreenSupported()&&("legacy"===this.skin?t[3].push("fullscreen"):t[1].push("fullscreen")),this.browserSupportsVolume()?(this.volumeButton="volume-"+this.getVolumeName(this.volume),this.skin,t[1].push("volume")):this.volume=!1,t},AblePlayer.prototype.addControls=function(){var e,i,a,s,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,P,T,k,w,C,A,D,S,x;e=this,a=(i=this.calculateControlLayout()).length,P=this.mediaId+"-tooltip",this.$tooltipDiv=t("<div>",{id:P,class:"able-tooltip"}).hide(),this.$controllerDiv.append(this.$tooltipDiv),"2020"==this.skin&&(l=t('<div class="able-seekbar"></div>'),h=this.mediaType+" "+this.translate("seekbarLabel","timeline"),this.$controllerDiv.append(l),this.seekBar=new AccessibleSlider(l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible"));let $=t('<div class="able-control-row"></div>');for(this.$controllerDiv.append($),s=0;s<a;s++){for(r=i[s],o=t("<div>",s%2==0?{class:"able-left-controls"}:{class:"able-right-controls"}),$.append(o),n=0;n<r.length;n++){if("seek"===(c=r[n]))l=t('<div class="able-seekbar"></div>'),h=this.mediaType+" "+this.translate("seekbarLabel","timeline"),o.append(l),void 0!==this.duration&&0!==this.duration||(this.duration=60,this.elapsed=0),this.seekBar=new AccessibleSlider(l,"horizontal",100,0,this.duration,this.seekInterval,h,"seekbar",!0,"visible");else if("pipe"===c)(p=t("<span>",{tabindex:"-1","aria-hidden":"true",class:"able-pipe"})).append("|"),o.append(p);else{u=this.getButtonTitle(c),d=t("<div>",{role:"button",tabindex:"0",class:"able-button-handler-"+c}),"volume"!==c&&"preferences"!==c&&"captions"!==c||("preferences"==c?(this.prefCats=this.getPreferencesGroups(),this.prefCats.length>1?(x=this.mediaId+"-prefs-menu",d.attr({"aria-controls":x,"aria-haspopup":"menu","aria-expanded":"false"})):1===this.prefCats.length&&d.attr({"aria-haspopup":"dialog"})):"volume"===c?(x=this.mediaId+"-volume-slider",d.attr({"aria-controls":x,"aria-expanded":"false"})):"captions"===c&&this.captions&&(this.captions.length>1?d.attr("aria-expanded","false"):d.attr("aria-pressed","false")));var N=c;"faster"===c&&"animals"===this.speedIcons&&(N="rabbit"),"slower"===c&&"animals"===this.speedIcons&&(N="turtle"),"volume"===c?this.getIcon(d,this.volumeButton):("fullscreen"===N&&(N=this.fullscreen?"fullscreen-collapse":"fullscreen-expand"),this.getIcon(d,N)),this.setText(d,u),d.on("mouseenter focus",function(i){clearTimeout(D),f=t(this).attr("aria-label"),g=t(this).position(),m=t(this).height(),v=t(this).width(),b=e.$controllerDiv.width(),g.right=b-g.left-v,T=g.top+m+5,y=t(this).parent().hasClass("able-right-controls")?"right":"left",w=AblePlayer.localGetElementById(d[0],P).text(f).width(),"left"==y?((k=g.left-w/2)<0&&(k=2),C={left:k+"px",right:"",top:T+"px"}):((k=g.right-w/2)<0&&(k=2),C={left:"",right:k+"px",top:T+"px"}),A=AblePlayer.localGetElementById(d[0],P).text(f).css(C),e.showTooltip(A),t(this).on("mouseleave blur",function(){clearTimeout(D),D=setTimeout(function(){AblePlayer.localGetElementById(d[0],P).text("").hide()},500),e.$tooltipDiv.on("mouseenter focus",function(){clearTimeout(D)}),e.$tooltipDiv.on("mouseleave blur",function(){AblePlayer.localGetElementById(d[0],P).text("").hide()})})}),"captions"===c?this.prefCaptions&&1===this.prefCaptions||(S=this.captions.length>1?this.translate("captions","Captions"):this.translate("showCaptions","Show captions"),d.addClass("buttonOff").attr("title",S),d.attr("aria-pressed","false")):"descriptions"===c&&(this.prefDesc&&1===this.prefDesc||d.addClass("buttonOff").attr("title",this.translate("turnOnDescriptions","Turn on descriptions"))),o.append(d),"play"===c?this.$playpauseButton=d:"previous"==c?(this.$prevButton=d,"previous"==this.buttonWithFocus&&(this.$prevButton.trigger("focus"),this.buttonWithFocus=null)):"next"==c?(this.$nextButton=d,"next"==this.buttonWithFocus&&(this.$nextButton.trigger("focus"),this.buttonWithFocus=null)):"captions"===c?this.$ccButton=d:"sign"===c?(this.$signButton=d,this.$signWindow.is(":visible")||this.$signButton.addClass("buttonOff")):"descriptions"===c?this.$descButton=d:"mute"===c?this.$muteButton=d:"transcript"===c?(this.$transcriptButton=d,this.$transcriptDiv.is(":visible")||this.$transcriptButton.addClass("buttonOff").attr("title",this.translate("showTranscript","Show transcript"))):"fullscreen"===c?this.$fullscreenButton=d:"chapters"===c?this.$chaptersButton=d:"preferences"===c?this.$prefsButton=d:"volume"===c&&(this.$volumeButton=d)}"volume"===c&&this.addVolumeSlider(o)}s%2==1&&this.$controllerDiv.append('<div style="clear:both;"></div>')}for(var I in void 0!==this.$captionsDiv&&this.stylizeCaptions(this.$captionsDiv),void 0!==this.$descDiv&&this.stylizeCaptions(this.$descDiv),this.controls=[],i)i.hasOwnProperty(I)&&(this.controls=this.controls.concat(i[I]));this.refreshControls()},AblePlayer.prototype.cuePlaylistItem=function(e){var i,a,s,n,r,o,l=this;a=this.player,this.initializing||this.playerCreated&&this.deletePlayer("playlist"),this.swappingSrc=!0,this.startedPlaying?this.okToPlay=!0:this.okToPlay=!1,this.loadingMedia=!1,i=this.$playlist.eq(e),this.hasAttr(i,"data-youtube-id")?(this.youTubeId=this.getYouTubeId(i.attr("data-youtube-id")),this.hasAttr(i,"data-youtube-desc-id")&&(this.youTubeDescId=this.getYouTubeId(i.attr("data-youtube-desc-id"))),s="youtube"):this.hasAttr(i,"data-vimeo-id")?(this.vimeoId=this.getVimeoId(i.attr("data-vimeo-id")),this.hasAttr(i,"data-vimeo-desc-id")&&(this.vimeoDescId=this.getVimeoId(i.attr("data-vimeo-desc-id"))),s="vimeo"):s="html5","youtube"===s?"html5"===a&&(this.playing&&this.pauseMedia(),this.$media.hide()):(this.youTubeId=!1,"youtube"===a&&this.$media.show()),this.player=s,this.$media.empty(),this.hasAttr(i,"data-poster")&&this.$media.attr("poster",i.attr("data-poster")),this.hasAttr(i,"data-youtube-desc-id")&&this.$media.attr("data-youtube-desc-id",i.attr("data-youtube-desc-id")),this.youTubeId&&this.$media.attr("data-youtube-id",i.attr("data-youtube-id"));var h=i.children("span.able-source");h.length&&h.each(function(){const e=t(this);if(l.hasAttr(e,"data-src")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const a=t("<source>",{src:i});["data-type","data-desc-src","data-sign-src"].forEach(t=>{if(l.hasAttr(e,t)){const i=e.attr(t),s=DOMPurify.sanitize(i);t.endsWith("-src")&&validate.isProtocolSafe(s)?a.attr(t,s):t.endsWith("-src")||a.attr(t,s)}}),l.$media.append(a)}}});var p=i.children("span.able-track");p.length&&p.each(function(){const e=t(this);if(l.hasAttr(e,"data-src")&&l.hasAttr(e,"data-kind")&&l.hasAttr(e,"data-srclang")){const i=DOMPurify.sanitize(e.attr("data-src"));if(validate.isProtocolSafe(i)){const a=t("<track>",{src:i,kind:e.attr("data-kind"),srclang:e.attr("data-srclang")});["data-label","data-desc","data-default"].forEach(t=>{l.hasAttr(e,t)&&a.attr(t,DOMPurify.sanitize(e.attr(t)))}),l.$media.append(a)}}}),n=DOMPurify.sanitize(i.text()),this.hasAttr(i,"lang")&&(r=i.attr("lang")),this.$sources=this.$media.find("source"),this.recreatingPlayer||this.recreatePlayer().then(function(){l.$playlist.removeClass("able-current").children("button").removeAttr("aria-current"),l.$playlist.eq(e).addClass("able-current").children("button").attr("aria-current","true"),!0===l.showNowPlaying&&void 0!==l.$nowPlayingDiv&&(o=t("<span>"),void 0!==r&&o.attr("lang",r),o.html("<span>"+l.tt.selectedTrack+":</span>"+n),l.$nowPlayingDiv.html(o)),l.initializing?l.swappingSrc=!1:"html5"===l.player?l.loadingMedia||(l.media.load(),l.loadingMedia=!0):"youtube"===l.player&&(l.okToPlay=!0),l.initializing=!1,l.playerCreated=!0})},AblePlayer.prototype.deletePlayer=function(e){"youtube"===this.player&&this.youTubePlayer&&this.youTubePlayer.destroy(),"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.destroy(),this.$controllerDiv.empty(),this.$elapsedTimeContainer.empty().text("0:00"),this.$durationContainer.empty(),this.$signWindow&&this.$signWindow.remove(),this.$transcriptArea&&this.$transcriptArea.remove(),t(".able-modal-dialog").remove(),this.$captionsWrapper&&this.$captionsWrapper.remove(),this.$descDiv&&this.$descDiv.remove(),this.hasCaptions=!1,this.hasChapters=!1,this.hasDescTracks=!1,this.hasOpenDesc=!1,this.hasClosedDesc=!1,this.captionsPopup=null,this.chaptersPopup=null,this.transcriptType=null,this.playerDeleted=!0},AblePlayer.prototype.getButtonTitle=function(t){return"playpause"===t||"play"===t?this.translate("play","Play"):"pause"===t?this.translate("pause","Pause"):"restart"===t?this.translate("restart","Restart"):"previous"===t?this.translate("prevTrack","Previous track"):"next"===t?this.translate("nextTrack","Next track"):"rewind"===t?this.translate("rewind","Rewind"):"forward"===t?this.translate("forward","Forward"):"captions"===t?this.captions.length>1?this.translate("captions","Captions"):this.captionsOn?this.translate("hideCaptions","Hide captions"):this.translate("showCaptions","Show captions"):"descriptions"===t?this.descOn?this.translate("turnOffDescriptions","Turn off descriptions"):this.translate("turnOnDescriptions","Turn on descriptions"):"transcript"===t?this.$transcriptDiv.is(":visible")?this.translate("hideTranscript","Hide transcript"):this.translate("showTranscript","Show transcript"):"chapters"===t?this.translate("chapters","Chapters"):"sign"===t?this.translate("sign","Sign language"):"volume"===t?this.translate("volume","Volume"):"faster"===t?this.translate("faster","Faster"):"slower"===t?this.translate("slower","Slower"):"preferences"===t?this.translate("preferences","Preferences"):"fullscreen"===t?this.fullscreen?this.translate("exitFullScreen","Exit full screen"):this.translate("enterFullScreen","Enter full screen"):(this.debug,this.capitalizeFirstLetter(t))}}(jQuery);var preProcessing={transformCSSClasses:function(t){if(t.length>1e3)throw new Error("Input too long");return t.replace(/<(v|c|b|i|u|lang|ruby)\.([\w\.]+)([^>]*)>/g,function(t,e,i,a){return`<${e} class="${i.replace(/\./g," ")}"${a}>`})},transformLangTags:function(t){return t.replace(/<lang\s+([\w-]+)([^>]*)>/g,function(t,e,i){return'<lang lang="'+e+'"'+i+">"})},transformVTags:function(t){return t.replace(/<v\s+([^>]*?)>/g,function(t,e){var i=e.match(/class="([^"]*)"/),a=i?i[0]:"",s=e.replace(/class="[^"]*"/,"").trim().split(/\s+/),n=[],r=[];s.forEach(function(t){-1!==t.indexOf("=")?n.push(t):r.push(t)});var o=r.join(" "),l="<v";return o&&(l+=' title="'+o+'"'),n.length>0&&(l+=" "+n.join(" ")),a&&(l+=" "+a),l+=">"})}},postProcessing={postprocessCTag:function(t){return t.replace(/<c class="([\w\s]+)">/g,function(t,e){return"<c."+e.replace(/ /g,".")+">"})},postprocessVTag:function(t){return t.replace(/<v([^>]*)class="([\w\s]+)"([^>]*)>/g,function(t,e,i,a){var s=i.trim().split(/\s+/).join("."),n=(e+a).replace(/\s*class="[\w\s]+"/,"").trim();return"<v."+s+(n?" "+n:"")+">"})},postprocessLangTag:function(t){return t.replace(/<lang lang="([\w-]+)"([^>]*)>/g,function(t,e,i){return"<lang "+e+i+">"})}},validate={preProcessVttContent:function(t){var e=preProcessing.transformCSSClasses(t),i=preProcessing.transformLangTags(e);return preProcessing.transformVTags(i)},postProcessVttContent:function(t,e){var i=postProcessing.postprocessCTag(t),a=postProcessing.postprocessVTag(i);return postProcessing.postprocessLangTag(a).replace(/-->/g,"--\x3e").replace(/<([\d:.]+)>/g,"<$1>").replace(/<\/v>/g,function(t,i){return-1!==e.indexOf(t,i)?t:""})},sanitizeVttContent:function(t){if(null==t)return"";var e=validate.preProcessVttContent(t),i=DOMPurify.sanitize(e,{ALLOWED_TAGS:["b","i","u","v","c","lang","ruby","rt","rp"],ALLOWED_ATTR:["title","class","lang"],KEEP_CONTENT:!0});return validate.postProcessVttContent(i,t)},isProtocolSafe:function(t){try{const e=new URL(t,window.location.origin);return["http:","https:"].includes(e.protocol)}catch(t){return!1}}};"undefined"!=typeof module&&module.exports&&(module.exports=validate),function(t){AblePlayer.prototype.setupTracks=function(){var e,i,a,s,n,r,o,l,h;for(e=this,a=(i=new this.defer).promise(),s=[],t("#able-vts").length?(this.vtsTracks=[],this.hasVts=!0):this.hasVts=!1,o=this.hasDescTracks&&this.descOn?this.altTracks:this.tracks,r=0;r<o.length;r++)if(h=(l=o[r]).kind?l.kind:"subtitles",l.src){var p=l.src;n=this.loadTextObject(p),s.push(n.catch(function(t){})),n.then(function(t,i){p=t.src;var a=t.language,s=t.label,n=t.desc;return function(r){var o=e.parseWebVTT(r).cues;e.hasVts&&e.setupVtsTracks(i,a,n,s,p,r.text),"captions"===i||"subtitles"===i?e.setupCaptions(t,o):"descriptions"===i?e.setupDescriptions(t,o):"chapters"===i?e.setupChapters(t,o):"metadata"===i&&e.setupMetadata(o)}}(l,h))}else(e.usingYouTubeCaptions||e.usingVimeoCaptions)&&e.setupCaptions(l);return e.usingYouTubeCaptions||e.usingVimeoCaptions?i.resolve():t.when.apply(t,s).then(function(){i.resolve()}),a},AblePlayer.prototype.getTracks=function(){var e,i,a,s,n,r,o,l,h,p,c;return e=this,l=!1,a=(i=new this.defer).promise(),this.$tracks=this.$media.find("track"),this.tracks=[],this.altTracks=[],this.captions=[],this.descriptions=[],this.chapters=[],this.meta=[],this.hasCaptionsTrack=!1,this.hasDescTracks=!1,this.$tracks.length&&(this.usingYouTubeCaptions=!1,this.$tracks.each(function(i,a){if("captions"===t(this).attr("kind")?e.hasCaptionsTrack=!0:"descriptions"===t(this).attr("kind")&&(e.hasClosedDesc=!0),s=t(this).attr("srclang")?t(this).attr("srclang"):e.lang,n=t(this).attr("label")?t(this).attr("label"):e.getLanguageName(s),void 0===t(this).attr("default")||l?s===e.lang?(h=!0,r=!1):r=!1:(r=!0,l=!0),r&&(e.captionLang=s),void 0!==t(this).data("desc")?(o=!0,e.hasDescTracks=!0):o=!1,o?e.altTracks.push({kind:t(this).attr("kind"),src:t(this).attr("src"),language:s,label:n,def:r,desc:o}):e.tracks.push({kind:t(this).attr("kind"),src:t(this).attr("src"),language:s,label:n,def:r,desc:o}),i==e.$tracks.length-1){if(!l)if(h)for(e.captionLang=e.lang,p=!1,c=0;c<e.tracks.length&&!p;)e.tracks[c].language===e.lang&&(e.tracks[c].def=!0,p=!0),c++;else e.tracks[0].def=!0,e.captionLang=e.tracks[0].language;e.$media.find("track").removeAttr("default")}})),this.$tracks.length&&this.hasCaptionsTrack?i.resolve():"youtube"===this.player?this.getYouTubeCaptionTracks().then(function(){e.hasCaptions&&(e.usingYouTubeCaptions=!0,e.$captionsWrapper&&e.$captionsWrapper.remove()),i.resolve()}):"vimeo"===this.player?this.getVimeoCaptionTracks().then(function(){e.hasCaptions&&(e.usingVimeoCaptions=!0,e.$captionsWrapper&&e.$captionsWrapper.remove()),i.resolve()}):(this.hasCaptions=!1,e.$captionsWrapper&&e.$captionsWrapper.remove(),i.resolve()),a},AblePlayer.prototype.setupCaptions=function(e,i){var a,s;if(void 0===i&&(i=null),this.usingYouTubeCaptions||this.usingVimeoCaptions);else if(0===this.captions.length)this.captions.push({language:e.language,label:e.label,def:e.def,cues:i});else{for(a=!1,s=0;s<this.captions.length;s++)if(e.label.toLowerCase()<this.captions[s].label.toLowerCase()){this.captions.splice(s,0,{language:e.language,label:e.label,def:e.def,cues:i}),a=!0;break}a||this.captions.push({language:e.language,label:e.label,def:e.def,cues:i})}this.hasCaptions=!0,this.currentCaption=-1,1===this.prefCaptions?this.captionsOn=!0:0===this.prefCaptions?this.captionsOn=!1:1===this.defaultStateCaptions?this.captionsOn=!0:this.captionsOn=!1,"audio"===this.mediaType&&this.captionsOn&&this.$captionsContainer.removeClass("captions-off"),(!this.$captionsWrapper||this.$captionsWrapper&&!t.contains(this.$ableDiv[0],this.$captionsWrapper[0]))&&(this.$captionsDiv=t("<div>",{class:"able-captions"}),this.$captionsWrapper=t("<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.$captionsContainer.append(this.$captionsWrapper))},AblePlayer.prototype.setupDescriptions=function(t,e){this.hasClosedDesc=!0,this.currentDescription=-1,this.descriptions.push({cues:e,language:t.language})},AblePlayer.prototype.setupChapters=function(t,e){this.hasChapters=!0,this.chapters.push({cues:e,language:t.language})},AblePlayer.prototype.setupMetadata=function(e){"text"===this.metaType?this.metaDiv&&t("#"+this.metaDiv)&&(this.$metaDiv=t("#"+this.metaDiv),this.hasMeta=!0,this.meta=e):"selector"===this.metaType&&(this.hasMeta=!0,this.visibleSelectors=[],this.meta=e)},AblePlayer.prototype.loadTextObject=function(e){var i,a,s,n;return a=(i=new this.defer).promise(),s=this,n=t("<div>",{style:"display:none"}),fetch(e).then(t=>t.text()).then(t=>{var a,s=t.split(/\r?\n\s*\r?\n/),r="";s.forEach(t=>{a=validate.sanitizeVttContent(t),r+=a+"\n\n"}),n.html(r);let o={src:e,text:r};i.resolve(o),n.remove()}).catch(t=>{s.debug,i.reject(e),n.remove()}),a}}(jQuery),function(t){AblePlayer.prototype.initYouTubePlayer=function(){var e,i,a,s;return e=this,a=(i=new this.defer).promise(),this.youTubePlayerReady=!1,s=this.youTubeDescId&&this.prefDesc?this.youTubeDescId:this.youTubeId,this.activeYouTubeId=s,AblePlayer.youTubeIframeAPIReady?e.finalizeYoutubeInit().then(function(){i.resolve()}):(AblePlayer.loadingYouTubeIframeAPI||e.getScript("https://www.youtube.com/iframe_api",function(){}),t("body").on("youTubeIframeAPIReady",function(){e.finalizeYoutubeInit().then(function(){i.resolve()})})),a},AblePlayer.prototype.finalizeYoutubeInit=function(){var e,i,a,s,n;return i=(e=new this.defer).promise(),a=this,s=this.mediaId+"_youtube",this.$mediaContainer.prepend(t("<div>").attr("id",s)),n=this.okToPlay?1:0,void 0===this.captionLang&&(this.captionLang=this.lang),this.youTubePlayer=new YT.Player(s,{videoId:this.activeYouTubeId,host:this.youTubeNoCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com",playerVars:{autoplay:n,cc_lang_pref:this.captionLang,cc_load_policy:1,controls:0,disableKb:1,enablejsapi:1,hl:this.lang,iv_load_policy:3,origin:window.location.origin,playsinline:this.playsInline,rel:0,start:this.startTime},events:{onReady:function(){a.youTubePlayerReady=!0,a.playerWidth&&a.playerHeight||a.getYouTubeDimensions(),a.playerWidth&&a.playerHeight&&a.youTubePlayer.setSize(a.playerWidth,a.playerHeight),a.swappingSrc&&(a.swappingSrc=!1,a.restoreFocus(),a.cueingPlaylistItem=!1,(a.playing||a.okToPlay)&&a.playMedia()),a.userClickedPlaylist&&(a.userClickedPlaylist=!1),a.recreatingPlayer&&(a.recreatingPlayer=!1),e.resolve()},onError:function(t){e.reject()},onStateChange:function(t){a.getPlayerState().then(function(t){"playing"===t?(a.hasSignLanguage&&a.signVideo&&a.signVideo.play(!0),a.playing=!0,a.startedPlaying=!0,a.paused=!1):"ended"==t?a.onMediaComplete():(a.playing=!1,a.paused=!0),a.stoppingYouTube&&"paused"===t&&(a.hasSignLanguage&&a.signVideo&&a.signVideo.pause(!0),void 0!==a.$posterImg&&a.$posterImg.show(),a.stoppingYouTube=!1,a.seeking=!1,a.playing=!1,a.paused=!0)}),"youtube"!==a.player||a.usingYouTubeCaptions||a.youTubePlayer.getOptions("captions")&&a.youTubePlayer.unloadModule("captions")},onApiChange:function(){a.duration=a.youTubePlayer.getDuration()},onPlaybackQualityChange:function(){}}}),this.hasPlaylist||this.$media.remove(),i},AblePlayer.prototype.getYouTubeDimensions=function(t){var e,i,a;void 0!==(e=this.$ableWrapper.find("iframe"))&&e.prop("width")&&(i=e.prop("width"),e.prop("height")&&(a=e.prop("height"),this.resizePlayer(i,a)))},AblePlayer.prototype.getYouTubeCaptionTracks=function(){var t,e,i,a,s,n,r=new this.defer,o=r.promise(),l=!1;return t=this,this.youTubePlayer.getOption("captions","tracklist")||(this.youTubePlayer.addEventListener("onApiChange",function(){if(l=!0,t.duration=t.youTubePlayer.getDuration(),t.loadingYouTubeCaptions){if(e=t.youTubePlayer.getOption("captions","tracklist"),t.okToPlay||t.youTubePlayer.pauseVideo(),e&&e.length){for(i=0;i<e.length;i++)a=e[i].languageCode,s=e[i].languageName,n=!1,(void 0!==t.captionLang&&a===t.captionLang||void 0!==t.lang&&a===t.lang)&&(n=!0),t.tracks.push({kind:"captions",language:a,label:s,def:n}),t.captions.push({language:a,label:s,def:n,cues:null});t.hasCaptions=!0,t.setupPopups("captions")}else t.usingYouTubeCaptions=!1,t.hasCaptions=!1;t.loadingYouTubeCaptions=!1,t.okToPlay&&t.youTubePlayer.playVideo()}t.captionLangPending&&(t.youTubePlayer.setOption("captions","track",{languageCode:t.captionLangPending}),t.captionLangPending=null),void 0!==t.prefCaptionsSize&&t.youTubePlayer.setOption("captions","fontSize",t.translatePrefs("size",t.prefCaptionsSize,"youtube")),r.resolve()}),this.loadingYouTubeCaptions=!0,this.youTubePlayer.playVideo(),setTimeout(()=>{l||setTimeout(()=>{t.youTubePlayer.pauseVideo(),r.resolve()},500)},500)),o},AblePlayer.prototype.getYouTubePosterUrl=function(t,e){var i="https://img.youtube.com/vi/"+t;return"120"==e?i+"/default.jpg":"320"==e?i+"/mqdefault.jpg":"480"==e?i+"/hqdefault.jpg":"640"==e?i+"/sddefault.jpg":"1280"==e?i+"/hq720.jpg":"1920"==e&&i+"/maxresdefault.jpg"},AblePlayer.prototype.getYouTubeId=function(t){var e;return-1!==t.indexOf("youtu")?(e=(t=t.trim()).length-11,t.substring(e)):t}}(jQuery),function(t){window.AccessibleSlider=function(e,i,a,s,n,r,o,l,h,p){var c,u;c=this,this.position=0,this.tracking=!1,this.trackDevice=null,this.keyTrackPosition=0,this.lastTrackPosition=0,this.nextStep=1,this.inertiaCount=0,this.bodyDiv=t(e),h&&(this.loadedDiv=t("<div></div>"),this.playedDiv=t("<div></div>")),this.seekHead=t("<div>",{"aria-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":s,"aria-valuemax":n}),this.timeTooltipTimeoutId=null,this.overTooltip=!1,this.timeTooltip=t("<div>"),this.bodyDiv.append(this.timeTooltip),this.timeTooltip.attr("role","tooltip"),this.timeTooltip.addClass("able-tooltip"),this.timeTooltip.on("mouseenter focus",function(){c.overTooltip=!0,clearInterval(c.timeTooltipTimeoutId)}),this.timeTooltip.on("mouseleave blur",function(){c.overTooltip=!1,t(this).hide()}),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(a),this.loadedDiv.width(0)):(this.wrapperDiv.height(a),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(2==t.button&&"mousedown"==t.type)return;u=c.pointerEventToXY(t);let e=t.key;if("mouseenter"===t.type)c.overBody=!0,c.overBodyMousePos={x:u.x,y:u.y};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("Home"===t.key)c.trackImmediatelyTo(0);else if("End"===t.key)c.trackImmediatelyTo(c.duration);else if("ArrowLeft"===t.key||"ArrowDown"===t.key)c.arrowKeyDown(-1);else if("ArrowRight"===t.key||"ArrowUp"===t.key)c.arrowKeyDown(1);else if("PageUp"===t.key&&r>0)c.arrowKeyDown(r);else{if(!("PageDown"===t.key&&r>0))return;c.arrowKeyDown(-r)}t.preventDefault()}else"keyup"===t.type&&e===t.key&&(c.tracking&&"keyboard"===c.trackDevice&&c.stopTracking(c.keyTrackPosition),t.preventDefault());c.overTooltip||"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.trackHeadAtPosition(this.keyTrackPosition)):(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.overHead&&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(e,i){var a,s=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),o=1===n?"minute":"minutes",l=1===r?"second":"seconds";a=s>0?s+" "+(1===s?"hour":"hours")+", "+n+" "+o+", "+r+" "+l:n>0?n+" "+o+", "+r+" "+l:r+" "+l,this.liveAriaRegion||(this.liveAriaRegion=t("<span>",{class:"able-offscreen","aria-live":"polite"}),this.wrapperDiv.append(this.liveAriaRegion)),i&&this.liveAriaRegion.text()!==a&&this.liveAriaRegion.text(a),this.seekHead.attr("aria-valuetext",a),this.seekHead.attr("aria-valuenow",Math.floor(e).toString())},AccessibleSlider.prototype.trackImmediatelyTo=function(t){this.startTracking("keyboard",t),this.trackHeadAtPosition(t),this.keyTrackPosition=t},AccessibleSlider.prototype.refreshTooltip=function(){if(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);else if(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);else{clearTimeout(this.timeTooltipTimeoutId);var t=this;this.timeTooltipTimeoutId=setTimeout(function(){t.timeTooltip.hide()},500)}},AccessibleSlider.prototype.hideSliderTooltips=function(){this.overHead=!1,this.overBody=!1,this.timeTooltip.hide()},AccessibleSlider.prototype.setTooltipPosition=function(t){this.timeTooltip.css({left:t-this.timeTooltip.width()/2-10,bottom:this.seekHead.height()})},AccessibleSlider.prototype.positionToStr=function(t){var e=Math.floor(t/3600),i=Math.floor(t/60)%60,a=Math.floor(t%60);return a<10&&(a="0"+a),e>0?(i<10&&(i="0"+i),e+":"+i+":"+a):i+":"+a},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(t){AblePlayer.prototype.addVolumeSlider=function(e){var i,a,s,n,r,o;i=this,a=this.mediaId+"-volume-slider",s=this.mediaId+"-volume-help",this.$volumeSlider=t("<div>",{id:a,class:"able-volume-slider","aria-hidden":"true"}).hide(),this.$volumeSliderTooltip=t("<div>",{class:"able-tooltip",role:"tooltip"}).hide(),this.$volumeRange=t("<input>",{type:"range",min:"0",max:"10",step:"1",orient:"vertical","aria-label":this.translate("volumeUpDown","Volume up down"),value:this.volume}),n=parseInt(i.volume)/10*100,this.$volumeHelp=t("<div>",{id:s,class:"able-volume-help","aria-live":"polite"}).text(n+"%"),r=this.$volumeButton.attr("aria-label"),this.$volumeButton.attr("aria-label",r+" "+n+"%"),this.$volumeSlider.append(this.$volumeSliderTooltip,this.$volumeRange,this.$volumeHelp),o=this.$volumeButton.parents(".able-control-row")[0],this.$volumeSlider.css("bottom",o.offsetHeight),e.append(this.$volumeSlider),this.$volumeRange.on("change",function(e){i.handleVolumeChange(t(this).val())}),this.$volumeRange.on("input",function(e){i.handleVolumeChange(t(this).val())}),this.$volumeRange.on("keydown",function(t){"Escape"!==t.key&&"Tab"!==t.key&&"Enter"!==t.key||(i.$volumeSlider.is(":visible")?(i.closingVolume=!0,i.hideVolumePopup()):i.closingVolume||i.showVolumePopup())})},AblePlayer.prototype.refreshVolumeHelp=function(t){var e;e=t/10*100,this.$volumeHelp&&this.$volumeHelp.text(e+"%"),this.$volumeRange.attr("value",t)},AblePlayer.prototype.refreshVolumeButton=function(t){var e,i,a;e=this.getVolumeName(t),i=t/10*100,a=this.translate("volume","Volume")+" "+i+"%",this.getIcon(this.$volumeButton,"volume-"+e),this.$volumeButton.attr("aria-label",a)},AblePlayer.prototype.handleVolumeButtonClick=function(){this.$volumeSlider.is(":visible")?this.hideVolumePopup():this.showVolumePopup()},AblePlayer.prototype.handleVolumeKeystroke=function(t){this.isMuted()&&t>0?this.setMute(!1):0===t?this.setMute(!0):(this.setVolume(t),this.refreshVolumeHelp(t),this.refreshVolumeButton(t))},AblePlayer.prototype.handleVolumeChange=function(t){this.isMuted()&&t>0?this.setMute(!1):0===t?this.setMute(!0):(this.setVolume(t),this.refreshVolumeHelp(t),this.refreshVolumeButton(t))},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.$volumeButton.focus(),this.waitThenFocus(this.$volumeRange)},AblePlayer.prototype.hideVolumePopup=function(){var t=this;this.$volumeSlider.hide().attr("aria-hidden","true"),this.$volumeButton.attr("aria-expanded","false").focus(),setTimeout(function(){t.closingVolume=!1},1e3)},AblePlayer.prototype.isMuted=function(){return"html5"===this.player?this.media.muted:"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:"youtube"===this.player&&(t?this.youTubePlayer.mute():this.youTubePlayer.unMute()),this.setVolume(this.volume),this.refreshVolumeHelp(this.volume),this.refreshVolumeButton(this.volume)},AblePlayer.prototype.setVolume=function(t){var e;this.syncSignVideo({volume:0}),"html5"===this.player?(e=t/10,this.media.volume=e):"youtube"===this.player?(e=10*t,this.youTubePlayer.setVolume(e),this.volume=t):"vimeo"===this.player&&(e=t/10,this.vimeoPlayer.setVolume(e).then(function(){})),this.lastVolume=t},AblePlayer.prototype.getVolume=function(t){return"html5"===this.player?10*this.media.volume:"youtube"===this.player&&this.youTubePlayerReady?this.youTubePlayer.getVolume()/10:"vimeo"===this.player?this.volume:void 0},AblePlayer.prototype.getVolumeName=function(t){return 0==t?"mute":10==t?"loud":t<5?"soft":"medium"}}(jQuery),function(t){var e="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";window.AccessibleDialog=function(i,a,s,n){this.title=s,this.closeButtonLabel=n,this.focusedElementBeforeModal=a,this.baseId=t(i).attr("id")||Math.floor(1e9*Math.random()).toString();var r=this,o=i;this.modal=o,o.addClass("able-modal-dialog");var l=t("<button>",{class:"modalCloseButton",title:r.closeButtonLabel,"aria-label":r.closeButtonLabel}).text("×");l.on("keydown",function(t){" "===t.key&&r.hide()}).on("click",function(){r.hide()});var h=t("<h1></h1>");h.attr("id","modalTitle-"+this.baseId),h.text(s),this.titleH1=h,o.attr({"aria-labelledby":"modalTitle-"+this.baseId});var p=t("<div>",{class:"able-modal-header"});p.prepend(h),p.prepend(l),o.prepend(p),o.attr({"aria-hidden":"true",role:"dialog","aria-modal":"true"}),o.on("keydown",function(i){if("Escape"===i.key)r.hide(),i.preventDefault();else if("Tab"===i.key){var a=o.find("*").filter(e).filter(":visible");if(0===a.length)return;var s=t(":focus"),n=a.index(s);i.shiftKey?0===n&&(a.get(a.length-1).trigger("focus"),i.preventDefault()):n===a.length-1&&(a.get(0).trigger("focus"),i.preventDefault())}i.stopPropagation()}),t("body").hasClass("able-modal-active")&&(t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert"),t("body").removeClass("able-modal-active"))},AccessibleDialog.prototype.show=function(){if(!this.overlay){var i=t("<div></div>").attr({class:"able-modal-overlay",tabindex:"-1"});this.overlay=i,t("body").append(i),i.on("mousedown.accessibleModal",function(t){t.preventDefault(),a.hide()})}t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").attr("inert",!0),t("body").addClass("able-modal-active"),this.overlay.css("display","block"),this.modal.css("display","block"),this.modal.attr({"aria-hidden":"false",tabindex:"-1"}),0===this.modal.find("*").filter(e).filter(":visible").length&&this.focusedElementBeforeModal.blur();var a=this;setTimeout(function(){a.modal.find("button.modalCloseButton").first().trigger("focus")},300)},AccessibleDialog.prototype.hide=function(){this.overlay&&this.overlay.css("display","none"),this.modal.css("display","none"),this.modal.attr("aria-hidden","true"),t("body > *").not(".able-modal-overlay").not(".able-modal-dialog").removeAttr("inert"),t("body").removeClass("able-modal-active"),this.focusedElementBeforeModal.trigger("focus")},AccessibleDialog.prototype.getInputs=function(){return!!this.modal&&this.modal.find("input")}}(jQuery),function(t){AblePlayer.prototype.getNextHeadingLevel=function(e){var i,a,s,n;return e.parents().each(function(){if(i=t(this).children(":header"),a=i.length)return s=i.eq(a-1).prop("tagName"),!1}),void 0===s?n=1:(n=parseInt(s[1]),(n+=1)>6&&(n=6)),n},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,a,s,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),a=Math.floor(t/60)%60,(s=Math.floor(t%60))<10&&(s="0"+s),i>0?(a<10&&(a="0"+a),e?i+":"+a+":"+s+"."+r:i+":"+a+":"+s):e?(i<1?i="00":i<10&&(i="0"+i),a<1?a="00":a<10&&(a="0"+a),i+":"+a+":"+s+"."+r):a+":"+s},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.defer=function(){const t=this,e=new Promise((i,a)=>{t.resolve=i,t.reject=a,t.promise=()=>e})},AblePlayer.prototype.getScript=function(t,e){var i=document.createElement("script"),a=document.getElementsByTagName("script")[0];i.async=1,i.onload=i.onreadystatechange=function(t,a){(a||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i=void 0,!a&&e&&setTimeout(e,0))},i.src=t,a.parentNode.insertBefore(i,a)},AblePlayer.prototype.hasAttr=function(t,e){var i=t.attr(e);return void 0!==i&&!1!==i}}(jQuery),function(t){AblePlayer.prototype.initDescription=function(){var t,e;return e=(t=new this.defer).promise(),"audio"===this.mediaType&&t.resolve(),this.descFile=this.$sources.first().attr("data-desc-src"),void 0!==this.descFile?this.hasOpenDesc=!0:this.hasOpenDesc=!(!this.youTubeDescId&&!this.vimeoDescId),this.descMethod=null,this.hasOpenDesc&&this.hasClosedDesc?this.descMethod=this.prefDescMethod?this.prefDescMethod:"video":this.hasOpenDesc?this.descMethod="video":this.hasClosedDesc&&(this.descMethod="text"),this.descOn=!1,this.descMethod&&(1===this.prefDesc?this.descOn=!0:0===this.prefDesc?this.descOn=!1:this.descOn=1===this.defaultStateDescriptions),void 0===this.$descDiv&&this.hasClosedDesc&&this.injectTextDescriptionArea(),this.descOn?("video"!==this.descMethod||this.usingDescribedVersion()||this.swapDescription(),this.hasClosedDesc&&(this.prefDescVisible?void 0!==this.$descDiv&&(this.$descDiv.show(),this.$descDiv.removeClass("able-offscreen")):void 0!==this.$descDiv&&this.$descDiv.addClass("able-offscreen"))):"video"===this.descMethod?this.usingDescribedVersion()&&this.swapDescription():"text"===this.descMethod&&void 0!==this.$descDiv&&(this.$descDiv.hide(),this.$descDiv.removeClass("able-offscreen")),t.resolve(),e},AblePlayer.prototype.usingDescribedVersion=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.initSpeech=function(e){var i=this;function attemptEnableSpeech(){var t=new SpeechSynthesisUtterance(" ");t.onend=function(){i.getBrowserVoices(),(Array.isArray(i.descVoices)&&i.descVoices.length||"init"!==e)&&(i.speechEnabled=!0)},i.synth.speak(t)}null===this.speechEnabled&&(window.speechSynthesis?(this.synth=window.speechSynthesis,this.synth.cancel(),"init"===e?(attemptEnableSpeech(),t(document).on("click",function handleInitialClick(){attemptEnableSpeech(),t(document).off("click",handleInitialClick)})):attemptEnableSpeech()):this.speechEnabled=!1)},AblePlayer.prototype.getBrowserVoices=function(){var t,e,i,a;if(a=this.captionLang?this.captionLang.substring(0,2).toLowerCase():this.lang.substring(0,2).toLowerCase(),this.descVoices=[],t=this.synth.getVoices(),e=this.getDescriptionLangs(),t.length>0){this.descVoices=[];for(var s=0;s<t.length;s++)(i=t[s].lang.substring(0,2).toLowerCase())===a&&-1!==e.indexOf(i)&&this.descVoices.push(t[s]);this.descVoices.length||(this.descVoices=t)}return!1},AblePlayer.prototype.getDescriptionLangs=function(){var t=[];if(this.tracks)for(var e=0;e<this.tracks.length;e++)"descriptions"===this.tracks[e].kind&&t.push(this.tracks[e].language.substring(0,2).toLowerCase());return t},AblePlayer.prototype.setDescriptionVoice=function(){var t,e,i,a,s;if(e=void 0!==this.getPref().voices?this.getPrefDescVoice():null,this.getBrowserVoices(),this.rebuildDescPrefsForm(),a=this.selectedDescriptions?this.selectedDescriptions.language:this.captionLang?this.captionLang:this.lang,this.synth&&(t=this.synth.getVoices()).length>0){if(e){s=!1;for(var n=0;n<t.length;n++)if(t[n].lang.substring(0,2).toLowerCase()===a.substring(0,2).toLowerCase()&&t[n].name===e){i=t[n].name,s=!0;break}}if(!s)for(n=0;n<t.length;n++)if(t[n].lang.substring(0,2).toLowerCase()===a.substring(0,2).toLowerCase()){i=t[n].name;break}this.prefDescVoice=i,this.prefDescVoiceLang=a,this.$voiceSelectField&&this.$voiceSelectField.val(this.prefDescVoice),this.updatePreferences("voice")}},AblePlayer.prototype.swapDescription=function(){var e,i,a,s;if(e=this,this.loadingMedia=!1,this.$focusedElement=t(":focus"),this.activeMedia=this.mediaId,this.elapsed>0?this.swapTime=this.elapsed:this.swapTime=0,this.duration>0&&(this.prevDuration=this.duration),this.okToPlay||(this.okToPlay=this.playing),this.descOn?this.showAlert(this.translate("alertDescribedVersion","Using the audio described version of this video")):this.showAlert(this.translate("alertNonDescribedVersion","Using the non-described version of this video")),"html5"===this.player){if(this.swappingSrc=!0,this.paused=!0,this.usingDescribedVersion())for(i=0;i<this.$sources.length;i++)a=DOMPurify.sanitize(this.$sources[i].getAttribute("data-orig-src")),srcType=this.$sources[i].getAttribute("type"),a&&this.$sources[i].setAttribute("src",a);else for(i=0;i<this.$sources.length;i++)a=DOMPurify.sanitize(this.$sources[i].getAttribute("src")),s=DOMPurify.sanitize(this.$sources[i].getAttribute("data-desc-src")),srcType=this.$sources[i].getAttribute("type"),s&&(this.$sources[i].setAttribute("src",s),this.$sources[i].setAttribute("data-orig-src",a));if(this.recreatingPlayer)return;this.playerCreated&&(this.deletePlayer("swap-desc-html"),this.recreatePlayer().then(function(){e.loadingMedia||(e.media.load(),e.loadingMedia=!0)}))}else if("youtube"===this.player){if(this.activeYouTubeId=this.usingDescribedVersion()?this.youTubeId:this.youTubeDescId,void 0!==this.youTubePlayer&&(e.swappingSrc=!0,e.playing?e.youTubePlayer.loadVideoById(e.activeYouTubeId,e.swapTime):e.youTubePlayer.cueVideoById(e.activeYouTubeId,e.swapTime)),this.playerCreated&&this.deletePlayer("swap-desc-youtube"),this.recreatingPlayer)return;this.recreatePlayer().then(function(){})}else if("vimeo"===this.player){if(this.usingDescribedVersion()?(this.activeVimeoId=this.vimeoId,this.showAlert(this.translate("alertNonDescribedVersion","Using the non-described version of this video"))):(this.activeVimeoId=this.vimeoDescId,this.showAlert(this.translate("alertDescribedVersion","Using the audio described version of this video"))),this.playerCreated&&this.deletePlayer("swap-desc-vimeo"),this.recreatingPlayer)return;this.recreatePlayer().then(function(){e.vimeoPlayer.loadVideo(e.activeVimeoId).then(function(){e.playing?e.vimeoPlayer.setCurrentTime(e.swapTime):e.vimeoPlayer.pause()})})}},AblePlayer.prototype.showDescription=function(t){if(this.playing&&this.hasClosedDesc&&!this.swappingSrc&&this.descOn&&("video"!==this.descMethod||this.prefDescVisible)){var e,i,a,s;0;var flattenComponentForDescription=function(t){var e=[];if("string"===t.type)e.push(t.value);else for(var i=0;i<t.children.length;i++)e.push(flattenComponentForDescription(t.children[i]));return e.join("")};for(e=[],this.selectedDescriptions?e=this.selectedDescriptions.cues:this.descriptions.length>=1&&(e=this.descriptions[0].cues),i=0;i<e.length;i++)if(e[i].start<=t&&e[i].end>t){a=i;break}void 0!==a?this.currentDescription!==a&&(this.$status.removeAttr("aria-live"),s=flattenComponentForDescription(e[a].components),"screenreader"===this.descReader?this.$descDiv.html(s):this.speechEnabled?("video"!==this.descMethod&&this.announceDescriptionText("description",s),this.prefDescVisible&&this.$descDiv.html(s).removeAttr("aria-live aria-atomic")):this.$descDiv.html(s),this.prefDescPause&&"text"===this.descMethod&&(this.pauseMedia(),this.pausedForDescription=!0),this.currentDescription=a):(this.$descDiv.html(""),this.currentDescription=-1,this.$status.attr("aria-live","polite"))}},AblePlayer.prototype.syncSpeechToPlaybackRate=function(t){var e;.5===t?e=.7:.75===t?e=.8:1===t?e=1:1.25===t?e=1.1:1.5===t?e=1.2:1.75===t?e=1.5:2===t?e=2:2.25===t?e=2.5:t>=2.5&&(e=3),this.prefDescRate=e},AblePlayer.prototype.announceDescriptionText=function(e,i){var a,s,n,r,o,l,h,p,c;a=this;if(this.speechEnabled||this.initSpeech("desc"),"sample"===e?(s=t("#"+this.mediaId+"_prefDescVoice").val(),o=t("#"+this.mediaId+"_prefDescPitch").val(),l=t("#"+this.mediaId+"_prefDescRate").val(),h=t("#"+this.mediaId+"_prefDescVolume").val()):(s=this.prefDescVoice,o=this.prefDescPitch,l=this.prefDescRate,h=this.prefDescVolume),this.descVoices){if(this.descVoices.length>0){if(s)for(n=0;n<this.descVoices.length;n++)if(this.descVoices[n].name==s){r=this.descVoices[n];break}void 0===r&&(r=this.descVoices[0])}}else r=null;p=new SpeechSynthesisUtterance,r&&(p.voice=r),p.voiceURI="native",p.volume=h,p.rate=l,p.pitch=o,p.text=i,p.lang=this.lang,p.onstart=function(t){},p.onpause=function(t){},p.onend=function(t){this.speakingDescription=!1,c=t.elapsedTime,c>100?(t.elapsedTime/1e3).toFixed(2):t.elapsedTime.toFixed(2),this.debug,"description"===e&&a.prefDescPause&&a.pausedForDescription&&(a.playMedia(),this.pausedForDescription=!1)},p.onerror=function(t){},this.synth.paused&&this.synth.resume(),this.synth.speak(p),this.speakingDescription=!0}}(jQuery),jQuery,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;return!this.isIOS()&&((t=new Audio).volume=.9,.9===t.volume)},AblePlayer.prototype.nativeFullscreenSupported=function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled},function(t){AblePlayer.prototype.seekTo=function(t){var e,i=this;(this.seekFromTime=this.media.currentTime,this.seekToTime=t,this.seeking=!0,this.liveUpdatePending=!0,this.speakingDescription&&this.synth.cancel(),this.syncSignVideo({time:this.startTime}),"html5"===this.player)?(this.startTime=t,(e=this.media.seekable).length>0&&this.startTime>=e.start(0)&&this.startTime<=e.end(0)&&(this.media.currentTime=this.startTime,this.seekStatus="complete",this.syncSignVideo({time:this.startTime}))):"youtube"===this.player?(this.youTubePlayer.seekTo(t,!0),t>0&&void 0!==this.$posterImg&&this.$posterImg.hide(),this.syncSignVideo({time:t})):"vimeo"===this.player&&this.vimeoPlayer.setCurrentTime(t).then(function(){i.elapsed=t,i.refreshControls("timeline")});this.refreshControls("timeline")},AblePlayer.prototype.getMediaTimes=function(t,e){var i,a,s,n;return n={},a=(i=new this.defer).promise(),s=this,void 0!==t&&void 0!==e?(n.duration=t,n.elapsed=e,i.resolve(n)):this.getDuration().then(function(t){n.duration=s.roundDown(t,6),s.getElapsed().then(function(t){n.elapsed=s.roundDown(t,6),i.resolve(n)})}),a},AblePlayer.prototype.getDuration=function(){var t,e,i;(e=(t=new this.defer).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getDuration().then(function(e){void 0===e||isNaN(e)||-1===e?t.resolve(0):t.resolve(e)}):t.resolve(0):("html5"===this.player?i=this.media.duration:"youtube"===this.player&&(i=this.youTubePlayerReady?this.duration>0?this.duration:this.youTubePlayer.getDuration():0),void 0===i||isNaN(i)||-1===i?t.resolve(0):t.resolve(i));return e},AblePlayer.prototype.getElapsed=function(){var t,e,i;(e=(t=new this.defer).promise(),"vimeo"===this.player)?this.vimeoPlayer?this.vimeoPlayer.getCurrentTime().then(function(e){void 0===e||isNaN(e)||-1===e?t.resolve(0):t.resolve(e)}):t.resolve(0):("html5"===this.player?i=this.media.currentTime:"youtube"===this.player&&(i=this.youTubePlayerReady?this.youTubePlayer.getCurrentTime():0),void 0===i||isNaN(i)||-1===i?t.resolve(0):t.resolve(i));return e},AblePlayer.prototype.getPlayerState=function(){var t,e,i;if(e=(t=new this.defer).promise(),i=this,"html5"===this.player)this.media.ended?t.resolve("ended"):this.media.paused?t.resolve("paused"):4!==this.media.readyState?t.resolve("buffering"):t.resolve("playing");else if("youtube"===this.player&&this.youTubePlayerReady){var a=this.youTubePlayer.getPlayerState();-1===a||5===a?t.resolve("stopped"):0===a?t.resolve("ended"):1===a?t.resolve("playing"):2===a?t.resolve("paused"):3===a&&t.resolve("buffering")}else"vimeo"===this.player&&this.vimeoPlayer&&this.vimeoPlayer.getPaused().then(function(e){e?t.resolve("paused"):i.vimeoPlayer.getEnded().then(function(e){e?t.resolve("ended"):t.resolve("playing")})});return e},AblePlayer.prototype.isPlaybackRateSupported=function(){return"html5"===this.player?!!this.media.playbackRate:"youtube"===this.player?!!this.youTubePlayerReady&&this.youTubePlayer.getAvailablePlaybackRates().length>1:"vimeo"===this.player?this.vimeoSupportsPlaybackRateChange:void 0},AblePlayer.prototype.setPlaybackRate=function(t){t=Math.max(.5,t),this.hasClosedDesc&&"text"===this.descMethod&&this.syncSpeechToPlaybackRate(t),this.syncSignVideo({rate:t}),"html5"===this.player?this.media.playbackRate=t:"youtube"===this.player?this.youTubePlayer.setPlaybackRate(t):"vimeo"===this.player&&this.vimeoPlayer.setPlaybackRate(t),this.syncSignVideo({rate:t}),this.playbackRate=t,this.$speed.text(this.translate("speed","Speed")+": "+t.toFixed(2).toString()+"x")},AblePlayer.prototype.getPlaybackRate=function(){return"html5"===this.player?this.media.playbackRate:"youtube"===this.player&&this.youTubePlayerReady?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.syncSignVideo=function(t){this.hasSignLanguage&&(this.signVideo||this.signYoutube)&&(t&&void 0!==t.time&&(this.signVideo?this.signVideo.currentTime=t.time:this.youTubeSignPlayer.seekTo(t.time,!0)),t&&void 0!==t.rate&&(this.signVideo?this.signVideo.playbackRate=t.rate:this.youTubeSignPlayer.setPlaybackRate(t.rate)),t&&void 0!==t.pause&&(this.signVideo?this.signVideo.pause(!0):this.youTubeSignPlayer.pauseVideo()),t&&void 0!==t.play&&(this.signVideo?this.signVideo.play(!0):this.youTubeSignPlayer.playVideo()),t&&void 0!==t.volume&&this.signVideo&&(this.signVideo.volume=0))},AblePlayer.prototype.pauseMedia=function(){this.syncSignVideo({pause:!0}),"html5"===this.player?this.media.pause(!0):"youtube"===this.player?this.youTubePlayer.pauseVideo():"vimeo"===this.player&&this.vimeoPlayer.pause()},AblePlayer.prototype.playMedia=function(){this.syncSignVideo({play:!0}),"html5"===this.player?this.media.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.$playerDiv.addClass("fade-out").removeClass("fade-in"):"in"==t&&this.$playerDiv.addClass("fade-in").removeClass("fade-out")},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="init",i,a){var s,n,r,o,l,h,p,c,u,d,f,g,m;if((e="init",s=this,!this.swappingSrc||!this.playing)&&void 0!==this.duration){if(this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.chapterElapsed=this.getChapterElapsed()),!this.useFixedSeekInterval&&!this.seekIntervalCalculated&&this.duration>0&&this.setSeekInterval(),this.seekBar&&(this.useChapterTimes?(h=this.selectedChapters.cues.length-1,this.selectedChapters.cues[h]==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||(c=this.liveUpdatePending||this.seekBar.seekHead.is(t(document.activeElement)),this.liveUpdatePending=!1,this.useChapterTimes?this.seekBar.setPosition(this.chapterElapsed,c):this.seekBar.setPosition(this.elapsed,c)),p=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(p)),"legacy"===this.skin&&this.seekBar){let e=this.seekBar.wrapperDiv.parent().parent();f=(d=this.seekBar.wrapperDiv.parent().prev("div.able-left-controls")).next("div.able-right-controls"),u=d.outerWidth(!0),f.children().each(function(){"button"==t(this).attr("role")&&(u+=t(this).outerWidth(!0)+5)}),g=this.fullscreen?t(window).width()-u:e.width()-u-10,Math.abs(g-this.seekBar.getWidth())>5&&this.seekBar.setWidth(g)}if("html5"===this.player&&this.media.buffered.length>0?(m=this.media.buffered.end(0),this.useChapterTimes?(m>this.chapterDuration&&(m=this.chapterDuration),this.seekBar&&this.seekBar.setBuffered(m/this.chapterDuration)):this.seekBar&&!isNaN(m)&&this.seekBar.setBuffered(m/i)):"youtube"===this.player&&this.seekBar&&this.youTubePlayerReady?this.seekBar.setBuffered(this.youTubePlayer.getVideoLoadedFraction()):this.player,this.$descButton&&this.toggleButtonState(this.$descButton,this.descOn,this.translate("turnOffDescriptions","Turn off descriptions"),this.translate("turnOnDescriptions","Turn on descriptions")),this.$ccButton){(o=this.captions.length)>1&&this.$ccButton.attr({"aria-haspopup":"true","aria-controls":this.mediaId+"-captions-menu"});var v=o>1?this.translate("captions","Captions"):this.translate("showCaptions","Show captions"),y=o>1?this.translate("captions","Captions"):this.translate("hideCaptions","Hide captions"),b=o>1;this.toggleButtonState(this.$ccButton,this.captionsOn,y,v,b)}this.$fullscreenButton&&(this.fullscreen?(this.$fullscreenButton.attr("aria-label",this.translate("exitFullScreen","Exit full screen")),this.getIcon(this.$fullscreenButton,"fullscreen-collapse")):(this.$fullscreenButton.attr("aria-label",this.translate("enterFullScreen","Enter full screen")),this.getIcon(this.$fullscreenButton,"fullscreen-expand"))),void 0!==this.$bigPlayButton&&void 0!==this.seekBar&&(this.paused&&!this.seekBar.tracking?this.hideBigPlayButton||(this.$bigPlayButton.show(),this.$bigPlayButton.attr("aria-hidden","false")):(this.$bigPlayButton.hide(),this.$bigPlayButton.attr("aria-hidden","true"))),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&&(l=Math.floor(this.$transcriptDiv.scrollTop()+t(this.currentHighlight).position().top-this.$transcriptDiv.height()/2+t(this.currentHighlight).height()/2))!==Math.floor(this.$transcriptDiv.scrollTop())&&(this.scrollingTranscript=!0,this.movingHighlight&&(this.$transcriptDiv.scrollTop(l),this.movingHighlight=!1))),this.$chaptersButton&&this.$chaptersButton.attr({"aria-label":this.translate("chapters","Chapters"),"aria-haspopup":"true","aria-controls":this.mediaId+"-chapters-menu"}),n={stopped:this.translate("statusStopped","Stopped"),paused:this.translate("statusPaused","Paused"),playing:this.translate("statusPlaying","Playing"),buffering:this.translate("statusBuffering","Buffering"),ended:this.translate("statusEnd","End of track")},this.stoppingYouTube?(this.$status.text()!==this.translate("statusStopped","Stopped")&&this.$status.text(this.translate("statusStopped","Stopped")),this.getIcon(this.$playpauseButton,"play")):void 0!==this.$status&&void 0!==this.seekBar&&this.getPlayerState().then(function(t){s.$status.text()===n[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),r=(new Date).getTime(),s.statusDebounceStart?r-s.statusDebounceStart>s.statusMessageThreshold&&(s.$status.text(n[t]),s.statusDebounceStart=null,clearTimeout(s.statusTimeout),s.statusTimeout=null):(s.statusDebounceStart=r,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),s.getIcon(s.$playpauseButton,"play")):(s.$playpauseButton.attr("aria-label",s.tt.pause),s.getIcon(s.$playpauseButton,"pause")))}),this.fullscreen||(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.handlePlay=function(t){this.paused?(this.okToPlay=!0,this.playMedia(),this.synth.paused&&this.synth.resume()):(this.okToPlay=!1,this.pauseMedia(),this.speakingDescription&&this.synth.pause()),null===this.speechEnabled&&this.initSpeech("play")},AblePlayer.prototype.handleRestart=function(){this.speakingDescription&&this.synth.cancel(),this.seekTo(0)},AblePlayer.prototype.handlePrevTrack=function(){this.playlistIndex=0===this.playlistIndex?this.$playlist.length-1:this.playlistIndex--,this.cueingPlaylistItem=!0,this.cuePlaylistItem(this.playlistIndex)},AblePlayer.prototype.handleNextTrack=function(){this.playlistIndex=this.playlistIndex===this.$playlist.length-1?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||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,a,s;"html5"===this.player?this.setPlaybackRate(this.getPlaybackRate()+.25*t):"youtube"===this.player?this.youTubePlayerReady&&(e=this.youTubePlayer.getAvailablePlaybackRates(),i=this.getPlaybackRate(),-1===(a=e.indexOf(i))||(a+=t)<e.length&&a>=0&&this.setPlaybackRate(e[a])):"vimeo"===this.player&&(1===t?s=this.vimeoPlaybackRate+.5<=2?this.vimeoPlaybackRate+.5:2:-1===t&&(s=this.vimeoPlaybackRate-.5>=.5?this.vimeoPlaybackRate-.5:.5),this.setPlaybackRate(s))},AblePlayer.prototype.handleCaptionToggle=function(){var t,e,i=this;if(this.hidingPopup)return this.hidingPopup=!1,!1;if(1===(t=this.captions.length?this.captions:[]).length)if(!0===this.captionsOn)this.captionsOn=!1,this.prefCaptions=0,e=!1,this.updatePreferences("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.unloadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.disableTextTrack():this.$captionsWrapper.hide();else{this.captionsOn=!0,this.prefCaptions=1,e=!0,this.updatePreferences("prefCaptions"),this.usingYouTubeCaptions?this.youTubePlayer.loadModule("captions"):this.usingVimeoCaptions?this.vimeoPlayer.enableTextTrack(this.captionLang).then(function(t){}).catch(function(t){t.name}):this.$captionsWrapper.show();for(var a=0;a<t.length;a++)!0===t[a].def&&(this.selectedCaptions=t[a]);this.selectedCaptions=this.captions[0],this.descriptions.length>=0&&(this.selectedDescriptions=this.descriptions[0])}else this.captionsPopup&&this.captionsPopup.is(":visible")?(this.captionsPopup.hide(),this.hidingPopup=!1,this.$ccButton.attr("aria-expanded","false"),this.waitThenFocus(this.$ccButton)):(this.closePopups(),this.captionsPopup&&(this.captionsPopup.show(),this.$ccButton.attr("aria-expanded","true"),setTimeout(function(){i.captionsPopup.css("top",i.$ccButton.position().top-i.captionsPopup.outerHeight()),i.captionsPopup.css("left",i.$ccButton.position().left),i.captionsPopup.find("li").removeClass("able-focus"),i.captionsPopup.find("li").first().trigger("focus").addClass("able-focus")},50)));var s=t.length>1?this.translate("captions","Captions"):this.translate("showCaptions","Show captions"),n=t.length>1?this.translate("captions","Captions"):this.translate("hideCaptions","Hide captions");this.toggleButtonState(this.$ccButton,this.captionsOn,n,s,e)},AblePlayer.prototype.waitThenFocus=function(t,e){setTimeout(function(){t.trigger("focus")},null==e?50:e)},AblePlayer.prototype.handleChapters=function(){if(this.hidingPopup)return this.hidingPopup=!1,!1;this.chaptersPopup.is(":visible")?(this.chaptersPopup.hide(),this.hidingPopup=!1,this.$chaptersButton.attr("aria-expanded","false").trigger("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"]').trigger("focus").addClass("able-focus"):this.chaptersPopup.find("li").first().addClass("able-focus").attr("aria-checked","true").trigger("focus"))},AblePlayer.prototype.handleDescriptionToggle=function(){this.descOn=!this.descOn,this.prefDesc=+this.descOn,this.updatePreferences("prefDesc"),void 0!==this.$descDiv&&(this.$descDiv.is(":hidden")||this.$descDiv.hide()),this.initDescription(),this.refreshControls("descriptions")},AblePlayer.prototype.handlePrefsClick=function(t){var e,i,a,s;if(e=this,null===this.speechEnabled&&this.initSpeech("prefs"),this.hidingPopup)return this.hidingPopup=!1,!1;this.prefsPopup.is(":visible")?(this.prefsPopup.hide(),this.$prefsButton.attr("aria-expanded","false"),this.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","-1"),this.showingPrefsDialog||this.$prefsButton.trigger("focus"),setTimeout(function(){e.hidingPopup=!1},100)):(this.closePopups(),this.prefsPopup.show(),this.$prefsButton.attr("aria-expanded","true"),this.$prefsButton.trigger("focus"),setTimeout(function(){i=e.$prefsButton.position(),a=e.$ableDiv.width()-5,s=a-e.prefsPopup.width(),e.prefsPopup.css("top",i.top-e.prefsPopup.outerHeight()),e.prefsPopup.css("left",s),e.prefsPopup.find("li").removeClass("able-focus").attr("tabindex","0"),e.prefsPopup.find("li").first().trigger("focus").addClass("able-focus")},50))},AblePlayer.prototype.handleTranscriptToggle=function(){var t=this,e=this.$transcriptDiv.is(":visible");e?(this.$transcriptArea.hide(),this.toggleButtonState(this.$transcriptButton,!e,this.translate("hideTranscript","Hide transcript"),this.translate("showTranscript","Show transcript")),this.prefTranscript=0,"popup"===this.transcriptType&&(this.$transcriptButton.trigger("focus").addClass("able-focus"),setTimeout(function(){t.closingTranscript=!1},100))):"popup"===this.transcriptType?(this.positionDraggableWindow("transcript"),this.$transcriptArea.show(),this.$transcriptPopup.hide(),this.toggleButtonState(this.$transcriptButton,!e,this.translate("hideTranscript","Hide transcript"),this.translate("showTranscript","Show transcript")),this.prefTranscript=1,this.focusNotClick=!0,this.$transcriptArea.find("button").first().trigger("focus"),setTimeout(function(){t.focusNotClick=!1},100)):(this.toggleButtonState(this.$transcriptButton,!e,this.translate("hideTranscript","Hide transcript"),this.translate("showTranscript","Show transcript")),this.$transcriptArea.show()),this.updatePreferences("prefTranscript")},AblePlayer.prototype.handleSignToggle=function(){var t=this,e=this.$signWindow.is(":visible");e?(this.$signWindow.hide(),this.toggleButtonState(this.$signButton,!e,this.translate("hideSign","Hide sign language"),this.translate("showSign","Show sign language")),this.prefSign=0,this.$signButton.trigger("focus").addClass("able-focus"),setTimeout(function(){t.closingSign=!1},100)):(this.positionDraggableWindow("sign"),this.$signWindow.show(),this.$signPopup.hide(),this.toggleButtonState(this.$signButton,!e,this.translate("hideSign","Hide sign language"),this.translate("showSign","Show sign language")),this.prefSign=1,this.focusNotClick=!0,this.$signWindow.find("button").first().trigger("focus"),setTimeout(function(){t.focusNotClick=!1},100)),this.updatePreferences("prefSign")},AblePlayer.prototype.setFullscreen=function(e){if(this.fullscreen!=e){var i=this,a=this.$ableWrapper[0];if(this.nativeFullscreenSupported())if(e){var s={x:window.pageXOffset||0,y:window.pageYOffset||0};1===this.prefTranscript&&this.rePositionDraggableWindow("transcript"),1===this.prefSign&&this.rePositionDraggableWindow("sign"),this.scrollPosition=s,a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen(),this.fullscreen=!0}else this.restoringAfterFullscreen=!0,document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullscreen&&document.webkitCancelFullscreen(),1===this.prefTranscript&&this.positionDraggableWindow("transcript"),1===this.prefSign&&this.positionDraggableWindow("sign"),this.fullscreen=!1;t(document).on("fullscreenchange webkitfullscreenchange",function(t){i.fullscreen?i.clickedFullscreenButton||(i.fullscreen=!1,i.restoringAfterFullscreen=!0):i.restoringAfterFullscreen=!0,i.resizePlayer(),i.refreshControls("fullscreen"),i.scrollPosition&&(s=i.scrollPosition,window.scrollTo(s.x,s.y)),setTimeout(function(){i.clickedFullscreenButton=!1,i.restoringAfterFullscreen=!1},100)})}},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.updatePreferences("prefAutoScrollTranscript"),this.refreshControls("transcript")},AblePlayer.prototype.getIcon=function(e,i,a=!1){var s=this.iconType,n=this.getIconData(i);if(s=null===n[3]?"svg":s,s=!0===a?"img":s,!(e.find(s+"#ableplayer-"+i).length>0))if(e.find("svg, img, span").remove(),"font"===s){var r=t("<span>",{class:n[2]});e.append(r)}else if("svg"===s){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("focusable","false"),o.setAttribute("aria-hidden","true"),o.setAttribute("viewBox",n[0]),o.setAttribute("id","ableplayer-"+i);let t=function getNode(t,e){for(var i in t=document.createElementNS("http://www.w3.org/2000/svg",t),e)t.setAttributeNS(null,i.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),e[i]);return t}("path",{d:n[1]});o.appendChild(t),e.append(o),e.html(e.html())}else{var l=t("<img>",{src:n[3],alt:"",role:"presentation"});e.append(l),e.find("img").attr("src",n[3])}},AblePlayer.prototype.setText=function(t,e){t.attr("aria-label",e)},AblePlayer.prototype.toggleButtonState=function(t,e,i,a,s=!1,n=!1){let r=!!t.hasClass("buttonOff");r&&!e||!r&&e||(e?(t.removeClass("buttonOff").attr("aria-label",i),s&&t.attr("aria-pressed","true"),n&&t.attr("aria-expanded","true")):(t.addClass("buttonOff").attr("aria-label",a),s&&t.attr("aria-pressed","false"),n&&t.attr("aria-expanded","false")))},AblePlayer.prototype.showTooltip=function(t){t.show()},AblePlayer.prototype.showAlert=function(t,e="main"){var i,a,s;a=(i=this).$alertBox,s=i.$ableDiv,"transcript"===e?s=i.$transcriptArea:"sign"===e?s=i.$signWindow:"screenreader"===e&&(a=i.$srAlertBox),a.find("span").text(t),a.appendTo(s),a.css({display:"flex"}),"screenreader"!==e&&setTimeout(function(){a.hide()},3e4)},AblePlayer.prototype.showedAlert=function(t){return"transcript"===t?this.showedTranscriptAlert??!1:"sign"===t&&(this.showedSignAlert??!1)},AblePlayer.prototype.resizePlayer=function(e,i){var a,s,n,r;if("audio"!==this.mediaType){if(void 0!==e&&void 0!==i?(this.aspectRatio=i/e,this.playerWidth?(s=this.playerWidth,this.playerHeight?n=this.playerHeight:(n=Math.round(s*this.aspectRatio),this.playerHeight=n)):(s="html5"===this.player?t(window).width():this.$ableWrapper.width(),n=Math.round(s*this.aspectRatio))):this.fullscreen?(this.$ableWrapper.addClass("fullscreen"),s=t(window).width(),n=t(window).height()-this.$playerDiv.outerHeight()-5,this.positionCaptions("overlay")):(this.$ableWrapper.removeClass("fullscreen"),s="html5"===this.player?this.playerWidth?this.playerWidth:t(window).width():this.$ableWrapper.width(),n=Math.round(s*this.aspectRatio),this.positionCaptions(this.prefCaptionsPosition)),this.debug,"youtube"===this.player||"vimeo"===this.player?(r=this.$ableWrapper.find("iframe"),"youtube"===this.player&&this.youTubePlayer?this.youTubePlayer.setSize(s,n):r.attr({width:s,height:n}),this.playerWidth&&this.playerHeight&&(this.fullscreen?r.css({"max-width":"","max-height":""}):r.css({"max-width":this.playerWidth+"px","max-height":this.playerHeight+"px"}))):"html5"===this.player&&(this.fullscreen?(this.$media.attr({width:s,height:n}),this.$ableWrapper.css({width:s,height:n})):(this.$media.removeAttr("width height"),this.$ableWrapper.removeAttr("style"))),void 0!==this.$captionsDiv){var o=!1;window.screen.width<1200&&(o=!0),a=parseInt(this.prefCaptionsSize,10),this.fullscreen&&!o?a=a/100+"vw":this.fullscreen&&o?a="1.2rem":a+="%",this.$captionsDiv.css({"font-size":a})}this.refreshControls()}},AblePlayer.prototype.retrieveOffscreenWindow=function(t,e,i){var a,s,n,r,o,l,h,p;"transcript"==t?a=this.$transcriptArea:"sign"==t&&(a=this.$signWindow),l=a.width(),p=a.height(),n=(s=a.position()).top,o=(r=s.left)+l,h=n+p,n<0&&(n=10,a.css("top",n)),r<0&&(r=10,a.css("left",r)),o>e&&(r=e-20-l,a.css("left",r)),h>i&&(n=i-10-p,a.css("top",n))},AblePlayer.prototype.updateZIndex=function(t){var e,i,a,s,n,r;if(e=8e3,i=7e3,void 0===this.$transcriptArea||void 0===this.$signWindow)return void 0!==this.$transcriptArea?(a=parseInt(this.$transcriptArea.css("z-index")))>i&&this.$transcriptArea.css("z-index",i):void 0!==this.$signWindow&&(s=parseInt(this.$signWindow.css("z-index")))>e&&this.$signWindow.css("z-index",e),!1;if((a=parseInt(this.$transcriptArea.css("z-index")))===(s=parseInt(this.$signWindow.css("z-index"))))n=e,r=i;else if(a>s){if("transcript"===t)return!1;n=a,r=s}else{if("sign"===t)return!1;n=s,r=a}"transcript"===t?(this.$transcriptArea.css("z-index",n),this.$signWindow.css("z-index",r)):"sign"===t&&(this.$signWindow.css("z-index",n),this.$transcriptArea.css("z-index",r))},AblePlayer.prototype.syncTrackLanguages=function(t,e){var i,a,s,n,r;for(i=0;i<this.captions.length;i++)this.captions[i].language===e&&(a=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&&(s=this.descriptions[i]);for(i=0;i<this.meta.length;i++)this.meta[i].language===e&&(r=this.meta[i]);if(this.transcriptLang=e,"init"===t||"captions"===t?(this.captionLang=e,this.selectedCaptions=a,this.selectedChapters=n,this.selectedDescriptions=s,this.selectedMeta=r,this.transcriptCaptions=a,this.transcriptChapters=n,this.transcriptDescriptions=s,this.updateChaptersList()):"transcript"===t&&(this.transcriptCaptions=a,this.transcriptChapters=n,this.transcriptDescriptions=s),this.selectedDescriptions&&(this.setDescriptionVoice(),this.$sampleDescDiv&&this.sampleText))for(i=0;i<this.sampleText.length;i++)this.sampleText[i].lang===this.selectedDescriptions.language&&(this.currentSampleText=this.sampleText[i].text,this.$sampleDescDiv.html(this.currentSampleText));this.updateTranscript()}}(jQuery),function(t){AblePlayer.prototype.updateCaption=function(t){this.usingYouTubeCaptions||this.usingVimeoCaptions||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?e.youTubePlayer.getOptions("captions")&&e.startedPlaying?e.youTubePlayer.setOption("captions","track",{languageCode:e.captionLang}):e.captionLangPending=e.captionLang:e.youTubePlayer.getOptions("captions")?e.youTubePlayer.setOption("captions","track",{languageCode:e.captionLang}):(e.youTubePlayer.loadModule("captions"),e.captionLangPending=e.captionLang):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(),e.$ccButton.attr("aria-expanded","false"),"audio"===e.mediaType&&e.$captionsContainer.removeClass("captions-off"),setTimeout(function(){e.hidingPopup=!1},100),e.updateCaptionsMenu(e.captionLang),e.waitThenFocus(e.$ccButton),e.prefCaptions=1,e.updatePreferences("prefCaptions"),e.refreshControls("captions")}},AblePlayer.prototype.getCaptionOffFunction=function(){var t=this;return function(){"youtube"==t.player?t.youTubePlayer.unloadModule("captions"):t.usingVimeoCaptions&&t.vimeoPlayer.disableTextTrack(),t.captionsOn=!1,t.currentCaption=-1,"audio"===t.mediaType&&t.$captionsContainer.addClass("captions-off"),t.hidingPopup=!0,t.captionsPopup.hide(),t.$ccButton.attr("aria-expanded","false"),setTimeout(function(){t.hidingPopup=!1},100),t.updateCaptionsMenu(),t.waitThenFocus(t.$ccButton),t.prefCaptions=0,t.updatePreferences("prefCaptions"),this.swappingSrc||(t.refreshControls("captions"),t.updateCaption())}},AblePlayer.prototype.showCaptions=function(t){var e,i,a,s;for(s=this.selectedCaptions.cues.length?this.selectedCaptions.cues:this.captions.length>=1?this.captions[0].cues:[],e=0;e<s.length;e++)if(s[e].start<=t&&s[e].end>t){i=e;break}void 0!==i?this.currentCaption!==i&&(a=this.flattenCueForCaption(s[i]).replace(/\n/g,"<br>"),this.$captionsDiv.html(a),this.currentCaption=i,0===a.length?this.$captionsDiv.css("display","none"):this.$captionsDiv.css("display","inline-block")):(this.$captionsDiv.html("").css("display","none"),this.currentCaption=-1)},AblePlayer.prototype.flattenCueForCaption=function(t){var e=[],flattenComponent=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(flattenComponent(t.children[e]));else if("i"===t.type){for(i.push("<em>"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));i.push("</em>")}else if("b"===t.type){for(i.push("<strong>"),e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));i.push("</strong>")}else for(e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));return i.join("")};if(void 0!==t.components)for(var i=0;i<t.components.children.length;i++)e.push(flattenComponent(t.components.children[i]));return e.join("")},AblePlayer.prototype.getCaptionsOptions=function(t){var e=[];switch(t){case"prefCaptionsFont":e[0]=["serif",this.translate("serif","serif")],e[1]=["sans-serif",this.translate("sans","sans-serif")],e[2]=["cursive",this.translate("cursive","cursive")],e[3]=["fantasy",this.translate("fantasy","fantasy")],e[4]=["monospace",this.translate("monospace","monospace")];break;case"prefCaptionsColor":case"prefCaptionsBGColor":e[0]=["white",this.translate("white","white")],e[1]=["yellow",this.translate("yellow","yellow")],e[2]=["green",this.translate("green","green")],e[3]=["cyan",this.translate("cyan","cyan")],e[4]=["blue",this.translate("blue","blue")],e[5]=["magenta",this.translate("magenta","magenta")],e[6]=["red",this.translate("red","red")],e[7]=["black",this.translate("black","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.translate("captionsStylePopOn","Pop-on"),e[1]=this.translate("captionsStyleRollUp","Roll-up");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(e,i){var a,s,n;void 0!==e&&("prefCaptionsPosition"==i?this.positionCaptions():void 0!==i?("prefCaptionsFont"===i?a="font-family":"prefCaptionsSize"===i?a="font-size":"prefCaptionsColor"===i?a="color":"prefCaptionsBGColor"===i?a="background-color":"prefCaptionsOpacity"===i&&(a="opacity"),s="prefCaptionsOpacity"===i?parseFloat(t("#"+this.mediaId+"_"+i).val())/100:t("#"+this.mediaId+"_"+i).val(),e.css(a,s)):(n=parseFloat(this.prefCaptionsOpacity)/100,e.css({"font-family":this.prefCaptionsFont,color:this.prefCaptionsColor,"background-color":this.prefCaptionsBGColor,opacity:n}),e===this.$captionsDiv&&void 0!==this.$captionsDiv&&this.$captionsDiv.css({"font-size":this.prefCaptionsSize}),"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(t){AblePlayer.prototype.populateChaptersDiv=function(){var e,i,a;this.chaptersDivLocation&&t("#"+this.chaptersDivLocation)&&(this.$chaptersDiv=t("#"+this.chaptersDivLocation),this.$chaptersDiv.addClass("able-chapters-div"),this.$chaptersDiv.empty(),this.chaptersTitle&&(e="h"+this.getNextHeadingLevel(this.$chaptersDiv).toString(),i=this.mediaId+"-chapters-heading",a=t("<"+e+">",{class:"able-chapters-heading",id:i}).text(this.chaptersTitle),this.$chaptersDiv.append(a)),this.$chaptersNav=t("<nav>"),this.chaptersTitle?this.$chaptersNav.attr("aria-labelledby",i):this.$chaptersNav.attr("aria-label",this.translate("chapters","Chapters")),this.$chaptersDiv.append(this.$chaptersNav),this.updateChaptersList())},AblePlayer.prototype.updateChaptersList=function(){var e,i,a,s,n,r,o,l,h,p;if(e=this,!this.$chaptersNav)return!1;if(void 0===this.useChapterTimes&&(this.useChapterTimes=!("chapter"!==this.seekbarScope||!this.selectedChapters.cues.length)),(i=this.useChapterTimes?this.selectedChapters.cues:this.chapters.length>=1?this.chapters[0].cues:[]).length>0){for(p=t("<ul>"),a=0;a<i.length;a++)s=a,n=t("<li></li>"),l=function(i){return function(){e.seekTrigger="chapter",h=t(this).closest("li"),(p=t(this).closest("ul").find("li")).removeClass("able-current-chapter").children("button").removeAttr("aria-current"),h.addClass("able-current-chapter").children("button").attr("aria-current","true"),e.updateChapter(i),e.seekTo(i)}},(r=t("<button>",{type:"button",val:s}).text(this.flattenCueForCaption(i[s]))).on("click",l(i[s].start)),r.on("focus",function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).closest("li").addClass("able-focus")}),n.on("hover",function(){t(this).closest("ul").find("li").removeClass("able-focus"),t(this).addClass("able-focus")}),n.on("mouseleave",function(){t(this).removeClass("able-focus")}),r.on("blur",function(){t(this).closest("li").removeClass("able-focus")}),n.append(r),p.append(n),this.defaultChapter===i[s].id&&(r.attr("aria-current","true").parent("li").addClass("able-current-chapter"),this.currentChapter=i[s],o=!0);o||(this.currentChapter=i[0],p.find("button").first().attr("aria-current","true").parent("li").addClass("able-current-chapter")),this.$chaptersNav.html(p)}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,a;for(e=this.selectedChapters.cues,i=0;i<e.length;i++)if(e[i].start<=t&&e[i].end>t){a=i;break}void 0!==a&&this.currentChapter!==e[a]&&(this.currentChapter=e[a],this.useChapterTimes&&(this.chapterDuration=this.getChapterDuration(),this.seekIntervalCalculated=!1),void 0!==this.$chaptersDiv&&(this.$chaptersDiv.find("ul").find("li").removeClass("able-current-chapter").children("button").removeAttr("aria-current"),this.$chaptersDiv.find("ul").find("li").eq(a).addClass("able-current-chapter").children("button").attr("aria-current","true")))}},AblePlayer.prototype.getChapterDuration=function(){var t,e;return void 0===this.currentChapter||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){var e=this.currentChapter.start+t;return e>this.currentChapter.end?this.currentChapter.end:e}return t},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.trigger("focus")}}}(jQuery),function(t){AblePlayer.prototype.updateMeta=function(t){this.hasMeta&&("text"===this.metaType?(this.$metaDiv.show(),this.showMeta(t||this.elapsed)):this.showMeta(t||this.elapsed))},AblePlayer.prototype.showMeta=function(e){var i,a,s,n,r,o,l,h,p;for(i=[],n=this.meta.length>=1?this.meta:[],a=0;a<n.length;a++)if(n[a].start<=e&&n[a].end>e){s=a;break}if(void 0!==s){if(this.currentMeta!==s)if("text"===this.metaType)this.$metaDiv.html(this.flattenCueForMeta(n[s]).replace(/\n/g,"<br>"));else if("selector"===this.metaType){for(r=this.flattenCueForMeta(n[s]).split("\n"),o=0;o<r.length;o++)if("pause"===(l=r[o].trim()).toLowerCase().trim())this.hideBigPlayButton=!0,this.pauseMedia();else if("focus:"==l.toLowerCase().substring(0,6))p=l.substring(6).trim(),t(p).length&&t(p).trigger("focus");else if(t(l).length){if(this.currentMeta=s,void 0===(h=parseInt(t(l).attr("data-duration")))||isNaN(h))t(l).show();else{t(l).show();(t=>new Promise(e=>setTimeout(e,t)))(h).then(()=>{t(l).hide()})}this.visibleSelectors.push(l),i.push(l)}if(this.visibleSelectors&&this.visibleSelectors.length&&this.visibleSelectors.length!==i.length)for(o=this.visibleSelectors.length-1;o>=0;o--)-1==t.inArray(this.visibleSelectors[o],i)&&(t(this.visibleSelectors[o]).hide(),this.visibleSelectors.splice(o,1))}}else{if(void 0!==this.$metaDiv&&this.$metaDiv.html(""),this.visibleSelectors&&this.visibleSelectors.length){for(o=0;o<this.visibleSelectors.length;o++)t(this.visibleSelectors[o]).hide();this.visibleSelectors=[]}this.currentMeta=-1}},AblePlayer.prototype.flattenCueForMeta=function(t){for(var e=[],flattenComponent=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(flattenComponent(t.children[e]));else for(e=0;e<t.children.length;e++)i.push(flattenComponent(t.children[e]));return i.join("")},i=0;i<t.components.children.length;i++)e.push(flattenComponent(t.components.children[i]));return e.join("")}}(jQuery),function(t){AblePlayer.prototype.setupTranscript=function(){var t=new this.defer,e=t.promise();return this.usingYouTubeCaptions||this.usingVimeoCaptions||this.hideTranscriptButton?(this.transcriptType=null,t.resolve()):(this.transcriptType||this.captions.length&&(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 e,i,a,s,n;if(this.$transcriptArea=t("<div>",{class:"able-transcript-area",role:"dialog","aria-label":this.translate("transcriptTitle","Transcript")}),this.$transcriptToolbar=t("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$transcriptDiv=t("<div>",{class:"able-transcript"}),this.$autoScrollTranscriptCheckbox=t("<input>",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),e=t("<label>",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.translate("autoScroll","Auto scroll")),$autoScrollContainer=t("<div>",{class:"autoscroll-transcript"}),$autoScrollContainer.append(e,this.$autoScrollTranscriptCheckbox),this.$transcriptToolbar.append($autoScrollContainer),this.captions.length>1)for(i=t("<div>",{class:"transcript-language-select-wrapper"}),a=t("<label>",{for:"transcript-language-select-"+this.mediaId}).text(this.translate("language","Language")),this.$transcriptLanguageSelect=t("<select>",{id:"transcript-language-select-"+this.mediaId}),s=0;s<this.captions.length;s++)n=t("<option></option>",{value:this.captions[s].language,lang:this.captions[s].language}).text(this.captions[s].label),this.captions[s].def&&n.prop("selected",!0),this.$transcriptLanguageSelect.append(n);i&&(i.append(a,this.$transcriptLanguageSelect),this.$transcriptToolbar.append(i)),this.$transcriptArea.append(this.$transcriptToolbar,this.$transcriptDiv),this.transcriptDivLocation?(this.$transcriptArea.removeAttr("role"),this.$transcriptArea.removeAttr("aria-label"),t("#"+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 t=this;this.$autoScrollTranscriptCheckbox.on("click",function(){t.handleTranscriptLockToggle(t.$autoScrollTranscriptCheckbox.prop("checked"))}),this.$transcriptDiv.on("mousewheel DOMMouseScroll click scroll",function(e){t.scrollingTranscript||(t.autoScrollTranscript=!1,t.refreshControls("transcript")),t.scrollingTranscript=!1}),void 0!==this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.on("click",function(t){t.stopPropagation()}),this.$transcriptLanguageSelect.on("change",function(){var e=t.$transcriptLanguageSelect.val();t.syncTrackLanguages("transcript",e)}))},AblePlayer.prototype.transcriptSrcHasRequiredParts=function(){return!!(t("#"+this.transcriptSrc).length&&(this.$transcriptArea=t("#"+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(){var e,i;e=t("<input>",{id:"autoscroll-transcript-checkbox-"+this.mediaId,type:"checkbox"}),i=t("<label>",{for:"autoscroll-transcript-checkbox-"+this.mediaId}).text(this.translate("autoScroll","Auto scroll")),this.$autoScrollTranscriptCheckbox=e,this.$transcriptToolbar.append(i,this.$autoScrollTranscriptCheckbox)},AblePlayer.prototype.updateTranscript=function(){if(this.transcriptType&&(!this.playerCreated||this.$transcriptArea)){if("external"===this.transcriptType||"popup"===this.transcriptType){var e,i,a;if(this.transcriptLang?i=this.transcriptCaptions.cues:this.transcriptCaptions?(this.transcriptLang=this.transcriptCaptions.language,i=this.transcriptCaptions.cues):this.selectedCaptions&&(this.transcriptLang=this.captionLang,i=this.selectedCaptions.cues),this.transcriptChapters)e=this.transcriptChapters.cues;else if(this.chapters.length>0){if(this.transcriptLang)for(var s=0;s<this.chapters.length;s++)this.chapters[s].language===this.transcriptLang&&(e=this.chapters[s].cues);void 0===e&&(e=this.chapters[0].cues||[])}if(this.transcriptDescriptions)a=this.transcriptDescriptions.cues;else if(this.descriptions.length>0){if(this.transcriptLang)for(s=0;s<this.descriptions.length;s++)this.descriptions[s].language===this.transcriptLang&&(a=this.descriptions[s].cues);a||(a=this.descriptions[0].cues||[])}var n=this.generateTranscript(e||[],i||[],a||[]);this.$transcriptDiv.html(n),this.$transcriptLanguageSelect&&(this.$transcriptLanguageSelect.find("option:selected").prop("selected",!1),this.$transcriptLanguageSelect.find("option[lang="+this.transcriptLang+"]").prop("selected",!0))}var r=this;1===this.prefTabbable&&this.$transcriptDiv.find("span.able-transcript-seekpoint").attr("tabindex","0"),this.$transcriptArea.length>0&&this.$transcriptArea.find("span.able-transcript-seekpoint").on("click",function(e){r.seekTrigger="transcript";var i=parseFloat(t(this).attr("data-start"));i+=.01,r.seekingFromTranscript?r.seekingFromTranscript=!1:(r.seekingFromTranscript=!0,r.seekTo(i))})}},AblePlayer.prototype.highlightTranscript=function(e){if(this.transcriptType){var i,a,s,n=this;e=parseFloat(e),this.$transcriptArea.find("span.able-transcript-seekpoint").each(function(){if(i=parseFloat(t(this).attr("data-start")),a=parseFloat(t(this).attr("data-end")),s=!!t(this).parent().hasClass("able-transcript-chapter-heading"),e>=i&&e<=a&&!s)return t(this).hasClass("able-highlight")||(n.$transcriptArea.find(".able-highlight").removeClass("able-highlight"),t(this).addClass("able-highlight"),n.movingHighlight=!0),!1}),n.currentHighlight=n.$transcriptArea.find(".able-highlight"),0===n.currentHighlight.length&&(n.currentHighlight=null)}},AblePlayer.prototype.generateTranscript=function(e,i,a){var s,n=this,r=t('<div class="able-transcript-container"></div>');if(r.attr("lang",this.transcriptLang),s=void 0!==this.transcriptTitle?this.transcriptTitle:this.lyricsMode?this.translate("lyricsTitle","Lyrics"):this.translate("transcriptTitle","Transcript"),!this.transcriptDivLocation){var o=this.playerHeadingLevel,l=(o+=1)+1;if(o<=6)var h="h"+o.toString();else h="div";var p=t("<"+h+">");p.addClass("able-transcript-heading"),o>6&&p.attr({role:"heading","aria-level":o}),p.text(s),p.attr("lang",this.lang),r.append(p)}for(var c=0,u=0,d=0,addChapter=function(e,i){if(l<=6)var a="h"+l.toString();else a="div";var s=t("<"+a+">",{class:"able-transcript-chapter-heading"});l>6&&s.attr({role:"heading","aria-level":l});for(var flattenComponentForChapter=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(flattenComponentForChapter(t.children[i]));return e},n=t("<span>",{class:"able-transcript-seekpoint"}),r=0;r<i.components.children.length;r++)for(var o=flattenComponentForChapter(i.components.children[r]),h=0;h<o.length;h++)n.append(o[h]);n.attr("data-start",i.start.toString()),n.attr("data-end",i.end.toString()),s.append(n),e.append(s)},addDescription=function(e,i){var a=t("<div>",{class:"able-transcript-desc"}),s=t("<span>",{class:"able-hidden"});s.attr("lang",n.lang),s.text(n.tt.prefHeadingDescription+": "),a.append(s);for(var flattenComponentForDescription=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(flattenComponentForDescription(t.children[i]));return e},r=t("<span>",{class:"able-transcript-seekpoint"}),o=0;o<i.components.children.length;o++)for(var l=flattenComponentForDescription(i.components.children[o]),h=0;h<l.length;h++)r.append(l[h]);r.attr("data-start",i.start.toString()),r.attr("data-end",i.end.toString()),a.append(r),e.append(a)},addCaption=function(e,i){for(var a=t("<span>",{class:"able-transcript-seekpoint able-transcript-caption"}),flattenComponentForCaption=function(e){var i=[],a=0,flattenString=function(t){var e;a++;var i=[];if(""===t)return i;var s=t.indexOf("["),n=t.indexOf("]"),r=t.indexOf("("),o=t.indexOf(")"),l=-1!==s&&-1!==n,h=-1!==r&&-1!==o;if(h||l){if(a>1)var p="<br/>";else p="";var c=p+'<span class="able-unspoken">',u="</span>";h&&l&&(s<r?h=!1:l=!1)}return h?(e=t.substring(0,r),e+=c,e+=t.substring(r,o+1),e+=u,e+=flattenString(t.substring(o+1)),i.push(e)):l?(e=t.substring(0,s),e+=c,e+=t.substring(s,n+1),e+=u,e+=flattenString(t.substring(n+1)),i.push(e)):i.push(t),i};if("string"===e.type)i=i.concat(flattenString(e.value));else if("v"===e.type){var s=t("<span>",{class:"able-unspoken"});e.value=e.value.replace(/^title="|\"$/g,""),s.text("("+e.value+")"),i.push(s);for(var n=0;n<e.children.length;n++)for(var r=flattenComponentForCaption(e.children[n]),o=0;o<r.length;o++)i.push(r[o])}else if("b"===e.type||"i"===e.type){if("b"===e.type)var l=t("<strong>");else if("i"===e.type)l=t("<em>");for(n=0;n<e.children.length;n++)for(r=flattenComponentForCaption(e.children[n]),o=0;o<r.length;o++)l.append(r[o]);"b"!==e.type&&"i"!=e.type||i.push(l)}else for(n=0;n<e.children.length;n++)i=i.concat(flattenComponentForCaption(e.children[n]));return i},s=0;s<i.components.children.length;s++){var r;s<i.components.children.length-1&&(r=i.components.children[s+1].tagName);for(var o=flattenComponentForCaption(i.components.children[s]),l=0;l<o.length;l++){var h=o[l];"string"==typeof h&&(n.lyricsMode?(h=h.replace(/\n/g,"<br>"),(!r||"i"!==r&&"b"!==r)&&(h+="<br>")):h+=" "),a.append(h)}}a.attr("data-start",i.start.toString()),a.attr("data-end",i.end.toString()),e.append(a),e.append(" \n")};c<e.length||d<a.length||u<i.length;){if(c<e.length&&d<a.length&&u<i.length)var f=Math.min(e[c].start,a[d].start,i[u].start);else if(c<e.length&&d<a.length)f=Math.min(e[c].start,a[d].start);else if(c<e.length&&u<i.length)f=Math.min(e[c].start,i[u].start);else if(d<a.length&&u<i.length)f=Math.min(a[d].start,i[u].start);else f=null;null!==f?void 0!==e[c]&&e[c].start===f?(addChapter(r,e[c]),c+=1):void 0!==a[d]&&a[d].start===f?(addDescription(r,a[d]),d+=1):(addCaption(r,i[u]),u+=1):c<e.length?(addChapter(r,e[c]),c+=1):d<a.length?(addDescription(r,a[d]),d+=1):u<i.length&&(addCaption(r,i[u]),u+=1)}var g=r.children(),m=0;return g.each(function(){t(this).hasClass("able-transcript-caption")?(-1===t(this).text().indexOf("[")&&-1===t(this).text().indexOf("(")||m>0&&(r=wrapTranscriptBlocks(r),m=0),t(this).addClass("able-block-temp"),m++):m>0&&(r=wrapTranscriptBlocks(r),m=0)}),r=wrapTranscriptBlocks(r)};var wrapTranscriptBlocks=function(t){return t.find(".able-block-temp").removeClass("able-block-temp").wrapAll('<div class="able-transcript-block"></div>'),t}}(jQuery),function(t){AblePlayer.prototype.showSearchResults=function(){var e=this;if(this.searchDiv&&this.searchString){var i=DOMPurify.sanitize(this.searchString);if(t("#"+this.SearchDiv)){var a="<p>"+this.translate("resultsSummary1","You searched for:")+" ";a+='<span id="able-search-term-echo">'+i+"</span>",a+="</p>";var s=this.searchFor(i,this.searchIgnoreCaps);if(s.length>0){var n=t("<p>",{class:"able-search-results-summary"}),r=this.translate("resultsSummary2","Found %1 matching items.",["<strong>"+s.length+"</strong>"]);r+=" "+this.translate("resultsSummary3","Click the time associated with any item to play the video from that point."),n.html(r);for(var o=t("<ul>"),l=0;l<s.length;l++){var h="aria-search-result-"+l,p=t("<li>",{}),c=this.secondsToTime(s[l].start),u=this.translate("searchButtonLabel","Play at %1",[c.title]),d=t("<button>",{class:"able-search-results-time","data-start":s[l].start,title:u,"aria-label":u,"aria-describedby":h});d.text(c.value),d.on("click",function(i){e.seekTrigger="search";var a=parseFloat(t(this).attr("data-start"));a+=.01,e.seeking=!0,e.seekTo(a)});var f=t("<span>",{class:"able-search-result-text",id:h});f.html("..."+s[l].caption+"..."),p.append(d,f),o.append(p)}t("#"+this.searchDiv).html(a).append(n,o)}else{var g=t("<p>").text(this.translate("noResultsFound","No results found."));t("#"+this.searchDiv).html(a).append(g)}}}},AblePlayer.prototype.searchFor=function(e,i){var a,s,n,r,o,l,h;n=[];var p=e.split(" ");if(this.captions.length>0){for(l=0;l<this.captions.length;l++)this.captions[l].language===this.searchLang&&(a=this.searchLang,s=this.captions[l].cues);if(s.length>0)for(o=0,l=0;l<s.length;l++)if(-1!==t.inArray(s[l].components.children[0].type,["string","i","b","u","v","c"])){r=this.flattenCueForCaption(s[l]);var c=i?r.toLowerCase():r;for(h=0;h<p.length;h++){var u=i?p[h].toLowerCase():p[h];if(-1!==c.indexOf(u)){n[o]=[],n[o].start=s[l].start,n[o].lang=a,n[o].caption=this.highlightSearchTerm(p,r),o++;break}}}}return n},AblePlayer.prototype.highlightSearchTerm=function(t,e){return t.forEach(function(t){var i=new RegExp(t,"gi");e=e.replace(i,'<span class="able-search-term">$&</span>')}),e},AblePlayer.prototype.secondsToTime=function(t){t=Math.floor(t);var e=parseInt(t/3600,10)%24,i=parseInt(t/60,10)%60,a=t%60,s="",n="";e>0&&(s+=e+":",n+=1==e?"1 "+this.translate("hour","hour")+" ":e+" "+this.translate("hours","hours")+" "),i<10?(s+="0"+i+":",i>0&&(n+=1==i?"1 "+this.translate("minute","minute")+" ":i+" "+this.translate("minutes","minutes")+" ")):(s+=i+":",n+=i+" "+this.translate("minutes","minutes")+" "),a<10?(s+="0"+a,a>0&&(n+=1==a?"1 "+this.translate("second","second")+" ":a+" "+this.translate("seconds","seconds")+" ")):(s+=a,n+=a+" "+this.translate("seconds","seconds")+" ");var r=[];return r.value=s,r.title=n,r}}(jQuery),function(t){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.duration>0&&(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()},AblePlayer.prototype.onMediaNewSourceLoad=function(){var t=!1;this.cueingPlaylistItem&&(this.cueingPlaylistItem=!1),this.recreatingPlayer&&(this.recreatingPlayer=!1),this.playbackRate&&this.setPlaybackRate(this.playbackRate),this.userClickedPlaylist?this.startedPlaying&&!this.okToPlay||(this.playMedia(),t=!0):"restart"==this.seekTrigger||"chapter"==this.seekTrigger||"transcript"==this.seekTrigger||"search"==this.seekTrigger?(this.playMedia(),t=!0):this.swappingSrc?this.hasPlaylist?(this.playlistIndex!==this.$playlist.length||this.loop)&&(this.playMedia(),t=!0):this.swapTime>0?"complete"===this.seekStatus?(this.okToPlay&&this.playMedia(),t=!0):"seeking"===this.seekStatus||(this.swapTime===this.elapsed?(this.seekStatus="complete",this.okToPlay&&this.playMedia(),t=!0):this.hasDescTracks?t=!0:this.durationsAreCloseEnough(this.duration,this.prevDuration)?(this.seekStatus="seeking",this.seekTo(this.swapTime)):t=!0):this.playing&&(this.playMedia(),t=!0):this.startedPlaying?this.hasPlaylist?(this.playlistIndex!==this.$playlist.length||this.loop)&&(this.playMedia(),t=!0):t=!0:this.startTime>0?this.seeking?(this.seeking=!1,this.okToPlay&&this.playMedia(),t=!0):this.seekTo(this.startTime):this.defaultChapter&&void 0!==this.selectedChapters?this.seekToChapter(this.defaultChapter):(this.okToPlay&&this.playMedia(),t=!0),t&&(this.swappingSrc=!1,this.seekStatus=null,this.swapTime=0,this.seekTrigger=null,this.seekingFromTranscript=!1,this.userClickedPlaylist=!1,this.okToPlay=!1),this.refreshControls(),this.$focusedElement&&(this.restoreFocus(),this.$focusedElement=null,this.activeMedia=null)},AblePlayer.prototype.durationsAreCloseEnough=function(t,e){return Math.abs(Math.round(t)-Math.round(e))<=1},AblePlayer.prototype.restoreFocus=function(){var e,i;this.$focusedElement&&null!==this.activeMedia&&(i=t("#"+this.activeMedia).closest(".able"),"button"===this.$focusedElement.attr("role")&&(e=this.$focusedElement.attr("class").split(/\s+/),t.each(e,function(t,e){"able-button-handler-"===e.substring(0,20)&&i.find("div.able-controller div."+e).trigger("focus")})))},AblePlayer.prototype.addSeekbarListeners=function(){var t=this;this.seekBar.bodyDiv.on("startTracking",function(e){t.pausedBeforeTracking=t.paused,t.pauseMedia()}).on("tracking",function(e,i){t.highlightTranscript(i),t.updateCaption(i),t.showDescription(i),t.updateChapter(t.convertChapterTimeToVideoTime(i)),t.updateMeta(i),t.refreshControls()}).on("stopTracking",function(e,i){t.useChapterTimes?t.seekTo(t.convertChapterTimeToVideoTime(i)):t.seekTo(i),t.pausedBeforeTracking||setTimeout(function(){t.playMedia()},200)})},AblePlayer.prototype.onClickPlayerButton=function(e){var i;switch(this.getButtonNameFromClass(t(e).attr("class"))){case"play":this.clickedPlay=!0,this.handlePlay();break;case"restart":this.seekTrigger="restart",this.handleRestart();break;case"previous":this.userClickedPlaylist=!0,this.okToPlay=!0,this.seekTrigger="previous",this.buttonWithFocus="previous",this.handlePrevTrack();break;case"next":this.userClickedPlaylist=!0,this.okToPlay=!0,this.seekTrigger="next",this.buttonWithFocus="next",this.handleNextTrack();break;case"rewind":this.seekTrigger="rewind",this.handleRewind();break;case"forward":this.seekTrigger="forward",this.handleFastForward();break;case"mute":this.handleMute();break;case"volume":this.handleVolumeButtonClick();break;case"faster":this.handleRateIncrease();break;case"slower":this.handleRateDecrease();break;case"captions":this.handleCaptionToggle();break;case"chapters":this.handleChapters();break;case"descriptions":this.handleDescriptionToggle();break;case"sign":this.closingSign||this.handleSignToggle();break;case"preferences":"menu"===t(e).attr("data-prefs-popup")?this.handlePrefsClick():(this.showingPrefsDialog=!0,this.closePopups(),"keyboard"===(i=t(e).attr("data-prefs-popup"))?this.keyboardPrefsDialog.show():"captions"===i?this.captionPrefsDialog.show():"descriptions"===i?this.descPrefsDialog.show():"transcript"===i&&this.transcriptPrefsDialog.show(),this.showingPrefsDialog=!1);break;case"transcript":this.closingTranscript||this.handleTranscriptToggle();break;case"fullscreen":this.clickedFullscreenButton=!0,this.handleFullscreenToggle()}},AblePlayer.prototype.getButtonNameFromClass=function(t){var e,i;for(e=t.split(" "),i=0;i<e.length;i++)if("able-button-handler-"===e[i].substring(0,20))return e[i].substring(20);return t},AblePlayer.prototype.okToHandleKeyPress=function(){let e=!0;1===this.prefNoKeyShortcuts&&(e=!1);var i=AblePlayer.getActiveDOMElement();return"INPUT"!==t(i).prop("tagName")&&e},AblePlayer.prototype.onPlayerKeyPress=function(e){var i,a;return i=e.key,a=t(document.activeElement),"Escape"===i&&this.$transcriptArea&&t.contains(this.$transcriptArea[0],a[0])&&!this.hidingPopup?(this.handleTranscriptToggle(),!1):!!this.okToHandleKeyPress()&&void(t(":focus").is("[contenteditable]")||t(":focus").is("input")||t(":focus").is("textarea")&&!this.stenoMode||t(":focus").is("select")||e.target.hasAttribute("contenteditable")||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName&&!this.stenoMode||"SELECT"===e.target.tagName||("Escape"===i?(this.closePopups(),this.$tooltipDiv.hide(),this.seekBar.hideSliderTooltips()):" "===i?"button"===a.attr("role")&&(e.preventDefault(),a.trigger("click")):"p"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePlay()):"s"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleRestart()):"m"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleMute()):"v"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleVolumeButtonClick()):i>=0&&i<=9?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleVolumeKeystroke(i)):"c"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleCaptionToggle()):"d"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleDescriptionToggle()):"f"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleFastForward()):"r"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleRewind()):"b"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePrevTrack()):"n"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handleNextTrack()):"e"===i?this.usingModifierKeys(e)&&(e.preventDefault(),this.handlePrefsClick()):"Enter"===i&&("button"===a.attr("role")||"SPAN"===a.prop("tagName")||"LI"===a.prop("tagName"))&&a.trigger("click")))},AblePlayer.prototype.addHtml5MediaListeners=function(){var t=this;this.$media.on("emptied",function(){}).on("loadedmetadata",function(){t.duration=t.media.duration}).on("canplay",function(){}).on("canplaythrough",function(){t.onMediaNewSourceLoad()}).on("play",function(){}).on("playing",function(){t.playing=!0,t.paused=!1,t.swappingSrc=!1,t.refreshControls("playpause")}).on("ended",function(){t.playing=!1,t.paused=!0,t.onMediaComplete()}).on("progress",function(){t.refreshControls("timeline")}).on("waiting",function(){}).on("durationchange",function(){t.refreshControls("timeline")}).on("timeupdate",function(){t.onMediaUpdateTime()}).on("pause",function(){t.clickedPlay?(t.playing=!1,t.paused=!0):t.hasPlaylist||t.swappingSrc||(t.playing=!1,t.paused=!0),t.clickedPlay=!1,t.onMediaPause()}).on("ratechange",function(){}).on("volumechange",function(){t.volume=t.getVolume()}).on("error",function(){t.debug&&t.media.error.code})},AblePlayer.prototype.addVimeoListeners=function(){var t=this;this.vimeoPlayer.on("loaded",function(e){t.onMediaNewSourceLoad()}),this.vimeoPlayer.on("play",function(e){t.playing=!0,t.startedPlaying=!0,t.paused=!1,t.refreshControls("playpause")}),this.vimeoPlayer.on("ended",function(e){t.playing=!1,t.paused=!0,t.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(e){t.onMediaUpdateTime(e.duration,e.seconds)}),this.vimeoPlayer.on("pause",function(e){t.clickedPlay?(t.playing=!1,t.paused=!0):t.hasPlaylist||t.swappingSrc||(t.playing=!1,t.paused=!0),t.clickedPlay=!1,t.onMediaPause(),t.refreshControls("playpause")}),this.vimeoPlayer.on("playbackratechange",function(e){t.vimeoPlaybackRate=e.playbackRate}),this.vimeoPlayer.on("texttrackchange",function(t){}),this.vimeoPlayer.on("volumechange",function(e){t.volume=10*e.volume}),this.vimeoPlayer.on("error",function(t){})},AblePlayer.prototype.addEventListeners=function(){var e=this;if(t(window).on("resize",function(){e.resizePlayer()}),window.MutationObserver){var i=this.$ableDiv[0];new MutationObserver(function(t){t.forEach(function(t){"attributes"===t.type&&"style"===t.attributeName&&e.$ableDiv.is(":visible")&&e.refreshControls()})}).observe(i,{attributes:!0,childList:!0,characterData:!0})}void 0!==this.seekBar?this.addSeekbarListeners():setTimeout(function(){void 0!==e.seekBar&&e.addSeekbarListeners()},2e3),this.$controllerDiv.find('div[role="button"]').on("click",function(t){t.stopPropagation(),e.onClickPlayerButton(this)}),t("body").on("click",function(i){if(0!==i.button)return!1;(t(".able-popup:visible").length||t(".able-volume-slider:visible").length)&&e.closePopups(),"VIDEO"===i.target.tagName&&(e.clickedPlay=!0)}),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())}),t(document).on("keydown",function(t){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.on("keydown",function(t){AblePlayer.nextIndex>1&&e.onPlayerKeyPress(t)}),this.stenoMode&&void 0!==this.stenoFrameContents&&this.stenoFrameContents.on("keydown",function(t){e.onPlayerKeyPress(t)}),this.$transcriptArea&&this.$transcriptArea.on("keydown",function(t){AblePlayer.nextIndex>1&&e.onPlayerKeyPress(t)}),this.$playlist&&this.$playlist.on("click",function(i){e.userClickedPlaylist||(e.userClickedPlaylist=!0,e.playlistIndex=t(this).index(),e.cuePlaylistItem(e.playlistIndex))}),this.$media.on("click",function(){e.handlePlay()}),"html5"===this.player?this.addHtml5MediaListeners():"vimeo"===this.player?this.addVimeoListeners():"youtube"===this.player&&setInterval(function(){e.onMediaUpdateTime()},300)}}(jQuery),function(t){AblePlayer.prototype.initDragDrop=function(e){var i,a,s,n,r,o,l,h,p,c,u,d,f;for(i=this,"transcript"===e?(a=this.$transcriptArea,n="transcript-window",(s=this.$transcriptToolbar).attr("aria-label",this.translate("transcriptControls","Transcript Window Controls"))):"sign"===e&&(a=this.$signWindow,n="sign-window",(s=this.$signToolbar).attr("aria-label",this.translate("signControls","Sign Language Window Controls"))),s.addClass("able-draggable"),s.attr("role","application"),$dragHandle=t("<div>",{class:"able-drag-handle"}),$dragHandle.html('<svg version="1.1" viewBox="262.48 487.5 675.03 225" xmlns="http://www.w3.org/2000/svg"><path d="m900 562.5h-600c-13.398 0-25.777-7.1484-32.477-18.75-6.6992-11.602-6.6992-25.898 0-37.5 6.6992-11.602 19.078-18.75 32.477-18.75h600c13.398 0 25.777 7.1484 32.477 18.75 6.6992 11.602 6.6992 25.898 0 37.5-6.6992 11.602-19.078 18.75-32.477 18.75z" fill="#fff"></path> <path d="m900 712.5h-600c-13.398 0-25.777-7.1484-32.477-18.75-6.6992-11.602-6.6992-25.898 0-37.5 6.6992-11.602 19.078-18.75 32.477-18.75h600c13.398 0 25.777 7.1484 32.477 18.75 6.6992 11.602 6.6992 25.898 0 37.5-6.6992 11.602-19.078 18.75-32.477 18.75z" fill="#fff"></path></svg>'),r=t("<div>",{class:"able-resizable"}),o=t("<svg>").attr({width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none"}),l=1;l<=3;l++)1===l?(h="100",p="0",c="0",u="100"):2===l?(h="33",p="100",c="100",u="33"):3===l&&(h="67",p="100",c="100",u="67"),d=t("<line>").attr({x1:h,y1:p,x2:c,y2:u,"vector-effect":"non-scaling-stroke"}),o.append(d);r.html(o),f=parseInt(a.css("z-index"))+100,r.css("z-index",f),a.append(r),s.append($dragHandle),r.html(r.html()),$dragHandle.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,a)):"mouseup"!==t.type&&"touchend"!==t.type||i.dragging&&"mouse"===i.dragDevice&&i.endDrag(e),!1}),r.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,a)):"mouseup"!==t.type&&"touchend"!==t.type||i.resizing&&i.endResize(e),!1}),a.on("click",function(){i.windowMenuClickRegistered||i.finishingDrag||i.updateZIndex(e),i.finishingDrag=!1}),this.addWindowMenu(e,a,n)},AblePlayer.prototype.addWindowMenu=function(e,i,a){var s,n,r,o,l,h,p;s=this,this.windowMenuClickRegistered=!1,this.finishingDrag=!1,p=this.mediaId+"-"+a+"-menu",r=t("<button>",{type:"button",tabindex:"0","aria-haspopup":"true","aria-controls":p,"aria-expanded":"false",class:"able-button-handler-preferences"}),this.getIcon(r,"preferences"),this.setText(r,this.translate("windowButtonLabel","Window options")),o=this.mediaId+"-"+a+"-tooltip",l=t("<div>",{class:"able-tooltip",id:o}).hide(),r.on("mouseenter focus",function(e){var i=t(this).attr("aria-label"),a=AblePlayer.localGetElementById(r[0],o).text(i),n={right:"",left:"0px",top:-1*(a.height()+2)+"px"};a.css(n),s.showTooltip(a),t(this).on("mouseleave blur",function(){AblePlayer.localGetElementById(r[0],o).text("").hide()})}),h=this.setupPopups(a),"transcript"===e?(this.$transcriptPopupButton=r,this.$transcriptPopup=h,this.$transcriptToolbar.prepend(n,r,l,h)):"sign"===e&&(this.$signPopupButton=r,this.$signPopup=h,this.$signToolbar.append(n,r,l,h)),r.on("click keydown",function(t){return!s.focusNotClick&&(s.dragging?(s.dragKeys(e,t),!1):(t.stopPropagation(),s.windowMenuClickRegistered||s.finishingDrag||s.handleWindowButtonClick(e,t),void(s.finishingDrag=!1)))}),this.addResizeDialog(e,i)},AblePlayer.prototype.addResizeDialog=function(e,i){var a,s,n,r,o,l,h,p,c,u,d,f,g,m,v,y,b,P;a=this,"transcript"===e?(s=this.$transcriptPopup,n=this.$transcriptPopupButton):"sign"===e&&(s=this.$signPopup,n=this.$signPopupButton),r=this.mediaId+"-resize-"+e+"-width",o=this.mediaId+"-resize-"+e+"-height",l=t("<div></div>",{class:"able-resize-form"}),h=t("<div></div>"),$resizeControls=t('<div class="able-prefs-buttons"></div>'),p=t("<div></div>"),c=t("<input>",{type:"number",id:r,min:0,value:""}),u=t("<label>",{for:r}).text(this.translate("width","Width")),d=t("<div></div>"),f=t("<input>",{type:"number",id:o,min:0,value:""}),g=t("<label>",{for:o}).text(this.translate("height","Height")),m=t('<button class="modal-button">'+this.translate("save","Save")+"</button>"),v=t('<button class="modal-button">'+this.translate("cancel","Cancel")+"</button>"),m.on("click",function(){y=t("#"+r).val(),b=t("#"+o).val(),a.resizeObject(e,y,b),a.updatePreferences(e),P.hide(),s.hide(),n.trigger("focus")}),v.on("click",function(){P.hide(),s.hide(),n.trigger("focus")}),p.append(u,c),d.append(g,f),h.append(p,d),$resizeControls.append(m,v),l.append(h,$resizeControls),t("body").append(l),P=new AccessibleDialog(l,n,this.translate("windowResizeHeading","Resize Window"),this.translate("closeButtonLabel","Close")),"transcript"===e?this.transcriptResizeDialog=P:"sign"===e&&(this.signResizeDialog=P)},AblePlayer.prototype.handleWindowButtonClick=function(e,i){var a,s,n,r,o;if(a=this,this.focusNotClick)return!1;if("transcript"===e?(s=this.$transcriptPopup,n=this.$transcriptPopupButton,r=this.$transcriptToolbar):"sign"===e&&(s=this.$signPopup,n=this.$signPopupButton,r=this.$signToolbar),"keydown"===i.type)if(" "===i.key||"Enter"===i.key)this.windowMenuClickRegistered=!0;else{if("Escape"!==i.key)return!1;s.is(":visible")?(s.hide(),a.windowMenuClickRegistered=!1,s.find("li").removeClass("able-focus").attr("tabindex","-1"),n.trigger("focus")):"sign"===e?this.handleSignToggle():"transcript"===e&&this.handleTranscriptToggle()}else this.windowMenuClickRegistered=!0;s.is(":visible")?(s.hide(),a.windowMenuClickRegistered=!1,s.find("li").removeClass("able-focus"),n.attr("aria-expanded","false").trigger("focus")):(this.updateZIndex(e),o=r.outerHeight()-1,s.css("top",o),s.show(),n.attr("aria-expanded","true"),t(this).find("li").first().trigger("focus").addClass("able-focus"),a.windowMenuClickRegistered=!1)},AblePlayer.prototype.handleMenuChoice=function(e,i,a){var s,n,r,o,l,h,p,c,u;if("transcript"===e?(s=this.$transcriptArea,n=this.$transcriptPopup,r=this.$transcriptPopupButton,o=this.transcriptResizeDialog):"sign"===e&&(s=this.$signWindow,n=this.$signPopup,r=this.$signPopupButton,o=this.signResizeDialog,l=s.outerWidth(),h=s.outerHeight(),p=l/h,widthId=this.mediaId+"-resize-"+e+"-width",heightId=this.mediaId+"-resize-"+e+"-height",t("#"+heightId).prop("readonly",!0),t("#"+widthId).on("input",function(){c=t(this).val(),u=Math.round(c/p),t("#"+heightId).val(u)})),this.$activeWindow=s,"keydown"===a.type)return"Escape"===a.key?(n.hide(),this.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1"),r.attr("aria-expanded","false"),r.trigger("focus"),!1):("close"!==i&&(this.$activeWindow=s),!1);if(n.hide(),this.windowMenuClickRegistered=!1,n.find("li").removeClass("able-focus").attr("tabindex","-1"),r.attr("aria-expanded","false"),"close"!==i&&r.trigger("focus"),"move"===i)this.$activeWindow.attr("role","application"),this.showedAlert(e)||(this.showAlert(this.translate("windowMoveAlert","Drag or use arrow keys to move the window; Enter to stop"),e),"transcript"===e?this.showedTranscriptAlert=!0:"sign"===e&&(this.showedSignAlert=!0)),this.dragDevice="keydown"===a.type?"keyboard":"mouse",this.startDrag(e,s),n.hide().parent().attr("tabindex","-1").trigger("focus");else if("resize"==i){var d=o.getInputs();d&&(d[0].value=Math.round(s.outerWidth()),d[1].value=Math.round(s.outerHeight())),o.show()}else"close"==i&&("transcript"===e?(this.closingTranscript=!0,this.handleTranscriptToggle()):"sign"===e&&(this.closingSign=!0,this.handleSignToggle()))},AblePlayer.prototype.startDrag=function(e,i){var a,s,n,r,o;a=this,this.$activeWindow||(this.$activeWindow=i),this.dragging=!0,"transcript"===e?s=this.$transcriptPopup:"sign"===e&&(s=this.$signPopup),s.is(":visible")&&s.hide(),this.updateZIndex(e),n=this.$activeWindow.position(),this.dragStartX=n.left,this.dragStartY=n.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"}).trigger("focus");this.dragDevice;return"mouse"===this.dragDevice?t(document).on("mousemove touchmove",function(t){a.dragging&&(r=t.pageX-a.dragOffsetX,o=t.pageY-a.dragOffsetY,a.resetDraggedObject(r,o))}):"keyboard"===this.dragDevice&&this.$activeWindow.on("keydown",function(t){a.dragging&&a.dragKeys(e,t)}),!1},AblePlayer.prototype.dragKeys=function(t,e){if(this.startingDrag)return this.startingDrag=!1,!1;switch(e.key){case"ArrowLeft":this.dragKeyX-=10,this.$srAlertBox.text(this.translate("windowMoveLeft","Window moved left"));break;case"ArrowUp":this.dragKeyY-=10,this.$srAlertBox.text(this.translate("windowMoveUp","Window moved up"));break;case"ArrowRight":this.dragKeyX+=10,this.$srAlertBox.text(this.translate("windowMoveRight","Window moved right"));break;case"ArrowDown":this.dragKeyY+=10,this.$srAlertBox.text(this.translate("windowMoveDown","Window moved down"));break;case"Enter":case"Escape":return this.$srAlertBox.text(this.translate("windowMoveStopped","Window move stopped")),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){setTimeout(()=>{this.$srAlertBox.text("")},2e3),this.$activeWindow.css({left:t+"px",top:e+"px"})},AblePlayer.prototype.resizeObject=function(t,e,i){var a;this.$activeWindow.css({width:e+"px",height:i+"px"}),"transcript"===t&&(a=i-50,this.$transcriptDiv.css("height",a+"px"))},AblePlayer.prototype.endDrag=function(e){var i,a;i=this,"transcript"===e?(this.$transcriptPopup,a=this.$transcriptPopupButton):"sign"===e&&(this.$signPopup,a=this.$signPopupButton),t(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown").removeClass("able-drag"),this.$activeWindow.attr("role","dialog"),this.$activeWindow=null,"keyboard"===this.dragDevice&&a.trigger("focus"),this.dragging=!1,this.updatePreferences(e),this.startMouseX=void 0,this.startMouseY=void 0,this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){i.finishingDrag=!1},100)},AblePlayer.prototype.startResize=function(e,i){var a,s,n,r;return a=this,this.$activeWindow=i,this.resizing=!0,(s="transcript"===e?this.$transcriptPopup:this.$signPopup).is(":visible")&&s.hide().parent().trigger("focus"),startPos=this.$activeWindow.position(),this.dragKeyX=this.dragStartX,this.dragKeyY=this.dragStartY,this.dragStartWidth=this.$activeWindow.width(),this.dragStartHeight=this.$activeWindow.outerHeight(),t(document).on("mousemove touchmove",function(t){a.resizing&&(n=a.dragStartWidth+(t.pageX-a.startMouseX),r=a.dragStartHeight+(t.pageY-a.startMouseY),a.resizeObject(e,n,r))}),!1},AblePlayer.prototype.endResize=function(e){var i;"transcript"===e?(this.$transcriptPopup,i=this.$transcriptPopupButton):"sign"===e&&(this.$signPopup,i=this.$signPopupButton),t(document).off("mousemove mouseup touchmove touchup"),this.$activeWindow.off("keydown"),i.show().trigger("focus"),this.resizing=!1,this.$activeWindow.removeClass("able-resize"),this.updatePreferences(e),this.windowMenuClickRegistered=!1,this.finishingDrag=!0,setTimeout(function(){this.finishingDrag=!1},100)}}(jQuery),function(t){AblePlayer.prototype.initSignLanguage=function(){this.hasSignLanguage=!1;var t=void 0!==this.$sources.first().attr("data-sign-src")&&""!==this.$sources.first().attr("data-sign-src"),e=void 0!==this.$media.data("youtube-sign-src")&&""!==this.$media.data("youtube-sign-src"),i=void 0!==this.$sources.first().attr("data-youtube-sign-src")&&""!==this.$sources.first().attr("data-youtube-sign-src");if(!this.isIOS()&&(t||e||i)&&("html5"===this.player||"youtube"===this.player)){let a=this.youTubeSignId??DOMPurify.sanitize(this.$sources.first().attr("data-youtube-sign-src")),s=DOMPurify.sanitize(this.$sources.first().attr("data-sign-src")),n=DOMPurify.sanitize(this.$media.data("youtube-sign-src"));this.signFile=!!t&&s,e?this.signYoutubeId=n:i&&(this.signYoutubeId=a),(this.signFile||this.signYoutubeId)&&(this.isIOS()?this.debug:(this.debug,this.hasSignLanguage=!0,this.injectSignPlayerCode()))}},AblePlayer.prototype.injectSignPlayerCode=function(){var e,i,a,s,n;if(e=this.mediaId+"-sign",(this.signFile||this.signYoutubeId)&&(null!==this.$signDivLocation?(this.$signDivLocation.addClass("able-sign-window able-fixed"),this.$signWindow=this.$signDivLocation):(this.$signWindow=t("<div>",{class:"able-sign-window",role:"dialog","aria-label":this.translate("sign","Sign language")}),this.$signToolbar=t("<div>",{class:"able-window-toolbar able-"+this.toolbarIconColor+"-controls"}),this.$signWindow.append(this.$signToolbar)),this.$ableWrapper.append(this.$signWindow)),this.signFile){if(this.$signVideo=t("<video>",{id:e,tabindex:"-1",muted:!0}),this.signVideo=this.$signVideo[0],this.signFile)n=t("<source>",{src:this.signFile,type:"video/"+this.signFile.substr(-3)}),this.$signVideo.append(n);else for(i=0;i<this.$sources.length;i++){if(a=DOMPurify.sanitize(this.$sources[i].getAttribute("data-sign-src")),s=this.$sources[i].getAttribute("type"),!a)return void(this.hasSignLanguage=!1);n=t("<source>",{src:a,type:s}),this.$signVideo.append(n)}this.$signWindow.append(this.$signVideo)}else this.signYoutubeId&&(this.signYoutube=this.initYouTubeSignPlayer());null===this.$signDivLocation&&this.initDragDrop("sign"),1===this.prefSign?null===this.$signDivLocation&&this.positionDraggableWindow("sign",this.getDefaultWidth("sign")):this.$signWindow.hide()},AblePlayer.prototype.initYouTubeSignPlayer=function(){var e,i,a;return e=this,a=(i=new this.defer).promise(),this.youTubeSignPlayerReady=!1,AblePlayer.youTubeIframeAPIReady?e.finalizeYoutubeSignInit().then(function(){i.resolve()}):(AblePlayer.loadingYouTubeIframeAPI||e.getScript("https://www.youtube.com/iframe_api",function(){}),t("body").on("youTubeIframeAPIReady",function(){e.finalizeYoutubeSignInit().then(function(){i.resolve()})})),a},AblePlayer.prototype.finalizeYoutubeSignInit=function(){var e,i,a,s,n;return i=(e=new this.defer).promise(),a=this,s=this.mediaId+"_youtube_sign",this.$signWindow.append(t("<div>").attr("id",s)),n=this.okToPlay?1:0,this.youTubeSignPlayer=new YT.Player(s,{videoId:this.getYouTubeId(this.signYoutubeId),host:this.youTubeNoCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com",playerVars:{autoplay:n,cc_lang_pref:this.captionLang,cc_load_policy:0,controls:0,disableKb:1,enablejsapi:1,hl:this.lang,iv_load_policy:3,origin:window.location.origin,playsinline:this.playsInline,rel:0,start:this.startTime},events:{onReady:function(t){t.target.mute(),t.target.unloadModule("captions"),a.youTubeSignPlayerReady=!0,e.resolve()},onError:function(t){e.reject()},onStateChange:function(t){a.getPlayerState().then(function(){})},onApiChange:function(){},onPlaybackQualityChange:function(){}}}),i}}(jQuery),function(){var t={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(e,i){var a,s,n;return(a=t[e.toLowerCase()])?"local"===i?a.nativeName:a.name:e.includes("-")&&(s=e.substring(0,2),n=e.substring(3),a=t[s.toLowerCase()])?"local"===i?a.nativeName+" ("+n+")":a.name+" ("+n+")":e}}(jQuery),function(t){AblePlayer.prototype.getSupportedLangs=function(){return{ca:"Catalan",cs:"Czech",da:"Danish",de:"German",en:"English",es:"Spanish",fr:"French",he:"Hebrew",id:"Indonesian",it:"Italian",ja:"Japanese",ms:"Malay",nb:"Norwegian Bokmål",nl:"Dutch",pl:"Polish",pt:"Portuguese","pt-br":"Brazilian Portuguese",sv:"Swedish",tr:"Turkish","zh-tw":"Chinese (Taiwan)"}},AblePlayer.prototype.translate=function(t,e,i=Array()){let a="";return a=this.tt[t]?this.tt[t]:e,i.length>0&&i.forEach((t,e)=>{let i=e+1;a=a.replace("%"+i,t)}),a},AblePlayer.prototype.getTranslationText=function(){var e,i,a,s,n,r;if(e=new this.defer,i=this,a=this.getSupportedLangs(),this.lang&&Object.hasOwn(a,this.lang))if(2==this.lang.indexOf("-"))this.lang=-1!==Object.hasOwn(a,this.lang.substring(0,2))?this.lang.substring(0,2):null;else{r=!1;for(const[t,e]of Object.entries(a))t.substring(0,2)==this.lang&&(this.lang=a[undefined],r=!0);r||(this.lang=null)}return this.lang||(s=t("body").attr("lang")?t("body").attr("lang").toLowerCase():t("html").attr("lang")?t("html").attr("lang").toLowerCase():null)&&(Object.hasOwn(a,s)?this.lang=s:2==s.indexOf("-")&&Object.hasOwn(a,s.substring(0,2))&&(this.lang=s.substring(0,2))),this.lang||(this.lang="en"),this.searchLang||(this.searchLang=this.lang),n=this.rootPath+"translations/"+this.lang+".json",fetch(n).then(t=>t.json()).then(t=>{i.tt=t,i.translationFiles=!0,e.resolve()}).catch(t=>{n=i.rootPath+"translations/"+i.lang+".js",fetch(n).then(t=>t.json()).then(t=>{i.tt=t,i.translationFiles=!0,e.resolve()}).catch(t=>{i.tt={},i.translationFiles=!1,e.resolve()})}),e.promise()},AblePlayer.prototype.getSampleDescriptionText=function(){if(this.translationFiles){var t,e,i,a,s;e=this.getSupportedLangs(),t=this,this.sampleText=[];for(const[n,r]of Object.entries(e))i=this.rootPath+"translations/"+n+".json",fetch(i).then(t=>t.json()).then(e=>{a=e.sampleDescriptionText,s={lang:undefined,text:a},t.sampleText.push(s)})}else{this.sampleText=[];let t={lang:"en",text:this.translate("sampleDescriptionText","Adjust settings to hear this sample text.")};this.sampleText.push(t)}}}(jQuery),function(t){AblePlayer.prototype.injectVTS=function(){var e,i,a,s,n,r,o,l,h,p,c,u,d,f,g,m,v;if(e=this,null!==document.getElementById("able-vts")&&this.vtsTracks.length){this.langs=[],this.getAllLangs(this.vtsTracks),this.vtsLang=this.lang;let w=this.translate("vtsHeading","Video Transcript Sorter");for(k in i=t("<h2>").text(w),t("#able-vts").append(i),this.$vtsAlert=t("<div>",{id:"able-vts-alert","aria-live":"polite","aria-atomic":"true"}),t("#able-vts").append(this.$vtsAlert),a=t("<div>",{id:"able-vts-instructions"}),s=t("<p>").text(this.translate("vtsInstructions1","Use the Video Transcript Sorter to modify text tracks:")),r=t("<ul>"),o=t("<li>").text(this.translate("vtsInstructions2","Reorder chapters, descriptions, captions, and/or subtitles so they appear in the proper sequence in Able Player's auto-generated transcript.")),l=t("<li>").text(this.translate("vtsInstructions3","Modify content or start/end times (all are directly editable within the table).")),h=t("<li>").text(this.translate("vtsInstructions4","Add new content, such as chapters or descriptions.")),n=t("<p>").text(this.translate("vtsInstructions5",'After editing, click the "Save Changes" button to generate new content for all relevant timed text files. The new text can be copied and pasted into new WebVTT files.')),r.append(o,l,h),a.append(s,r,n),t("#able-vts").append(a),p=t("<fieldset>"),c=t("<legend>").text(this.translate("vtsSelectLanguage","Select a language")),p.append(c),$fieldWrapper=t('<div class="vts-lang-selector"></div>'),this.langs)d="vts-lang-radio-"+this.langs[k],u=t("<div>",{}),g=t("<input>",{type:"radio",name:"vts-lang",id:d,value:this.langs[k]}).on("click",function(){e.vtsLang=t(this).val(),e.showVtsAlert("Loading "+e.getLanguageName(e.vtsLang)+" tracks"),e.injectVtsTable("update",e.vtsLang)}),this.langs[k]==this.lang&&g.prop("checked",!0),f=t("<label>",{for:d}).text(this.getLanguageName(this.langs[k])),u.append(g,f),$fieldWrapper.append(u);p.append($fieldWrapper),t("#able-vts").append(p);let C=this.translate("vtsSave","Generate new .vtt content");var y,b,P,T,k;m=t("<button>",{type:"button",id:"able-vts-save",value:"save"}).text(C),t("#able-vts").append(m),this.injectVtsTable("add",this.vtsLang),y=["captions","chapters","descriptions","subtitles"],t('td[contenteditable="true"]').on("focus",function(){b=t(this).text()}).on("blur",function(){b!=t(this).text()&&(P=t(this).index(),T=t(this).text(),1===P?-1===t.inArray(T,y)&&("s"===T.substring(0,1)?t(this).text("subtitles"):"d"===T.substring(0,1)?t(this).text("descriptions"):"ch"===T.substring(0,2)?t(this).text("chapters"):t(this).text("captions")):2!==P&&3!==P||t(this).text(e.formatTimestamp(T)))}).on("keydown",function(t){t.stopPropagation()}),t("#able-vts-save").on("click",function(i){i.stopPropagation(),"save"==t(this).attr("value")?(t(this).attr("value","cancel").text(e.translate("vtsReturn","Return to Editor")),v=t("#able-vts table"),t("#able-vts-instructions").hide(),t("#able-vts > fieldset").hide(),t("#able-vts table").remove(),t("#able-vts-icon-credit").remove(),e.parseVtsOutput(v)):(t(this).attr("value","save").text(C),t("#able-vts-output").remove(),t("#able-vts-instructions").show(),t("#able-vts > fieldset").show(),t("#able-vts").append(v),t("#able-vts").append(e.getIconCredit()),e.showVtsAlert(e.translate("vtsCancel","Cancelling saving. Any edits you made have been restored in the VTS table.")))})}},AblePlayer.prototype.setupVtsTracks=function(t,e,i,a,s,n){var r,o;r=this.getFilenameFromPath(s),o=this.parseVtsTracks(n),this.vtsTracks.push({kind:t,language:e,label:a,srcFile:r,cues:o})},AblePlayer.prototype.getFilenameFromPath=function(t){var e;return-1===(e=t.lastIndexOf("/"))?t:t.substring(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,a,s,n,r,o,l,h;for(e=t.split("\n"),a=[],s=0;s<e.length;)if(-1!==(r=e[s]).indexOf(" --\x3e ")){if(i=r.trim().split(" "),this.isValidTimestamp(i[0])&&this.isValidTimestamp(i[2])){for(l="",n=s+1,h=!1;n<e.length&&!h;)(o=e[n].trim()).length>0?l.length>0?l+="\n"+o:l+=o:h=!0,n++;a.push({start:i[0],end:i[2],content:l}),s=n}}else s++;return a},AblePlayer.prototype.isValidTimestamp=function(t){return!!/^[0-9:,.]*$/.test(t)},AblePlayer.prototype.formatTimestamp=function(t){var e,i;if(e=t.substring(0,t.lastIndexOf(".")+1),(i=t.substring(t.lastIndexOf(".")+1)).length>3)i=i.substring(0,3);else if(i.length<3)for(;i.length<3;)i+="0";return e+i},AblePlayer.prototype.injectVtsTable=function(e,i){var a,s,n,r,o,l,h,p,c;for("update"===e&&(t("#able-vts table").remove(),t("#able-vts-icon-credit").remove()),a=t("<table>",{lang:i}),s=t("<thead>"),o=t("<tr>"),n=[this.translate("vtsRow","Row"),this.translate("vtsKind","Kind"),this.translate("vtsStart","Start"),this.translate("vtsEnd","End"),this.translate("vtsContent","Content"),this.translate("vtsActions","Actions")],r=0;r<n.length;r++)l=t("<th>",{scope:"col"}).text(n[r]),"Actions"===n[r]&&l.addClass("actions"),o.append(l);for(s.append(o),a.append(s),p=this.getAllRows(i),r=0;r<p.length;r++)o=t("<tr>",{id:"able-vts-row-"+(c=r+1),class:"kind-"+p[r].kind}),h=t("<td>").text(c),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].kind),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].start),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].end),o.append(h),h=t("<td>",{contenteditable:"true"}).text(p[r].content),o.append(h),h=this.addVtsActionButtons(c,p.length),o.append(h),a.append(o);t("#able-vts").append(a),t("#able-vts").append(this.getIconCredit())},AblePlayer.prototype.addVtsActionButtons=function(e,i){var a,s,n,r,o,l,h,p,c,u;for(a=this,s=t("<td>"),n=["up","down","insert","delete"],r=0;r<n.length;r++)"up"===(o=n[r])?e>1&&(l=t("<button>",{id:"able-vts-button-up-"+e,title:"Move up","aria-label":"Move Row "+e+" up"}).on("click",function(t){a.onClickVtsActionButton(t.currentTarget)}),h=t("<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"}),c=t("<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"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),s.append(l)):"down"===o?e<i&&(l=t("<button>",{id:"able-vts-button-down-"+e,title:"Move down","aria-label":"Move Row "+e+" down"}).on("click",function(t){a.onClickVtsActionButton(t.currentTarget)}),h=t("<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"}),c=t("<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"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),s.append(l)):"insert"===o?(l=t("<button>",{id:"able-vts-button-insert-"+e,title:"Insert row below","aria-label":"Insert row before Row "+e}).on("click",function(t){a.onClickVtsActionButton(t.currentTarget)}),h=t("<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"}),c=t("<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"}),p=t("<g>").append(c),h.append(p),l.append(h),l.html(l.html()),s.append(l)):"delete"===o&&(l=t("<button>",{id:"able-vts-button-delete-"+e,title:"Delete row ","aria-label":"Delete Row "+e}).on("click",function(t){a.onClickVtsActionButton(t.currentTarget)}),h=t("<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"}),c=t("<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"}),u=t("<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"}),p=t("<g>").append(c,u),h.append(p),l.append(h),l.html(l.html()),s.append(l));return s},AblePlayer.prototype.updateVtsActionButtons=function(t,e){var i,a,s,n,r,o;for(i=0;i<t.length;i++)s=(a=t.eq(i)).attr("id"),n=a.attr("aria-label"),r=s.replace(/[0-9]+/g,e),o=n.replace(/[0-9]+/g,e),a.attr("id",r),a.attr("aria-label",o)},AblePlayer.prototype.getIconCredit=function(){return'<div id="able-vts-icon-credit">Action buttons made by <a target="_blank" rel="noreferrer" href="https://www.elegantthemes.com">Elegant Themes</a> from <a target="_blank" rel="noreferrer" href="https://www.flaticon.com">flaticon</a> are licensed by <a target="_blank" rel="noreferrer" href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC 3.0 BY</a></div>'},AblePlayer.prototype.getAllLangs=function(e){var i;for(i in e)e[i].hasOwnProperty("language")&&-1===t.inArray(e[i].language,this.langs)&&(this.langs[this.langs.length]=e[i].language)},AblePlayer.prototype.getAllRows=function(t){var e,i,a,s;for(s=[],e=0;e<this.vtsTracks.length;e++)if((i=this.vtsTracks[e]).language==t)for(a in i.cues)s.push({kind:i.kind,lang:t,id:i.cues[a].id,start:i.cues[a].start,end:i.cues[a].end,content:i.cues[a].content});return s.sort(function(t,e){return t.start>e.start?1:-1}),s},AblePlayer.prototype.onClickVtsActionButton=function(e){var i,a,s;a=(i=t(e).attr("id").split("-"))[3],s=i[4],"up"==a?this.moveRow(s,"up"):"down"==a?this.moveRow(s,"down"):"insert"==a?this.insertRow(s):"delete"==a&&this.deleteRow(s)},AblePlayer.prototype.insertRow=function(e){var i,a,s,n,r,o,l,h,p,c,u,d,f,g,m;for(s=(a=(i=t("#able-vts table")).find("tr")).length-1,n=parseInt(e)+1,r=t("<tr>",{id:"able-vts-row-"+n}),o=t("<td>").text(n),r.append(o),u=null,l=t("<select>",{id:"able-vts-kind-"+n,"aria-label":"What kind of track is this?",placeholder:"Select a kind"}).on("change",function(){u=t(this).val(),d="kind-"+u,f=t(this).closest("tr"),t(this).parent().text(u),f.addClass(d)}),h=["","captions","chapters","descriptions","subtitles"],p=0;p<h.length;p++)c=t("<option>",{value:h[p]}).text(h[p]),l.append(c);for(o=t("<td>").append(l),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=t("<td>",{contenteditable:"true"}),r.append(o),o=this.addVtsActionButtons(n,s),r.append(o),i.find("tr").eq(e).after(r),p=n;p<=s;p++)g=p+1,a.eq(p).attr("id","able-vts-row-"+g),a.eq(p).find("td").eq(0).text(g),m=a.eq(p).find("button"),this.updateVtsActionButtons(m,g);this.adjustTimes(n);let v=this.translate("vtsNewRow","A new row %1 has been inserted.",[n]);this.showVtsAlert(v),l.trigger("focus")},AblePlayer.prototype.deleteRow=function(e){var i,a,s,n,r,o;for((i=t("#able-vts table"))[0].deleteRow(e),s=(a=i.find("tr")).length-1,n=e;n<=s;n++)r=n,a.eq(n).attr("id","able-vts-row-"+r),a.eq(n).find("td").eq(0).text(r),o=a.eq(n).find("button"),this.updateVtsActionButtons(o,r);let l=this.translate("vtsDeletedRow","Row %1 has been deleted.",[e]);this.showVtsAlert(l)},AblePlayer.prototype.moveRow=function(e,i){var a,s,n,r;t("#able-vts table").find("tr"),a=t("#able-vts table").find("tr").eq(e),"up"==i?(s=parseInt(e)-1,(n=t("#able-vts table").find("tr").eq(s)).before(a)):"down"==i&&(s=parseInt(e)+1,(n=t("#able-vts table").find("tr").eq(s)).after(a)),a.attr("id","able-vts-row-"+s),a.find("td").eq(0).text(s),this.updateVtsActionButtons(a.find("button"),s),n.attr("id","able-vts-row-"+e),n.find("td").eq(0).text(e),this.updateVtsActionButtons(n.find("button"),e),this.adjustTimes(s),r=this.translate("vtsMovedRow","Row %1 has been moved %2 and is now Row %3.",[e,i,s]),this.showVtsAlert(r)},AblePlayer.prototype.adjustTimes=function(e){var i,a,s,n,r,o,l,h,p,c,u,d,f,g,m,v;(i=[]).captions=.001,i.descriptions=.001,i.chapters=.001,h=(r=(a=t("#able-vts table").find("tr")).eq(e)).is('[class^="kind-"]')?this.getKindFromClass(r.attr("class")):"captions",u=this.getSecondsFromColonTime(r.find("td").eq(2).text()),g=this.getSecondsFromColonTime(r.find("td").eq(3).text()),e>1?(s=e-1,p=(o=a.eq(s)).is('[class^="kind-"]')?this.getKindFromClass(o.attr("class")):null,d=this.getSecondsFromColonTime(o.find("td").eq(2).text()),m=this.getSecondsFromColonTime(o.find("td").eq(3).text())):(s=null,o=null,p=null,d=null,m=null),e<a.length-1?(n=e+1,c=(l=a.eq(n)).is('[class^="kind-"]')?this.getKindFromClass(l.attr("class")):null,f=this.getSecondsFromColonTime(l.find("td").eq(2).text()),v=this.getSecondsFromColonTime(l.find("td").eq(3).text())):(n=null,l=null,c=null,f=null,v=null),isNaN(u)?(null==p&&(p="captions",o.attr("class","kind-captions"),o.find("td").eq(1).html("captions")),"captions"===p?(u=(parseFloat(m)+.001).toFixed(3),g=f?(parseFloat(f)-.001).toFixed(3):(parseFloat(u)+i[h]).toFixed(3)):"chapters"===p?(u=(parseFloat(d)+.001).toFixed(3),g=f?(parseFloat(f)-.001).toFixed(3):(parseFloat(u)+minDurartion[h]).toFixed(3)):"descriptions"===p&&(u=(parseFloat(d)+i.descriptions).toFixed(3),g=(parseFloat(u)+i.descriptions).toFixed(3))):d?d<u?u<f||(f=(parseFloat(u)+i[h]).toFixed(3),v=(parseFloat(f)+i[c]).toFixed(3)):(u=(parseFloat(d)+i[p]).toFixed(3),g=(parseFloat(u)+i[h]).toFixed(3)):u<f||(f=(parseFloat(u)+i[h]).toFixed(3),v=(parseFloat(f)+i[c]).toFixed(3)),g-u<i[h]&&(g=(parseFloat(u)+i[h]).toFixed(3),f&&(f=(parseFloat(g)+.001).toFixed(3))),r.find("td").eq(2).text(this.formatSecondsAsColonTime(u,!0)),r.find("td").eq(3).text(this.formatSecondsAsColonTime(g,!0)),o&&(o.find("td").eq(2).text(this.formatSecondsAsColonTime(d,!0)),o.find("td").eq(3).text(this.formatSecondsAsColonTime(m,!0))),l&&(l.find("td").eq(2).text(this.formatSecondsAsColonTime(f,!0)),l.find("td").eq(3).text(this.formatSecondsAsColonTime(v,!0)))},AblePlayer.prototype.getKindFromClass=function(t){var e,i;return e=t.indexOf("kind-")+5,-1==(i=t.indexOf(" ",e))?t.substring(e):t.substring(e,i)},AblePlayer.prototype.showVtsAlert=function(t){var e;this.$vtsAlert.text(t).show(),(e=1e4,new Promise(t=>setTimeout(t,e))).then(()=>{this.$vtsAlert.text(t).hide()})},AblePlayer.prototype.parseVtsOutput=function(e){var i,a,s,n,r,o,l,h,p,c;for(i=e.attr("lang"),s=["captions","chapters","descriptions","subtitles"],r={},a=0;a<s.length;a++)r[n=s[a]]="WEBVTT\n\n";if((o=e.find("tr")).length>0)for(a=0;a<o.length;a++)n=o.eq(a).find("td").eq(1).text(),-1!==t.inArray(n,s)&&(l=o.eq(a).find("td").eq(2).text(),h=o.eq(a).find("td").eq(3).text(),p=o.eq(a).find("td").eq(4)[0].innerText,void 0!==l&&void 0!==h&&(r[n]+=l+" --\x3e "+h+"\n","undefined"!==p&&(r[n]+=p),r[n]+="\n\n"));for(c=t("<div>",{id:"able-vts-output"}),t("#able-vts").append(c),a=0;a<s.length;a++)r[n=s[a]].length>8&&this.showWebVttOutput(n,r[n],i)},AblePlayer.prototype.showWebVttOutput=function(e,i,a){var s,n,r,o,l;s=t("<h3>").text(this.capitalizeFirstLetter(e)),o="If you made changes, copy/paste the following content ",(n=this.getFilenameFromTracks(e,a))?(o+="to replace the original content of your "+this.getLanguageName(a)+" ",o+="<em>"+e+"</em> WebVTT file (<strong>"+n+"</strong>)."):o+="into a new "+this.getLanguageName(a)+" <em>"+e+"</em> WebVTT file.",r=t("<p>",{class:"able-vts-output-instructions"}).html(o),l=t("<textarea>").text(i),t("#able-vts-output").append(s,r,l)}}(jQuery),function(t){AblePlayer.prototype.initVimeoPlayer=function(){var e,i,a,s,n,r;return e=this,a=(i=new this.defer).promise(),s=this.mediaId+"_vimeo",this.$mediaContainer.prepend(t("<div>").attr("id",s)),n=this.vimeoDescId&&this.prefDesc?this.vimeoDescId:this.vimeoId,this.activeVimeoId=n,autoplay=this.okToPlay?"true":"false",r=this.playerWidth?this.vimeoUrlHasParams?{url:n,width:this.playerWidth,controls:!1}:{id:n,width:this.playerWidth,controls:!1}:this.vimeoUrlHasParams?{url:n,controls:!1}:{id:n,controls:!1},this.vimeoPlayer=new Vimeo.Player(s,r),this.vimeoPlayer.ready().then(function(){t("#"+s).children("iframe").attr({tabindex:"-1","aria-hidden":!0}),e.vimeoPlayer.getVideoWidth().then(function(t){t&&e.vimeoPlayer.getVideoHeight().then(function(i){i&&e.resizePlayer(t,i)})}).catch(function(t){}),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}),i.resolve())}),a},AblePlayer.prototype.getVimeoPaused=function(){var t,e;return e=(t=new this.defer).promise(),this.vimeoPlayer.getPaused().then(function(e){t.resolve(e)}),e},AblePlayer.prototype.getVimeoEnded=function(){var t,e;return e=(t=new this.defer).promise(),this.vimeoPlayer.getEnded().then(function(e){t.resolve(e)}),e},AblePlayer.prototype.getVimeoState=function(){var e,i,a,s,n;return i=(e=new this.defer).promise(),a=[],s=this.vimeoPlayer.getPaused(),n=this.vimeoPlayer.getEnded(),a.push(s),a.push(n),s.then(function(t){e.resolve(t)}),n.then(function(t){e.resolve(t)}),t.when.apply(t,a).then(function(){e.resolve()}),i},AblePlayer.prototype.getVimeoCaptionTracks=function(){var t,e,i,a=new this.defer,s=a.promise();return t=this,this.vimeoPlayer.getTextTracks().then(function(s){if(s.length){for(e=0;e<s.length;e++)t.hasCaptions=!0,1===t.prefCaptions?t.captionsOn=!0:t.captionsOn=!1,i=s[e].language===t.lang,t.tracks.push({kind:s[e].kind,language:s[e].language,label:s[e].label,def:i});t.captions=t.tracks,t.hasCaptions=!0,t.setupPopups("captions"),a.resolve()}else t.hasCaptions=!1,t.usingVimeoCaptions=!1,a.resolve()}),s},AblePlayer.prototype.getVimeoPosterUrl=function(t,e){var i="";return fetch("http://vimeo.com/api/oembed.json?url=https://vimeo.com/"+t).then(t=>t.json()).then(t=>{i=t.thumbnail_url}).catch(t=>{thisObj.debug}),i},AblePlayer.prototype.getVimeoId=function(t){return this.vimeoUrlHasParams=!1,"number"==typeof t?t:(urlObject=new URL(t),"vimeo.com"===urlObject.hostname||"player.vimeo.com"===urlObject.hostname?""!==urlObject.search?(this.vimeoUrlHasParams=!0,t):"player.vimeo.com"===urlObject.hostname?urlObject.pathname.replace("/video/",""):urlObject.pathname.replace("/",""):t)}}(jQuery);