PageSourceSearch

https://www.archeologiegorinchem.com/wp-content/plugins/text-to-sp…/Assets/js/build/plyr.min.js?ver=1790007468

js archeologiegorinchem.com collected 2026-09-25 06:10:16 UTC 260,034 bytes, 2 lines download raw bytes

vendor: 4,117 bytes, lines 1-2
1/*! For license information please see plyr.min.js.LICENSE.txt */
2(()=>{var e={638:function(e,t,n){var i,r,o,a=["premium","referrerPolicy"];function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=o.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function m(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=y(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==y(t)?t:t+""}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}"object"==("undefined"==typeof navigator?"undefined":y(navigator))&&(o=function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEac
2h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u={addCSS:!0,thumbWidth:15,watch:!0},d=function(e){return null!=e?e.constructor:null},p=function(e,t){return!!(e&&t&&e instanceof t)},g=function(e){return d(e)===String},v=function(e){return Array.isArray(e)},b=function(e){return p(e,NodeList)},w=g,_=v,T=b,S=function(e){return p(e,Element)},k=function(e){return p(e,Event)},P=function(e){return function(e){return null==e}(e)||(g(e)||v(e)||b(e))&&!e.length||function(e){return d(e)===Object}(e)&&!Object.keys(e).length},O=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),S(t)?this.element=t:w(t)&&(this.element=document.querySelector(t)),S(this.element)&&P(this.element.rangeTouch)&&(this.config=o({},u,{},n),this.init())}return function(e,n,i){n&&t(e.prototype,n),i&&t(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(e){t.element[n](e,function(e){return t.set(e)},!1)})}},{key:"get",value:function(t){if(!e.enabled||!k(t))return null;var n,i=t.target,r=t.changedTouches[0],o=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,l=parseFloat(i.getAttribute("step"))||1,s=i.getBoundingClientRect(),u=100/s.width*(this.config.thumbWidth/2)/100;return 0>(n=100/s.width*(r.clientX-s.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*u:50<n&&(n+=2*(n-50)*u),o+function(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}(n/100*(a-o),l)}},{key:"set",value:function(t){e.enabled&&k(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(P(t)||w(t)?i=Array.from(document.querySelectorAll(w(t)?t:'input[type="range"]')):S(t)?i=[t]:T(t)?i=Array.from(t):_(t)&&(i=t.filter(S)),P(i))return null;var r=o({},u,{},n);if(w(t)&&r.watch){var a=new MutationObserver(function(n){Array.from(n).forEach(function(n){Array.from(n.addedNodes).forEach(function(n){S(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,r)})})});a.observe(document.body,{childList:!0,subtree:!0})}return i.map(function(t){return new e(t,n)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}(),j=function(e){return null!=e?e.constructor:null},C=function(e,t){return Boolean(e&&t&&e instanceof t)},x=function(e){return null==e},A=function(e){return j(e)===Object},L=function(e){return j(e)===String},E=function(e){return j(e)===Function},I=function(e){return Array.isArray(e)},M=function(e){return C(e,NodeList)},N=function(e){return x(e)||(L(e)||I(e)||M(e))&&!e.length||A(e)&&!Object.keys(e).length},F=x,D=A,q=function(e){return j(e)===Number&&!Number.isNaN(e)},R=L,B=function(e){return j(e)===Boolean},V=E,H=I,G=M,U=function(e){return null!==e&&"object"==y(e)&&1===e.nodeType&&"object"==y(e.style)&&"object"==y(e.ownerDocument)},z=function(e){return C(e,Event)},W=function(e){return C(e,KeyboardEvent)},$=function(e){return C(e,TextTrack)||!x(e)&&L(e.kind)},K=function(e){if(C(e,window.URL))return!0;if(!L(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!N(new URL(t).hostname)}catch(e){return!1}},J=N,Y=function(){var e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find(function(t){return void 0!==e.style[t]});return!!R(n)&&t[n]}();function X(e,t){setTimeout(function(){try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}},t)}var Q={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Z(e,t){return t.split(".").reduce(function(e,t){return e&&e[t]},e)}function ee(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(!n.length)return e;var r=n.shift();return D(r)?(Object.keys(r).forEach(function(t){D(r[t])?(Object.keys(e).includes(t)||Object.assign(e,m
2({},t,{})),ee(e[t],r[t])):Object.assign(e,m({},t,r[t]))}),ee.apply(void 0,[e].concat(n))):e}function te(e,t){var n=e.length?e:[e];Array.from(n).reverse().forEach(function(e,n){var i=n>0?t.cloneNode(!0):t,r=e.parentNode,o=e.nextSibling;i.appendChild(e),o?r.insertBefore(i,o):r.appendChild(i)})}function ne(e,t){U(e)&&!J(t)&&Object.entries(t).filter(function(e){var t=f(e,2)[1];return!F(t)}).forEach(function(t){var n=f(t,2),i=n[0],r=n[1];return e.setAttribute(i,r)})}function ie(e,t,n){var i=document.createElement(e);return D(t)&&ne(i,t),R(n)&&(i.innerText=n),i}function re(e,t,n,i){U(t)&&t.appendChild(ie(e,n,i))}function oe(e){G(e)||H(e)?Array.from(e).forEach(oe):U(e)&&U(e.parentNode)&&e.parentNode.removeChild(e)}function ae(e){if(U(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}function le(e,t){return U(t)&&U(t.parentNode)&&U(e)?(t.parentNode.replaceChild(e,t),e):null}function se(e,t){if(!R(e)||J(e))return{};var n={},i=ee({},t);return e.split(",").forEach(function(e){var t=e.trim(),r=t.replace(".",""),o=t.replace(/[[\]]/g,"").split("="),a=f(o,1)[0],l=o.length>1?o[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":R(i.class)?n.class="".concat(i.class," ").concat(r):n.class=r;break;case"#":n.id=t.replace("#","");break;case"[":n[a]=l}}),ee(i,n)}function ue(e,t){if(U(e)){var n=t;B(n)||(n=!e.hidden),e.hidden=n}}function ce(e,t,n){if(G(e))return Array.from(e).map(function(e){return ce(e,t,n)});if(U(e)){var i="toggle";return void 0!==n&&(i=n?"add":"remove"),e.classList[i](t),e.classList.contains(t)}return!1}function de(e,t){return U(e)&&e.classList.contains(t)}function he(e,t){var n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function fe(e){return this.elements.container.querySelectorAll(e)}function pe(e){return this.elements.container.querySelector(e)}function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];U(e)&&(e.focus({preventScroll:!0}),t&&ce(e,this.config.classNames.tabFocus))}var me={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ve={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,n){var i=Q.isIPhone&&n&&ve.playsinline,r=ve[e]||"html5"!==t;return{api:r,ui:r&&ve.rangeInput&&("video"!==e||!Q.isIPhone||i)}},pip:!(Q.isIPhone||!V(ie("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||ie("video").disablePictureInPicture)),airplay:V(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){if(J(e))return!1;var t=f(e.split("/"),1)[0],n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(me).includes(n)&&(n+='; codecs="'.concat(me[e],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var e=document.createElement("input");return e.type="range","range"===e.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Y,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ye=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function be(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!J(t)&&V(n)){var l=t.split(" "),s=a;ye&&(s={passive:o,capture:a}),l.forEach(function(t){i&&i.eventListeners&&r&&i.eventListeners.push({element:e,type:t,callback:n,options:s}),e[r?"addEventListener":"removeEventListener"](t,n,s)})}}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];be.call(this,e,t,n,!0,i,r)}function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];be.call(this,e,t,n,!1,i,r)}function Te(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function(){for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];_e(e,n,a,r,o),i.apply(t,s)};be.call(this,e,n,a,!0,r,o)}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(U(e)&&!J(t)){var r=new CustomEvent(t,{bubbles:n,detail:h(h({},i),{},{plyr:this})});e.dispatchEvent(r)}}function ke(){this&&this.eventListeners&&(this.eventListeners.forEac
2h(function(e){var t=e.element,n=e.type,i=e.callback,r=e.options;t.removeEventListener(n,i,r)}),this.eventListeners=[])}function Pe(){var e=this;return new Promise(function(t){return e.ready?setTimeout(t,0):we.call(e,e.elements.container,"ready",t)}).then(function(){})}function Oe(e){(function(e){return C(e,Promise)&&E(e.then)})(e)&&e.then(null,function(){})}function je(e){return H(e)?e.filter(function(t,n){return e.indexOf(t)===n}):e}function Ce(e,t){return H(e)&&e.length?e.reduce(function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}):null}function xe(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}var Ae=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(function(e,t){var n=f(t,2),i=n[0],r=n[1];return h(h({},e),{},m({},i/r,[i,r]))},{});function Le(e){return!!(H(e)||R(e)&&e.includes(":"))&&(H(e)?e:e.split(":")).map(Number).every(q)}function Ee(e){if(!H(e)||!e.every(q))return null;var t=f(e,2),n=t[0],i=t[1],r=function(e,t){return 0===t?e:r(t,e%t)},o=r(n,i);return[n/o,i/o]}function Ie(e){var t=function(e){return Le(e)?e.split(":").map(Number):null},n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!J(this.embed)&&H(this.embed.ratio)&&(n=this.embed.ratio),null===n&&this.isHTML5){var i=this.media;n=[i.videoWidth,i.videoHeight]}return Ee(n)}function Me(e){if(!this.isVideo)return{};var t=this.elements.wrapper,n=Ie.call(this,e);if(!H(n))return{};var i=f(Ee(n),2),r=i[0],o=i[1],a=100/r*o;if(xe("aspect-ratio: ".concat(r,"/").concat(o))?t.style.aspectRatio="".concat(r,"/").concat(o):t.style.paddingBottom="".concat(a,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var l=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),s=(l-a)/(l/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(s,"%)")}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:n}}function Ne(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,i=e/t,r=Ce(Object.keys(Ae),i);return Math.abs(r-i)<=n?Ae[r]:[e,t]}var Fe={getSources:function(){var e=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(function(t){var n=t.getAttribute("type");return!!J(n)||ve.mime.call(e,n)}):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:Fe.getSources.call(this).map(function(e){return Number(e.getAttribute("size"))}).filter(Boolean)},setup:function(){if(this.isHTML5){var e=this;e.options.speed=e.config.speed.options,J(this.config.ratio)||Me.call(e),Object.defineProperty(e.media,"quality",{get:function(){var t=Fe.getSources.call(e).find(function(t){return t.getAttribute("src")===e.source});return t&&Number(t.getAttribute("size"))},set:function(t){if(e.quality!==t){if(e.config.quality.forced&&V(e.config.quality.onChange))e.config.quality.onChange(t);else{var n=Fe.getSources.call(e).find(function(e){return Number(e.getAttribute("size"))===t});if(!n)return;var i=e.media,r=i.currentTime,o=i.paused,a=i.preload,l=i.readyState,s=i.playbackRate;e.media.src=n.getAttribute("src"),("none"!==a||l)&&(e.once("loadedmetadata",function(){e.speed=s,e.currentTime=r,o||Oe(e.play())}),e.media.load())}Se.call(e,e.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(oe(Fe.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function De(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return J(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return n[t].toString()})}var qe=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString())},Re=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})};function Be(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}var Ve={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(J(e)||J(t))return"";var n=Z(t.i18n,e);if(J(n))return Object.keys(Ve).includes(e)?Ve[e]:"";var i={"{seektime}":t.seekTime,"{title}":t.title};
2return Object.entries(i).forEach(function(e){var t=f(e,2),i=t[0],r=t[1];n=qe(n,i,r)}),n},Ge=function(){return c(function t(n){var i=this;s(this,t),e(this,"get",function(e){if(!t.supported||!i.enabled)return null;var n=window.localStorage.getItem(i.key);if(J(n))return null;var r=JSON.parse(n);return R(e)&&e.length?r[e]:r}),e(this,"set",function(e){if(t.supported&&i.enabled&&D(e)){var n=i.get();J(n)&&(n={}),ee(n,e),window.localStorage.setItem(i.key,JSON.stringify(n))}}),this.enabled=n.config.storage.enabled,this.key=n.config.storage.key},null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}])}();function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(n,i){try{var r=new XMLHttpRequest;if(!("withCredentials"in r))return;r.addEventListener("load",function(){if("text"===t)try{n(JSON.parse(r.responseText))}catch(e){n(r.responseText)}else n(r.response)}),r.addEventListener("error",function(){throw new Error(r.status)}),r.open("GET",e,!0),r.responseType=t,r.send()}catch(e){i(e)}})}function ze(e,t){if(R(e)){var n=R(t),i=function(){return null!==document.getElementById(t)},r=function(e,t){e.innerHTML=t,n&&i()||document.body.insertAdjacentElement("afterbegin",e)};if(!n||!i()){var o=Ge.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),n&&a.setAttribute("id",t),o){var l=window.localStorage.getItem("cache-".concat(t));if(null!==l){var s=JSON.parse(l);r(a,s.content)}}Ue(e).then(function(e){J(e)||(o&&window.localStorage.setItem("cache-".concat(t),JSON.stringify({content:e})),r(a,e))}).catch(function(){})}}}var We=function(e){return Math.trunc(e/60/60%60,10)};function $e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!q(e))return $e(void 0,t,n);var i,r=function(e){return"0".concat(e).slice(-2)},o=We(e),a=(i=e,Math.trunc(i/60%60,10)),l=function(e){return Math.trunc(e%60,10)}(e);return o=t||o>0?"".concat(o,":"):"","".concat(n&&e>0?"-":"").concat(o).concat(r(a),":").concat(r(l))}var Ke={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||Q.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=pe.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:fe.call(this,this.config.selectors.buttons.play),pause:pe.call(this,this.config.selectors.buttons.pause),restart:pe.call(this,this.config.selectors.buttons.restart),rewind:pe.call(this,this.config.selectors.buttons.rewind),fastForward:pe.call(this,this.config.selectors.buttons.fastForward),mute:pe.call(this,this.config.selectors.buttons.mute),pip:pe.call(this,this.config.selectors.buttons.pip),airplay:pe.call(this,this.config.selectors.buttons.airplay),settings:pe.call(this,this.config.selectors.buttons.settings),captions:pe.call(this,this.config.selectors.buttons.captions),fullscreen:pe.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=pe.call(this,this.config.selectors.progress),this.elements.inputs={seek:pe.call(this,this.config.selectors.inputs.seek),volume:pe.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:pe.call(this,this.config.selectors.display.buffer),currentTime:pe.call(this,this.config.selectors.display.currentTime),duration:pe.call(this,this.config.selectors.display.duration)},U(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var n="http://www.w3.org/2000/svg",i=Ke.getIconUrl.call(this),r="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),o=document.createElementNS(n,"svg");ne(o,ee(t,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(n,"use"),l="".concat(r,"-").concat(e);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",l),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.appendChild(a),o},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=He(e,this.config);return ie("span",h(h({},t),{}
2,{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),n)},createBadge:function(e){if(J(e))return null;var t=ie("span",{class:this.config.classNames.menu.value});return t.appendChild(ie("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var n=this,i=ee({},t),r=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=qe(e,"-"," "),e=qe(e,"_"," "),e=Re(e),qe(e," ","")}(e),e.charAt(0).toLowerCase()+e.slice(1)}(e),o={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(function(e){Object.keys(i).includes(e)&&(o[e]=i[e],delete i[e])}),"button"!==o.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(function(e){return e===n.config.classNames.control})||ee(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,e){case"play":o.toggle=!0,o.label="play",o.labelPressed="pause",o.icon="play",o.iconPressed="pause";break;case"mute":o.toggle=!0,o.label="mute",o.labelPressed="unmute",o.icon="volume",o.iconPressed="muted";break;case"captions":o.toggle=!0,o.label="enableCaptions",o.labelPressed="disableCaptions",o.icon="captions-off",o.iconPressed="captions-on";break;case"fullscreen":o.toggle=!0,o.label="enterFullscreen",o.labelPressed="exitFullscreen",o.icon="enter-fullscreen",o.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),r="play",o.label="play",o.icon="play";break;default:J(o.label)&&(o.label=r),J(o.icon)&&(o.icon=e)}var a=ie(o.element);return o.toggle?(a.appendChild(Ke.createIcon.call(this,o.iconPressed,{class:"icon--pressed"})),a.appendChild(Ke.createIcon.call(this,o.icon,{class:"icon--not-pressed"})),a.appendChild(Ke.createLabel.call(this,o.labelPressed,{class:"label--pressed"})),a.appendChild(Ke.createLabel.call(this,o.label,{class:"label--not-pressed"}))):(a.appendChild(Ke.createIcon.call(this,o.icon)),a.appendChild(Ke.createLabel.call(this,o.label))),ee(i,se(this.config.selectors.buttons[r],i)),ne(a,i),"play"===r?(H(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(a)):this.elements.buttons[r]=a,a},createRange:function(e,t){var n=ie("input",ee(se(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":He(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Ke.updateRangeFill.call(this,n),O.setup(n),n},createProgress:function(e,t){var n=ie("progress",ee(se(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(ie("span",null,"0"));var i={played:"played",buffer:"buffered"}[e],r=i?He(i,this.config):"";n.innerText="% ".concat(r.toLowerCase())}return this.elements.display[e]=n,n},createTime:function(e,t){var n=se(this.config.selectors.display[e],t),i=ie("div",ee(n,{class:"".concat(n.class?n.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":He(e,this.config)}),"00:00");return this.elements.display[e]=i,i},bindMenuItemShortcuts:function(e,t){var n=this;we.call(this,e,"keydown keyup",function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var r,o=he(e,'[role="menuitemradio"]');!o&&[32,39].includes(i.which)?Ke.showMenuPanel.call(n,t,!0):32!==i.which&&(40===i.which||o&&39===i.which?(r=e.nextElementSibling,U(r)||(r=e.parentNode.firstElementChild)):(r=e.previousElementSibling,U(r)||(r=e.parentNode.lastElementChild)),ge.call(n,r,!0))}},!1),we.call(this,e,"keyup",function(e){13===e.which&&Ke.focusFirstMenuItem.call(n,null,!0)})},createMenuItem:function(e){var t=this,n=e.value,i=e.list,r=e.type,o=e.title,a=e.badge,l=void 0===a?null:a,s=e.checked,u=void 0!==s&&s,c=se(this.config.selectors.inputs[r]),d=ie("button",ee(c,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.c
2ontrol," ").concat(c.class?c.class:"").trim(),"aria-checked":u,value:n})),h=ie("span");h.innerHTML=o,U(l)&&h.appendChild(l),d.appendChild(h),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(e){e&&Array.from(d.parentNode.children).filter(function(e){return he(e,'[role="menuitemradio"]')}).forEach(function(e){return e.setAttribute("aria-checked","false")}),d.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(d,"click keyup",function(e){if(!W(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),d.checked=!0,r){case"language":t.currentTrack=Number(n);break;case"quality":t.quality=n;break;case"speed":t.speed=parseFloat(n)}Ke.showMenuPanel.call(t,"home",W(e))}},r,!1),Ke.bindMenuItemShortcuts.call(this,d,r),i.appendChild(d)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return q(e)?$e(e,We(this.duration)>0,t):e},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];U(e)&&q(t)&&(e.innerText=Ke.formatTime(t,n))},updateVolume:function(){this.supported.ui&&(U(this.elements.inputs.volume)&&Ke.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),U(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;U(e)&&(e.value=t,Ke.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&z(e)){var n,i,r=0;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,i=this.duration,r=0===n||0===i||Number.isNaN(n)||Number.isNaN(i)?0:(n/i*100).toFixed(2),"timeupdate"===e.type&&Ke.setRange.call(this,this.elements.inputs.seek,r);break;case"playing":case"progress":!function(e,n){var i=q(n)?n:0,r=U(e)?e:t.elements.display.buffer;if(U(r)){r.value=i;var o=r.getElementsByTagName("span")[0];U(o)&&(o.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(e){var t=z(e)?e.target:e;if(U(t)&&"range"===t.getAttribute("type")){if(he(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);var n=Ke.formatTime(this.currentTime),i=Ke.formatTime(this.duration),r=He("seekLabel",this.config);t.setAttribute("aria-valuetext",r.replace("{currentTime}",n).replace("{duration}",i))}else if(he(t,this.config.selectors.inputs.volume)){var o=100*t.value;t.setAttribute("aria-valuenow",o),t.setAttribute("aria-valuetext","".concat(o.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);Q.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&U(this.elements.inputs.seek)&&U(this.elements.display.seekTooltip)&&0!==this.duration){var n="".concat(this.config.classNames.tooltip,"--visible"),i=function(e){return ce(t.elements.display.seekTooltip,n,e)};if(this.touch)i(!1);else{var r=0,o=this.elements.progress.getBoundingClientRect();if(z(e))r=100/o.width*(e.pageX-o.left);else{if(!de(this.elements.display.seekTooltip,n))return;r=parseFloat(this.elements.display.seekTooltip.style.left,10)}r<0?r=0:r>100&&(r=100),Ke.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*r),this.elements.display.seekTooltip.style.left="".concat(r,"%"),z(e)&&["mouseenter","mouseleave"].includes(e.type)&&i("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!U(this.elements.display.duration)&&this.config.invertTime;Ke.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Ke.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return ue(this.elements.display.currentTime,!0),void ue(this.elements.progress,!0);U(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var e=U(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Ke.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Ke.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),Ke.updateSeekTooltip.call(this)}},toggleMenuButton:function(e,t){ue(this.elements.settings.buttons[e],
2!t)},updateSetting:function(e,t,n){var i=this.elements.settings.panels[e],r=null,o=t;if("captions"===e)r=this.currentTrack;else{if(r=J(n)?this[e]:n,J(r)&&(r=this.config[e].default),!J(this.options[e])&&!this.options[e].includes(r))return void this.debug.warn("Unsupported value of '".concat(r,"' for ").concat(e));if(!this.config[e].options.includes(r))return void this.debug.warn("Disabled value of '".concat(r,"' for ").concat(e))}if(U(o)||(o=i&&i.querySelector('[role="menu"]')),U(o)){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=Ke.getLabel.call(this,e,r);var a=o&&o.querySelector('[value="'.concat(r,'"]'));U(a)&&(a.checked=!0)}},getLabel:function(e,t){switch(e){case"speed":return 1===t?He("normal",this.config):"".concat(t,"&times;");case"quality":if(q(t)){var n=He("qualityLabel.".concat(t),this.config);return n.length?n:"".concat(t,"p")}return Re(t);case"captions":return Xe.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t=this;if(U(this.elements.settings.panels.quality)){var n="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');H(e)&&(this.options.quality=je(e).filter(function(e){return t.config.quality.options.includes(e)}));var r=!J(this.options.quality)&&this.options.quality.length>1;if(Ke.toggleMenuButton.call(this,n,r),ae(i),Ke.checkMenu.call(this),r){var o=function(e){var n=He("qualityBadge.".concat(e),t.config);return n.length?Ke.createBadge.call(t,n):null};this.options.quality.sort(function(e,n){var i=t.config.quality.options;return i.indexOf(e)>i.indexOf(n)?1:-1}).forEach(function(e){Ke.createMenuItem.call(t,{value:e,list:i,type:n,title:Ke.getLabel.call(t,"quality",e),badge:o(e)})}),Ke.updateSetting.call(this,n,i)}}},setCaptionsMenu:function(){var e=this;if(U(this.elements.settings.panels.captions)){var t="captions",n=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Xe.getTracks.call(this),r=Boolean(i.length);if(Ke.toggleMenuButton.call(this,t,r),ae(n),Ke.checkMenu.call(this),r){var o=i.map(function(t,i){return{value:i,checked:e.captions.toggled&&e.currentTrack===i,title:Xe.getLabel.call(e,t),badge:t.language&&Ke.createBadge.call(e,t.language.toUpperCase()),list:n,type:"language"}});o.unshift({value:-1,checked:!this.captions.toggled,title:He("disabled",this.config),list:n,type:"language"}),o.forEach(Ke.createMenuItem.bind(this)),Ke.updateSetting.call(this,t,n)}}},setSpeedMenu:function(){var e=this;if(U(this.elements.settings.panels.speed)){var t="speed",n=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(function(t){return t>=e.minimumSpeed&&t<=e.maximumSpeed});var i=!J(this.options.speed)&&this.options.speed.length>1;Ke.toggleMenuButton.call(this,t,i),ae(n),Ke.checkMenu.call(this),i&&(this.options.speed.forEach(function(i){Ke.createMenuItem.call(e,{value:i,list:n,type:t,title:Ke.getLabel.call(e,"speed",i)})}),Ke.updateSetting.call(this,t,n))}},checkMenu:function(){var e=this.elements.settings.buttons,t=!J(e)&&Object.values(e).some(function(e){return!e.hidden});ue(this.elements.settings.menu,!t)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var n=e;U(n)||(n=Object.values(this.elements.settings.panels).find(function(e){return!e.hidden}));var i=n.querySelector('[role^="menuitem"]');ge.call(this,i,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,n=this.elements.buttons.settings;if(U(t)&&U(n)){var i=t.hidden,r=i;if(B(e))r=e;else if(W(e)&&27===e.which)r=!1;else if(z(e)){var o=V(e.composedPath)?e.composedPath()[0]:e.target,a=t.contains(o);if(a||!a&&e.target!==n&&r)return}n.setAttribute("aria-expanded",r),ue(t,!r),ce(this.elements.container,this.config.classNames.menu.open,r),r&&W(e)?Ke.focusFirstMenuItem.call(this,null,!0):r||i||ge.call(this,n,W(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var n=t.scrollWidth,i=t.scrollHeight;return oe(t),{width:n,height:i}},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(t));if(U(i)){var r=i.parentNode,o=Array.from(r.children).find(function(e){return!e.hidden});if(ve.transitions&&!ve.reducedMotion){r.style.width="".concat(o.scrollWidth,"px"),r.style.height="".concat(o.scrollHeight,"px");var a=Ke.getMenuSize.call(this,i),l=function(t){t.target===r&&["width","height"].includes(t.propertyName)&&(r.style.width="",r.style.height="",_e.call(e,r,Y,l))};we.call(this,r,Y,l),r.style.width="".concat(a.width,"px"),r.style.height="".concat(a.height,"px")}
2ue(o,!0),ue(i,!1),Ke.focusFirstMenuItem.call(this,i,n)}},setDownloadUrl:function(){var e=this.elements.buttons.download;U(e)&&e.setAttribute("href",this.download)},create:function(e){var t=this,n=Ke.bindMenuItemShortcuts,i=Ke.createButton,r=Ke.createProgress,o=Ke.createRange,a=Ke.createTime,l=Ke.setQualityMenu,s=Ke.setSpeedMenu,u=Ke.showMenuPanel;this.elements.controls=null,H(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var c=ie("div",se(this.config.selectors.controls.wrapper));this.elements.controls=c;var d={class:"plyr__controls__item"};return je(H(this.config.controls)?this.config.controls:[]).forEach(function(l){if("restart"===l&&c.appendChild(i.call(t,"restart",d)),"rewind"===l&&c.appendChild(i.call(t,"rewind",d)),"play"===l&&c.appendChild(i.call(t,"play",d)),"fast-forward"===l&&c.appendChild(i.call(t,"fast-forward",d)),"progress"===l){var s=ie("div",{class:"".concat(d.class," plyr__progress__container")}),h=ie("div",se(t.config.selectors.progress));if(h.appendChild(o.call(t,"seek",{id:"plyr-seek-".concat(e.id)})),h.appendChild(r.call(t,"buffer")),t.config.tooltips.seek){var f=ie("span",{class:t.config.classNames.tooltip},"00:00");h.appendChild(f),t.elements.display.seekTooltip=f}t.elements.progress=h,s.appendChild(t.elements.progress),c.appendChild(s)}if("current-time"===l&&c.appendChild(a.call(t,"currentTime",d)),"duration"===l&&c.appendChild(a.call(t,"duration",d)),"mute"===l||"volume"===l){var p=t.elements.volume;if(U(p)&&c.contains(p)||(p=ie("div",ee({},d,{class:"".concat(d.class," plyr__volume").trim()})),t.elements.volume=p,c.appendChild(p)),"mute"===l&&p.appendChild(i.call(t,"mute")),"volume"===l&&!Q.isIos){var g={max:1,step:.05,value:t.config.volume};p.appendChild(o.call(t,"volume",ee(g,{id:"plyr-volume-".concat(e.id)})))}}if("captions"===l&&c.appendChild(i.call(t,"captions",d)),"settings"===l&&!J(t.config.settings)){var m=ie("div",ee({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));m.appendChild(i.call(t,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));var v=ie("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),y=ie("div"),b=ie("div",{id:"plyr-settings-".concat(e.id,"-home")}),w=ie("div",{role:"menu"});b.appendChild(w),y.appendChild(b),t.elements.settings.panels.home=b,t.config.settings.forEach(function(i){var r=ie("button",ee(se(t.config.selectors.buttons.settings),{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));n.call(t,r,i),we.call(t,r,"click",function(){u.call(t,i,!1)});var o=ie("span",null,He(i,t.config)),a=ie("span",{class:t.config.classNames.menu.value});a.innerHTML=e[i],o.appendChild(a),r.appendChild(o),w.appendChild(r);var l=ie("div",{id:"plyr-settings-".concat(e.id,"-").concat(i),hidden:""}),s=ie("button",{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--back")});s.appendChild(ie("span",{"aria-hidden":!0},He(i,t.config))),s.appendChild(ie("span",{class:t.config.classNames.hidden},He("menuBack",t.config))),we.call(t,l,"keydown",function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),u.call(t,"home",!0))},!1),we.call(t,s,"click",function(){u.call(t,"home",!1)}),l.appendChild(s),l.appendChild(ie("div",{role:"menu"})),y.appendChild(l),t.elements.settings.buttons[i]=r,t.elements.settings.panels[i]=l}),v.appendChild(y),m.appendChild(v),c.appendChild(m),t.elements.settings.popup=v,t.elements.settings.menu=m}if("pip"===l&&ve.pip&&c.appendChild(i.call(t,"pip",d)),"airplay"===l&&ve.airplay&&c.appendChild(i.call(t,"airplay",d)),"download"===l){var _=ee({},d,{element:"a",href:t.download,target:"_blank"});t.isHTML5&&(_.download="");var T=t.config.urls.download;!K(T)&&t.isEmbed&&ee(_,{icon:"logo-".concat(t.provider),label:t.provider}),c.appendChild(i.call(t,"download",_))}"fullscreen"===l&&c.appendChild(i.call(t,"fullscreen",d))}),this.isHTML5&&l.call(this,Fe.getQualityOptions.call(this)),s.call(this),c},inject:function(){var e=this;if(this.config.loadSprite){var t=Ke.getIconUrl.call(this);t.cors&&ze(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var n=null;this.elements.controls=null;var i,r={id:this.id,seektime:this.config.seekTime,title:this.config.title},o=!0;
2if(V(this.config.controls)&&(this.config.controls=this.config.controls.call(this,r)),this.config.controls||(this.config.controls=[]),U(this.config.controls)||R(this.config.controls)?n=this.config.controls:(n=Ke.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Xe.getLabel.call(this)}),o=!1),o&&R(this.config.controls)&&(n=function(e){var t=e;return Object.entries(r).forEach(function(e){var n=f(e,2),i=n[0],r=n[1];t=qe(t,"{".concat(i,"}"),r)}),t}(n)),R(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),U(i)||(i=this.elements.container),i[U(n)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",n),U(this.elements.controls)||Ke.findElements.call(this),!J(this.elements.buttons)){var a=function(t){var n=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return de(t,n)},set:function(){ce(t,n,arguments.length>0&&void 0!==arguments[0]&&arguments[0])}})};Object.values(this.elements.buttons).filter(Boolean).forEach(function(e){H(e)||G(e)?Array.from(e).filter(Boolean).forEach(a):a(e)})}if(Q.isEdge&&X(i),this.config.tooltips.controls){var l=this.config,s=l.classNames,u=l.selectors,c="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(s.hidden),d=fe.call(this,c);Array.from(d).forEach(function(t){ce(t,e.config.classNames.hidden,!1),ce(t,e.config.classNames.tooltip,!0)})}}};function Je(e){var t=e;if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch(e){return null}}function Ye(e){var t=new URLSearchParams;return D(e)&&Object.entries(e).forEach(function(e){var n=f(e,2),i=n[0],r=n[1];t.set(i,r)}),t}var Xe={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!ve.textTracks)H(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ke.setCaptionsMenu.call(this);else{var e,t;if(U(this.elements.captions)||(this.elements.captions=ie("div",se(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,U(e)&&U(t)&&t.parentNode.insertBefore(e,t.nextSibling)),Q.isIE&&window.URL){var n=this.media.querySelectorAll("track");Array.from(n).forEach(function(e){var t=e.getAttribute("src"),n=Je(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Ue(t,"blob").then(function(t){e.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){oe(e)})})}var i=je((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(function(e){return e.split("-")[0]})),r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===r&&(r=f(i,1)[0]);var o=this.storage.get("captions");if(B(o)||(o=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:o,language:r,languages:i}),this.isHTML5){var a=this.config.captions.update?"addtrack removetrack":"removetrack";we.call(this,this.media.textTracks,a,Xe.update.bind(this))}setTimeout(Xe.update.bind(this),0)}},update:function(){var e=this,t=Xe.getTracks.call(this,!0),n=this.captions,i=n.active,r=n.language,o=n.meta,a=n.currentTrackNode,l=Boolean(t.find(function(e){return e.language===r}));this.isHTML5&&this.isVideo&&t.filter(function(e){return!o.get(e)}).forEach(function(t){e.debug.log("Track added",t),o.set(t,{default:"showing"===t.mode}),"showing"===t.mode&&(t.mode="hidden"),we.call(e,t,"cuechange",function(){return Xe.updateCues.call(e)})}),(l&&this.language!==r||!t.includes(a))&&(Xe.setLanguage.call(this,r),Xe.toggle.call(this,i&&l)),ce(this.elements.container,this.config.classNames.captions.enabled,!J(t)),H(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ke.setCaptionsMenu.call(this)},toggle:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,r=this.config.classNames.captions.active,o=F(e)?!i:e;if(o!==i){if(n||(this.captions.active=o,this.storage.set({captions:o})),!this.language&&o&&!n){var a=Xe.getTracks.call(this),s=Xe.findTrack.call(this,[this.captions.language].concat(l(this.captions.languages)
2),!0);return this.captions.language=s.language,void Xe.set.call(this,a.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=o),ce(this.elements.container,r,o),this.captions.toggled=o,Ke.updateSetting.call(this,"captions"),Se.call(this,this.media,o?"captionsenabled":"captionsdisabled")}setTimeout(function(){o&&t.captions.toggled&&(t.captions.currentTrackNode.mode="hidden")})}},set:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Xe.getTracks.call(this);if(-1!==e)if(q(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;var i=n[e],r=(i||{}).language;this.captions.currentTrackNode=i,Ke.updateSetting.call(this,"captions"),t||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),Se.call(this,this.media,"languagechange")}Xe.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Xe.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Xe.toggle.call(this,!1,t)},setLanguage:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(R(e)){var n=e.toLowerCase();this.captions.language=n;var i=Xe.getTracks.call(this),r=Xe.findTrack.call(this,[n]);Xe.set.call(this,i.indexOf(r),t)}else this.debug.warn("Invalid language argument",e)},getTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter(function(n){return!e.isHTML5||t||e.captions.meta.has(n)}).filter(function(e){return["captions","subtitles"].includes(e.kind)})},findTrack:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Xe.getTracks.call(this),o=function(e){return Number((n.captions.meta.get(e)||{}).default)},a=Array.from(r).sort(function(e,t){return o(t)-o(e)});return e.every(function(e){return t=a.find(function(t){return t.language===e}),!t}),t||(i?a[0]:void 0)},getCurrentTrack:function(){return Xe.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!$(t)&&ve.textTracks&&this.captions.toggled&&(t=Xe.getCurrentTrack.call(this)),$(t)?J(t.label)?J(t.language)?He("enabled",this.config):e.language.toUpperCase():t.label:He("disabled",this.config)},updateCues:function(e){if(this.supported.ui)if(U(this.elements.captions))if(F(e)||Array.isArray(e)){var t=e;if(!t){var n=Xe.getCurrentTrack.call(this);t=Array.from((n||{}).activeCues||[]).map(function(e){return e.getCueAsHTML()}).map(Be)}var i=t.map(function(e){return e.trim()}).join("\n");if(i!==this.elements.captions.innerHTML){ae(this.elements.captions);var r=ie("span",se(this.config.selectors.caption));r.innerHTML=i,this.elements.captions.appendChild(r),Se.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",e);else this.debug.warn("No captions element to render to")}},Qe={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"S
2D"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Ze="picture-in-picture",et={html5:"html5",youtube:"youtube",vimeo:"vimeo"},tt="video",nt=function(){},it=function(){return c(function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];s(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")},[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):nt}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):nt}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):nt}}])}(),rt=function(){function t(n){var i=this;s(this,t),e(this,"onChange",function(){if(i.enabled){var e=i.player.elements.buttons.fullscreen;U(e)&&(e.pressed=i.active);var t=i.target===i.player.media?i.target:i.player.elements.container;Se.call(i.player,t,i.active?"enterfullscreen":"exitfullscreen",!0)}}),e(this,"toggleFallback",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=e?"hidden":"",ce(i.target,i.player.config.classNames.fullscreen.fallback,e),Q.isIos){var t=document.head.querySelector('meta[name="viewport"]'),n="viewport-fit=cover";t||(t=document.createElement("meta")).setAttribute("name","viewport");var r=R(t.content)&&t.content.includes(n);e?(i.cleanupViewport=!r,r||(t.content+=",".concat(n))):i.cleanupViewport&&(t.content=t.content.split(",").filter(function(e){return e.trim()!==n}).join(","))}i.onChange()}),e(this,"trapFocus",function(e){if(!Q.isIos&&i.active&&"Tab"===e.key&&9===e.keyCode){var t=document.activeElement,n=fe.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),r=f(n,1)[0],o=n[n.length-1];t!==o||e.shiftKey?t===r&&e.shiftKey&&(o.focus(),e.preventDefault()):(r.focus(),e.preventDefault())}}),e(this,"update",function(){var e;i.enabled?(e=i.forceFallback?"Fallback (forced)":t.native?"Native":"Fallback",i.player.debug.log("".concat(e," fullscreen enabled"))):i.player.debug.log("Fullscreen not supported and fallback disabled"),ce(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)}),e(this,"enter",function(){i.enabled&&(Q.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!t.native||i.forceFallback?i.toggleFallback(!0):i.prefix?J(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))}),e(this,"exit",function(){if(i.enabled)if(Q.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),Oe(i.player.play());else if(!t.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!J(i.prefix)){var e="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(e).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),e(this,"toggle",function(){i.active?i.exit():i.enter()}),this.player=n,this.prefix=t.prefix,this.property=t.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===n.config.fullscreen.fallback,this.player.elements.fullscreen=n.config.fullscreen.container&&function(e,t){return(Element.prototype.closest||function(){var e=this;do{if(he.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,n.config.fullscreen.container),we.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),function(){i.onChange()}),we.call(this.player,this.player.elements.container,"dblclick",function(e){U(i.player.elements.controls)&&i.player.elements.controls.contains(e.target)||i.player.listeners.proxy(e,i.toggle,"fullscreen")}),we.call(this,this.player.elements.container,"keydown",function(e){return i.trapFocus(e)}),this.update()}return c(t,[{key:"usingNative",get:function(){return t.native&&!this.forceFallback}},{key:"enabled",get:function(){return(t.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!t.native||this.forceFallback)return de(this.target,this.player.config.classNames.fullscreen.fallback);var e=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}},{key:"target",get:function(){return Q.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}
2],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(V(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some(function(t){return!(!V(document["".concat(t,"ExitFullscreen")])&&!V(document["".concat(t,"CancelFullScreen")])||(e=t,0))}),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}])}();function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(function(n,i){var r=new Image,o=function(){delete r.onload,delete r.onerror,(r.naturalWidth>=t?n:i)(r)};Object.assign(r,{onload:o,onerror:o,src:e})})}var at={addStyleHook:function(){ce(this.elements.container,this.config.selectors.container.replace(".",""),!0),ce(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void at.toggleNativeControls.call(this,!0);U(this.elements.controls)||(Ke.inject.call(this),this.listeners.controls()),at.toggleNativeControls.call(this),this.isHTML5&&Xe.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ke.updateVolume.call(this),Ke.timeUpdate.call(this),at.checkPlaying.call(this),ce(this.elements.container,this.config.classNames.pip.supported,ve.pip&&this.isHTML5&&this.isVideo),ce(this.elements.container,this.config.classNames.airplay.supported,ve.airplay&&this.isHTML5),ce(this.elements.container,this.config.classNames.isIos,Q.isIos),ce(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){Se.call(e,e.media,"ready")},0),at.setTitle.call(this),this.poster&&at.setPoster.call(this,this.poster,!1).catch(function(){}),this.config.duration&&Ke.durationUpdate.call(this)},setTitle:function(){var e=He("play",this.config);if(R(this.config.title)&&!J(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(function(t){t.setAttribute("aria-label",e)}),this.isEmbed){var t=pe.call(this,"iframe");if(!U(t))return;var n=J(this.config.title)?"video":this.config.title,i=He("frameTitle",this.config);t.setAttribute("title",i.replace("{title}",n))}},togglePoster:function(e){ce(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(e){var t=this;return arguments.length>
21&&void 0!==arguments[1]&&!arguments[1]||!this.poster?(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),Pe.call(this).then(function(){return ot(e)}).catch(function(n){throw e===t.poster&&at.togglePoster.call(t,!1),n}).then(function(){if(e!==t.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(e,"')"),backgroundSize:""}),at.togglePoster.call(t,!0),e})):Promise.reject(new Error("Poster already set"))},checkPlaying:function(e){var t=this;ce(this.elements.container,this.config.classNames.playing,this.playing),ce(this.elements.container,this.config.classNames.paused,this.paused),ce(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(function(e){Object.assign(e,{pressed:t.playing}),e.setAttribute("aria-label",He(t.playing?"pause":"play",t.config))}),z(e)&&"timeupdate"===e.type||at.toggleControls.call(this)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(function(){ce(t.elements.container,t.config.classNames.loading,t.loading),at.toggleControls.call(t)},this.loading?250:0)},toggleControls:function(e){var t=this.elements.controls;if(t&&this.config.hideControls){var n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles:function(){var e=this;Object.values(h({},this.media.style)).filter(function(e){return!J(e)&&R(e)&&e.startsWith("--plyr")}).forEach(function(t){e.elements.container.style.setProperty(t,e.media.style.getPropertyValue(t)),e.media.style.removeProperty(t)}),J(this.media.style)&&this.media.removeAttribute("style")}},lt=function(){return c(function t(n){var i=this;s(this,t),e(this,"firstTouch",function(){var e=i.player,t=e.elements;e.touch=!0,ce(t.container,e.config.classNames.isTouch,!0)}),e(this,"setTabFocus",function(e){var t=i.player,n=t.elements;if(clearTimeout(i.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(i.lastKeyDown=e.timeStamp);var r=e.timeStamp-i.lastKeyDown<=20;("focus"!==e.type||r)&&(function(){var e=t.config.classNames.tabFocus;ce(fe.call(t,".".concat(e)),e,!1)}(),"focusout"!==e.type&&(i.focusTimer=setTimeout(function(){var e=document.activeElement;n.container.contains(e)&&ce(document.activeElement,t.config.classNames.tabFocus,!0)},10)))}}),e(this,"global",function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=i.player;t.config.keyboard.global&&be.call(t,window,"keydown keyup",i.handleKey,e,!1),be.call(t,document.body,"click",i.toggleMenu,e),Te.call(t,document.body,"touchstart",i.firstTouch),be.call(t,document.body,"keydown focus blur focusout",i.setTabFocus,e,!1,!0)}),e(this,"container",function(){var e=i.player,t=e.config,n=e.elements,r=e.timers;!t.keyboard.global&&t.keyboard.focused&&we.call(e,n.container,"keydown keyup",i.handleKey,!1),we.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",function(t){var i=n.controls;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);var o=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(at.toggleControls.call(e,!0),o=e.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(function(){return at.toggleControls.call(e,!1)},o)});var o=function(){if(e.isVimeo&&!e.config.vimeo.premium){var t=n.wrapper,i=e.fullscreen.active,r=f(Ie.call(e),2),o=r[0],a=r[1],l=xe("aspect-ratio: ".concat(o," / ").concat(a));if(i){var s=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],u=s[1],c=s[0]/u>o/a;l?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?u/a*o+"px":null,t.style.margin=c?"0 auto":null)}else l?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null)}},a=function(){clearTimeout(r.resized),r.resized=setTimeout(o,50)};we.call(e,n.container,"enterfullscreen exitfullscreen",function(t){e.fullscreen.target===n.container&&(!e.isEmbed&&J(e.config.ratio)||(o(),("enterfullscreen"===t.type?we:_e).call(e,window,"resize",a)))})}),e(this,"media",function(){var e=i.player,t=e.elements;if(we.call(e,e.media,"timeupdate seeking seeked",function(t){return Ke.timeUpdate.call(e,t)}),we.call(e,e.media,"durationchange loadeddata loadedmetadata",function(t){return Ke.durationUpdate.call(e,t)}),we.call(e,e.media,"ended",function(){e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())}),we.call(e,e.media,"progress playing seeking seeked",function(t){return Ke.updateProgress.call(e,t)}),we.call(e,e.media,"volumechange",function(t){return Ke.updateVolume.call(e,t)}),we.call(e,e.media,"playing play pause ended emptied timeupdate",function(t){return at.checkPlaying.call(e,t)}),we.call(e,e.media,"waiting canplay seeked playing",function(t){return at.checkLoading.call(e,t)}),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){var n=pe.call(e,".".concat(e.config.classNames.video));if(!U(n))return;we.call(e,t.container,"click",function(r){([t.container,n].includes(r.target)||n.contains(r.target))&&(e.touch&&e.config.hideControls||(e.ended?(i.proxy(r,e.restart,"restart"),i.proxy(r,function(){Oe(e.play())},"play")):i.proxy(r,function(){Oe(e.togglePlay())},"play")))})}e.supported.ui&&e.config.disableContextMenu&&we.call(e,t.wrapper,"contextmenu",function(e){e.preventDefault()},!1),we.call(e,e.media,"volumechange",function(){e.storage.set({volume:e.volume,muted:e.muted})}),we.call(e,e.media,"ratechange",function(){Ke.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})}),we.call(e,e.media,"qualitychange",function(t){Ke.updateSetting.call(e,"quality",null,t.detail.quality)}),we.call(e,e.media,"ready qualitychange",function(){Ke.setDownloadUrl.call(e)});var r=e.config.events.concat(["keyup","keydown"]).join(" ");we.call(e,e.media,r,function(n){var i=n.detail,r=void 0===i?{}:i;"error"===n.type&&(r=e.media.error),Se.call(e,t.container,n.type,!0,r)})}),e(this,"proxy",function(e,t,n){var r=i.player,o=r.config.listeners[n],a=!0;V(o)&&(a=o.call(r,e)),!1!==a&&V(t)&&t.call(r,e)}),e(this,"bind",function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=i.player,l=a.config.listeners[r],s=V(l);we.call(a,e,t,function(e){return i.proxy(e,n,r)},o&&!s)}),e(this,"controls",function(){var e=i.player,t=e.elements,n=Q.isIE?"change":"input";
2if(t.buttons.play&&Array.from(t.buttons.play).forEach(function(t){i.bind(t,"click",function(){Oe(e.togglePlay())},"play")}),i.bind(t.buttons.restart,"click",e.restart,"restart"),i.bind(t.buttons.rewind,"click",function(){e.lastSeekTime=Date.now(),e.rewind()},"rewind"),i.bind(t.buttons.fastForward,"click",function(){e.lastSeekTime=Date.now(),e.forward()},"fastForward"),i.bind(t.buttons.mute,"click",function(){e.muted=!e.muted},"mute"),i.bind(t.buttons.captions,"click",function(){return e.toggleCaptions()}),i.bind(t.buttons.download,"click",function(){Se.call(e,e.media,"download")},"download"),i.bind(t.buttons.fullscreen,"click",function(){e.fullscreen.toggle()},"fullscreen"),i.bind(t.buttons.pip,"click",function(){e.pip="toggle"},"pip"),i.bind(t.buttons.airplay,"click",e.airplay,"airplay"),i.bind(t.buttons.settings,"click",function(t){t.stopPropagation(),t.preventDefault(),Ke.toggleMenu.call(e,t)},null,!1),i.bind(t.buttons.settings,"keyup",function(t){var n=t.which;[13,32].includes(n)&&(13!==n?(t.preventDefault(),t.stopPropagation(),Ke.toggleMenu.call(e,t)):Ke.focusFirstMenuItem.call(e,null,!0))},null,!1),i.bind(t.settings.menu,"keydown",function(t){27===t.which&&Ke.toggleMenu.call(e,t)}),i.bind(t.inputs.seek,"mousedown mousemove",function(e){var n=t.progress.getBoundingClientRect(),i=100/n.width*(e.pageX-n.left);e.currentTarget.setAttribute("seek-value",i)}),i.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",function(t){var n=t.currentTarget,i=t.keyCode?t.keyCode:t.which,r="play-on-seeked";if(!W(t)||39===i||37===i){e.lastSeekTime=Date.now();var o=n.hasAttribute(r),a=["mouseup","touchend","keyup"].includes(t.type);o&&a?(n.removeAttribute(r),Oe(e.play())):!a&&e.playing&&(n.setAttribute(r,""),e.pause())}}),Q.isIos){var r=fe.call(e,'input[type="range"]');Array.from(r).forEach(function(e){return i.bind(e,n,function(e){return X(e.target)})})}i.bind(t.inputs.seek,n,function(t){var n=t.currentTarget,i=n.getAttribute("seek-value");J(i)&&(i=n.value),n.removeAttribute("seek-value"),e.currentTime=i/n.max*e.duration},"seek"),i.bind(t.progress,"mouseenter mouseleave mousemove",function(t){return Ke.updateSeekTooltip.call(e,t)}),i.bind(t.progress,"mousemove touchmove",function(t){var n=e.previewThumbnails;n&&n.loaded&&n.startMove(t)}),i.bind(t.progress,"mouseleave touchend click",function(){var t=e.previewThumbnails;t&&t.loaded&&t.endMove(!1,!0)}),i.bind(t.progress,"mousedown touchstart",function(t){var n=e.previewThumbnails;n&&n.loaded&&n.startScrubbing(t)}),i.bind(t.progress,"mouseup touchend",function(t){var n=e.previewThumbnails;n&&n.loaded&&n.endScrubbing(t)}),Q.isWebkit&&Array.from(fe.call(e,'input[type="range"]')).forEach(function(t){i.bind(t,"input",function(t){return Ke.updateRangeFill.call(e,t.target)})}),e.config.toggleInvert&&!U(t.display.duration)&&i.bind(t.display.currentTime,"click",function(){0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Ke.timeUpdate.call(e))}),i.bind(t.inputs.volume,n,function(t){e.volume=t.target.value},"volume"),i.bind(t.controls,"mouseenter mouseleave",function(n){t.controls.hover=!e.touch&&"mouseenter"===n.type}),t.fullscreen&&Array.from(t.fullscreen.children).filter(function(e){return!e.contains(t.container)}).forEach(function(n){i.bind(n,"mouseenter mouseleave",function(n){t.controls.hover=!e.touch&&"mouseenter"===n.type})}),i.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",function(e){t.controls.pressed=["mousedown","touchstart"].includes(e.type)}),i.bind(t.controls,"focusin",function(){var n=e.config,r=e.timers;ce(t.controls,n.classNames.noTransition,!0),at.toggleControls.call(e,!0),setTimeout(function(){ce(t.controls,n.classNames.noTransition,!1)},0);var o=i.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(function(){return at.toggleControls.call(e,!1)},o)}),i.bind(t.inputs.volume,"wheel",function(t){var n=t.webkitDirectionInvertedFromDevice,i=[t.deltaX,-t.deltaY].map(function(e){return n?-e:e}),r=f(i,2),o=r[0],a=r[1],l=Math.sign(Math.abs(o)>Math.abs(a)?o:a);e.increaseVolume(l/50);var s=e.media.volume;(1===l&&s<1||-1===l&&s>0)&&t.preventDefault()},"volume",!1)}),this.player=n,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)},[{key:"handleKey",value:function(e){var t=this.player,n=t.elements,i=e.keyCode?e.keyCode:e.which,r="keydown"===e.type,o=r&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&q(i))if(r){var a=document.activeElement;if(U(a)){var l=t.config.selectors.editable;if(a!==n.inputs.seek&&he(a,l))return;if(32===e.which&&he(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:o||(t.currentTime=t.duration/10*(i-48));break;case 32:case 75:o||Oe(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:o||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:o||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===i&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}},{key:"toggleMenu",value:function(e){Ke.toggleMenu.call(this.player,e)}
2}])}();"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var st=function(e,t){return function(e){e.exports=function(){var e=function(){},t={},n={},i={};function r(e,t){e=e.push?e:[e];var r,o,a,l=[],s=e.length,u=s;for(r=function(e,n){n.length&&l.push(e),--u||t(l)};s--;)o=e[s],(a=n[o])?r(o,a):(i[o]=i[o]||[]).push(r)}function o(e,t){if(e){var r=i[e];if(n[e]=t,r)for(;r.length;)r[0](e,t),r.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function l(t,n,i,r){var o,a,s=document,u=i.async,c=(i.numRetries||0)+1,d=i.before||e,h=t.replace(/[\?|#].*$/,""),f=t.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(h)?((a=s.createElement("link")).rel="stylesheet",a.href=f,(o="hideFocus"in a)&&a.relList&&(o=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(a=s.createElement("img")).src=f:((a=s.createElement("script")).src=t,a.async=void 0===u||u),a.onload=a.onerror=a.onbeforeload=function(e){var s=e.type[0];if(o)try{a.sheet.cssText.length||(s="e")}catch(e){18!=e.code&&(s="e")}if("e"==s){if((r+=1)<c)return l(t,n,i,r)}else if("preload"==a.rel&&"style"==a.as)return a.rel="stylesheet";n(t,s,e.defaultPrevented)},!1!==d(t,a)&&s.head.appendChild(a)}function s(e,t,n){var i,r,o=(e=e.push?e:[e]).length,a=o,s=[];for(i=function(e,n,i){if("e"==n&&s.push(e),"b"==n){if(!i)return;s.push(e)}--o||t(s)},r=0;r<a;r++)l(e[r],i,n)}function u(e,n,i){var r,l;if(n&&n.trim&&(r=n),l=(r?i:n)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function u(t,n){s(e,function(e){a(l,e),t&&a({success:t,error:n},e),o(r,e)},l)}if(l.returnPromise)return new Promise(u);u()}return u.ready=function(e,t){return r(e,function(e){a(t,e)}),u},u.done=function(e){o(e,[])},u.reset=function(){t={},n={},i={}},u.isDefined=function(e){return e in t},u}()}(t={exports:{}}),t.exports}();function ut(e){return new Promise(function(t,n){st(e,{success:t,error:n})})}function ct(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Se.call(this,this.media,e?"play":"pause"))}var dt={setup:function(){var e=this;ce(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Me.call(e),D(window.Vimeo)?dt.ready.call(e):ut(e.config.urls.vimeo.sdk).then(function(){dt.ready.call(e)}).catch(function(t){e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready:function(){var e=this,t=this,n=t.config.vimeo,i=n.premium,r=n.referrerPolicy,o=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,a);i&&Object.assign(o,{controls:!1,sidedock:!1});var l=Ye(h({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},o)),s=t.media.getAttribute("src");J(s)&&(s=t.media.getAttribute(t.config.attributes.embed.id));var u,c=J(u=s)?null:q(Number(u))?u:u.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:u,d=ie("iframe"),p=De(t.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",p),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),J(r)||d.setAttribute("referrerPolicy",r),i||!n.customControls)d.setAttribute("data-poster",t.poster),t.media=le(d,t.media);else{var g=ie("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});g.appendChild(d),t.media=le(g,t.media)}n.customControls||Ue(De(t.config.urls.vimeo.api,p)).then(function(e){!J(e)&&e.thumbnail_url&&at.setPoster.call(t,e.thumbnail_url).catch(function(){})}),t.embed=new window.Vimeo.Player(d,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){return ct.call(t,!0),t.embed.play()},t.media.pause=function(){return ct.call(t,!1),t.embed.pause()},t.media.stop=function(){t.pause(),t.currentTime=0};var m=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return m},set:function(e){var n=t.embed,i=t.media,r=t.paused,o=t.volume,a=r&&!n.hasPlayed;i.seeking=!0,Se.call(t,i,"seeking"),Promise.resolve(a&&n.setVolume(0)).then(function(){return n.setCurrentTime(e)}).then(function(){return a&&n.pause()}).then(function(){return a&&n.setVolume(o)}).catch(function(){})}});var v=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return v},set:function(e){t.embed.setPlaybackRate(e).then(function(){v=e,Se.call(t,t.media,"ratechange")}).catch(function(){t.options.speed=[1]})}});var y=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return y},set:function(e){t.embed.setVolume(e).then(function(){y=e,Se.call(t,t.media,"volumechange")})}});var b=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return b},set:function(e){var n=!!B(e)&&e;t.embed.setVolume(n?0:t.config.volume).then(function(){b=n,Se.call(t,t.media,"volumechange")})}});var w,_=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return _},set:function(e){var n=B(e)?e:t.config.loop.active;t.embed.setLoop(n).then(function(){_=n})}}),t.embed.getVideoUrl().then(function(e){w=e,Ke.setDownloadUrl.call(t)}).catch(function(t){e.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:function(){return w}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(function(n){var i=f(n,2),r=i[0],o=i[1];t.embed.ratio=Ne(r,o),Me.call(e)}
2),t.embed.setAutopause(t.config.autopause).then(function(e){t.config.autopause=e}),t.embed.getVideoTitle().then(function(n){t.config.title=n,at.setTitle.call(e)}),t.embed.getCurrentTime().then(function(e){m=e,Se.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(function(e){t.media.duration=e,Se.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(function(e){t.media.textTracks=e,Xe.setup.call(t)}),t.embed.on("cuechange",function(e){var n=e.cues,i=(void 0===n?[]:n).map(function(e){return function(e){var t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.innerText}(e.text)});Xe.updateCues.call(t,i)}),t.embed.on("loaded",function(){t.embed.getPaused().then(function(e){ct.call(t,!e),e||Se.call(t,t.media,"playing")}),U(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("bufferstart",function(){Se.call(t,t.media,"waiting")}),t.embed.on("bufferend",function(){Se.call(t,t.media,"playing")}),t.embed.on("play",function(){ct.call(t,!0),Se.call(t,t.media,"playing")}),t.embed.on("pause",function(){ct.call(t,!1)}),t.embed.on("timeupdate",function(e){t.media.seeking=!1,m=e.seconds,Se.call(t,t.media,"timeupdate")}),t.embed.on("progress",function(e){t.media.buffered=e.percent,Se.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&Se.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(function(e){e!==t.media.duration&&(t.media.duration=e,Se.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",function(){t.media.seeking=!1,Se.call(t,t.media,"seeked")}),t.embed.on("ended",function(){t.media.paused=!0,Se.call(t,t.media,"ended")}),t.embed.on("error",function(e){t.media.error=e,Se.call(t,t.media,"error")}),n.customControls&&setTimeout(function(){return at.build.call(t)},0)}};function ht(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Se.call(this,this.media,e?"play":"pause"))}function ft(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var pt,gt={setup:function(){var e=this;if(ce(this.elements.wrapper,this.config.classNames.embed,!0),D(window.YT)&&V(window.YT.Player))gt.ready.call(this);else{var t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){V(t)&&t(),gt.ready.call(e)},ut(this.config.urls.youtube.sdk).catch(function(t){e.debug.warn("YouTube API failed to load",t)})}},getTitle:function(e){var t=this;Ue(De(this.config.urls.youtube.api,e)).then(function(e){if(D(e)){var n=e.title,i=e.height,r=e.width;t.config.title=n,at.setTitle.call(t),t.embed.ratio=Ne(r,i)}Me.call(t)}).catch(function(){Me.call(t)})},ready:function(){var e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(J(n)||!n.startsWith("youtube-")){var i=e.media.getAttribute("src");J(i)&&(i=e.media.getAttribute(this.config.attributes.embed.id));var r,o=J(r=i)?null:r.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:r,a=ie("div",{id:"".concat(e.provider,"-").concat(Math.floor(1e4*Math.random())),"data-poster":t.customControls?e.poster:void 0});if(e.media=le(a,e.media),t.customControls){var l=function(e){return"https://i.ytimg.com/vi/".concat(o,"/").concat(e,"default.jpg")};ot(l("maxres"),121).catch(function(){return ot(l("sd"),121)}).catch(function(){return ot(l("hq"))}).then(function(t){return at.setPoster.call(e,t.src)}).then(function(t){t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(function(){})}e.embed=new window.YT.Player(e.media,{videoId:o,host:ft(t),playerVars:ee({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError:function(t){if(!e.media.error){var n=t.data,i={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invali
2d characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occured";e.media.error={code:n,message:i},Se.call(e,e.media,"error")}},onPlaybackRateChange:function(t){var n=t.target;e.media.playbackRate=n.getPlaybackRate(),Se.call(e,e.media,"ratechange")},onReady:function(n){if(!V(e.media.play)){var i=n.target;gt.getTitle.call(e,o),e.media.play=function(){ht.call(e,!0),i.playVideo()},e.media.pause=function(){ht.call(e,!1),i.pauseVideo()},e.media.stop=function(){i.stopVideo()},e.media.duration=i.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Se.call(e,e.media,"seeking"),i.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(e){i.setPlaybackRate(e)}});var r=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return r},set:function(t){r=t,i.setVolume(100*r),Se.call(e,e.media,"volumechange")}});var a=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return a}
2,set:function(t){var n=B(t)?t:a;a=n,i[n?"mute":"unMute"](),i.setVolume(100*r),Se.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}});var l=i.getAvailablePlaybackRates();e.options.speed=l.filter(function(t){return e.config.speed.options.includes(t)}),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),Se.call(e,e.media,"timeupdate"),Se.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(function(){e.media.buffered=i.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&Se.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),Se.call(e,e.media,"canplaythrough"))},200),t.customControls&&setTimeout(function(){return at.build.call(e)},50)}},onStateChange:function(n){var i=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,Se.call(e,e.media,"seeked")),n.data){case-1:Se.call(e,e.media,"timeupdate"),e.media.buffered=i.getVideoLoadedFraction(),Se.call(e,e.media,"progress");break;case 0:ht.call(e,!1),e.media.loop?(i.stopVideo(),i.playVideo()):Se.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ht.call(e,!0),Se.call(e,e.media,"playing"),e.timers.playing=setInterval(function(){Se.call(e,e.media,"timeupdate")},50),e.media.duration!==i.getDuration()&&(e.media.duration=i.getDuration(),Se.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ht.call(e,!1);break;case 3:Se.call(e,e.media,"waiting")}Se.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}}},mt={setup:function(){this.media?(ce(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ce(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ce(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=ie("div",{class:this.config.classNames.video}),te(this.media,this.elements.wrapper),this.elements.poster=ie("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Fe.setup.call(this):this.isYouTube?gt.setup.call(this):this.isVimeo&&dt.setup.call(this)):this.debug.warn("No media element found!")}},vt=function(){return c(function t(n){var i=this;s(this,t),e(this,"load",function(){i.enabled&&(D(window.google)&&D(window.google.ima)?i.ready():ut(i.player.config.urls.googleIMA.sdk).then(function(){i.ready()}).catch(function(){i.trigger("error",new Error("Google IMA SDK failed to load"))}))}),e(this,"ready",function(){var e;i.enabled||((e=i).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),i.startSafetyTimer(12e3,"ready()"),i.managerPromise.then(function(){i.clearSafetyTimer("onAdsManagerLoaded()")}),i.listeners(),i.setupIMA()}),e(this,"setupIMA",function(){i.elements.container=ie("div",{class:i.player.config.classNames.ads}),i.player.elements.container.appendChild(i.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(i.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(i.player.config.playsinline),i.elements.displayContainer=new google.ima.AdDisplayContainer(i.elements.container,i.player.media),i.loader=new google.ima.AdsLoader(i.elements.displayContainer),i.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(e){return i.onAdsManagerLoaded(e)},!1),i.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return i.onAdError(e)},!1),i.requestAds()}),e(this,"requestAds",function(){var e=i.player.elements.container;try{var t=new google.ima.AdsRequest;t.adTagUrl=i.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!i.player.muted),i.loader.requestAds(t)}catch(e){i.onAdError(e)}}),e(this,"pollCountdown",function(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(i.countdownTimer),void i.elements.container.removeAttribute("data-badge-text");i.countdownTimer=setInterval(function(){var e=$e(Math.max(i.manager.getRemainingTime(),0)),t="".concat(He("advertisement",i.player.config)," - ").concat(e);i.elements.container.setAttribute("data-badge-text",t)},100)}),e(this,"onAdsManagerLoaded",function(e){if(i.enabled){var t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,i.manager=e.getAdsManager(i.player,t),i.cuePoints=i.manager.getCuePoints(),i.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return i.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){i.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return i.onAdEvent(e)})}),i.trigger("loaded")}}),e(this,"addCuePoints",function(){J(i.cuePoints)||i.cuePoints.forEac
2h(function(e){if(0!==e&&-1!==e&&e<i.player.duration){var t=i.player.elements.progress;if(U(t)){var n=100/i.player.duration*e,r=ie("span",{class:i.player.config.classNames.cues});r.style.left="".concat(n.toString(),"%"),t.appendChild(r)}}})}),e(this,"onAdEvent",function(e){var t=i.player.elements.container,n=e.getAd(),r=e.getAdData();switch(function(e){Se.call(i.player,i.player.media,"ads".concat(e.replace(/_/g,"").toLowerCase()))}(e.type),e.type){case google.ima.AdEvent.Type.LOADED:i.trigger("loaded"),i.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:i.manager.setVolume(i.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:i.player.ended?i.loadAds():i.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:i.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:i.pollCountdown(),i.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&i.player.debug.warn("Non-fatal ad error: ".concat(r.adError.getMessage()))}}),e(this,"onAdError",function(e){i.cancel(),i.player.debug.warn("Ads error",e)}),e(this,"listeners",function(){var e,t=i.player.elements.container;i.player.on("canplay",function(){i.addCuePoints()}),i.player.on("ended",function(){i.loader.contentComplete()}),i.player.on("timeupdate",function(){e=i.player.currentTime}),i.player.on("seeked",function(){var t=i.player.currentTime;J(i.cuePoints)||i.cuePoints.forEach(function(n,r){e<n&&n<t&&(i.manager.discardAdBreak(),i.cuePoints.splice(r,1))})}),window.addEventListener("resize",function(){i.manager&&i.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),e(this,"play",function(){var e=i.player.elements.container;i.managerPromise||i.resumeContent(),i.managerPromise.then(function(){i.manager.setVolume(i.player.volume),i.elements.displayContainer.initialize();try{i.initialized||(i.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),i.manager.start()),i.initialized=!0}catch(e){i.onAdError(e)}}).catch(function(){})}),e(this,"resumeContent",function(){i.elements.container.style.zIndex="",i.playing=!1,Oe(i.player.media.play())}),e(this,"pauseContent",function(){i.elements.container.style.zIndex=3,i.playing=!0,i.player.media.pause()}),e(this,"cancel",function(){i.initialized&&i.resumeContent(),i.trigger("error"),i.loadAds()}),e(this,"loadAds",function(){i.managerPromise.then(function(){i.manager&&i.manager.destroy(),i.managerPromise=new Promise(function(e){i.on("loaded",e),i.player.debug.log(i.manager)}),i.initialized=!1,i.requestAds()}).catch(function(){})}),e(this,"trigger",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=i.events[e];H(o)&&o.forEach(function(e){V(e)&&e.apply(i,n)})}),e(this,"on",function(e,t){return H(i.events[e])||(i.events[e]=[]),i.events[e].push(t),i}),e(this,"startSafetyTimer",function(e,t){i.player.debug.log("Safety timer invoked from: ".concat(t)),i.safetyTimer=setTimeout(function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")},e)}),e(this,"clearSafetyTimer",function(e){F(i.safetyTimer)||(i.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(i.safetyTimer),i.safetyTimer=null)}),this.player=n,this.config=n.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(function(e,t){i.on("loaded",e),i.on("error",t)}),this.load()},[{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!J(e.publisherId)||K(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;return K(e.tagUrl)?e.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Ye({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId}))}}])}(),yt=function(e){var t=[];
2return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(function(e){var n={};e.split(/\r\n|\n|\r/).forEach(function(e){if(q(n.startTime)){if(!J(e.trim())&&J(n.text)){var t,i,r=e.trim().split("#xywh=");t=f(r,1),n.text=t[0],r[1]&&(i=f(r[1].split(","),4),n.x=i[0],n.y=i[1],n.w=i[2],n.h=i[3])}}else{var o=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);o&&(n.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+Number("0.".concat(o[4])),n.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+Number("0.".concat(o[9])))}}),n.text&&t.push(n)}),t},bt=function(e,t){var n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n},wt=function(){return c(function t(n){var i=this;s(this,t),e(this,"load",function(){i.player.elements.display.seekTooltip&&(i.player.elements.display.seekTooltip.hidden=i.enabled),i.enabled&&i.getThumbnails().then(function(){i.enabled&&(i.render(),i.determineContainerAutoSizing(),i.loaded=!0)})}),e(this,"getThumbnails",function(){return new Promise(function(e){var t=i.player.config.previewThumbnails.src;if(J(t))throw new Error("Missing previewThumbnails.src config attribute");var n=function(){i.thumbnails.sort(function(e,t){return e.height-t.height}
2),i.player.debug.log("Preview thumbnails",i.thumbnails),e()};if(V(t))t(function(e){i.thumbnails=e,n()});else{var r=(R(t)?[t]:t).map(function(e){return i.getThumbnail(e)});Promise.all(r).then(n)}})}),e(this,"getThumbnail",function(e){return new Promise(function(t){Ue(e).then(function(n){var r={frames:yt(n),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));var o=new Image;o.onload=function(){r.height=o.naturalHeight,r.width=o.naturalWidth,i.thumbnails.push(r),t()},o.src=r.urlPrefix+r.frames[0].text})})}),e(this,"startMove",function(e){if(i.loaded&&z(e)&&["touchmove","mousemove"].includes(e.type)&&i.player.media.duration){if("touchmove"===e.type)i.seekTime=i.player.media.duration*(i.player.elements.inputs.seek.value/100);else{var t=i.player.elements.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);i.seekTime=i.player.media.duration*(n/100),i.seekTime<0&&(i.seekTime=0),i.seekTime>i.player.media.duration-1&&(i.seekTime=i.player.media.duration-1),i.mousePosX=e.pageX,i.elements.thumb.time.innerText=$e(i.seekTime)}i.showImageAtCurrentTime()}}),e(this,"endMove",function(){i.toggleThumbContainer(!1,!0)}),e(this,"startScrubbing",function(e){(F(e.button)||!1===e.button||0===e.button)&&(i.mouseDown=!0,i.player.media.duration&&(i.toggleScrubbingContainer(!0),i.toggleThumbContainer(!1,!0),i.showImageAtCurrentTime()))}),e(this,"endScrubbing",function(){i.mouseDown=!1,Math.ceil(i.lastTime)===Math.ceil(i.player.media.currentTime)?i.toggleScrubbingContainer(!1):Te.call(i.player,i.player.media,"timeupdate",function(){i.mouseDown||i.toggleScrubbingContainer(!1)})}),e(this,"listeners",function(){i.player.on("play",function(){i.toggleThumbContainer(!1,!0)}),i.player.on("seeked",function(){i.toggleThumbContainer(!1)}),i.player.on("timeupdate",function(){i.lastTime=i.player.media.currentTime})}),e(this,"render",function(){i.elements.thumb.container=ie("div",{class:i.player.config.classNames.previewThumbnails.thumbContainer}),i.elements.thumb.imageContainer=ie("div",{class:i.player.config.classNames.previewThumbnails.imageContainer}),i.elements.thumb.container.appendChild(i.elements.thumb.imageContainer);var e=ie("div",{class:i.player.config.classNames.previewThumbnails.timeContainer});i.elements.thumb.time=ie("span",{},"00:00"),e.appendChild(i.elements.thumb.time),i.elements.thumb.container.appendChild(e),U(i.player.elements.progress)&&i.player.elements.progress.appendChild(i.elements.thumb.container),i.elements.scrubbing.container=ie("div",{class:i.player.config.classNames.previewThumbnails.scrubbingContainer}),i.player.elements.wrapper.appendChild(i.elements.scrubbing.container)}),e(this,"destroy",function(){i.elements.thumb.container&&i.elements.thumb.container.remove(),i.elements.scrubbing.container&&i.elements.scrubbing.container.remove()}),e(this,"showImageAtCurrentTime",function(){i.mouseDown?i.setScrubbingContainerSize():i.setThumbContainerSizeAndPos();var e=i.thumbnails[0].frames.findIndex(function(e){return i.seekTime>=e.startTime&&i.seekTime<=e.endTime}),t=e>=0,n=0;i.mouseDown||i.toggleThumbContainer(t),t&&(i.thumbnails.forEach(function(t,r){i.loadedImages.includes(t.frames[e].text)&&(n=r)}),e!==i.showingThumb&&(i.showingThumb=e,i.loadImage(n)))}),e(this,"loadImage",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=i.showingThumb,n=i.thumbnails[e],r=n.urlPrefix,o=n.frames[t],a=n.frames[t].text,l=r+a;if(i.currentImageElement&&i.currentImageElement.dataset.filename===a)i.showImage(i.currentImageElement,o,e,t,a,!1),i.currentImageElement.dataset.index=t,i.removeOldImages(i.currentImageElement);else{i.loadingImage&&i.usingSprites&&(i.loadingImage.onload=null);var s=new Image;
2s.src=l,s.dataset.index=t,s.dataset.filename=a,i.showingThumbFilename=a,i.player.debug.log("Loading image: ".concat(l)),s.onload=function(){return i.showImage(s,o,e,t,a,!0)},i.loadingImage=s,i.removeOldImages(s)}}),e(this,"showImage",function(e,t,n,r,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];i.player.debug.log("Showing thumb: ".concat(o,". num: ").concat(r,". qual: ").concat(n,". newimg: ").concat(a)),i.setImageSizeAndOffset(e,t),a&&(i.currentImageContainer.appendChild(e),i.currentImageElement=e,i.loadedImages.includes(o)||i.loadedImages.push(o)),i.preloadNearby(r,!0).then(i.preloadNearby(r,!1)).then(i.getHigherQuality(n,e,t,o))}),e(this,"removeOldImages",function(e){Array.from(i.currentImageContainer.children).forEach(function(t){if("img"===t.tagName.toLowerCase()){var n=i.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;var r=i.currentImageContainer;setTimeout(function(){r.removeChild(t),i.player.debug.log("Removing thumb: ".concat(t.dataset.filename))},n)}}})}),e(this,"preloadNearby",function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(n){setTimeout(function(){var r=i.thumbnails[0].frames[e].text;if(i.showingThumbFilename===r){var o;o=t?i.thumbnails[0].frames.slice(e):i.thumbnails[0].frames.slice(0,e).reverse();var a=!1;o.forEach(function(e){var t=e.text;if(t!==r&&!i.loadedImages.includes(t)){a=!0,i.player.debug.log("Preloading thumb filename: ".concat(t));var o=i.thumbnails[0].urlPrefix+t,l=new Image;l.src=o,l.onload=function(){i.player.debug.log("Preloaded thumb filename: ".concat(t)),i.loadedImages.includes(t)||i.loadedImages.push(t),n()}}}),a||n()}},300)})}),e(this,"getHigherQuality",function(e,t,n,r){if(e<i.thumbnails.length-1){var o=t.naturalHeight;i.usingSprites&&(o=n.h),o<i.thumbContainerHeight&&setTimeout(function(){i.showingThumbFilename===r&&(i.player.debug.log("Showing higher quality thumb for: ".concat(r)),i.loadImage(e+1))},300)}}),e(this,"toggleThumbContainer",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.player.config.classNames.previewThumbnails.thumbContainerShown;i.elements.thumb.container.classList.toggle(n,e),!e&&t&&(i.showingThumb=null,i.showingThumbFilename=null)}),e(this,"toggleScrubbingContainer",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=i.player.config.classNames.previewThumbnails.scrubbingContainerShown;i.elements.scrubbing.container.classList.toggle(t,e),e||(i.showingThumb=null,i.showingThumbFilename=null)}),e(this,"determineContainerAutoSizing",function(){(i.elements.thumb.imageContainer.clientHeight>20||i.elements.thumb.imageContainer.clientWidth>20)&&(i.sizeSpecifiedInCSS=!0)}),e(this,"setThumbContainerSizeAndPos",function(){if(i.sizeSpecifiedInCSS){if(i.elements.thumb.imageContainer.clientHeight>20&&i.elements.thumb.imageContainer.clientWidth<20){var e=Math.floor(i.elements.thumb.imageContainer.clientHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.width="".concat(e,"px")}else if(i.elements.thumb.imageContainer.clientHeight<20&&i.elements.thumb.imageContainer.clientWidth>20){var t=Math.floor(i.elements.thumb.imageContainer.clientWidth/i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(t,"px")}}else{var n=Math.floor(i.thumbContainerHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(i.thumbContainerHeight,"px"),i.elements.thumb.imageContainer.style.width="".concat(n,"px")}i.setThumbContainerPos()}),e(this,"setThumbContainerPos",function(){var e=i.player.elements.progress.getBoundingClientRect(),t=i.player.elements.container.getBoundingClientRect(),n=i.elements.thumb.container,r=t.left-e.left+10,o=t.right-e.left-n.clientWidth-10,a=i.mousePosX-e.left-n.clientWidth/2;a<r&&(a=r),a>o&&(a=o),n.style.left="".concat(a,"px")}),e(this,"setScrubbingContainerSize",function(){var e=bt(i.thumbAspectRatio,{width:i.player.media.clientWidth,height:i.player.media.clientHeight}
2),t=e.width,n=e.height;i.elements.scrubbing.container.style.width="".concat(t,"px"),i.elements.scrubbing.container.style.height="".concat(n,"px")}),e(this,"setImageSizeAndOffset",function(e,t){if(i.usingSprites){var n=i.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left="-".concat(t.x*n,"px"),e.style.top="-".concat(t.y*n,"px")}}),this.player=n,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()},[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?bt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}])}(),_t={insertElements:function(e,t){var n=this;R(t)?re(e,this.media,{src:t}):H(t)&&t.forEach(function(t){re(e,n.media,t)})},change:function(e){var t=this;Z(e,"sources.length")?(Fe.cancelRequests.call(this),this.destroy.call(this,function(){t.options.quality=[],oe(t.media),t.media=null,U(t.elements.container)&&t.elements.container.removeAttribute("class");var n=e.sources,i=e.type,r=f(n,1)[0],o=r.provider,a=void 0===o?et.html5:o,l=r.src,s="html5"===a?i:"div",u="html5"===a?{}:{src:l};Object.assign(t,{provider:a,type:i,supported:ve.check(i,a,t.config.playsinline),media:ie(s,u)}),t.elements.container.appendChild(t.media),B(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),J(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),at.addStyleHook.call(t),t.isHTML5&&_t.insertElements.call(t,"source",n),t.config.title=e.title,mt.setup.call(t),t.isHTML5&&Object.keys(e).includes("tracks")&&_t.insertElements.call(t,"track",e.tracks),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&at.build.call(t),t.isHTML5&&t.media.load(),J(e.previewThumbnails)||(Object.assign(t.config.previewThumbnails,e.previewThumbnails),t.previewThumbnails&&t.previewThumbnails.loaded&&(t.previewThumbnails.destroy(),t.previewThumbnails=null),t.config.previewThumbnails.enabled&&(t.previewThumbnails=new wt(t))),t.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},Tt=function(){function t(n,i){var r=this;if(s(this,t),e(this,"play",function(){return V(r.media.play)?(r.ads&&r.ads.enabled&&r.ads.managerPromise.then(function(){return r.ads.play()}).catch(function(){return Oe(r.media.play())}),r.media.play()):null}),e(this,"pause",function(){return r.playing&&V(r.media.pause)?r.media.pause():null}),e(this,"togglePlay",function(e){return(B(e)?e:!r.playing)?r.play():r.pause()}),e(this,"stop",function(){r.isHTML5?(r.pause(),r.restart()):V(r.media.stop)&&r.media.stop()}),e(this,"restart",function(){r.currentTime=0}),e(this,"rewind",function(e){r.currentTime-=q(e)?e:r.config.seekTime}),e(this,"forward",function(e){r.currentTime+=q(e)?e:r.config.seekTime}),e(this,"increaseVolume",function(e){var t=r.media.muted?0:r.volume;r.volume=t+(q(e)?e:0)}),e(this,"decreaseVolume",function(e){r.increaseVolume(-e)}),e(this,"airplay",function(){ve.airplay&&r.media.webkitShowPlaybackTargetPicker()}),e(this,"toggleControls",function(e){if(r.supported.ui&&!r.isAudio){var t=de(r.elements.container,r.config.classNames.hideControls),n=void 0===e?void 0:!e,i=ce(r.elements.container,r.config.classNames.hideControls,n);if(i&&H(r.config.controls)&&r.config.controls.includes("settings")&&!J(r.config.settings)&&Ke.toggleMenu.call(r,!1),i!==t){var o=i?"controlshidden":"controlsshown";Se.call(r,r.media,o)}return!i}return!1}),e(this,"on",function(e,t){we.call(r,r.elements.container,e,t)}),e(this,"once",function(e,t){Te.call(r,r.elements.container,e,t)}),e(this,"off",function(e,t){_e(r.elements.container,e,t)}),e(this,"destroy",function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r.ready){var n=function(){document.body.style.overflow="",r.embed=null,t?(Object.keys(r.elements).length&&(oe(r.elements.buttons.play),oe(r.elements.captions),oe(r.elements.controls),oe(r.elements.wrapper),r.elements.buttons.play=null,r.elements.captions=null,r.elements.controls=null,r.elements.wrapper=null),V(e)&&e()):(ke.call(r),Fe.cancelRequests.call(r),le(r.elements.original,r.elements.container),Se.call(r,r.elements.original,"destroyed",!0),V(e)&&e.call(r.elements.original),r.ready=!1,setTimeout(function(){r.elements=null,r.media=null},200))};r.stop(),clearTimeout(r.timers.loading),clearTimeout(r.timers.controls),clearTimeout(r.timers.resized),r.isHTML5?(at.toggleNativeControls.call(r,!0),n()):r.isYouTube?(clearInterval(r.timers.buffering),clearInterval(r.timers.playing),null!==r.embed&&V(r.embed.destroy)&&r.embed.destroy(),n()):r.isVimeo&&(null!==r.embed&&r.embed.unload().then(n),setTimeout(n,200))}}),e(this,"supports",function(e){return ve.mime.call(r,e)}),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ve.touch,this.media=n,R(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||G(this.media)||H(this.media))&&(this.media=this.media[0]),this.config=ee({},Qe,t.defaults,i||{},function(){try{return JSON.parse(r.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new it(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ve),!F(this.media)&&U(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(ve.check().api){var o=this.media.cloneNode(!0);o.autoplay=!1,this.elements.original=o;var a=this.media.tagName.toLowerCase(),l=null,u=null;switch(a){case"div":if(l=this.media.querySelector("iframe"),U(l)){if(u=Je(l.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?et.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?et.vimeo:null}(u.toString()),this.elements.container=this.media,this.media=l,this.elements.container.className="",u.search.length){var c=["1","true"];
2c.includes(u.searchParams.get("autoplay"))&&(this.config.autoplay=!0),c.includes(u.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=c.includes(u.searchParams.get("playsinline")),this.config.youtube.hl=u.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(J(this.provider)||!Object.values(et).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=tt;break;case"video":case"audio":this.type=a,this.provider=et.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ve.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new lt(this),this.storage=new Ge(this),this.media.plyr=this,U(this.elements.container)||(this.elements.container=ie("div",{tabindex:0}),te(this.media,this.elements.container)),at.migrateStyles.call(this),at.addStyleHook.call(this),mt.setup.call(this),this.config.debug&&we.call(this,this.elements.container,this.config.events.join(" "),function(e){r.debug.log("event: ".concat(e.type))}),this.fullscreen=new rt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&at.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new vt(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",function(){return Oe(r.play())}),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new wt(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return c(t,[{key:"isHTML5",get:function(){return this.provider===et.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===et.youtube}},{key:"isVimeo",get:function(){return this.provider===et.vimeo}},{key:"isVideo",get:function(){return this.type===tt}},{key:"isAudio",get:function(){return"audio"===this.type}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(e){if(this.duration){var t=q(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var e=this.media.buffered;return q(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=q(t)&&t!==1/0?t:0;return e||n}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(e){var t=e;R(t)&&(t=Number(t)),q(t)||(t=this.storage.get("volume")),q(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!J(e)&&this.muted&&t>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(e){var t=e;B(t)||(t=this.storage.get("muted")),B(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(e){var t=this,n=null;q(e)&&(n=e),q(n)||(n=this.storage.get("speed")),q(n)||(n=this.config.speed.selected);var i=this.minimumSpeed,r=this.maximumSpeed;n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(e,t),n)}(n,i,r),this.config.speed.selected=n,setTimeout(function(){t.media.playbackRate=n},0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,l(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,l(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(e){var t=this.config.quality,n=this.options.quality;if(n.length){var i=[!J(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(q),r=!0;
2if(!n.includes(i)){var o=Ce(n,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(o," instead")),i=o,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(e){var t=B(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}},{key:"source",get:function(){return this.media.currentSrc},set:function(e){_t.change.call(this,e)}},{key:"download",get:function(){var e=this.config.urls.download;return K(e)?e:this.source},set:function(e){K(e)&&(this.config.urls.download=e,Ke.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(e){this.isVideo?at.setPoster.call(this,e,!1).catch(function(){}):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var e=Ee(Ie.call(this));return H(e)?e.join(":"):e},set:function(e){this.isVideo?R(e)&&Le(e)?(this.config.ratio=Ee(e),Me.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(e,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(e){var t=B(e)?e:this.config.autoplay;this.config.autoplay=t}},{key:"toggleCaptions",value:function(e){Xe.toggle.call(this,e,!1)}},{key:"currentTrack",get:function(){var e=this.captions,t=e.toggled,n=e.currentTrack;return t?n:-1},set:function(e){Xe.set.call(this,e,!1)}},{key:"language",get:function(){return(Xe.getCurrentTrack.call(this)||{}).language},set:function(e){Xe.setLanguage.call(this,e,!1)}},{key:"pip",get:function(){return ve.pip?J(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ze:null},set:function(e){if(ve.pip){var t=B(e)?e:!this.pip;V(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ze:"inline"),V(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}}}],[{key:"supported",value:function(e,t,n){return ve.check(e,t,n)}},{key:"loadSprite",value:function(e,t){return ze(e,t)}},{key:"setup",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return R(e)?i=Array.from(document.querySelectorAll(e)):G(e)?i=Array.from(e):H(e)&&(i=e.filter(U)),J(i)?null:i.map(function(e){return new t(e,n)})}}])}();return Tt.defaults=(pt=Qe,JSON.parse(JSON.stringify(pt))),Tt},"object"==y(t)?e.exports=o():void 0===(r="function"==typeof(i=o)?i.call(t,n,t,e):i)||(e.exports=r))}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function i(e){let t=[],n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);128>r?t[n++]=r:(2048>r?t[n++]=r>>6|192:(55296==(64512&r)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),t[n++]=r>>18|240,t[n++]=r>>12&63|128):t[n++]=r>>12|224,t[n++]=r>>6&63|128),t[n++]=63&r|128)}let i=0;for(n=0;n<t.length;n++)i+=t[n],i=r(i,"+-a^+6");return i=r(i,"+-3^+b+-f"),i^=0,0>i&&(i=2147483648+(2147483647&i)),i%=1e6,i.toString()+"."+i.toString()}e.d(t,{ZP:()=>p,j1:()=>a,Gb:()=>s,e6:()=>u,XU:()=>h,Iu:()=>f});const r=function(e,t){for(let n=0;n<t.length-2;n+=3){let i=t.charAt(n+2);i="a"<=i?i.charCodeAt(0)-87:Number(i),i="+"==t.charAt(n+1)?e>>>i:e<<i,e="+"==t.charAt(n)?e+i:e^i}return e},o={client:"gtx",from:"auto",to:"en",hl:"en",tld:"com"};function a(e,t){const n=Object.assign(Object.assign({},o),t),r={client:n.client,sl:n.from,tl:n.to,hl:n.hl,ie:"UTF-8",oe:"UTF-8",otf:"1",ssel:"0",tsel:"0",kc:"7",q:e,tk:i(e)},a=new URLSearchParams(r);return["at","bd","ex","ld","md","qca","rw","rm","ss","t"].forEach(e
2=>a.append("dt",e)),`https://translate.google.${n.tld}/translate_a/single?${a}`}const l={auto:"Automatic",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa",zh:"Chinese Simplified","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",ko:"Korean",ku:"Kurdish (Kurmanji)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"Macedonian",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",ro:"Romanian",ru:"Russian",sm:"Samoan",gd:"Scots Gaelic",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"},s=e=>Boolean(l[e]);function u(e,t=!1){const n={text:"",pronunciation:"",from:{language:{didYouMean:!1,iso:""},text:{autoCorrected:!1,value:"",didYouMean:!1}}};if(e[0].forEach(e=>{e[0]?n.text+=e[0]:e[2]&&(n.pronunciation+=e[2])}),e[2]===e[8][0][0]?n.from.language.iso=e[2]:(n.from.language.didYouMean=!0,n.from.language.iso=e[8][0][0]),e[7]&&e[7][0]){let t=e[7][0];t=t.replace(/<b><i>/g,"["),t=t.replace(/<\/i><\/b>/g,"]"),n.from.text.value=t,!0===e[7][5]?n.from.text.autoCorrected=!0:n.from.text.didYouMean=!0}return t&&(n.raw=e),n}var c=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function l(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}s((i=i.apply(e,t||[])).next())})};let d="";const h=e=>(d=e,f);function f(e,t={}){return c(this,void 0,void 0,function*(){const n=a(e,t),i=yield fetch(`${d}${n}`);if(!i.ok)throw new Error("Request failed");return u(yield i.json(),t.raw)})}const p=f;var g=t.XU;function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return y(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(y(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,y(d,"constructor",u),y(u,"constructor",s),s.displayName="GeneratorFunction",y(u,r,"GeneratorFunction"),y(d),y(d,r,"Generator"),y(d,i,function(){return this}),y(d,"toString",function(){return"[object Generator]"}),(v=function(){return{w:o,m:h}})()}function y(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}y=function(e,t,n,i){function o(t,n){y(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},y(e,t,n,i)}function b(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){b(o,i,r,a,l,"next",e)}function l(e){b(o,i,r,a,l,"throw",e)}a(void 0)})}}function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
2if(!n){if(Array.isArray(e)||(n=S(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function T(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"==typeof e)return k(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==m(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(e){var t,n=null===(t=ttsObj.settings)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.tta__settings_exclude_content_by_css_selectors;return!(!n&&!Array.isArray(n))&&(0!==(n=n.split("\n")).length&&""!=n[0]&&{key:"tta__settings_exclude_content_by_css_selectors",value:n})},x=function(){var e,t,n=null===(e=window.TTS)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.speech;if(n&&n.boundary_delimiters)return n;var i="undefined"!=typeof ttsObjPro?null===(t=ttsObjPro)||void 0===t?void 0:t.speech:null;return i&&i.boundary_delimiters?i:{}},A=function(e){var t,n,i,r,o=null!==(t=x().excluded_tags)&&void 0!==t?t:null===(n=ttsObj.settings)||void 0===n||null===(n=n.settings)||void 0===n?void 0:n.tta__settings_exclude_tags;return!!o&&(Array.isArray(o)&&(o=o.join("|")),0!==(null===(r=o=null===(i=o)||void 0===i?void 0:i.split("|"))||void 0===r?void 0:r.length)&&""!=o[0]&&{key:"tta__settings_exclude_tags",value:o})},L=function(e){var t,n,i=null===(t=ttsObj.settings)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.tta__settings_exclude_texts;return!!i&&(Array.isArray(i)&&(i=i.join("|")),0!==(i=null===(n=i)||void 0===n?void 0:n.split("|")).length&&""!=i[0])},E=function(e){var t={},n=function(){var e,t=null===(e=ttsObj.settings)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.tta__settings_css_selectors;return!(!t&&!Array.isArray(t))&&0!==(t=t.split("\n")).length&&""!=t[0]&&{key:"tta__settings_css_selectors",value:t}}();if(n&&n.key&&n.value&&(t[n.key]=n.value),C()){var i=C();t[i.key]=i.value}if(A()){var r=A();t[r.key]=r.value,x().excluded_tags||["script","style","figcaption","figure"].forEach(function(e){t[r.key].includes(e)||t[r.key].push(e)})}else{var o;t.tta__settings_exclude_tags=null!==(o=x().excluded_tags)&&void 0!==o?o:["style","script","figure","figcaption"]}return t},I=function(e,t,n){var i,r=null===(i=ttsObj.settings)||void 0===i||null===(i=i.settings)||void 0===i?void 0:i.tta__settings_exclude_texts;return r&&(r=r.split("|"),Array.isArray(r)&&r.length&&(t=G(r,t,n))),t},M=function(e){var t,n,i=x(),r=null!==(t=i.delimiter_characters)&&void 0!==t?t:[".",",","?","!","|",";",":","¿","¡","،","؟"],o=null!==(n=i.closing_characters)&&void 0!==n?n:[],a=String(null!=e?e:"").trim();if(!a)return!1;for(var l=Array.from(a),s=l.length-1;s>=0;s--)if(!o.includes(l[s]))return!r.includes(l[s]);return!1},N=function(e,t,n,i){var r,o,a,l,s,u,c,d,h,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";t=function(e){var t,n,i,r,o,a,l=x(),s=(p=e,p.outerHTML),u=null!==(t=null===(n=ttsObj.settings)||void 0===n||null===(n=n.recording)||void 0===n?void 0:n.tta__sentence_delimiter)&&void 0!==t?t:". ",c=null!==(i=l.boundary_delimiters)&&void 0!==i?i:(null!==(r=null===(o=ttsObjPro)||void 0===o?void 0:o.delimiter_addable_tags)&&void 0!==r?r:[]).reduce(function(e,t){return e[t]=u,e},{}),d=null!==(a=l.void_delimiters)&&void 0!==a?a:{},h=Object.keys(c),f=Object.keys(d);var p;if(!h.length&&!f.length)return q(s);var g=[];h.length&&g.push("<\\s*\\/\\s*(".concat(h.join("|"),")\\s*>"));f.length&&g.push("<\\s*(".concat(f.join("|"),")\\b[^>]*>"));var m,v=new RegExp("(?:".concat(g.join("|"),")"),"gi"),y="",b="",w=0;for(;null!==(m=v.exec(s));){var _,T=m[0],S=m.index,k=h.length>0,P=k?m[1]:void 0,O=k?m[2]:m[1],j=!P,C=(null!==(_=null!=P?P:O)&&void 0!==_?_:"").toLowerCase(),A=s.slice(w,S);w=S+T.length;var L=R(A).trim();if(""!==L&&(b=L),y+=A,""!==b&&M(b)){var E,I=null!==(E=j?d[C]:c[C])&&void 0!==E?E:u;y+=I,b=I}else""!==L&&(y+=" ");y+=T}return q(y+s.slice(w))}(t);var p=null!==(r=null!==(o=x().default_delimiter)&&void 0!==o?o:null===(a=ttsObj.settings)||void 0===a||null===(a=a.recording)||void 0===a?void 0:a.tta__sentence_delimiter)&&void 0!==r?r:". ",g=(null===(l=t)||void 0===l?void 0:l.textContent)||(null===(s=t)||void 0===s?void 0:s.innerText),m=null!==(u=null==e||null===(c=e.extra)||void 0===c||null===(c=c[n])||void 0===c?void 0:c.title)&&void 0!==u?u:"",v=f||(null==e||null===(d=e.extra)||void 0===d||null===(d=d[n])||void 0===d?void 0:d.language)||"";if(!m||D(v)){var y=function(){var e,t,n;if(null!==(e=null===(t=ttsObj.settings)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.tta__settings_add_post_title_to_read)&&void 0!==e&&!e)return null;var i=[".entry-title",".post-title",".wp-block-post-title",".elementor-heading-title",".elementor-page-title",".page-title",".ast-single-post-title",".oceanwp-single-title","article h1",".hentry h1",".post h1","h1"];
2null!==(n=window)&&void 0!==n&&null!==(n=n.wp)&&void 0!==n&&n.hooks&&(i=wp.hooks.applyFilters("ttsTitleSelectors",i));for(var r=null,o=0;o<i.length&&!(r=document.querySelector(i[o]));o++);if(r){var a=(r.textContent||r.innerText||"").trim();if(a)return a}return null}();y&&(m=y)}var b,w,_=(g||"").trim(),T="";(T=m&&_.toLowerCase().startsWith(m.toLowerCase().trim())?"":0==i&&M(m)?m+""+p:m+" ",null!==(h=ttsObj.settings)&&void 0!==h&&null!==(h=h.settings)&&void 0!==h&&h.tta__settings_add_post_excerpt_to_read)&&(T+=null!==(b=(null==e||null===(w=e.extra[n])||void 0===w?void 0:w.excerpt)+" ")&&void 0!==b?b:" ");return T+=g},F=function(e,t){var n=JSON.parse(window.sessionStorage.getItem("tts_pro_stored_content"));if(!e||!t)return!1;var i=function(e){return String(e||"").replace(/\s+/g," ").trim()},r=function(e){return String(e||"").split(/[-_]/)[0].toLowerCase()},o=(null==n?void 0:n.language)&&r(n.language)===r(t),a=i(e),l=i(null==n?void 0:n.content),s=a&&l&&(a===l||a.includes(l)||l.includes(a));return!o&&s?(console.warn('[TTS] Refused to cache untranslated text as the "'+t+'" translation.'),!1):(window.sessionStorage.setItem("tts_pro_stored_content",JSON.stringify({content:null==n?void 0:n.content,language:null==n?void 0:n.language,url:window.location.href,contentSettings:null==n?void 0:n.contentSettings,translations:O(O({},null==n?void 0:n.translations),{},j({},t,e))})),!0)};function D(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!((null===(e=ttsObj)||void 0===e?void 0:e.compatible)||{})["gtranslate/gtranslate.php"])return!1;var r=((null===(t=window.ttsObjPro)||void 0===t?void 0:t.language)||(null===(n=ttsObj)||void 0===n||null===(n=n.settings)||void 0===n||null===(n=n.listening)||void 0===n?void 0:n.tta__listening_lang)||"").substring(0,2).toLowerCase();return!!(i=(i||"").substring(0,2).toLowerCase())&&i!==r}function q(e){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}function R(e){var t=document.createElement("template");return t.innerHTML=e,t.content.textContent||""}function B(e,t){var n,i,r;n=null!==(i=x().default_delimiter)&&void 0!==i?i:null===(r=ttsObj.settings)||void 0===r||null===(r=r.recording)||void 0===r?void 0:r.tta__sentence_delimiter;e=e.replace(/[§†‡※♦♣♠♥◆●■▲►☆★]+/g,"");var o=["\\.",",","\\?","!","\\|",";",":","¿","¡","،","؟"],a=new RegExp("([".concat(o.join(""),"])\\s*([").concat(o.join(""),"])+(\\s*)"),"g");return e=(e=(e=(e=(e=(e=(e=(e=e.replace(a,"$1$3")).replace(/\s+\.\s+\.\s+\.\s+/g," ")).replace(/\s+\.\s+\.\s+/g," ")).replace(/\s+\.\s+(?=[A-Z])/g," ")).replace(/([.!?])(["'\u201D\u2019])\s*\.\s*/g,"$1$2 ")).replace(/\s+\.(?=[A-Za-z])/g," ")).replace(/\s+([.,!?;:])/g,"$1")).replace(/\s{2,}/g," ").trim()}function V(e){var t=[".",",","?","!","|",";",":","¿","¡","،","؟"],n=new RegExp("^[".concat(t.join("\\"),"\\s]+"));e=e.replace(n,"");var i=new RegExp("([".concat(t.join("\\"),"])\\1+"),"g");return e=e.replace(i,"$1")}function H(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var G=function(e,t,n){var i,r,o=document.querySelector("#tts__listent_content_"+n);o=(null===(i=o)||void 0===i?void 0:i.textContent)||(null===(r=o)||void 0===r?void 0:r.innerText),t=t.replace(o,""),t=W(t);for(var a=0;a<e.length;a++){var l=W(e[a]);if(l&&t)if(l.length>200){var s=ue(l),u=s[0],c=s[s.length-1];t=t.replace(/\u00A0/g," ");var d=new RegExp(H(u)+"[\\s\\S]*?"+H(c)+"\\s*","gu");d.test(t)?t=t.replace(d,""):console.warn("Content Not Found")}else t=t.replaceAll(l,"")}return t},U=function(e){try{!function(e){document.createDocumentFragment().querySelector(e)}(e)}catch(e){return!1}return!0},z=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(!e)return null;var a="tta__settings_css_selectors",l=Array.isArray(t[a])?t[a].slice():[];if(l=l.map(function(e){return W(e)}).filter(function(e){return e&&U(e)}),l.length>0){for(var s=(e.ownerDocument||document).createElement("div"),u=!1,c=0;c<l.length;c++)try{e.querySelectorAll(l[c]).forEach(function(e){s.appendChild(e.cloneNode(!0)),u=!0})}catch(e){}u&&(e=s)}var d=[];Object.keys(t).forEach(function(e){e!==a&&Array.isArray(t[e])&&d.push(t[e])});for(var h=0;h<d.length;h++)for(var f=d[h],p=0;p<f.length;p++){var g=W(f[p]);e&&U(g)&&e.querySelectorAll(g).forEach(function(e){return e.remove()})}e&&"function"==typeof e.querySelectorAll&&e.querySelectorAll(".tts__listent_content, tts-play-button").forEach(function(e){return e.remove()});e&&e.querySelectorAll(".tts__listent_content, .plyr, audio").forEach(function(e){return e.remove()}),window.wp&&wp.hooks&&(e=wp.hooks.applyFilters("tts_before_dom_content_extract",e,i));var m=N(n,e,i,r,o);return L()&&(m=I(0,m,i)),m},W=function(e){return e&&(e=e.replace(/\s+/g," ")),e&&(e=e.trim()),e},$=[".entry-content","article .entry-content",".post-content",".article-content",'[itemprop="articleBody"]',".elementor-widget-theme-post-content .elementor-widget-container",".et_pb_post_content",".fl-post-content",".wp-block-post-content",".td-post-content",".ast-article-single .entry-content",".oceanwp-content-area .entry-content",".single-content","article .content",".content-area .site-main article"],K=function(e,t,n){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=$;null!==(i=window)&&void 0!==i&&null!==(i=i.wp)&&void 0!==i&&i.hooks&&(a=wp.hooks.applyFilters("ttsCommonContentSelectors",a));for(var l=0;l<a.length;l++)if(U(a[l])){var s=document.querySelector(a[l]);if(s){var u=s.cloneNode(!0),c=z(u,e,t,n,0,o);if(c&&c.trim().length>0)return c}}return(null===(r=window)||void 0===r||null===(r=r.TTS)||void 0===r||null===(r=r.contents)||void 0===r?void 0:r[n])||""},J=function(e){if(!e)return e;var t=document.createElement("textarea");return t.innerHTML=e,t.value},Y=.5,X=.5,Q=.4,Z=.2,ee=.3,te=.3,ne=.8,ie=.3,re=function(e){var t,n;if(e&&null!==(t=window)&&void 0!==t&&null!==(t=t.TTS)&&void 0!==t&&t.settings){var i=e.trim().split(/\s+/).length,r=parseFloat(null===(n=window)||void 0===n||null===(n=n.TTS)||void 0===n||null===(n=n.settings)||void 0===n||null===(n=n.listening)||void 0===n?void 0:n.tta__listening_rate)||1,o=i/(150*r)*60,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,i=e.match(/\.{3,}/g);return n+=(i?i.length:0)*ne,n+=(e.replace(/\.{3,}/g,"").split(".").length-1)*Y,n+=(e.split("?").length-1)*X,n+=(e.split("!").length-1)*Q,n+=(e.split(",").length-1)*Z,n+=(e.split(";").length-1)*ee,n+=(e.split(":").length-1)*te,n+=(e.split("—").length-1)*ie,t>0&&(n/=t),n}(e,r),l=o+a,s=Math.max(1,Math.ceil(l/60));window.TTS.settings.readingTime=s}},oe=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=E();console.log(r);var o="";Object.keys(r).length?o=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(Object.keys(n).length<1)return e;var o="";if(Object.keys(n).includes("tta__settings_css_selectors")){var a=n.tta__settings_css_selectors;console.log({includeSelectors:a}),delete n.tta__settings_css_selectors;for(var l=0;l<a.length;l++){var s=a[l];if(U(s)){var u=document.querySelector(s);if(u){u=u.cloneNode(!0);var c=z(u,n,t,i,l,r);if(c){var d,h,f,p=null!==(d=null!==(h=x().default_delimiter)&&void 0!==h?h:null===(f=ttsObj.settings)||void 0===f||null===(f=f.recording)||void 0===f?void 0:f.tta__sentence_delimiter)&&void 0!==d?d:". ";o&&M(o.trim())?o=o.trim()+p+" ":o&&(o=o.trim()+" "),o+=c}}}}}else{var g=document.querySelector(".tts_content_wrapper_"+i);g?(g=g.cloneNode(!0),o=z(g,n,t,i,0,r)):o=K(n,t,i,r)}return W(o)}(e,t,r,n,i):L()&&(o=I(0,e));var a=function(e){for(var t,n,i=null!==(t=null===(n=ttsObjPro)||void 0===n?void 0:n.content_exclude_delimiters)&&void 0!==t?t:{},r=0,o=Object.values(i);r<o.length;r++){var a=o[r],l=new RegExp(le(a.substring(0,2))+".*?"+le(a.substring(a.length-2)),"g");e=e.replace(l,"")}return e=B(e)}(o);return a=function(e,t,n){var i;if(null!=t&&null!==(i=t.extra)&&void 0!==i&&null!==(i=i[n])&&void 0!==i&&i.compatible_contents){var r,o,a=null!==(r=null==t||null===(o=t.extra)||void 0===o||null===(o=o[n])||void 0===o||null===(o=o.compatible_contents)||void 0===o?void 0:o.tts_acf_fields)&&void 0!==r?r:[],l=[];for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];l.push(u)}l.length&&(e+=" ",e+=l.join(". "))}return e}(a,t,n),a};function ae(e,t,n){var i,r,o=[];null!==(i=ttsObj.settings)&&void 0!==i&&i.aliases&&(o=ttsObj.settings.aliases);var a="function"==typeof window.TextToSpeech?window.TextToSpeech:null===(r=window.TextToSpeech)||void 0===r?void 0:r.constructor;return null!=a&&a.replaceAliases?a.replaceAliases(e,o,!0):(Object.values(o).forEac
2h(function(t){if(null!=t&&t.actual_text){var n=new RegExp(le(t.actual_text),"gi");e=e.replace(n,function(){return t.to_read})}}),e)}function le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var se=function(e,t,n){var i=e.length-t;if(i<=n)return i;for(var r,o=e.substr(t,n),a=(e[t+n],/[.!?;\u2026\u3002\uFF01\uFF1F\uFF1B\u06D4\u061F\u0964]["'\)\]\u00BB\u201D\u2019\u300D\u300F\uFF3D\uFF09\u00AB]*\s/g),l=-1;null!==(r=a.exec(o));)l=r.index+r[0].length;for(var s=/[\u3002\uFF01\uFF1F\uFF1B]["'\u300D\u300F\uFF3D\uFF09]*/g;null!==(r=s.exec(o));){var u=r.index+r[0].length;u>l&&(l=u)}if(l>.3*n)return l;for(var c=/[,:\)\uFF0C\u3001]\s/g,d=-1;null!==(r=c.exec(o));)d=r.index+r[0].length;if(d>.3*n)return d;var h=o.lastIndexOf(" ");return h>0?h+1:n};function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",n=new Set([".","!","?"]);n.add(t);var i=(n=T(n)).map(function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join(""),r=new RegExp("[^".concat(i,"]+[").concat(i,"]+[\\])'\"\\`'\"]*|[^").concat(i,"]+$"),"g"),o=e.match(r);return o&&0!==o.length?o:e.trim()?[e]:[]}var ce=function(e,t,n){var i,r,o,a,l,s,u,c,d,h,f,p,g,m=JSON.parse(window.sessionStorage.getItem("tts_pro_stored_content")),v=parseInt(null==t||null===(i=t.settings)||void 0===i?void 0:i.postId);if(Array.isArray(null===(r=ttsObj.settings)||void 0===r||null===(r=r.settings)||void 0===r?void 0:r.tta__settings_clear_cache)){var y,b=null===(y=ttsObj.settings)||void 0===y||null===(y=y.settings)||void 0===y?void 0:y.tta__settings_clear_cache.map(function(e){return parseInt(e)});ttsObj.settings.settings.tta__settings_clear_cache=b}var w=function(e,t){var n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,_;return JSON.stringify({before:null!==(n=null==e||null===(i=e.extra)||void 0===i||null===(i=i[t])||void 0===i?void 0:i.text_before_content)&&void 0!==n?n:"",after:null!==(r=null==e||null===(o=e.extra)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.text_after_content)&&void 0!==r?r:"",include:null!==(a=null===(l=ttsObj.settings)||void 0===l||null===(l=l.settings)||void 0===l?void 0:l.tta__settings_css_selectors)&&void 0!==a?a:"",exclude:null!==(s=null===(u=ttsObj.settings)||void 0===u||null===(u=u.settings)||void 0===u?void 0:u.tta__settings_exclude_content_by_css_selectors)&&void 0!==s?s:"",tags:null!==(c=null===(d=ttsObj.settings)||void 0===d||null===(d=d.settings)||void 0===d?void 0:d.tta__settings_exclude_tags)&&void 0!==c?c:"",title_to_read:null===(h=null===(f=ttsObj.settings)||void 0===f||null===(f=f.settings)||void 0===f?void 0:f.tta__settings_add_post_title_to_read)||void 0===h||h,excerpt_to_read:null!==(p=null===(g=ttsObj.settings)||void 0===g||null===(g=g.settings)||void 0===g?void 0:g.tta__settings_add_post_excerpt_to_read)&&void 0!==p&&p,texts:null!==(m=null===(v=ttsObj.settings)||void 0===v||null===(v=v.settings)||void 0===v?void 0:v.tta__settings_exclude_texts)&&void 0!==m?m:"",acf:null!==(y=null==e||null===(b=e.extra)||void 0===b||null===(b=b[t])||void 0===b?void 0:b.compatible_contents)&&void 0!==y?y:{},aliases:null!==(w=null===(_=ttsObj.settings)||void 0===_?void 0:_.aliases)&&void 0!==w?w:[]})}(t,n),_=!(null!==(o=m)&&void 0!==o&&o.url)||(null===(a=m)||void 0===a?void 0:a.url)!==window.location.href,T=Array.isArray(null===(l=ttsObj.settings)||void 0===l||null===(l=l.settings)||void 0===l?void 0:l.tta__settings_clear_cache)&&(null===(s=ttsObj.settings)||void 0===s||null===(s=s.settings)||void 0===s||null===(s=s.tta__settings_clear_cache)||void 0===s?void 0:s.length)&&(null===(u=ttsObj.settings)||void 0===u||null===(u=u.settings)||void 0===u||null===(u=u.tta__settings_clear_cache)||void 0===u?void 0:u.includes(v)),S=(null===(c=m)||void 0===c?void 0:c.contentSettings)!==w;(_||T||S)&&(console.log("[TTS] Cache invalidated:",{urlChanged:_,clearCacheRequested:T,settingsChanged:S,postId:v}),me(),m={},T&&ve(t,v));var k,P="";null!==(d=m)&&void 0!==d&&d.url&&(null===(h=m)||void 0===h?void 0:h.url)===window.location.href&&null!==(f=m)&&void 0!==f&&f.content||(P=he(e,t,n,"","getStoredContent"),window.sessionStorage.setItem("tts_pro_stored_content",JSON.stringify({content:P,url:window.location.href,language:ttsObjPro.language,contentSettings:w,translations:O({},null===(k=m)||void 0===k?void 0:k.translations)})));return null!==(p=m)&&void 0!==p&&p.content?null===(g=m)||void 0===g?void 0:g.content:P};function de(e){if(""===e)return"";return e=e.replace(/\[\/?[a-zA-Z1-90_| ='"{}\-\]]*\]/gm,"")}var he=function(e,t,n){var i,r,o,a,l,s,u,c,d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";console.log({caller:h});var f,p,g=!(null===(i=window)||void 0===i||!i.wp)&&wp.hooks.applyFilters("ttsProApplyNumberFormat",!1);g||(g=null!==(f=null===(p=ttsObj.settings)||void 0===p||null===(p=p.settings)||void 0===p?void 0:p.tta__settings_apply_number_format)&&void 0!==f&&f);var m,v,y,b,w,_=null===(r=t.settings.get_content_from_dom)||void 0===r||r;if(null===(o=window)||void 0===o||null===(o=o.wp)||void 0===o||null===(o=o.hooks)||void 0===o||!o.applyFilters("ttsProGetContentFromDOM",_,e,t,n,d))return e=ae(e=V(e)),g&&(e=ge(e)),e=(null!==(m=null==t||null===(v=t.extra[n])||void 0===v?void 0:v.text_before_content)&&void 0!==m?m:"")+e,e=B(e=de(e+=" "+(null!==(y=null==t||null===(b=t.extra[n])||void 0===b?void 0:b.text_after_content)&&void 0!==y?y:""))),e=J(e),re(e),console.log(e),"getGtranslateContentFromDOM"===h&&
2(console.log(false),F(e,d)),null!==(w=window)&&void 0!==w&&w.wp?wp.hooks.applyFilters("ttsProCleanContent",e,t,n,d):e;var T=ye(d);if(console.log({alreadyExistedContent:T}),T)return console.log(T),J(T);var S=oe(e,t,n,d);return S&&(e=S),e=ae(e=V(e)),g&&(e=ge(e)),e=(null!==(a=null==t||null===(l=t.extra[n])||void 0===l?void 0:l.text_before_content)&&void 0!==a?a:"")+e,e=de(e+=" "+(null!==(s=null==t||null===(u=t.extra[n])||void 0===u?void 0:u.text_after_content)&&void 0!==s?s:"")),e=J(e),re(e),console.log(e),"getGtranslateContentFromDOM"===h&&F(e,d),null!==(c=window)&&void 0!==c&&c.wp?wp.hooks.applyFilters("ttsProCleanContent",e,t,n,d):e};function fe(e){var t="";if(e.includes("%"))t=pe(e.replace("%",""))+" percent";else if(e.toLowerCase().includes("bn")||e.toLowerCase().includes("Bn")||e.toLowerCase().includes("billion")){t=pe(e.replace(/[a-zA-Z]/g,""))+" billion"}else if(e.toLowerCase().includes("m")||e.toLowerCase().includes("million")){t=pe(e.replace(/[a-zA-Z]/g,""))+" million"}else t=e;return t=function(e){var t,n={$:" dollar ","€":" euro ","£":" pound ","¥":" yen ","₣":" franc ","₹":" rupee ","₽":" ruble ","₩":" won ","฿":" baht ","₫":" dong ","₪":" shekel ","₦":" naira ","₭":" kip ","₲":" guarani ","₴":" hryvnia ","₵":" cedi ","₱":" peso ","₮":" tugrik ","₡":" colon ","₢":" cruzeiro ","₠":" ecu ","₤":" lira ","₸":" tenge ","₧":" peseta ","₯":" drachma ","৳":" taka ","៛":" riel ","₨":" rupee ","₳":" austral ","৲":" bengali rupee ","₼":" manat ","₶":" livre "},i=null!==(t=window)&&void 0!==t&&t.wp?wp.hooks.applyFilters("ttsProCurrencySymbols",n):n,r=new RegExp("[".concat(Object.keys(i).join(""),"]"),"g"),o=e;if(e.match(r)){var a=e.match(r)[0],l=i[a];o=e.replace(a,""),o=pe(o+=l)}return o}(t)}function pe(e){var t,n="",i=_(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;n+="."===r?" point ":r}}catch(e){i.e(e)}finally{i.f()}return n.trim()}function ge(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allowPlusMinus,n=void 0===t||t,i=(e.allowDecimals,e.allowPercentage,e.allowCurrency),r=void 0===i||i,o=(e.allowBillion,e.allowMillion,[]);n&&o.push("([+-]?\\d*\\.?\\d+%)");r&&o.push("(\\$\\d*\\.?\\d+(bn|Bn| Bn| billion| million| Million| trillion| Trillion)|\\d*\\.?\\d+m?)");var a=o.join("|");return new RegExp(a,"gi")}();return e=e.replace(t,function(e){return/^\d{2,4}'\d{2}$/.test(e)?e:fe(e)})}var me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tts_pro_stored_content";t||(t="tts_pro_stored_content"),sessionStorage.getItem(t)&&(sessionStorage.removeItem(t),console.log('localStorage item with key "'.concat(t,'" has been deleted.')))},ve=function(){var e=w(v().m(function e(t,n){var i,r,o,a,l;return v().w(function(e){for(;;)switch(e.n){case 0:if(null===(i=ttsObj.settings)||void 0===i||null===(i=i.settings)||void 0===i||!i.tta__settings_clear_cache.length||null===(r=ttsObj.settings)||void 0===r||null===(r=r.settings)||void 0===r||null===(r=r.tta__settings_clear_cache)||void 0===r||!r.includes(n)){e.n=2;break}return a=function(){var e=w(v().m(function e(t){var n,i,r;return v().w(function(e){for(;;)switch(e.n){case 0:return n=ttsObjPro.json_url+ttsObjPro.api_namespace+"/"+ttsObjPro.api_version+"/clear_post_id_from_cache",i=O(O({},i=t||{}),{headers:{"X-WP-Nonce":ttsObjPro.rest_nonce}}),e.n=1,fetch(n,i);case 1:return r=e.v,e.n=2,r.json();case 2:return e.a(2,e.v)}},e)}));return function(t){return e.apply(this,arguments)}}(),e.n=1,a({headers:{"Content-Type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({post_id:null==t||null===(o=t.settings)||void 0===o?void 0:o.postId,settings:ttsObj.settings.settings})});case 1:l=e.v,console.log(l);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ye=function(e){var t,n,i=JSON.parse(window.sessionStorage.getItem("tts_pro_stored_content"));return e&&null!=i&&null!==(t=i.translations)&&void 0!==t&&t[e]?null==i||null===(n=i.translations)||void 0===n?void 0:n[e].trim():""},be=function(e){if("string"!=typeof e||""===e)return e;
2var t={iw:"he",in:"id",ji:"yi",jw:"jv"},n=e.match(/^([A-Za-z]+)([-_].*)$/),i=n?n[1]:e,r=n?n[2]:"",o=i.toLowerCase();return t[o]&&(i=t[o]),console.log({primary:i+r}),i+r};function we(e){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(e)}function _e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Se(i.key),i)}}function Te(e,t,n){return(t=Se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(e){var t=function(e,t){if("object"!=we(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=we(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==we(t)?t:t+""}var ke,Pe=function(){return function(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Te(this,"textToSpeechPro",null),Te(this,"browser",null),Te(this,"content",""),Te(this,"storedContent",""),Te(this,"isTranslated",!1),Te(this,"domBaseline",null),this.textToSpeechPro=t,this.browser||(BrowserSupport=window.BrowserSupport,this.browser=new BrowserSupport(window.ttsObj,window.speechSynthesis.getVoices(),this.textToSpeechPro.selectedLang,this.textToSpeechPro.voice)),this.captureDomBaseline()},[{key:"getButtonId",value:function(){var e,t,n;return null!==(e=null===(t=this.textToSpeechPro)||void 0===t?void 0:t.buttonId)&&void 0!==e?e:null===(n=this.textToSpeechPro)||void 0===n||null===(n=n.thisClass)||void 0===n?void 0:n.buttonId}},{key:"baseLanguage",value:function(e){return String(e||"").split(/[-_]/)[0].toLowerCase()}},{key:"normalizeForCompare",value:function(e){return String(e||"").replace(/\s+/g," ").trim()}},{key:"getSourceLanguage",value:function(){var e,t;return this.getBrowserCountryCode((null===(e=window.ttsObjPro)||void 0===e?void 0:e.language)||(null===(t=window.ttsObj)||void 0===t?void 0:t.language)||"")}},{key:"readWrapperText",value:function(){var e=document.querySelector(".tts_content_wrapper_"+this.getButtonId())||document.querySelector(".tts_content_wrapper")||document.body;return e?this.normalizeForCompare(e.innerText||e.textContent):""}},{key:"captureDomBaseline",value:function(){return null===this.domBaseline&&(this.domBaseline=this.readWrapperText()),this.domBaseline}},{key:"waitForTranslatedDom",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.timeoutMs,o=void 0===r?6e4:r,a=i.pollMs,l=void 0===a?500:a,s=i.settleMs,u=void 0===s?800:s,c=i.isReady,d=void 0===c?null:c,h=this.captureDomBaseline(),f=this.baseLanguage(e)!==this.baseLanguage(t);return new Promise(function(e){if(h){var t=null,i=0,r=null,a=performance.now(),s=function(){var l=performance.now(),s=n.readWrapperText();if((f?s&&s!==h:s===h)&&("function"!=typeof d||!!d(f))&&s===t){if(i||(i=l),l-i>=u)return clearInterval(r),void e(!0)}else i=0;t=s,l-a>=o&&(clearInterval(r),e(!1))};r=setInterval(s,l),s()}else e(!1)})}},{key:"getLanguage",value:function(e){var t={};if(2==ttsObjPro.player_id){var n=this.textToSpeechPro;n.browser=this.browser;var i=this.getPlayerLanguageAndVoice({},window.TTS.settings,ttsObjPro.player_id,e.to);null!=i&&i.language&&i.voice?(t=n.browser.setLanguage(i.language),n.browser.setVoice(i.voice)):t=n.browser.setLanguage(e.to)}else t=this.isLanguageSupported(e.to),4==ttsObjPro.player_id&&(t.isSupported=!0);return t}},{key:"getGttsAliasLanguage",value:function(e){e||(e=window.TTS.extra[1].language);var t={ca:["cat","ca"]};for(var n in t)if(t[n].includes(e))return n.toLocaleLowerCase();return e.toLocaleLowerCase()}},{key:"isLanguageSupported",value:function(e){var t=Object.keys(this.gttsSupportedLanguages()),n={isSupported:!1,lang:this.getGttsAliasLanguage(e)};return t.includes(e)&&(n.isSupported=!0),n}},{key:"getStoredContent",value:function(){var e=this.getStoredContentObj();return this.storedContent=(null==e?void 0:e.content)||"",this.storedContent}},{key:"setTranslatedContent",value:function(e,t){var n;return F(e,t),this.storedContent=null===(n=this.getStoredContentObj())||void 0===n?void 0:n.content,this.storedContent}},{key:"getStoredContentObj",value:function(){return JSON.parse(window.sessionStorage.getItem("tts_pro_stored_content"))}},{key:"shouldInitTranslation",value:function(){var e=JSON.parse(window.sessionStorage.getItem("tts_pro_stored_content"));return null==e||!e.url||(null==e?void 0:e.url)!==window.location.href}},{key:"gttsSupportedLanguages",value:function(){return{af:"Afrikaans",sq
vendor: 8,319 bytes, line 2
2:"Albanian",ar:"Arabic",hy:"Armenian",bg:"Bulgarian","bg-bg":"Bulgarian ( Bulgarian )",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese (Mandarin/China)","zh-tw":"Chinese (Mandarin/Taiwan)","zh-yue":"Chinese (Cantonese)",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English","en-au":"English (Australia)","en-uk":"English (United Kingdom)","en-us":"English (United States)",eo:"Esperanto",fi:"Finnish",fr:"French",de:"German",el:"Greek",ht:"Haitian Creole",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",it:"Italian",ja:"Japanese",ko:"Korean",la:"Latin",lv:"Latvian",mk:"Macedonian",no:"Norwegian",pl:"Polish",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",es:"Spanish","es-es":"Spanish (Spain)","es-us":"Spanish (United States)",sw:"Swahili",sv:"Swedish",ta:"Tamil",th:"Thai",tr:"Turkish",vi:"Vietnamese",cy:"Welsh"}}},{key:"isTranslatedContent",value:function(){return this.isTranslated}},{key:"getCountryCode",value:function(e){return this.getGttsAliasLanguage(e)}},{key:"getBrowserCountryCode",value:function(e){return e?null!=e.indexOf("-")?e.split("-")[0]:null!=e.indexOf("_")?e.split("_")[0]:e:e}},{key:"getPlayerLanguageAndVoice",value:function(e,t,n,i){if(t.listening&&t.listening.tta__multilingualActiveLanguages){var r=t.listening.tta__multilingualActiveLanguages;if(r[n]&&(r=r[n]).includes(i)){var o=r.indexOf(i),a=t.listening.tta__currentPlayerLanguages,l=(a=a[n])[o],s=t.listening.tta__available_currentPlayerVoices,u="";s[n]&&(u=(s=s[n])[o]),l&&(e.language=l),l&&(e.voice=u)}}return e}}])}();function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function je(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(Oe(e)+" is not iterable")}function Ce(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Ae(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return Le(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Le(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Le(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,Le(d,"constructor",u),Le(u,"constructor",s),s.displayName="GeneratorFunction",Le(u,r,"GeneratorFunction"),Le(d),Le(d,r,"Generator"),Le(d,i,function(){return this}),Le(d,"toString",function(){return"[object Generator]"}),(Ae=function(){return{w:o,m:h}})()}function Le(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Le=function(e,t,n,i){function o(t,n){Le(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Le(e,t,n,i)}function Ee(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function Ie(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){Ee(o,i,r,a,l,"next",e)}function l(e){Ee(o,i,r,a,l,"throw",e)}a(void 0)})}}function Me(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ve(i.key),i)}}function Ne(e,t,n){return t=De(t),function(e,t){if(t&&("object"==Oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fe()?Reflect.construct(t,n||[],De(e).constructor):t.apply(e,n))}function Fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fe=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}function Re(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Be(e,t,n){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ve(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Oe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Oe(t)?t:t+""}function He(e,t,n){return e.set(Ue(e,t),n),n}function Ge(e,t){return e.get(Ue(e,t))}function Ue(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ze="https://cors.atlasaidev.com/",We=g(ze=(null===(ke=window)||void 0===ke||null===(ke=ke.ttsObjPro)||void 0===ke?void 0:ke.cors_domain)||ze),$e=new WeakMap,Ke=new WeakSet,Je=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){Re(e,t),t.add(e)}(n=Ne(this,t,[e]),Ke),Be(n,"defaultLang",""),Be(n,"selectedLang",""),function(e,t,n){Re(e,t),t.set(e,n)}(n,$e,null),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(t,e),function(e,t,n){return t&&Me(e.prototype,t),n&&Me(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"gtranslateOld",value:(i=Ie(Ae().m(function e(t){var n,i,r,o,a,l,s,u,c,d,h,f,p,g,m=arguments;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(n=m.length>1&&void 0!==m[1]?m[1]:"",i=this.textToSpeechPro,this.defaultLang=this.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang),r=this.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang),(o=Ue(Ke,this,ct).call(this,t)).observe&&(
2a={},l=this,o.observe.addEventListener("click",function(){var e=Ie(Ae().m(function e(t){var r,s,u,c,d;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(r=l.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang),s=n,n||(s=i.storedContent),"A"!=t.target.nodeName){e.n=4;break}if(a.to=t.target.getAttribute("data-gt-lang"),!(ttsObjPro.player_id>2)){e.n=1;break}return l.reloadThePageOld(a),e.a(2);case 1:if(r!=a.to){e.n=2;break}return e.a(2);case 2:return e.n=3,Ue(Ke,l,Ye).call(l,s,a);case 3:return e.v&&i&&((i=i.getData()).proxy.listenStatus="listen"),l.reloadThePageOld(a),e.a(2);case 4:if("SELECT"!=t.target.nodeName){e.n=6;break}if(a.to=null===(u=t.target)||void 0===u||null===(u=u.value)||void 0===u?void 0:u.split("|")[1],r!=a.to){e.n=5;break}return e.a(2);case 5:return window.localStorage.setItem("tts_option",JSON.stringify({options:a,selectorData:o})),l.reloadThePageOld(a),e.a(2);case 6:if("SPAN"!=t.target.nodeName){e.n=11;break}if(a.to=t.target.previousElementSibling.getAttribute("alt"),r!=a.to){e.n=7;break}return e.a(2);case 7:if(!(ttsObjPro.player_id>2)){e.n=8;break}return l.reloadThePageOld(a),e.a(2);case 8:if(a.to){e.n=9;break}return console.log({lang:a.to,message:"language empty"}),e.a(2);case 9:return e.n=10,Ue(Ke,l,Ye).call(l,s,a);case 10:case 15:return e.v&&((i=i.getData()).proxy.listenStatus="listen"),l.reloadThePageOld(a),e.a(2);case 11:if("IMG"!=t.target.nodeName){e.n=16;break}if(console.log(t.target.nodeName),a.to=null===(c=t.target)||void 0===c?void 0:c.getAttribute("alt"),a.to||(a.to=null===(d=t.target)||void 0===d||null===(d=d.parentElement)||void 0===d?void 0:d.getAttribute("data-gt-lang")),!(ttsObjPro.player_id>2)){e.n=12;break}return l.reloadThePageOld(a),e.a(2);case 12:if(r!=a.to){e.n=13;break}return e.a(2);case 13:if(a.to){e.n=14;break}return console.log({lang:a.to,message:"language empty"}),e.a(2);case 14:return e.n=15,Ue(Ke,l,Ye).call(l,s,a);case 16:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),u=this.selectedLang,u=(null===(s=ttsObjPro)||void 0===s?void 0:s.player_id)>2?null===(c=i)||void 0===c||null===(c=c.thisClass)||void 0===c?void 0:c.selectedLang:this.getSelectedLanguage(),d=n,n||(d=this.getStoredContent())||(d=null===(h=i)||void 0===h?void 0:h.content),u===r){e.n=2;break}if(p={to:u},!(null!==(f=window.TTS)&&void 0!==f&&null!==(f=f.settings)&&void 0!==f&&f.fileURLs[u]&&ttsObjPro.player_id>2)){e.n=1;break}if(!ye(u)){e.n=1;break}return this.isTranslated=!0,e.a(2);case 1:Ue(Ke,this,Ye).call(this,d,p),e.n=3;break;case 2:null!=(g=this.getPlayerLanguageAndVoice({},window.TTS.settings,ttsObjPro.player_id,u))&&g.language&&g.voice&&(this.browser.setLanguage(g.language),this.browser.setVoice(g.voice),window.TTS.settings.listening.tta__listening_lang=g.language,window.TTS.settings.listening.tta__listening_voice=g.voice),this.isTranslated=!0,this.setTranslatedContent(d,(null==g?void 0:g.language)||"");case 3:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"gtranslate",value:(n=Ie(Ae().m(function e(t){var n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b=arguments;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(i=b.length>1&&void 0!==b[1]?b[1]:"",He($e,this,t),r=this.textToSpeechPro,this.defaultLang=this.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang),o=this.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang),(a=Ue(Ke,this,ct).call(this,t)).observe&&(l=this,a.observe.addEventListener("click",function(e){var t={},n=l.getSelectedLanguage()||document.documentElement.lang||l.getBrowserCountryCode(window.TTS.settings.listening.tta__listening_lang);if("A"==e.target.nodeName)t.to=e.target.getAttribute("data-gt-lang");else if("SELECT"==e.target.nodeName){var i,r=(null===(i=e.target)||void 0===i?void 0:i.value)||"";t.to=r.includes("|")?r.split("|")[1]:r,window.localStorage.setItem("tts_option",JSON.stringify({options:t,selectorData:a}))}else if("SPAN"==e.target.nodeName){var o;t.to=null===(o=e.target.previousElementSibling)||void 0===o?void 0:o.getAttribute("alt")}else if("IMG"==e.target.nodeName){var s,u;t.to=null===(s=e.target)||void 0===s?void 0:s.getAttribute("alt"),t.to||(t.to=null===(u=e.target)||void 0===u||null===(u=u.parentElement)||void 0===u?void 0:u.getAttribute("data-gt-lang"))}if(t.to&&n!=t.to){Ue(Ke,l,st).call(l,t.to);var c=l.getLanguage(t);console.log({options:t,lang:c}),Ue(Ke,l,rt).call(l,t,c,!0)}})),s=this.selectedLang,s=(null===(n=ttsObjPro)||void 0===n?void 0:n.player_id)>2?null==r||null===(u=r.thisClass)||void 0===u?void 0:u.selectedLang:this.getSelectedLanguage(),(c=Ue(Ke,this,ut).call(this))&&(s=c),d=i,i||(d=this.getStoredContent())||(d=null==r?void 0:r.content),s===o){e.n=3;break}if(f={to:s},!(null!==(h=window.TTS)&&void 0!==h&&null!==(h=h.settings)&&void 0!==h&&h.fileURLs[s]&&ttsObjPro.player_id>2)){e.n=1;break}if(!ye(s)){e.n=1;break}return this.isTranslated=!0,e.a(2);case 1:if(!c||!Ue(Ke,this,it).call(this)){e.n=2;break}
2if(!(p=Ue(Ke,this,lt).call(this)||d)){e.n=2;break}return g=this.getLanguage(f),this.setTranslatedContent(p,c),2==ttsObjPro.player_id&&(m=this.textToSpeechPro,window.TTS.contents[m.buttonId]=p,v=m.voice||m.browser.getVoiceByLangCode(g.lang),m.browser.setVoice(v),window.TextToSpeechPro.browser=m.browser,window.TTS.settings.listening.tta__listening_lang=g.lang,window.TTS.settings.listening.tta__listening_voice=v),this.isTranslated=!0,e.a(2);case 2:Ue(Ke,this,Qe).call(this,d,f),e.n=4;break;case 3:null!=(y=this.getPlayerLanguageAndVoice({},window.TTS.settings,ttsObjPro.player_id,s))&&y.language&&y.voice&&(this.browser.setLanguage(y.language),this.browser.setVoice(y.voice),window.TTS.settings.listening.tta__listening_lang=y.language,window.TTS.settings.listening.tta__listening_voice=y.voice),this.isTranslated=!0,this.setTranslatedContent(d,(null==y?void 0:y.language)||"");case 4:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"reloadThePageOld",value:function(e){var t=null,n=0;t=setInterval(function(){n++;var i=document.cookie.match("(^|;) ?googtrans=([^;]*)(;|$)"),r=i&&i[2].split("/")[2];window.localStorage.setItem("tts_language",JSON.stringify({current_lang:r,googtrans_matches:i,defaultLang:this.defaultLang})),e.to==r||this.defaultLang==r?(clearInterval(t),window.location.reload()):n>20&&clearInterval(t)},1e3)}},{key:"reloadThePage",value:function(e){var t=null,n=0,i=this;t=setInterval(function(){n++;var r=document.cookie.match("(^|;) ?googtrans=([^;]*)(;|$)"),o=r&&r[2].split("/")[2];window.localStorage.setItem("tts_language",JSON.stringify({current_lang:o,googtrans_matches:r,defaultLang:i.defaultLang})),e.to==o||i.defaultLang==o?(clearInterval(t),window.location.reload()):n>20&&clearInterval(t)},1e3)}},{key:"getSelectedLanguage",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.defaultLang=t;var i,r=Ue(Ke,this,ut).call(this);if(r)return this.selectedLang=r,null===(i=window)||void 0===i||null===(i=i.wp)||void 0===i||null===(i=i.hooks)||void 0===i?void 0:i.applyFilters("tts_pro_get_selected_gt_lang",this.selectedLang);if(!wp.hooks.applyFilters("ttsSetSelectedLanguageFromDom",!1)&&null!=n&&n.selectedLang&&ttsObjPro.player_id>2)return this.selectedLang=n.selectedLang,this.selectedLang;var o=document.getElementsByClassName("gt_selector");if(o.length)t=o[0].value.split("|")[1];else for(var a=Ce(document.querySelectorAll("[data-gt-lang]")),l=["gt-current-lang","gt-current","gt_current"],s=!1,u=0;u<a.length;u++){for(var c=a[u],d=0;d<l.length;d++){var h=l[d];if(c.classList.contains(h)){t=c.getAttribute("data-gt-lang"),s=!0;break}}if(s)break}var f=Ue(Ke,this,ut).call(this);if(f&&(t=f),this.selectedLang=this.getCountryCode(t),ttsObjPro.player_id>2){var p=this.getPlayerLanguageAndVoice({},window.TTS.settings,ttsObjPro.player_id,this.selectedLang);null!=p&&p.language&&(this.selectedLang=String(p.language).toLocaleLowerCase())}return null===(e=window)||void 0===e||null===(e=e.wp)||void 0===e||null===(e=e.hooks)||void 0===e?void 0:e.applyFilters("tts_pro_get_selected_gt_lang",this.selectedLang)}}]);var n,i}(Pe);function Ye(e,t){return Xe.apply(this,arguments)}function Xe(){return Xe=Ie(Ae().m(function e(t,n){var i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(a=this.getLanguage(n),l=!1,((null==(s=this.getStoredContentObj())?void 0:s.language.toLowerCase())===n.to.toLowerCase()||(null==s?void 0:s.language.split(/[-_]/)[0])===(null==n||null===(i=n.to)||void 0===i?void 0:i.split(/[-_]/)[0]))&&(l=!0),!l){e.n=1;break}return console.log({isSameLanguage:l}),this.setTranslatedContent(t,n.to),this.isTranslated=!0,e.a(2,this.isTranslated);case 1:if(null==s||null===(r=s.translations)||void 0===r||!r[n.to]||null==s||null===(o=s.translations)||void 0===o||!o[n.to]){e.n=2;break}return 2==ttsObjPro.player_id&&(c=this.textToSpeechPro,window.TTS.c
2ontents[c.buttonId]=null==s||null===(u=s.translations)||void 0===u?void 0:u[n.to],d="",d=c.voice?c.voice:c.browser.getVoiceByLangCode(a.lang),c.browser.setVoice(d),window.TextToSpeechPro.browser=c.browser,window.TTS.settings.listening.tta__listening_lang=a.lang,window.TTS.settings.listening.tta__listening_voice=d),this.isTranslated=!0,e.a(2,this.isTranslated);case 2:if(null==a||!a.isSupported||!t){e.n=8;break}h=[],f=t.length,p=Ae().m(function e(i){var r,o,a;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(r=se(t,i,1e3),""!=(o=t.substr(i,r))){e.n=1;break}return m=i,e.a(2,0);case 1:return n.from=ttsObjPro.language,n.hl=ttsObjPro.language,console.log(n),a=!1,e.n=2,We(o,n).then(function(e){console.log({translated_res:e}),null!=e&&e.text?h.push(e.text):e||(a=!0)}).catch(function(e){console.error(e)});case 2:if(!a){e.n=3;break}return m=i,e.a(2,1);case 3:m=i+=r;case 4:return e.a(2)}},e)}),m=0;case 3:if(!(m<f)){e.n=7;break}return e.d(je(p(m)),4);case 4:if(0!==(g=e.v)){e.n=5;break}return e.a(3,7);case 5:if(1!==g){e.n=6;break}return e.a(3,6);case 6:e.n=3;break;case 7:h.length&&2==ttsObjPro.player_id?(v=this.textToSpeechPro,y=h.join(". "),this.setTranslatedContent(y,n.to),window.TTS.c
2ontents[v.buttonId]=y,b="",b=v.voice?v.voice:v.browser.getVoiceByLangCode(a.lang),v.browser.setVoice(b),window.TextToSpeechPro.browser=v.browser,window.TTS.settings.listening.tta__listening_lang=a.lang,window.TTS.settings.listening.tta__listening_voice=b):(w=h.join(". "),this.setTranslatedContent(w,n.to)),this.isTranslated=!0;case 8:return e.a(2,this.isTranslated)}},e,this)})),Xe.apply(this,arguments)}function Qe(e,t){return Ze.apply(this,arguments)}function Ze(){return(Ze=Ie(Ae().m(function e(t,n){var i,r,o,a,l,s,u,c;return Ae().w(function(e){for(;;)switch(e.n){case 0:if(o=this.getLanguage(n),a=!1,((null==(l=this.getStoredContentObj())?void 0:l.language.toLowerCase())===n.to.toLowerCase()||(null==l?void 0:l.language.split(/[-_]/)[0])===(null==n||null===(i=n.to)||void 0===i?void 0:i.split(/[-_]/)[0]))&&(a=!0),!a){e.n=1;break}return this.setTranslatedContent(t,n.to),this.isTranslated=!0,e.a(2,this.isTranslated);case 1:if(null==l||null===(r=l.translations)||void 0===r||!r[n.to]){e.n=2;break}return 2==ttsObjPro.player_id&&(u=this.textToSpeechPro,window.TTS.c
2ontents[u.buttonId]=null==l||null===(s=l.translations)||void 0===s?void 0:s[n.to],c="",c=u.voice?u.voice:u.browser.getVoiceByLangCode(o.lang),u.browser.setVoice(c),window.TextToSpeechPro.browser=u.browser,window.TTS.settings.listening.tta__listening_lang=o.lang,window.TTS.settings.listening.tta__listening_voice=c),this.isTranslated=!0,e.a(2,this.isTranslated);case 2:if(!Ue(Ke,this,et).call(this,n.to)){e.n=3;break}return Ue(Ke,this,ot).call(this,n,o),e.a(2,this.isTranslated);case 3:return Ue(Ke,this,rt).call(this,n,o),e.a(2,this.isTranslated)}},e,this)}))).apply(this,arguments)}function et(e){var t=document.documentElement;if(!t||!e)return!1;var n=(t.getAttribute("lang")||"").toLowerCase(),i=e.toLowerCase(),r=n===i||n.split("-")[0]===i.split("-")[0],o=t.classList.contains("translated-ltr")||t.classList.contains("translated-rtl");return r||o}function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Ue(Ke,this,at).call(this);if(i){var r,o;if(2==ttsObjPro.player_id){window.speechSynthesis&&window.speechSynthesis.cancel();var a=this.textToSpeechPro;
2this.setTranslatedContent(i,e.to),window.TTS.contents[a.buttonId]=i;var l="";l=a.voice?a.voice:a.browser.getVoiceByLangCode(t.lang),a.browser.setVoice(l),window.TextToSpeechPro.browser=a.browser,window.TTS.settings.listening.tta__listening_lang=t.lang,window.TTS.settings.listening.tta__listening_voice=l}else this.setTranslatedContent(i,e.to);var s=Ge($e,this)||(null===(r=ttsObjPro)||void 0===r||null===(r=r.compatible)||void 0===r?void 0:r["gtranslate/gtranslate.php"])||(null===(o=ttsObj)||void 0===o||null===(o=o.compatible)||void 0===o?void 0:o["gtranslate/gtranslate.php"])||{};console.log({shouldReload:n}),!n||null!=s&&s.pro_version||null!=s&&s.enterprise_version||window.location.reload(),this.isTranslated=!0}}function nt(){var e=document.querySelector(".tts_content_wrapper_"+this.getButtonId());return!!e&&e.querySelectorAll("font").length>0}function it(){var e,t,n=Ge($e,this)||(null===(e=ttsObjPro)||void 0===e||null===(e=e.compatible)||void 0===e?void 0:e["gtranslate/gtranslate.php"])||(null===(t=ttsObj)||void 0===t||null===(t=t.compatible)||void 0===t?void 0:t["gtranslate/gtranslate.php"])||{};return!!(null!=n&&n.pro_version||null!=n&&n.enterprise_version)||Ue(Ke,this,nt).call(this)}function rt(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this,r=document.documentElement;if(this.selectedLang=e.to,Ue(Ke,i,et).call(i,e.to))Ue(Ke,i,ot).call(i,e,t,n);else{var o=new MutationObserver(function(r){Ue(Ke,i,et).call(i,e.to)&&(o.disconnect(),Ue(Ke,i,ot).call(i,e,t,n))});o.observe(r,{attributes:!0,attributeFilter:["lang","class"]})}}function ot(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.waitForTranslatedDom(e.to,this.getSourceLanguage(),{isReady:function(e){return Ue(Ke,n,nt).call(n)===e}}).then(function(r){if(!r)return console.warn("[TTS] GTranslate did not finish translating in time; skipping capture."),void(n.isTranslated=!0);Ue(Ke,n,tt).call(n,e,t,i)})}function at(){var e,t,n,i,r=null!==(e=null===(t=this.textToSpeechPro)||void 0===t?void 0:t.buttonId)&&void 0!==e?e:null===(n=this.textToSpeechPro)||void 0===n||null===(n=n.thisClass)||void 0===n?void 0:n.buttonId,o=Ue(Ke,this,lt).call(this)||(null===(i=this.textToSpeechPro)||void 0===i?void 0:i.content),a=D(this.selectedLang);return console.log({shouldUpdateDOMTitle:a}),(o=he(o,window.TTS,r,this.selectedLang,"getGtranslateContentFromDOM"))||null}function lt(){var e,t,n,i,r,o=null!==(e=null===(t=this.textToSpeechPro)||void 0===t?void 0:t.buttonId)&&void 0!==e?e:null===(n=this.textToSpeechPro)||void 0===n||null===(n=n.thisClass)||void 0===n?void 0:n.buttonId,a=document.querySelector(".tts_content_wrapper_"+o);if(!a)return null;var l=a.cloneNode(!0);l.querySelectorAll("script, style, figure, figcaption").forEach(function(e){return e.remove()});var s=null===(i=ttsObj)||void 0===i||null===(i=i.settings)||void 0===i||null===(i=i.settings)||void 0===i?void 0:i.tta__settings_exclude_content_by_css_selectors;s&&s.split("\n").forEach(function(e){var t=null==e?void 0:e.trim();if(t)try{l.querySelectorAll(t).forEach(function(e){return e.remove()})}catch(e){}});var u=null===(r=ttsObj)||void 0===r||null===(r=r.settings)||void 0===r||null===(r=r.settings)||void 0===r?void 0:r.tta__settings_exclude_tags;u&&(Array.isArray(u)&&(u=u.join("|")),u.split("|").forEach(function(e){var t=null==e?void 0:e.trim();if(t)try{l.querySelectorAll(t).forEach(function(e){return e.remove()})}catch(e){}}));var c=N(window.TTS,l,o,0,this.selectedLang);return(c=String(c||"").replace(/\s+/g," ").trim())||null}function st(e){var t,n=this.getStoredContentObj();null!=n&&null!==(t=n.translations)&&void 0!==t&&t[e]&&(delete n.translations[e],window.sessionStorage.setItem("tts_pro_stored_content",JSON.stringify(n)))}function ut(){var e,t,n,i,r=Ge($e,this)||(null===(e=ttsObjPro)||void 0===e||null===(e=e.compatible)||void 0===e?void 0:e["gtranslate/gtranslate.php"])||(null===(t=ttsObj)||void 0===t||null===(t=t.compatible)||void 0===t?void 0:t["gtranslate/gtranslate.php"])||{},o=(document.documentElement.getAttribute("lang")||"").toLowerCase();
vendor: 5,906 bytes, line 2
2if(!o){var a=(window.location.pathname.split("/").filter(Boolean)[0]||"").toLowerCase();/^[a-z]{2}(-[a-z]{2})?$/.test(a)&&(o=a)}if(!o){var l=(window.location.hostname.split(".")[0]||"").toLowerCase();/^[a-z]{2}(-[a-z]{2})?$/.test(l)&&(o=l)}if(!o)return null;var s=o.split("-")[0];if(s===this.getBrowserCountryCode((null===(n=window.TTS)||void 0===n||null===(n=n.settings)||void 0===n||null===(n=n.listening)||void 0===n?void 0:n.tta__listening_lang)||(null===(i=ttsObjPro)||void 0===i?void 0:i.language)||""))return null;var u=(null==r?void 0:r.allowed_languages)||[];return!u.length||u.includes(s)||u.includes(o)?(s=be(s),this.getCountryCode(s)):null}function ct(e){for(var t,n=null,i=0;i<e.data.length;i++){var r=e.data[i];if(r&&(n=document.querySelector(r)))break}var o={observe:n,lang:null};return null===(t=window)||void 0===t||null===(t=t.wp)||void 0===t||null===(t=t.hooks)||void 0===t?void 0:t.applyFilters("tts_pro_gtranslate_selector",o)}const dt=Je;function ht(e){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}var ft;function pt(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return gt(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(gt(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,gt(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,gt(d,"constructor",u),gt(u,"constructor",s),s.displayName="GeneratorFunction",gt(u,r,"GeneratorFunction"),gt(d),gt(d,r,"Generator"),gt(d,i,function(){return this}),gt(d,"toString",function(){return"[object Generator]"}),(pt=function(){return{w:o,m:h}})()}function gt(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}gt=function(e,t,n,i){function o(t,n){gt(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},gt(e,t,n,i)}function mt(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function vt(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){mt(o,i,r,a,l,"next",e)}function l(e){mt(o,i,r,a,l,"throw",e)}a(void 0)})}}function yt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,bt(i.key),i)}}function bt(e){var t=function(e,t){if("object"!=ht(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=ht(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ht(t)?t:t+""}function wt(e,t,n){return t=Tt(t),function(e,t){if(t&&("object"==ht(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_t()?Reflect.construct(t,n||[],Tt(e).constructor):t.apply(e,n))}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}function Tt(e){return Tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tt(e)}function St(e,t){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},St(e,t)}function kt(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function Pt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ot="https://cors.atlasaidev.com/",jt=(g(Ot=(null===(ft=window)||void 0===ft||null===(ft=ft.ttsObjPro)||void 0===ft?void 0:ft.cors_domain)||Ot),new WeakSet),Ct=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),kt(n=wt(this,t,[e]),jt),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}(t,e),function(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
2(t,[{key:"translate",value:(n=vt(pt().m(function e(t){var n,i,r,o,a=arguments;return pt().w(function(e){for(;;)switch(e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:"",i=this.textToSpeechPro,this.getCountryCode(window.TTS.settings.listening.tta__listening_lang),r=n||(null==i?void 0:i.storedContent),o=this.getSelectedLanguage(window.TTS.settings.listening.tta__listening_lang),this.setTranslatedContent(r,o),2!=ttsObjPro.player_id){e.n=2;break}return e.n=1,Pt(jt,this,xt).call(this,r,{to:o});case 1:e.n=3;break;case 2:ttsObjPro.player_id;case 3:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"getSelectedLanguage",value:function(e){if(2==ttsObjPro.player_id&&this.browser){var t,n,i,r=new URLSearchParams(window.location.search);if(r.has("lang")&&null!==(t=this.browser)&&void 0!==t&&t.validateCountryCode(r.get("lang")))return null===(i=this.browser)||void 0===i?void 0:i.aliasCountryCode(r.get("lang"),!1);var o,a=window.location.href.replace(ttsObjPro.site_url,"").split("/")[1];if(null!==(n=this.browser)&&void 0!==n&&n.validateCountryCode(a))return null===(o=this.browser)||void 0===o?void 0:o.aliasCountryCode(a,!1)}else if(ttsObjPro.player_id>2){var l,s=null===(l=window.TTS)||void 0===l||null===(l=l.extra)||void 0===l||null===(l=l[this.getButtonId()])||void 0===l?void 0:l.language;if(s)return s.toLocaleLowerCase();var u=new URLSearchParams(window.location.search),c=this.isLanguageSupported(u.get("lang"));if(u.has("lang")&&c.isSupported)return c.lang;var d=window.location.href.replace(ttsObjPro.site_url,"").split("/")[1];if((c=this.isLanguageSupported(d)).isSupported)return c.lang}return this.getCountryCode(e)}}]);var n}(Pe);function xt(e,t){return At.apply(this,arguments)}function At(){return(At=vt(pt().m(function e(t,n){var i,r,o,a;return pt().w(function(e){for(;;)switch(e.n){case 0:if(t&&null!=n&&n.to){e.n=1;break}return e.a(2);case 1:return i={},this.textToSpeechPro&&(i=this.textToSpeechPro),r=!1,(o=this.getLanguage(n)).isSupported&&(2==ttsObjPro.player_id&&(window.TTS.contents[i.buttonId]=this.getStoredContent(),a=i.voice,i.browser.setVoice(a),window.TextToSpeechPro.browser=i.browser,window.TTS.settings.listening.tta__listening_lang=o.lang,window.TTS.settings.listening.tta__listening_voice=a),r=!0),e.a(2,r)}},e,this)}))).apply(this,arguments)}const Lt=Ct;function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}var It;function Mt(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return Nt(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Nt(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Nt(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,Nt(d,"constructor",u),Nt(u,"constructor",s),s.displayName="GeneratorFunction",Nt(u,r,"GeneratorFunction"),Nt(d),Nt(d,r,"Generator"),Nt(d,i,function(){return this}),Nt(d,"toString",function(){return"[object Generator]"}),(Mt=function(){return{w:o,m:h}})()}function Nt(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Nt=function(e,t,n,i){function o(t,n){Nt(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Nt(e,t,n,i)}function Ft(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function Dt(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){Ft(o,i,r,a,l,"next",e)}function l(e){Ft(o,i,r,a,l,"throw",e)}a(void 0)})}}function qt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Rt(i.key),i)}}function Rt(e){var t=function(e,t){if("object"!=Et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Et(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Et(t)?t:t+""}function Bt(e,t,n){return t=Ht(t),function(e,t){if(t&&("object"==Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vt()?Reflect.construct(t,n||[],Ht(e).constructor):t.apply(e,n))}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Ht(e){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ht(e)}function Gt(e,t){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gt(e,t)}function Ut(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function zt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Wt="https://cors.atlasaidev.com/",$t=(g(Wt=(null===(It=window)||void 0===It||null===(It=It.ttsObjPro)||void 0===It?void 0:It.cors_domain)||Wt),new WeakSet),Kt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ut(n=Bt(this,t,[e]),$t),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gt(e,t)}(t,e),function(e,t,n){return t&&qt(e.prototype,t),n&&qt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"translate",value:(n=Dt(Mt().m(function e(t){var n,i,r,o,a=arguments;return Mt().w(function(e){for(;;)switch(e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:"",i=this.textToSpeechPro,this.getCountryCode(i.selectedLang),r=n||(null==i?void 0:i.storedContent),o=this.getSelectedLanguage(i.selectedLang),this.setTranslatedContent(r,o),2!=ttsObjPro.player_id){e.n=2;break}return e.n=1,zt($t,this,Jt).call(this,r,{to:o});case 1:e.n=3;break;case 2:ttsObjPro.player_id;case 3:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"getSelectedLanguage",value:function(e){if(2==ttsObjPro.player_id&&this.browser){var t,n,i,r=new 
vendor: 5,069 bytes, line 2
2URLSearchParams(window.location.search);if(r.has("lang")&&null!==(t=this.browser)&&void 0!==t&&t.validateCountryCode(r.get("lang")))return null===(i=this.browser)||void 0===i?void 0:i.aliasCountryCode(r.get("lang"),!1);var o,a=window.location.href.replace(ttsObjPro.site_url,"").split("/")[1];if(null!==(n=this.browser)&&void 0!==n&&n.validateCountryCode(a))return null===(o=this.browser)||void 0===o?void 0:o.aliasCountryCode(a,!1)}else if(ttsObjPro.player_id>2){if(e)return e;var l=new URLSearchParams(window.location.search),s=this.isLanguageSupported(l.get("lang"));if(l.has("lang")&&s.isSupported)return s.lang;var u=window.location.href.replace(ttsObjPro.site_url,"").split("/")[1];if((s=this.isLanguageSupported(u)).isSupported)return s.lang}return this.getCountryCode(e)}}]);var n}(Pe);function Jt(e,t){return Yt.apply(this,arguments)}function Yt(){return(Yt=Dt(Mt().m(function e(t,n){var i,r,o,a;return Mt().w(function(e){for(;;)switch(e.n){case 0:if(t&&null!=n&&n.to){e.n=1;break}return e.a(2);case 1:return i={},this.textToSpeechPro&&(i=this.textToSpeechPro),r=!1,(o=this.getLanguage(n)).isSupported&&(2==ttsObjPro.player_id&&(window.TTS.contents[i.buttonId]=this.getStoredContent(),a=this.textToSpeechPro.voice,i.browser.setVoice(a),window.TextToSpeechPro.browser=i.browser,window.TTS.settings.listening.tta__listening_lang=o.lang,window.TTS.settings.listening.tta__listening_voice=a),r=!0),e.a(2,r)}},e,this)}))).apply(this,arguments)}const Xt=Kt;function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function Zt(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return en(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(en(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,en(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,en(d,"constructor",u),en(u,"constructor",s),s.displayName="GeneratorFunction",en(u,r,"GeneratorFunction"),en(d),en(d,r,"Generator"),en(d,i,function(){return this}),en(d,"toString",function(){return"[object Generator]"}),(Zt=function(){return{w:o,m:h}})()}function en(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}en=function(e,t,n,i){function o(t,n){en(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},en(e,t,n,i)}function tn(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function nn(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){tn(o,i,r,a,l,"next",e)}function l(e){tn(o,i,r,a,l,"throw",e)}a(void 0)})}}function rn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,on(i.key),i)}}function on(e){var t=function(e,t){if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Qt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qt(t)?t:t+""}function an(e,t,n){return t=sn(t),function(e,t){if(t&&("object"==Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ln()?Reflect.construct(t,n||[],sn(e).constructor):t.apply(e,n))}function ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}
2return(ln=function(){return!!e})()}function sn(e){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sn(e)}function un(e,t){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},un(e,t)}function cn(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function dn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var hn=new WeakSet,fn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cn(n=an(this,t,[e]),hn),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&un(e,t)}(t,e),function(e,t,n){return t&&rn(e.prototype,t),n&&rn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"translate",value:(n=nn(Zt().m(function e(t){var n,i,r,o,a=arguments;return Zt().w(function(e){for(;;)switch(e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:"",i=this.textToSpeechPro,this.getCountryCode(window.TTS.settings.listening.tta__listening_lang),r=n||(null==i?void 0:i.storedContent),o=this.getSelectedLanguage(window.TTS.settings.listening.tta__listening_lang),this.setTranslatedContent(r,o),2!=ttsObjPro.player_id){e.n=1;break}return e.n=1,dn(hn,this,pn).call(this,r,{to:o});case 1:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"getSelectedLanguage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(ttsObjPro.player_id>2){var t,n=null===(t=window.TTS)||void 0===t||null===(t=t.extra)||void 0===t||null===(t=t[this.getButtonId()])||void 0===t?void 0:t.language;if(n)return n.toLocaleLowerCase()}var i=document.documentElement.lang;if(i){var r,o,a=i.split("-")[0].toLowerCase();if(2==ttsObjPro.player_id&&this.browser){if(null!==(r=this.browser)&&void 0!==r&&r.validateCountryCode(a))return null===(o=this.browser)||void 0===o?void 0:o.aliasCountryCode(a,!1)}else if(ttsObjPro.player_id>2){var l=this.isLanguageSupported(a);if(l.isSupported)return l.lang}}var s,u,c=window.location.href.replace(ttsObjPro.site_url,"").split("/").filter(Boolean)[0];if(c)if(2==ttsObjPro.player_id&&this.browser){if(null!==(s=this.browser)&&void 0!==s&&s.validateCountryCode(c))return null===(u=this.browser)||void 0===u?void 0:u.aliasCountryCode(c,!1)}else if(ttsObjPro.player_id>2){var d=this.isLanguageSupported(c);if(d.isSupported)return d.lang}var h=new URLSearchParams(window.location.search);if(h.has("lang")){var f,p,g=h.get("lang");if(2==ttsObjPro.player_id&&this.browser){if(null!==(f=this.browser)&&void 0!==f&&f.validateCountryCode(g))return null===(p=this.browser)||void 0===p?void 0:p.aliasCountryCode(g,!1)}else if(ttsObjPro.player_id>2){var m=this.isLanguageSupported(g);if(m.isSupported)return m.lang}}return this.getCountryCode(e)}}]);var n}(Pe);function pn(e,t){return gn.apply(this,arguments)}function gn(){return(gn=nn(Zt().m(function e(t,n){var i,r,o;return Zt().w(function(e){for(;;)switch(e.n){case 0:if(t&&null!=n&&n.to){e.n=1;break}return e.a(2);case 1:i=this.textToSpeechPro||{},(r=this.getLanguage(n)).isSupported&&2==ttsObjPro.player_id&&(window.TTS.contents[i.buttonId]=this.getStoredContent(),o=i.voice,i.browser.setVoice(o),window.TextToSpeechPro.browser=i.browser,window.TTS.settings.listening.tta__listening_lang=r.lang,window.TTS.settings.listening.tta__listening_voice=o);case 2:return e.a(2)}},e,this)}))).apply(this,arguments)}const mn=fn;function vn(e){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(e)}function yn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_n(i.key),i)}}function bn(e,t,n){return t&&yn(e.prototype,t),n&&yn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wn(e,t,n){return(t=_n(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _n(e){var t=function(e,t){if("object"!=vn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=vn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vn(t)?t:t+""}function Tn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var kn=new WeakMap,Pn=new WeakSet,On=bn(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){Tn(e,t),t.add(e)}(this,Pn),function(e,t,n){Tn(e,t),t.set(e,n)}(this,kn,{}),wn(this,"initiatedPlugins",{}),wn(this,"textToSpeechPro",null),this.textToSpeechPro=t,function(e,t,n){e.set(Sn(e,t),n)}(kn,this,{gtranslate:"TTSGtranslate",sitepress:"TTSWPML",translatepress:"TranslatePress",polylang:"TTSPolylang"}),Sn(Pn,this,jn).call(this)});function jn(){var e,t,n,i;if(null!==(e=ttsObjPro)&&void 0!==e&&e.compatible.hasOwnProperty("gtranslate/gtranslate.php")&&ttsObjPro.compatible["gtranslate/gtranslate.php"].type){var r=new dt(this.textToSpeechPro);this.initiatedPlugins.gtranslate=r,this.initiatedPlugins.gtranslate.gtranslate(ttsObjPro.compatible["gtranslate/gtranslate.php"])}if(null!==(t=ttsObj)&&void 0!==t&&t.compatible.hasOwnProperty("sitepress-multilingual-cms/sitepress.php")&&ttsObjPro.compatible["sitepress-multilingual-cms/sitepress.php"].type){var o=new Lt(this.textToSpeechPro);this.initiatedPlugins.sitepress=o,this.initiatedPlugins.sitepress.translate(ttsObjPro.compatible["sitepress-multilingual-cms/sitepress.php"])}if(null!==(n=ttsObj)&&void 0!==n&&n.compatible.hasOwnProperty("translatepress-multilingual/index.php")&&ttsObjPro.compatible["translatepress-multilingual/index.php"].type){var a=new Xt(this.textToSpeechPro);this.initiatedPlugins.translatepress=a,this.initiatedPlugins.translatepress.translate(ttsObjPro.compatible["translatepress-multilingual/index.php"])}if(null!==(i=ttsObjPro)&&void 0!==i&&null!==(i=i.compatible)&&void 0!==i&&i.hasOwnProperty("polylang/polylang.php")&&ttsObjPro.compatible["polylang/polylang.php"].type){var l=new mn(this.textToSpeechPro);this.initiatedPlugins.polylang=l,this.initiatedPlugins.polylang.translate(ttsObjPro.compatible["polylang/polylang.php"])}return this.initiatedPlugins}const Cn=On;var xn=n(638);function An(e){return An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},An(e)}function Ln(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
2if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return En(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?En(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function In(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Mn(i.key),i)}}function Mn(e){var t=function(e,t){if("object"!=An(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=An(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==An(t)?t:t+""}function Nn(e,t,n){return t=Dn(t),function(e,t){if(t&&("object"==An(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fn()?Reflect.construct(t,n||[],Dn(e).constructor):t.apply(e,n))}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fn=function(){return!!e})()}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dn(e)}function qn(e,t){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qn(e,t)}function Rn(e,t){var n="undefined"!=typeof window?window.AtlasVoiceHighlighter:null;if(!n||!t)return null;var i=function(e){function t(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=Nn(this,t,[e])).cfg&&(i.cfg.wantSentence=!0,i.cfg.wantWord=!1),i.sentences=t._split(n),i._startFraction=t._startFractions(i.sentences),i._activeIndex=-1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(t,e),function(e,t,n){return t&&In(e.prototype,t),n&&In(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"_sentenceIndexForTime",value:function(e,t){if(!t||!this.sentences.length)return-1;for(var n=Math.min(1,Math.max(0,e/t)),i=0,r=0;r<this._startFraction.length&&n>=this._startFraction[r];r++)i=r;return i}},{key:"update",value:function(e,t){if(this.cfg&&this.cfg.enabled){var n=this._sentenceIndexForTime(e,t);n!==this._activeIndex&&n>=0&&this.sentences[n]&&(this._activeIndex=n,this.syncSentence(this.sentences[n]))}}},{key:"rangeForText",value:function(e,t){if("function"!=typeof this.estimateTimeRange)return null;var n=this.estimateTimeRange(e.start,e.end,t);return n&&e.fromHere&&(n.tEnd=null),n}},{key:"attach",value:function(e){if(e&&"function"==typeof e.on){var t=this;e.on("timeupdate",function(){t.update(e.currentTime,e.duration)}),e.on("ended",function(){t._activeIndex=-1,t.stop()}),e.on("seeking",function(){t._activeIndex=-1})}}}],[{key:"_split",value:function(e){return"function"==typeof n.splitSentences?n.splitSentences(e):(e||"").replace(/\s+/g," ").trim().split(/(?<=[.!?。!?])\s+/).map(function(e){return e.trim()}).filter(Boolean)}},{key:"_startFractions",value:function(e){var t,n=e.reduce(function(e,t){return e+t.length+1},0)||1,i=[],r=0,o=Ln(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;i.push(r/n),r+=a.length+1}}catch(e){o.e(e)}finally{o.f()}return i}}])}(n);return new i(e,t)}function Bn(e){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bn(e)}function Vn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
2if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Hn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function Hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Un(i.key),i)}}function Un(e){var t=function(e,t){if("object"!=Bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Bn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Bn(t)?t:t+""}function zn(e,t,n){return t=$n(t),function(e,t){if(t&&("object"==Bn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wn()?Reflect.construct(t,n||[],$n(e).constructor):t.apply(e,n))}function Wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wn=function(){return!!e})()}function $n(e){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(e)}function Kn(e,t){return Kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kn(e,t)}function Jn(e,t){var n="undefined"!=typeof window?window.AtlasVoiceHighlighter:null;if(!n||!t||!t.length)return null;var i=function(e){function t(e,i){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=zn(this,t,[e])).words=i,r.sentences=n.splitSentences(i.map(function(e){return e.w}).join(" ")),r.sentenceOfWord=t._mapWordsToSentences(r.words,r.sentences),r._bodyNorm=t._norm(r.root?r.root.textContent:""),r._activeWord=-1,r._activeSentence=-1,r._sentenceLocatable=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kn(e,t)}(t,e),function(e,t,n){return t&&Gn(e.prototype,t),n&&Gn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"_sentenceInBody",value:function(e){if(!this._bodyNorm)return!0;var n=t._norm(e);return!!n&&-1!==this._bodyNorm.indexOf(n.slice(0,Math.min(n.length,60)))}},{key:"_wordIndexForTime",value:function(e){for(var t=this.words,n=0,i=t.length-1,r=-1;n<=i;){var o=n+i>>1;t[o].t<=e?(r=o,n=o+1):i=o-1}return r}},{key:"update",value:function(e){if(this.cfg&&this.cfg.enabled){var t=this._wordIndexForTime(e);if(t<0)-1!==this._activeSentence&&(this.clear(),this._activeSentence=-1,this._activeWord=-1);else{var n=this.sentenceOfWord[t];n!==this._activeSentence&&(this._activeSentence=n,this._sentenceLocatable=this._sentenceInBody(this.sentences[n]),this._sentenceLocatable?this.syncSentence(this.sentences[n]):this.stop()),this._sentenceLocatable&&t!==this._activeWord&&(this._activeWord=t,this.highlightWord(this.words[t].w))}}}},{key:"rangeForText",value:function(e,n){var i=t._norm(e&&e.text).split(" ").filter(Boolean);if(!i.length)return null;var r=this._flatTokens(),o=i.slice(0,Math.min(8,i.length)),a=t._findSeq(r,o,0);if(-1===a)return"function"==typeof this.estimateTimeRange?this.estimateTimeRange(e.start,e.end,n):null;var l=this.words[r[a].wordIdx].t;if(e.fromHere)return{tStart:l,tEnd:null};var s=i.slice(-Math.min(8,i.length)),u=t._findSeq(r,s,a),c=-1!==u?u+s.length-1:Math.min(a+i.length-1,r.length-1),d=this.words[r[c].wordIdx+1];return{tStart:l,tEnd:d?d.t:n&&isFinite(n)?n:null}}},{key:"_flatTokens",value:function(){if(!this._flatTokenCache){for(var e=[],n=0;n<this.words.length;n++){var i=t._norm(this.words[n].w);if(i){var r,o=Vn(i.split(" "));try{for(o.s();!(r=o.n()).done;){var a=r.value;e.push({tok:a,wordIdx:n})}}catch(e){o.e(e)}finally{o.f()}}}this._flatTokenCache=e}return this._flatTokenCache}},{key:"attach",value:function(e){if(e&&"function"==typeof e.on){var t=this;e.on("timeupdate",function(){t.update(e.currentTime)}),e.on("ended",function(){t._activeWord=-1,t._activeSentence=-1,t.stop()}),e.on("seeking",function(){t._activeWord=-1,t._activeSentence=-1})}}}],[{key:"_norm",value:function(e){return(e||"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()}},{key:"_mapWordsToSentences",value:function(e,t){for(var n=new Array(e.length).fill(0),i=0,r=0;r<t.length;
vendor: 4,318 bytes, line 2
2r++)for(var o=t[r].split(/\s+/).filter(Boolean).length,a=0;a<o&&i<e.length;a++)n[i++]=r;for(var l=t.length-1;i<e.length;)n[i++]=l<0?0:l;return n}},{key:"_findSeq",value:function(e,t,n){if(!t.length)return-1;for(var i=e.length-t.length,r=Math.max(0,n);r<=i;r++){for(var o=0;o<t.length&&e[r+o].tok===t[o];)o++;if(o===t.length)return r}return-1}}])}(n);return new i(e,t)}function Yn(e){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(e)}function Xn(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return Qn(u,"_invoke",function(n,i,r){var o,l,s,u=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return o=t,l=0,s=e,h.n=n,a}};function f(n,i){for(l=n,s=i,t=0;!d&&u&&!r&&t<c.length;t++){var r,o=c[t],f=h.p,p=o[2];n>3?(r=p===i)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=n<2&&f<o[1])?(l=0,h.v=i,h.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,h.n=p,l=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),l=c,s=p;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(h.n=-1),f(l,s)):h.n=s:h.v=s);try{if(u=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(d=h.n<0)?s:n.call(i,h))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,r,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Qn(t={},i,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Qn(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,Qn(d,"constructor",u),Qn(u,"constructor",s),s.displayName="GeneratorFunction",Qn(u,r,"GeneratorFunction"),Qn(d),Qn(d,r,"Generator"),Qn(d,i,function(){return this}),Qn(d,"toString",function(){return"[object Generator]"}),(Xn=function(){return{w:o,m:h}})()}function Qn(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Qn=function(e,t,n,i){function o(t,n){Qn(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Qn(e,t,n,i)}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach(function(t){oi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ti(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function ni(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){ti(o,i,r,a,l,"next",e)}function l(e){ti(o,i,r,a,l,"throw",e)}a(void 0)})}}function ii(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ai(i.key),i)}}function ri(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function oi(e,t,n){return(t=ai(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ai(e){var t=function(e,t){if("object"!=Yn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Yn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yn(t)?t:t+""}
2function li(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var si=wp.i18n,ui=si.__,ci=si.sprintf,di=new WeakSet,hi=function(){return function(e,t,n){return t&&ii(e.prototype,t),n&&ii(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n,i,r,o,a,l,s,u=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.TTS,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ri(this,di),oi(this,"buttonId",void 0),oi(this,"title",""),oi(this,"contents",""),oi(this,"path",""),oi(this,"compatible",null),oi(this,"selectedLang","en"),oi(this,"isTranslated",!1),oi(this,"TTS",window.TTS),oi(this,"fileURL",""),oi(this,"ttsProLink",null!==(n=window)&&void 0!==n&&n.wp?wp.hooks.applyFilters("ttsProLink"," "):' <a href="https://atlasaidev.com/text-to-speech-pro/" target="_blank" >Learn More</a>'),oi(this,"waitingMessage",ui("Wait! Generating MP3","text-to-audio")),oi(this,"player_id",3),oi(this,"analytics",null),oi(this,"asynchronousMP3Generate",!(null===(i=window)||void 0===i||!i.wp)&&wp.hooks.applyFilters("ttsAsynchronousMP3Generate",!("undefined"==typeof ttsObjPro||null===(r=ttsObjPro)||void 0===r||!r.defer_mp3_generation))),oi(this,"isLoaderActive",!1),oi(this,"mp3FileGenerateLocked",null),oi(this,"alreadyAddedMP3",!1),oi(this,"deferredGenerateStarted",!1),oi(this,"deferredGeneratePromise",null),oi(this,"fetchData",function(){var e=ni(Xn().m(function e(t){var n,i,r;return Xn().w(function(e){for(;;)switch(e.n){case 0:return n=u.getUrl(t.endpoint),i=ei(ei({},i=t.config||{}),{headers:{"X-WP-Nonce":ttsObjPro.rest_nonce}}),e.n=1,fetch(n,i);case 1:return r=e.v,e.n=2,r.json();case 2:return e.a(2,e.v)}},e)}));return function(t){return e.apply(this,arguments)}}()),"function"==typeof NoSleep&&null!==(o=ttsObj)&&void 0!==o&&o.is_mobile){var f=new NoSleep;window.onload=function(){f.enable(),console.log("NoSleep enabled")}}if(this.skipPluginCompat=!!h.skipPluginCompat,this.skipAutoInit=!!h.skipAutoInit,this.TTS=d,this.buttonId=t,this.selectedLang=d.extra[t].language,this.voice=d.extra[t].voice,null!==(a=ttsObj.settings)&&void 0!==a&&null!==(a=a.customize)&&void 0!==a&&null!==(a=a.buttonSettings)&&void 0!==a&&a.id&&(this.player_id=null===(l=ttsObj.settings)||void 0===l||null===(l=l.customize)||void 0===l||null===(l=l.buttonSettings)||void 0===l?void 0:l.id),this.skipPluginCompat?this.storedContent=ae(c,0,this.buttonId):(this.storedContent=ce(c,d,this.buttonId),this.selectedLang=li(di,this,yi).call(this,this.storedContent)),this.content=he(c,d,this.buttonId,this.selectedLang,"constructor"),li(di,this,vi).call(this,d),li(di,this,gi).call(this,this.TTS),li(di,this,mi).call(this,d),!this.skipAutoInit)if(this.fileURL)this.init_gtts();else if(this.asynchronousMP3Generate)li(di,this,Ti).call(this,"");else if(3==ttsObjPro.player_id)null!==(s=this.compatible)&&void 0!==s&&null!==(s=s.initiatedPlugins)&&void 0!==s&&s.gtranslate?li(di,this,fi).call(this):this.init_gtts();else if(4==ttsObjPro.player_id){var p;null!==(p=this.compatible)&&void 0!==p&&null!==(p=p.initiatedPlugins)&&void 0!==p&&p.gtranslate?li(di,this,fi).call(this):this.init_gctts()}else if(5==ttsObjPro.player_id){var g;null!==(g=this.compatible)&&void 0!==g&&null!==(g=g.initiatedPlugins)&&void 0!==g&&g.gtranslate?li(di,this,fi).call(this):this.init_chat_gpt()}else if(6==ttsObjPro.player_id){var m;null!==(m=this.compatible)&&void 0!==m&&null!==(m=m.initiatedPlugins)&&void 0!==m&&m.gtranslate?li(di,this,fi).call(this):this.init_elevenlabs()}},[{key:"findMatchingKey",value:function(e,t){var n=Object.keys(e);if(n.includes(t))return t;for(var i=0,r=n;i<r.length;i++){var o=r[i];if((t=t.replace(/\b(male|female)\b/gi,"").trim())===o)return o}return null}},{key:"getCountryCode",value:function(e){return e?null!=e.indexOf("-")?e.split("-")[0]:null!=e.indexOf("_")?e.split("_")[0]:e:e}},{key:"init_gctts",value:(i=ni(Xn().m(function e(){var t,n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,_,T,S,k,P,O,j,C,x,A,L,E,I,M,N,F=this,D=arguments;return Xn().w(function(e){for(;;)switch(e.n){case 0:if(u=D.length>0&&void 0!==D[0]&&D[0],c=D.length>1&&void 0!==D[1]&&D[1],d=!(D.length>2&&void 0!==D[2])||D[2],li(di,this,Oi).call(this)||u){e.n=1;break}return e.a(2);case 1:if(0!=(null===(t=this.analytics)||void 0===t?void 0:t.userId)&&this.analytics){e.n=2;break}return!this.analytics&&window.AtlasVoiceAnalyticsPro&&(p=null===(f=window)||void 0===f?void 0:f.AtlasVoiceAnalyticsPro,this.analytics=p.getInstance(this.TTS)),e.n=2,null===(h=this.analytics)||void 0===h?void 0:h.getUniqueUserId();case 2:if(!this.fileURL){e.n=5;break}if(!u){e.n=3;break}return e.a(2,this.fileURL);case 3:li(di,this,Ti).call(this,this.fileURL);case 4:return e.a(2);case 5:this.asynchronousMP3Generate&&!c||li(di,this,Pi).call(this),g=this.getSettings(),m=null,(v=ye(g.language))||(v=this.storedContent),y=v.length,b=null!==(n=null===(i=ttsObjPro)||void 0===i||null===(i=i.batch_charlen)||void 0===i?void 0:i.initial_batch_charlen)&&void 0!==n?n:600,w=null!==(r=null===(o=ttsObjPro)||void 0===o||null===(o=o.batch_charlen)||void 0===o?void 0:o.latter_batch_char_length)&&void 0!==r?r:1500,_=li(di,this,bi).call(this,v,b,w),T=0,S=0,k=!1,P=0;case 6:if(!(P<y)){e.n=12;break}
2if(T++,0!==P&&(b=w),A=se(v,P,b),""!=(L=v.substr(P,A))){e.n=7;break}return e.a(3,12);case 7:return E=this.title+"-"+T,((S+=L.length)>=y||T>=_)&&(setTimeout(function(){document.querySelector(".tts_mp3_message")&&(document.querySelector(".tts_mp3_message").innerHTML="".concat(li(di,F,Ci).call(F),"  ").concat(F.ttsProLink))},1e3),k=!0),document.querySelector(".tts_mp3_loader")&&d&&(I=li(di,this,ji).call(this,T,_),document.querySelector(".tts_mp3_message").innerHTML=this.waitingMessage+" ".concat(I,"  ").concat(this.ttsProLink)),console.log({isLastBatch:k,batchNo:T,totalBatch:_}),e.n=8,this.fetchData({endpoint:"gctts",config:{headers:{"Content-Type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({is_last_batch:k,temp_title:E,title:this.title,content:L.trim(),path:this.path,settings:g,post_id:this.TTS.settings.postId,user_id:null!==(O=null===(j=this.analytics)||void 0===j?void 0:j.userId)&&void 0!==O?O:""})}});case 8:if(m=e.v,"locked"!==(null===(C=m)||void 0===C||null===(C=C.data)||void 0===C?void 0:C.message)){e.n=9;break}return e.a(3,12);case 9:if(null===(x=m)||void 0===x||null===(x=x.data)||void 0===x||!x.file_already_exists){e.n=10;break}return e.a(3,12);case 10:P+=A;case 11:e.n=6;break;case 12:if("locked"===(null===(a=m)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.message)?(M=this).mp3FileGenerateLocked=setTimeout(function(){var e,t;null!==(e=m)&&void 0!==e&&null!==(e=e.data)&&void 0!==e&&e.file_already_exists||null!==(t=m)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.url?(clearInterval(M.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),M.mp3FileGenerateLocked=null):(document.querySelector(".tts_mp3_loader")&&(document.querySelector(".tts_mp3_message").innerHTML=F.waitingMessage),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!1),M.init_gctts(u,!0,!1))},1e4):(clearInterval(this.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),this.mp3FileGenerateLocked=null),!u||null===(l=m)||void 0===l||null===(l=l.data)||void 0===l||!l.url){e.n=13;break}return e.a(2,null===(N=m)||void 0===N||null===(N=N.data)||void 0===N?void 0:N.url);case 13:null!==(s=m)&&void 0!==s&&null!==(s=s.data)&&void 0!==s&&s.url&&li(di,this,Ti).call(this,m.data.url,1);case 14:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"init_gtts",value:(n=ni(Xn().m(function e(){var t,n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,_,T,S,k,P,O,j,C,x,A,L,E,I,M,N,F,D=this,q=arguments;return Xn().w(function(e){for(;;)switch(e.n){case 0:if(u=q.length>0&&void 0!==q[0]&&q[0],c=q.length>1&&void 0!==q[1]&&q[1],d=!(q.length>2&&void 0!==q[2])||q[2],li(di,this,Oi).call(this)||u){e.n=1;break}return e.a(2);case 1:if(0!=(null===(t=this.analytics)||void 0===t?void 0:t.userId)&&this.analytics){e.n=2;break}return!this.analytics&&window.AtlasVoiceAnalyticsPro&&(p=null===(f=window)||void 0===f?void 0:f.AtlasVoiceAnalyticsPro,this.analytics=p.getInstance(this.TTS)),e.n=2,null===(h=this.analytics)||void 0===h?void 0:h.getUniqueUserId();case 2:if(!this.fileURL){e.n=5;break}if(!u){e.n=3;break}return e.a(2,this.fileURL);case 3:li(di,this,Ti).call(this,this.fileURL);case 4:return e.a(2);case 5:this.asynchronousMP3Generate&&!c||li(di,this,Pi).call(this),g=this.getSettings(),m=null,(v=ye(g.language))||(v=this.storedContent.trim()),y=v.length,b=0,w=0,_=!1,T=null!==(n=null===(i=ttsObjPro)||void 0===i||null===(i=i.batch_charlen)||void 0===i?void 0:i.initial_batch_charlen)&&void 0!==n?n:1e3,S=null!==(r=null===(o=ttsObjPro)||void 0===o||null===(o=o.batch_charlen)||void 0===o?void 0:o.latter_batch_char_length)&&void 0!==r?r:1500,k=li(di,this,bi).call(this,v,T,S),P=0;case 6:if(!(P<y)){e.n=12;break}if(b++,0!==P&&(T=S),A=se(v,P,T),""!=(L=v.substr(P,A))){e.n=7;break}return e.a(3,12);case 7:return document.querySelector(".tts_mp3_loader")&&d&&(E=li(di,this,ji).call(this,b,k),document.querySelector(".tts_mp3_message").innerHTML=this.waitingMessage+" ".concat(E,"  ").concat(this.ttsProLink)),I=this.title+"-"+b,((w+=L.length)>=y||b>=k)&&(setTimeout(function(){document.querySelector(".tts_mp3_message")&&(document.querySelector(".tts_mp3_message").innerHTML="".concat(li(di,D,Ci).call(D),"  ").concat(D.ttsProLink))},1e3),_=!0),M=L.trim(),console.log({perBatchContentLenght:w,contentTotalLength:y,isLastBatch:_}),e.n=8,this.fetchData({endpoint:"gtts",config:{headers:{"Content-Type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({is_last_batch:_,temp_title:I,title:this.title,content:M,path:this.path,settings:g,post_id:this.TTS.settings.postId,user_id:null!==(O=null===(j=this.analytics)||void 0===j?void 0:j.userId)&&void 0!==O?O:""})}});case 8:if(m=e.v,"locked"!==(null===(C=m)||void 0===C||null===(C=C.data)||void 0===C?void 0:C.message)){e.n=9;break}return e.a(3,12);case 9:if(null===(x=m)||void 0===x||null===(x=x.data)||void 0===x||!x.file_already_exists){e.n=10;break}return e.a(3,12);case 10:P+=A;case 11:e.n=6;break;case 12:if("locked"===(null===(a=m)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.message)?(N=this).mp3FileGenerateLocked=setTimeout(function(){var e,t;null!==(e=m)&&void 0!==e&&null!==(e=e.data)&&void 0!==e&&e.file_already_exists||null!==(t=m)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.url?(clearInterval(N.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),N.mp3FileGenerateLocked=null):(document.querySelector(".tts_mp3_loader")&&(document.querySelector(".tts_mp3_message").innerHTML=D.waitingMessage),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!1),N.init_gtts(u,!0,!1))},1e4):(clearInterval(this.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),this.mp3FileGenerateLocked=null),!u||null===(l=m)||void 0===l||null===(l=l.data)||void 0===l||!l.url){e.n=13;break}return e.a(2,null===(F=m)||void 0===F||null===(F=F.data)||void 0===F?void 0:F.url);case 13:null!==(s=m)&&void 0!==s&&null!==(s=s.data)&&void 0!==s&&s.url&&li(di,this,Ti).call(this,m.data.url,1);case 14:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"init_chat_gpt",value:(t=ni(Xn().m(function e(){var t,n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,_,T,S,k,P,O,j,C,x,A,L,E,I,M,N,F=this,D=arguments;return Xn().w(function(e){for(;;)switch(e.n){case 0:if(u=D.length>0&&void 0!==D[0]&&D[0],c=D.length>1&&void 0!==D[1]&&D[1],d=!(D.length>2&&void 0!==D[2])||D[2],li(di,this,Oi).call(this)||u){e.n=1;break}return e.a(2);case 1:if(0!=(null===(t=this.analytics)||void 0===t?void 0:t.userId)&&this.analytics){e.n=2;break}return!this.analytics&&window.AtlasVoiceAnalyticsPro&&(p=null===(f=window)||void 0===f?void 0:f.AtlasVoiceAnalyticsPro,this.analytics=p.getInstance(this.TTS)),e.n=2,null===(h=this.analytics)||void 0===h?void 0:h.getUniqueUserId();case 2:if(!this.fileURL){e.n=5;break}if(!u){e.n=3;break}return e.a(2,this.fileURL);case 3:li(di,this,Ti).call(this,this.fileURL);case 4:return e.a(2);case 5:this.asynchronousMP3Generate&&!c||li(di,this,Pi).call(this),g=this.getSettings(),m=null,(v=ye(g.language))||(v=this.storedContent),y=v.length,b=0,w=0,_=!1,T=null!==(n=null===(i=ttsObjPro)||void 0===i||null===(i=i.batch_charlen)||void 0===i?void 0:i.initial_batch_charlen)&&void 0!==n?n:600,S=null!==(r=null===(o=ttsObjPro)||void 0===o||null===(o=o.batch_charlen)||void 0===o?void 0:o.latter_batch_char_length)&&void 0!==r?r:1500,k=li(di,this,bi).call(this,v,T,S),P=0;case 6:if(!(P<y)){e.n=12;break}
2if(b++,0!==P&&(T=S),A=se(v,P,T),""!=(L=v.substr(P,A))){e.n=7;break}return e.a(3,12);case 7:return document.querySelector(".tts_mp3_loader")&&d&&(E=li(di,this,ji).call(this,b,k),document.querySelector(".tts_mp3_message").innerHTML=this.waitingMessage+" ".concat(E,"  ").concat(this.ttsProLink)),I=this.title+"-"+b,((w+=L.length)>=y||b>=k)&&(setTimeout(function(){document.querySelector(".tts_mp3_message")&&(document.querySelector(".tts_mp3_message").innerHTML="".concat(li(di,F,Ci).call(F),"  ").concat(F.ttsProLink))},1e3),_=!0),e.n=8,this.fetchData({endpoint:"chat_gpt",config:{headers:{"Content-Type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({is_last_batch:_,temp_title:I,title:this.title,content:L.trim(),path:this.path,settings:g,post_id:this.TTS.settings.postId,user_id:null!==(O=null===(j=this.analytics)||void 0===j?void 0:j.userId)&&void 0!==O?O:""})}});case 8:if(m=e.v,"locked"!==(null===(C=m)||void 0===C||null===(C=C.data)||void 0===C?void 0:C.message)){e.n=9;break}return e.a(3,12);case 9:if(null===(x=m)||void 0===x||null===(x=x.data)||void 0===x||!x.file_already_exists){e.n=10;break}return e.a(3,12);case 10:P+=A;case 11:e.n=6;break;case 12:if("locked"===(null===(a=m)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.message)?(M=this).mp3FileGenerateLocked=setTimeout(function(){var e,t;null!==(e=m)&&void 0!==e&&null!==(e=e.data)&&void 0!==e&&e.file_already_exists||null!==(t=m)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.url?(clearInterval(M.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),M.mp3FileGenerateLocked=null):(document.querySelector(".tts_mp3_loader")&&(document.querySelector(".tts_mp3_message").innerHTML=F.waitingMessage),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!1),M.init_chat_gpt(u,!0,!1))},1e4):(clearInterval(this.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),this.mp3FileGenerateLocked=null),!u||null===(l=m)||void 0===l||null===(l=l.data)||void 0===l||!l.url){e.n=13;break}return e.a(2,null===(N=m)||void 0===N||null===(N=N.data)||void 0===N?void 0:N.url);case 13:null!==(s=m)&&void 0!==s&&null!==(s=s.data)&&void 0!==s&&s.url&&li(di,this,Ti).call(this,m.data.url,1);case 14:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})},{key:"init_elevenlabs",value:(e=ni(Xn().m(function e(){var t,n,i,r,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,_,T,S,k,P,O,j,C,x,A,L,E,I,M,N,F,D,q=this,R=arguments;return Xn().w(function(e){for(;;)switch(e.n){case 0:if(u=R.length>0&&void 0!==R[0]&&R[0],c=R.length>1&&void 0!==R[1]&&R[1],d=!(R.length>2&&void 0!==R[2])||R[2],li(di,this,Oi).call(this)||u){e.n=1;break}return e.a(2);case 1:if(0!=(null===(t=this.analytics)||void 0===t?void 0:t.userId)&&this.analytics){e.n=2;break}return!this.analytics&&window.AtlasVoiceAnalyticsPro&&(p=null===(f=window)||void 0===f?void 0:f.AtlasVoiceAnalyticsPro,this.analytics=p.getInstance(this.TTS)),e.n=2,null===(h=this.analytics)||void 0===h?void 0:h.getUniqueUserId();case 2:if(!this.fileURL){e.n=5;break}if(!u){e.n=3;break}return e.a(2,this.fileURL);case 3:li(di,this,Ti).call(this,this.fileURL);case 4:return e.a(2);case 5:this.asynchronousMP3Generate&&!c||li(di,this,Pi).call(this),g=this.getSettings(),m=null,(v=ye(g.language))||(v=this.storedContent),y=v.length,b=0,w=0,_=!1,T=null!==(n=null===(i=ttsObjPro)||void 0===i||null===(i=i.batch_charlen)||void 0===i?void 0:i.initial_batch_charlen)&&void 0!==n?n:600,S=null!==(r=null===(o=ttsObjPro)||void 0===o||null===(o=o.batch_charlen)||void 0===o?void 0:o.latter_batch_char_length)&&void 0!==r?r:1500,k=li(di,this,bi).call(this,v,T,S),P=0;case 6:if(!(P<y)){e.n=13;break}if(b++,0!==P&&(T=S),L=se(v,P,T),""!=(E=v.substr(P,L))){e.n=7;break}return e.a(3,13);case 7:return document.querySelector(".tts_mp3_loader")&&d&&(I=li(di,this,ji).call(this,b,k),document.querySelector(".tts_mp3_message").innerHTML=this.waitingMessage+" ".concat(I,"  ").concat(this.ttsProLink)),M=this.title+"-"+b,((w+=E.length)>=y||b>=k)&&(setTimeout(function(){document.querySelector(".tts_mp3_message")&&(document.querySelector(".tts_mp3_message").innerHTML="".concat(li(di,q,Ci).call(q),"  ").
2concat(q.ttsProLink))},1e3),_=!0),e.n=8,this.fetchData({endpoint:"elevenlabs",config:{headers:{"Content-Type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({is_last_batch:_,temp_title:M,title:this.title,content:E.trim(),path:this.path,settings:g,post_id:this.TTS.settings.postId,user_id:null!==(O=null===(j=this.analytics)||void 0===j?void 0:j.userId)&&void 0!==O?O:""})}});case 8:if(m=e.v,!1!==(null===(C=m)||void 0===C?void 0:C.status)){e.n=9;break}return console.error("ElevenLabs TTS Error:",null===(N=m)||void 0===N||null===(N=N.data)||void 0===N?void 0:N.message),li(di,this,ki).call(this),e.a(3,13);case 9:if("locked"!==(null===(x=m)||void 0===x||null===(x=x.data)||void 0===x?void 0:x.message)){e.n=10;break}return e.a(3,13);case 10:if(null===(A=m)||void 0===A||null===(A=A.data)||void 0===A||!A.file_already_exists){e.n=11;break}return e.a(3,13);case 11:P+=L;case 12:e.n=6;break;case 13:if("locked"===(null===(a=m)||void 0===a||null===(a=a.data)||void 0===a?void 0:a.message)?(F=this).mp3FileGenerateLocked=setTimeout(function(){var e,t;null!==(e=m)&&void 0!==e&&null!==(e=e.data)&&void 0!==e&&e.file_already_exists||null!==(t=m)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.url?(clearInterval(F.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),F.mp3FileGenerateLocked=null):(document.querySelector(".tts_mp3_loader")&&(document.querySelector(".tts_mp3_message").innerHTML=q.waitingMessage),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!1),F.init_elevenlabs(u,!0,!1))},1e4):(clearInterval(this.mp3FileGenerateLocked),window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),this.mp3FileGenerateLocked=null),!u||null===(l=m)||void 0===l||null===(l=l.data)||void 0===l||!l.url){e.n=14;break}return e.a(2,null===(D=m)||void 0===D||null===(D=D.data)||void 0===D?void 0:D.url);case 14:null!==(s=m)&&void 0!==s&&null!==(s=s.data)&&void 0!==s&&s.url&&li(di,this,Ti).call(this,m.data.url,1);case 15:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"getUrl",value:function(e){var t=ttsObjPro.json_url+ttsObjPro.api_namespace+"/"+ttsObjPro.api_version+"/";return e&&(t+=e),t}},{key:"getSettings",value:function(){var e,t,n,i,r,o,a,l,s,u,c,d,h,f,p,g=null===(e=ttsObj.settings)||void 0===e||null===(e=e.customize)||void 0===e?void 0:e.buttonSettings;g?g.language=null!==(o=this.selectedLang)&&void 0!==o?o:null===(a=this.TTS)||void 0===a||null===(a=a.extra)||void 0===a||null===(a=a[this.buttonId])||void 0===a?void 0:a.language:g={language:null!==(l=this.selectedLang)&&void 0!==l?l:null===(s=this.TTS)||void 0===s||null===(s=s.extra)||void 0===s||null===(s=s[this.buttonId])||void 0===s?void 0:s.language};4==this.player_id&&null!=this&&null!==(t=this.TTS)&&void 0!==t&&t.extra&&(g=null==this||null===(u=this.TTS)||void 0===u?void 0:u.extra[this.buttonId]);5==this.player_id&&null!=this&&null!==(n=this.TTS)&&void 0!==n&&n.extra&&(g.voice=null==this||null===(c=this.TTS)||void 0===c||null===(c=c.extra[this.buttonId])||void 0===c?void 0:c.voice,g.model=null===(d=ttsObj.settings.listening)||void 0===d?void 0:d.tta__listening_voice_model,g.speed=null===(h=ttsObj.settings.listening)||void 0===h?void 0:h.tta__listening_rate,"gpt-4o-mini-tts"===g.model&&(g.instructions=(null===(f=ttsObj.settings.listening)||void 0===f?void 0:f.tta__listening_instructions)||""));if(6==this.player_id&&null!=this&&null!==(i=this.TTS)&&void 0!==i&&i.extra){var m,v,y,b,w,_,T,S,k,P,O=(null==this||null===(m=this.TTS)||void 0===m||null===(m=m.extra[this.buttonId])||void 0===m?void 0:m.voice)||"JBFqnCBsd6RMkjVDRZzb";g.voice_id=O.includes("::")?O.split("::")[0]:O,g.model_id=(null===(v=ttsObj.settings.listening)||void 0===v?void 0:v.tta__elevenlabs_model)||"eleven_multilingual_v2";var j=null===(y=ttsObj.settings.listening)||void 0===y?void 0:y.tta__elevenlabs_stability;void 0!==j&&""!==j&&null!==j&&(g.stability=parseFloat(j));var C=null===(b=ttsObj.settings.listening)||void 0===b?void 0:b.tta__elevenlabs_similarity_boost;void 0!==C&&""!==C&&null!==C&&(g.similarity_boost=parseFloat(C));var x=null===(w=ttsObj.settings.listening)||void 0===w?void 0:w.tta__elevenlabs_style;void 0!==x&&""!==x&&null!==x&&(g.style=parseFloat(x)),g.speed=parseFloat(null!==(_=null===(T=ttsObj.settings.listening)||void 0===T?void 0:T.tta__elevenlabs_speed)&&void 0!==_?_:1),g.use_speaker_boost=!0===(null===(S=ttsObj.settings.listening)||void 0===S?void 0:S.tta__elevenlabs_speaker_boost)||"true"===(null===(k=ttsObj.settings.listening)||void 0===k?void 0:k.tta__elevenlabs_speaker_boost),g.output_format=(null===(P=ttsObj.settings.listening)||void 0===P?void 0:P.tta__elevenlabs_output_format)||"mp3_44100_128"}null!=this&&null!==(r=this.TTS)&&void 0!==r&&null!==(r=r.extra[this.buttonId])&&void 0!==r&&r.file_url_key&&(g.file_url_key=null==this||null===(p=this.TTS)||void 0===p||null===(p=p.extra[this.buttonId])||void 0===p?void 0:p.file_url_key);return g}},{key:"setPlayerLanguageAndVoice",value:function(e){var t,n,i={};i.language=null===(t=this.TTS)||void 0===t||null===(t=t.extra)||void 0===t||null===(t=t[this.buttonId])||void 0===t?void 0:t.language,i.voice=null===(n=this.TTS)||void 0===n||null===(n=n.extra)||void 0===n||null===(n=n[this.buttonId])||void 0===n?void 0:n.voice;var r=ttsObj.settings;if(ttsObjPro.compatible&&r.listening&&r.listening.tta__multilingualActiveLanguages){var o=r.listening.tta__multilingualActiveLanguages;if(o[this.player_id]&&(o=o[this.player_id]).includes(e)){var a=this.findStringIndex(e,o),l=r.listening.tta__currentPlayerLanguages||{},s=(l=l[this.player_id]||[])[a],u=r.listening.tta__available_currentPlayerVoices||{},c="";u[this.player_id]&&(c=(u=u[this.player_id])[a]),s&&(i.language=s),c&&(i.voice=c)}}i.language=be(i.language),this.TTS.extra[this.buttonId].language=i.language,this.TTS.extra[this.buttonId].voice=i.voice,this.selectedLang=i.language,this.voice=i.voice;var d=this.selectedLang;if((4==this.player_id||5==this.player_id||6==this.player_id)&&this.voice){var h=this.voice;6==this.player_id&&h.includes("::")&&(h=h.split("::")[1]),d+="--voice--"+h}this.TTS.extra[this.buttonId].file_url_key=d}},{key:"findStringIndex",value:function(e,t){if(!e||!Array.isArray(t))return-1;for(var n=0;n<t.length;n++)if(t[n].includes(e))return n;return-1}}]);var e,t,n,i}();function fi(){var e=this,t=null;this.asynchronousMP3Generate||li(di,this,Pi).call(this),t=setInterval(function(){e.storedContent=e.compatible.initiatedPlugins.gtranslate.getStoredContent(),e.isTranslated=e.compatible.initiatedPlugins.gtranslate.isTranslatedContent(),e.isTranslated&&(clearInterval(t),e.asynchronousMP3Generate||li(di,e,ki).call(e),li(di,e,vi).call(e,TTS),4==ttsObjPro.player_id?e.init_gctts():5==ttsObjPro.player_id?e.init_chat_gpt():6==ttsObjPro.player_id?e.init_elevenlabs():e.init_gtts())},500)}function pi(e){var t;if("undefined"!=typeof ttsObjPro&&null!==(t=ttsObjPro)&&void 0!==t&&t.defer_mp3_generation){var n=document.getElementById("player_content_"+this.buttonId);if(n){var i="tts_staging_note_"+this.buttonId,r=document.getElementById(i);r||((r=document.createElement("div")).id=i,r.className="tts-staging-note",n.append(r));var o=ui("Staging","text-to-audio"),a=ui(e?"Visible to you only. Visitors see nothing until you go live.":"No audio generated yet. Press play to generate it — only you can see this.","text-to-audio");r.textContent="";var l=document.createElement("span");l.className="tts-staging-note__badge",l.textContent=o;var s=document.createElement("span");s.className="tts-staging-note__text",s.textContent=a,r.append(l,s)}}}function gi(e){var t,n,i,r;if(null!=e&&null!==(t=e.settings)&&void 0!==t&&t.is_regenerate_file)this.fileURL="";else{for(var o={},a=0,l=Object.keys(null==e||null===(s=e.settings)||void 0===s?void 0:s.fileURLs);a<l.length;a++){var s,u,c=l[a];o[null==c?void 0:c.toLowerCase()]=null==e||null===(u=e.settings)||void 0===u?void 0:u.fileURLs[c]}var d=null!==(n=null==e||null===(i=e.extra)||void 0===i||null===(i=i[this.buttonId])||void 0===i?void 0:i.file_url_key)&&void 0!==n?n:"";(d=null===(r=d)||void 0===r?void 0:r.toLowerCase())&&null!=o&&o[d]&&(this.fileURL=o[d]),this.fileURL||4!=this.player_id||(d=this.findMatchingKey(o,d))&&(this.TTS.extra[this.buttonId].file_url_key=d,this.fileURL=o[d])}}function mi(e){null!=e&&e.extra&&(this.path=e.extra[this.buttonId].date)}function vi(e){this.title=function(e,t,n){var i,r,o,a,l="";if(null!==(i=e.extra[t])&&void 0!==i&&i.file_name){if((l=null===(r=e.extra[t])||void 0===r?void 0:r.file_name)&&n&&3==e.extra.player_id){var s,u=null===(s=e.extra[t])||void 0===s||null===(s=s.file_name)||void 0===s||null===(s=s.match(/__lang__([\w-]+)$/))||void 0===s?void 0:s[1];u&&n.toLowerCase()!==u.toLowerCase()&&(l=l.replace("__lang__"+u,"__lang__"+n.toLowerCase()))}}else l=(l="Demo_Content")+"__lang__"+(null!==(o=null==e||null===(a=e.extra)||void 0===a||null===(a=a[t])||void 0===a?void 0:a.language)&&void 0!==o?o:n);return l}(e,this.buttonId,this.selectedLang)}function yi(e){var t,n,i,r;if(this.fileURL)return this.selectedLang;if(this.compatible=new Cn({content:e,thisClass:this}),null!==(t=this.compatible)&&void 0!==t&&null!==(t=t.initiatedPlugins)&&void 0!==t&&t.sitepress)this.selectedLang=this.compatible.initiatedPlugins.sitepress.getSelectedLanguage(this.selectedLang,this);else if(null!==(n=this.compatible)&&void 0!==n&&null!==(n=n.initiatedPlugins)&&void 0!==n&&n.gtranslate){var o;this.selectedLang=this.compatible.initiatedPlugins.gtranslate.getSelectedLanguage(this.selectedLang,this),wp.hooks.applyFilters("ttsSetSelectedLanguageFromDom",!1)&&this.setPlayerLanguageAndVoice(this.selectedLang),null!==(o=ttsObj.compatible["gtranslate/gtranslate.php"])&&void 0!==o&&o.pro_version}else null!==(i=this.compatible)&&void 0!==i&&null!==(i=i.initiatedPlugins)&&void 0!==i&&i.translatepress?this.selectedLang=this.compatible.initiatedPlugins.translatepress.getSelectedLanguage(this.selectedLang):null!==(r=this.compatible)&&void 0!==r&&null!==(r=r.initiatedPlugins)&&void 0!==r&&r.polylang&&(this.selectedLang=this.compatible.initiatedPlugins.polylang.getSelectedLanguage(this.selectedLang,this));return this.selectedLang=be(this.selectedLang),this.TTS.extra[this.buttonId].language=this.selectedLang,3==this.player_id&&(this.TTS.extra[this.buttonId].file_url_key=this.selectedLang),this.selectedLang}function bi(e,t,n){for(var i=0,r=e.length,o=0;o<r;
2){i++,0!==o&&(t=n);var a=se(e,o,t);if(""==e.substr(o,a)){0;break}o+=a}return i}function wi(){return _i.apply(this,arguments)}function _i(){return(_i=ni(Xn().m(function e(){var t,n=this;return Xn().w(function(e){for(;;)switch(e.n){case 0:if(!this.deferredGeneratePromise){e.n=1;break}return e.a(2,this.deferredGeneratePromise);case 1:return this.deferredGenerateStarted=!0,this.deferredGeneratePromise=ni(Xn().m(function e(){return Xn().w(function(e){for(;;)switch(e.n){case 0:if(4!=ttsObjPro.player_id){e.n=2;break}return e.n=1,n.init_gctts(!0,!0);case 1:case 3:case 5:case 7:return e.a(2,e.v);case 2:if(5!=ttsObjPro.player_id){e.n=4;break}return e.n=3,n.init_chat_gpt(!0,!0);case 4:if(6!=ttsObjPro.player_id){e.n=6;break}return e.n=5,n.init_elevenlabs(!0,!0);case 6:return e.n=7,n.init_gtts(!0,!0)}},e)}))(),e.n=2,this.deferredGeneratePromise;case 2:return(t=e.v)||(this.deferredGeneratePromise=null),e.a(2,t||"")}},e,this)}))).apply(this,arguments)}function Ti(e){var t,n=this;if(this.playerDesign=null!==(t=window)&&void 0!==t&&t.wp?wp.hooks.applyFilters("ttsProPlayerDesign",{isPlayerCustomizing:!1,displayLabels:!1},{url:e,playerClass:this}):{isPlayerCustomizing:!1,displayLabels:!1},window.AtlasVoiceAnalyticsPro&&!this.analytics){var i,r=null===(i=window)||void 0===i?void 0:i.AtlasVoiceAnalyticsPro;this.analytics=r.getInstance(this.TTS),ni(Xn().m(function e(){var t;return Xn().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=n.analytics)||void 0===t?void 0:t.getUniqueUserId();case 1:return e.a(2)}},e)}))()}if(!!document.createElement("audio").canPlayType){var o,a,l,s,u,c,d,h,f,p,g,m,v=document.getElementById("player_content_"+this.buttonId),y=null==v?void 0:v.childNodes;if(y&&y.length>1){var b=document.getElementById("player_"+this.buttonId);b&&b.remove()}var w,T=document.createElement("audio"),S=document.getElementById("player_"+this.buttonId);S?T=S:T.setAttribute("id","player_"+this.buttonId),T.setAttribute("preload","auto"),T.preload="auto",T.children.length>0&&"SOURCE"===T.children[0].tagName?w=T.children[0]:((w=document.createElement("source")).setAttribute("type","audio/mp3"),T.appendChild(w)),this.asynchronousMP3Generate&&!this.isLoaderActive||li(di,this,ki).call(this),e&&w.getAttribute("src")!==e&&w.setAttribute("src",e),S||document.getElementById("player_content_"+this.buttonId).append(T),li(di,this,pi).call(this,!!e);var k,P,O,j,C,x={controls:["play","progress","current-time","mute","volume","download","settings"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75]}};if(null!==(o=this.playerDesign)&&void 0!==o&&o.controls&&null!==(a=this.playerDesign)&&void 0!==a&&null!==(a=a.controls)&&void 0!==a&&a.length)x.controls=null===(k=this.playerDesign)||void 0===k?void 0:k.controls;if(!function(){var e,t,n,i=!0,r=null===(e=ttsObj.settings)||void 0===e||null===(e=e.customize)||void 0===e?void 0:e.buttonSettings,o=null===(t=ttsObjPro)||void 0===t?void 0:t.current_user,a=null!==(n=null==o?void 0:o.roles)&&void 0!==n?n:[];if(r){var l=Array.isArray(r.who_can_download_mp3_file)?r.who_can_download_mp3_file:[];if(a.length>0&&!l.includes("all")){var s,u=!1,c=_(l);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(a.includes(d)){u=!0;break}}}catch(e){c.e(e)}finally{c.f()}u||(i=!1)}else i=!1;(l.includes("all")||null==r||!r.who_can_download_mp3_file||(null==r?void 0:r.who_can_download_mp3_file.length)<1)&&(i=!0)}return i}(this.TTS))x.controls=null===(P=x)||void 0===P?void 0:P.controls.filter(function(e){return"download"!==e});if(null!==(l=this.playerDesign)&&void 0!==l&&l.i18n&&null!==(s=Object.keys(null===(u=this.playerDesign)||void 0===u?void 0:u.i18n))&&void 0!==s&&s.length)x.i18n=null===(O=this.playerDesign)||void 0===O?void 0:O.i18n;if((null===(c=this.playerDesign)||void 0===c||!c.loadSprite)&&null!==(d=this.playerDesign)&&void 0!==d&&d.iconUrl)x.iconUrl=null===(j=this.playerDesign)||void 0===j?void 0:j.iconUrl;if(null!==(h=this.playerDesign)&&void 0!==h&&h.speed&&null!==(f=Object.keys(null===(p=this.playerDesign)||void 0===p?void 0:p.speed))&&void 0!==f&&f.length)window.localStorage.removeItem("plyr"),x.speed=null===(C=this.playerDe
2sign)||void 0===C?void 0:C.speed;Object.keys(this.playerDesign).length&&(x=ei(ei({},x),this.playerDesign));var A=wp.hooks.applyFilters("ttsProPlayerOptions",x);A=ei(ei({},x),A);var L="";L=null!==(g=window)&&void 0!==g&&g.Plyr?new Plyr(document.getElementById("player_"+this.buttonId),A):new xn(document.getElementById("player_"+this.buttonId),A),null!==(m=this.playerDesign)&&void 0!==m&&m.displayLabels&&li(di,this,Si).call(this,L);var E=window.ttsObj&&window.ttsObj.settings&&window.ttsObj.settings.highlight||ttsObjPro&&ttsObjPro.settings&&ttsObjPro.settings.highlight||{};if((E.tta__highlight_enabled||E.tta__selection_listen_enabled)&&!this._highlighterAttached){this._highlighterAttached=!0;var I=function(e){e&&(n._audioHighlighter=e,e.attach(L))};if(4!=ttsObjPro.player_id&&6!=ttsObjPro.player_id||!e)3!=ttsObjPro.player_id&&5!=ttsObjPro.player_id||I(Rn(this.buttonId,this.content));else{var M=e.replace(/\.mp3(\?[^#]*)?$/i,".json");M=M.replace(/^https:\/\/([^/.]+)\.storage\.googleapis\.com\//i,"https://storage.googleapis.com/$1/"),fetch(M).then(function(e){return e.ok?e.json():null}).then(function(e){e&&Array.isArray(e.words)&&e.words.length&&!1!==e.complete?I(Jn(n.buttonId,e.words)):I(Rn(n.buttonId,n.content))}).catch(function(){return I(Rn(n.buttonId,n.content))})}}E.tta__selection_listen_enabled&&!this._selectionListenAttached&&(this._selectionListenAttached=!0,this._selectionStopAt=null,L.on("timeupdate",function(){null!=n._selectionStopAt&&L.currentTime>=n._selectionStopAt&&(n._selectionStopAt=null,L.pause())}),L.on("ended",function(){n._selectionStopAt=null}),wp.hooks.addAction("tts_listen_selection","tta-pro/selection-"+this.buttonId,function(e){if(e&&String(e.buttonId)===String(n.buttonId)){var t=n._audioHighlighter;if(t&&"function"==typeof t.rangeForText){var i=function(){var i=t.rangeForText(e,L.duration);i&&(n._selectionStopAt=e.fromHere?null:i.tEnd,L.currentTime=Math.max(0,i.tStart||0),L.play())};L.duration&&isFinite(L.duration)?i():(L.once("canplay",i),L.play())}}}));var N=this;L.on("waiting",function(){var t=ni(Xn().m(function t(i){var r,o,a;return Xn().w(function(t){for(;;)switch(t.n){case 0:if(!N.deferredGenerateStarted){t.n=1;break}return t.a(2);case 1:return L.off("waiting",n),t.n=2,li(di,N,wi).call(N);case 2:if(e=t.v){if((r=T.querySelector("source"))&&r.getAttribute("src")!==e){r.setAttribute("src",e),"function"==typeof T.load&&T.load();try{L.download=e}catch(t){(a=null===(o=T.parentElement)||void 0===o?void 0:o.querySelector('a[data-plyr="download"]'))&&a.setAttribute("href",e)}}li(di,N,ki).call(N),li(di,N,pi).call(N,!0),L.play(),N.analytics&&N.analytics.trackPlay()}case 3:return t.a(2)}},t)}));function n(e){return t.apply(this,arguments)}return n}()),L.on("play",function(t){var n;N.analytics&&e&&N.analytics.trackPlay(),null!==(n=N.playerDesign)&&void 0!==n&&n.displayLabels&&li(di,N,Si).call(N,L)}),L.on("pause",function(e){var t;N.analytics&&N.analytics.trackPause(),null!==(t=N.playerDesign)&&void 0!==t&&t.displayLabels&&li(di,N,Si).call(N,L)}),L.on("restart",function(e){var t;N.analytics&&N.analytics.trackPlay(),null!==(t=N.playerDesign)&&void 0!==t&&t.displayLabels&&li(di,N,Si).call(N,L)}),L.on("progress",function(e){}),L.on("volumechange",function(e){}),L.on("ended",function(e){N.analytics&&N.analytics.trackEnd()}),L.on("ratechange",function(){}),L.on("download",function(e){var t;null!==(t=N.playerDesign)&&void 0!==t&&null!==(t=t.listeners)&&void 0!==t&&t.download||!N.analytics||N.analytics.trackDownload()}),window.Plyr=L}}function Si(e){var t,n="paused";e.stopped?n="stopped":e.playing&&(n="playing");var i=document.getElementById("player_content_"+this.buttonId),r="label--not-pressed",o="label--pressed";["paused","stopped"].includes(n)||(r="label--pressed",o="label--not-pressed"),null!=i&&null!==(t=i.querySelectorAll(".plyr__controls__item"))&&void 0!==t&&t.length&&i.querySelectorAll(".plyr__controls__item").forEach(function(e){e.querySelectorAll("span").forEach(function(e){e.classList.contains(r)&&e.classList.contains("plyr__sr-only")?e.classList.remove(r,"plyr__sr-only"):(e.classList.add("plyr__sr-only"),e.classList.add(o))})})}function ki(){var e;document.getElementById("tts_pro_loader_"+this.buttonId)&&document.getElementById("tts_pro_loader_"+this.buttonId).remove();var t=document.getElementById("player_content_"+this.buttonId);null!=t&&t.firstElementChild&&"none"===(null===(e=window)||void 0===e||null===(e=e.getComputedStyle(null==t?void 0:t.firstElementChild))||void 0===e?void 0:e.display)&&(t.firstElementChild.style.display="block"),this.isLoaderActive=!1}function Pi(){var e,t,n,i;if(!this.isLoaderActive){this.isLoaderActive||(this.isLoaderActive=!0);var r=document.getElementById("player_content_"+this.buttonId);if(r){null!=r&&null!==(e=r.firstElementChild)&&void 0!==e&&null!==(e=e.classList)&&void 0!==e&&e.contains("plyr--audio")&&null!=r&&null!==(t=r.firstElementChild)&&void 0!==t&&null!==(t=t.classList)&&void 0!==t&&t.contains("plyr--html5")&&(r.firstElementChild.style.display="none");var o=document.createElement("div");o.setAttribute("id","tts_pro_loader_"+this.buttonId);var a=this.waitingMessage,l='<span class="tts_mp3_message"> '.concat(a,"  ").concat(this.ttsProLink,"</span>");o.innerHTML='<div id="tts_mp3_loader" class="tts_mp3_loader">\n              <div class="cssProgress">\n        <div class="progress">\n          <div class="cssProgress-bar cssProgress-active-right" data-percent="75" style="width: 100%;">
2\n'+'            <span class="cssProgress-label">'.concat(l,"</span>\n        ")+"          </div>\n        </div>\n      </div>\n      \n    </div>",r.append(o);var s,u,c,d,h=document.querySelector(".cssProgress .cssProgress-bar"),f=document.querySelector(".cssProgress .cssProgress-label"),p=document.querySelector(".cssProgress");if(null!==(n=ttsObj.settings)&&void 0!==n&&null!==(n=n.customize)&&void 0!==n&&n.backgroundColor&&null!==(i=ttsObj.settings)&&void 0!==i&&null!==(i=i.customize)&&void 0!==i&&i.color&&f&&h)p.style.width=null!==(s=(null===(u=ttsObj.settings)||void 0===u||null===(u=u.customize)||void 0===u?void 0:u.width)+"%")&&void 0!==s?s:"100%",h.style.backgroundColor=null===(c=ttsObj.settings)||void 0===c||null===(c=c.customize)||void 0===c?void 0:c.backgroundColor,h.style.height="50px",f.style.color=null===(d=ttsObj.settings)||void 0===d||null===(d=d.customize)||void 0===d?void 0:d.color,f.style.lineHeight="50px"}}}function Oi(){return!JSON.parse(window.sessionStorage.getItem("atlasVoice__playerStartGeneratingFile"))&&(window.sessionStorage.setItem("atlasVoice__playerStartGeneratingFile",!0),!0)}function ji(e,t){return ci(ui("Batch No. %1$d out of %2$d","text-to-audio"),e,t)}function Ci(){return ui("You are almost there.","text-to-audio")}window.TextToSpeechProPlayer=hi})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.